url stringlengths 14 2.42k | text stringlengths 100 1.02M | date stringlengths 19 19 | metadata stringlengths 1.06k 1.1k |
|---|---|---|---|
https://bcgov.github.io/fasstr/reference/write_flow_data.html | Write a daily streamflow data set to a directory. Can fill missing dates or filter data by years or dates before writing using given arguments. List data frame or HYDAT station number to write its entirety. Can write as .xls, .xlsx, or .csv file types. Writing as Excel file type uses the writexl package.
write_flow_data(
data,
dates = Date,
values = Value,
groups = STATION_NUMBER,
station_number,
water_year_start = 1,
start_year,
end_year,
start_date,
end_date,
file_name,
fill_missing = FALSE,
digits
)
## Arguments
data Data frame of daily data that contains columns of dates, flow values, and (optional) groups (e.g. station numbers). Leave blank if using station_number argument. Name of column in data that contains dates formatted YYYY-MM-DD. Only required if dates column name is not 'Date' (default). Leave blank if using station_number argument. Name of column in data that contains numeric flow values, in units of cubic metres per second. Only required if values column name is not 'Value' (default). Leave blank if using station_number argument. Name of column in data that contains unique identifiers for different data sets, if applicable. Only required if groups column name is not 'STATION_NUMBER'. Function will automatically group by a column named 'STATION_NUMBER' if present. Remove the 'STATION_NUMBER' column beforehand to remove this grouping. Leave blank if using station_number argument. Character string vector of seven digit Water Survey of Canada station numbers (e.g. "08NM116") of which to extract daily streamflow data from a HYDAT database. Requires tidyhydat package and a HYDAT database. Leave blank if using data argument. Numeric value indicating the month (1 through 12) of the start of water year for analysis. Default 1. Numeric value of the first year of data to write. Leave blank to use the first year of the source data. Numeric value of the last year of data to write. Leave blank to use the last year of the source data. Date (YYYY-MM-DD) of first date of data to write. Leave blank if all dates required. Date (YYYY-MM-DD) of last date of data to write. Leave blank if all dates required. Character string naming the output file. If none provided, a default file name (with .xlsx) is provided (see "Successfully created" message when using function for file name). Logical value indicating whether to fill dates with missing flow data with NA. Default FALSE. Integer indicating the number of decimal places or significant digits used to round flow values. Use follows that of base::round() digits argument.
## Examples
if (FALSE) {
# Working examples:
# Write data from a data frame
flow_data <- tidyhydat::hy_daily_flows(station_number = "08NM116")
write_flow_data(data = flow_data,
file_name = "Mission_Creek_daily_flows.xlsx")
# Write data directly from HYDAT
write_flow_data(station_number = "08NM116",
file_name = "Mission_Creek_daily_flows.xlsx")
# Write data directly from HYDAT and fill missing dates with NA
write_flow_data(station_number = "08NM116",
file_name = "Mission_Creek_daily_flows.xlsx",
fill_missing = TRUE)
} | 2021-06-18 15:51:55 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.18408553302288055, "perplexity": 7529.837329127918}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-25/segments/1623487637721.34/warc/CC-MAIN-20210618134943-20210618164943-00361.warc.gz"} |
https://stacks.math.columbia.edu/tag/0B66 | Lemma 15.65.10. Let $A \to B$ be a ring map. Let $K^\bullet$ and $L^\bullet$ be complexes of $B$-modules. Let $a, b, c, d \in \mathbf{Z}$. If
1. $K^\bullet$ as a complex of $B$-modules has tor amplitude in $[a, b]$,
2. $L^\bullet$ as a complex of $A$-modules has tor amplitude in $[c, d]$,
then $K^\bullet \otimes ^\mathbf {L}_ B L^\bullet$ as a complex of $A$-modules has tor amplitude in $[a + c, b + d]$.
Proof. We may assume that $K^\bullet$ is a complex of flat $B$-modules with $K^ i = 0$ for $i \not\in [a, b]$, see Lemma 15.65.3. Let $M$ be an $A$-module. Choose a free resolution $F^\bullet \to M$. Then
$(K^\bullet \otimes _ B^\mathbf {L} L^\bullet ) \otimes _ A^{\mathbf{L}} M = \text{Tot}(\text{Tot}(K^\bullet \otimes _ B L^\bullet ) \otimes _ A F^\bullet ) = \text{Tot}(K^\bullet \otimes _ B \text{Tot}(L^\bullet \otimes _ A F^\bullet ))$
see Homology, Remark 12.18.4 for the second equality. By assumption (2) the complex $\text{Tot}(L^\bullet \otimes _ A F^\bullet )$ has nonzero cohomology only in degrees $[c, d]$. Hence the spectral sequence of Homology, Lemma 12.25.1 for the double complex $K^\bullet \otimes _ B \text{Tot}(L^\bullet \otimes _ A F^\bullet )$ proves that $(K^\bullet \otimes _ B^\mathbf {L} L^\bullet ) \otimes _ A^{\mathbf{L}} M$ has nonzero cohomology only in degrees $[a + c, b + d]$. $\square$
Comment #5720 by on
Dear Joel, I checked the argument carefully and I do not think one needs this assumption. Also, in applications it is important that we don't assume this.
There are also:
• 2 comment(s) on Section 15.65: Tor dimension
In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar). | 2021-10-25 00:51:37 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 2, "x-ck12": 0, "texerror": 0, "math_score": 0.9875248670578003, "perplexity": 361.32790836664213}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323587608.86/warc/CC-MAIN-20211024235512-20211025025512-00377.warc.gz"} |
https://buboflash.eu/bubo5/show-dao2?d=7013991845132 | Question
Fortunately I was able to ask someone the way, and a very kind woman [show route, guide] the A38, where I could then follow signs for the airport.
directed me to
Question
Fortunately I was able to ask someone the way, and a very kind woman [show route, guide] the A38, where I could then follow signs for the airport.
?
Question
Fortunately I was able to ask someone the way, and a very kind woman [show route, guide] the A38, where I could then follow signs for the airport.
directed me to
If you want to change selection, open original toplevel document below and click on "Move attachment"
#### Parent (intermediate) annotation
Open it
via the village of Pensford, but I took the wrong turning just before I got there, and I ended up in a supermarket car park. Fortunately I was able to ask someone the way, and a very kind woman <span>directed me to the A38, where I could then follow signs for the airport. <span>
#### Original toplevel document (pdf)
owner: Mirota - (no access) - English Vocabulary in Use - Pre-Intermediate and Intermediate.pdf, p65
#### Summary
status measured difficulty not learned 37% [default] 0
No repetitions | 2022-05-28 05:30:02 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8235655426979065, "perplexity": 5232.518103017577}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652663012542.85/warc/CC-MAIN-20220528031224-20220528061224-00122.warc.gz"} |
https://neusncp.com/user/file?id=321 | ##### hxy
No pains, no gains.
## Multilayer-networks-library-master.zip
Pymnet 防丢链接
The data types in this library follow the mathematical definitions of various multilayer network types defined in the article “Multilayer Networks”, M. Kivela et al., arXiv:1309.7233 [physics.soc-ph]. In the article a multilayer network is defined as a general mathematical structure and all the other types of networks are defined as special cases of that structure. Here we take e a similar approach and define a class MultilayerNetwork such that it represents the mathematical definition of the multilayer network. All the other network classes then inherit the MultilayerNetwork class. Currently we have the MultiplexNetwork class which represent multiplex networks as defined in the article. In the article there were several constraints defined for multiplex networks. Some of these constraints, such as “categorical” and “ordinal” couplings, are also implemented in this library. Instances of MultiplexNetwork that are constrained in this way can be implemented efficiently and the algorithms dealing with general multilayer networks can take advantage of the information that the network object is constrained. | 2023-01-28 02:40:06 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8842593431472778, "perplexity": 916.6816039403536}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-06/segments/1674764499470.19/warc/CC-MAIN-20230128023233-20230128053233-00485.warc.gz"} |
https://math.stackexchange.com/questions/919018/can-someone-explain-to-me-why-this-series-diverges | # Can someone explain to me why this series diverges?
I have this series
$$\sum_{k=1}^{\infty}\frac{1}{k^{3+\cos k}}$$
I understand that if the exponent is fixed (not a function) and greater than 1 the series converges (p-series) but I can see in wolfram that this series diverges clearly (wolfram says that the comparison test shows that the series diverges... but I dont know what series is using on the comparison).
• Just to be clear, did you mean for the summand to be $\dfrac{1}{a^{3+\cos k}}$ instead of $\dfrac{1}{a(3+\cos k)}$? – JimmyK4542 Sep 4 '14 at 6:33
• The first. Sry, I did some mistakes. I put a but I was talking about harmonic-type series and not geonetric-type derivations. – Masacroso Sep 4 '14 at 6:38
• Now, you don't have the variable $a$ anywhere in the summation. – JimmyK4542 Sep 4 '14 at 6:39
• @JimmyK4542, yes, sorry for the first mistakes... No a, just a derivation of Riemann series with function on exponent. Sry first mistakes. If I put a it isnt what I was trying to compare. – Masacroso Sep 4 '14 at 6:40
• Is $n$ a constant? Or did you mean $$\sum_{k=1}^\infty \dfrac{1}{k^{3+\cos(k)}}$$ – Robert Israel Sep 4 '14 at 6:41
Since $3 + \cos(k) \ge 2$ for all $k$, $\dfrac{1}{k^{3+\cos(k)}} \le \dfrac{1}{k^2}$, so this series converges by the comparison test. You might have confused Wolfram by using $n$ instead of $k$: if $n$ is a constant the series $\sum_k \dfrac{1}{n^{3+\cos(k)}}$ diverges because the terms are bounded below.
This series is convergent. Since $\cos k\ge -1$, $$\frac{1}{k^{3+\cos k}}\le \frac {1}{k^2}.$$ It would be more interesting if it were $\frac{1}{k^{2+\cos k}}$.
• Masacroso: You should be aware now that the series of general term $1/k^{2+\cos k}$ is an entirely different story... hence asking about it on the present page is inappropriate. – Did Sep 4 '14 at 7:08 | 2019-10-22 06:57:16 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9580759406089783, "perplexity": 388.4044422857479}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-43/segments/1570987803441.95/warc/CC-MAIN-20191022053647-20191022081147-00276.warc.gz"} |
https://askubuntu.com/questions/201544/how-to-run-a-file-with-sudo-without-a-password?noredirect=1 | # How to run a file with sudo without a password? [duplicate]
Possible Duplicate:
How to run an application using sudo without a password?
I've made a script that preforms various system tasks, that I run regularly, but I have to use sudo to run the script, despite the fact that I own it because it runs root privileged commands. How can I add make sudo let me run this one file without having to enter my password every time I run it?
I know that there are questions regarding running commands without a password, but I wasn't able to find one on running a file without a password.
I am aware of the security risks, but I'm at home on a computer that I trust.
I added john ALL = NOPASSWD: /home/john/.script/hibernate.sh to my /etc/sudoers but when running the command sudo sh /home/john/.script/hibernate.sh it still prompts me for my password...
## marked as duplicate by user76204, Thomas Ward♦, Tachyons, user61928, Mitch♦Oct 16 '12 at 5:31
Use visudo for a safe editing environment to edit the sudoers file. This script is a wrapper around vi that also does syntax checking when you save the file and won't let you overwrite a valid sudoers file with an invalid one.
username ALL= NOPASSWD: /path/to/your/script
The "ALL=" bears some elaboration, it specifies that the permission is granted when the user in question is logged in from any location, locally (console or terminal) or remotely (ssh, etc).
• For whatever reason, this method doesn't work. My username is john, and the file resides in ".script" which is inside my home. So i entered "john ALL = NOPASSWD: /home/john/.script/hibernate.sh" where hibernate.sh is the name of the script. After running "sudo sh /home/john/.script/hibernate.sh" it still asks for my password... – codesmith Oct 15 '12 at 22:21
• You need to make your .sh script executable and then just do "sudo /home/john/.script/hibernate.sh". The way you're trying to run it, john would need sudo permission to /bin/sh – Sparr Oct 15 '12 at 22:34
• the file is already executable, or at least is showed as such in nautilus > properties. – codesmith Oct 15 '12 at 22:37
• I just used chmod +rwx, and it still won't work... – codesmith Oct 15 '12 at 22:42
• the +x is step one. now change your command from "sh script" to "script" – Sparr Oct 15 '12 at 23:25
For completeness sake, you can achieve a similar effect by setting setuid bit in the file's permissions.
A slightly tricky part is that for security reasons setuid bit on scripts is ignored by the kernel, so you'll need to compile a small wrapper program in C and use it to invoke your script. Save this as runscript.c:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
setuid( 0 );
system( "/path/to/script.sh" );
return 0;
}
then compile it with
gcc runscript.c -o runscript
and set setuid bit on the executable:
sudo chown root:root runscript
sudo chmod 4755 runscript
It is also important to make sure your script is only writable by root, since everyone who can modify the script will be able to execute arbitrary programs:
sudo chown root:root /path/to/script.sh
sudo chmod 0711 /path/to/script.sh
Here's an article I've got the wrapper program code from: setuid on shell scripts.
Security-wise, both approaches - the one with sudo and the one with setuid - are pretty bad, but probably will be ok on a home machine. The difference is that every user in the system will be able to run a setuid command, even without being in the sudoers file. Also, obviously, you won't need to prefix the command with sudo.
You need the "NOPASSWD" tag.
Use visudo and set something like this at the end of the file:
john ALL=NOPASSWD: /usr/sbin/pm-hibernate | 2019-10-16 04:22:54 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2193450629711151, "perplexity": 4143.838037867272}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-43/segments/1570986664662.15/warc/CC-MAIN-20191016041344-20191016064844-00158.warc.gz"} |
https://www.mackichan.com/techtalk/343.htm | Technical Support
Forums and Mailing Lists
Search Mackichan Web
SWP & SW
Version 5/5.5
Installation
Word Processing
Computations
Typesetting
File Issues
Graphics
Exam Builder
Style Editor
Other
Technical Articles
Scientific Notebook
Support Information
Troubleshooting
TeXnology
BibDB
Document 343
## How to add multiple accents to a character
Version: 2.5, 3.x, 4.x - Scientific WorkPlace, Scientific Word
Although SWP and SW have no direct interface for multiple character accents in mathematics, such as or , they are supported by LaTeX and you can create them successfully using TeX commands or, in some cases, labels, or decorations.
If you frequently use characters with multiple accents, you can save time by creating them once using the method you prefer and then saving them as a fragments for later recall.
### Using TeX commands
Using TeX commands ensures that the symbols you want are correctly represented when your document is typeset. The steps that follow create the accented character . Use these instructions as a guide and substitute the TeX command appropriate for the accents and characters you want.
1. Place the insertion point where you want the accented character to appear and start mathematics.
2. Click or, from the Insert menu, choose Typeset Object and then choose TeX Field.
3. Type \dot{\bar{x}} or the TeX commands for the accents you want.
4. Choose OK.
In the document window, you see in place of the character. When you typeset your document, LaTeX interprets the command and the character appears correctly. If you don't encapsulate the TeX command, the character appears correctly after you save and reopen the document.
Note that AMS-TeX supports commands, such as \Dot, \Hat, and \Bar, that improve spacing for multiple accents.
### Using labels
You may be able to obtain multiple accents by entering the second accent as a label, as described below to obtain . However, the characters produced may not have as good a typeset appearance as those produced with TeX commands.
Use these instructions as a guide and substitute the accents appropriate for the characters you want. Note that not all symbols are available as accents.
1. Place the insertion point where you want the accented character to appear and start mathematics.
2. Type x, choose Properties, select the overbar, and then choose OK.
3. Select and from the Insert menu, choose Label.
4. Select Above and choose OK.
5. Type a period and press the spacebar.
### Using decorations
You may also be able to obtain multiple accents by entering the second accent as a decoration, as described below to obtain . The characters produced may not have as good a typeset appearance as those produced with TeX commands.
Use these instructions as a guide and substitute the accents appropriate for the characters you want. Note that not all symbols are available as decorations.
1. Place the insertion point where you want the accented character to appear and start mathematics.
2. Type x, choose Properties, select the overbar, and then choose OK.
3. Select and from the Insert menu, choose Decorations.
4. Select the hat and choose OK. | 2018-03-25 05:26:51 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9569863080978394, "perplexity": 4510.993469960901}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-13/segments/1521257651820.82/warc/CC-MAIN-20180325044627-20180325064627-00284.warc.gz"} |
https://www.lewuathe.com/node/javascript/async/closure-with-async-dot-js.html | # Closure with Async.js
You may use Async.js at least one time when you develop with nodejs.
Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript.
So if you want to write asynchronous code with JavaScript, I recommend you to use it. It’s easy to use, simple syntax. However I had trouble with using Async.js in the context of giving dynamic task array. In this article, I want to share how to write dynamic task array given to Async.js module.
## Problem
I wrote like a below code with nodejs.
var async = require('async');
// Total task is 10 which is executed in parallel
for (var i = 0; i < TASK_NUM; i++) {
console.log(i);
callback(null, i);
});
}
console.log(results);
});
When you run this code, I obtained below output.
10
10
10
10
10
10
10
10
10
10
[ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 ]
This didn’t fit my expectation. I thought all tasks should get i-th argument. So each task’s output is i-th number, if i-th task runs. However in this case, all task’s output is 10. Why closure in function(In JavaScript, function makes variable scope, called closure) might not be effective?
A closure doesn’t “trap” the value that an outer variable had at the time it was created; it “traps” a reference to whatever value the outer variable has at the time it’s executed (which in this case won’t be until well after your for loop has finished.
So in this case, closure does not make scope when it is declared, but executed. The variable i resulted in 10 after for loop in this code. And then each tasks will be executed under the condition that variable i is 10. I understood why these odd phenomenon was occured.
## How to write
How should I write in order to execute this code as I expected in advance. Same page showed me the answer.
var deleteFunction = makeDeleteFunction(i, callback);
Writing wrapper function which wraps my original tasks makes scope under given argument i. When you declare task, you should not make task function directly, but should give parameters which trapped in declaration context to the wrapper function. Here is my sample that is corresponds to above code.
var async = require('async');
// Wrapper function
return function(callback) {
console.log(i);
callback(null, i);
};
}
// Total task is 10 which is executed in parallel
for (var i = 0; i < TASK_NUM; i++) {
}
console.log(results);
});
Then output is given as I expected.
0
1
2
3
4
5
6
7
8
9
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
If you write dynamic task function with Async.js, notice these fact. | 2019-09-21 19:10:41 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.32336562871932983, "perplexity": 2192.077624360144}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-39/segments/1568514574662.80/warc/CC-MAIN-20190921190812-20190921212812-00236.warc.gz"} |
https://darrenjw.wordpress.com/tag/example/ | ## Scala for Data Science [book review]
This post will review the book:
Disclaimer: This book review has not been solicited by the publisher (or anyone else) in any way. I purchased the review copy of this book myself. I have not received any benefit from the writing of this review.
## Introduction
On this blog I previously reviewed the (terrible) book, Scala for machine learning by the same publisher. I was therefore rather wary of buying this book. But the topic coverage looked good, so I decided to buy it, and wasn’t disappointed. Scala for Data Science is my top recommendation for getting started with statistical computing and data science applications using Scala.
## Overview
The book assumes a basic familiarity with programming in Scala, at around the level of someone who has completed the Functional Programming Principles in Scala Coursera course. That is, it (quite sensibly) doesn’t attempt to teach the reader how to program in Scala, but rather how to approach the development of data science applications using Scala. It introduces more advanced Scala idioms gradually (eg. typeclasses don’t appear until Chapter 5), so it is relatively approachable for those who aren’t yet Scala experts. The book does cover Apache Spark, but Spark isn’t introduced until Chapter 10, so it isn’t “just another Spark book”. Most of the book is about developing data science applications in Scala, completely independently of Spark. That said, it also provides one of the better introductions to Spark, so doubles up as a pretty good introductory Spark book, in addition to being a good introduction to the development of data science applications with Scala. It should probably be emphasised that the book is very much focused on data science, rather than statistical computing, but there is plenty of material of relevance to those who are more interested in statistical computing than applied data science.
## Chapter by chapter
1. Scala and Data Science – motivation for using Scala in preference to certain other languages I could mention…
2. Manipulating data with BreezeBreeze is the standard Scala library for scientific and statistical computing. It’s pretty good, but documentation is rather lacking. This Chapter provides a good tutorial introduction to Breeze, which should be enough to get people going sufficiently to be able to make some sense of the available on-line documentation.
3. Plotting with breeze-viz – Breeze has some support for plotting and visualisation of data. It’s somewhat limited when compared to what is available in R, but is fine for interactive exploratory analysis. However, the available on-line documentation for breeze-viz is almost non-existent. This Chapter is the best introduction to breeze-viz that I have seen.
4. Parallel collections and futures – the Scala standard library has built-in support for parallel and concurrent programming based on functional programming concepts such as parallel (monadic) collections and Futures. Again, this Chapter provides an excellent introduction to these powerful concepts, allowing the reader to start developing parallel algorithms for multi-core hardware with minimal fuss.
5. Scala and SQL through JDBC – this Chapter looks at connecting to databases using standard JVM mechanisms such as JDBC. However, it gradually introduces more functional ways of interfacing with databases using typeclasses, motivating:
6. Slick – a functional interface for SQL – an introduction to the Slick library for a more Scala-esque way of database interfacing.
7. Web APIs – the practicalities of talking to web APIs. eg. authenticated HTTP requests and parsing of JSON responses.
8. Scala and MongoDB – working with a NoSQL database from Scala
9. Concurrency with Akka – Akka is the canonical implementation of the actor model in Scala, for building large concurrent applications. It is the foundation on which Spark is built.
10. Distributed batch processing with Spark – a tutorial introduction to Apache Spark. Spark is a big data analytics framework built on top of Scala and Akka. It is arguably the best available framework for big data analytics on computing clusters in the cloud, and hence there is a lot of interest in it. Indeed, Spark is driving some of the interest in Scala.
11. Spark SQL and DataFrames – interfacing with databases using Spark, and more importantly, an introduction to Spark’s DataFrame abstraction, which is now fundamental to developing machine learning pipelines in Spark.
12. Distributed machine learning with MLLib – MLLib is the machine learning library for Spark. It is worth emphasising that unlike many early books on Spark, this chapter covers the newer DataFrame-based pipeline API, in addition to the original RDD-based API. Together, Chapters 10, 11 and 12 provide a pretty good tutorial introduction to Spark. After working through these, it should be easy to engage with the official on-line Spark documentation.
13. Web APIs with Play – is concerned with developing a web API at the end of a data science pipeline.
14. Visualisation with D3 and the Play framework – is concerned with integrating visualisation into a data science web application.
## Summary
This book provides a good tutorial introduction to a large number of topics relevant to statisticians and data scientists interested in developing data science applications using Scala. After working through this book, readers should be well-placed to augment their knowledge with readily searchable on-line documentation.
In a follow-up post I will give a quick overview of some other books relevant to getting started with Scala for statistical computing and data science.
## One-way ANOVA with fixed and random effects from a Bayesian perspective
This blog post is derived from a computer practical session that I ran as part of my new course on Statistics for Big Data, previously discussed. This course covered a lot of material very quickly. In particular, I deferred introducing notions of hierarchical modelling until the Bayesian part of the course, where I feel it is more natural and powerful. However, some of the terminology associated with hierarchical statistical modelling probably seems a bit mysterious to those without a strong background in classical statistical modelling, and so this practical session was intended to clear up some potential confusion. I will analyse a simple one-way Analysis of Variance (ANOVA) model from a Bayesian perspective, making sure to highlight the difference between fixed and random effects in a Bayesian context where everything is random, as well as emphasising the associated identifiability issues. R code is used to illustrate the ideas.
### Example scenario
We will consider the body mass index (BMI) of new male undergraduate students at a selection of UK Universities. Let us suppose that our data consist of measurements of (log) BMI for a random sample of 1,000 males at each of 8 Universities. We are interested to know if there are any differences between the Universities. Again, we want to model the process as we would simulate it, so thinking about how we would simulate such data is instructive. We start by assuming that the log BMI is a normal random quantity, and that the variance is common across the Universities in question (this is quite a big assumption, and it is easy to relax). We assume that the mean of this normal distribution is University-specific, but that we do not have strong prior opinions regarding the way in which the Universities differ. That said, we expect that the Universities would not be very different from one another.
### Simulating data
A simple simulation of the data with some plausible parameters can be carried out as follows.
set.seed(1)
Z=matrix(rnorm(1000*8,3.1,0.1),nrow=8)
RE=rnorm(8,0,0.01)
X=t(Z+RE)
colnames(X)=paste("Uni",1:8,sep="")
Data=stack(data.frame(X))
boxplot(exp(values)~ind,data=Data,notch=TRUE)
Make sure that you understand exactly what this code is doing before proceeding. The boxplot showing the simulated data is given below.
### Frequentist analysis
We will start with a frequentist analysis of the data. The model we would like to fit is
$y_{ij} = \mu + \theta_i + \varepsilon_{ij}$
where i is an indicator for the University and j for the individual within a particular University. The “effect”, $\theta_i$ represents how the ith University differs from the overall mean. We know that this model is not actually identifiable when the model parameters are all treated as “fixed effects”, but R will handle this for us.
> mod=lm(values~ind,data=Data)
> summary(mod)
Call:
lm(formula = values ~ ind, data = Data)
Residuals:
Min 1Q Median 3Q Max
-0.36846 -0.06778 -0.00069 0.06910 0.38219
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.101068 0.003223 962.244 < 2e-16 ***
indUni2 -0.006516 0.004558 -1.430 0.152826
indUni3 -0.017168 0.004558 -3.767 0.000166 ***
indUni4 0.017916 0.004558 3.931 8.53e-05 ***
indUni5 -0.022838 0.004558 -5.011 5.53e-07 ***
indUni6 -0.001651 0.004558 -0.362 0.717143
indUni7 0.007935 0.004558 1.741 0.081707 .
indUni8 0.003373 0.004558 0.740 0.459300
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.1019 on 7992 degrees of freedom
Multiple R-squared: 0.01439, Adjusted R-squared: 0.01353
F-statistic: 16.67 on 7 and 7992 DF, p-value: < 2.2e-16
We see that R has handled the identifiability problem using “treatment contrasts”, dropping the fixed effect for the first university, so that the intercept actually represents the mean value for the first University, and the effects for the other Univeristies represent the differences from the first University. If we would prefer to impose a sum constraint, then we can switch to sum contrasts with
options(contrasts=rep("contr.sum",2))
and then re-fit the model.
> mods=lm(values~ind,data=Data)
> summary(mods)
Call:
lm(formula = values ~ ind, data = Data)
Residuals:
Min 1Q Median 3Q Max
-0.36846 -0.06778 -0.00069 0.06910 0.38219
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.0986991 0.0011394 2719.558 < 2e-16 ***
ind1 0.0023687 0.0030146 0.786 0.432048
ind2 -0.0041477 0.0030146 -1.376 0.168905
ind3 -0.0147997 0.0030146 -4.909 9.32e-07 ***
ind4 0.0202851 0.0030146 6.729 1.83e-11 ***
ind5 -0.0204693 0.0030146 -6.790 1.20e-11 ***
ind6 0.0007175 0.0030146 0.238 0.811889
ind7 0.0103039 0.0030146 3.418 0.000634 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.1019 on 7992 degrees of freedom
Multiple R-squared: 0.01439, Adjusted R-squared: 0.01353
F-statistic: 16.67 on 7 and 7992 DF, p-value: < 2.2e-16
This has 7 degrees of freedom for the effects, as before, but ensures that the 8 effects sum to precisely zero. This is arguably more interpretable in this case.
### Bayesian analysis
We will now analyse the simulated data from a Bayesian perspective, using JAGS.
#### Fixed effects
All parameters in Bayesian models are uncertain, and therefore random, so there is much confusion regarding the difference between “fixed” and “random” effects in a Bayesian context. For “fixed” effects, our prior captures the idea that we sample the effects independently from a “fixed” (typically vague) prior distribution. We could simply code this up and fit it in JAGS as follows.
require(rjags)
n=dim(X)[1]
p=dim(X)[2]
data=list(X=X,n=n,p=p)
init=list(mu=2,tau=1)
modelstring="
model {
for (j in 1:p) {
theta[j]~dnorm(0,0.0001)
for (i in 1:n) {
X[i,j]~dnorm(mu+theta[j],tau)
}
}
mu~dnorm(0,0.0001)
tau~dgamma(1,0.0001)
}
"
model=jags.model(textConnection(modelstring),data=data,inits=init)
update(model,n.iter=1000)
output=coda.samples(model=model,variable.names=c("mu","tau","theta"),n.iter=100000,thin=10)
print(summary(output))
plot(output)
autocorr.plot(output)
pairs(as.matrix(output))
crosscorr.plot(output)
On running the code we can clearly see that this naive approach leads to high posterior correlation between the mean and the effects, due to the fundamental lack of identifiability of the model. This also leads to MCMC mixing problems, but it is important to understand that this computational issue is conceptually entirely separate from the fundamental statisticial identifiability issue. Even if we could avoid MCMC entirely, the identifiability issue would remain.
A quick fix for the identifiability issue is to use “treatment contrasts”, just as for the frequentist model. We can implement that as follows.
data=list(X=X,n=n,p=p)
init=list(mu=2,tau=1)
modelstring="
model {
for (j in 1:p) {
for (i in 1:n) {
X[i,j]~dnorm(mu+theta[j],tau)
}
}
theta[1]<-0
for (j in 2:p) {
theta[j]~dnorm(0,0.0001)
}
mu~dnorm(0,0.0001)
tau~dgamma(1,0.0001)
}
"
model=jags.model(textConnection(modelstring),data=data,inits=init)
update(model,n.iter=1000)
output=coda.samples(model=model,variable.names=c("mu","tau","theta"),n.iter=100000,thin=10)
print(summary(output))
plot(output)
autocorr.plot(output)
pairs(as.matrix(output))
crosscorr.plot(output)
Running this we see that the model now works perfectly well, mixes nicely, and gives sensible inferences for the treatment effects.
Another source of confusion for models of this type is data formating and indexing in JAGS models. For our balanced data there was not problem passing in data to JAGS as a matrix and specifying the model using nested loops. However, for unbalanced designs this is not necessarily so convenient, and so then it can be helpful to specify the model based on two-column data, as we would use for fitting using lm(). This is illustrated with the following model specification, which is exactly equivalent to the previous model, and should give identical (up to Monte Carlo error) results.
N=n*p
data=list(y=Data$values,g=Data$ind,N=N,p=p)
init=list(mu=2,tau=1)
modelstring="
model {
for (i in 1:N) {
y[i]~dnorm(mu+theta[g[i]],tau)
}
theta[1]<-0
for (j in 2:p) {
theta[j]~dnorm(0,0.0001)
}
mu~dnorm(0,0.0001)
tau~dgamma(1,0.0001)
}
"
model=jags.model(textConnection(modelstring),data=data,inits=init)
update(model,n.iter=1000)
output=coda.samples(model=model,variable.names=c("mu","tau","theta"),n.iter=100000,thin=10)
print(summary(output))
plot(output)
As suggested above, this indexing scheme is much more convenient for unbalanced data, and hence widely used. However, since our data is balanced here, we will revert to the matrix approach for the remainder of the post.
One final thing to consider before moving on to random effects is the sum-contrast model. We can implement this in various ways, but I’ve tried to encode it for maximum clarity below, imposing the sum-to-zero constraint via the final effect.
data=list(X=X,n=n,p=p)
init=list(mu=2,tau=1)
modelstring="
model {
for (j in 1:p) {
for (i in 1:n) {
X[i,j]~dnorm(mu+theta[j],tau)
}
}
for (j in 1:(p-1)) {
theta[j]~dnorm(0,0.0001)
}
theta[p] <- -sum(theta[1:(p-1)])
mu~dnorm(0,0.0001)
tau~dgamma(1,0.0001)
}
"
model=jags.model(textConnection(modelstring),data=data,inits=init)
update(model,n.iter=1000)
output=coda.samples(model=model,variable.names=c("mu","tau","theta"),n.iter=100000,thin=10)
print(summary(output))
plot(output)
Again, this works perfectly well and gives similar results to the frequentist analysis.
#### Random effects
The key difference between fixed and random effects in a Bayesian framework is that random effects are not independent, being drawn from a distribution with parameters which are not fixed. Essentially, there is another level of hierarchy involved in the specification of the random effects. This is best illustrated by example. A random effects model for this problem is given below.
data=list(X=X,n=n,p=p)
init=list(mu=2,tau=1)
modelstring="
model {
for (j in 1:p) {
theta[j]~dnorm(0,taut)
for (i in 1:n) {
X[i,j]~dnorm(mu+theta[j],tau)
}
}
mu~dnorm(0,0.0001)
tau~dgamma(1,0.0001)
taut~dgamma(1,0.0001)
}
"
model=jags.model(textConnection(modelstring),data=data,inits=init)
update(model,n.iter=1000)
output=coda.samples(model=model,variable.names=c("mu","tau","taut","theta"),n.iter=100000,thin=10)
print(summary(output))
plot(output)
The only difference between this and our first naive attempt at a Bayesian fixed effects model is that we have put a gamma prior on the precision of the effect. Note that this model now runs and fits perfectly well, with reasonable mixing, and gives sensible parameter inferences. Although the effects here are not constrained to sum-to-zero, like in the case of sum contrasts for a fixed effects model, the prior encourages shrinkage towards zero, and so the random effect distribution can be thought of as a kind of soft version of a hard sum-to-zero constraint. From a predictive perspective, this model is much more powerful. In particular, using a random effects model, we can make strong predictions for unobserved groups (eg. a ninth University), with sensible prediction intervals based on our inferred understanding of how similar different universities are. Using a fixed effects model this isn’t really possible. Even for a Bayesian version of a fixed effects model using proper (but vague) priors, prediction intervals for unobserved groups are not really sensible.
Since we have used simulated data here, we can compare the estimated random effects with the true effects generated during the simulation.
> apply(as.matrix(output),2,mean)
mu tau taut theta[1] theta[2]
3.098813e+00 9.627110e+01 7.015976e+03 2.086581e-03 -3.935511e-03
theta[3] theta[4] theta[5] theta[6] theta[7]
-1.389099e-02 1.881528e-02 -1.921854e-02 5.640306e-04 9.529532e-03
theta[8]
5.227518e-03
> RE
[1] 0.002637034 -0.008294518 -0.014616348 0.016839902 -0.015443243
[6] -0.001908871 0.010162117 0.005471262
We see that the Bayesian random effects model has done an excellent job of estimation. If we wished, we could relax the assumption of common variance across the groups by making tau a vector indexed by j, though there is not much point in persuing this here, since we know that the groups do all have the same variance.
#### Strong subjective priors
The above is the usual story regarding fixed and random effects in Bayesian inference. I hope this is reasonably clear, so really I should quit while I’m ahead… However, the issues are really a bit more subtle than I’ve suggested. The inferred precision of the random effects was around 7,000, so now lets re-run the original, naive, “fixed effects” model with a strong subjective Bayesian prior on the distribution of the effects.
data=list(X=X,n=n,p=p)
init=list(mu=2,tau=1)
modelstring="
model {
for (j in 1:p) {
theta[j]~dnorm(0,7000)
for (i in 1:n) {
X[i,j]~dnorm(mu+theta[j],tau)
}
}
mu~dnorm(0,0.0001)
tau~dgamma(1,0.0001)
}
"
model=jags.model(textConnection(modelstring),data=data,inits=init)
update(model,n.iter=1000)
output=coda.samples(model=model,variable.names=c("mu","tau","theta"),n.iter=100000,thin=10)
print(summary(output))
plot(output)
This model also runs perfectly well and gives sensible inferences, despite the fact that the effects are iid from a fixed distribution and there is no hard constraint on the effects. Similarly, we can make sensible predictions, together with appropriate prediction intervals, for an unobserved group. So it isn’t so much the fact that the effects are coupled via an extra level of hierarchy that makes things work. It’s really the fact that the effects are sensibly distributed and not just sampled directly from a vague prior. So for “real” subjective Bayesians the line between fixed and random effects is actually very blurred indeed…
## A functional Gibbs sampler in Scala
For many years I’ve had a passing interest in functional programming and languages which support functional programming approaches. I’m also quite interested in MOOCs and their future role in higher education. So I recently signed up for my first on-line course, Functional Programming Principles in Scala, via Coursera. I’m around half way through the course at the time of writing, and I’m enjoying it very much. I knew that I didn’t know much about Scala before starting the course, but during the course I’ve also learned that I didn’t know as much about functional programming as I thought I did, either! 😉 The course itself is very interesting, the assignments are well designed and appropriately challenging, and the web infrastructure to support the course is working well. I suspect I’ll try other on-line courses in the future.
Functional programming emphasises immutability, and discourages imperative programming approaches that use variables that can be modified during run-time. There are many advantages to immutability, especially in the context of parallel and concurrent programming, which is becoming increasingly important as multi-core systems become the norm. I’ve always found functional programming to be intellectually appealing, but have often worried about the practicalities of using functional programming in the context of scientific computing where many algorithms are iterative in nature, and are typically encoded using imperative approaches. The Scala programming language is appealing to me as it supports both imperative and functional styles of programming, as well as object oriented approaches. However, as a result of taking this course I am now determined to pursue functional approaches further, and get more of a feel for how practical they are for scientific computing applications.
For my first experiment, I’m going back to my post describing a Gibbs sampler in various languages. See that post for further details of the algorithm. In that post I did have an example implementation in Scala, which looked like this:
object GibbsSc {
import cern.jet.random.tdouble.engine.DoubleMersenneTwister
import cern.jet.random.tdouble.Normal
import cern.jet.random.tdouble.Gamma
import Math.sqrt
import java.util.Date
def main(args: Array[String]) {
val N=50000
val thin=1000
val rngEngine=new DoubleMersenneTwister(new Date)
val rngN=new Normal(0.0,1.0,rngEngine)
val rngG=new Gamma(1.0,1.0,rngEngine)
var x=0.0
var y=0.0
println("Iter x y")
for (i <- 0 until N) {
for (j <- 0 until thin) {
x=rngG.nextDouble(3.0,y*y+4)
y=rngN.nextDouble(1.0/(x+1),1.0/sqrt(2*x+2))
}
println(i+" "+x+" "+y)
}
}
}
At the time I wrote that post I knew even less about Scala than I do now, so I created the code by starting from the Java version and removing all of the annoying clutter! 😉 Clearly this code has an imperative style, utilising variables (declared with var) x and y having mutable state that is updated by a nested for loop. This algorithm is typical of the kind I use every day, so if I can’t re-write this in a more functional style, removing all mutable variables from my code, then I’m not going to get very far with functional programming!
In fact it is very easy to re-write this in a more functional style without utilising mutable variables. One possible approach is presented below.
object FunGibbs {
import cern.jet.random.tdouble.engine.DoubleMersenneTwister
import cern.jet.random.tdouble.Normal
import cern.jet.random.tdouble.Gamma
import java.util.Date
import scala.math.sqrt
val rngEngine=new DoubleMersenneTwister(new Date)
val rngN=new Normal(0.0,1.0,rngEngine)
val rngG=new Gamma(1.0,1.0,rngEngine)
class State(val x: Double,val y: Double)
def nextIter(s: State): State = {
val newX=rngG.nextDouble(3.0,(s.y)*(s.y)+4.0)
new State(newX,
rngN.nextDouble(1.0/(newX+1),1.0/sqrt(2*newX+2)))
}
def nextThinnedIter(s: State,left: Int): State = {
if (left==0) s
else nextThinnedIter(nextIter(s),left-1)
}
def genIters(s: State,current: Int,stop: Int,thin: Int): State = {
if (!(current>stop)) {
println(current+" "+s.x+" "+s.y)
genIters(nextThinnedIter(s,thin),current+1,stop,thin)
}
else s
}
def main(args: Array[String]) {
println("Iter x y")
genIters(new State(0.0,0.0),1,50000,1000)
}
}
Although it is a few lines longer, it is a fairly clean implementation, and doesn’t look like a hack. Like many functional programs, this one makes extensive use of recursion. This is one of the things that has always concerned me about functional programming – many scientific computing applications involve lots of iteration, and that can potentially translate into very deep recursion. The above program has an apparent recursion depth of 50 million! However, it runs fine without crashing despite the fact that most programming languages will crash out with a stack overflow with recursion depths of more than a couple of thousand. So why doesn’t this crash? It runs fine because the recursion I used is a special form of recursion known as a tail call. Most functional (and some imperative) programming languages automatically perform tail call elimination which essentially turns the tail call into an iteration which runs very fast without creating new stack frames. In fact, this functional version of the code runs at roughly the same speed as the iterative version I presented first (perhaps just a few percent slower – I haven’t done careful timings), and runs well within a factor of 2 of imperative C code. So actually this seems perfectly practical so far, and I’m looking forward to experimenting more with functional programming approaches to statistical computation over the coming months…
## Introduction to Approximate Bayesian Computation (ABC)
Many of the posts in this blog have been concerned with using MCMC based methods for Bayesian inference. These methods are typically “exact” in the sense that they have the exact posterior distribution of interest as their target equilibrium distribution, but are obviously “approximate”, in that for any finite amount of computing time, we can only generate a finite sample of correlated realisations from a Markov chain that we hope is close to equilibrium.
Approximate Bayesian Computation (ABC) methods go a step further, and generate samples from a distribution which is not the true posterior distribution of interest, but a distribution which is hoped to be close to the real posterior distribution of interest. There are many variants on ABC, and I won’t get around to explaining all of them in this blog. The wikipedia page on ABC is a good starting point for further reading. In this post I’ll explain the most basic rejection sampling version of ABC, and in a subsequent post, I’ll explain a sequential refinement, often referred to as ABC-SMC. As usual, I’ll use R code to illustrate the ideas.
#### Basic idea
There is a close connection between “likelihood free” MCMC methods and those of approximate Bayesian computation (ABC). To keep things simple, consider the case of a perfectly observed system, so that there is no latent variable layer. Then there are model parameters $\theta$ described by a prior $\pi(\theta)$, and a forwards-simulation model for the data $x$, defined by $\pi(x|\theta)$. It is clear that a simple algorithm for simulating from the desired posterior $\pi(\theta|x)$ can be obtained as follows. First simulate from the joint distribution $\pi(\theta,x)$ by simulating $\theta^\star\sim\pi(\theta)$ and then $x^\star\sim \pi(x|\theta^\star)$. This gives a sample $(\theta^\star,x^\star)$ from the joint distribution. A simple rejection algorithm which rejects the proposed pair unless $x^\star$ matches the true data $x$ clearly gives a sample from the required posterior distribution.
#### Exact rejection sampling
• 1. Sample $\theta^\star \sim \pi(\theta^\star)$
• 2. Sample $x^\star\sim \pi(x^\star|\theta^\star)$
• 3. If $x^\star=x$, keep $\theta^\star$ as a sample from $\pi(\theta|x)$, otherwise reject.
This algorithm is exact, and for discrete $x$ will have a non-zero acceptance rate. However, in most interesting problems the rejection rate will be intolerably high. In particular, the acceptance rate will typically be zero for continuous valued $x$.
#### ABC rejection sampling
The ABC “approximation” is to accept values provided that $x^\star$ is “sufficiently close” to $x$. In the first instance, we can formulate this as follows.
• 1. Sample $\theta^\star \sim \pi(\theta^\star)$
• 2. Sample $x^\star\sim \pi(x^\star|\theta^\star)$
• 3. If $\Vert x^\star-x\Vert< \epsilon$, keep $\theta^\star$ as a sample from $\pi(\theta|x)$, otherwise reject.
Euclidean distance is usually chosen as the norm, though any norm can be used. This procedure is “honest”, in the sense that it produces exact realisations from
$\theta^\star\big|\Vert x^\star-x\Vert < \epsilon.$
For suitable small choice of $\epsilon$, this will closely approximate the true posterior. However, smaller choices of $\epsilon$ will lead to higher rejection rates. This will be a particular problem in the context of high-dimensional $x$, where it is often unrealistic to expect a close match between all components of $x$ and the simulated data $x^\star$, even for a good choice of $\theta^\star$. In this case, it makes more sense to look for good agreement between particular aspects of $x$, such as the mean, or variance, or auto-correlation, depending on the exact problem and context.
In the simplest case, this is done by forming a (vector of) summary statistic(s), $s(x^\star)$ (ideally a sufficient statistic), and accepting provided that $\Vert s(x^\star)-s(x)\Vert<\epsilon$ for some suitable choice of metric and $\epsilon$. We will return to this issue in a subsequent post.
#### Inference for an intractable Markov process
I’ll illustrate ABC in the context of parameter inference for a Markov process with an intractable transition kernel: the discrete stochastic Lotka-Volterra model. A function for simulating exact realisations from the intractable kernel is included in the smfsb CRAN package discussed in a previous post. Using pMCMC to solve the parameter inference problem is discussed in another post. It may be helpful to skim through those posts quickly to become familiar with this problem before proceeding.
So, for a given proposed set of parameters, realisations from the process can be sampled using the functions simTs and stepLV (from the smfsb package). We will use the sample data set LVperfect (from the LVdata dataset) as our “true”, or “target” data, and try to find parameters for the process which are consistent with this data. A fairly minimal R script for this problem is given below.
require(smfsb)
data(LVdata)
N=1e5
message(paste("N =",N))
prior=cbind(th1=exp(runif(N,-6,2)),th2=exp(runif(N,-6,2)),th3=exp(runif(N,-6,2)))
rows=lapply(1:N,function(i){prior[i,]})
message("starting simulation")
samples=lapply(rows,function(th){simTs(c(50,100),0,30,2,stepLVc,th)})
message("finished simulation")
distance<-function(ts)
{
diff=ts-LVperfect
sum(diff*diff)
}
message("computing distances")
dist=lapply(samples,distance)
message("distances computed")
dist=sapply(dist,c)
cutoff=quantile(dist,1000/N)
post=prior[dist<cutoff,]
op=par(mfrow=c(2,3))
apply(post,2,hist,30)
apply(log(post),2,hist,30)
par(op)
This script should take 5-10 minutes to run on a decent laptop, and will result in histograms of the posterior marginals for the components of $\theta$ and $\log(\theta)$. Note that I have deliberately adopted a functional programming style, making use of the lapply function for the most computationally intensive steps. The reason for this will soon become apparent. Note that rather than pre-specifying a cutoff $\epsilon$, I’ve instead picked a quantile of the distance distribution. This is common practice in scenarios where the distance is difficult to have good intuition about. In fact here I’ve gone a step further and chosen a quantile to give a final sample of size 1000. Obviously then in this case I could have just selected out the top 1000 directly, but I wanted to illustrate the quantile based approach.
One problem with the above script is that all proposed samples are stored in memory at once. This is problematic for problems involving large numbers of samples. However, it is convenient to do simulations in large batches, both for computation of quantiles, and also for efficient parallelisation. The script below illustrates how to implement a batch parallelisation strategy for this problem. Samples are generated in batches of size 10^4, and only the best fitting samples are stored before the next batch is processed. This strategy can be used to get a good sized sample based on a more stringent acceptance criterion at the cost of addition simulation time. Note that the parallelisation code will only work with recent versions of R, and works by replacing calls to lapply with the parallel version, mclapply. You should notice an appreciable speed-up on a multicore machine.
require(smfsb)
require(parallel)
options(mc.cores=4)
data(LVdata)
N=1e5
bs=1e4
batches=N/bs
message(paste("N =",N," | bs =",bs," | batches =",batches))
distance<-function(ts)
{
diff=ts[,1]-LVprey
sum(diff*diff)
}
post=NULL
for (i in 1:batches) {
message(paste("batch",i,"of",batches))
prior=cbind(th1=exp(runif(bs,-6,2)),th2=exp(runif(bs,-6,2)),th3=exp(runif(bs,-6,2)))
rows=lapply(1:bs,function(i){prior[i,]})
samples=mclapply(rows,function(th){simTs(c(50,100),0,30,2,stepLVc,th)})
dist=mclapply(samples,distance)
dist=sapply(dist,c)
cutoff=quantile(dist,1000/N)
post=rbind(post,prior[dist<cutoff,])
}
message(paste("Finished. Kept",dim(post)[1],"simulations"))
op=par(mfrow=c(2,3))
apply(post,2,hist,30)
apply(log(post),2,hist,30)
par(op)
Note that there is an additional approximation here, since the top 100 samples from each of 10 batches of simulations won’t correspond exactly to the top 1000 samples overall, but given all of the other approximations going on in ABC, this one is likely to be the least of your worries.
Now, if you compare the approximate posteriors obtained here with the “true” posteriors obtained in an earlier post using pMCMC, you will see that these posteriors are really quite poor. However, this isn’t a very fair comparison, since we’ve only done 10^5 simulations. Jacking N up to 10^7 gives the ABC posterior below.
This is a bit better, but really not great. There are two basic problems with the simplistic ABC strategy adopted here, one related to the dimensionality of the data and the other the dimensionality of the parameter space. The most basic problem that we have here is the dimensionality of the data. We have 16 (bivariate) observations, so we want our stochastic simulation to shoot at a point in a 16- or 32-dimensional space. That’s a tough call. The standard way to address this problem is to reduce the dimension of the data by introducing a few carefully chosen summary statistics and then just attempting to hit those. I’ll illustrate this in a subsequent post. The other problem is that often the prior and posterior over the parameters are quite different, and this problem too is exacerbated as the dimension of the parameter space increases. The standard way to deal with this is to sequentially adapt from the prior through a sequence of ABC posteriors. I’ll examine this in a future post as well, once I’ve also posted an introduction to the use of sequential Monte Carlo (SMC) samplers for static problems.
For further reading, I suggest browsing the reference list of the Wikipedia page for ABC. Also look through the list of software on that page. In particular, note that there is a CRAN package, abc, providing R support for ABC. There is a vignette for this package which should be sufficient to get started.
## Getting started with parallel MCMC
### Introduction to parallel MCMC for Bayesian inference, using C, MPI, the GSL and SPRNG
#### Introduction
This post is aimed at people who already know how to code up Markov Chain Monte Carlo (MCMC) algorithms in C, but are interested in how to parallelise their code to run on multi-core machines and HPC clusters. I discussed different languages for coding MCMC algorithms in a previous post. The advantage of C is that it is fast, standard and has excellent scientific library support. Ultimately, people pursuing this route will be interested in running their code on large clusters of fast servers, but for the purposes of development and testing, this really isn’t necessary. A single dual-core laptop, or similar, is absolutely fine. I develop and test on a dual-core laptop running Ubuntu linux, so that is what I will assume for the rest of this post.
There are several possible environments for parallel computing, but I will focus on the Message-Passing Interface (MPI). This is a well-established standard for parallel computing, there are many implementations, and it is by far the most commonly used high performance computing (HPC) framework today. Even if you are ultimately interested in writing code for novel architectures such as GPUs, learning the basics of parallel computation using MPI will be time well spent.
#### MPI
The whole point of MPI is that it is a standard, so code written for one implementation should run fine with any other. There are many implementations. On Linux platforms, the most popular are OpenMPI, LAM, and MPICH. There are various pros and cons associated with each implementation, and if installing on a powerful HPC cluster, serious consideration should be given to which will be the most beneficial. For basic development and testing, however, it really doesn’t matter which is used. I use OpenMPI on my Ubuntu laptop, which can be installed with a simple:
sudo apt-get install openmpi-bin libopenmpi-dev
That’s it! You’re ready to go… You can test your installation with a simple “Hello world” program such as:
#include <stdio.h>
#include <mpi.h>
int main (int argc,char **argv)
{
int rank, size;
MPI_Init (&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
MPI_Comm_size (MPI_COMM_WORLD, &size);
printf( "Hello world from process %d of %d\n", rank, size );
MPI_Finalize();
return 0;
}
You should be able to compile this with
mpicc -o helloworld helloworld.c
and run (on 2 processors) with
mpirun -np 2 helloworld
#### GSL
If you are writing non-trivial MCMC codes, you are almost certainly going to need to use a sophisticated math library and associated random number generation (RNG) routines. I typically use the GSL. On Ubuntu, the GSL can be installed with:
sudo apt-get install gsl-bin libgsl0-dev
A simple script to generate some non-uniform random numbers is given below.
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
int main(void)
{
int i; double z; gsl_rng *r;
r = gsl_rng_alloc(gsl_rng_mt19937);
gsl_rng_set(r,0);
for (i=0;i<10;i++) {
z = gsl_ran_gaussian(r,1.0);
printf("z(%d) = %f\n",i,z);
}
exit(EXIT_SUCCESS);
}
This can be compiled with a command like:
gcc gsl_ran_demo.c -o gsl_ran_demo -lgsl -lgslcblas
and run with
./gsl_ran_demo
#### SPRNG
When writing parallel Monte Carlo codes, it is important to be able to use independent streams of random numbers on each processor. Although it is tempting to “fudge” things by using a random number generator with a different seed on each processor, this does not guarantee independence of the streams, and an unfortunate choice of seeds could potentially lead to bad behaviour of your algorithm. The solution to this problem is to use a parallel random number generator (PRNG), designed specifically to give independent streams on different processors. Unfortunately the GSL does not have native support for such parallel random number generators, so an external library should be used. SPRNG 2.0 is a popular choice. SPRNG is designed so that it can be used with MPI, but also that it does not have to be. This is an issue, as the standard binary packages distributed with Ubuntu (libsprng2, libsprng2-dev) are compiled without MPI support. If you are going to be using SPRNG with MPI, things are simpler with MPI support, so it makes sense to download sprng2.0b.tar.gz from the SPRNG web site, and build it from source, carefully following the instructions for including MPI support. If you are not familiar with building libraries from source, you may need help from someone who is.
Once you have compiled SPRNG with MPI support, you can test it with the following code:
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#define SIMPLE_SPRNG
#define USE_MPI
#include "sprng.h"
int main(int argc,char *argv[])
{
double rn; int i,k;
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&k);
init_sprng(DEFAULT_RNG_TYPE,0,SPRNG_DEFAULT);
for (i=0;i<10;i++)
{
rn = sprng();
printf("Process %d, random number %d: %f\n", k, i+1, rn);
}
MPI_Finalize();
exit(EXIT_SUCCESS);
}
which can be compiled with a command like:
mpicc -I/usr/local/src/sprng2.0/include -L/usr/local/src/sprng2.0/lib -o sprng_demo sprng_demo.c -lsprng -lgmp
You will need to edit paths here to match your installation. If if builds, it can be run on 2 processors with a command like:
mpirun -np 2 sprng_demo
If it doesn’t build, there are many possible reasons. Check the error messages carefully. However, if the compilation fails at the linking stage with obscure messages about not being able to find certain SPRNG MPI functions, one possibility is that the SPRNG library has not been compiled with MPI support.
The problem with SPRNG is that it only provides a uniform random number generator. Of course we would really like to be able to use the SPRNG generator in conjunction with all of the sophisticated GSL routines for non-uniform random number generation. Many years ago I wrote a small piece of code to accomplish this, gsl-sprng.h. Download this and put it in your include path for the following example:
#include <mpi.h>
#include <gsl/gsl_rng.h>
#include "gsl-sprng.h"
#include <gsl/gsl_randist.h>
int main(int argc,char *argv[])
{
int i,k,po; gsl_rng *r;
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&k);
r=gsl_rng_alloc(gsl_rng_sprng20);
for (i=0;i<10;i++)
{
po = gsl_ran_poisson(r,2.0);
printf("Process %d, random number %d: %d\n", k, i+1, po);
}
MPI_Finalize();
exit(EXIT_SUCCESS);
}
A new GSL RNG, gsl_rng_sprng20 is created, by including gsl-sprng.h immediately after gsl_rng.h. If you want to set a seed, do so in the usual GSL way, but make sure to set it to be the same on each processor. I have had several emails recently from people who claim that gsl-sprng.h “doesn’t work”. All I can say is that it still works for me! I suspect the problem is that people are attempting to use it with a version of SPRNG without MPI support. That won’t work… Check that the previous SPRNG example works, first.
I can compile and run the above code with
mpicc -I/usr/local/src/sprng2.0/include -L/usr/local/src/sprng2.0/lib -o gsl-sprng_demo gsl-sprng_demo.c -lsprng -lgmp -lgsl -lgslcblas
mpirun -np 2 gsl-sprng_demo
#### Parallel Monte Carlo
Now we have parallel random number streams, we can think about how to do parallel Monte Carlo simulations. Here is a simple example:
#include <math.h>
#include <mpi.h>
#include <gsl/gsl_rng.h>
#include "gsl-sprng.h"
int main(int argc,char *argv[])
{
int i,k,N; double u,ksum,Nsum; gsl_rng *r;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&N);
MPI_Comm_rank(MPI_COMM_WORLD,&k);
r=gsl_rng_alloc(gsl_rng_sprng20);
for (i=0;i<10000;i++) {
u = gsl_rng_uniform(r);
ksum += exp(-u*u);
}
MPI_Reduce(&ksum,&Nsum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD);
if (k == 0) {
printf("Monte carlo estimate is %f\n", (Nsum/10000)/N );
}
MPI_Finalize();
exit(EXIT_SUCCESS);
}
which calculates a Monte Carlo estimate of the integral
$\displaystyle I=\int_0^1 \exp(-u^2)du$
using 10k variates on each available processor. The MPI command MPI_Reduce is used to summarise the values obtained independently in each process. I compile and run with
mpicc -I/usr/local/src/sprng2.0/include -L/usr/local/src/sprng2.0/lib -o monte-carlo monte-carlo.c -lsprng -lgmp -lgsl -lgslcblas
mpirun -np 2 monte-carlo
#### Parallel chains MCMC
Once parallel Monte Carlo has been mastered, it is time to move on to parallel MCMC. First it makes sense to understand how to run parallel MCMC chains in an MPI environment. I will illustrate this with a simple Metropolis-Hastings algorithm to sample a standard normal using uniform proposals, as discussed in a previous post. Here an independent chain is run on each processor, and the results are written into separate files.
#include <gsl/gsl_rng.h>
#include "gsl-sprng.h"
#include <gsl/gsl_randist.h>
#include <mpi.h>
int main(int argc,char *argv[])
{
int k,i,iters; double x,can,a,alpha; gsl_rng *r;
FILE *s; char filename[15];
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&k);
if ((argc != 3)) {
if (k == 0)
fprintf(stderr,"Usage: %s <iters> <alpha>\n",argv[0]);
MPI_Finalize(); return(EXIT_FAILURE);
}
iters=atoi(argv[1]); alpha=atof(argv[2]);
r=gsl_rng_alloc(gsl_rng_sprng20);
sprintf(filename,"chain-%03d.tab",k);
s=fopen(filename,"w");
if (s==NULL) {
perror("Failed open");
MPI_Finalize(); return(EXIT_FAILURE);
}
x = gsl_ran_flat(r,-20,20);
fprintf(s,"Iter X\n");
for (i=0;i<iters;i++) {
can = x + gsl_ran_flat(r,-alpha,alpha);
a = gsl_ran_ugaussian_pdf(can) / gsl_ran_ugaussian_pdf(x);
if (gsl_rng_uniform(r) < a)
x = can;
fprintf(s,"%d %f\n",i,x);
}
fclose(s);
MPI_Finalize(); return(EXIT_SUCCESS);
}
I can compile and run this with the following commands
mpicc -I/usr/local/src/sprng2.0/include -L/usr/local/src/sprng2.0/lib -o mcmc mcmc.c -lsprng -lgmp -lgsl -lgslcblas
mpirun -np 2 mcmc 100000 1
#### Parallelising a single MCMC chain
The parallel chains approach turns out to be surprisingly effective in practice. Obviously the disadvantage of that approach is that “burn in” has to be repeated on every processor, which limits how much efficiency gain can be acheived by running across many processors. Consequently it is often desirable to try and parallelise a single MCMC chain. As MCMC algorithms are inherently sequential, parallelisation is not completely trivial, and most (but not all) approaches to parallelising a single MCMC chain focus on the parallelisation of each iteration. In order for this to be worthwhile, it is necessary that the problem being considered is non-trivial, having a large state space. The strategy is then to divide the state space into “chunks” which can be updated in parallel. I don’t have time to go through a real example in detail in this blog post, but fortunately I wrote a book chapter on this topic almost 10 years ago which is still valid and relevant today. The citation details are:
Wilkinson, D. J. (2005) Parallel Bayesian Computation, Chapter 16 in E. J. Kontoghiorghes (ed.) Handbook of Parallel Computing and Statistics, Marcel Dekker/CRC Press, 481-512.
The book was eventually published in 2005 after a long delay. The publisher which originally commisioned the handbook (Marcel Dekker) was taken over by CRC Press before publication, and the project lay dormant for a couple of years until the new publisher picked it up again and decided to proceed with publication. I have a draft of my original submission in PDF which I recommend reading for further information. The code examples used are also available for download, including several of the examples used in this post, as well as an extended case study on parallelisation of a single chain for Bayesian inference in a stochastic volatility model. Although the chapter is nearly 10 years old, the issues discussed are all still remarkably up-to-date, and the code examples all still work. I think that is a testament to the stability of the technology adopted (C, MPI, GSL). Some of the other handbook chapters have not stood the test of time so well.
For basic information on getting started with MPI and key MPI commands for implementing parallel MCMC algorithms, the above mentioned book chapter is a reasonable place to start. Read it all through carefully, run the examples, and carefully study the code for the parallel stochastic volatility example. Once that is understood, you should find it possible to start writing your own parallel MCMC algorithms. For further information about more sophisticated MPI usage and additional commands, I find the annotated specification: MPI – The complete reference to be as good a source as any. | 2022-11-28 09:15:46 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 42, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5464728474617004, "perplexity": 1214.5266858379725}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-49/segments/1669446710488.2/warc/CC-MAIN-20221128070816-20221128100816-00840.warc.gz"} |
https://math.stackexchange.com/questions/3185378/vectors-and-coordinate-planes-with-non-perpendicular-axis | # Vectors and Coordinate planes with non-perpendicular axis
Given two vectors $$A$$ and $$B$$ with $$|\theta_A-\theta_B|=\frac{\pi}{2}$$ and $$r_a$$ and $$r_b$$ are any real numbers, can every possible vector be represented by $$A+B$$ with some constant $$r_a$$ and $$r_b$$?
In other words, can a coordinate plane of axis $$x$$ and $$y$$ with, unlike normal coordinate planes, non-perpendicular axis represent any point in the plane with two real coordinates? | 2019-05-23 19:47:19 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 10, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7722721695899963, "perplexity": 198.7541172406986}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-22/segments/1558232257361.12/warc/CC-MAIN-20190523184048-20190523210048-00488.warc.gz"} |
https://www.gradesaver.com/textbooks/engineering/computer-science/invitation-to-computer-science/chapter-2-2-2-representing-algorithms-practice-problems-page-51/5 | Chapter 2 - 2.2 - Representing Algorithms - Practice Problems - Page 51: 5
\begin{array}{ll} {\text { Step }} & {\text { Operation }} \\ {\text { 1 }} & {\text { Get values for length and width in feet }} \\ {\text { 2 }} & {\text { Set the value of length-in-yards to length/3 }}\\ {\text { 3 }} & {\text { Set the value of width-in-yards to width/3 }} \\ {\text { 4 }} & {\text { Set the value of area to length-in-yards } \times \text { width-in-yards }} \\ {\text { 5 }} & {\text { Set the value of cost to area } \times 23} \\ {\text { 6 }} & {\text { Print the value of cost }} \\ {\text { 7 }} & {\text { Stop }} \end{array}
Work Step by Step
\begin{array}{ll} {\text { Step }} & {\text { Operation }} \\ {\text { 1 }} & {\text { Get values for length and width in feet }} \\ {\text { 2 }} & {\text { Set the value of length-in-yards to length/3 }}\\ {\text { 3 }} & {\text { Set the value of width-in-yards to width/3 }} \\ {\text { 4 }} & {\text { Set the value of area to length-in-yards } \times \text { width-in-yards }} \\ {\text { 5 }} & {\text { Set the value of cost to area } \times 23} \\ {\text { 6 }} & {\text { Print the value of cost }} \\ {\text { 7 }} & {\text { Stop }} \end{array}
After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback. | 2022-12-01 13:11:30 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 1.0000078678131104, "perplexity": 861.2051354876054}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-49/segments/1669446710813.48/warc/CC-MAIN-20221201121601-20221201151601-00795.warc.gz"} |
https://www.aimsciences.org/article/doi/10.3934/ipi.2015.9.709 | American Institute of Mathematical Sciences
August 2015, 9(3): 709-723. doi: 10.3934/ipi.2015.9.709
Stability and uniqueness for a two-dimensional inverse boundary value problem for less regular potentials
1 Department of Mathematics, Tallinn University of Technology, Ehitajate tee 5, 19086 Tallinn, Estonia 2 Department of Mathematics, Colorado State University,101 Weber Building, Fort Colins, CO 80523-1784, United States 3 Department of Mathematical Sciences, The University of Tokyo, Komaba Meguro Tokyo 153-8914
Received October 2014 Revised February 2015 Published July 2015
We consider inverse boundary value problems for the Schrödinger equations in two dimensions. Within less regular classes of potentials, we establish a conditional stability estimate of logarithmic order. Moreover we prove the uniqueness within $L^p$-class of potentials with $p>2$.
Citation: Eemeli Blåsten, Oleg Yu. Imanuvilov, Masahiro Yamamoto. Stability and uniqueness for a two-dimensional inverse boundary value problem for less regular potentials. Inverse Problems & Imaging, 2015, 9 (3) : 709-723. doi: 10.3934/ipi.2015.9.709
References:
[1] R. A. Adams and J. J. F. Fournier, Sobolev Spaces, $2^{nd}$ edition, Elsevier/Academic Press, Amsterdam, 2003. Google Scholar [2] G. Alessandrini, Stable determination of conductivity by boundary measurements, Appl. Anal., 27 (1988), 153-172. doi: 10.1080/00036818808839730. Google Scholar [3] K. Astala, D. Faraco and K. M. Rogers, Rough potential recovery in the plane, preprint,, , (). Google Scholar [4] E. Blåsten, The Inverse Problem of the Schrödinger Equation in the Plane: A Dissection of Bukhgeim's Result, Licentiate thesis, University of Helsinki, 2010. Google Scholar [5] E. Blåsten, On the Gel'fand-Calderón Inverse Problem in Two Dimensions, Ph.D. thesis, University of Helsinki, 2013. Google Scholar [6] A. L. Bukhgeim, Recovering a potential from Cauchy data in the two-dimensional case, J. Inverse Ill-Posed Probl., 16 (2008), 19-33. doi: 10.1515/jiip.2008.002. Google Scholar [7] L. C. Evans, Partial Differential Equations, American Mathematical Society, Providence, RI, 1998. Google Scholar [8] O. Yu. Imanuvilov and M. Yamamoto, Inverse boundary value problem for linear Schrödinger equation in two dimensions, preprint,, , (). Google Scholar [9] O. Yu. Imanuvilov and M. Yamamoto, Uniqueness for inverse boundary value problems, by Dirichlet-to-Neumann map on subboundaries, (). doi: 10.1007/s00032-013-0205-3. Google Scholar [10] J. L. Lions and E. Magenes, Non-Homogeneous Boundary Value Problems and Applications, Vol. I, Springer-Verlag, New York-Heidelberg, 1972. Google Scholar [11] L. Liu, Stability Estimates for the Two Dimensional Inverse Conductivity Problem, Ph.D. thesis, University of Rochester, 1997. Google Scholar [12] N. Mandache, Exponential instability in an inverse problem for the Schrödinger equation, Inverse Problems, 17 (2001), 1435-1444. doi: 10.1088/0266-5611/17/5/313. Google Scholar [13] C. Miranda, Partial Differential Equations of Elliptic Type, $2^{nd}$ revised edition, Springer-Verlag, New York-Berlin, 1970. Google Scholar [14] A. I. Nachman, Global uniqueness for a two-dimensional inverse boundary value problem, Ann. of Math., 143 (1996), 71-96. doi: 10.2307/2118653. Google Scholar [15] R. G. Novikov and M. Santacesaria, A global stability estimate for the Gel'fand-Calderón, inverse problem in two dimensions, (). doi: 10.1515/JIIP.2011.003. Google Scholar [16] R. G. Novikov and M. Santacesaria, Global uniqueness and reconstruction for the, multi-channel Gel'fand-Calderón inverse problem in two dimensions., (). doi: 10.1016/j.bulsci.2011.04.007. Google Scholar [17] M. Santacesaria, New global stability estimates for the Calderón problem in two dimensions, J. Inst. Math. Jussieu, 12 (2013), 553-569. doi: 10.1017/S147474801200076X. Google Scholar [18] J. Sylvester and G. Uhlmann, A global uniqueness theorem for an inverse boundary value, problem., (). doi: 10.2307/1971291. Google Scholar [19] G. Uhlmann, Electrical impedance tomography and Calderón's problem, Inverse Problems, 25 (2009), 123011, 39 pp. doi: 10.1088/0266-5611/25/12/123011. Google Scholar [20] I. N. Vekua, Generalized Analytic Functions, Pergamon Press, London-Paris-Frankfurt, 1962. Google Scholar
show all references
References:
[1] R. A. Adams and J. J. F. Fournier, Sobolev Spaces, $2^{nd}$ edition, Elsevier/Academic Press, Amsterdam, 2003. Google Scholar [2] G. Alessandrini, Stable determination of conductivity by boundary measurements, Appl. Anal., 27 (1988), 153-172. doi: 10.1080/00036818808839730. Google Scholar [3] K. Astala, D. Faraco and K. M. Rogers, Rough potential recovery in the plane, preprint,, , (). Google Scholar [4] E. Blåsten, The Inverse Problem of the Schrödinger Equation in the Plane: A Dissection of Bukhgeim's Result, Licentiate thesis, University of Helsinki, 2010. Google Scholar [5] E. Blåsten, On the Gel'fand-Calderón Inverse Problem in Two Dimensions, Ph.D. thesis, University of Helsinki, 2013. Google Scholar [6] A. L. Bukhgeim, Recovering a potential from Cauchy data in the two-dimensional case, J. Inverse Ill-Posed Probl., 16 (2008), 19-33. doi: 10.1515/jiip.2008.002. Google Scholar [7] L. C. Evans, Partial Differential Equations, American Mathematical Society, Providence, RI, 1998. Google Scholar [8] O. Yu. Imanuvilov and M. Yamamoto, Inverse boundary value problem for linear Schrödinger equation in two dimensions, preprint,, , (). Google Scholar [9] O. Yu. Imanuvilov and M. Yamamoto, Uniqueness for inverse boundary value problems, by Dirichlet-to-Neumann map on subboundaries, (). doi: 10.1007/s00032-013-0205-3. Google Scholar [10] J. L. Lions and E. Magenes, Non-Homogeneous Boundary Value Problems and Applications, Vol. I, Springer-Verlag, New York-Heidelberg, 1972. Google Scholar [11] L. Liu, Stability Estimates for the Two Dimensional Inverse Conductivity Problem, Ph.D. thesis, University of Rochester, 1997. Google Scholar [12] N. Mandache, Exponential instability in an inverse problem for the Schrödinger equation, Inverse Problems, 17 (2001), 1435-1444. doi: 10.1088/0266-5611/17/5/313. Google Scholar [13] C. Miranda, Partial Differential Equations of Elliptic Type, $2^{nd}$ revised edition, Springer-Verlag, New York-Berlin, 1970. Google Scholar [14] A. I. Nachman, Global uniqueness for a two-dimensional inverse boundary value problem, Ann. of Math., 143 (1996), 71-96. doi: 10.2307/2118653. Google Scholar [15] R. G. Novikov and M. Santacesaria, A global stability estimate for the Gel'fand-Calderón, inverse problem in two dimensions, (). doi: 10.1515/JIIP.2011.003. Google Scholar [16] R. G. Novikov and M. Santacesaria, Global uniqueness and reconstruction for the, multi-channel Gel'fand-Calderón inverse problem in two dimensions., (). doi: 10.1016/j.bulsci.2011.04.007. Google Scholar [17] M. Santacesaria, New global stability estimates for the Calderón problem in two dimensions, J. Inst. Math. Jussieu, 12 (2013), 553-569. doi: 10.1017/S147474801200076X. Google Scholar [18] J. Sylvester and G. Uhlmann, A global uniqueness theorem for an inverse boundary value, problem., (). doi: 10.2307/1971291. Google Scholar [19] G. Uhlmann, Electrical impedance tomography and Calderón's problem, Inverse Problems, 25 (2009), 123011, 39 pp. doi: 10.1088/0266-5611/25/12/123011. Google Scholar [20] I. N. Vekua, Generalized Analytic Functions, Pergamon Press, London-Paris-Frankfurt, 1962. Google Scholar
[1] Pedro Caro, Mikko Salo. Stability of the Calderón problem in admissible geometries. Inverse Problems & Imaging, 2014, 8 (4) : 939-957. doi: 10.3934/ipi.2014.8.939 [2] Albert Clop, Daniel Faraco, Alberto Ruiz. Stability of Calderón's inverse conductivity problem in the plane for discontinuous conductivities. Inverse Problems & Imaging, 2010, 4 (1) : 49-91. doi: 10.3934/ipi.2010.4.49 [3] Petteri Piiroinen, Martin Simon. Probabilistic interpretation of the Calderón problem. Inverse Problems & Imaging, 2017, 11 (3) : 553-575. doi: 10.3934/ipi.2017026 [4] Angkana Rüland, Eva Sincich. Lipschitz stability for the finite dimensional fractional Calderón problem with finite Cauchy data. Inverse Problems & Imaging, 2019, 13 (5) : 1023-1044. doi: 10.3934/ipi.2019046 [5] María Ángeles García-Ferrero, Angkana Rüland, Wiktoria Zatoń. Runge approximation and stability improvement for a partial data Calderón problem for the acoustic Helmholtz equation. Inverse Problems & Imaging, , () : -. doi: 10.3934/ipi.2021049 [6] Matteo Santacesaria. Note on Calderón's inverse problem for measurable conductivities. Inverse Problems & Imaging, 2019, 13 (1) : 149-157. doi: 10.3934/ipi.2019008 [7] Oleg Yu. Imanuvilov, Masahiro Yamamoto. Calderón problem for Maxwell's equations in cylindrical domain. Inverse Problems & Imaging, 2014, 8 (4) : 1117-1137. doi: 10.3934/ipi.2014.8.1117 [8] Yernat M. Assylbekov. Reconstruction in the partial data Calderón problem on admissible manifolds. Inverse Problems & Imaging, 2017, 11 (3) : 455-476. doi: 10.3934/ipi.2017021 [9] Fabrice Delbary, Kim Knudsen. Numerical nonlinear complex geometrical optics algorithm for the 3D Calderón problem. Inverse Problems & Imaging, 2014, 8 (4) : 991-1012. doi: 10.3934/ipi.2014.8.991 [10] Pedro Caro. On an inverse problem in electromagnetism with local data: stability and uniqueness. Inverse Problems & Imaging, 2011, 5 (2) : 297-322. doi: 10.3934/ipi.2011.5.297 [11] Sun-Sig Byun, Yunsoo Jang. Calderón-Zygmund estimate for homogenization of parabolic systems. Discrete & Continuous Dynamical Systems, 2016, 36 (12) : 6689-6714. doi: 10.3934/dcds.2016091 [12] Marius Ionescu, Luke G. Rogers. Complex Powers of the Laplacian on Affine Nested Fractals as Calderón-Zygmund operators. Communications on Pure & Applied Analysis, 2014, 13 (6) : 2155-2175. doi: 10.3934/cpaa.2014.13.2155 [13] Sun-Sig Byun, Yumi Cho, Shuang Liang. Calderón-Zygmund estimates for quasilinear elliptic double obstacle problems with variable exponent and logarithmic growth. Discrete & Continuous Dynamical Systems - B, 2020, 25 (10) : 3843-3855. doi: 10.3934/dcdsb.2020038 [14] Kim Knudsen, Jennifer L. Mueller. The born approximation and Calderón's method for reconstruction of conductivities in 3-D. Conference Publications, 2011, 2011 (Special) : 844-853. doi: 10.3934/proc.2011.2011.844 [15] Naoki Shioji, Kohtaro Watanabe. Uniqueness of positive radial solutions of the Brezis-Nirenberg problem on thin annular domains on ${\mathbb S}^n$ and symmetry breaking bifurcations. Communications on Pure & Applied Analysis, 2020, 19 (10) : 4727-4770. doi: 10.3934/cpaa.2020210 [16] Ali Wehbe, Rayan Nasser, Nahla Noun. Stability of N-D transmission problem in viscoelasticity with localized Kelvin-Voigt damping under different types of geometric conditions. Mathematical Control & Related Fields, 2020 doi: 10.3934/mcrf.2020050 [17] H. Gajewski, I. V. Skrypnik. To the uniqueness problem for nonlinear parabolic equations. Discrete & Continuous Dynamical Systems, 2004, 10 (1&2) : 315-336. doi: 10.3934/dcds.2004.10.315 [18] Sarah J. Hamilton, David Isaacson, Ville Kolehmainen, Peter A. Muller, Jussi Toivanen, Patrick F. Bray. 3D Electrical Impedance Tomography reconstructions from simulated electrode data using direct inversion $\mathbf{t}^{\rm{{\textbf{exp}}}}$ and Calderón methods. Inverse Problems & Imaging, , () : -. doi: 10.3934/ipi.2021032 [19] Xin Lai, Xinfu Chen, Mingxin Wang, Cong Qin, Yajing Zhang. Existence, uniqueness, and stability of bubble solutions of a chemotaxis model. Discrete & Continuous Dynamical Systems, 2016, 36 (2) : 805-832. doi: 10.3934/dcds.2016.36.805 [20] Stefano Bianchini, Paolo Bonicatto. Forward untangling and applications to the uniqueness problem for the continuity equation. Discrete & Continuous Dynamical Systems, 2021, 41 (6) : 2739-2776. doi: 10.3934/dcds.2020384
2020 Impact Factor: 1.639 | 2021-10-17 06:20:35 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7975606322288513, "perplexity": 6551.423833650874}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323585121.30/warc/CC-MAIN-20211017052025-20211017082025-00650.warc.gz"} |
https://chaphlagical.icu/2021/08/27/paper_reading/Real_Time_Global_Illumination_Decomposition_of_Videos/ | Author & Institution
ABHIMITRA MEKA*, Max Planck Institute for Informatics, Saarland Informatics Campus and Google
MOHAMMAD SHAFIEI*, Max Planck Institute for Informatics, Saarland Informatics Campus
MICHAEL ZOLLHÖFER, Stanford University
CHRISTIAN RICHARDT, University of Bath
CHRISTIAN THEOBALT, Max Planck Institute for Informatics, Saarland Informatics Campus, Germany
## Abstract
• Propose the first approach for the decomposition of a monocular color video into direct and indirect illumination components in real time
• In separate layers, the contribution made to the scene appearance by the scene reflectance, the light sources and the reflections from various coherent scene regions to one another
• Works for regular videos and produces temporally coherent decomposition layers at real-time frame rates
• Core: several sparsity priors that enable the estimation of the per-pixel direct and indirect illumination layers based on a small set of jointly estimated base reflectance colors
• The resulting variational decomposition problem uses a new formulation based on sparse and dense sets of non-linear equations that we solve efficiently using a novel alternating data-parallel optimization strategy
• Existing techniques that invert global light transport require image capture under multiplexed controlled lighting, or only enable the decomposition of a single image at slow off-line frame rates
## 1. Introduction
• Contributions
1. Joint illumination decomposition of direct and indirect illumination layers, and estimation and refinement of base colors that constitute the scene reflectance
2. A sparsity-based automatic estimation of the underlying reflectance when a user identifies regions of strong interreflections
3. A novel parallelized sparse–dense optimizer to solve a mixture of high-dimensional sparse problems jointly with lowdimensional dense problems at real-time frame rates
• Inverse Rendering
• The colors in an image depend on scene geometry, material appearance and illumination
• Reconstructing these components from a single image or video is a challenging and illposed problem called inverse rendering
• Many complex image editing tasks can be achieved using a purely image-based decomposition without full inverse rendering
• Global Illumination Decomposition
• To decompose the captured radiance of a scene into direct and indirect components, some methods actively illuminate the scene to investigate the effect of light transport
• Intrinsic Images
• Many approaches have been introduced for the task of intrinsic image decomposition that explains a photograph using physically interpretable images such as reflectance and shading
• Intrinsic Video
• Layer-based Image Editing
• A physically accurate decomposition is not required to achieve complex image editing tasks such as recoloring of objects
• Instead, a decomposition into multiple semitransparent layers is often sufficient
## 3. Overview
• The first real-time method for temporally coherent illumination decomposition of a video into a reflectance layer, direct illumination layer and multiple indirect illumination layers
• Propose a novel sparsity-driven formulation for the estimation and refinement of a base color palette, which is used for decomposing the video frames
• Algorithm starts by automatically estimating a set of base colors that represent scene reflectances
• Automatic and only occasionally requires a minimal set of user clicks on the first video frame to identify regions of strong inter-reflections and refine the base colors
• Propagate the user input automatically to the rest of the video by a spatiotemporal region-growing method
• Perform the illumination decomposition
• Formulation results in a mixture of dense and sparse non-convex high-dimensional optimization problems, which they solve efficiently using a custom-tailored parallel iterative non-linear solver that they implement on the GPU
• Evaluate on a variety of synthetic and real-world scenes, and provide comparisons that show that our method outperforms state-of-the-art illumination decomposition, intrinsic decomposition and layer-based image editing techniques, both qualitatively and quantitatively
• Demonstrate that real-time illumination decomposition of videos enables a range of advanced, illumination-aware video editing applications that are suitable for photo-real augmented reality applications, such as inter-reflection-aware recoloring and retexturing
## 4. Problem Formulation
Algorithm: video frame -> a reflectance layer + a direct illumination layer + multiple indirect illumination layers
• Simplifying assumption
• Assume that the scene is Lambertian, i.e., surfaces exhibit no view-dependent effects and hence their reflectance can be parameterized as a diffuse albedo with RGB components
• Assume that all light sources in the scene produce only white colored light. Hence, the direct illumination in the scene can be expressed by a grayscale or single channel image
• Assume that the second reflection bounce (or the first inter-reflection) of light is the primary source of indirect illumination in the scene, while the contribution of subsequent bounces of light is negligible
• Assume that the motion of the camera in the video is smooth with significant overlap between adjacent frames
• Assume that no new objects or materials come into view after the first frame
• The algorithm factors each video frame $\pmb I$ into a per-pixel product of the reflectance $\pmb R$ and the illumination $\pmb S$
$$\pmb I(\pmb x)=\pmb R(\pmb x)\odot \pmb S(\pmb x)$$
• $\pmb x$: pixel location
• $\odot$: element-wise product
• For diffuse objects, the reflectance layer captures the surface albedo, and the illumination layer $\pmb S$ jointly captures the direct and indirect illumination effects
• Represent the illumination layer as a colored RGB image to allow indirect illumination effects to be expressed in the illumination layer
• Further decompose the illumination layer into a grayscale direct illumination layer resulting from the white illuminant, and multiple indirect colored illumination layers resulting from inter-reflections from colored objects in the scene
• We start by estimating a set of base colors that consists of $K$ unique reflectance colors ${\pmb b_k}$ that represent the scene
• $K$ is specified by the user, as superfluous clusters will be removed automatically
• This set of base colors serves as the basis for the illumination decomposition
• The base colors help constrain the values of pixels in the reflectance layer $\pmb R$
• For every surface point in the scene, assume that a single indirect bounce of light may occur from every base reflectance color, in addition to the direct illumination
• The global illumination in the scene is modeled using a linear decomposition of the illumination layer $\pmb S$ into a direct illumination layer $T_0$ and the sum of the $K$ indirect illumination layers $\{T_k\}_{0<k\leq K}$
$$\pmb I(\pmb x)=\pmb R(\pmb x)\odot \sum_{k=0}^K\pmb b_k T_k(\pmb x)$$
• $\pmb b_0$: represents the color of the illuminant: white in paper’s case, i.e. $\pmb b_0=(1,1,1)$
• $T_0(\pmb x)$: indicates the light transport contribution from the direct illumination
• The contribution from each base color $\pmb b_k$ at a given pixel location $\pmb x$ is measured by the map $T_k(\pmb x)$
• Provides the net contribution by the base reflectance color to the global scene illumination
• Obtain the set of base colors automatically using a real-time clustering technique
• Once the base colors are obtained, the scene clustering can be further refined using a few simple user-clicks
• This refines only the regions of clustering but not the base colors themselves
## 5. Base Color Estimation
• Initialize the set of base colors by clustering the dominant colors in the first video frame
• This clustering step not only provides an initial base color estimate, but also a segmentation of the video into regions of approximately uniform reflectance
• If needed, the clustering in a video frame undergoes a user-guided correction
• The base colors are used for the illumination decomposition
• Further refined
• Used to compute the direct and indirect illumination layers
### 5.1. Chromaticity Clustering
• Cluster the first video frame by color to approximate the regions of uniform reflectance that are observed in scenes with sparsely colored objects
• Based on a much faster histogram-based k-means clustering approach
• Perform the clustering of each RGB video frame in a discretized chromaticity space
• Workflow
• Obtain chromaticity image by dividing the input image by its intensity $\pmb C(\pmb x)=\pmb I(\pmb x)/|\pmb I(\pmb x)|$
• Compute a histogram of the chromaticity image with 10 partitions along each axis
• Perform weighted k-means clustering to obtain cluster center chromaticity values, using the population of the bins as the weight and the mid-point of the bin as sample values
• The user provides an upper limit of the number of clusters visible in the scene $K$
• Collapse adjacent similar clusters by measuring the pairwise chromaticity distance between estimated cluster centers
• If this distance is below a threshold of 0.2, merge the smaller cluster into the larger cluster
• The average RGB colors of all pixels assigned to each cluster then yield the set of initial base colors
• The histogram-based clustering approach significantly reduces the segmentation complexity, independent of the image size
• Produces a segmentation of the input frame, by assigning each pixel to its closest cluster
• Provides a coarse approximation of the reflectance layer $\pmb R_{\mathrm{cluster}}$
• Use $\pmb R_{\mathrm{cluster}}$ as an initialization for the reflectance layer $\pmb R$ in the energy optimization
### 5.2. Misclustering Correction
• Since the clustering directly depends on the color of a pixel, regions of strong inter-reflections may be erroneously assigned to the base color of an indirect illuminant instead of the base color representing the reflectance of the region
• Such a misclustering is difficult to correct automatically because of the inherent ambiguity of the illumination decomposition problem
• Rely on minimal manual interaction to identify misclustered regions and then automatically correct the underlying reflectance base color in all subsequent frames
#### 5.2.1. Region Identification and Tracking
• Identifying the true reflectance of a pixel in the presence of strong inter-reflections from other objects is an ambiguous task
• In case of direct illumination, the observed color value of a pixel is obtained by modulating the reflectance solely by the color of the illuminant
• In the case of inter-reflections, there is further modulation by light reflected from other objects, which then depends on their reflectance properties
• Such regions are easy to identify by a user
• Ask the user to simply click on such a region only in the first frame it occurs
• Automatically identify the full region by flood filling it using connected-components analysis based on the cluster identifier
• Real-time tracking of non-rigidly deforming, non-convex marked regions in subsequent frames
• Given the marked pixel region in the previous frame
• Probe the same pixel locations in the current frame to identify pixels with the same cluster ID as in the previous frame
• Flood fill starting from these valid pixels to obtain the tracked marked region in the new frame
• Do not flood fill for pixels inside the regions to keep this operation efficient
• Observe that one or two valid pixels are sufficient to correctly identify the entire misclustered region
#### 5.2.2. Reflectance Correction
• Once all pixels in a misclustered region are identified in a video frame (either marked or tracked), exploit the sparsity constraint of the indirect illumination layers to solve for the correct reflectance base color
1. Perform multiple full illumination decompositions for each identified region, evaluating each base color’s suitability as the region’s reflectance
2. For each base color, measure the sparsity obtained over the region using the illumination sparsity term
3. The base color that provides the sparsest solution of the decomposition is then used as the corrected reflectance
• The intuition behind such a sparsity prior is that using the correct underlying reflectance should lead to an illumination layer which is explained by the color spill from only a sparse number of nearby objects
## 6. Illumination Decomposition
• Decomposition each input video frame $\pmb I$ into its reflectance layer $\pmb R$, its direct illumination layer $T_0$ and a set of indirect illumination layers ${T_k}$
corresponding to the base colors ${\pmb b_k}$
• The direct illumination layer $T_0$ represents the direct contribution to the scene by the external light sources
• The indirect illumination layers $\{T_k\}$ capture the inter-reflections that occur within the scene
• Formulate the illumination decomposition as an energy minimization problem with the following energy:
$$E_{\mathrm{decomp}}(\pmb \chi)=E_{\mathrm{data}}(\pmb \chi)+E_{\mathrm{reflectance}}(\pmb \chi)+E_{\mathrm{illumination}}(\pmb \chi)$$
• $\pmb \chi=\{\pmb R,T_0,\{T_k\}\}$ is the set of variables to be optimized
• The base colors ${\pmb b_k}$ stay fixed
• Optimize this energy using a novel fast GPU solver to obtain real-time performance
Data Fidelity Term
This constraint enforces that the decomposition result reproduces the input image:
$$E_{\mathrm{data}}(\pmb \chi)=\lambda_{\mathrm{data}}\cdot \sum_{\pmb x}\left\Vert\pmb I(\pmb x)-\pmb R(\pmb x)\odot \sum_{k=0}^K\pmb b_kT_k(\pmb x) \right\Vert^2$$
• $\lambda_{\mathrm {data}}$: the weight for this energy term
• $T_k$: the $(K+1)$ illumination layers of the decomposition(one direct layer $T_0$ and $K$ indirect layers $\{T_k\}$)
### 6.1. Reflectance Priors
• Constrain the estimated reflectance layer $\pmb R$ using three priors:
$$E_{\mathrm{reflectance}}(\pmb \chi)=E_{\mathrm{clustering}}(\pmb \chi)+E_{\mathrm{r-sparsity}}(\pmb \chi)+E_{\mathrm{r-consistency}}(\pmb \chi)$$
Reflectance Clustering Prior
• Use the cluster to guide the decomposition, as the chromaticity-clustered image $\pmb R_{\mathrm{cluster}}$ is an approximation of the reflectance layer $\pmb R$
• Constrain the reflectance map to remain close to the clustered image using the following energy term:
$$E_{\mathrm{clustering}}(\pmb \chi)=\lambda_{\mathrm{clustering}}\cdot \sum_{\pmb x} \parallel\pmb r(\pmb x)-\pmb r_{\mathrm{cluster}}(\pmb x) \parallel_2^2$$
• $\pmb r$: represent the quantity $\pmb R$ in the log-domain, i.e. $\pmb r=\ln\pmb R$
• $\pmb r_{\mathrm{cluster}}$: the clustered reflectance map
Reflectance Sparsity Prior
• Encourages a piecewise constant reflectance map using gradient sparsity
• Natural scenes generally consist of a small set of objects and materials, hence the reflectance layer is expected to have sparse gradients
• Such a spatially sparse solution for the reflectance image can be obtained by minimizing the $\mathcal ℓ_p-\mathrm{norm}$ ($p\in[0,1]$) of the gradient magnitude $\parallel\nabla \pmb r\parallel_2$
$$E_{\mathrm{r-sparsity}}=\lambda_{\mathrm{r-sparsity}}\cdot\sum_{\pmb x}\parallel\nabla \pmb r(\pmb x)\parallel_2^p$$
Spatiotemporal Reflectance Consistency Prior
• Enforces that the reflectance stays temporally consistent by connecting every pixel with a set of randomly sampled pixels in a small spatiotemporal window by constraining the reflectance of the pixels to be close under a defined chromaticity-closeness condition
• For each pixel $\pmb x$ in the reflectance image, connect it to $N_s$ randomly sampled pixels $\pmb y_i$
• Samples are chosen from reflectance images of the current and previous frames $t_i$
\begin{align} E_{\mathrm{r-consistency}}(\pmb \chi)&=\lambda_{\mathrm{r-consistency}}\cdot \sum_{i=1}^{N_s}g_i(\pmb x)\cdot \parallel\pmb r(\pmb x)-\pmb r_{t_i}(\pmb y_i)\parallel_2^2\\ g_i(\pmb x)&=\begin{cases} w_{iw}(\pmb x)&\mathrm{if}\ \parallel\pmb c(\pmb x)-\pmb c_{t_i}(\pmb y_i)\parallel_2<\tau_{cc}\\ 0&\mathrm{otherwise} \end{cases} \end{align}
• $\tau_{cc}$: a chromaticity consistency threshold
### 6.2. Illumination Priors
• Constrain the illumination $\pmb S$ to be close to monochrome and the indirect illumination layers ${T_k}$ to have a sparse decomposition, spatial smoothness and non-negativity
$$E_{\mathrm{illumination}}(\pmb \chi)=E_{\mathrm{monochrome}}(\pmb \chi)+E_{\mathrm{i-sparsity}}(\pmb \chi)+E_{\mathrm{smoothness}}(\pmb \chi)+E_{\mathrm{non-neg}}(\pmb \chi)$$
Soft-Retinex Weighted Monochromaticity Prior
• The illumination layer is a combination of direct and indirect illumination effects
• Indirect effects such as inter-reflections tend to be spatially local with smooth color gradients whereas under the white-illumination assumption, the direct bounce does not contribute any color to the illumination layer
• Expect the illumination $\pmb S$ to be mostly monochromatic except at small spatial pockets where smooth color gradients occur due to inter-reflections
$$E_{\mathrm{monochrome}}(\pmb \chi)=\lambda_{\mathrm{monochrome}}\cdot w_{\mathrm{SR}}\cdot \sum_{\pmb x}\sum_{\pmb c}(\pmb S_c(\pmb x)-|\pmb S(\pmb x)|)^2$$
• $c\in{R,G,B}$
• $|\pmb S|$: the intensity of the illumination layer $\pmb S$
• This constraint pulls the color channels of each pixel close to the grayscale intensity of the pixel, hence encouraging monochromaticity
• $w_{\mathrm{SR}}$: the soft-color-Retinex weight
$$w_{\mathrm{SR}}=1-\exp(-50\cdot\Delta\pmb C)$$
• $\Delta\pmb C$: the maximum of the chromaticity gradient of the input image in any of the four spatial directions at the pixel location
• The soft-color-Retinex weight is high only for large chromaticity gradients, which represent reflectance edges
• Hence, monochromaticity of the illumination layer is enforced only close to the reflectance edges and not at locations of slowly varying chromaticity, which represent inter-reflections
• Relying on local chromaticity gradients may be problematic when there are regions of uniform colored reflectance, but in such regions the reflectance sparsity priors tend to be stronger and overrule the monochromaticity prior.
Illumination Decomposition Sparsity
• Enforce that the illumination decomposition is sparse in terms of the layers that are activated per-pixel, i.e., those that influence the pixel with their corresponding base color
• Assume during image formation in the real world, a large part of the observed radiance for a scene point comes from a small subpart of the scene
• Apply the sparsity-inducing $\mathcal ℓ_1-\mathrm{norm}$ to the indirect illumination layers
$$E_{\mathrm{i-sparsity}}(\pmb \chi)=\lambda_{\mathrm{i-sparsity}}\cdot\sum_{\pmb x}\left\Vert\{T_k(\pmb x)\}^K_{k=1} \right\Vert_1$$
Spatial Smoothness
• Encourage the decomposition to be spatially piecewise smooth using an $ℓ1-\mathrm{sparsity}$ prior in the gradient domain
• Enforces piecewise constancy of each direct or indirect illumination layer
$$E_{\mathrm{smoothness}}(\pmb \chi)=\lambda_{\mathrm{smoothness}}\cdot \sum_{\pmb x}\sum_{k=0}^K\parallel\nabla T_k(\pmb x)\parallel_1$$
• This allows to have sharp edges in the decomposition layers
Non-Negativity of Light Transport
• Light transport is an inherently additive process
• Light bouncing around in the scene adds radiance to scene points
• But never subtracts from them
• The quantity of transported light is always positive
$$E_{\mathrm{non-neg}}(\pmb \chi)=\lambda_{\mathrm{non-neg}}\cdot \sum_{\pmb x}\sum_{k=0}^K\max(-T_k(\pmb x),0)$$
• If the decomposition layer $T_k(\pmb x)$ is non-negative, there is no penalty
• If $T_k(\pmb x)$ becomes negative, a linear penalty is enforced
### 6.3. Base Color Refinement
• Refine the base colors further on the first video frame to approach the ground-truth reflectance of the materials in the scene
• The refinement of base colors is formulated as an incremental update $\Delta \pmb b_k$ of the base colors $\pmb b_k$ in the original data fidelity term, along with intensity and chromaticity regularizers
\begin{align} E_{\mathrm{refine}}(\pmb \chi)&=\lambda_{\mathrm{data}}\sum_{\pmb x}\left\Vert \pmb I(\pmb x)-\pmb R(\pmb x)\odot \sum_{k=0}^K(\pmb b_k+\Delta\pmb b_k)T_k(\pmb x) \right\Vert^2\\ &+\lambda_{\mathrm{IR}}\sum_{k=1}^K\parallel\Delta\pmb b_k\parallel_2^2+\lambda_{\mathrm{CR}}\sum_{k=1}^K\parallel(\pmb C(\pmb b_k)+\Delta\pmb b_k)-\pmb C(\pmb b_k)\parallel_2^2 \end{align}
• $\pmb \chi={\Delta\pmb b_k}$: the vector of unknowns to be optimized
• $\lambda_{\mathrm{IR}}$: the weight for the intensity regularizer that ensures small base color updates
• $\lambda_{\mathrm{CR}}$: the weight of the chromaticity regularizer
• Constrains base color updates $\Delta\pmb b_k$ to remain close in chromaticity $\pmb C(\cdot)$ to the initially estimated base color $\pmb b_k$
• These regularizers ensure that base color updates do not lead to oscillations in the optimization process
• The refinement energy is solved in combination with the illumination decomposition energy
• Resulting in an estimation of the unknown variables that together promotes decomposition sparsity
• This refinement of the base colors leads to a dense Jacobian matrix, because the unknown variables ${\Delta \pmb b_𝑘}$ in the energy are influenced by all pixels in the image
### 6.4. Handling the Sparsity-Inducing Norms
• Some energy terms contain sparsity-inducing $ℓ𝑝-\mathrm{norms}$ ($p \in [0, 1]$)
• Handle these objectives in a unified manner using Iteratively Re-weighted Least Squares
• Approximate the $ℓ𝑝-\mathrm{norms}$ by a nonlinear least-squares objective based on re-weighting, i.e., replace the corresponding residuals $\pmb r$ as follows:
\begin{align} \parallel\pmb r\parallel_p&=\parallel\pmb r\parallel_2^2\cdot \parallel\pmb r\parallel_2^{p-2}\\ &\approx \parallel\pmb r\parallel_2^2\cdot \parallel\pmb r_{\mathrm {old}}\parallel_2^{p-2} \end{align}
in each step of the applied iterative solver
• $\pmb r_{\mathrm{old}}$: the corresponding residual after the previous iteration step
#### 6.4.1. Handling Non-negativity Constraints
• The non-negativity objective $E_{\mathrm{non-neg}}(\pmb \chi)$ contains a maximum function that is non-differentiable at zero
• Handle this objective by replacing the maximum with a re-weighted least-squares term, $\max(-T_k(\pmb x),0)=w_kT_k^2(\pmb x)$, using
$$w_k=\begin{cases} 0&\mathrm{if}\ T_k(\pmb x)>0\\ (|T_k(\pmb x)+\epsilon|)^{-1}&\mathrm{otherwise} \end{cases}$$
• $\epsilon = 0.002$: a small constant that prevents division by zero
• Transforms the non-convex energy into a non-linear least-squares optimization problem
## 7. Data-Parallel GPU Optimization
• The decomposition problems are all non-convex optimizations based on an objective $E$ with unknowns $\pmb \chi$
• The best decomposition $\pmb \chi^\ast$ by solving the following minimization problem:
$$\pmb \chi^\ast=\arg\min_{\pmb \chi} E(\pmb \chi)$$
• The optimization problems are in general non-linear least-squares form and can be tackled by the iterative Gauss–Newton algorithm that approximates the optimum $\pmb \chi^\ast\approx \pmb \chi_k$ by a sequence of solutions $\pmb \chi_k=\pmb \chi_{k-1}+\pmb \delta_k^\ast$
• The optimal linear update $\pmb \delta_k^\ast$ is given by the solution of the associated normal equations:
$$\pmb\delta_k^\ast=\arg\min_{\pmb\delta_k}\parallel\pmb F(\pmb \chi_{k-1})+\pmb\delta_k\pmb J(\pmb \chi_{k-1})\parallel_2^2$$
• $\pmb F$: a vector field that stacks all residuals, i.e., $E(\pmb\chi)=\parallel\pmb F(\pmb\chi)\parallel_2^2$
• $\pmb J$: its Jacobian matrix
• Obtaining real-time performance is challenging even with recent state-of-the-art data-parallel iterative non-linear least-squares solution strategies
• To avoid cluttered notation, we will omit the parameters and simply write $\pmb J$ instead of $\pmb J(\pmb\chi)$
• For our decomposition energies, the Jacobian $\pmb J$ is a large matrix with usually more than 70 million rows and 4 million columns
• Previous approaches assume $\pmb J$ to be a sparse matrix, meaning that only a few residuals are influenced by each variable
• While this holds for the columns of $\pmb J$ that corresponds to the variables that are associated with the decomposition layers, it does not hold for the columns that store the derivatives with respect to the base color updates ${\Delta \pmb b_k}$, since the base colors influence each residual of $E_{\mathrm{data}}$
• $\pmb J=\begin{bmatrix}\pmb S_{\pmb J}&\pmb D_{\pmb J}\end{bmatrix}$ has two sub-blocks:
• $\pmb S_{\pmb J}$: a large sparse matrix with only a few non-zero entries per row
• $\pmb D_{\pmb J}$: a dense matrix with the same number of rows, but only a few columns
• The evaluation of the Jacobian $\pmb J$ requires a different specialized parallelization for the dense and sparse parts
### 7.1. Sparse-Dense Splitting
• Tackle the described problem using a sparse–dense splitting approach that splits the variables $\chi$ into a sparse set $\mathcal T$ (decomposition layers) and a dense set $\mathcal B$ (base color updates)
• Afterwards, we optimize for $\mathcal B$ and $\mathcal T$ independently in an iterative flip-flop manner
• Algorithm:
1. Optimize for $\mathcal T$, while keeping $\mathcal B$ fixed
• The resulting optimization problem is a sparse non-linear least-squares problem
• Improve upon the previous solution by performing a nonlinear Gauss–Newton step
• The corresponding normal equations are solved using 16 steps of data-parallel preconditioned conjugate gradient
• Parallelize over the rows of the system matrix using one thread per row (variable)
2. After updating the ‘sparse’ variables $\mathcal T$, keep them fixed and solve for the ‘dense’ variables $\mathcal B$
• The resulting optimization problem is a dense least-squares problem with a small $3𝐾 \times 3𝐾$ system matrix (normally $𝐾$ is between 4 and 7 due to merged clusters)
• Materialize the normal equations in device memory based on a sequence of outer products, using one thread per entry of $\pmb J^T\pmb J$
3. The system is mapped to the CPU and robustly solved using singular value decomposition. After updating ‘dense’ variables $\mathcal B$,
we again solve for ‘sparse’ variables $\mathcal T$ and iterate this process until convergence
## 8. Results and Evaluation
Parameters
• $\lambda_{\mathrm{clustering}}=200$
• $\lambda_{\mathrm{r-sparsity}}=20$
• $p=1$
• $\lambda_{\mathrm{i-sparsity}}=3$
• $\lambda_{\mathrm{smoothness}}=3$
• $\lambda_{\mathrm{non-neg}}=1000$
• $\lambda_{\mathrm{data}}=5000$
• $\lambda_{\mathrm{IR}}=10$
• $\lambda_{\mathrm{CR}}=10$
• $\lambda_{\mathrm{r-consistency}}=\lambda_{\mathrm{monochrome}}=10$
Runtime performance
• Platform: Intel Core i7 with 2.7 GHz, 32 GB RAM and an NVIDIA GeForce GTX 980
• Resolution: 640x512 pixels
• Performance:
• Illumination decomposition: 14ms
• Base color refinement: 2s
• Misclustering correction: 1s
• Perform the last two steps, base color refinement and misclustering correction, only once at the beginning of the video
• Runs at real-time frame rates (⩾30 Hz)
• Enables real-time video editing applications
Demo
## 9. Limitations
• Breaking the assumptions can lead to inaccurate estimations
• The method can face challenges if objects enter or leave the scene during the course of the video
• The inter-reflections caused by out-of-view objects cannot be properly modeled, since the corresponding base color might not be available
• If an object with an unseen color enters the scene for the first time, and the base colors are already exceeded, its inter-reflections cannot be modeled
• Complex, textured scenes with many different colors are challenging to decompose, since this requires many base colors, leading to a large number of variables and an even more under-constrained optimization problem
• More general indoor and outdoor scenes are not the ideal use cases for the method | 2023-03-23 16:35:29 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.41214311122894287, "perplexity": 2351.68090003103}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296945182.12/warc/CC-MAIN-20230323163125-20230323193125-00518.warc.gz"} |
https://www.physicsforums.com/threads/r-hat.776853/ | # R hat (^)
Tags:
1. Oct 18, 2014
### Mary O'Donovzn
Hi
I am struggling big time with Physics and vectors and I keep coming across r hat (^) like what is it exactly and how do you calculate it?
Thanks in advance
2. Oct 18, 2014
### A.T.
3. Oct 18, 2014
### Vagn
The hat on a vector usually means it is a unit vector, i.e. a vector of length 1 in the direction of r.
4. Oct 18, 2014
### Staff: Mentor
You'll need to provide more context to get a helpful answer. Often, $\hat r$ is a unit vector in the radial direction.
5. Oct 18, 2014
### Staff: Mentor
Context... we need some context... Without that all we can say for sure is that it's an r with hat over it.
However, there is a very good chance that it is a unit vector in some direction of interest, and what that direction is will depend on the specific problem that's being discussed.
6. Oct 18, 2014
### Mary O'Donovzn
okay so in the exam paper it says that "r hat is the unit vector along the line of action between the charges. the question is regarding coloumbs law"
so I'm given the magnitude of the vectors and the corordinates of three charges and I need r hat to solve it
7. Oct 18, 2014
### Staff: Mentor
You will get much better results for this sort of question if you post in the homework section. Please use the template that appears when you start a thread there - it helps you organize your thoughts, helps the homework helpers (who are, BTW, underpaid volunteers) know where to start, and it's required by the rules in any case.
I'm closing this thread now - further discussion belongs in the homework sections.
8. Oct 19, 2014
### Staff: Mentor
Where "underpaid" means "unpaid", unless you count things like psychological satisfaction and Internet glory. :D
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook | 2017-08-22 19:44:49 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.35004743933677673, "perplexity": 1450.3996195148568}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-34/segments/1502886112539.18/warc/CC-MAIN-20170822181825-20170822201825-00305.warc.gz"} |
https://ctan.org/ctan-ann/id/mailman.4286.1472816416.4066.ctan-ann@ctan.org | Date: September 2, 2016 1:40:06 PM CEST
Palle Jørgensen submitted the addfont package. Version number: 1 License type: gpl3 Summary description: easier use of fonts without LaTeX support Announcement text:
addfont is intended for use by users who know about fonts. It is a quick-fix for fonts which does not have genuine LaTeX support. It is not meant as a replacement of the LaTeX font definition files. It is meant as something more useable for LaTeX users than the \newfont command. With addfont the loaded font scales along with the usual LaTeX size selection. Using this package still requires some knowledge on how to use fonts with LaTeX.
The package's Catalogue entry can be viewed at http://www.ctan.org/pkg/addfont The package's files themselves can be inspected at http://mirror.ctan.org/macros/latex/contrib/addfont
Thanks for the upload. For the CTAN Team Erik Braun
We are supported by the TeX users groups. Please join a users group; see http://www.tug.org/usergroups.html .
## addfont – Easier use of fonts without LaTeX support
This package is intended for use by users who know about fonts. It is a quick-fix for fonts which do not have genuine support. It is not meant as a replacement of the font definition files.
It is meant as something more useable for users than the \newfont command. With addfont the loaded font scales along with the usual size selection.
Using this package still requires some knowledge on how to use fonts with .
Package addfont Version 1.1 2021-03-20 Copyright 2016–2021 Palle Jørgensen Maintainer Palle Jørgensen
more | 2022-12-08 15:50:47 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9637924432754517, "perplexity": 5685.69260564751}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-49/segments/1669446711344.13/warc/CC-MAIN-20221208150643-20221208180643-00415.warc.gz"} |
https://adunumdatum.org/post/using-tmux-with-ssh/ | # A Note on Using Tmux with SSH
* You are now known as ooupdate * Services.GeekShed.net sets mode +r ooupdate Hi all! Does anyone here use tmux? I'm trying to connect through SSH to a tmux session that was created locally on my system. Oddly, no locally-created tmux session is listed through SSH when I use 'tmux ls', and no tmux session created through SSH is listed on my local machine. Am I missing something basic? ooupdate did you maybe run tmux with sudo? i do that sometimes ooupdate: is tmux set up to receive ssh connections? Firewall config? The current position of Jupiter and Titan? TheAnime: Nope, same user (local and SSH). zell: I didn't know that tmux has to be set up to receive SSH connections -- I'll look into that! ooupdate: Are you trying to get back into the tmux session? Use *tmux attach* to connect back to it. It's weird -- I have one session created through SSH, and one session created locally. 'ps ax | grep tmux' shows both, but 'tmux ls' only shows one on each system. ooupdate: I'm not usre if it does either. I'm trying to set up a server myself and forgot initially to install the ssh server. Might have been a simple oversight. Might have been the whiskey tho.... Crabby: It seems that tmux can't see the sessions -- when I try to attach to them, I'm told that there's no such session. zell: The whiskey both helps and hurts, I'm sure : ) ooupdate: there's no better buzz than the scotch buzz ooupdate: lol yeah. Seriously though. Check the ssh config on the server box and the firewall configs on the client. Might find the culprit there. ooupdate: have you restarted since you detached from your previous sessions? arbulus: Nope, no restarts. 'ps ax | grep tmux' shows all running sessions -- it's just that tmux itself can't see all of them! Odd, right? ooupdate definitely odd, ive never had that pronlem and i run tmux all the time ######################################## NOTE BELOW: ######################################## TheAnime, arbulus, zell: FWIW, I got it, following http://stackoverflow.com/questions/13708376/can-only-connect-to-local-tmux-session-through-over-ssh/13717805#13717805 and http://readystate4.com/2011/01/02/sharing-remote-terminal-session-between-two-users-with-tmux/ -- It turns out that tmux through SSH connections is looking in /run/tmux/[userid], whereas tmux on my local machine is looking in /tmp/tmux-[userid]. So by connecting through SSH and specifying the local machine's socket with 'tmux -S /tmp/tmux-[userid]/default list-sessions', it all works. It also works if I set TMPDIR to /tmp through SSH. Whew! ######################################## # OTHER COMMENTS HERE: ######################################## # You can see where tmux is creating sessions, per the first link above, with tmux -L temp start\; info | grep path. Per the link, "This will create a evanescent server using a socket named temp instead of default, and show you the path to the socket it is using." # -S above specifies a socket to attach to. It's easier to just do (assuming echo \$TMPDIR on the local machine prints '/tmp') TMPDIR=/tmp; export TMPDIR;. This can be added to the local machine's ~/.bashrc: export TMPDIR=/tmp. ######################################## ooupdate: That is oddly complicated Agreed! It apparently stems from TMPDIR not being set in SSH sessions. I don't know why : / ooupdate: what were you trying to accomplish? ooupdate: Ok, let me get this straight, were you in a local tmux session, and then ssh'd into a remote machine, and then started a tmux session inside that? ooupdate your tmux is weird sm: 1) Start tmux session on local machine (openSUSE 13.1); 2) SSH into local machine from remote machine; 3) Attach to tmux session. TheAnime: Maybe it's an opensuse thing. ooupdate: uhh....'tmux attach' sm: 'tmux attach' only works if tmux sees that there's something to attach to. arbulus: I tried that, to no avail : / tmux is looking in totally different places (/tmp vs /run) on local vs. ssh sm: SSH is using the same user, yeah. DennyTek: I thought so, too, until just now! Yeah, I've never had this problem before. In any case, thanks, all : ) I'm writing this one down and filing it away in case it ever happens again,
Next
Previous | 2019-01-18 20:52:05 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.1718127280473709, "perplexity": 10352.607056102544}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-04/segments/1547583660529.12/warc/CC-MAIN-20190118193139-20190118215139-00007.warc.gz"} |
https://tex.stackexchange.com/questions/318772/latex-compilation-problem | # LaTeX compilation problem [duplicate]
I am getting this while trying to compile literally my first document
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./t1.tex
LaTeX2e <2015/01/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo)) (./t1.aux)
! Undefined control sequence.
l.6 \latex
?
• Welcome to TeX.SX! The command is either \LaTeX or \LaTeXe. You should show us the document t1.tex actually. – user31729 Jul 10 '16 at 10:22
• Please add a MWE so we can try it out for ourselves. From the error message it seems you use a command that has not been defined -- that is \latex. Please keep in mind that commands are case sensitive and you probably wanted to use \LaTeX. – HATEthePLOT Jul 10 '16 at 10:24
• Having the command \LaTeX etc that early in the document looks strange. It should occur after \begin{document}, not before (and spelled correctly, of course) – user31729 Jul 10 '16 at 10:29
• @ChristianHupfer It's on line 6, apparently, and is after \begin{document} (based on (./t1.aux)). – Joseph Wright Jul 10 '16 at 10:49
• @JosephWright: True, I didn't notice the .aux file: Thanks – user31729 Jul 10 '16 at 15:10
Both TeX and LaTeX are case-sensitive, i.e. it matters whether a command is written with uppercase or lower case letters.
Most likely, the command \LaTeX was intended, but was spelled as \latex which is wrong (unless somebody defines this command)
So out of the 32 possible variants of \latex, \Latex, \lATeX etc. only \LaTeX is correct ;-)
Please note that there is a special \LaTeXe command to output the LaTeX2e variant.
The example below shows also the difference between the font size command \huge and \Huge, i.e. where lowercase and uppercase forms provide significantly different output.
\documentclass{article}
\begin{document}
\huge
\LaTeX\ is very nice,
\LaTeXe\ is very nice too, but
\LaTeX3 is yet to come!
\Huge
\LaTeX\ is very nice,
\LaTeXe\ is very nice too, but
\LaTeX3 is yet to come!
\end{document} | 2019-12-13 09:51:19 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9688860177993774, "perplexity": 5965.6661489600165}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540553486.23/warc/CC-MAIN-20191213094833-20191213122833-00413.warc.gz"} |
https://forum.allaboutcircuits.com/threads/12v-dc-to-110v-power-inverter-doing-the-impossible.123768/ | 12v DC to 110v power inverter doing the impossible?
realflow100
Joined Apr 17, 2016
16
Ok so I have a power supply at 12v 2A (with safety overcurrent cut-off) to test a car inverter
the strange thing is. I have a monitor/pc screen that takes 163w of power to run
and at 12v 2A theres no way to get 163w of power.
yet the monitor turns on just fine! i'm so confused how its possible the inverter has over 100% efficiency or something?
It was a cheap 300w 23$inverter off amazon for use in emergencies if the power goes out. yet it somehow steps up 2A 12v 20W to over 160w 110v? The weird thing is it's incapable of lighting a 20w fluorescent bulb (power supply cuts out from over-current protection.) I dont know how its able to run a 100W+ monitor yet not run a 20w bulb. I just don't get it. it doesnt look possible but somehow its capable of doing so. tcmtech Joined Nov 4, 2013 2,867 Pictures and links to the exact devices being used so we can see their specs would be helpful. ronv Joined Nov 12, 2008 3,770 Ok so I have a power supply at 12v 2A (with safety overcurrent cut-off) to test a car inverter the strange thing is. I have a monitor/pc screen that takes 163w of power to run and at 12v 2A theres no way to get 163w of power. yet the monitor turns on just fine! i'm so confused how its possible the inverter has over 100% efficiency or something? It was a cheap 300w 23$ inverter off amazon for use in emergencies if the power goes out. yet it somehow steps up 2A 12v 20W to over 160w 110v?
The weird thing is it's incapable of lighting a 20w fluorescent bulb (power supply cuts out from over-current protection.)
I dont know how its able to run a 100W+ monitor yet not run a 20w bulb.
I just don't get it. it doesnt look possible but somehow its capable of doing so.
163 watts is a lot for a monitor. Maybe 16.3???
BR-549
Joined Sep 22, 2013
4,938
Wow, the price of inverters is coming down. And a lot are advertised as true sine.
realflow100
Joined Apr 17, 2016
16
the back of the monitor lists 100-240v 1.6A 163W on the label.
also tested with a different LCD monitor that runs from a 19v laptop-type PSU rather than wall plug. and it also works.
also when i went to plug in a usb charger cord to a usb port on the inverter i heard a loud pop after 2 seconds and now the usb port is dead
it still has 3.4v but only supplies a max of 5-10mA!? its supposed to be 5v 2.4A
I checked on the circuit board but couldn't find any burnt out components near the usb port. (There was an enormous inductor toroid near it but it was fine.)
The wall plugs at least still work... it sucks that the usb charging ports died from some kind of defect. guess i have to get a power strip and put some kind of usb charging adapter on it.
BR-549
Joined Sep 22, 2013
4,938
Can you measure the AC current going to the monitor?
tsan
Joined Sep 6, 2014
116
If you have a multimeter you can measure dc current while supplying the monitor. Then it is easy to calculate power consumption.
Dodgydave
Joined Jun 22, 2012
10,088
Measure the current input and output, then you will know what's going on.
realflow100
Joined Apr 17, 2016
16
Where would I measure the current output? at the wall outlet of the inverter or at the 12v power supply going to the inverter?
tcmtech
Joined Nov 4, 2013
2,867
Both.
Dr.killjoy
Joined Apr 28, 2013
1,196
I have to agree with Ronv here with something miss read cause my big flat screen are only 160w-200w depending on the model and your talking about the same power for a screen 1/6 th the size..
tcmtech
Joined Nov 4, 2013
2,867
See post 2 again.
realflow100
Joined Apr 17, 2016
16
It's a 1440x900 dell E1709Wc screen with 100-240v 1.6A on the back label of it.
but also works with a 1920x1080 17" Acer LED tv that im currently using.
I'm confused how 20w can translate to even more than 20w on the output?? it should actually be limited to lower than 20w even because of losses in the inverter and wires themselves.
The inverter is an SNAN 300w car power inverter
The test power supply is an enercell 3-12v power supply rated 2 amps maximum. with safety overcurrent protection (cuts off if anything draws over 2A)
Last edited:
BR-549
Joined Sep 22, 2013
4,938
You got two choices.
You can keep telling everyone that you have a new power source..............
OR you can take some measurements.
You decide.
realflow100
Joined Apr 17, 2016
16
I read on the website the monitor takes 25w power running.
but the power supply is actually 11.5v on the output checked with a multimeter. with a very sharp 2A current cut-off (test with a DC motor and slowing it down while testing current. and the instant it got past 1.9A it cut off.)
so it gives out even less than 25W maximum.
tcmtech
Joined Nov 4, 2013
2,867
The 1.6 Amps is its maximum draw not it's continuous which means that if the backlighting is turned down (primary power user on flatscreens) the actual running wattage could be well under 20 watts.
If you really are putting out more wattage than you are putting in you should be able to run the system off of 12 volt battery to get things running and then have the power supply plugged into the inverters output and have that feedback to the battery and inverters input and see the battery voltage start going up rather than down or be able to remove the battery altogether.
If you can't do that then obviously you're not putting out more power than you are putting in.
BobaMosfet
Joined Jul 1, 2009
1,898
Ok so I have a power supply at 12v 2A (with safety overcurrent cut-off) to test a car inverter
the strange thing is. I have a monitor/pc screen that takes 163w of power to run
and at 12v 2A theres no way to get 163w of power.
yet the monitor turns on just fine! i'm so confused how its possible the inverter has over 100% efficiency or something?
It was a cheap 300w 23\$ inverter off amazon for use in emergencies if the power goes out. yet it somehow steps up 2A 12v 20W to over 160w 110v?
The weird thing is it's incapable of lighting a 20w fluorescent bulb (power supply cuts out from over-current protection.)
I dont know how its able to run a 100W+ monitor yet not run a 20w bulb.
I just don't get it. it doesnt look possible but somehow its capable of doing so.
Don't confuse power ratings with actual power consumption. A sticker has a rating. No monitor that you describe actually requires 100-240VAC potential-- it regulates that down to a much much lower voltage. Your supply is providing more than the maximum current draw that the monitor claims it can draw (depending on what it's doing) and apparently your supply is providing enough voltage to satisfy regulation in the monitor itself.
Until you actually determine the current draw and the voltage potential being used by the monitor, you cannot know exactly what it's doing, other than it is able to manage it. | 2021-12-04 22:23:49 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2980164587497711, "perplexity": 3304.6482849219615}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964363125.46/warc/CC-MAIN-20211204215252-20211205005252-00231.warc.gz"} |
https://www.nextgurukul.in/wiki/concept/icse/class-10/physics/modern-physics/atomic-theory-of-matter/3962645 | Notes On Atomic Theory of Matter - ICSE Class 10 Physics
The structure of matter has long continued to fascinate man. One of the earliest attempts to understand the structure of matter was made by Maharishi Kanad, an Indian sage who lived around 6th century BC. According to him, if matter is broken into smaller and smaller pieces, a stage will come when the matter cannot be broken further. Kanad called these tiniest of tiny particles ‘parmanu’. Around the same time that Maharishi Kanad proposed the existence of parmanu, Greek philosophers such as Democritus and Epicurus suggested that matter is made up of tiny indivisible particles called atoms. Incidentally, the word ‘atom’ is derived from the Greek word ‘atomos’, which means indivisible or uncut. However, the views expressed by Democritus and Epicurus as well as Kanad were philosophical in nature and not backed by any scientific experiment. Then several centuries later in 1803, an English scientist named John Dalton published a theory, explaining the nature of matter. Known as the Dalton’s Atomic Theory, this particular theory revolutionised man’s perspective about matter and its constituents. Some Important Postulates of the Dalton’s Atomic Theory All matter is composed of elements, which in turn are made up of small indivisible particles called atoms. Atoms of a same element have same mass and properties; whereas atoms of different elements have different masses. Every single atom of a particular element maintains its distinct identity throughout various chemical and physical changes. Atoms of different elements combine with one another to form compounds. Example: oxygen and carbon atoms combine to form carbon monoxide. On the other hand, atoms of the same elements combine in different ratio to form different compounds. Example: Two oxygen atoms and one carbon atom combine to form carbon dioxide. Though the Dalton’s Atomic Theory enabled scientists to gain more knowledge about matter, it also drew criticisms as this theory had several drawbacks. Drawbacks of Dalton’s Atomic Theory Dalton had suggested that an atom is indivisible. However, scientists later proved that an atom could be further broken down into protons, neutrons and electrons. scientists also proved that atoms of the same element can have slightly different masses. For instance, the isotopes of oxygen have different atomic masses. Example: Isotopes of Oxygen. This contradicted the Dalton’s Atomic Theory, which stated that atoms of the same element have same atomic mass. Another major drawback of the Dalton’s Atomic Theory was that it could not explain the differences in the properties of charcoal, graphite and diamond though all the three are made up of carbon atoms. Later Thomson discovered the presence of a negatively charged particle having a mass equal to 1/1837 times the mass of hydrogen. Since hydrogen is the lightest atom, Thomson concluded that this particular particle was a subatomic particle. He named this negatively charged subatomic particle as ‘electron’. The discovery of electron made it clear to Thomson that since an atom is electrically neutral; it must possess positively charged particles to compensate for the negatively charged electrons. Later, these positively charged particles came to be known as protons. Based on his studies, J. J. Thomson proposed a new model for atom in 1903; almost 100 years after Dalton had proposed his atomic theory. J. J. Thomson for atom According to this model, an atom is made up of positively charged particles, which are spread thinly in the form of a sphere. Embedded inside this sphere, are the electrons just as raisins are embedded in a plum pudding. Hence, this model also came to be known as Thomson’s Plum Pudding Model. Draw backs of Thomson’s Plum Pudding Model This theory could not explain how positively charged particles remain shielded from the negatively charged electrons without getting neutralised. Rutherford’s Experiment Thomson’s student, Ernest Rutherford conducted an experiment using gold foil which disproved Thomson’s model. In this particular experiment, Rutherford bombarded a thin foil of pure gold with positively charged particles called alpha particles. Observations made from alpha ray scattering experiment He observed that while most of the alpha particles passed through the gold foil without deviating from their original part, a few others deviated slightly while others got completely deflected. These observations enabled Rutherford to put forth a new model on the structure of atom. Postulates of Rutherford nuclear model Rutherford nuclear model stated that the mass of an atom remains concentrated in small space called the nucleus. This nucleus is positively charged, that is, it contains the protons, which explains why certain alpha particles deviated and rebounded. Revolving around this nucleus are the negatively charged electrons. Incidentally, the number of electrons is always equal to the number of protons, which explains why atoms are electrically neutral. Rutherford’s atomic model thus gave a clearer picture about the structure of an atom. However, this theory had several drawbacks. Drawbacks of Rutherford’s atomic model This model, did not explain the position of electrons with respect to each other and the nucleus. Likewise, the model was unsuccessful in explaining the reason as to why the atomic mass of an element was far too greater than the mass of the protons, in spite of the fact that the mass of an atom is concentrated within its protons. However, Rutherford’s atomic model acted as a springboard for other scientists such as Niels Bohr and James Chadwick who further refined our knowledge about the atomic structure. Discovery of neutron Chadwick,discovered neutron. The discovery of neutron enabled scientists to understand as to why atomic mass of an element was far too greater than the mass of the protons. Today, the Modern Atomic Model which is based on the models proposed by Bohr, Rutherford, J. J. Thomson to name a few, states that an atom consists of three subatomic particles, namely, the electrons, neutrons and protons. Each of these three subatomic particles has unique properties. Properties of electron, proton and neutron Parameters Electron Proton Neutron Position Present outside the nucleus and revolves in the orbits Present inside the nucleus Present inside the nucleus Mass 9.108X10-28 g 1.67X10-24g 1.67X10-24 g Charge -1.602 X10-19coulombs 1.602 X 10-19coulombs Zero Representation e- p+ n Incidentally, protons and neutrons, collectively called nucleons, form the nucleus – the central core of an atom. Moreover, the nucleons are held together inside the nucleus by nuclear forces. While the protons and neutrons form the nucleus, electrons revolve around this nucleus in fixed orbits known as energy levels or shells. Interestingly, electrons present in the inner shells or orbits are held by a strong electric pull exerted by the protons. Such electrons are called bound electrons. On the other hand, electrons present in the outermost shell experience an extremely weak nuclear force due to a greater distance between their orbits and the protons. Such electrons are called valence electrons. Thus, our knowledge about electrons as well as other subatomic particles such as protons and neutrons is basically due to the pioneering work done by the likes of Bohr, Rutherford, J. J. Thomson and Dalton.
#### Summary
The structure of matter has long continued to fascinate man. One of the earliest attempts to understand the structure of matter was made by Maharishi Kanad, an Indian sage who lived around 6th century BC. According to him, if matter is broken into smaller and smaller pieces, a stage will come when the matter cannot be broken further. Kanad called these tiniest of tiny particles ‘parmanu’. Around the same time that Maharishi Kanad proposed the existence of parmanu, Greek philosophers such as Democritus and Epicurus suggested that matter is made up of tiny indivisible particles called atoms. Incidentally, the word ‘atom’ is derived from the Greek word ‘atomos’, which means indivisible or uncut. However, the views expressed by Democritus and Epicurus as well as Kanad were philosophical in nature and not backed by any scientific experiment. Then several centuries later in 1803, an English scientist named John Dalton published a theory, explaining the nature of matter. Known as the Dalton’s Atomic Theory, this particular theory revolutionised man’s perspective about matter and its constituents. Some Important Postulates of the Dalton’s Atomic Theory All matter is composed of elements, which in turn are made up of small indivisible particles called atoms. Atoms of a same element have same mass and properties; whereas atoms of different elements have different masses. Every single atom of a particular element maintains its distinct identity throughout various chemical and physical changes. Atoms of different elements combine with one another to form compounds. Example: oxygen and carbon atoms combine to form carbon monoxide. On the other hand, atoms of the same elements combine in different ratio to form different compounds. Example: Two oxygen atoms and one carbon atom combine to form carbon dioxide. Though the Dalton’s Atomic Theory enabled scientists to gain more knowledge about matter, it also drew criticisms as this theory had several drawbacks. Drawbacks of Dalton’s Atomic Theory Dalton had suggested that an atom is indivisible. However, scientists later proved that an atom could be further broken down into protons, neutrons and electrons. scientists also proved that atoms of the same element can have slightly different masses. For instance, the isotopes of oxygen have different atomic masses. Example: Isotopes of Oxygen. This contradicted the Dalton’s Atomic Theory, which stated that atoms of the same element have same atomic mass. Another major drawback of the Dalton’s Atomic Theory was that it could not explain the differences in the properties of charcoal, graphite and diamond though all the three are made up of carbon atoms. Later Thomson discovered the presence of a negatively charged particle having a mass equal to 1/1837 times the mass of hydrogen. Since hydrogen is the lightest atom, Thomson concluded that this particular particle was a subatomic particle. He named this negatively charged subatomic particle as ‘electron’. The discovery of electron made it clear to Thomson that since an atom is electrically neutral; it must possess positively charged particles to compensate for the negatively charged electrons. Later, these positively charged particles came to be known as protons. Based on his studies, J. J. Thomson proposed a new model for atom in 1903; almost 100 years after Dalton had proposed his atomic theory. J. J. Thomson for atom According to this model, an atom is made up of positively charged particles, which are spread thinly in the form of a sphere. Embedded inside this sphere, are the electrons just as raisins are embedded in a plum pudding. Hence, this model also came to be known as Thomson’s Plum Pudding Model. Draw backs of Thomson’s Plum Pudding Model This theory could not explain how positively charged particles remain shielded from the negatively charged electrons without getting neutralised. Rutherford’s Experiment Thomson’s student, Ernest Rutherford conducted an experiment using gold foil which disproved Thomson’s model. In this particular experiment, Rutherford bombarded a thin foil of pure gold with positively charged particles called alpha particles. Observations made from alpha ray scattering experiment He observed that while most of the alpha particles passed through the gold foil without deviating from their original part, a few others deviated slightly while others got completely deflected. These observations enabled Rutherford to put forth a new model on the structure of atom. Postulates of Rutherford nuclear model Rutherford nuclear model stated that the mass of an atom remains concentrated in small space called the nucleus. This nucleus is positively charged, that is, it contains the protons, which explains why certain alpha particles deviated and rebounded. Revolving around this nucleus are the negatively charged electrons. Incidentally, the number of electrons is always equal to the number of protons, which explains why atoms are electrically neutral. Rutherford’s atomic model thus gave a clearer picture about the structure of an atom. However, this theory had several drawbacks. Drawbacks of Rutherford’s atomic model This model, did not explain the position of electrons with respect to each other and the nucleus. Likewise, the model was unsuccessful in explaining the reason as to why the atomic mass of an element was far too greater than the mass of the protons, in spite of the fact that the mass of an atom is concentrated within its protons. However, Rutherford’s atomic model acted as a springboard for other scientists such as Niels Bohr and James Chadwick who further refined our knowledge about the atomic structure. Discovery of neutron Chadwick,discovered neutron. The discovery of neutron enabled scientists to understand as to why atomic mass of an element was far too greater than the mass of the protons. Today, the Modern Atomic Model which is based on the models proposed by Bohr, Rutherford, J. J. Thomson to name a few, states that an atom consists of three subatomic particles, namely, the electrons, neutrons and protons. Each of these three subatomic particles has unique properties. Properties of electron, proton and neutron Parameters Electron Proton Neutron Position Present outside the nucleus and revolves in the orbits Present inside the nucleus Present inside the nucleus Mass 9.108X10-28 g 1.67X10-24g 1.67X10-24 g Charge -1.602 X10-19coulombs 1.602 X 10-19coulombs Zero Representation e- p+ n Incidentally, protons and neutrons, collectively called nucleons, form the nucleus – the central core of an atom. Moreover, the nucleons are held together inside the nucleus by nuclear forces. While the protons and neutrons form the nucleus, electrons revolve around this nucleus in fixed orbits known as energy levels or shells. Interestingly, electrons present in the inner shells or orbits are held by a strong electric pull exerted by the protons. Such electrons are called bound electrons. On the other hand, electrons present in the outermost shell experience an extremely weak nuclear force due to a greater distance between their orbits and the protons. Such electrons are called valence electrons. Thus, our knowledge about electrons as well as other subatomic particles such as protons and neutrons is basically due to the pioneering work done by the likes of Bohr, Rutherford, J. J. Thomson and Dalton.
Next | 2022-05-24 15:45:13 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 2, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5171938538551331, "perplexity": 858.717991763873}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652662573053.67/warc/CC-MAIN-20220524142617-20220524172617-00468.warc.gz"} |
https://studydaddy.com/question/what-is-the-polynomial-function-of-lowest-degree-with-lead-coefficient-1-and-roo | Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
QUESTION
# What is the polynomial function of lowest degree with lead coefficient 1 and roots 1 and 1+i?
x^3-3x^2+4x-2,
We know that the complex roots always occur in conjugate pairs.
One complex root is 1+i, so there must be its conjugate, i.e., 1-i as the other root.
Hence, there are 3" roots :"1,1+i, 1-i.
Therefore, the poly. of the least degree must be a cubic having 3" zeroes, "1, 1+i, and, 1-i.
Since the lead-co-eff. is 1, the cubic poly. p(x) must read :
p(x)=(x-1)(x-(1+i))(x-(1-i))
=(x-1){((x-1)-i)((x-1)+i}
=(x-1){(x-1)^2-i^2}
=(x-1){(x-1)^2+1}
=(x-1)^3+(x-1)
=(x^3-1-3x^2+3x)+(x-1)
=x^3-3x^2+4x-2, | 2019-04-23 20:48:21 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4408189058303833, "perplexity": 2170.5430513518145}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-18/segments/1555578613603.65/warc/CC-MAIN-20190423194825-20190423220825-00148.warc.gz"} |
https://www.edmundoptics.jp/knowledge-center/application-notes/optics/bulk-laser-damage-in-glass/ | # Bulk Laser Damage in Glass
Most of the literature on laser-induced damage threshold (LIDT), including that previously published by Edmund Optics®, has focused exclusively on issues related to surface damage (Figure 1). This focus was justified because, historically, the LIDT of optical components was limited by dielectric coatings and surface quality, rather than bulk damage.1 However, with the recent development of nano-structured anti-reflective surfaces, called Nebular™ Technology by Edmund Optics, dielectric coatings are not always necessary. For these new optical elements, the LIDT now approaches the bulk damage threshold of the glass. Because of the absence of surface coatings, contamination, and defects, the surface breaks down by the same mechanism as in the bulk of the glass.2 Therefore, it is important to explore the underlying causes of bulk damage in optical glass to better understand why the LIDT is so much higher for optics with Nebular™ Technology.
### Causes of Bulk Damage
Bulk LIDT is not only proportional to the peak power of the laser, but also scales with wavelength, beam diameter, and, most importantly, the pulse duration.1 To gain an intuitive understanding of how and why these parameters are so important, one needs to look no further than the absorption probability density function:3
(1)$$W_i = \phi \, \sigma \! \left( \nu \right)$$
In this equation, Wi represents the probability of a photon being absorbed and generating an electron in the condition band, ϕ is the mean photon flux density, and σ is the transition cross-section, which itself is a function of the laser frequency ν. It is important to note that while the transition cross-section, which is directly proportional to the absorption coefficient, is extremely small throughout the optical spectrum for most glasses, it is still non-zero. Therefore, when the intensity of the laser is large enough, significant absorption can take place, resulting in localized heating. This is particularly true for optical glasses that contain inclusions such as platinum, which can be deposited during the production process.4
Optical breakdown (bulk damage) occurs when a sufficiently large number of electrons are excited from the valance band to the conduction band that the free electron density in the material is large enough that it triggers nonlinear absorption inducing electron avalanche ionization.2 The combination of multiphoton absorption and impact ionization during avalanche ionization deepen the wavelength dependence of LIDT since the critical free electron density is proportional to the square of the laser frequency according to the following relationship:5
(2)$$n = \frac{4 \pi ^2 \varepsilon m_c}{e^2} \nu^2$$
In this relationship, n is the critical free electron density, ϵ is the material permittivity, mc is the reduced mass of an electron in the conduction band, and e is the charge of an electron.
While thermal breakdown due to avalanche ionization is the primary cause of optical breakdown with q-switched lasers, that is not the case with all pulsed lasers. For mode-locked lasers, with pulse durations less than approximately 20ps, a different physical phenomenon dominates. Ultrafast laser pulses are so short that the material does not have enough time to heat through localized absorption. Instead, bulk optical damage results from a process known as a Coulomb explosion. A Coulomb explosion occurs from a buildup of an electrostatic force strong enough to break the molecular bonds and cause lattice fracturing from the extremely high electric field within the ultrafast laser pulses.6
### LIDT Scaling
#### Pulse Duration
As a general rule of thumb, LIDT due to avalanche ionization is roughly proportional to $\tau ^{\small{1/2}}_p$, where $\tau ^{\small{1/2}}_p$ is the pulse duration. This is because the multiphoton absorption process is proportional to the intensity squared and, therefore, the square root of the pulse duration.1 Once Coulomb explosions become the dominant failure mechanism, the LIDT is no longer proportional to $\tau ^{\small{1/2}}_p$. In cases such as these, the LDIT continues to decrease with pulse duration, but at a reduced rate.
#### Wavelength
LIDT also decreases as a function of wavelength, but not according to a direct proportionality. Instead, the LIDT results from a convolution of the mean photon flux density, transition cross-section, and critical free electron density, all of which are wavelength dependent. For example, the bulk LIDT for potassium dihydrogen phosphate (KDP) is 24 J/cm2 at 1064nm and a 3ns pulse duration; at the first harmonic (532nm) the LIDT drops to 20 J/cm2, and at the third harmonic (355nm) the LIDT is 11 J/cm2, and at the fourth harmonic (266nm) the LIDT is 3 J/cm2.7 This results in scaling factors of 0.83 from 1064nm to 532nm, 0.46 from 1064nm to 355nm, and 0.13 from 1064nm to 266nm, which highlights the difficulty in determining a single scaling factor for wavelength dependence. The wavelength scaling of the LIDT of KDP is comparable to other optical materials, like bulk and AR-coated fused silica, which has been shown to exhibit a scaling factor between 0.42 and 0.56 between 1064nm and 355nm.1
#### Beam Diameter
The scaling relationship between beam diameter and LIDT is even more challenging to predict. This is because, contrary to intuition, a smaller beam diameter will not result in a lower LIDT. There are two primary reasons for this. First, LIDT is specified by fluence, which is in units of J/cm2; therefore, beam diameter is already built into the value. In fact, in most cases, a smaller beam diameter ends up resulting in a larger LIDT because the beam will interact with a lower number of inclusions in the optical path. While we will not discuss either of these effects in detail here, it is essential to note that determining the actual spot size in the material can be rather challenging because Gaussian beam properties need to be taken into account along with nonlinear effects such as self-focusing.5 More information can be found in our Importance of Beam Diameter on Laser Damage Threshold application note.
#### Number of Shots
Bulk LIDT may be dependent on the number of shots incident on the glass. This is because some glasses, such as BK7, have a decay lifetime from the conduction band to the valance band sufficiently long enough for a pulse-to-pulse build-up of electrons. This can be experimentally observed by looking at the bulk damage point that occurs during the laser pulse.5 However, not all materials exhibit this property. For example, fused silica does not seem to demonstrate any correlation between number of shots and bulk damage threshold.8 I It is useful to note that experiments at Sandia National Labs have shown the single-shot bulk LIDT for BK7 is 4125 J/cm2, but after only 31 pulses BK7 drops to 3289 J/cm2. In comparison, fused silica remains constant at 3800 J/cm2 regardless of the number of shots.5, 8 Both tests were performed using an 8ns pulse duration, 1064nm laser, and focused spot diameters between 8-16μm at the focus, facilitating a reasonably good comparison between the two materials.
Our Laser Induced Damage Threshold Scaling Calculator approximately scales a LIDT value from one wavelength, pulse duration, and beam diameter to a new set of use parameters.
### Bulk LIDT of Common Glasses
In a 2013 press release, SCHOTT released a rather comprehensive analysis of the bulk damage threshold of common optical glasses.9 This experiment utilized two different 1064nm lasers, one with a pulse duration of 12ns and the other with a pulse duration of 74ps. In each case they reported the LIDT for both the fundamental and second harmonics, providing four different bulk LIDT values for each glass. This experiment was conducted with a much larger spot size at the focus, 33-41μm, than the data presented in the previous section, resulting in a slightly lower LIDT. Additionally, the data from SCHOTT was measured using Suprasil CG fused silica, whereas the earlier data was collected from Corning 7940 fused silica. The table below shows the final results for the multi-shot (>1800 pulses) bulk LIDT of each glass, as reported by SCHOTT.9, 10
LIDT (J/cm2) Glass Type 1064nm @ 12ns 532nm @ 10ns 1064nm @ 74ps 532nm @ 74ps N-BK7 2017 74.4 31.8 8.2 N-FK5 1574 226 35.2 9.7 F2 690 7.7 16.7 3.5 N-LASF44 720 18.5 13.8 3.7 N-LAF21 933 15.0 12.6 4.7 SF6 185 Surface Damage 6.4 Surface Damage Fused Silica 1866 280 39.2 11
### Understanding Bulk Laser-Induced Damage
Now that we have established a firm understanding of both the underlying physical phenomena that lead to bulk damage in optical materials, the vast number of variables involved, and the scaling relationships, we can start to better understand the results shown in Table 1. The data clearly shows that, as expected, the LIDT decreases dramatically as wavelength and pulse duration decrease. Furthermore, in most cases (except for SF6 at 532nm) the bulk LIDT threshold is far higher than the surface LIDT. It also shows that in general, crown glasses are preferable to flint glasses for high-power laser applications. Generally, fused silica outperforms either category across a wide range of laser parameters.
The difference between bulk and surface LIDT becomes even starker when compared to a typical V-coated fused silica laser window, which is generally on the order of tens of J/cm2. Also, it has been shown that for fused silica, with a well-polished and uncoated surface, the surface LIDT is approximately equal to the bulk LIDT.8 As a result, the LIDT of fused silica laser optics with Nebular™ Technology is significantly higher than that of traditional V-coated optics.
### Products with Nebular™ Technology
#### Laser Line Windows with Nebular™ Technology
• Precision Fused Silica Windows with Nebular™ Nano-Structured Anti-Reflective Surfaces
• Greater than 99.8% Transmission at Popular Nd:YAG Laser Wavelengths
• High-Power Alternative to Traditional Anti-Reflective Coatings
• 1" Versions Available in Protective Delrin Ring to Facilitate Handling and Prototyping
References
[1] Koechner, W., 1999. Solid-state laser engineering (Vol. 1). Springer.
[2] Bloembergen, N., 1974. Laser-induced electric breakdown in solids. IEEE Journal of Quantum Electronics, 10(3), pp.375-386.
[3] Saleh, B.E. and Teich, M.C., 2019. Fundamentals of photonics. John Wiley & Sons.
[4] Bloembergen, N., 1970. Fundamentals of Damage in Laser Glass. National Materials Advisory Board Publication NMAB, 271.
[5] Kimmel, M., Do, B.T. and Smith, A.V., 2011, November. Deterministic single shot and multiple shot bulk laser damage thresholds of borosilicate glass at 1.064 micron. In Laser-Induced Damage in Optical Materials: 2011 (Vol. 8190, p. 81900Z). International Society for Optics and Photonics.
[6] Wang, D.N., Wang, Y. and Liao, C.R., 2015. Femtosecond laser micromachining on optical fiber. In Laser Surface Engineering (pp. 359-381). Woodhead Publishing.
[7] Rainer, F., Atherton, L.J. and De Yoreo, J.J., 1993, June. Laser damage to production-and research-grade KDP crystals. In 24th Annual Boulder Damage Symposium Proceedings--Laser-Induced Damage in Optical Materials: 1992 (Vol. 1848, pp. 46-58). International Society for Optics and Photonics.
[8] Smith, A.V. and Do, B.T., 2008. Bulk and surface laser damage of silica by picosecond and nanosecond pulses at 1064 nm. Applied optics, 47(26), pp.4812-4832.
[9] Schott AG. (2013) SCHOTT Identifies Alternative Glass Materials for High-Power Laser Applications [Press release]. 5 February. Available at: <https://www.us.schott.com/newsfiles/us/20130204193642_schott_laser-resistant_optics_final.pdf>.
[10] Jedamzik, R., Dietrich, V. and Rossmeier, T., 2012. Bulk Laser Damage Threshold of Optical Glasses. In Proceedings of DGaO (Vol. 113, p. B9).
このコンテンツはお役に立ちましたか?
エドモンド・オプティクスでは、お客様のニーズに合わせてさまざまなサービスをご用意しています。是非ご活用ください。
× | 2020-10-28 14:51:15 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5834470987319946, "perplexity": 2286.60460314046}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-45/segments/1603107898577.79/warc/CC-MAIN-20201028132718-20201028162718-00498.warc.gz"} |
https://www.proquest.com/docview/304773934/abstract | Document Preview
## The Aristotelian definition of motion and the principle of inertia
McLaughlin, Thomas J. University of St. Thomas (Houston). ProQuest Dissertations Publishing, 2001. 3221865. | 2021-06-18 17:47:18 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.961920976638794, "perplexity": 6186.691319835431}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-25/segments/1623487640324.35/warc/CC-MAIN-20210618165643-20210618195643-00389.warc.gz"} |
http://mathonline.wikidot.com/metric-spaces-of-the-first-category-and-second-category | Metric Spaces of the First Category and Second Category
# Metric Spaces of the First Category and Second Category
Definition: Let $(X, d)$ be a metric space. $(X, d)$ is said to be of The First Category if $X$ is equal to the union of a countable collection of nowhere dense subsets of $X$.
Definition: Let $(X, d)$ be a metric space. $(X, d)$ is said to be of The Second Category if $X$ is not of the first category.
Observe that if $(X, d)$ is of the second category, and if:
(1)
\begin{align} \quad X = \bigcup_{n=1}^{\infty} E_n \end{align}
where each $E_n \subseteq X$, then there exists some $n \in \mathbb{N}$ for which $E_n$ is nowhere dense (as all of the sets cannot be nowhere dense). But if $E_n$ is nowhere dense, this means that:
(2)
\begin{align} \quad \mathrm{int} (\bar{E_n}) \neq \emptyset \end{align}
So there exists an $x \in \mathrm{int}(\bar{E_n})$. Furthermore, since the interior of a set is open, there exists an open ball centered at $x$ fully contained in $\bar{E_n}$. | 2019-02-23 18:33:10 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 2, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.981597900390625, "perplexity": 81.90366772331653}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-09/segments/1550249530087.75/warc/CC-MAIN-20190223183059-20190223205059-00025.warc.gz"} |
https://proofwiki.org/wiki/Definition:Supersignature | # Definition:Subsignature/Supersignature
(Redirected from Definition:Supersignature)
## Definition
Let $\mathcal L, \mathcal L'$ be signatures for the language of predicate logic.
Let $\mathcal L$ be a subsignature of $\mathcal L'$.
Then $\mathcal L'$ is said to be a supersignature of $\mathcal L$, denoted:
$\mathcal L' \supseteq \mathcal L$ | 2019-12-16 13:24:31 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8554429411888123, "perplexity": 1273.683710834599}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540565544.86/warc/CC-MAIN-20191216121204-20191216145204-00346.warc.gz"} |
http://math.stackexchange.com/questions/146903/finding-roots-of-unity | # Finding roots of unity?
The $n$th roots of unity are the complex numbers: $1, w,w^2,...,w^{n-1}$, where $w=e^{\frac{2\pi i}{n}}$.
Why is this true? I understand why $w$ is 1 root of unity, but why are $w^0,..., w^{n-1}$ the other roots of unity? Why do the roots of unity consist of the exponents of $w$?
I am only aware that:
The $n$th roots of unity roots of unity are: $\sqrt[n] 1 = \sqrt[n]r\left(\cos\frac{2\pi }{n} + i\sin\frac{2\pi k}{n}\right)$
-
If $w^n = 1$ then $(w^k)^n = w^{kn} = (w^n)^k = 1^k = 1$ for any integer $k$. Thus $w^0,\dots,w^{n-1}$ are all $n$th roots of unity. – KCd May 19 '12 at 3:09
And $r = 1$, because the norm has to be $1$. – Arturo Magidin May 19 '12 at 3:12
First, there are at most $n$ $n$th roots of unity, because $x^n-1$ can have at most $n$ roots (as a consequence of the Factor Theorem applied in $\mathbb{C}$).
Second, if $\omega$ is an $n$th root of unity, that means that $\omega^n = 1$. But then, for any integer $k$, we have $$(\omega^k)^n = \omega^{kn} = (\omega^n)^k = 1^k = 1,$$ so $\omega^k$ is also an $n$th root of unity.
So now the question is which ones are different? If $\omega$ is such that $\omega^n=1$ but $\omega^{\ell}\neq 1$ for any $0\lt \ell\lt n$, then $\omega^r=\omega^s$ if and only if $\omega^{r-s}=1$, if and only if $n|r-s$: indeed, using the division algorithm, we can write $r-s$ as $qn + t$, with $0\leq t\lt n$ (division with remainder). So then $$1=\omega^{r-s} = \omega^{qn+t} = \omega^{qn}\omega^t = (\omega^n)^q\omega^t = 1^q\omega^t = \omega^t.$$ But we are assuming that $\omega^t\neq 1$ if $0\lt t\lt n$; since $0\leq t\lt n$ and $\omega^t=1$, the only possibility left is that $t=0$; that is, that $n|r-s$.
Thus, if $\omega^{\ell}\neq 1$ for $0\lt \ell\lt n$ and $\omega^n=1$, then $\omega^r=\omega^s$ if and only if $n|r-s$, which is the same as saying $r\equiv s\pmod{n}$.
So it turns out that $\omega^0$, $\omega^1$, $\omega^2,\ldots,\omega^{n-1}$ are all different (take any two of the different exponents: the difference is not a multiple of $n$), and they are all roots of $x^n-1$, and so they are all the roots of $x^n-1$.
So it all comes down to finding an $\omega$ with the property that $\omega^k\neq 1$ for $0\lt k\lt n$, but $\omega^n=1$. And $$\large\omega = e^{2\pi i/n}$$ has that property.
-
1)What is "x"? Is it just a random integer? – user26649 May 19 '12 at 3:40
@FarhadYusufali: $x$ in $x^n-1$ is the variable of a polynomial. The "indeterminate". $x^n-1$ is a polynomial, not an integer, not random. You are familiar with polynomials, are you not? – Arturo Magidin May 19 '12 at 3:40
Of course. I do not understand what you did after you came to the conclusion$w^r = w^s$ if $w^{r-s} =1$. Could you expand on that? – user26649 May 19 '12 at 3:45
Note: that a polynomial of degree $n$ has at most $n$ roots is not a consequence of the Factor Theorem alone. It also requires that the coefficient ring be a domain. Indeed, the Factor Theorem holds over any ring. But the root bound does not, e.g. $x^2-1$ has $4$ roots $\pm1,\pm3\:$ over $\mathbb Z/8.\$ – Bill Dubuque May 19 '12 at 3:57
@Farhad: Note that I explicitly state that $\omega$ must be such that $\omega^n=1$, and $\omega^k\neq 1$ for all $k$, $1\leq k\lt n$. The only value of $n$ for which $\omega=1$ satisfies this condition is $n=1$. For $n=4$, the only $4$th roots of unity that satisfy this condition are $i$ and $-i$, and both have the corresponding property. Neither $1$ (which has $1^1=1$) nor $-1$ (which has $(-1)^2=1$) do. All conditions are important, not just some of them! – Arturo Magidin May 22 '12 at 2:51 | 2016-04-30 01:27:27 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9680872559547424, "perplexity": 104.13636202510037}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-18/segments/1461860111581.11/warc/CC-MAIN-20160428161511-00161-ip-10-239-7-51.ec2.internal.warc.gz"} |
http://new-contents.com/Alabama/gaussian-error-propagation-law.html | Address 324 Rock Inn Estates Rd, Cropwell, AL 35054 (205) 338-2390 http://southerncs.com
# gaussian error propagation law Vandiver, Alabama
Retrieved 2016-04-04. ^ "Propagation of Uncertainty through Mathematical Operations" (PDF). f k = ∑ i n A k i x i or f = A x {\displaystyle f_ ρ 5=\sum _ ρ 4^ ρ 3A_ ρ 2x_ ρ 1{\text{ or }}\mathrm The general expressions for a scalar-valued function, f, are a little simpler. The exact covariance of two ratios with a pair of different poles p 1 {\displaystyle p_{1}} and p 2 {\displaystyle p_{2}} is similarly available.[10] The case of the inverse of a
JCGM 102: Evaluation of Measurement Data - Supplement 2 to the "Guide to the Expression of Uncertainty in Measurement" - Extension to Any Number of Output Quantities (PDF) (Technical report). In problems, the uncertainty is usually given as a percent. SOLUTION Since Beer's Law deals with multiplication/division, we'll use Equation 11: $\dfrac{\sigma_{\epsilon}}{\epsilon}={\sqrt{\left(\dfrac{0.000008}{0.172807}\right)^2+\left(\dfrac{0.1}{1.0}\right)^2+\left(\dfrac{0.3}{13.7}\right)^2}}$ $\dfrac{\sigma_{\epsilon}}{\epsilon}=0.10237$ As stated in the note above, Equation 11 yields a relative standard deviation, or a percentage of the Note that these means and variances are exact, as they do not recur to linearisation of the ratio.
Journal of the American Statistical Association. 55 (292): 708–713. JSTOR2281592. ^ Ochoa1,Benjamin; Belongie, Serge "Covariance Propagation for Guided Matching" ^ Ku, H. Resistance measurement A practical application is an experiment in which one measures current, I, and voltage, V, on a resistor in order to determine the resistance, R, using Ohm's law, R Retrieved 22 April 2016. ^ a b Goodman, Leo (1960). "On the Exact Variance of Products".
Derivation of Arithmetic Example The Exact Formula for Propagation of Error in Equation 9 can be used to derive the arithmetic examples noted in Table 1. ISBN0470160551.[pageneeded] ^ Lee, S. R., 1997: An Introduction to Error Analysis: The Study of Uncertainties in Physical Measurements. 2nd ed. SOLUTION To actually use this percentage to calculate unknown uncertainties of other variables, we must first define what uncertainty is.
Your cache administrator is webmaster. Practically speaking, covariance terms should be included in the computation only if they have been estimated from sufficient data. SOLUTION The first step to finding the uncertainty of the volume is to understand our given information. JSTOR2629897. ^ a b Lecomte, Christophe (May 2013). "Exact statistics of systems with uncertainties: an analytical theory of rank-one stochastic dynamic systems".
If the uncertainties are correlated then covariance must be taken into account. October 9, 2009. National Bureau of Standards. 70C (4): 262. This is the most general expression for the propagation of error from one set of variables onto another.
University Science Books, 327 pp. Therefore, the propagation of error follows the linear case, above, but replacing the linear coefficients, Aik and Ajk by the partial derivatives, ∂ f k ∂ x i {\displaystyle {\frac {\partial Note this is equivalent to the matrix expression for the linear case with J = A {\displaystyle \mathrm {J=A} } . Now we are ready to use calculus to obtain an unknown uncertainty of another variable.
However, if the variables are correlated rather than independent, the cross term may not cancel out. Chemistry Biology Geology Mathematics Statistics Physics Social Sciences Engineering Medicine Agriculture Photosciences Humanities Periodic Table of the Elements Reference Tables Physical Constants Units and Conversions Organic Chemistry Glossary Search site Search Journal of Sound and Vibrations. 332 (11). doi:10.1016/j.jsv.2012.12.009. ^ Lecomte, Christophe (May 2013). "Exact statistics of systems with uncertainties: an analytical theory of rank-one stochastic dynamic systems".
doi:10.1287/mnsc.21.11.1338. October 9, 2009. doi:10.1016/j.jsv.2012.12.009. ^ Lecomte, Christophe (May 2013). "Exact statistics of systems with uncertainties: an analytical theory of rank-one stochastic dynamic systems". Most commonly, the uncertainty on a quantity is quantified in terms of the standard deviation, σ, the positive square root of variance, σ2.
R., 1997: An Introduction to Error Analysis: The Study of Uncertainties in Physical Measurements. 2nd ed. The value of a quantity and its error are then expressed as an interval x ± u. In this case, expressions for more complicated functions can be derived by combining simpler functions. Plugging this value in for ∆r/r we get: (∆V/V) = 2 (0.05) = 0.1 = 10% The uncertainty of the volume is 10% This method can be used in chemistry as
In a probabilistic approach, the function f must usually be linearized by approximation to a first-order Taylor series expansion, though in some cases, exact formulas can be derived that do not Article type topic Tags Upper Division Vet4 © Copyright 2016 Chemistry LibreTexts Powered by MindTouch ERROR The requested URL could not be retrieved The following error was encountered while trying For example, the bias on the error calculated for logx increases as x increases, since the expansion to 1+x is a good approximation only when x is small. The system returned: (22) Invalid argument The remote host or network may be down.
Define f ( x ) = arctan ( x ) , {\displaystyle f(x)=\arctan(x),} where σx is the absolute uncertainty on our measurement of x. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. In this case, expressions for more complicated functions can be derived by combining simpler functions. Joint Committee for Guides in Metrology (2011).
Let's say we measure the radius of an artery and find that the uncertainty is 5%. The results of each instrument are given as: a, b, c, d... (For simplification purposes, only the variables a, b, and c will be used throughout this derivation). doi:10.6028/jres.070c.025. Disadvantages of Propagation of Error Approach Inan ideal case, the propagation of error estimate above will not differ from the estimate made directly from the measurements.
Joint Committee for Guides in Metrology (2011). Authority control GND: 4479158-6 Retrieved from "https://en.wikipedia.org/w/index.php?title=Propagation_of_uncertainty&oldid=742325047" Categories: Algebra of random variablesNumerical analysisStatistical approximationsUncertainty of numbersStatistical deviation and dispersionHidden categories: Wikipedia articles needing page number citations from October 2012Wikipedia articles needing Berkeley Seismology Laboratory. Keith (2002), Data Reduction and Error Analysis for the Physical Sciences (3rd ed.), McGraw-Hill, ISBN0-07-119926-8 Meyer, Stuart L. (1975), Data Analysis for Scientists and Engineers, Wiley, ISBN0-471-59995-6 Taylor, J.
Uncertainties can also be defined by the relative error (Δx)/x, which is usually written as a percentage. p.2. Uncertainty in measurement comes about in a variety of ways: instrument variability, different observers, sample differences, time of day, etc. f = ∑ i n a i x i : f = a x {\displaystyle f=\sum _ σ 4^ σ 3a_ σ 2x_ σ 1:f=\mathrm σ 0 \,} σ f 2
The system returned: (22) Invalid argument The remote host or network may be down. doi:10.1007/s00158-008-0234-7. ^ Hayya, Jack; Armstrong, Donald; Gressis, Nicolas (July 1975). "A Note on the Ratio of Two Normally Distributed Variables". Your cache administrator is webmaster. | 2018-11-13 22:53:26 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8233225345611572, "perplexity": 2197.2329536748693}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-47/segments/1542039741510.42/warc/CC-MAIN-20181113215316-20181114001316-00085.warc.gz"} |
https://www.nature.com/articles/s41467-021-26254-3?error=cookies_not_supported&code=78fae253-41d2-4727-9db3-4c4827169201 | ## Introduction
Faults slip in a variety of modes, from dynamic earthquakes to transient slow-slip events and aseismic slip1,2. The classical picture of faults being either locked and prone to dynamic and damaging earthquakes or unlocked and quietly slipping to accommodate tectonic stress is evolving. Growing evidence indicates complex fault behaviors and interactions among and between modes of slip3. Evidence includes fault segments hosting both slow and dynamic earthquakes, as well as slow earthquakes preceding and possibly triggering the nucleation phase of dynamic earthquakes4,5,6. Answering a number of fundamental questions, such as what controls the slip mode on a fault, whether there exists a continuous spectrum of slip modes on faults, and what determines the possible evolution of a slow earthquake into a dynamic seismic rupture, requires exhaustive characterization of all slip phenomena. Interferometric Synthetic Aperture Radar (InSAR) holds the promise of continuous geodetic monitoring of fault systems at a global scale, which may well hold the key to address these questions. However, although the data exists, current algorithms are not suited for global monitoring because they require time-consuming manual intervention, and the final product requires exhaustive expert interpretation.
InSAR is routinely used to measure ground deformation due to hydrologic, volcanic, and tectonic processes7,8,9. The apparent range change in the satellite Line Of Sight (LOS) between two SAR acquisitions is, after corrections from orbital configurations and topography, the combination of atmospheric propagation delay, changes in soil moisture and vegetation, and actual ground deformation. Rapid, large-amplitude deformation signals such as coseismic displacement fields often exceed the amplitude of sources of noise10. Similarly, slow but steady accumulation of deformation over long periods of time may be quantified using InSAR either through stacking11 or time-series analysis12,13. However, detecting low-amplitude deformation related to transient sources such as slow-slip events, episodes of volcanic activity, or hydrologic-related motion remains challenging and requires significant human intervention and interpretation8,14,15. Measuring Earth surface deformation is fundamental to characterizing diverse tectonic processes, as well as surface and underground changes induced by human activities.
The most pressing issue in InSAR processing for small, millimeter-scale, deformation monitoring remains the separation between atmospheric propagation delays and ground deformation. Spatial and temporal variations in atmospheric pressure, temperature, and relative humidity modify the refraction index of the air, resulting in spatial and temporal delay variations in the two-way travel time of the radar carrier between a SAR imaging satellite and the ground16,17. Such delays directly affect the phase of an interferogram, which combines two SAR acquisitions. Atmospheric propagation delays in a single interferogram can be equivalent to tens of centimeters in apparent range change16. Current correction methods based either on empirical estimations18,19 or on independent data20,21,22,23 reduce the contribution of the stratified atmosphere—the long-wavelength atmospheric perturbation that, to a first order, correlates with topography. Nonetheless, remaining delays, corresponding to the turbulent portion of the troposphere may represent centimeters of apparent range change. Propagation delays in the atmosphere decorrelate after periods of 6–24 h, as shown by the temporal structure–function of Global Navigation Satellite System (GNSS) zenith delays24. Therefore, remaining tropospheric delays, which are coherent in space, can be considered random in the time given the time span between SAR acquisitions (e.g., 6 days for Sentinel 1, 46 days for ALOS-2). Moreover, it can be shown that, because of potential temporal aliasing17 and loss of spatial coherence of the radar phase echo, spatio-temporal filtering can lead to biased results. Therefore, deciphering a consistent, days- to month-long transient signal in the time series of InSAR data remains a critical challenge, especially when automation is envisioned.
Convolutional neural networks are central to the most recent dramatic advances in computer vision and natural language processing. Autoencoders have been developed to create sparse representations of data—the model copies its input to its output through a bottleneck that forces a reduction of dimension equivalent to a compressed knowledge representation of the original input, enabling noise removal. Of note are recent developments applied to classify InSAR data in order to detect ground uplift and subsidence, and specifically to identify volcanic unrest25,26,27,28. Although promising, these developments do not make use of the different temporal signatures of signals of interest to reconstruct denoised deformation patterns.
Here, we describe a deep learning-based method to automatically detect and extract transient ground deformation signals from noisy InSAR time series. Our approach, based on a purely convolutional autoencoder, is specifically designed for removing noise in InSAR time series. In the following, we consider the evolution of the interferometric phase with time with respect to a reference both in space and time. We consider classical Small Baseline (SBAS)-like approaches for the reconstruction of the time series29,30. The time series we analyze stem from the inversion of a sequence of SAR interferograms previously corrected from orbital and topographic contributions31, with a first-order atmospheric correction derived from global atmospheric reanalysis products21,32. Our autoencoder takes as input a noisy InSAR time series reconstructed from successive SAR acquisitions, and outputs accumulated ground deformation taking place during the time-series interval, with the atmospheric noise removed.
In this work, we first introduce the notion of autoencoders before describing the architecture of our neural network. We then describe our training set and perform preliminary tests on synthetic data. We finally highlight the efficiency of our algorithm on two reconstructed time series of ground deformation, the first one derived from COSMO-SkyMed acquisitions and the second one derived from Sentinel 1A–B SAR acquisitions.
## Results
### Description and validation of the deep autoencoder
#### Autoencoder architecture
Our goal is to extract ground deformation from noisy InSAR time series. For the purpose of training our deep learning model, we assume that input time series are the combination of three physical contributions: ground deformation, the stratified component of the atmosphere, and the turbulent component of the atmosphere. In most cases, the stratified component can be corrected for using Global Atmospheric Models (hereafter referred to as GAMs, often corresponding to reanalysis products), e.g.32,33, or GNSS data, e.g.34, for instance. However, such a correction is often incomplete and part of the remaining, often turbulent, atmospheric delays may still correlate with topography. Attempts have been made to estimate tropospheric delays using multispectral radiometric data20; however, the acquisition of such independent data must be coincident with the SAR acquisition and over a terrain with minimal cloud cover for optimal performance, conditions rarely met. In addition, it can be shown that GAM-derived correction sometimes worsens the situation as the local estimate of the state of atmospheric variables may be incorrect32.
Our deep learning model must recognize transient deformation in InSAR time series in the presence of remaining atmospheric noise. To this end, it must distinguish the spatial and temporal statistical differences between deformation signals and atmospheric patterns. As mentioned above, the structure of atmospheric delays decorrelates for periods longer than 6 h24. Ground deformation related to transient tectonic events takes place over seconds to minutes for dynamic rupture and to weeks or months or even years for slow-slip events14,15,35,36, and remains until further deformation occurs. Therefore, the temporal signature of deformation signals is very different from that of atmospheric delays. We make use of this different temporal signature to learn appropriate filters to remove atmospheric perturbations and extract ground deformation in the InSAR time series.
Here, we build and train an autoencoding architecture to directly output the deformation signal, formulating the problem as a regression task. We rely on the following assumptions: (1) atmospheric delays are random in time, considering two successive SAR acquisitions, (2) ground deformation has a temporal coherence considering the rate at which SAR images are acquired, and (3) part of the atmospheric delay correlates with topography. We, therefore, use as inputs a time series of interferometric phase change and a map of ground elevation to produce a time series of cumulative surface displacements.
In order to separate deformation from atmospheric delays, we developed the deep learning architecture shown in Fig. 1. This architecture consists of 11 purely convolutional layers. The first six layers of the model are tasked with encoding signals that are persistent in time, by progressively removing the time dimension of the input. At the seventh layer, ground elevation (topography) is added as a secondary input. The remaining layers decode the ground deformation map. In short, we build a model tasked with reconstructing ground deformation given input InSAR time series and ground elevation from noisy input.
Initially developed for feature extraction by projecting high-dimensional data sets onto a lower-dimension manifold by forcing the reconstruction of the data through a bottleneck in deep learning architectures37, autoencoders have also evolved into powerful denoising38,39 and image enhancing techniques40,41. In this work, we exploit this aspect of deep learning autoencoding and tailor it to the problem of cleaning InSAR time series, building a deep learning autoencoder to effectively automate the design of filters in time and space to recover ground deformation.
#### Training on synthetic data
Because deep learning models require large amounts of data and there exists no ground truth for InSAR time series, we rely on synthetic data to train the deep autoencoder. The synthetic data are randomly generated cumulative surface deformation time series mimicking nine successive maps of range change. These cumulative deformation maps include surface displacements in the LOS due either to a slipping fault (either strike-slip or dip-slip) with random latitude and longitude (position in a virtual box), depth, strike angle, dip angle, and width (based on Okada’s model42) or to an inflating or deflating point source (Mogi’s model43). Deformation onset occurs at a random time as a pulse with a random duration within the time series, excluding the first and last time steps, which are taken as nondeforming references by the model (see Supplementary Fig. S1). The model is therefore tasked with finding cumulative deformation in the seven middle time steps of the time series arising from a wide variety of transient processes. We then corrupt each map of these ground deformation time series with different noise signals. At each time step, we create both turbulent and stratified synthetic atmospheric delays. Spatially correlated Gaussian noise mimics delays from atmospheric turbulence of various length scales44,45 (Fig. 1, top row) and a quadratic function of pixels’ elevation mimics the atmospheric delays that correlate with topography16,46 (also randomly generated47). Lastly, we add random pixels, in patches and isolated, to mimic incoherent pixels and unwrapping errors commonly encountered in real data. Each of the steps of the time-series results from a random realization of noise built following these assumptions.
We train two independent models with the synthetic time series of deformation, one tasked with recovering point source deformation and the other with recovering deformation on faults. All other phase delays are identified as noise. Both models are trained to map synthetic noisy time series to the synthetic cumulative displacements. We trained our deep autoencoder with 2.5 × 107 randomly generated time series for which we provide as input the apparent LOS deformation time series, corrupted by the sum of synthetic noise described above. The training includes a LOS with random orientation (30–45° incidence and any azimuth), so that the model is directly trained for various SAR satellite configurations and for any fault azimuth. The output is the target ground deformation accumulated during the time series. All 482,185 trainable parameters are adjusted during that training phase with the Adam variation of stochastic gradient descent48 (see Supplementary Fig. S2 for the training curves).
We note that our deep autoencoder only considers time series of nine time steps, as a good compromise on the input duration, such that the input time series are long enough for the model to learn the temporal differences between signal and noise. When applying our models to longer time series of n time steps, we apply the algorithm using a sliding window with a width of nine time steps and obtain n − 8 images of cumulative deformation. In this way, our model acts as a moving integral of actual deformation.
#### Performance on a synthetic data set
Once trained, we test the deep autoencoder on synthetic realizations of time series that have not been used to train the model. We randomly generate 105 time series of nine time frames using the same procedure as that described for the training phase. For each of the 105 time series, we evaluate the signal-to-noise ratio (hereafter referred to as SNR) as the ratio of signal power to noise power. We then apply the deep autoencoder to these time series in order to evaluate the performance of the model. We evaluate the resulting, cleaned time series using the structural similarity index49 (SSIM, see “Methods”), a standard denoising evaluation metric, which makes a nonlocal comparison between two images, and is bound between −1 and 1.
We find that the deep autoencoder applied to synthetic data accurately reconstructs deformation signals on faults, even in circumstances very challenging to expert interpretation (SNRs well below 1; Fig. 2). For SNRs above 20%, our algorithm provides a very accurate reconstruction, as shown by the SSIM between model output and deformation ground truth (0.7 < SSIM < 1.0). For low SNRs (10% and below), no signal can be visually observed, while the structural similarity is still correct and the overall deformation signal is recovered down to SNRs of ~0.5%, below which our model starts to fail. Supplementary Fig. S1 shows the pairwise distributions of different properties of the synthetic data as well as the SNR and performance of our model. For comparison, the performance on synthetic data of the same architecture as in Fig. 1 but trained on single time steps is shown in Supplementary Fig. S3, and the performance of a simple temporal filter is shown for comparison in the Supplementary Fig. S4. The model is trained on single patches, but interestingly performs almost as well on synthetic time series with more complex fault geometry (see Supplementary Fig. S5). We note that for point sources of deformation, the limit of our model is ~20% SNR (Supplementary Figs. S9 and S10), but that such signals are also much harder to distinguish from the noise for the eye. Therefore, our architecture allows us to exceed the ability of the expert eye to detect signals in noisy time series of deformation, provided their noise structure resembles the training set.
In the following, we show the application of our autoencoder to two case studies that have been independently analyzed by InSAR experts.
### Application to real data
#### Extracting deformation from a slow earthquake along the North Anatolian Fault, Turkey
Our deep autoencoder is trained to isolate and reconstruct cumulative ground deformation signals in 48 × 48 pixels series of nine time steps. However, a fundamental property of purely convolutional deep learning models is that the filters they learn do not depend on input size. As a result, we can create an autoencoder with exactly the same architecture as the model described in Fig. 1, but with an input size matching the number of pixels in the InSAR time series of interest. Because the parameters of the model do not depend on the input size, we can copy every parameter (i.e., weights and biases of the filters) of the model trained on synthetics to the new model, which can then be applied to InSAR data of any size.
Here, we apply the model to a time series built from images acquired by the COSMO-SkyMed constellation over the central section of the North Anatolian fault in Turkey (Fig. 3). This major plate boundary fault accommodates the motion of rotation of the Anatolia plate with respect to Eurasia and has ruptured in large, moment magnitude (Mw) 7 earthquakes multiple times over the past century50. An 80-km-long section of the fault has been slipping aseismically, at least since 1944, Mw 7.3, earthquake located near the small town of Ismetpasa51. In situ measurements based on creepmeters indicate that this fault experiences transient aseismic slip episodes52,53,54.
Rousset et al. produced an ~1-year-long time series from COSMO-SkyMed SAR acquisitions and detected a significant slow-slip episode that lasted 1 month during 2013 with a maximum of 2 cm of fault-parallel slip14. Average long-term velocity maps covering the whole region derived from InSAR data show aseismic slip over an 80-km-long section of the fault. This average relative displacement was found to result from successive transient events14,53, which were not apparent in data from older constellations of SAR satellites due to the long time span between acquisitions. In the InSAR time series processed by Rousset et al., large atmospheric delays are apparent, despite careful correction of atmospheric delays using ECMWF reanalysis products14,21. Therefore, knowledge of the fault location was key in the interpretation of the surface displacement field. We revisit the same time series in order to assess if our model is able to recover the known surface slip in real-time series of data. We stress that we do not provide the location of the fault to the model. With no human intervention and no a priori knowledge of the local tectonics and fault location, the model automatically isolates and recovers clean deformation signals where expert analysis previously found signals attributed to tectonic activity (Fig. 3). Importantly, the recovered deformation is obtained after training only on synthetic data and with no further fine-tuning on real data. Our model finds up to 1.5 cm LOS relative displacement across the fault, which we interpret as the signature of surface slip, as previously found14.
Fault-perpendicular cross-sections illustrate that even in regions where a slip would not have been convincingly identified by an expert (Fig. 4), our model recovers 2 mm of slip, extending the previous estimate of the along-strike length of this slip event. Rousset et al. identified a 5-km-long slow-slip event while the deep learning model determines that the portion that slipped was 8.5 km in length. Interestingly, the new 2 mm slow slip we find is on a segment adjacent to the previously identified 1 cm slow slip, and the two segments are separated by a kink on the fault, suggesting a potential interplay between fault geometry and slip55,56. What we presume to be the remaining noise can be seen to the north-west and to the south-east of the slow-slip event in the output of the deep denoiser (see Supplementary Fig. S8 for cross-sections). We suspect these errors may arise from errors in the elevation model that propagated in the time series.
We finally note that our current model interprets wavelengths longer than a kilometer as noise, although experts might interpret those as the signature of slip at depth. This limitation however is related to the size of pixels with respect to the size of the training samples. The same network architecture trained on larger synthetics would circumvent this limitation (at the cost of increased computation and training time). An alternative approach consists of rescaling input data (see Supplementary Fig. S7) to ensure consistency of the model output in deformation wavelength (which is the case here for the North Anatolian Fault event).
#### Extracting ground deformation signal at the Coso geothermal system, California
In a second example, we use our deep learning architecture to detect surface deformation caused by underground pressure changes. As above, our model is trained on several million examples of synthetic noisy InSAR time series. In this case, surface deformation is modeled by a point pressure source using Mogi’s equation of elastic deformation57, corrupted as before by synthetic atmospheric delays. Mogi pressure sources are used extensively for the modeling of volcanic inflation and deflation signals, e.g. refs. 58,59. Further, the combination of multiple sources allows one to model complex subsidence/uplift patterns.
After training exclusively on synthetic data, we apply our model to real data from the Coso geothermal field (California, USA), again without further training (details on the InSAR processing are in the “Methods” section). Because InSAR time series may be very noisy, even after correcting predicted atmospheric effects32, analysis of inflation or subsidence of less than a few centimeters per year in InSAR have relied to date on deriving long-term cumulative deformation60, such that random atmospheric delays cancel out. Detecting transient subsidence and uplift signals in SBAS time series below a few centimeters remains challenging, just as it does for faulting.
As with identifying deformation on faults, our model is able to disentangle actual ground deformation from atmospheric noise at short time scales, with a resolution of a few millimeters. In Fig. 5 we show the application of our deep denoising model to a time series over Coso in 2016. Contrary to what could be inferred from long-term cumulative deformation, we find that ground subsidence at Coso is primarily due to transient episodes of deformation. The cumulative deformation from these transients we detect accounts for most of the cumulative deformation observed in the data (see Supplementary Figs. S11S14 for details and for other examples of transient deformation). Interestingly, we find a number of transient events that are constituted of well-separated deflation sources, in agreement with geochemical observations showing that the geothermal field is constituted of isolated reservoirs61.
## Discussion
As the properties of the atmosphere cannot be measured at the same spatial and temporal resolution as SAR acquisitions, InSAR time series still contain large-amplitude atmospheric delays, on the order of centimeters, in spite of recent marked improvements in atmospheric correction and processing strategies23,32. For this reason, expert processing and analysis is required to interpret InSAR data. Furthermore, since the onset of the Sentinel 1 mission, the amount of available InSAR data has grown at a pace that is already challenging the ability of the community to process and analyze it, and the upcoming NISAR mission will increase the amount of available InSAR data several fold. Therefore, significant effort has been put into developing strategies to build time series with such vast data sets, e.g., refs. 13,30,62. Nonetheless automatic, autonomous InSAR interpretation methods are poised to become essential, if just to leverage the increasing spatial and temporal resolution of the data.
We note that several avenues of improvement should enhance the ability of our neural network to detect finer and finer deformation signals in the future. First, we did not include sources of noise representative of ionospheric perturbations. The total electronic content of the ionosphere introduces a differential delay in interferograms that can bias analysis further16. Although this effect is more pronounced for L-band SAR satellites16,63, long-wavelength ionosphere delays can be problematic for large images acquired with C-band SAR systems such as Sentinel 164. Although these delays can be corrected by using techniques such as the range split-spectrum method64,65, the structure of the remaining noise associated with imperfect corrections must still be evaluated and could then be used in the training of our model. Second, we considered atmospheric turbulence to be isotropic and equivalent everywhere in the image (i.e., noise is second-order stationary) while some anisotropy can be observed in the phase delay of some interferograms. However, such anisotropy depends on the scale of the image observed, which would involve complex considerations in the construction of an adequate tropospheric noise model to train our model. In general, any improvement in the forward modeling of the nature of noise in InSAR should lead to a significant improvement in the detection capability of the models. Finally, the receptive field of the autoencoder and the pixel size of the input InSAR data restrict the size of the deformation signal that can be deciphered. For instance, interseismic deformation related to loading of a fault by plate motion extends over 10 s of kilometers, e.g., refs. 11,12,66. Additional developments may be necessary for the detection and cleaning of long-wavelength deformation patterns.
The initial application of our method on InSAR time series enables the direct observation of a slow earthquake, refining previous estimates, autonomously and without prior knowledge. In particular, we expect that the ability to systematically observe fault and pressure source deformation at a global scale will further the understanding of hydrologic, volcanic, and tectonic processes, and may bring us closer to bridging the observational gap that exists for transient surface deformation.
## Methods
### Autoencoder architecture
Here, we provide additional details regarding the autoencoder architecture developed for ground deformation extraction from InSAR time series (Fig. 1). This architecture consists of 11 purely convolutional layers. The first six layers of the model are tasked with encoding signals that are persistent in time, by progressively removing the time dimension of the input. At the seventh layer, topography (a digital elevation model) is added as a secondary input, before the remaining layers decode the ground deformation map. Because our model is comprised of purely convolutional layers, it can be applied to arbitrarily sized inputs (in terms of the spatial dimension, not the time dimension because of the pooling in time).
At each layer, the input is passed through 64 different filters to form as many channels, which are simplified representations of the data. During the encoding, 3D filters (two dimensions of space and one in time) of size 3 × 3 × 2 are applied to the data, until time has been completely eliminated by max-pooling operations. During decoding, 2D filters of size 3 × 3 are applied to the data (two dimensions of space) and summed for the output layer to reconstruct the cumulative ground deformation.
For each of the 64 filters within the encoder layers, each of the input filtered channels are summed and passed through a biased leaky reLU activation function. Each layer has a number of trainable parameters given by nkernel × ninput × noutput + noutput, with nkernel the convolutional kernel size (product of its shape in all dimensions), ninput the number of input channels to the layer, and noutput the number of output channels of the layer. This procedure gives 3 × 3 × 2 × 64 × 64 + 64 trainable parameters for each encoding layer, except for the first one, which has 3 × 3 × 2 × 1 × 64 + 64 parameters, and 3 × 3 × 64 × 64 + 64 trainable parameters for each decoding layer, except for the layer where ground elevation is added as an additional channel, that has 3 × 3 × 65 × 64 + 64 trainable parameters, and except for the last decoding layer that has 3 × 3 × 64 × 1 + 1 trainable weights. This gives our deep autoencoder a total of 482,185 trainable parameters, a modest amount when compared to natural image classification networks such as AlexNet67, which has 62,378,344 trainable parameters. The last layer of our model has a linear activation instead of a leaky reLU, such that positive and negative deformations can be equally output for the final reconstruction. Final reconstruction is a single image of the cumulative deformation that occurred during the nine time steps used as input. Our model was implemented on GPUs using the keras and tensorflow python libraries.
### Evaluation metrics
To assess the performance of our model on synthetic test sets, we use the SSIM, a common denoising performance metric in image processing. This measure of resemblance between two images is nonlocal and compares intensity, luminance, and contrast of the two images in moving windows, resulting in a metric closer to perceived similarity. We use the formulation and parameters from the original paper49:
$${{{{{{{\rm{MSSIM}}}}}}}}({{{{{{{\bf{X}}}}}}}},{{{{{{{\bf{Y}}}}}}}})=\frac{1}{M}\mathop{\sum }\limits_{j=1}^{M}{{{{{{{\rm{SSIM}}}}}}}}({{{{{{{{\bf{x}}}}}}}}}_{j},{{{{{{{{\bf{y}}}}}}}}}_{j})$$
(1)
$${{{{{{{\rm{SSIM}}}}}}}}({{{{{{{\bf{x}}}}}}}},{{{{{{{\bf{y}}}}}}}})=\frac{(2{\mu }_{x}{\mu }_{y}+{C}_{1})(2{\sigma }_{xy}+{C}_{2})}{({\mu }_{x}^{2}+{\mu }_{y}^{2}+C1)({\sigma }_{x}^{2}+{\sigma }_{y}^{2}+{C}_{2})}$$
(2)
$${\mu }_{x}=\mathop{\sum }\limits_{i=1}^{N}{w}_{i}{x}_{i}$$
(3)
$${\sigma }_{x}={\left(\mathop{\sum }\limits_{i = 1}^{N}{w}_{i}{\left({x}_{i}-{\mu }_{x}\right)}^{2}\right)}^{1/2}$$
(4)
$${\sigma }_{xy}=\mathop{\sum }\limits_{i=1}^{N}{w}_{i}\left({x}_{i}-{\mu }_{x}\right)({y}_{i}-{\mu }_{y}),$$
(5)
with C1 = (0.01L)2, C2 = (0.03L)2, L the range of the pixel values, xi the pixel values of patch x of image X, and wi weights given by the unit Gaussian function with a standard deviation of 1.5 pixels. The SSIM values we report here are the average SSIM of aligned patches x and y of size 8 × 8 from the two compared images X and Y.
We use a standard definition of SNR, as the ratio of signal power to noise power:
$${{{{{{{\rm{SNR}}}}}}}}({{{{{{{\bf{X}}}}}}}})=\frac{{{{{{{{\rm{P}}}}}}}}({{{{{{{{\bf{X}}}}}}}}}_{{{{{{{{\rm{signal}}}}}}}}})}{{{{{{{{\rm{P}}}}}}}}({{{{{{{{\bf{X}}}}}}}}}_{{{{{{{{\rm{noise}}}}}}}}})}=\frac{{{{{{{{{\rm{RMS}}}}}}}}}^{2}({{{{{{{{\bf{X}}}}}}}}}_{{{{{{{{\rm{signal}}}}}}}}})}{{{{{{{{{\rm{RMS}}}}}}}}}^{2}({{{{{{{{\bf{X}}}}}}}}}_{{{{{{{{\rm{noise}}}}}}}}})}$$
(6)
$${{{{{{{\rm{RMS}}}}}}}}({{{{{{{\bf{X}}}}}}}})=\sqrt{\frac{1}{9}\frac{1}{{N}^{2}}\mathop{\sum }\limits_{t=1}^{9}\mathop{\sum }\limits_{i,j=1}^{N}{x}_{ijt}^{2}}$$
(7)
where Xsignal is a nine frames long time series of synthetic deformation (e.g., deformation on a fault patch), and Xnoise is a nine frames long time series of synthetic noise, as described in the main text.
### COSMO-SkyMed data processing over Turkey
We use the ISCE framework to combine COSMO-SkyMed acquisitions into coregistred interferograms and then filter and unwrap these interferograms14,68. After interferogram generation, we use the ERA-Interim atmospheric reanalysis to perform a first-order correction of the atmospheric phase delay21,32. Finally, we use the New Small Baseline Subset (NSBAS) method implemented in the GIAnT toolbox69 to construct a time series of phase change, e.g.12 (extended details about the processing and the data set can be found in ref. 14).
### Sentinel 1 InSAR time series over Coso
We process the Synthetic Aperture Radar (SAR) images collected along ascending track 64 of Sentinel 1A–B from October 2015 to July 2019. We build 244 unwrapped interferograms (Supplementary Fig. S15) using the ISCE package68. We coregister SAR images with a network-based enhanced spectral diversity approach70 and correct for atmospheric perturbations using ERA-5 ECMWF global reanalysis of atmospheric data21. We apply a phase-preserving filter and multilooking (i.e., averaging of adjacent pixels) so that the final pixel size is about 70 m in range and azimuth71. Potential unwrapping errors are corrected using CorPhu72. Interferograms are unwrapped using a branch-cut method73 in areas for which coherence exceeds 0.5. We subtract a best-fitting ramp (i.e., linear function in range and azimuth) to each interferogram to correct long-wavelength perturbations due to orbital errors or ionospheric content, in order to focus on local, kilometer-scale deformation. Finally, we computed the optimal time series of displacement with the NSBAS approach as it is implemented in GIAnT74. Any pixel for which one interferogram could not be unwrapped is not included in the study. This restrains the spatial coverage of our InSAR time series, but ensures maximum (and equivalent) redundancy to all pixels. | 2023-02-07 07:40:06 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5385584831237793, "perplexity": 1356.5861810856668}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-06/segments/1674764500392.45/warc/CC-MAIN-20230207071302-20230207101302-00840.warc.gz"} |
https://www.physicsforums.com/threads/using-trig-substitution-or-partial-fractions.753410/ | # Using trig substitution or partial fractions?
1. May 12, 2014
### JessicaJ283782
When would you use trig substitution vs. partial fractions? I know partial fractions is when you have a polynomial over a polynomial, but some of the problems in the trig substitution section in my book had polynomial over polynomial and used trig substitution?
2. May 12, 2014
### alan2
A good general rule is that any time you see the sum or difference of 2 squares you should think trig substitution. The sum or difference of 2 squares looks like the Pythagorean theorem so you have a right triangle. Label an angle and express all terms as trigonometric functions of that angle. There certainly are multiple methods for many integrations.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook | 2017-10-24 11:55:00 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8313368558883667, "perplexity": 573.6850269320805}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-43/segments/1508187828411.81/warc/CC-MAIN-20171024105736-20171024125736-00282.warc.gz"} |
http://www.math.psu.edu/calendars/meeting.php?id=9680 | # Meeting Details
Title: One-dimensional polynomial maps, periodic points and multipliers Center for Dynamics and Geometry Seminars Yuri Zarhin, Penn State Let $z -> g(z)$ be a polynomial degree $n$ map that has the maximal possible number of points of period $r$. Viewing the periodic points as locally defined holomorphic functions in the coefficients of $g(z)$, we discuss the rank of a map that assigns to these points the corresponding multipliers. In particular, we give a partial answer to a question of Yu.S. Ilyashenko. | 2014-11-25 20:58:43 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6824874877929688, "perplexity": 407.93520053818}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-49/segments/1416931003959.7/warc/CC-MAIN-20141125155643-00204-ip-10-235-23-156.ec2.internal.warc.gz"} |
http://tngconsultores.com/kw/mod/forum/discuss.php?d=1063&parent=1069 | ## Opiniones | Opinions | Editoriales | Editorials
### The Future of the Web Looks a Lot Like Bitcoin
The Future of the Web Looks a Lot Like Bitcoin
Illustration: Mark Montgomery
### The Future of the Web Looks a Lot Like Bitcoin
#### Forget the currency; it’s the protocol behind it that matters. It will mutate and take over everything we do (or could one day do) on the Web. You’ve been warned
By Morgen E. Peck
To most of the world, Joseph Lubin is a leading thinker in the ever-expanding realm of digital currencies. To me, he was the counterparty in my first Bitcoin exchange and a man with a knack for saying the biggest things in the most level and unassuming of tones.
It was winter of 2014 when he beckoned me to a Bitcoin conference in Miami to tell me about a new project, named Ethereum, that he and a group of like-minded Canadians had begun working on just a few months earlier. When I caught up with him, he didn’t hold back on the scope of his vision: “We will replace insurance companies. We will replace Wall Street,” he told me.
Then the list kept growing. Online movie distribution houses like Netflix and Hulu. Gaming platforms like Xbox and Sega Genesis. Messaging services like Twitter. Add to that retirement plans, currency exchanges, voting, intellectual-property managers, and trust-fund disbursers. According to Lubin, everything—really everything—we do on the Internet or via any kind of digital channel is about to undergo a radical change.
The idea he described to me is one that has since gotten a lot of attention from digital-currency enthusiasts. It is the theory that the same technology that secures transactions on the Bitcoin network—and thereby renders them transparent, nearly instantaneous, censorship-resistant, and free of the need to trust anybody—can be used to process other, more complex financial negotiations and to securely store any kind of digital information on the Internet.
Over the past year, this theory has been playing out in a very splintered, disorganized fashion. Among the applications that already exist are a distributed domain-name registry, a digital notary that requires no third-party verification, and services that manage financial contracts through decentralized escrow accounts. Some of these experiments are taking place on the Bitcoin network. Other projects, like Ethereum, have started as entirely new networks or are now piggybacking on some of the so-called altcoins—clones and the near kin of Bitcoin. Many of the ventures are now backed by substantial investments. This January, for instance, Spark Capital and the Israeli venture-capital firm Aleph funded such a Bitcoin 2.0 startup called Colu, with US 2.5 million. At meet-ups and more formal gatherings, there is a palpable feeling that the possibilities are endless and that money is only the first, and perhaps the most boring, application enabled by Bitcoin technology. ## Video As diverse as these projects are, they all seek to reverse one toxic trend, which is that we lack “true agency” on the Internet. That is to say, all of the data we create online and all of the operations we execute are handled for us by centralized servers, most of which sit in massive data centers operated by corporations and government institutions. We depend on these servers for everything. They store our e-mail for us. They send our e-mail for us. They verify our identities for websites and smartphone apps. They track our shopping carts and process our payments. Our data may nominally belong to us, but in order to access it or manipulate it, we require chaperones to shuttle us from digital room to digital room: We don’t own our data; we just visit it from time to time. Nick Szabo—whose theories on digital contracts and smart property have earned him so much respect among digital-currency devotees that he is routinely accused of having created Bitcoin—sums up the problem in a blog post: Practically all of these machines have architectures that were designed to be controlled by a single person or a hierarchy of people who know and trust each other.... they can read, alter, delete, or block any data on that computer at will.… With current web services we are fully trusting, in other words we are fully vulnerable to, the computer, or more specifically the people who have access to that computer, both insiders and hackers, to faithfully execute our orders, secure our payments, and so on. If somebody on the other end wants to ignore or falsify what you’ve instructed the web server to do, no strong security is stopping them, only fallible and expensive human institutions, which often stop at national borders. For a long time, it has felt like this is just the way it has to be. If our digital world can be reduced to a bunch of records that we update and move from place to place, then, of course, protecting those records from corruption is of vital importance. The traditional solution, in both the physical and digital worlds, is to restrict access to a group of people whom you trust. In most cases, we trust Internet services because we assume that they possess the same priorities as we do or that we have the ability to hold them accountable for their transgressions. More and more, it seems, the priorities of these institutions do not align with those of the people they serve. Remember when Facebook toggled the digital levers in its social network to run massive psychology experiments on its users? When confronted with an intractable problem, we’ve settled for the least egregious option by placing responsibility for our digital data in as few hands as possible. Because, really, the only thing sillier than trusting some central authority with our most precious digital records would be trusting a bunch of strangers with them. And yet, this is precisely what Bitcoin achieves: a public database that everyone can see, anyone can add to, and no one can destroy. Why trust Bitcoin, or more specifically, why trust the technology that makes Bitcoin possible? In short, because it assumes everybody’s a crook, yet it still gets them to follow the rules. To understand how, you need to unpack what Bitcoin really is. When people talk about the Bitcoin technology, they’re really referring to two things. The first is a universal database that records transactions and grows linearly in chunks called blocks, forming the “blockchain.” The second thing is a network of peers, called miners, which are the computers (and the people who own them) that actually add the blocks to the blockchain. Let’s look first at the blockchain itself. If you own bitcoins, that means there is a record on the blockchain that contains a numerical value (the “coins”) and one half of a digital signature. A digital signature is a kind of cryptographic puzzle that only you can solve, because only you hold the corresponding half. This is your “private key,” and if you have a Bitcoin wallet, then that’s what’s in it. When you want to spend your bitcoins, you make a request to have a new record added to the blockchain. The new record refers to the bitcoins you want to spend—meaning that it points to the previous transaction in which you acquired those coins; it proves you own them—because your half-signature solves the cryptographic puzzle, and it adds a new digital signature to the bitcoins, which can be completed only by the bitcoins’ new owner. When that owner wants to spend them, he repeats the process. So the blockchain is nothing more than a long string of transactions, each of which refers to an earlier record in the chain. But Bitcoin users do not directly make the updates to the blockchain. In order to transfer coins to someone else, you have to create a request and broadcast it over the Bitcoin peer-to-peer network. After that, it’s in the hands of the miners. They scoop up the requests and do a few checks to make sure that the signature is correct and that there are enough bitcoins to make the transaction; then they bundle the new records into a block and add it to the end of the blockchain. All miners work independently on their own version of the blockchain. When they finish a new block, they broadcast it to the rest of their peers, who check it, accept it, add it to the end of the chain, and pick up their work from this new starting point. The arrangement will work only if the miners agree on what the most recent version of the blockchain should look like. In other words, they all have to agree on a consensus version of it. But given the fact that they’re all strangers, they really have no reason to trust one another’s work. What’s to stop a miner from fiddling with earlier entries on the blockchain and undoing payments? The strategy that Satoshi Nakamoto (Bitcoin’s pseudonymous architect) devised for establishing consensus in his system is widely considered to be a breakthrough in distributed computing. “There have been consensus algorithms running since the eighties, where you come to consensus, providing a log of events on multiple machines, with all the machines participating in that network,” says Paul Snow, the founder of Factom, a service that condenses data and transfers it onto the Bitcoin blockchain. However, he says, these systems were successful only when the participants shared a common allegiance. Bitcoin replaces that allegiance with mathematical confidence. Given the cryptographic proof required to commit a transaction, we can already be confident that only people who own bitcoins can spend them. But a bitcoin miner can also be confident that the other miners are not changing entries on the blockchain, because in Bitcoin there is no going backward. That’s because the process of adding a new block to the blockchain is very difficult. Anyone who participates is required to devote large quantities of computing power—and therefore, electricity—toward running the new data through a set of calculations called hash functions. Only once this work is completed can the block be appended to the chain in a way that satisfies other miners on the network. “You’re building a giant wall,” explains Peter Kirby, the president of Factom. “And every time you want to agree to something, you put a thousand bricks on top of it. And you agree to something else and put another thousand bricks on top of it. And that makes it very, very, very difficult for someone to change a brick way down at the bottom of the wall.” Don’t believe him? Let’s try to attack the system. Say there’s a record in the Bitcoin blockchain that I want to change, and let’s say it’s contained in the 100th block of the chain. Meanwhile, the whole community of miners is already trying to solve block 110. In order to get my change accepted by the network, I would have to serve up my own alternate version of the complete blockchain. I would have to revert back to block 100, tamper with the entry I cared about, and perform the necessary calculations on it. Because all subsequent hashes are dependent on the data that I changed, I would also have to repeat the work on every following block, through to block 110. And I’d have to do all of this before any of the world’s other miners finished block 110. The rest of the miners will start to work on my alternative chain only if I can give them one that is longer than the chain they’ve already been working on. But I am only a single miner with a fraction of the computing power wielded by the network as a whole, so I can never catch up. In fact, in order to reliably pull off this bit of trickery, I would have to control more than half the entire computing power that’s being committed to the Bitcoin network at any given time. And it’s quite a network. Constantly trying to one-up each other, miners invest in machines packed with application-specific integrated circuits, or ASICs, specially designed to perform Bitcoin’s hash work. The hash rate of all the computers hooked into the Bitcoin network doubled between August 2014 and March 2015,and the numbers continue to climb. Some of these mining rigs are enormous beasts consuming 500 kilowatts and requiring cooling with newly engineered fluids. A Nakamoto blockchain, then, becomes more secure as more people participate in the network. But why would they? In the case of Bitcoin, it’s because they are paid to do it. Every time a block gets solved, a virgin transaction is created with a handful of newly minted bitcoins signed over to the first miner who completed the work. In old security models, you tried to lock out all of the greedy, dishonest people. Bitcoin, on the other hand, welcomes everyone, fully expecting them to act in their own self-interest, and then it uses their greed to secure the network. “This is, I think, the main contribution,” says Ittay Eyal, a computer scientist at Cornell who studies Bitcoin along with other decentralized networks. “Bitcoin causes an attacker to be better off by playing along than by attacking it. The incentive system leads a lot of people to contribute resources toward the welfare of the system.” When a Nakamoto blockchain is used to store a record of value, we know what we get. It’s called Bitcoin. And when Nakamoto first put Bitcoin online in 2009, the blockchain was nothing more than a string of transactions. But it didn’t take long for people to realize that a transaction could also function as a vehicle for incorporating nonfinancial data into the blockchain. Last year, after much debate in the community, the developers who steward the Bitcoin protocol (which is open source) added a new feature that allows users to tack 40 bytes of metadata onto every transaction. The Bitcoin blockchain is now littered with all kinds of nonfinancial messages. Valentine’s Day greetings, prayers and eulogies, excerpts from the WikiLeaks Cablegate files, a hash of the complete text of a recently published book about Bitcoin, and of course, the original white paper that describes Bitcoin. All of these live in the blockchain, embedded into transactions. Once metadata gets incorporated into a Nakamoto blockchain, it enjoys all the benefits of the peer-to-peer network that curates it. The entries are accessible to anyone on earth who has a computer and an Internet connection. In order to destroy them, you would have to access every computer on the network (and someday, perhaps, even a constellation of satellites). They are impossible to change, and thus impossible to censor. And they carry with them both a time stamp and cryptographic proof of who created them. So what can you do with a Nakamoto blockchain? The most simple applications, the ones we are likely to see in the near future, will make use of them as basic storage systems that take advantage of the unique properties of the network. People who are interested in transparency and access are looking at the blockchain as a possible place to organize government records and to include the public in the legislative process, by giving people a forum for publishing, debating, and voting on new proposals. Because the blockchain gives each entry a rough time stamp, it can also be used as a decentralized notary. Imagine, for example, taking a picture of a dent in your rental car and loading it into a Bitcoin transaction. By looking at what block the transaction went into, you could later prove that the dent existed before you left the parking lot. Because Bitcoin transactions are secured by strong cryptography, the blockchain can also replace our standard user name–and–password strategy for identity verification. In such a system, a Bitcoin address could be tagged with a user name, while the private key would stand in as a password. Anyone could then ask you to prove your identity by using your private key to solve the same cryptographic puzzle that you would normally solve when making a Bitcoin transaction. Nakamoto blockchains also solve the problem of censorship. Once inserted into the chain, metadata cannot be removed. Developers have used this crucial feature to build a new censorship-resistant version of Twitter (called Twister), and a decentralized domain-name registry (Namecoin). “Everything that we own, everything that we do, is governed by these big piles of records,” says Factom’s Kirby. “A bank is just a big stack of records. An insurance company is just a big stack of records. An economy is basically just a big stack of records. And if you can take this concept of…a giant global accounting ledger and say, ‘Now we can organize all the records in the world this way,’ well, it turns out that’s really exciting.” So far, these are all examples of ways that a Nakamoto blockchain could be used to change how we store data on the Internet. But storage is the very tip of the iceberg. After all, Bitcoin is not just a transaction ledger. It also brings with it a global army of miners who together function as a distributed virtual machine. Today, their role in the network is very straightforward. After a miner collects a bundle of transaction requests, it runs each through a validation program. The operation is simple—just about as simple as you can get. It confirms that you are who you say you are and that you’ve got enough bitcoins to make your transaction. And then your transaction is either accepted or rejected. What if, in your request, you could ask the miners to do more than this? What if you could say, for example, “Do not validate this transaction until I’m dead.” Or “When you do validate this transaction, adjust the amount that I’m sending based on the current price of Tesla Motors stock.” In the first example, we have the beginnings of a will that disburses money to your heirs autonomously, without the need for a lawyer. In the second example, we’ve started to build a decentralized stock market. Both examples are egregiously oversimplified and create many more problems to solve, but they serve to demonstrate a point, which is that the computations miners perform could evolve to be much more exotic than they are today. This is the fundamental idea behind the term “smart contracts,” in which miners take a role in enforcing the terms of a financial agreement. Blow the idea out as far as it can go and you can imagine fully autonomous corporations that link financial transactions to smart devices with contracts negotiated on the blockchain. Right now, Bitcoin has limits on how fancy these contracts can get. It uses a minimalist programming language that restricts the kinds of operations that miners can run. But the developers are constantly debating whether to add new functionality to the protocol. Some added complexity will be necessary if Bitcoin is to evolve beyond being a static ledger. In recognition of this, the developers added a new feature in 2012 called a multisignature transaction. It lets users divide ownership of a Bitcoin address among many people by assigning it multiple private keys. Since then, many companies have emerged that are specifically offering escrow services based on multisignature transactions. However, changes to Bitcoin’s open-source protocol inevitably take time. In order to ensure that everyone in the Bitcoin network is playing by the same rules, it’s necessary to craft updates in a way that satisfies all parties, a process that can be grinding, to say the least. Some say this puts a limit on Bitcoin’s ability to evolve. “There are now five major constituencies in the consensus mechanism: developers, miners, merchants, users, and service providers (Web wallets). Consensus actually requires all five in order to achieve major protocol changes,” says Andreas Antonopoulos, author of the user’s guide, Mastering Bitcoin. “We may be nearing the end of the era in which radical alterations were possible. The window for major changes is narrowing,” Recently, programmers quite high up in the Bitcoin chain of command have devised a possible solution. Adam Back, the cryptographer who invented the hash-based proof-of-work function that is central to Bitcoin’s security, has long been encouraging the adoption of parallel blockchains, called sidechains. These would function as little cubicles of innovation in the Bitcoin ecosystem. The idea is that you could freeze your coins on the main Bitcoin blockchain in a way that would make them unspendable and then transfer their value to another parallel blockchain that communicates with the main chain, recognizes the exchange, but operates by its own set of rules. The process would also be reversible. With sidechains, developers would be free to construct exotic transactions platforms. And bitcoin owners would be free to play in these new, experimental spaces without completely leaving the Bitcoin ecosystem. This month, Blockstream, a company that Back cofounded with 10 other Bitcoin heavyweights, released an open-source implementation of the sidechain concept called Sidechain Elements. Ethereum isn’t waiting for the Bitcoin blockchain to catch up to its ambitions. It is a project, built off an entirely new blockchain, that seeks to turn the mining network into a fully operating distributed computer. Rather than giving miners a few new commands to execute while validating transactions, Ethereum enables miners to run any piece of software they want. The sky is the limit, which means that miners could run software that has nothing to do with verifying the transactions themselves. On the date this article was published, Ethereum existed only as a limited-access test version, and there have been many postponements of a formal launch. But, theoretically, when Ethereum does go live, you will be able to use it as a platform to build and interact with any kind of application, replacing the Internet’s patchwork of servers with a single shared virtual machine. The ultimate vision is almost delusional in its grandeur: “We’re building a new kind of Internet,” says Lubin. “For Ethereum, because every node has a computationally complete virtual machine, a developer can basically load up a transaction with computer code...and inject that transaction into the network,” he says. “The system then recognizes it and installs that code...on every node on the network. In a second or a few seconds, your application is deployed instantly across the whole world.” Interacting with applications would then just be a matter of sending ethers (the equivalent of bitcoins in Ethereum) to the network and requesting access to the software on the blockchain. Funding for the Ethereum project has been fantastically successful. The Ethereum Foundation, which is a nonprofit organization registered in Switzerland, chose to raise funds by selling ethers in an open sale. Unlike Bitcoin, the Ethereum Network was designed to create a bunch of ether coins before the network was opened to the public, in a process called a “premine.” For 42 days last summer, the foundation sold a fraction of its reserves, exclusively in exchange for bitcoins. The sale brought in 31,529 bitcoins (worth over US18 million at the time, but worth less than half that amount now). This quasi-crowdfunding experiment succeeded not only in raising the money to go forward but also had the benefit of equipping software developers outside the core Ethereum team with the ethers they need in order to build applications on the blockchain.
During the last couple of months, developers have been showing off the early versions of their projects at Ethereum meet-ups around the world. At a session this March in New York City, one developer, Connor Keenan, demonstrated an application that performs all the essential functions of a Web content forum like Reddit. Code for the program is now written into a software object called a contract on a test version of the Ethereum blockchain. In order to use the program, you would create and broadcast a new transaction into the network (spending minuscule amounts of ether to the ether address of that contract. The Ethereum miners would then run local copies of that program on their mining computers, enabling you to add posts and comments, and so forth. Another presenter unveiled a rudimentary video game.
You could similarly imagine programs that accepted transactions to stream movies, negotiate complex financial agreements, or set up a kind of decentralized corporation.
Take a car rental agency, for example. Instead of going to a kiosk and talking to a human being who swipes your credit card and gives you your keys, you would send a transaction through Ethereum, which would establish a contract between you and the rental agency. That payment would also be the code that activated a smart card (or an iPhone application or whatever is standing in as a key in the future) to start your car. Other software in the blockchain would monitor the number of miles you drove and would figure that into your payment, and the revenue would then automatically be disbursed to the owners of the company. Those in the Bitcoin camp respond that this kind of model is unnecessary and perhaps even a recipe for disaster. “I’m pretty pessimistic about the more complex ideas—distributed autonomous corporations that operate independently and somehow magically manage to keep themselves secure,” says Gavin Andresen, one of the developers who works on the core Bitcoin protocol. “Maybe eventually, when we have self-driving cars and robot inspectors, then you can start getting to, ‘All right, maybe we can have a completely independent company that’s ruled by code and there are no people involved.’ Maybe then we need supercomplicated contracts on the blockchain. But I do think it’ll be a long time before we’re there.”
If we are to get there at all, argues Lubin, it probably won’t be through Bitcoin. “It is a narrow protocol. It does one thing, and it does that very well,” he says. “You probably could build everything that you could build on Ethereum [with Bitcoin]. And it would probably take you 10 to 100 times longer to develop it. In Ethereum it all happens at the application level. It turns everything on the application level into software that millions of people know how to write, as opposed to complicated fiddling with cryptographic primitives.”
It’s quite incredible that, only six years after Bitcoin was created, there are those within the community who are ready to call it narrow. Developers in this space may quibble about what the future looks like and where the next generation of Bitcoin applications will emerge, but there’s one thing they all agree on: The future will not be centralized. In this regard, at least, Bitcoiners have achieved a happy, human consensus.
4445 words | 2018-01-19 19:10:01 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.19693657755851746, "perplexity": 1492.0974535208122}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-05/segments/1516084888113.39/warc/CC-MAIN-20180119184632-20180119204632-00668.warc.gz"} |
https://plainmath.net/84748/if-r-x-show-that-le-int-int | # If R=[0,1]x [0,1], show that 0le int int_R sin(x+y)dA le 1
If R=[0,1]x [0,1], show that $0\le \int {\int }_{R}\mathrm{sin}\left(x+y\right)dA\le 1$
You can still ask an expert for help
• Questions are typically answered in as fast as 30 minutes
Solve your problem for the price of one coffee
• Math expert for every subject
• Pay only if we can solve it
phravincegrln2
If R = [0, 1] x [0, 1], show that $0\le \int {\int }_{R}\mathrm{sin}\left(x+y\right)dA\le 1$
the region $R=\left(\left(x,y\right)|0\le x\le 1,0\le y\le 1\right)$
therefore the integral becomes.
${\int }_{0}^{1}{\int }_{0}^{1}\mathrm{sin}\left(x+y\right)dxdy$
$={\int }_{0}^{1}\left[-\mathrm{cos}\left(x+y\right){\right]}_{0}^{1}dy$
$=-{\int }_{0}^{1}\left[\mathrm{cos}\left(1+y\right)-\mathrm{cos}\left(y\right)\right]dy$
$=-\left[\mathrm{sin}\left(1+y\right)-\mathrm{sin}\left(y\right){\right]}_{0}^{1}$
$=-\left[\left(\mathrm{sin}2-\mathrm{sin}1\right)-\left(\mathrm{sin}1-\mathrm{sin}0\right)\right]$
$=2\mathrm{sin}1-\mathrm{sin}2\cong 0.774$
$0\le 0.774\le 1$ | 2022-08-20 06:29:29 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 46, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7973873615264893, "perplexity": 4851.570506234212}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-33/segments/1659882573908.30/warc/CC-MAIN-20220820043108-20220820073108-00677.warc.gz"} |
https://www.physicsforums.com/threads/direct-sum-complement-is-unique.709257/ | # Direct sum complement is unique
1. Sep 7, 2013
### Bipolarity
I'm curious about whether a statement I conjecture about direct sums is true.
Suppose that $V$ is a finite-dimensional vector space and $W$,$W_{1}$,$W_{2}$ are subspaces of $V$. Let $V = W_{1} \bigoplus W$ and $V = W_{2} \bigoplus W$.
Then is it the case that $W_{1} = W_{2}$?
I merely need to know whether this is true or not so that I can know which direction to steer my proof. I am guessing it is true, but am having trouble proving it, and that is giving me doubts as to whether or not it is true.
All help is appreciated! Thanks!
BiP
2. Sep 8, 2013
### Staff: Mentor
V=R2
W={(x,0)}, W1={(x,x)}, W2={(x,-x)}
3. Sep 8, 2013
### economicsnerd
In the category of vector spaces: no, as mfb showed.
In the category of inner-product spaces: yes. In this case, we say $V=W_i\oplus W$ if $V=W_i+W$ and $W_i, W$ are orthogonal.
Last edited: Sep 8, 2013
4. Sep 8, 2013
### Bipolarity
Thanks a lot guys! No wonder my proof has not been working out!
How might I prove that orthogonal complements are unique?
BiP
Last edited: Sep 8, 2013
5. Sep 8, 2013
### economicsnerd
Suppose $V=W_1+ W$ and $W_1 \perp W$. Let $W_2 = \{v\in V: \enspace v\perp W\}$.
By construction, $W_2 \supseteq W_1$. Try to show that $W_1, W_2$ have the same (finite) dimension... hint: dimension theorem. Then use that no finite-dimensional vector space has a proper subspace of the same dimension. | 2018-02-20 18:32:50 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7648220062255859, "perplexity": 694.6345544248371}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-09/segments/1518891813059.39/warc/CC-MAIN-20180220165417-20180220185417-00400.warc.gz"} |
https://www.r-bloggers.com/adding-percentiles-to-pdq/ | Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Pretty Damn Quick (PDQ) performs a mean value analysis of queueing network models: mean values in; mean values out. By mean, I mean statistical mean or average. Mean input values include such queueing metrics as service times and arrival rates. These could be sample means. Mean output values include such queueing metrics as waiting time and queue length. These are computed means based on a known distribution. I’ll say more about exactly what distribution, shortly. Sometimes you might also want to report measures of dispersion about those mean values, e.g., the 90th or 95th percentiles.
### Percentile Rules of Thumb
In The Practical Performance Analyst (1998, 2000) and Analyzing Computer System Performance with Perl::PDQ (2011), I offer the following Guerrilla rules of thumb for percentiles, based on a mean residence time R:
• 80th percentile: p80 ≃ 5R/3
• 90th percentile: p90 ≃ 7R/3
• 95th percentile: p95 ≃ 9R/3
I could also add the 50th percentile or median: p50 ≃ 2R/3, which I hadn’t thought of until I was putting this blog post together.
### Example: Cellphone TTFF
As an example of how the above rules of thumb might be applied, an article in GPS World discusses how to calculate the time-to-first-fix or TTFF for cellphones.
It can be shown that the distribution of the acquisition time of a satellite, at a given starting time, can be approximated by an exponential distribution. This distribution explains the non-linearity of the relationship between the TTFF and the probability of fix. In our example, the 50-percent probability of fix was about 1.2 seconds. Moving the requirement to 90 percent made it about 2 seconds, and 95 percent about 2.5 seconds.
In other words:
• 50th percentile: p50 = 1.2 seconds
• 90th percentile: p90 = 2.0 seconds
• 95th percentile: p95 = 2.5 seconds
I can assess these values Guerrilla-style by applying the above rules of thumb using the R language:
pTTFF <- function(R) { return(c(2*R/3, 5*R/3, 7*R/3, 9*R/3))}# Set R = 1 to check rules of thumb:> pTTFF(1)[1] 0.6666667 1.6666667 2.3333333 3.0000000# Now choose R = 0.83333 (maybe from 1/1.2 ???) for cellphone case:> pTTFF(0.8333)[1] 0.5555333 1.3888333 1.9443667 2.4999000
Something is out of whack! The p90 and p95 values agree, well enough, but p50 does not. It could be a misprint in the article, my choice for the R parameter might be wrong, etc. Whatever the source of the discrepancy, it has to be explained and ultimately resolved. That’s why being able to go Guerrilla is important. Even having wrong expectations is better than having no expectations.
### Quantiles in R
The Guerrilla rules of thumb follow from the assumption that the underlying statistics are exponentially distributed. The exponential PDF and corresponding exponential CDF are shown in Fig. 1, where the mean value, R = 1 (red line), is chosen for convenience.
Figure 1. PDF and CDF of the exponential distribution
The CDF gives the probabilities and therefore is bounded between 0 and 1 on the y-axis. The corresponding percentiles can be read off directly from the appropriate horizontal dashed line and its corresponding vertical arrow. The exact values can be determined using the qexp function in the R language.
> qexp(c(0.50, 0.80, 0.90, 0.95))[1] 0.6931472 1.6094379 2.3025851 2.9957323
which can be compared with the locations on the x-axis in Fig. 1 where the arrowheads are pointing.
### Example: PDQ with Exact Percentiles
The rules of thumb and the exponential assumption are certainly valid for M/M/1 queues in any PDQ model. However, rather than clutter up the standard PDQ Report with all these percentiles, it is preferable to select the PDQ output metrics of interest and add their corresponding percentiles in a custom format. For example:
library(pdq)arrivalRate <- 8.8serviceTime <- 1/10Init("M/M/1 queue") # initialize PDQCreateOpen("Calls", arrivalRate) # open networkCreateNode("Switch", CEN, FCFS) # single server in FIFO orderSetDemand("Switch", "Calls", serviceTime)Solve(CANON) # Solve the model#Report()pdqR <- GetResidenceTime("Switch", "Calls", TRANS)cat(sprintf("Mean R: %2.4f seconds\n", pdqR))cat(sprintf("p50 R: %2.4f seconds\n", qexp(p=0.50,rate=1/pdqR)))cat(sprintf("p80 R: %2.4f seconds\n", qexp(p=0.80,rate=1/pdqR)))cat(sprintf("p90 R: %2.4f seconds\n", qexp(p=0.90,rate=1/pdqR)))cat(sprintf("p95 R: %2.4f seconds\n", qexp(p=0.95,rate=1/pdqR)))
which computes the following PDQ outputs:
Mean R: 0.8333 secondsp50 R: 0.5776 secondsp80 R: 1.3412 secondsp90 R: 1.9188 secondsp95 R: 2.4964 seconds
The same approach can be extended to multi-server queues defined through the PDQ function CreateMultiNode(), but qexp has to be replaced by: \begin{equation*} p_{m}(q) = \dfrac{R}{m(1-\rho)} \log \bigg[ \dfrac{C(m,m\rho)}{1-q} \bigg] \end{equation*} where $C$ is the Erlang C-function, $\rho$ is the per-server utilization and $q$ is the desired quantile. If enough interest is expressed, I can add such a function to a future release of PDQ. I’ll say more in the upcoming Guerrilla data analysis class. | 2020-07-06 16:29:12 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6170394420623779, "perplexity": 2884.396516847347}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-29/segments/1593655881763.20/warc/CC-MAIN-20200706160424-20200706190424-00162.warc.gz"} |
http://mathhelpforum.com/calculus/108797-please-help-me-integration-using-partial-fraction-method.html | Can you help me with this..... using partial fraction method
integration of:
x^3 +4x^2 -6x / x^2 -2x+1
I used polynomial division and obtained..
(x+6) + (5x-6)/(x^2-2x +1)
is this right?? and.. can you give me solution with explanation pls..
Thank you so much
2. Your long division is correct.
Now you can easily integrate (x+6) by itself.
As for the remainder, consider that (a+b)/(c) = a/c + b/c
and that x^2 - 2x + 1 = (x-1)^2
3. $\frac{5x-6}{(x-1)^2} = \frac{A}{x-1} + \frac{B}{(x-1)^2}$
$5x-6 = A(x-1) + B$
let $x = 1$ ...
$-1 = B$
let $x = 0$ ...
$-6 = -A - 1$
$A = 5$
$\frac{5x-6}{(x-1)^2} = \frac{5}{x-1} - \frac{1}{(x-1)^2}
$ | 2014-07-31 17:56:07 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 8, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8704215884208679, "perplexity": 6228.157678348371}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-23/segments/1406510273513.48/warc/CC-MAIN-20140728011753-00393-ip-10-146-231-18.ec2.internal.warc.gz"} |
https://codegolf.stackexchange.com/questions/68591/conjugate-in-the-spanish-imperfect-conjugue-en-el-imperfecto-de-indicativo | # Conjugate in the Spanish imperfect / Conjugue en el imperfecto de indicativo
Given an input of a Spanish verb in its infinitive form, output the verb conjugated in all 6 forms of the indicative imperfect.
To conjugate an infinitive in the imperfect, remove the infinitive ending (-ar, -er, -ir, and sometimes -ír) and add the imperfect endings listed below. There are three irregular verbs in the imperfect, also listed below.
Verb ending Replace with...
--------------------------------------------------------
-ar -aba, -abas, -aba, -ábamos, -abais, -aban
-er, -ir, -ír -ía, -ías, -ía, -íamos, -íais, -ían
Irreg. verb Conjugations
--------------------------------------------------------
ser era, eras, era, éramos, erais, eran
ver veía, veías, veía, veíamos, veíais, veían
ir iba, ibas, iba, íbamos, ibais, iban
For the purposes of this challenge, use capital letters instead of accented letters (á becomes A, é becomes E, and í becomes I). This is only because accented letters are 2 bytes in UTF-8, but they can be different in other encodings, and I'd rather not have to deal with any of that and stay within printable ASCII instead.
Infinitive verbs will always be three or more characters long with the sole exception of the verb ir, will never contain accented letters with the exception of verbs that end in -ír, and will always end in either -ar, -er, -ir, or -ír. Reflexive verbs do not need to be handled.
Output may be in either the form of a whitespace-/comma-separated string (so printing each conjugation to STDOUT on its own line is okay) or an array/list/etc.
Since this is , the shortest code in bytes wins.
Test cases:
In Out
---------------------------------------------------------------
hablar hablaba hablabas hablaba hablAbamos hablabais hablaban
comer comIa comIas comIa comIamos comIais comIan
vivir vivIa vivIas vivIa vivIamos vivIais vivIan
sonreIr sonreIa sonreIas sonreIa sonreIamos sonreIais sonreIan
ser era eras era Eramos erais eran
ver veIa veIas veIa veIamos veIais veIan
ir iba ibas iba Ibamos ibais iban
• So many exceptions.. :P Jan 5 '16 at 4:44
• @ZachGates See, you say that, but you haven't seen anything until you've seen preterite. Imperfect is one of the tenses with the least exceptions. Jan 5 '16 at 4:50
• I've taken Spanish 1-3, hehe. 0/10 would not recommend @FlagAsSpam Jan 5 '16 at 4:52
• @ZachGates Me too. :c Jan 5 '16 at 4:53
## Retina, 100 82 bytes
\B[^a]r$I r$
b
^vI$veI ^sI$
er
$a$
$_s$_ $_mos$_is $_n TlL.(?=[^I]amos ) Try it online. Unfortunately, due to the use of $_ it's not possible to modify the code to run all tests at once, so you'll have to copy in the individual verbs. I'm working on a new feature that will make this possible though.
### Explanation
\B[^a]r$I We start by turning all endings which aren't ar into I, provided the input isn't the irregular verb ir. That takes care of the -er, -ir, -ír conjugations, messes up the irregular verbs ser and ver (but shortens them in the process), and leaves only ir and -ar with a trailing r. r$
b
If the word still ends in r, we replace that with a b. We've now covered all standard conjugations as well as the irregular verb ir.
^vI$veI This fixes the irregular verb ver which has been turned into vI in the first stage. ^sI$
er
This fixes the irregular verb ser which has been turned into sI in the first stage. Now we've modified all possible stems correctly. All that's left to do is append all the possible endings, and then fix the accent for the first person plural in some cases.
$a First we append an a to the stem, because that's always part of all endings. $
$_s$_ $_mos$_is $_n This makes use of the rarely seen $_ which inserts the entire string into the substitution (regardless of what was matched). This is actually very useful when duplicating strings, as are $ and $', which are also quite underappreciated.
hablaba
hablabas
hablaba
hablAbamos
hablabais
hablaban
$./mw test.mwg -i "ver" veIa veIas veIa veIamos veIais veIan # Ruby, 151 149 Normally, I'll choose a newline over a semicolon where possible in the interests of readability, but as there are no semicolons, this is a one liner. ->n{%w{a as a amos ais an}.map{|z|['3r','veI','1b',n[0..-3]+(n[-2]==?a?'@b':?I)][("ser ver ir "+n).index(n)/4].tr('31@',['eia','EIA'][z.size/4])+z}} A feature is the use of placeholders 31@ for the accented vowels which depend on the amos endings. Thus the correct stem is formed, and then the placeholder is substituted for one of eia or EIA as appropriate There a few uses of negative array indexes in here. Thus n[-2] refers to the second to last character of the input, and n[0..-3] refers to the input with the last 2 characters removed (the infinitive stem). Ungolfed in test program f=->n{ %w{a as a amos ais an}.map{|z| #iterate through each verb ending ['3r','veI','1b', #array index 0,1,2 formats for irregular stems (note numbers 1 and 3 used as placeholders) n[0..-3]+(n[-2]==?a?'@b':?I)][ #array index 3 format for regular stems, AR->@b or ER/IR->I depending if A found at index -2 (@ used as placeholder) ("ser ver ir "+n).index(n)/4] #find index of input verb n in "ser ver ir "+n, divide by 4 to obtain 0,1,2,3 above .tr('31@',['eia','EIA'][z.size/4])+ #if z is 4 characters long (AMOS) replace 3,1,@ with uppercase E,I,A. Otherwise with lowercase e,i,a z #add the verb ending to the stem } } n=gets.chop puts f[n] # Lexurgy, 153 bytes i: ser=>era ver=>veIa ir=>iba ([]+)$1 {a,{e,i,I}} r=>$1 {ab,I} a c: ([]+)$1=>$1 $1 s $1 $1 mos $1 is $1 n
j:
i=>I/ _ bam
e=>E/ _ ram
Ungolfed explained:
# turn the irregulars into their roots
irreg:
ser=>era
ver=>veIa
ir=>iba
# do the same for everything else
roots:
([]+)$1 {a,{e,i,I}} r=>$1 {ab,I} a
# tack on the same endings
conjugate:
([]+)$1=>$1 $1 s $1 $1 mos $1 is \$1 n
# fix the irregulars
irreg2:
i=>I/ _ bam
e=>E/ _ ram
` | 2022-01-22 21:06:20 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4390903115272522, "perplexity": 13801.046493701038}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-05/segments/1642320303884.44/warc/CC-MAIN-20220122194730-20220122224730-00378.warc.gz"} |
http://mathematica.stackexchange.com/questions/40740/law-of-cosines-to-determine-angle-change-along-spiral | The Spiral
I'm trying to place circles along the outside of an Archimedean spiral. Shown below:
ParametricPlot[{θ/(2*π)*Cos[θ], θ/(2*π)*Sin[θ]}, {θ, 0, 6π}, PlotStyle -> Red]
The Circles
To do this effectively I have been trying to use the Law of Cosines to determine the change in the angle. I found the path that would contain the circle centers:
f[θ_] := {((π+θ) Cos[θ])/(2π), ((π+θ) Sin[θ])/(2π)}
Using the Law of Cosines for the following:
Seems pretty straight forward, right? Well, when I went to solve for the angle alpha Mathematica seems to have trouble.
seems to work "fine", but any subsequent evaluations don't seem to go smoothly. In fact, any evaluation that does not contain Pi seems to fail, and an evaluation of the distance between the points shows that the angle is off (!=1).
The Question
What am I doing wrong to be more than 5% off from what I expect. Also, is there a more efficient and correct method to solve for the angle?
An End Product
Thanks to KennyColnago for his response.
-
is this in anyway related to this? ;o) – Öskå Jan 22 '14 at 11:32
Could you provide the whole code generating the "end product" please? :) – Öskå Jan 22 '14 at 11:52
@Öskå Yes, that is precisely what it is related to. The code is quite boring with the exception of the code that KennyColnago helped me with. I just generated a table where each part was {Color,Disk} counting up to 1000, and pulling a number off the value of Pi. – MRN16 Jan 23 '14 at 2:07
I also tried to do it as well but failed beautifully.., maybe you can paste it to pastebin? – Öskå Jan 23 '14 at 3:07
pastebin.com/qDsMe3J8 – MRN16 Jan 23 '14 at 3:30
The expression I get for the angle angle increment $d$ is
(d^2 + 2d (Pi + t) + 2(Pi + t)^2 - 2(Pi + t)(d + Pi + t) Cos[d])/(4 Pi^2) = c^2
For your problem, $c=1$ and $t$ is the start angle of Pi/2. Solve the transcendental equation for d using
FindRoot[(d^2 + 2d (Pi + t) + 2(Pi + t)^2 - 2(Pi + t)(d + Pi + t) Cos[d])/(4 Pi^2) == 1
/. {t->Pi/2}, {d,1.0}]
The answer is d=1.241radians. The second circle centre on your blue line is therefore atf[Pi/2+1.241]={-0.896,0.307}. The next angle increment isd=1.0054, found by solving witht->Pi/2+1.241.
However, you seem to be assuming that circles of radius 1/2 with centres on the blue curve are tangent to the red spiral. Not so. The circles touch the spiral function along a radial line from the origin, but they are not tangent to, or bounded by, the spiral.
Edit
I like your design! How about less random colourings, as in
Graphics[Map[{ColorData["DarkRainbow",Mod[#,Pi]/5 + Norm[CircleCentres[#]]^1.7/190],
Disk[CircleCentres[#],0.5]}&, NestList[NextAngle[#]&, Pi/2, 800]]]
whereCircleCentres[angle]is yourf[theta], andNextAngledoes aNestListof theFindRootresult.
-
The placement on the outside of the spiral is approximate, but becomes quite good after the first few turns. Towards the center the approximation does break down though, I'm avoiding a lot of problems by starting at Pi/2, but I understand that the average distance between the one loop and the +2Pi loop does not equate to being tangential or, by necessity, bounded by the spiral. – MRN16 Jan 20 '14 at 3:21
It works though and far more efficiently than I was expecting from what I was working with earlier. – MRN16 Jan 20 '14 at 3:38 | 2015-01-29 16:22:53 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7586551904678345, "perplexity": 1394.933707609627}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-06/segments/1422115859923.61/warc/CC-MAIN-20150124161059-00126-ip-10-180-212-252.ec2.internal.warc.gz"} |
https://docs.bareos.org/DocumentationStyleGuide/BareosSpecificFormatting/BareosConfiguration.html | # Bareos Configuration¶
## Bareos Configuration Resource¶
To display a Bareos specific resource configuration file, use a code block:
.. code-block:: bareosconfig
:caption: bareos-sd.d/device/FileStorage.conf
Device {
Name = FileStorage
...
Archive Device = /var/lib/bareos/storage
...
}
which will be displayed as
bareos-sd.d/device/FileStorage.conf
Device {
Name = FileStorage
...
Archive Device = /var/lib/bareos/storage
...
}
The caption shows the relevant path where to expect the configuration resource:
1. <daemon>.d/ (bareos-dir.d, bareos-sd.d, bareos-fd.d, …)
2. <resource type>/
3. <resource name>.conf
The prefix path is not shown, as it is platform specific.
The directives should be written like shown in the documenation, meaning a seperate words (‘’Archive Device’’ instead if ‘’ArchiveDevice’’ or ‘’archrivedevice’’).
Use ... to indicate left out directives not relevant for the example.
Note
Remember to start each code-block line by 3 indenting spaces. However, the code itself is indented by the rules of the resource (2 spaces for Bareos configuration resources).
If the content is a seperate file, use
.. literalinclude:: /include/config/bareos-sd.d/device/FileStorage.conf
:language: bareosconfig
:caption: bareos-dir.d/job/consolidate.conf
All configuration snippets should be located in the /include/config/ subdirectory of the documentation.
Normally, these snippets contain a complete Bareos configuration resource.
## Resource Type¶
If you want to display a resource type, the following formatting should be used:
If you want to display the name of a specific resource, the following formatting should be used:
:config:option:dir/job
This will get displayed as
## Resource Name¶
If you want to display the name of a specific resource, the following formatting should be used:
:config:option:dir/job = backup-client1
This will get displayed as
## Resource Directive¶
### Resource Directive Definition¶
The documentation outline for resource directives is autogenerated (by https://github.com/bareos/bareos/blob/master/docs/manuals/scripts/generate-resource-descriptions.py) and stored into the https://github.com/bareos/bareos/tree/master/docs/manuals/source/include/autogenerated/ directory.
Internally, they can be referenced by the :config:option: directive. From extern, the URL to access them is
• .../Configuration/Director.html#config-Dir_Job_AlwaysIncrementalJobRetention
• .../Configuration/FileDaemon.html#config-Fd_Client_AllowBandwidthBursting
While the automatically generated may contain a short description (if available in the source code), the description can be extended by creating of modifying the corresponding file in the manually_added_config_directive_descriptions/ subdirectory.
• manually_added_config_directive_descriptions/dir-job-AlwaysIncrementalJobRetention.rst.inc
• manually_added_config_directive_descriptions/fd-client-AllowBandwidthBursting.rst.inc
### Reference to a Resource Directive¶
If you want to display a resource directive, the following formatting should be used:
:config:option:dir/job/AlwaysIncrementalJobRetention
This will get displayed as
The signature must be given as:
<dir|sd|fd|console>/<resourcetype_lower_case>/<DirectiveInCamelCase>
For example:
dir/job/AlwaysIncrementalJobRetention
Note
If the reference to a Resource Directive does not match a Resource Directive Definition, the displayed text will look the same, but there will be no hyperlink behind it.
Unfortenatly, if this is the case (the reference is wrong (e.g. because of a typo)) there will be no hint about this during Sphinx build.
### Resource Directive With Value¶
If you want to display a resource directive along with its value, the following formatting should be used:
:config:option:dir/job/AlwaysIncrementalJobRetention = 900
This will get displayed as | 2022-01-28 00:25:46 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5790908336639404, "perplexity": 8639.745686505996}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-05/segments/1642320305317.17/warc/CC-MAIN-20220127223432-20220128013432-00369.warc.gz"} |
https://raspberrypi.stackexchange.com/questions/79070/reading-and-writing-with-smbus-package | Reading and writing with smbus package
I am trying to read/update I2C address of a device. However, in order to do that during the communication state of pin LDAC has to be changed, as shown in the manual:
Is that possible to do with smbus package? I would look for the answer myself, but I couldn't find any instructions.
EDIT:
The problem is finally solved. You can find the library with read/update I2C address for MCP4728 on http://www.pinteric.com/raspberry.html#dac
The python smbus package uses the Linux kernel I²C driver to do I²C transfers. That driver provides a high level of abstraction and controls a whole I²C transfer of an arbitrary list of writes and reads to one or multiple I²C devices. It even controls I²C muxes automatically.
It's very simple to use, fire and forget, and you are informed as soon there is a result, but the downfall is you cannot control individual bytes within the transfer. It also doesn't provide hooks for additional magic.
So the answer to your question is to forget about the python smbus package for this single special case and bitbang I²C and your special -LDAC signal — create the necessary high-low/low-high sequences on three arbitrary GPIOs by hand. You can do this e.g. with Joan's pigpio python library.
Please note I²C is an Open Drain communication bus. Both the SDA and SCL signal can be pulled to GND by both the host and the devices. To avoid short circuits between +3.3V on the host GPIO and GND in a device GPIO, you have to configure the host GPIOs as Open Drain, and use 1..10kΩ pullup resistors to +3.3V on SDA and SCL instead of actively pushing 3.3V into the bus. That's what the kernel driver also takes care of automatically, and what you had to configure by hand. To read from an Open Drain configured GPIO, simply output a "1" and read back what's on the bus line in reality.
• OK, I will use your answer as a starting point of a new question. Before I do that, just one question: is it possible to set arbitrary GPIO into hardware open drain mode? I have read on internet that this is not possible and that this has to be emulated by switching between OUTPUT=False mode and INPUT mode. – Pygmalion Feb 12 '18 at 13:41
• Open drain mode is identical to setting the output state to a fixed "0" and toggle the output enable switch instead of the state. It depends on the abstraction layer used how this is presented to the application programmer. – Janka Feb 12 '18 at 13:46
http://www.smbus.org/specs/ and the current spec of SMBUS (Version 3) makes no mention that it comprises more than two signals - SMBCLK and SMBDAT on layer 1. These are the data (SDA) and clock (SCL) lines of the underlying I2C bus (just as joan's answer puts it). Based on this I do not see why the software package on top of this should include anything else.
I take it that you would need to do the communication with this particular device by yourself using one of the Pi's GPIO libraries, e.g. pigpiod. This way you can control the /LDAC input of the MCP4728 using any of the Pi's GPIO pins (check the voltage levels though).
• – Janka Feb 10 '18 at 23:01
SMBus and I2C use two signals: SDA (for data) and SCL (the clock). They do not affect any other signals.
Unless LDAC is a synonym for SDA there is no way SMBus or I2C can control this signal.
• I am aware of that. But is it possible to tell smbus to stop sending data to I2C after 8th bit, then lower the LDAC "manually" and then tell smbus to continue sending bits? – Pygmalion Feb 10 '18 at 22:40
• You will need to bit bang the all the signals yourself (i.e. SDA/SCL/LDAC). I am not aware of any SMBus or I2C implementation which has "hooks" to allow such control. – joan Feb 10 '18 at 22:45
• Is that complicate to do, any instructions on that? – Pygmalion Feb 10 '18 at 22:47
• Could pigpio package be used for bit banging? Does it have a command to put arbitrary GPIO in open drain mode? Or perhaps hardware does not allow this state for GPIO and I have to do bit banging using I2C pins? – Pygmalion Feb 11 '18 at 11:35
• Find the current address using something like i2cdetect -y 1 (sudo apt-get install i2c-tools if not installed). Then you don't need a response during the write I2C address bits command. – joan Feb 11 '18 at 12:24 | 2019-10-16 07:37:57 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.24799056351184845, "perplexity": 2364.5606685141447}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-43/segments/1570986666467.20/warc/CC-MAIN-20191016063833-20191016091333-00454.warc.gz"} |
http://planet.mozilla.org/?post/2009/06/29/Getting-help-for-localization-work | ## March 11, 2014
### Armen Zambrano Gasparnian — Debian packaging and deployment in Mozilla's Release Engineering setup
I'm been working on creating my second Debian package for Mozilla's Release Engineering infrastructure and it's been a pain like the first one.
To be honest, it's been hard to figure out the correct flow and to understand what I was doing.
In order to help other people in the future, I decided to document the process and workflow.
This is not to replace the documentation but to help understand it.
If you're using a Mac or a Windows machine, notice that we have a VM available on EC2 that has the tools you need: ubuntu64packager1.srv.releng.use1.mozilla.com. The documentation can be found in "How to build DEBs". You can use this blog post to help you get up to speed.
During our coming work week we will look at a complete different approach to make changes like this easier for developers to make without Release Engineering intervention. It is not necessarily a self-serve for Debian deployments.
### Goal
We want to upgrade a library or a binary on our infrastructure.
For Linux, we use Puppet to deploy packages and we deploy it through a Debian repository.
Before we deploy the package through Puppet, we have to add the package to our internal Debian repository. This blog post will guide you to:
1. Create the .deb files
2. Add them to our internal Debian repository
3. Test the deployment of the package with Puppet
### Debian packaging
For a newbie, it can be a very complicated system that has many many parts.
In short, I've learned that there are involved three different files that allow you to recreate the .deb files. The files extensions are: .dsc, .orig.tar.gz and .diff.gz. If you find the source package page for your desired package, you will notice that these 3 files are available to download. We can use the .dsc file to generate all the .deb files.
For full info you can read the Debian Packaging documentation and/or look at the building tutorial to apply changes to an existing package.
### Ubuntu version naming
If I understand correctly (IIUC), "precise" is an identifier for a Ubuntu release. In our case it refers to Ubuntu 12.04 LTS.
### Versions of a package
IIUC, a package can have 3 different versions or channels:
• release. The version that came out with a specific release
• Ubuntu 12.04 came out with mesa 8.0.2-0ubuntu3
• security. The latest security release
• e.g. mesa 8.0.4-0ubuntu0.6
• e.g. mesa 8.0.4-0ubuntu0.7
If you load the "mesa" source package page, you will find a section called "Versions published" and you will see all three versions listed there.
In our specific releng setup, we always use "precise" as the distribution and not "precise-updates".
I don't know why.
### Repackage the current version or the latest one?
If you're patching a current package, do not try jump to the latest available version unless necessary. Choose the version closest to our current package to reduce the number of new dependencies.
In my case I was trying to go for mesa 8.0.4-0ubuntu0.7 instead of mesa 8.0.2-0ubuntu3.
Due to that, I had all sorts of difficulties and it had lots of new dependencies.
Even then, I realized later that I had to go for mesa 8.0.4-0ubuntu0.6 as a minimum.
### Puppetagain-build-deb OR pbuilder?
From Mozilla's Release Engineering's prespective, we're only considering two ways of creating our .deb files: 1) puppetagain-build-deb and 2) pbuilder.
FYI puppetagain-build-deb was written to make it very simple to create the required .deb files.
Unfortunately, in my case, puppetagain-build-deb could only handle the dependencies of 0.8.2 and not the ones of 0.8.4.
I describe how to use pbuilder in the section "Create the debian/ directory".
Below is the "puppetagain-build-deb" approach. Also documented in here.
#### Puppetagain-build-deb
At this point we have the "package_name-debian" directory under modules/packages/manifests in Puppet. Besides that, we need to download ".orig.tar.gz" file.
To create the .deb files we need 1) the debian directory + 2) the original tar ball.
In most cases, we should be able to use ubuntu64packager1 and puppetagain-build-deb to build the deb files. If not,
NOTE: The .orig.tar.gz file does not need to be committed.
cd puppethg up -r d6aac1ea887f #It has the 8.0.2 version checked-incd modules/packages/manifestswget https://launchpad.net/ubuntu/+archive/primary/+files/mesa_8.0.2.orig.tar.gz# The .deb files will appear under /tmp/mesa-precise-i386puppetagain-build-deb precise amd64 mesa-debian# The .deb files will appear under /tmp/mesa-precise-amd64puppetagain-build-deb precise i386 mesa-debian
### Create the debian/ directory
In Puppet we have "debian" directories checked-in (e.g. mesa-debian/) for any debian package we deploy to our systems through it. The debian directory is produced with the standard Debian packing instructions.
If you have access to a Linux machine you can follow the steps that rail gave me to generate the deb files. You can also log-in to ubuntu64packager1 (you have to start it up first).
To make it work locally, I had to install pbuilder with "sudo apt-get install pbuilder".
I also needed to create my own pbuilder images.
In short, to recreate .deb files without modifying them you can follow these steps:
1. use dget to downloads all three required files (.dsc, .orig.tar.gz and .diff.gz)
2. use pbuilder --build to generate the .deb files
Since we want to patch the libraries rather than use them as-is, we also have to run these steps in between step 1 & step 2:
1. dpkg-source -x
• it extracts the source files
3. append a line to debian/patches/series
• the line indicates the filename of your patch under debian/patches
4. set DEBFULLNAME
• to bump the version when repackagin the source
5. dpkg-source -b
• rebuild the source package
You can read rail's explanation for full details.
### Keep track of the debian/ directory in Puppet
The previous section should have generated your desired "debian" directory.
We now need to check it inside of our puppet repository to keep track of it.
cp -r mesa-8.0.4/debian ~/puppet/modules/packages/manifests/mesa-debiancd ~/puppethg addremovehg diff
### Having Debian packaging issues?
rail and dustin have experience in this area, however, if we have further Debian packaging issues we can reach sylvestre and glandium.
### Determine involved libraries
To create our Puppet patch, we have to determine which packages are involved.
For instance, the mesa bug required updating five different libraries.
rail explains on comment 26 how to discover which libraries are involved.
You can list the package names you compiled with something like this:
ls *deb | awk -F_ '{print $1}' | xargs # copy the list of names and run the following on the target machine: dpkg -l 2>/dev/null | grep ^ii | awk '{print$2}'
### Create a no-op puppet change (pinning the version)
If the package already exists on our infra but it is not managed by Puppet (e.g. the library came by default on the OS), then it is better to write first a puppet change to pin the versions.
To write the puppet change you will have to answer these questions:
• Do we want this change for the in-house and ec2 machines? Or a subset?
• Do we want the change for both 64-bit and 32-bit machines?
• What are the versions currently running on the machines that would be affected?
• Check on each pool you're planning to deploy it since we could have inconsistencies between them
Answering these questions will determine which files to modify in puppet.
Remember that you will have to test that your puppet change runs without issues.
### Integrating your .deb files into the releng Debian repository and sync to the puppet masters
The documentation is here. And here's what I did for it.
1 - Sync locally the Debian packages repository
We need to sync locally from the "distinguished master" the "releng", "conf" and "deb" directories:
sudo sursync -av releng-puppet2.srv.releng.scl3.mozilla.com:/data/repos/apt/releng/ /data/repos/apt/releng/rsync -av releng-puppet2.srv.releng.scl3.mozilla.com:/data/repos/apt/conf/ /data/repos/apt/conf/rsync -av releng-puppet2.srv.releng.scl3.mozilla.com:/data/repos/apt/db/ /data/repos/apt/db/
2 - Import your .deb files into the Debian repo
cd /data/repos/aptcp ~armenzg/tmp/mesa_8.0.4.orig.tar.gz releng/pool/main/m/mesareprepro -V --basedir . include precise ~armenzg/tmp/out64/*.changesreprepro -V --basedir . includedeb precise ~armenzg/tmp/out32/*.deb
If the package is new you will also have to place the .orig.tar.gz file under /data/repos/apt/releng. The reprepro will let you know as it will fail until you do.
3 - Rsync the repo and db back to the distinguished master
Push your file back to the official repository:
rsync -av /data/repos/apt/releng/ releng-puppet2.srv.releng.scl3.mozilla.com:/data/repos/apt/releng/rsync -av /data/repos/apt/db/ releng-puppet2.srv.releng.scl3.mozilla.com:/data/repos/apt/db/
Your files should show up in here:
http://puppetagain.pub.build.mozilla.org/data/repos/apt/releng/pool/main
NOTE: Pushing the .deb files to the repo does not update the machines.
4 - Fix the permissions at the distinguished master
ssh root@releng-puppet2.srv.releng.scl3.mozilla.compuppetmaster-fixperms
### Test that you can update
Before you can sync up a host with puppet you need to let the puppet servers sync up with the distinguished master.
For instance, my puppet runs were failing because the packages were missing at:
http://puppetagain-apt.pvt.build.mozilla.org/repos/apt/releng/pool/main/m/mesa
To test my changes, I created two EC2 instances. For other pools you will have to pull a machine from production.
1 - Prepare your user environment
ssh armenzg@releng-puppet2.srv.releng.scl3.mozilla.comcd /etc/puppet/environments/armenzg/envhg pull -u && hg st
2 - Run a no-op test sync from your loaned machines
puppet agent --test --environment=armenzg --server=releng-puppet2.srv.releng.scl3.mozilla.com
3 - Under your user environment on the puppet master, bump the versions and the repoflag
4 - Run puppet syncs again on the test instances and watch for the changes on the Puppet output
puppet agent --test --environment=armenzg --server=releng-puppet2.srv.releng.scl3.mozilla.com
5 - Review the package versions are the right ones
6 - Test a rollback scenario
You will have to remove the bumping of the versions from step #3 and bump the repoflag again.
Run steps 4 and 5 to see that we downgrade properly.
7 - Clean up ubuntu64packager1 and shut it off
8 - Deploy your change like any other Puppet change
### Read all the steps at once
https://bugzilla.mozilla.org/show_bug.cgi?id=975034#c37
### Andrea Marchesini — Audio volume and mute per window object
I have finally found some time to finish a set of patches about a nice feature that will allow addon/firefox developers to control audio volumes for window object.
Through this new feature any window object has two new attributes: audioMuted and audioVolume (accessible from chrome code only using nsIDOMWindowUtils). The aim is to change the volume of any HTML5 media element and any WebAudio destination node (soon WebRTC and also FMRadio API). The control of the volumes works “on cascade” - if a window has an iframe, the iframe elements will be effected by the parent window audio attributes.
The code is just landed on m-c and it will be available on nightly in a few hours.
Also, in order to test this feature I wrote an addon. As you could see, the UI is not the best… I know, but it was just a proof of concept, I’m sure somebody else will do a better work! Download the addon.
This feature is currently disabled by default, but it’s easy to enable it by changing or creating a preference in about:config. Some instructions to do it: open ‘about:config’ in a new tab and add a new boolean preference called ‘media.useAudioChannelService' and set it to true. This property will enable the AudioChannelService for any HTMLMediaElement and any WebAudio destination node.
AudioChannelService is the audio policy controller of Firefox OS. You will know once you use it, that the AudioChannelService is enabled when, while changing tabs, media elements of invisible tabs will be muted. From now on, you can use the addon.
The addon UI can be open from Tools -> Web Developers -> Audio Test.
Here a screenshot:
From a code point of view, you can play with this audio feature from the nsIDOMWindowUtils interface. For instance:
var currentBrowser = tabbrowser.getBrowserAtIndex(0 /* an index */);
var utils = currentBrowser.contentWindow
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
dump("The default audioVolume should be 1.0: " + utils.audioVolume + "\n");
utils.audioVolume = 0.8;
dump("By default the window is not muted: " + utils.audioMuted + "\n");
utils.audioMuted = true;
There is also a notification that is dispatched when a window starts and stops playing audio: media-playback. The value of this notification can be active or inactive. If you are interested about how to use them, there are a couple of tests on bug 923247.
What can we do with this new feature? Here some ideas:
• we could change or animate the tab icon to let the users know which tab is playing.
• addons to mix audio between tabs
• advanced settings for disable audio by default - either to enable audio just for the visible tab or to specific origins, etc.
• other options, such as “disable audio for all the tabs but this one” in some context menu.
Please, use this feature and let me know if you have problems, new ideas or needs. Good hack!
### Lawrence Mandel — Stepping Down as Chair of the Engineering Meeting
As I previously shared, I have accepted a new role at Mozilla. As my responsibilities have changed, I am stepping down as the chair of the Engineering Meeting.
Looking back over the last year or so of running this meeting, I am pleased by the positive reaction to the meeting reboot in June 2013, where we refocused on the needs of engineering, and by the successful follow on changes, such as including additional engineering teams and broadcasting and archiving the meeting on Air Mozilla.
I would like to thank everyone who took the time to provide feedback about the meeting. The changes to the meeting were a direct result of our conversations. I would also like to thank Richard Milewski and the Air Mozilla team for working out how to broadcast the meeting to our global audience each week.
I chaired my last meeting on Mar 5, 2014. You can watch my swan song on Air Mozilla.
Chris Peterson takes over as the chair of the Engineering Meeting effective this week.
Tagged: engineering, meeting, mozilla
### Sean McArthur — Persona is dead, long live Persona
The transition period was really tough for me. It felt like we were killing Persona. But more like tying a rope around it and dragging it behind us as we road tripped to Firefox OS Land. I first argued against this. Then, eventually I said let’s at least be humane, and take off the rope, and put a slug in its head. Like an Angel of Death. That didn’t happen either. The end result is one where Persona fights on.
Persona is free open source software, and has built up a community who agree that decentralized authentication is needed o the Internet. I still think Persona is the best answer in that field, and the closest to becoming the answer. And it’s not going away. We’re asking that the Internet help us make the Internet better.
### Firefox Accounts
In the meantime I’ll be working on our Firefox Accounts system, which understandably could not rely entirely on Persona1. We need to keep Firefox competitive, since it’s what pays for us to do all the other awesomizing we do. Plus, as the Internet becomes more mobile and more multi-device, we need to make sure there is an alternative that puts users first. A goal of Firefox Accounts is to be pluggable, and to integrate with other services on the Web. Why should your OS demand you use their siloed services? If you want to use Box instead of iCloud, we want you to use it.
How does this affect Persona? We’re actually using browserid assertions within our account system, since it’s a solved problem that works well. We’ll need to work on a way to get all sorts of services working with your FxAccount, and it might include proliferating browserid assertions everywhere2. As we learn, and grow the service so that millions of Firefox users have accounts, we can explore easing them into easily and automatically being Persona users. This solves part of the chicken-egg problem of Persona, by having millions of users ready to go.
I’d definitely rather this have ended up differently, but I can also think of far worse endings. The upside is, Persona still exists, and could take off more so with the help of Firefox. Persona is dead, long live Persona!
1. Sync needs a “secret” to encrypt your data before it’s sent to our servers. The easiest solution for users is to provide us a password, and we’ll stretch that and make a secret out of it (so, we don’t actually know your password). Persona doesn’t give us passwords, so we can’t use it.
2. Where “browserid” assertions are accepted, Persona support can also be found.
### Planet Mozilla Interns — Michael Sullivan: Inline threading for TraceMonkey slides
Here are the slides from my end of summer brown-bag presentation: http://www.msully.net/~sully/files/inline_slides.pdf.
### Digital Learning with Young People in the United Kingdom
[Adapted from a panel talk I gave at DML 2014 on March 7, 2014 in Boston, MA.]
There’s a lot of exciting digital making happening in the United Kingdom, so I want to share the story of Make Things Do Stuff, a network and website of maker-focused organizations -- including Mozilla -- that promote digital learning among young people in the UK.
First, let’s set the scene.
In January 2011, Nesta -- an Innovation Foundation in the UK -- published the “Next Gen.” report, co-authored by Sir Ian Livingstone and Alex Hope. Livingstone was part of the team that supported and distributed games such as Dungeons & Dragons, and most famously Lara Croft: Tomb Raider. The authors found at that time that the UK video games sector brought in over £2 billion in sales, and was larger than both the film and music industries. Between 2006 and 2008 the visual effects sector -- encompassing both film and video games -- grew at 16.8% with most of its talent being local. Just after 2008, however, the industry quickly began losing its local talent to overseas competition, and was forced to source overseas talent of its own to keep sales high.
The over-arching conclusion of the report was that the education system failed to fill the skills gap in the industry. Next Gen. looked at how this problem could be tackled, and gave two major recommendations:
• Put Computer Science on the national curriculum.
• Have GCSE (Graduate Certificate of Secondary Education) in all schools.
=> Quick Explanation: Unlike in many countries where high school graduates receive one certificate for satisfactory completion of course work -- a diploma or GED -- in the UK students between 14 and 16 years of age take GCSE exams in each subject -- some compulsory, and some elective.
Stemming from Next Gen. came 2 years of consultation between education specialists, technology experts, and government policy advisers to build a computer science curriculum. The view taken is that coding/programming is an essential skill to join the job force. Thus, starting in Key Stage 1 students aged 5-7 will be introduced to algorithms and logical reasoning. With each successive Key Stage, students will build up their knowledge and skills base, and by the end of the Key Stage 4 (age 14-16) they will be able to code in at least 2 languages, and have the creative and technical abilities for more sophisticated study in CS or a professional career. The curriculum goes into full effect this September.
Learning through making
At the same time, yearly spending on digital education in schools reached into the hundreds of millions, and yet real transformation in learning and teaching remained elusive. Could it be that interactive whiteboards and one-to-one tablet schemes aren’t the final solution? So Nesta teamed up with London Knowledge Lab and Learning Sciences Research Institute to see how teachers and learners could be more engaged in the design and use of learning technologies. After researching 8 types of learning with technology, they largely concluded that learning through making is one of the more effective strategies. (Decoding Learning: The Proof, Promise, and Potential of Digital Education.)
With solid research in hand, Nesta, Nominet Trust (a funder for socially-minded tech solutions), and Mozilla (a socially-minded engineering organization) banded together to create Make Things Do Stuff. This relationship works not only because we have robust research, funding and tools, but also because we all recognize the importance of bringing together other organizations in the making space, and know that the collaborative effort is greater than the sum of its parts.
With over 40 organizations in our network, we have great depth and representation across a lot of disciplines. Our partners include everyone from small after-school coding clubs and DIY digital making haberdasheries to large tech event planners and government supporters like the Cabinet Office.
But the best part of Make Things Do Stuff is the Youth Editorial team, a group of 25 super talented young makers with interests ranging from programming apps that tackle social issues to musicians with great YouTube followings. Some speak at youth conferences as evangelists, putting a relatable face on the movement, while others run hackathons in local communities. This stellar team creates content for the website – by young people for young people – and invites others like them to make things and share their stories.
Challenges
Of course it isn’t all smooth sailing. With so many stakeholders pulling in the same direction, it’s tough to make sure everyone feels visible and that their values are prioritized. As the educational Events Manager helping wrangle everyone, my three main pain-points are:
Audience: We work with organizations, not schools, so a lot of young people we see are already highly motivated to learn through making. While it’s great that we’re reaching them through their passions and building on them, I wonder about the young people we’re not reaching. To mitigate this, we try to attend a variety of events – everything from the nationwide Big Bang Fair with 65,000 young people getting their digital hands dirty over 4 days, to small-scale workshops where 25 school children made robots out of plastic cups, remixed our Keep Calm And…Thimble make, and created circuits out of play-dough at an event hosted by the new Children’s Museum at MozLDN. (Some fun remixes: Live long and Prosper, Freak Out and Throw Stuff, Eat Sleep Rave Repeat.)
“Brand Soup”: Although all of the organizations are under the banner of Make Things Do Stuff, we also have responsibilities to our individual organizations to increase visibility and brand recognition. When we’re at events sometimes all you see is a bunch of logos on a sign, and I wonder, what are we really promoting? To make sure we don’t get lost in the politics of brand soup, we bring it all back to our shared mission and message: we’re here to help everyone move beyond digital consumption to digital creation. We focus on the young people and remember that we’re here for them, not the other way around. And suddenly, it’s clear skies ahead.
Gathering Data: Again, because we’re not partnered with schools it can be difficult to measure the effect our efforts have on the overall learning environment. Moreover, it’s near impossible to come up with a universal definition of effect; are we measuring national test outcomes? Are we looking at job-readiness skills? This one continues to be a challenge, but as the maker landscape changes, I look forward to seeing solutions surface.
Despite our difficulties with data, I’m happy to share that we reached 100,000+ young people over 3 months last summer – our first summer – thanks to our collaborative efforts. Make Things Do Stuff will also continue to change and grow as new technologies enter the field, and as young people find new ways to use old technologies. It’s an exciting time to be in this space, and I hope you’ll become a part of our ever-evolving story.
### Gervase Markham — The Necessity of Management
Getting people to agree on what a project needs, and to work together to achieve it, requires more than just a genial atmosphere and a lack of obvious dysfunction. It requires someone, or several someones, consciously managing all the people involved. Managing volunteers may not be a technical craft in the same sense as computer programming, but it is a craft in the sense that it can be improved through study and practice.
– Karl Fogel, Producing Open Source Software
### William Duyck — Open Education and the Open Web – Day 2
Today is day 2 of the open education week, and an interested question has been asked.
Questions: What do you see as the link between Open Education and the Open Web? Does the former depend on the latter?
I took the time to answer this over on my Year In Industry blog, so go and take a nose… OR join the discussion over on Google +.
The tl;dr for me is that an Open Education does not require the use of the Open Web. But it helps.
### Doug Belshaw — On the link between Open Education and the Open Web
I’m currently moderating a discussion as part of Open Education Week on behalf of Mozilla. In today’s discussion prompt I asked:
What do you see as the link between Open Education and the Open Web? Does the former depend on the latter?
It’s a question that depends on several things, not least your definition of the two terms under consideration. Yesterday, in answer to the first discussion prompt, I used Mozilla Thimble to make this:
The above would be my current (brief) definition of Open Education. But what about the Open Web? Here I’m going to lean on Mark Surman’s definition from 2010:
Open web = freedom, participation, decentralization and generativity.
That last word, ‘generativity’ is an interesting one. Here’s part of the definition from Wikipedia:
Generativity in essence describes a self-contained system from which its user draws an independent ability to create, generate, or produce new content unique to that system without additional help or input from the system’s original creators.
As an educator, I believe that the role of teachers is to make themselves progressively redundant. That is to say, the learner should take on more and more responsibility for their own learning. Both teachers and learners can work together within an Open Educational Ecosystem (OEE) that is more than the sum of its parts.
The more I think about it, this is how the Open Web is similar to Open Education. Both are trying to participate in a generative ecosystem benefitting humankind. It’s about busting silos. It’s about collaborating and sharing.
Does Open Education depend upon the Open Web? No, I wouldn’t say it that strongly. Open Education can happen without technology; you can share ideas and resources without the web. However, the Open Web significantly accelerates the kind of sharing and collaboration that can happen within an OEE. In other words, the Open Web serves as a significant catalyst for Open Education.
What do you think? What’s the relationship between Open Education and the Open Web?
Join the discussion!
### Marco Zehe — Easy ARIA Tip #7: Use “listbox” and “option” roles when constructing AutoComplete lists
One question that comes up quite frequently is the one of which roles to use for an auto-complete widget, or more precisely, for the container and the individual auto-complete items. Here’s my take on it: Let’s assume the following rough scenario (note that the auto-complete you have developed may or may not work in the same, but a similar way):
Say your auto-complete consists of a textbox or textarea that, when typing, has some auto-complete logic in it. When auto-complete results appear, the following happens:
1. The results are being collected and added to a list.
2. The container gets all the items and is then popped into existence.
3. The user can now either continue typing or press DownArrow to go into the list of items.
4. Enter or Tab select the current item, and focus is returned to the text field.
Note: If your widget does not support keyboard navigation yet, go back to it and add that. Without that, you’re leaving a considerable amount of users out on the advantages you want to provide. This does not only apply to screen reader users.
The question now is: Which roles should the container and individual items get from WAI-ARIA?Some think it’s a list, others think it’s a menu with menu items. There may be more cases, but those are probably the two most common ones.
The short version: Menus on Windows are a hell of a mess, and that’s historically rooted in the chaos that is the Win32 API. Take my word for it and stay out of that mess and the debugging hell that may come with it.
The long version: Windows has always known a so-called menu mode. That mode is in effect once a menu bar, a drop-down menu, or a context menu become active. This has been the case for as long as Windows 3.1/3.11 days, possibly even longer. To communicate the menu mode state to screen readers, Windows, or more precisely, Microsoft Active Accessibility, uses four events:
3. SystemMenuPopupEnd: The popup just closed. Menu mode returns to either the previous Popup in the stack (closing of a sub menu), the menu bar, or falls out of menu mode completely.
These events have to arrive in this exact order. Screen readers like JAWS or Window-Eyes rely heavily on the even order to be correct, and they ignore everything that happens outside the menus once the menu mode is active. And even NVDA, although it has no menu mode that is as strict as that of other “older” screen readers, relies on the SystemMenuStart and SystemMenuPopupStart events to recognize when a menu gained focus. Because the menu opening does not automatically focus any item by default. An exception is JAWS, which auto-selects the first item it can once it detects a context or start menu opening.
You can possibly imagine what happens if the events get out of order, or are not all fired in a complete cycle. Those screen readers that rely on the order get confused, stay in a menu mode state even when the menus have all closed etc.
So, when a web developer uses one of the menu roles, they set this whole mechanism in motion, too. Because it is assumed a menu system like a Windows desktop app is being implemented, browsers that implement WAI-ARIA have to also send these events to communicate the state of a menu, drop-down or context or sub menu.
So, what happens in the case of our auto-complete example if you were to use the role menu on the container, and menuitem on the individual items? Let’s go back to our sequence from the beginning of the post:
1. The user is focused in the text field and types something.
2. Your widget detects that it has something to auto-complete, populates the list of items, applies role menuitem to each, and role menu to the container, and pops it up.
3. This causes a SystemMenuPopupStart event to be fired.
The consequences of this event are rather devastating to the user. Because you just popped up the list of items, you didn’t even set focus to one of its items yet. So technically and visually, focus is still in your text field, the cursor is blinking away merrily.
But for a screen reader user, the context just changed completely. Because of the SystemMenuPopupStart event that got fired, screen readers now have to assume that focus went to a menu, and that just no item is selected yet. Worse, in the case of JAWS, the first item may even get selected automatically, producing potentially undesired side effects!
Moreover, the user may continue typing, even use the left and right arrow keys to check their spelling, but the screen reader will no longer read this to them, because their screen reader thinks it’s in menu mode and ignores all happenings outside the “menu”. And one last thing: Because you technically didn’t set focus to your list of auto-complete items, there is no easy way to dismiss that menu any more.
On the other hand, if you use listbox and option roles as I suggested, none of these problems occur. The list will be displayed, but because it doesn’t get focus yet, it doesn’t disturb the interaction with the text field. When focus gets into the list of items, by means of DownArrow, the transition will be clearly communicated, and when it is transitioning back to the text field, even when the list remains open, that will be recognized properly, too.
So even when you sighted web developers think that this is visually similar to a context menu or a popup menu or whatever you may want to call it, from a user interaction point of view it is much more like a list than a menu. A menu system should really be confined to an actual menu system, like the one you see in Google Docs. The side effects of the menu related roles on Windows are just too severe for scenarios like auto-completes. And the reason for that lies in over 20 years of Windows legacy.
Some final notes: You can spice up your widget by letting the user know that auto-complete results are available via a text that gets automatically spoken if you add it in a text element that is moved outside the viewport, but apply an attribute aria-live=”polite” to it. In addition, you can use aria-expanded=”true” if you just popped up the list, and aria-expanded=”false” if it is not there, both applied to your input or textarea element. And the showing and hiding of the auto-complete list should be done via display:none; or visibility:hidden; and their counterparts, or they will appear somewhere in the user’s virtual buffer and cause confusion.
A great example of all of this can be seen in the Tweet composition ContentEditable on twitter.com.
I also sent a proposal for an addition to the Protocols and Formatting Working Group at the W3C, because the example in the WAI-ARIA authoring practices for an auto-complete doesn’t cover most advanced scenarios, like the one on Twitter and others I’ve come across over time. Hope the powers that may be follow my reasoning and make explicit recommendations regarding the use of roles that should and shouldn’t be used for auto-completes!
### Frédéric Wang — TeXZilla 0.9.4 Released
update 2014/03/11: TeXZilla is now available as an npm module.
### Introduction
For the past two months, the Mozilla MathML team has been working on TeXZilla, yet another LaTeX-to-MathML converter. The idea was to rely on itex2MML (which dates back from the beginning of the Mozilla MathML project) to create a LaTeX parser such that:
• It is compatible with the itex2MML syntax and is similarly generated from a LALR(1) grammar (the goal is only to support a restricted set of core LaTeX commands for mathematics, for a more complete converter of LaTeX documents see LaTeXML).
• It is available as a standalone Javascript module usable in all the Mozilla Web applications and add-ons (of course, it will work in non-Mozilla products too).
• It accepts any Unicode characters and supports right-to-left mathematical notation (these are important for the world-wide aspect of the Mozilla community).
The parser is generated with the help of Jison and relies on a grammar based on the one of itex2MML and on the unicode.xml file of the XML Entity Definitions for Characters specification. As suggested by the version number, this is still in development. However, we have made enough progress to present interesting features here and get more users and developers involved.
### Quick Examples
\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1
$\frac{{x}^{2}}{{a}^{2}}+\frac{{y}^{2}}{{b}^{2}}=1\frac\left\{x^2\right\}\left\{a^2\right\} + \frac\left\{y^2\right\}\left\{b^2\right\} = 1$
∑_{n=1}^{+∞} \frac{1}{n^2} = \frac{π^2}{6}
$\sum _{n=1}^{+\infty }\frac{1}{{n}^{2}}=\frac{{\pi }^{2}}{6}\sum _\left\{n=1\right\}^\left\{+\infty \right\} \frac\left\{1\right\}\left\{n^2\right\} = \frac\left\{\pi ^2\right\}\left\{6\right\}$
س = \frac{-ب\pm\sqrt{ب^٢-٤اج}}{٢ا}
$س=\frac{-ب±\sqrt{{ب}^{٢}-٤اج}}{٢ا}س = \frac\left\{-ب\pm\sqrt\left\{ب^٢-٤اج\right\}\right\}\left\{٢ا\right\}$
### Live Demo / FirefoxOS Web app
A live demo is available to let you test the LaTeX-to-MathML converter with various options and examples. For people willing to use the converter on their mobiles a FirefoxOS Web app is also available.
### Using TeXZilla in a CommonJS program or Web page
TeXZilla is made of a single TeXZilla.js file with a public API to convert LaTeX to MathML or extract the TeX source from a MathML element. The converter accepts some options like inline/display mode or RTL/LTR direction of mathematics.
You can load it the standard way in any Javascript program and obtain a TeXZilla object that exposes the public API. For example in a commonJS program, to convert a TeX source into a MathML source:
var TeXZilla = require("./TeXZilla");
console.log(TeXZilla.toMathMLString("\\sqrt{\\frac{x}{2}+y}"));
or in a Web Page, to convert a TeX source into a MathML DOM element:
<script type="text/javascript" src="http://www.maths-informatique-jeux.com/blog/frederic/?post/2014/02/25/TeXZilla.js"></script>
...
var MathMLElement = TeXZilla.toMathML("\\sqrt{\\frac{x}{2}+y}");
### Using TeXZilla in Mozilla Add-ons
One of the goal of TeXZilla is to be integrated in Mozilla add-ons, allowing people to write cool math applications (in particular, we would like to have an add-on for Thunderbird). A simple Firefox add-on has been written and passed the AMO review, which means that you can safely include the TeXZilla.js script in your own add-ons.
TeXZilla can be used as an addon-sdk module. However, if you intend to use features requiring a DOMParser instance (for example toMathML), you need to initialize the DOM explicitly:
var {Cc, Ci} = require("chrome");
TeXZilla.setDOMParser(Cc["@mozilla.org/xmlextras/domparser;1"].
createInstance(Ci.nsIDOMParser));
TeXZilla.setDOMParser(Components.
classes["@mozilla.org/xmlextras/domparser;1"].
createInstance(Components.interfaces.nsIDOMParser));
### Using TeXZilla from the command line
TeXZilla has a basic command line interface. However, since CommonJS is still being standardized, this may work inconsistently between commonjs interpreters. We have tested it on slimerjs (which uses Gecko), phantomjs and nodejs. For example you can do
$slimerjs TeXZilla.js parser "a^2+b^2=c^2" true <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><... or launch a Web service (see next section). We plan to implement a stream filter too so that it can behave the same as itex2MML: looking the LaTeX fragments from a text document and converting them into MathML. ### Using TeXZilla as a Web Server TeXZilla can be used as a Web Server that receives POST and GET HTTP requests with the LaTeX input and sends JSON replies with the MathML output. The typical use case is for people willing to perform some server-side LaTeX-to-MathML conversion. For instance, to start the TeXZilla Webserver on port 7777: $ nodejs TeXZilla.js webserver 7777
Web server started on http://localhost:7777
Then you can sent a POST request:
$curl -H "Content-Type: application/json" -X POST -d '{"tex":"x+y","display":"true"}' http://localhost:7777 {"tex":"x+y","mathml":"<math xmlns=\"http://www.w3.org/1998/Math/MathML\"... or a GET request: $ curl "http://localhost:7777/?tex=x+y&rtl=true"
{"tex":"x+y","mathml":"<math xmlns=\"http://www.w3.org/1998/Math/MathML\"...
Note that client-side conversion is trivial using the public API, but see the next section.
### Web Components Custom Element <x-tex>
We used the X-Tag library to implement a simple Web Components Custom Element <x-tex>. The idea is to have a container for LaTeX expressions like
<x-tex dir="rtl">س = \frac{-ب\pm\sqrt{ب^٢-٤اج}}{٢ا}</x-tex>
that will be converted into MathML by TeXZilla and displayed in your browser: $س=\frac{-ب±\sqrt{{ب}^{٢}-٤اج}}{٢ا}س = \frac\left\{-ب\pm\sqrt\left\{ب^٢-٤اج\right\}\right\}\left\{٢ا\right\}$. You can set the display/dir attributes on that <x-tex> element and they will be applied to the [itex] element. Instances of <x-tex> elements also have a source property that you can use to retrieve or set the LaTeX source. Of course, the MathML output will automatically be updated when dynamic changes occur. You can try this online demo.
### CKEditor Plugins / Integration in MDN
Finally, we created a first version of a TeXZilla CKEditor plugin. An online demo is available here. We already sent a pull request to Kuma and we hope it will soon enable users to put mathematical mathematical formulas in MDN articles without having to paste the MathML into the source code view. It could be enhanced later with a more advanced UI.
## March 10, 2014
### Pete Moore — Accomplishments & status: Bug 875599 – Delete dead code in tools repoxxx Blocked/Waiting...
Accomplishments & status:
Blocked/Waiting on:
xxx
To look at over the next week:
xxx
Areas to develop:
To be discussed.
Quarterly goal tracking:
Actions:
• <to complete during 1x1>
### Justin Scott — Adventure is out there!
After 8 incredible years at Mozilla, the time has come for me to discover new ideas, meet new people, and explore more of what’s out there. There’s no other organization or community quite like Mozilla, and I feel honored and lucky to have called it home for so long. I can’t overstate how much Mozillians have taught and shaped me personally and professionally, and I’m so grateful for our time together.
### What’s next?
I’m ready for something new and ambitious, and will be spending some extended time building, learning, and reflecting. In other words, I’m taking a sabbatical to focus on:
1. Building cool stuff. It’s been too long since I’ve spent time building and shipping a personal project, and I’ve got some new ideas I’m itching to play with. I’m excited to stretch some creative muscles and see where they take me.
2. Learning new skills. In recent years, my passion for travel has led to a strong interest in learning new languages and becoming a better photographer. I’m looking forward to spending time learning Spanish, photography, and other skills — maybe I’ll even become a Wilderness First Responder!
3. Reflection. Tomorrow I turn 27. It’s a good time to stop and think about the bigger picture – what matters to me, what I truly enjoy doing, and plans for the future.
I’m pretty darn excited.
### Kim Moir — Built to Scale talk at EclipseCon
I'm honoured to be giving a talk at EclipseCon next week entitled Built to Scale: The Mozilla Release Engineering Toolbox. To give you some context, here are some numbers about the scale of build and test jobs we run.
We run about 6000 build jobs and 50,000 test jobs every week day. Each test job has many actual test suites within it of course. We have 1800+ devices to build on, plus 3900+ for tests. Some devices reside in our data centres, some reside in AWS. When a developer lands (commits) a change, our goal is to have the relevant job start within 15 minutes of being added to the scheduler database.
My talk will discuss we manage this scale of continuous integration in terms of hardware and software. Also, I'll touch on how we manage this from a human perspective, because that isn't easy either. I'll also discuss some of the lessons along the way as we have moved many of our infrastructure to AWS. And I'll also describe how we manage our 1000+ mobile devices that we run tests on as part of our CI farm.
Image ©ardonik, http://www.flickr.com/photos/ardonik/3954691105/sizes/l/ under Creative Commons by-nc-sa 2.0 Release engineering at this scale has lots of pieces to fit together.
In preparing this talk, I have been thinking a lot about the audience. The audience will be people in the Eclipse community, who don't have a lot of context about how we do things at Mozilla. I recently read the book Resonate by Nancy Duarte which describes how to create great visual presentations and story arcs as a speaker. One of the ideas in the book is that the most important thing that you can do as a speaker is think about your audience, what they know, and how to engage them.
I use the Presentation Zen approach when preparing a talk which means that I write out all the topics on index cards, arrange them, rearrange them, and discard non-essential content. Before touching a computer. When I was initially preparing the talk, I had an entire index card of Mozilla specific words that I would have to explain. It was ridiculous. Nobody would ever remember the context of those terms from one slide to the next. I put that card in the shredder.
Last week, I thought of a new approach to present my talk. I think it will really work. I want to make the talk as interesting and relevant to the Eclipse community as it would be as if I gave it to a room full of Mozillians who have more context.
So this is what I know about the audience for my talk
You are Eclipse community members
Like all developers, you have known the pain of slow builds and test results.
You'd like to know how to scale large amounts of hardware and software.
And how things can get better.
So you can work on optimizing your product, and not be frustrated by your build and release process.
If you have specific questions you'd like me to address in the talk, please let me know in the comments or via twitter (@kmoir). Looking forward to seeing you all at EclipseCon!
Notes:
1 I also recently read Why Don't Students Like School: A Cognitive Scientist Answers Questions About How the Mind Works and What It Means for the Classroom which is an excellent book and extremely applicable to people teaching programming languages and other abstract concepts. One of the topics that stuck with me from reading this book is that our brains need to have a lot of simple concepts memorized to understand more complex concepts. For instance, if you don't have your multiplication tables memorized, simple algebra will be difficult because you will have to stop and think what the value of 3x is when x is 7 instead of just pulling that from memory. So this is why when people complain that schools teach a lot of memorization and not more abstract thinking, it's not really a valid argument. You need a lot of concepts memorized before you can do more abstract thinking. Highly recommended book.
John O'Duinn gave a talk at the Releng 2013 workshop last year and later as a Google Tech Talk that gives a great overview of why release engineering is a high priority at Mozilla. Well worth watching.
### Benjamin Smedberg — Use -debugexe to debug apps in Visual Studio
Many people don’t know about how awesome the windows debuggers are. I recently got a question from a volunteer mentee: he was experiencing a startup crash in Firefox and he wanted to know how to get the debugger attached to Firefox before the crash.
On other systems, I’d say to use mach debug, but that currently doesn’t do useful things on Windows. But it’s still pretty simple. You have two options:
Both Visual Studio and Visual C++ Express have a command-line option for launching the IDE ready for debugging.
devenv.exe -debugexe obj-ff-debug/dist/bin/firefox.exe -profile /c/builds/test-profile -no-remote
The -debugexe flag informs the IDE to load your Firefox build with the command lines you specify. Firefox will launch with the “Go” command (F5).
For Visual C++ express edition, run WDExpress.exe instead of devenv.exe.
### Debug Using Windbg
windbg is a the Windows command-line debugger. As with any command-line debugger it has an arcane debugging syntax, but it is very powerful.
Launching Firefox with windbg doesn’t require any flags at all:
windbg.exe obj-ff-debug/dist/bin/firefox.exe -profile /c/builds/test-profile -no-remote
### Debugging Firefox Release Builds
You can also debug Firefox release builds on Windows! Mozilla runs a symbol server that allows you to automatically download the debugging symbols for recent prerelease builds (I think we keep 30 days of nightly/aurora symbols) and all release builds. See the Mozilla Developer Network article for detailed instructions.
Debugging official builds can be a bit confusing due to inlining, reordering, and other compiler optimizations. I often find myself looking at the disassembly view of a function rather than the source view in order to understand what exactly is going on. Also note that if you are planning on debugging a release build, you probably want to disable automatic crash reporting by setting MOZ_CRASHREPORTER_DISABLE=1 in your environment.
### Yunier José Sosa Vázquez — Firefox OS presentado en Chile
¡Y por fin llegó! A casi un año de su estreno mundial, Firefox OS fue presentado en Chile. En un evento de prensa realizado en el centro Open Future de Movistar, al que fueron invitados todos los medios de comunicación nacional, los socios de esta aventura lanzaron el primer equipo con el sistema operativo de Mozilla que será vendido en Chile.
Andreas Gal, Vicepresidente de Movilidad de Mozilla afirma que “estamos buscando continuamente enriquecer la vida de las personas a través de la Web. Al lanzar Firefox OS con Alcatel OneTouch y Movistar, lograremos ofrecer una experiencia de calidad que sea accesible a los chilenos que están comprando su primer smartphone”. Por otra parte, Gal destacó el rol de la comunidad de voluntarios de Mozilla en Chile, quienes han apoyado el lanzamiento con capacitaciones y demostraciones, instando a continuar apoyando también el desarrollo de aplicaciones locales para el dispositivo.
Para Osvaldo Avendaño, Director Regional de Alcatel OneTouch Cono Sur “el OneTouch Fire es reflejo de la permanente apuesta por democratizar el uso del smartphone, entregando conectividad con dispositivos funcionales, fáciles de usar y a precios accesibles”.
Por su parte, Javier Valenzuela, Gerente de Terminales de Movistar declaró que “Firefox OS aumenta el rendimiento de los equipos por sobre las capacidades de su propio hardware. Con esto, ya no será necesario tener un teléfono celular con las máximas especificaciones, ya que este sistema operativo puede darnos rendimientos similares con mucho menos equipo, lo que finalmente promueve la masificación de los smartphones, dando más libertad de elegir a los usuarios”.
### Características técnicas
El Alcatel OneTouch Fire tiene una CPU a 1GHz, 512MB de almacenamiento interno, 256MB de RAM y soporte MicroSD hasta 32GB. Tiene soporte para bandas GSM, UTMS 850/1900/2100 y UMTS 900/2100. En cuanto a la conectividad, tiene acceso a conexiones HSPA, Wi-Fi, Bluetooth 3.0 y A-GPS.
Firefox OS corriendo en un Alcatel One Touch Fire
También está equipado de una cámara de 3.2MP, con gráficos altamente optimizados en una pantalla de 3.5” y un diseño colorido y compacto. Al estar basado en HTML5 y con tecnologías web abiertas, el dispositivo ofrece una navegación fluida que permite a los usuarios descubrir diferentes aplicaciones y navegar en la web.
¡Otro país más donde Firefox OS esta presente! Ya suman 15.
Entrada original por Javier Martínez en Mozilla Chile
Fuente: Mozilla Hispano
### Doug Belshaw — Open Education and the Open Web (#openeducationwk)
This week is Open Education Week 2014:
Open Education Week is a series of events to increase awareness of open education movement. The third annual Open Education Week takes place from March 10-15, both online and offline around the world. Through the events and resources, we hope to reach out to more people to demonstrate what kind of opportunities open education has created and what we have to look forward to.
Mozilla is playing a role, through a week-long online discussion entitled Open Education and the Open Web. There’ll be a new question to prompt conversation each day in our Google+ Webmaker community.
What does it mean to participate on the open web? How can we encourage others to take agency over the opportunities the open web provides? This discussion led by Mozilla’s Doug Belshaw will explore the participatory culture of the web, why it matters, and what we can do to protect and cultivate it.
Today’s prompt is simple. We’re just asking people to introduce themselves and respond as to what ‘open education’ looks like in their context.
You should join us. It’s totally fine to dip in and dip out. Take the first step:
Image CC BY mozillaeu
### Benoit Girard — C/C++ Eclipse Project Generation
With the landing of bug 973770 (and a few touch up landing this week) the Mozilla build system can now generate a fully working out-of-the-box no hassle eclipse workspace for C++ gecko development. This has been tested for Mac, Fennec and B2G. For Windows please use the Visual Studio project generator. If you find any bugs please file and link off bug 973770.
Didn’t we already support eclipse projects? Yes we did but the setup was quite tedious to setup and maintain. My approach automates some of these instructions and uses the information now available from within moz.build to generate the project. This also means we can remove the build scanning phase which tends to make Eclipse unresponsive.
To use this:
• Run |./mach build-backend -b CppEclipse|. For b2g cd into objdir-gecko and use |../gecko/mach -b CppEclipse|
• Start eclipse, use $OBJDIR/eclipse_workspace as the workspace • File->Import->Existing Project with path$OBJDIR/eclipse_workspace/gecko
• Let the indexer run on the first start. This can take about 20 mins (long but worth it, see below). This will index your exact mozconfig setup (example -DDEBUG, b2g system libs).
Here are some benefits:
Code Completion
Call Hierarchy
Build, Flash (b2g), Launch
Type Hierarchy
Mozilla Formatter
If you find yourself tweaking the project let me know so that I can integrate changes into the project generator instead where everyone can benefit.
### Nick Cameron — Subtyping and coercion in Rust
Subtyping and coercion are two related concepts for enabling polymorphic re-use in programming languages. I want to lay out exactly what they are and how they exist in Rust, and in particular how they relate to variance which exists today, is being implemented, or will be implemented as part of the work on dynamically sized types (DST). My terminology will not exactly fit that used by PL people or Rust people, sorry.
In the general case (i.e., not just Rust) subtyping is a relation on types which says that T is a subtype of U if T is in some sense a more specific type than U. More precisely we might like to say that T and U denote sets of values and the set of values denoted by T is a subset of the set of values denoted by U. That gets complicated when thinking about existential types and so forth if we don't have explicit values for the introduction of such types, and if we do, then I think things get a little circular and not very helpful for thinking about real programming languages.
Thinking of expressions in a language, if an expression has type T, it can be used anywhere we would expect an expression of type U. This is inclusion polymorphism (aka the Liskov substitution principle or strong behavioral subtyping. There are subtle differences between these three terms, but I could only describe them in the most hand-wavy terms, so I won't).
Coercion is an operation on values (or expressions) where a value of type T can be changed in some way to a value of type U. An example is using an integer as a float - this is allowed transparently in many languages, but the compiler must insert code which does the low-level conversion from integer to float. We usually assume (hope?) that conversions due to coercion are cheap.
When actually writing code, subtyping and coercion often look the same. Many programmers do not realise there is even a difference. For example, 'subtyping' between pointer types in C++ with multiple inheritance is technically a coercion because of the pointer adjustment required by the implementation using multiple vtables.
Rust has basically no subtyping. The only subtyping it has is due to contravariance with respect to lifetime variables. I (Niko has done the hard work already) am currently extending this to variance (where safe, along the usual lines) with respect to subtyping. Rust has coercions between structs and traits given by impls (well, between references to such things). It should, soon hopefully, have coercions between sub-traits and eventually, maybe sub-structs. Plus coercions between numeric types, etc., which are less interesting for now.
I would like to further classify subtyping and coercions along some axes. The key difference is that subtyping does not change the underlying value and coercion does (as discussed above). Both subtyping and coercion may be explicit or implicit. I sometimes refer to implicit subtyping as subsumption, but I'm not sure if that is common or correct. In Rust, subtyping is always implicit and coercion is sometimes implicit (trait objects) and sometimes explicit (numeric conversions, i.e., they require as. Coercion used to always be explicit until recently).
In Rust, only subtyping is used in the type inference algorithm.
The last axis I have thought of is a bit more hazy and a bit more of an implementation detail than a fundamental. It is that coercion restricts access to the value coerced. If coercion changes a value, it would be unsafe to continue to access the value via the old type. Either coercion must copy a value (i.e., only the new, copied value has the new type), or we must ensure that the old value cannot be accessed whilst the coerced value exists. Rusts linearity rules ensure this.
With DST, coercion becomes much more complicated. In particular we will add covariant coercions which must coerce fields of a struct. That is, they change things deep inside the struct, not just at the surface of a value. In contrast to subtyping, covariant coercion is always safe because we can no longer access the coerced value via its old type. (Thinking about proving safety gave me the insight that coercion actually _changes_ the type of a value, whereas subtyping gives multiple types to a single value (which is not to say that coercion always implies monomorphic types)).
We have talked a little (I think Niko has thought more) about perhaps changing the relationship between subtyping and type inference. Perhaps not all subtyping should be taken into account by the type inference algorithm. And/or perhaps some coercions should be taken account of. I don't really know - I have a hard time visualising how type checking would be affected by these changes.
I feel like I should have a point to make now, but I don't. I just did a lot of thinking to clarify all this in my head, so I thought I should write it down. And who knows? It might be helpful or interesting to someone else too.
### Robert O'Callahan — Introducing Chaos Mode
Some test failures are hard to reproduce. This is often because code (either tests or implementation code) makes unwarranted assumptions about the environment, assumptions that are violated nondeterministically. For example, a lot of tests have used setTimeout to schedule test code and assumed certain events will have happened before the timeout, which may not be true depending on effects such as network speeds and system load.
One way to make such bugs easier to reproduce is to intentionally exercise nondeterminism up to the limits of API contracts. For example, we can intentionally vary the actual time at which timers fire, to simulate the skew between CPU execution time and real time. To simulate different permitted thread schedules, we can assign random priorities to threads. Since hashtable iteration is not defined to have any particular order, we can make a hashtable iterator always start at a randomly chosen item.
I tried applying this to Gecko. I have patches that define a global "chaos mode" switch, and in several different places, if we're in chaos mode, we choose randomly between different valid behaviors of the code. Here's what the patches currently do:
• Sometimes yield just before dispatching an XPCOM event. This gives another thread a chance to win an event-dispatch race.
• On Linux, give threads a random priority and pin some threads to CPU 0 so they contend for CPU.
• Insert sockets in random positions in the list of polled sockets, to effectively randomize the priority of sockets in poll results.
• Similarly, when putting HTTP transactions into the HTTP transaction queue, randomly order them among other transactions with the same specified priority.
• Start hashtable iteration at a random entry.
• Scale timer firing times by random amounts (but don't vary the order in which timers fire, since that would violate the API contract).
• Shuffle mochitests and reftests so they run in random order.
Note that it can be valuable to make a single random choice consistently (for the same object, thread, etc) rather than making lots of fine-grained random decisions. For example, giving a thread a fixed low priority will starve it of CPU which will likely cause more extreme behavior --- hopefully more buggy behavior --- than choosing a random thread to run in each time quantum.
One important source of nondeterminism in Gecko is XPCOM event (i.e. HTML5 task) dispatch. A lot of intermittent bugs are due to event timing and ordering. It would be nice to exploit this in chaos mode, e.g. by choosing the next event to fire randomly from the set of pending events instead of processing them in dispatch order. Unfortunately we can't do that because a lot of code depend on the API contract that firing order follows dispatch order. In general it's hard to determine what the valid alternative firing orders are; the first item on my list above is my best approximation at the moment.
### Important Questions
Does this find bugs? Yes:
Which chaos features are the most helpful for producing test failures? I don't know. It would be a very interesting experiment to do try pushes with different patches enabled to figure out which ones are the most important.
Does it help reproduce known intermittent bugs? Sometimes. In bug 975931 there was an intermittent reftest failure I could not reproduce locally without chaos mode, but I could reproduce with chaos mode. On the other hand chaos mode did not help reproduce bug 791480. Extending chaos mode can improve this situation.
Isn't this just fault injection? It's similar to fault injection (e.g. random out-of-memory triggering) but different. With fault injection typically we expect most tests to fail because faults like OOM are not fully recoverable. Chaos mode should not affect any correctness properties of the program.
Wasn't this already done by <insert project name>? Probably. I don't claim this is a new idea.
When is this going to land and how do I turn it on? It has already landed. To turn it on, change isActive() to return true in mfbt/ChaosMode.h. Shuffling of reftests and mochitests has to be done separately.
OK, so this can trigger interesting bugs, but how do we debug them? Indeed, chaos mode makes normal debugging workflows worse by introducing more nondeterminism. We could try to modify chaos mode to reproduce the random number stream between runs but that's inadequate because other sources of nondeterminism would interfere with the order in which the random number stream is sampled. But we are working on a much better solution to debugging nondeterministic programs; I'll be saying more about that very soon!
## March 09, 2014
I tried to delete my Linkedin account a while back, but I still get a lot of "invitation to connect on Linkedin" emails. I plan to never connect to anyone on Linkedin ever again, so whoever wants to connect, please don't be offended when it doesn't happen --- it's not about you.
PS, I'm visiting Taiwan at the moment and wondering why Google uses that as a cue to switch its Web interface to Chinese even when I'm logged into my regular Google account. Dear Google, surely it is not very likely that my change of location to Taiwan indicates I have suddenly learned Chinese and forgotten English.
### William Lachance — Eideticker for FirefoxOS: Becoming more useful
[ For more information on the Eideticker software I'm referring to, see this entry ]
Time for a long overdue eideticker-for-firefoxos update. Last time we were here (almost 5 months ago! man time flies), I was discussing methodologies for measuring startup performance. Since then, Dave Hunt and myself have been doing lots of work to make Eideticker more robust and useful. Notably, we now have a setup in London running a suite of Eideticker tests on the latest version of FirefoxOS on the Inari on a daily basis, reporting to http://eideticker.mozilla.org/b2g.
There were more than a few false starts with and some of the earlier data is not to be entirely trusted… but it now seems to be chugging along nicely, hopefully providing startup numbers that provide a useful counterpoint to the datazilla startup numbers we’ve already been collecting for some time. There still seem to be some minor problems, but in general I am becoming more and more confident in it as time goes on.
One feature that I am particularly proud of is the detail view, which enables you to see frame-by-frame what’s going on. Click on any datapoint on the graph, then open up the view that gives an account of what eideticker is measuring. Hover over the graph and you can see what the video looks like at any point in the capture. This not only lets you know that something regressed, but how. For example, in the messages app, you can scan through this view to see exactly when the first message shows up, and what exact state the application is in when Eideticker says it’s “done loading”.
(apologies for the low quality of the video — should be fixed with this bug next week)
As it turns out, this view has also proven to be particularly useful when working with the new entropy measurements in Eideticker which I’ve been using to measure checkerboarding (redraw delay) on FirefoxOS. More on that next week.
### Daniel Stenberg — http2 in curl
While the first traces of http2 support in curl was added already back in September 2013 it hasn’t been until recently it actually was made useful. There’s been a lot of http2 related activities in the curl team recently and in the late January 2014 we could run our first command line inter-op tests against public http2 (draft-09) servers on the Internet.
There’s a lot to be said about http2 for those not into its nitty gritty details, but I’ll focus on the curl side of this universe in this blog post. I’ll do separate posts and presentations on http2 “internals” later.
### A quick http2 overview
http2 (without the minor version, as per what the IETF work group has decided on) is a binary protocol that allows many logical streams multiplexed over the same physical TCP connection, it features compressed headers in both directions and it has stream priorities and more. It is being designed to maintain the user concepts and paradigms from HTTP 1.1 so web sites don’t have to change contents and web authors won’t need to relearn a lot. The web will not break because of http2, it will just magically work a little better, a little smoother and a little faster.
In libcurl we build http2 support with the help of the excellent library called nghttp2, which takes care of all the binary protocol details for us. You’ll also have to build it with a new enough version of the SSL library of your choice, as http2 over TLS will require use of some fairly recent TLS extensions that not many older releases have and several TLS libraries still completely lack!
The need for an extension is because with speaking TLS over port 443 which HTTPS implies, the current and former web infrastructure assumes that we will speak HTTP 1.1 over that, while we now want to be able to instead say we want to talk http2. When Google introduced SPDY then pushed for a new extension called NPN to do this, which when taken through the standardization in IETF has been forked, changed and renamed to ALPN with roughly the same characteristics (I don’t know the specific internals so I’ll stick to how they appear from the outside).
So, NPN and especially ALPN are fairly recent TLS extensions so you need a modern enough SSL library to get that support. OpenSSL and NSS both support NPN and ALPN with a recent enough version, while GnuTLS only supports ALPN. You can build libcurl to use any of these threes libraries to get it to talk http2 over TLS.
### http2 using libcurl
(This still describes what’s in curl’s git repository, the first release to have this level of http2 support is the upcoming 7.36.0 release.)
Users of libcurl who want to enable http2 support will only have to set CURLOPT_HTTP_VERSION to CURL_HTTP_VERSION_2_0 and that’s it. It will make libcurl try to use http2 for the HTTP requests you do with that handle.
For HTTP URLs, this will make libcurl send a normal HTTP 1.1 request with an offer to the server to upgrade the connection to version 2 instead. If it does, libcurl will continue using http2 in the clear on the connection and if it doesn’t, it’ll continue using HTTP 1.1 on it. This mode is what Firefox and Chrome will not support.
For HTTPS URLs, libcurl will use NPN and ALPN as explained above and offer to speak http2 and if the server supports it. there will be http2 sweetness from than point onwards. Or it selects HTTP 1.1 and then that’s what will be used. The latter is also what will be picked if the server doesn’t support ALPN and NPN.
Alt-Svc and ALTSVC are new things planned to show up in time for http2 draft-11 so we haven’t really thought through how to best support them and provide their features in the libcurl API. Suggestions (and patches!) are of course welcome!
### http2 with curl
Hardly surprising, the curl command line tool also has this power. You use the –http2 command line option to switch on the libcurl behavior as described above.
### Translated into old-style
To reduce transition pains and problems and to work with the rest of the world to the highest possible degree, libcurl will (decompress and) translate received http2 headers into http 1.1 style headers so that applications and users will get a stream of headers that look very much the way you’re used to and it will produce an initial response line that says HTTP 2.0 blabla.
### Building (lib)curl to support http2
See the README.http2 file in the lib/ directory.
### This is still a draft version of http2!
I just want to make this perfectly clear: http2 is not out “for real” yet. We have tried our http2 support somewhat at the draft-09 level and Tatsuhiro has worked on the draft-10 support in nghttp2. I expect there to be at least one more draft, but perhaps even more, before http2 becomes an official RFC. We hope to be able to stay on the frontier of http2 and deliver support for the most recent draft going forward.
PS. If you try any of this and experience any sort of problems, please speak to us on the curl-library mailing list and help us smoothen out whatever problem you got!
### Tantek Çelik — Mockups For People Focused Mobile Communication
I've been iterating on mockups for people focused mobile communication for a while on the IndieWebCamp wiki for my own publishing tool Falcon, but the mockups deserve a blog post of their own.
Going back to the original people focused mobile communication experience, we've already figured out how to add a personal icon to your site so that visitors can choose "Add to Home Screen" (or similar menu option) to add icons of people (represented by their site) directly to their mobile home screens where they normally organize their apps.
The next step is to mockup what happens when they select an icon of a person and it launches their website.
I started with a mockup for how I could present communication options on my home page when viewed on an iOS7 mobile device, figuring if I can create a seamless experience there, adapting it to other mobile devices, desktop etc. would be fairly straightforward.
Thus when someone selects an icon of a person and it launches their website, they might see a home page view like this:
This is a hybrid approach, providing a look and feel familiar to the user from their "native" environment (smooth, seamless, confidence invoking), with very simply styled web content right below it so if that's all they want, they get it immediately.
#### Home with contact options
Continuing with the user flow, since they want to contact you, they select the "Contact" folder, which opens up accordingly. From there the user selects which "app" they want and it launches automatically into a new message/connection, skipping any distracting inboxes.
The various contact options are presented in preference order of the contactee.
Each of these can be optionally hidden based on presence status / availability, or time of day.
A subset of these could also be presented publicly, with others (e.g. perhaps Facetime and Skype) only shown when the visitor identifies themselves (e.g. with IndieAuth). The non-public options could either be hidden, or perhaps shown disabled, and selecting them would be discoverable way to request the visitor identify themselves.
This is enough of a mockup to get started with the other building blocks so I'm going to stop there.
I've started a wiki page on "communication" and will be iterating on the mockups there.
Got other thoughts? Upload your mockups to indiewebcamp.com and add them to the communication page as well. Let's build on each other's ideas in a spirit of open source design.
### K Lars Lohn — Redneck Broadband - fixed!
the beginning of the story
It was my fault! Monday's 28Mbps was not an anomaly. At one point in the installation, the WiFi hot spot crashed and I had to do a factory reset. Little did I know that factory reset disables the 4G radio: our throughput dropped to an abysmal 200Kbps. Once re-activated, 4G speeds came back and remain consistent.
After crowing success, then lamenting failure, I'm back to shouting "success!"
## March 08, 2014
### Tantek Çelik — Building Blocks For People Focused Mobile Communication
I'm at IndieWebCampSF and today, day 2, is "hack" or "create" day so I'm working on prototyping people focused mobile communication on my own website.
A few months ago I wrote about my frustrations with distracting app-centric communication interfaces, and how a people-focused mobile communication experience could not only solve that problem, but provide numerous other advantages as well.
Yesterday I led a discussion & brainstorming session on the subject, hashtagged #indiecomms, and it became clear that there were several pieces we needed to figure out:
• Mockups for what it would look like
• URLs for each communication service/app
• Markup for the collections of links and labels
• CSS for presenting it like the mockups
• Logic for presence / availability for each service
So that's what I'm working on and will blog each building block as I get figure it out and create it.
### Daniel Stenberg — HTTPbis design team meeting London
I’m writing this just hours after the HTTPbis design team meeting in London 2014 has ended.
Around 30 people attended the meeting i Mozilla’s central London office. The fridge was filled up with drinks, the shelves were full of snacks and goodies. The day could begin. This is the Saturday after the IETF89 week so most people attending had already spent the whole or parts of the week before here in London doing other HTTP and network related work. The HTTPbis sessions at the IETF itself were productive and had already pushed us forward.
We started at 9:30 and we quickly got to work. Mark Nottingham guided us through the day with usual efficiency.
We all basically hang out in a huge room, some in chairs, some in sofas and a bunch of people on the floor or just standing up. We had mikes passed around and the http2 discussions were flowing back and forth depending on the topics and what people felt about them. Some of the issues that were nailed down this time and will end up detailed in the upcoming draft-11 are (strictly speaking, we only discussed the things and formed opinions, as by IETF guidelines we can’t decide things on an offline meeting like this):
• Priorities of streams will have a dependency graph or direction, making individual streams less or more important than other
• A client can send headers without compression and tell the proxy that the header shouldn’t be compressed – used a way to mitigate some of the compression security problems
• There will be no TLS renegotiation allowed mid-session. Basically a client will have to tear down the connection and negotiate again if suddenly a need to use a client certificate arises.
• Alt-Svc is the way forward so ALTSVC will appear a new frame in draft-11. This is the way to signal to an application that there is another “route” to the same content on the same server. This will allow for what is popularly known as “opportunistic encryption” or at least one sort of that. In short, you can do “plain-text” HTTP over a TLS connection using this…
• We decided that a server should support gzip contents from clients
There were some other things too handled, but I believe those are the main changes. When the afternoon started to turn long, beers and other beverages were brought out and we did enjoy a relaxing social finale of the day before we split up in smaller groups and headed out in the busy London night to get dinner…
Thanks everyone for a great day. I also appreciated meeting several people in real-life I never met before, only discussed with and read emails from online and of course some old friends I hadn’t seen in a long time!
Oh, there’s also a new rough time frame for http2 going forward. Nearest in time would be the draft-11 at the end of March and another interim in the beginning of June (Boston?).
As a reminder, here’s what was happened for draft-10, and here is http2 draft-10.
Out of all people present today, I believe Mozilla was the company with the largest team (8 attendees) – funnily enough none of us Mozillians there actually work in this office or even in this country.
### Konstantinos Antonakoglou — A Creative Commons music video made out of other CC videos
Hello! Let’s go straight to the point. Here is the video:
…and here are the videos that were used having the Creative Commons Attribution licence: http://wonkydollandtheecho.com/thanks.html. They are downloadable via Vimeo, of course.
Videos available from NASA and the ALMA observatory were also used.
The video (not audio) is under the Creative Commons BY-NC-SA licence, which I think is quite reasonable since every scene used from the source videos (ok, almost every scene) has lyrics/graphics embedded on it.
I hope you like it! I didn’t have a lot of time to make this video but I like the result. The tools I used are not open source unfortunately, because the learning curve for these tools is quite steap. I will definitely try them in the future. Actually, I really haven’t come across any alternative to Adobe After Effects. You might say Blender…but is it really an alternative? Any thoughts?
PS. More news soon for the Sopler project (a web application for making to-do lists) and other things I’ve been working on lately (like MQTT-SN).
### Brendan Eich — MWC 2014, Firefox OS Success, and Yet More Web API Evolution
Just over a week ago, I left Barcelona and Mobile World Congress 2014, where Mozilla had a huge third year with Firefox OS.
We announced the $25 Firefox OS smartphone with Spreadtrum Communications, targeting retail channels in emerging markets, and attracting operator interest to boot. This is an upgrade for those channels at about the same price as the feature phones selling there today. (Yes,$25 is the target end-user price.)
We showed the Firefox OS smartphone portfolio growing upward too, with more and higher-end devices from existing and new OEM partners. Peter Bright’s piece for Ars Technica is excellent and has nice pictures of all the new devices.
We also were pleased to relay the good news about official PhoneGap/Cordova support for Firefox OS.
We were above the fold for the third year in a row in Monday’s MWC daily.
(Check out the whole MWC 2014 photo set on MozillaEU’s Flickr.)
As I’ve noted before, our success in attracting partners is due in part to our ability to innovate and standardize the heretofore-missing APIs needed to build fully-capable smartphones and other devices purely from web standards. To uphold tradition, here is another update to my progress reports from last year and from 2012.
First, and not yet a historical curiosity: the still-open tracking bug asking for “New” Web APIs, filed at the dawn of B2G by Andreas Gal.
Next, links for “Really-New” APIs, most making progress in standards bodies:
Yet more APIs, some new enough that they are not ready for standardization:
Finally, the lists of new APIs in Firefox OS 1.1, 1.2, and 1.3:
This is how the web evolves: by implementors championing and testing extensions, with emerging consensus if at all possible, else in a pref-enabled or certified-app sandbox if there’s no better way. We thank colleagues at W3C and elsewhere who are collaborating with us to uplift the Web to include APIs for all the modern mobile device sensors and features. We invite all parties working on similar systems not yet aligned with the emerging standards to join us.
/be
### John O'Duinn — RelEngCon 2014 registration is now open!
In case you missed the announcements, RelEngConf 2014 is officially now open for registrations. This follows the inaugural and wildly successful Release Engineering conference , held in San Francisco on 20may2013, as part of ICSE 2013. More background here.
Last year’s event was great. The mixture of attendees and speakers, from academia and battle-hardened industry, made for some riveting topics. So I already had high expectations for this year… no pressure on the organizers! Then I heard this years will be held in Google HQ MountainView, and feature opening keynotes from Chuck Rossi (RelEng, Facebook, click for linkedin profile), and Dinah McNutt (RelEng, Google, click for linkedin profile). Looks like RelEngConf 2014 is already lining up to be special also.
If you build software delivery pipelines for your company, or if you work in a software company that has software delivery needs, I recommend you follow @relengcon, block off April 11th, 2014 on your calendar and book now. It will be well worth your time.
See you there!
John.
### James Long — Open-Sourcing My Gambit Scheme iOS Game from 2010
Back in 2009-2010, I got Gambit Scheme running on iOS and decided to build a game with it. The result was Farmaggedon, a stupid game where you blow up farm animals to avoid being hit by them.
I blogged about my progress working with Scheme on iOS back then and evidently a lot of people were inspired by it. This was the main blog post, in addition to a bunch of videos. Recently another iOS game was featured on Hacker News that was written in Gambit Scheme, and it inspired me to dredge up the source of my game and completely open source it and talk about it.
### Background
I used to work with Lang Martin and Ben Weaver at a small webdev shop right out of college. They were a little older than me and far more technically grounded than I was at the time. Occasionally I would hear "lisp" and "scheme" murmured around the office while trying to focus on my C++ game engine side project, and I thought they were just trying to sound cool.
Boy was my mind about to be blown. Eventually we all decided to play around with Scheme and see if we could use it internally. I knew nothing about it, but I tried to keep up with the conversation and more often than not ended up saying foolish things. Tired of feeling out of my depth, I committed to studying Scheme and it still influences me to this day. This is why it's so important to surround yourself with people smarter than you. I got lucky.
Fast-forward a few years later, I was feeling burned out at my job and decided to quit and try freelancing. I set aside the first few months to try and make an iOS game (this was right around the time iOS was exploding). Having fallen in love with Scheme, I endeavoured to make a game with Scheme and prove that it can be practical and performant, as well as making you more productive.
### Show Me the Source!
Enough talking, here's the source. You're looking at a completely unfiltered, raw project. Everything I was thinking of is in there somewhere. You're also looking at the messiest project with the worst code, ever.
I was so naïve back then. Set aside a couple months to build a game from scratch, including porting a whole language to a completely new platform? Are you kidding me?
I ported Gambit Scheme to iOS, which basically just means cross-compiling with the right options and writing the necessary FFIs. The actual port wasn't too much work, which was exciting but dangerous because it blinded me to the fact that I would have to build everything myself. Not only was I lacking an OpenGL rendering library, I didn't even have access to the OpenGL API. I had to write an FFI for that. (Actually, I wrote a Scheme program that parsed C++ header files and auto-extracted it.)
Additionally, I created sounds, 3d models, game mechanics, user interfaces, and a basic 3d engine. See all the resources here. I did hire a local designer to make some really cool gritty nuclear farm graphics for the game, but everything else I did myself. Which is why the game is terrible.
Regardless of how badly Farmageddon failed commercially, it was one of the most transformative experiences of my life. I learned tons about project scope, marketing, games, and a lot of other stuff. But even more, I got to experience working in a minimal but powerful language that I could shape to my needs, with a REPL/debugger always there to incrementally play with things.
It wasn't just continuations, green threads, macros, records, and tail-call optimizations that made me a better programmer. It was the idea of incremental development, where you could always redefine a function at run-time to try something new, or inspect and change any data structure. We've come close to that with browser devtools, but the experience still isn't quite what it should be.
So if you haven't aready, you really should learn a Lisp. Personally I like Gambit, but Chicken and Racket are really good too. Clojure is great too, just a different flavor because it's not a minimal Scheme. It doesn't matter. Learn one of them.
### Development Videos
These are some videos I made showing off the real-time REPL and debugger. The first two were the most popular.
There are a few other ones as well.
### Source Commentary
The code is incredibly messy, but I feel warm and nostalgic looking at it. There are a few interesting things to point out about it.
1. Most of the Obj-C code is in src/app. The entry point is in main.m which initializes and configures the Gambit virtual machine. EAGLView.mm is where most of the code lies to interact with the iOS UI.
2. The main entry point for Scheme is in src/init.scm. At that bottom of the file are two FFI functions: c-init and c-render. Those are exposed as init and render at the C level and the Obj-C code calls into them.
3. All of the FFIs are in src/ffi. I think I wrote most of them by hand, and auto-generated a few of them. What's need about Gambit is that you can embed any kind of C/C++/Obj-C code. For example, here is the FFI for invoking methods in the iOS view for changing the UI. The scheme methods embed Obj-C code straight into them. You can see more of this in the iOS FFI which lets me allocate native iOS data structures. Lastly, you can see my attempts at optimizations by converting Scheme vectors into native C arrays.
4. The main game loop is in farmageddon.scm. Most of the work is in the various screens, like level.scm which renders and updates the main game.
5. The main component of the game engine is in src/lib/scene.scm. I used Gambit's native record types and wrote a macro to generate fields that dynamically dispatched of the type for making game entities.
6. All of my tests were simply top-level Scheme code that I live evaluated when the game was running. No automation for me!
7. Gambit has a powerul cooperative threading system, and I used it extensively. The game and sound system each had a thread and would send messages to the main thread for changing the game state. Each level had a thread running to fire off events at random intervals, and I could simply call thread-sleep! to wait for a certain period. Note that these aren't real threads, just cooperative so it was all safe.
8. The remote debugger is in the emacs directory and my Emacs integration was called grime. Since I had a live REPL to my game in Emacs, I even wrote helper functions in Emacs to change game state and bound them to keys so I could quickly invoke them.
There's a lot more in there, and like I said it's very messy. But there's a lot of gems in there too. I hope it continues to inspire others.
## March 07, 2014
### Selena Deckelmann — Weekly Feminist Work in Tech by Mozillians roundup – Week of March 3, 2014
We have a ton of individual work done by MoFo and MoCo employees related to feminism, feminist activism and the larger technology community. So much is happening, I can barely keep track!
I’ve reached out to a few people I work with to get some highlights and spread the word about interesting projects we’re all working on. If you are a Mozillian and occasionally or regularly work on feminist issues in the tech community, please let me know! My plan is to ping people every Friday morning and post a blog post about what’s happened in the last week.
Dispatch from me, Selena Deckelmann:
• I’m presenting at SF Github HQ on Thurs March 13, 7pm as part of the Passion Projects series (Julie Horvath’s project). I’ll be talking about teaching beginners how to code and contribute to open source, specifically through my work with PyLadies. I’m giving a similar talk this afternoon at Portland State University to their chapter of the ACM.
• Just wrapped up a Git workshop for PyLadiesPDX and am gearing up for a test-run of a “make a Flask blog in 80-lines of code” workshop! Course materials are available here for “intro to git” workshops.
• Lukas, Liz, me and others (I’m not sure who all else!!) are coordinating a Geekfeminism and feminist hackerspace meetup at PyCon 2014. The details aren’t published yet, so stay tuned!
• PyLadies PyCon 2014 lunch is happening again!
• PyLadies will also be holding a Mani-Pedi party just like in 2013. Stay tuned for details!
• Brownbags for the most recent GNOME Outreach Program for Women contributors are scheduled for next Friday March 14, 10am and 2pm. (thanks Larissa!!) Tune in at http://air.mozilla.com. One of the GNOME Outreach Program for Women contributors is Jennie Rose Halperin, and another is Sabina Brown.
Dispatch from Liz Henry:
• I’m doing a lot of work to support Double Union feminist hackerspace, a nonprofit in San Francisco. We are hosting tech and arts workshops, and establishing connections with other hackerspaces in the US and around the world. Lukas is also involved with this effort! We have over 100 members now using the space.
• For PyCon I would like to host fairly informal sessions in our Feminist Hacker Lounge, on QA, bug triaging, and running/writing WebQA automated tests with pytest and selenium.
• I’m hoping to have funding for an OPW intern for this upcoming round to work on the back end of a QA community facilitating tool, using Python and various APIs for Mozilla tools like Bugzilla, Moztrap, and the Mozillians profiles.
Dispatch from Lukas Blakk:
• Just held the Lesbians Who Tech hackathon at the Mozilla SF space and it was an amazing weekend of networking, recruiting for Mozilla, doing a stump speech on the radical/political possibilities of open source, and also just a lot of social fun.
• I’m nearing the point of Project Kick Off for The Ascend Project which will be a 6 week training course for underrepresented in current tech mainstream (and underemployed/unpaid) persons who will learn how to write automatable tests for MozMill. This first one will take place at the Portland office in Sept/Oct 2014 (Starts on Sept 8th). There’s so much more here, but this is just a sound bite.
• I’m trying to determine what budget I can get agreement on to put towards women in tech outreach this year.
• PyCon – yes! Such Feminist, So Hackerspace, Much gathering of geek feminists!
Dispatch from Larissa Shapiro:
• OPW wrapup and next session – we’re wrapping up the current round, scheduling brownbags for two of the current interns, etc. Funding is nearly secured for the next round and we have like 6 willing mentors. w00t.
• I’m also providing space for/speaking at an upcoming event in the Mountain View office: last year’s African Techwomen emerging leaders were part of a documentary and the Diaspora African Women’s Network is holding a screening and a planning session for how to support next year’s ELs and other African and African-American bay area women in tech both through this and other projects, March 29. Open to Mozilla folks, let me know if you’re interested.
Anything else that’s come up in the last week, or that you’d like Mozillians to know about? Let me know in the comments!
### Ludovic Hirlimann — Thunderbird 28.0b1 is out and why you should care
We’ve just released another beta of Thunderbird. We are now in the middle of the release cycle until the next major version is released to our millions of daily users. (we’ve fixed 200+ bugs since the last major release (version 24)). We currently have less than 1% of our users - using the beta and that’s not enough to catch regressions - because Thunderbird offers mail, newsgroups and rss feeds we can’t cover the usage of our user base. Also many companies out there sell extensions for spam filtering, for virus protection and so forth. The QA community just doesn’t have the time to try all these and run these with Thunderbird betas to find issues.
And that’s where you dear reader can help. How you might ask well here is a list of examples of how you can help :
• you are a reps ? make this post available in your language ….
• You help on a support forum - link to the beta download page explaining why it’s important to have more users on beta
• You work for a vendor that sell a product that integrates in Thunderbird ? Qualify your product with the beta so when we ship final we both won’t get surprises.
• Your company uses Thunderbird ? Setup a small group of beta users and gather the bugs, issues and let us know.
If you find issues let us know either thru bugzilla or thru the support forums, so we can try to address them.
ps the current download page says English only because of a bug in our build infrastructure for windows. Linux and Mac builds are available localized.
### Al Billings — TrustyCon Videos Available
TrustyCon 2014 (maybe the only one ever) happened the other week as a competitor to the RSA convention because of perceived RSA collaboration with the NSA and all of the kerfuffle around the NSA and surveillance this last year. As they say on their site, “We welcome all security researchers, practitioners and citizens who are interested in discussing the technical, legal and ethical underpinnings of a stronger social contract between users and technology.”
The event sold out quickly so I was unable to attend. Helpfully, it was livestreamed, making it available to everyone and the resulting video was put up on youtube. Unfortunately, this video is one, ginormous, seven hour video. I don’t know about you but I like my viewing in smaller chunks. I also tend to listen to talks and presentations, especially when there is no strong visual component, by saving the audio portion of it to my huffduffer account and listening to the resulting feed as a podcast.
I took it on myself to do a quick and dirty slice and dice on the seven plus hour video. It isn’t perfect (I’m a program manager, not a video editor!) but it works. I’ve uploaded the resulting videos to my youtube channel in order to not destroy any servers I own. You can find the playlist of them all here but I’ve also included the videos embedded below.
Additionally, I extracted the audio from each of these files and put an audio collection up on the Internet Archive, for people like me who just want to listen to them.
TrustyCon 2014 - Opening Remarks
TrustyCon 2014 - The Talk I Was Going to Give at RSA
TrustyCon 2014 - The Laws and Ethics of Trustworthy Technology
TrustyCon 2014 - Joseph Menn Interviews Bruce Schneier
TrustyCon 2014 - Securing SecureDrop
TrustyCon 2014 - New Frontiers in Cryptography
TrustyCon 2014 - Trusted Computing Tech and Government Implants
TrustyCon 2014 - Community Immunity
TrustyCon 2014 - Redesigning NSA Programs to Protect Privacy
TrustyCon 2014 - Thank You and Goodbye
## March 06, 2014
### Jess Klein — Designing BadgeKit
After several months of hard work by the Open Badges team, we are announcing that BadgeKit is available for access to Private Beta. This means that BadgeKit is now available in two forms: a hosted version of Mozilla BadgeKit available in private beta for select partner organizations that meet specific technical requirements, and anyone can download the code from GitHub and implement it on their own servers.
BadgeKit is a set of open, foundational tools to make the badging process easy. It includes tools to support the entire process, including badge design, creation, assessment and issuing, remixable badge templates, milestone badges to support leveling up, and much more. The tools are open source and have common interfaces to make it easy to build additional tools or customizations on top of the standard core, or to plug in other tools or systems.
From a design perspective, this milestone represents refinements in user research and testing, user experience, user interface and branding.
We did user testing with members of the Hive in Brooklyn.
In preparation for this release, we conducted extensive user research to define the needs and goals for badge issuers. This work, led by Emily Goligoski, helped to define requirements for the BadgeKit offering as well as inform the user experience. The research was done using a variety of methodologies, however, it is worth noting that all of this work was done in the open. Emily organized distributed user testing in key markets such as New York, Chicago and Toronto to do everything from needs analysis to accessibility and functionality testing. The Open Badges weekly community calls were leveraged to pull in input from the highly motivated research and practitioner cohorts. Much of the work is documented both on her blog and in github. We paired every implementation milestone with some form of user testing and iteration. While this may sound obvious, it was a new way of working for our team, and I can unequivocally say that the product is better because of this practice. User research and testing did not happen in a bubble, but rather it became completed integrated with our design and implementation cycle. As a result, developers and designers became comfortable making informed iterations on the offering, as developers, designers and team researchers all participated in some form of user testing over the past three months.
As a direct result of the extensive research and testing, the user experience for the entire BadgeKit offering was deeply refined. This work, led by Matthew Willse introduced some new features, such as badge “templates” which give the ability for any badge issuer to clone a badge template and remix it. This gives us the unique ability to offer template packages based on common badge requests from the community, as well as eventually to empower the large Open Badges ecosystem to develop badge templates of their own (and perhaps explicitly state how they are comfortable with their content being shared and remixed). One component of this work that evolved as a direct result of testing, was the increased attention to copy. Sue Smith led this work, which entailed everything from tool tip development and a glossary to API documentation. Considering that BadgeKit takes an issuer from badge definition
and visual design
to assessment and issuing,
designing the user experience was no small effort and the attention to detail combined with designing in the open - proved to be a solid approach for the team.
Perhaps the most obvious design component of this release is the user interface design and brand definition. Adil Kim kicked off this work with an exploration of the brand identity. BadgeKit is under the parent brand of OpenBadges, which sits under the even larger parent brand of Mozilla - which gave us the constraints of designing within the brand guidelines. After exploring options to represent the visual metaphor for this modular system, here is the new logo:
The logo is meant to evoke the imagery of both a badge as well as a tool in one glance. For the untrained craftsperson (ahem) - while gazing into the mark - you will see a bolt . This connotes that BadgeKit is a tool, something that allows you to dive into the details and construct a badge, and a system for your community. The logo incorporates the palette from Mozilla Open Badges, in a playful mobius - at once implying that while this is a handcrafted experience, it is also a seamless one. This logo nicely fits into the larger brand family while reading on it’s own, as if to say, “hey, BadgeKit is the offering for badge MAKERS, dive in and get your hands dirty!”
The brand is in turn extended to user interface design. The overall art direction here was that this needs to be clean, yet approachable. We know that many organizations will not be using all of the components in the interface directly on badgekit.org, however, the design needs to take into account that everything needs to be accessible and read as remixable. Some details to note here are the simplified navigation, the palette and subtle details like the ability to zoom on hover over thumbnails.
It’s worth noting that while Emily, Matthew, Sue and Adil , as well as Carla, Meg, Erin, Jade, Sabrina Ng, Chloe and Sunny were invested in much of this design work, there was an intentional yet organic partnership with the developers (Zahra, Erik, Andrew, Chris, Mavis Ou, Mike and Brian + many, many community contributors) who were doing the implementation. We had weekly critiques of the work and often engaged in conversation about design as well as implementation on github.
Another component of this work is looking ahead towards future features. Chloe Varelidi lead work here thinking through the potential for badge and skill discovery. Under a grant from The Bill & Melinda Gates Foundation, Chloe and her team are thinking through ways to represent earner pathways. This eventually will be leveled up into the core BadgeKit offering, but you can start to dip your toes into those features by checking out the work here.
And the good news is that design never ends! Design isn’t just a destination, it’s an invitation to a conversation. Check it out, let us know what’s working and importantly, what’s not.
### Jim Chen — Fennec App Not Responding (ANR) Dashboard
Over the last few months, I've been working on an improved App Not Responding (ANR) dashboard for Fennec, which is now hosted at telemetry.mozilla.org/hang/anr. With the help of many people, I'm glad to say that the dashboard is now mature enough to be a useful tool for Fennec developers.
### ANR Reporting
The idea of ANR/hang reporting is similar to crash reporting — every time the Fennec UI becomes unresponsive for more than five seconds, Android would show an “App Not Responding” dialog; the ANR Reporter detects this condition and collects these information about the hang:
• Stacks for Java threads in Fennec
• Stacks for Gecko threads (C++ stacks and profiler pseudo-stacks)
• System information listed in about:telemetry
• Fennec logs to help debug the hang
The ANR Reporter is enabled on Nightly and Aurora builds only, and if the user has not opted out of telemetry, the collected information is sent back to Mozilla, where the data are aggregated and presented through the ANR Dashboard. Because the debug logs may contain private information, they are not processed and are only available internally, within Mozilla.
### ANR Dashboard
The ANR Dashboard presents weekly aggregated data collected through the ANR reporter. Use the drop-down list at the top of the page to choose a week to display.
Data for each week are then grouped by certain parameters from ANR reports. The default grouping is “appName”, and because ANR reports are specific to Fennec, you only see one column in the top hangs chart labeled “Fennec”. However, if you choose to group by, for example, “memsize”, you will see many columns in the chart, with each column representing a different device memory size seen from ANR reports.
Each column in the top hangs chart shows the number of hangs, and each column is further divided into blocks, each representing a different hang. Hover over the blocks to see the hang stack and the number of hangs. This example shows 8 hangs with that signature occurred on devices with 768MB of memory over the past week.
Colors are preserved across columns, so the same colored blocks all represent the same hang. The blue blocks at the bottom represent all hangs outside of the top 10 list.
To the right of the top hangs chart is the distributions chart. It shows how different parameters are distributed for all hangs. Hover over each block to see details. This example shows 36% of all hangs occurred on devices running Android API level 15 (corresponding to Android 4.0.3-4.0.4 Ice Cream Sandwich) over the past week.
The distributions chart can also be narrowed down to specific groups. This would let us find out, for example, on devices having 1GB of memory, what is the percentage of hangs occurring on the Nightly update channel.
Clicking on a block in the top hangs chart bring up a Hang Report. The hang report is specific to the column that you clicked on. For example, if you are grouping by “memsize”, clicking on a hang in the “1G” column will give you one hang report and clicking on the same hang in the “2G” column will give you a different hang report. Switch grouping to “appName” if you want to ignore groups — in that case there is only one column, “Fennec”.
The hang report also contains a distributions chart specific to the hang. The example above shows that 14% of this hang occurred on Nexus 7 devices.
In addition, the hang report contains a builds chart that shows the frequency of occurrence for different builds. This example shows there was one hang from build 20140224030203 on the 30.0a1 branch over the past week. The chart can be very useful when verifying that a hang has been fixed in newer builds.
Last but not least, the hang report contains stacks from the hang. The stacks in the hang report are more detailed than the stack shown on the main page. You can also look at stacks from other threads — useful for finding deadlocks!
### Normalization
When comparing the volume of hangs, a higher number can mean two things — the side with higher number is more likely to hang, or the side with higher number has more usage. For example, if we are comparing hangs between devices A and B, and A has a higher number of hangs. It is possible that A is more prone to hanging; however, it is also possible that A simply has more users and therefore more chances for hangs to occur.
To provide better comparisons, the ANR Dashboard has a normalization feature that tries to account for usage. Once “Normalize” is enabled at the top of the dashboard, all hang numbers in the dashboard will be divided by usage as measured by reported uptime. Instead of displaying the raw number of hangs, the top hangs chart will display the number of hangs per one thousand user-hours. For example, 10 hangs per 1k user-hour means, on average, 1000 users each using Fennec for one hour will experience 10 hangs combined; or equivalently, one user using Fennec for 1000 hours will experience 10 hangs total. The distributions chart is also updated to reflect usage.
As a demonstration, the image below shows un-normalized hangs grouped by device memory size. There is no clear trend among the different values.
The image below shows normalized hangs based on the same data. In this case, it is clear that, once usage is accounted for, higher device memory size generally corresponds to lower number of hangs. Note that the “unknown” column became hidden because there is not enough usage data for devices with “unknown” memory size.
At the moment, I think uptime is the best available measurement for usage. Hopefully there will be a better metric in the future to provide more accurate results. Or let me know if it already exists!
### Peter Bengtsson — Github Pull Request Triage tool
Last week I built a little tools called github-pr-triage. It's a single page app that sits on top of the wonderful GitHub API v3.
Its goal is to try to get an overview of what needs to happen next to open pull requests. Or rather, what needs to happen next to get it closed. Or rather, who needs to act next to get it closed.
It's very common, at least in my team, that someone puts up a pull request, asks someone to review it and then walks away from it. She then doesn't notice that perhaps the integrated test runner fails on it and the reviewer is thinking to herself "I'll review the code once the tests don't fail" and all of a sudden the ball is not in anybody's court. Or someone makes a comment on a pull request that the author of the pull requests misses in her firehose of email notifictions. Now she doesn't know that the comment means that the ball is back in her court.
Ultimately, the responsibility lies with the author of the pull request to pester and nag till it gets landed or closed but oftentimes the ball is in someone elses court and hopefully this tool makes that clearer.
Here's an example instance: https://prs.paas.allizom.org/mozilla/socorro
Currently you can use prs.paas.allizom.org for any public Github repo but if too many projects eat up all the API rate limits we have I might need to narrow it down to use mozilla repos. Or, you can simply host your own. It's just a simple Flask server
I'm getting more and more productive with Angular but I still consider myself a beginner. Saying that also buys me insurance when you laugh at my code.
So it's a single page app that uses HTML5 pushState and an angular routeProvider to make different URLs. The server simply acts as a proxy for making queries to api.github.com and bugzilla.mozilla.org/rest and the reason for that is for caching. Every API request you make through this proxy gets cached for 10 minutes. But here's the clever part. Every time it fetches actual remote data it stores it in two caches. One for 10 minutes and one for 24 hours. And when it stores it for 24 hours it also stores its last ETag so that I can make conditional requests. The advantage of that is you quickly know if the data hasn't changed and more importantly it doesn't count against you in the rate limiter. ### Pierros Papadeas — Contribution Activity Metrics – Early attempts and fails As we examined with the intro post, the need for contribution activity metrics for different contribution areas in Mozilla has been high. It was only logical that many attempts were made to address this issue, mainly on the area-level (and not in Mozilla-wide level). Almost all of them had zero interaction between each other, and there was a general lack of vision for an holistic approach to the problem. After one of our initial gatherings as the (then meta-) Community Building Team, a couple of people brainstormed together a possible solution to our problem. Together with Josh Matthews, Giorgos Logiotatidis, Ricky Rosario and Liz Henry a new approach was born. Enter project Blackhole! Project Blackhole was a collaborative effort to develop and maintain an infrastructure of gathering and serving raw contribution data within Mozilla. We created a data architecture and flow together with a data Schema and specification to describe contribution activities for the first time in Mozilla. The project went far enough (thanks to Josh) to create a working prototype for back-end and front-end. What went right: Having a single project to drive multiple metrics efforts forward got people engaged. Everyone saw the value of de-duplicating efforts and tapping into that as a resource. Also during the process of designing and testing it we were able to self-identify as a group of people that share interest and commitment towards a common goal. Most of those people went on to become active members of the Systems and Data Working Group. Finally, we ended up with a common language and descriptions around contribution activities, a really valuable asset to have for the future of cross-project tracking. What went wrong: Building *anything* from scratch can be hard. Really hard. First, everyone (rightfully) questions the need to build something instead of re-using what is out there. Once you get everyone on board, development and deployment resources are hard to find especially on a short notice. On top of that Blackhole’s architecture *seemed* logical enough in theory, but was never tested in scale so everyone involved was not 100% sure that our architecture would survive stress tests and the scale of Mozilla’s contribution ecosystem. PRO TIP: Changing the project name does not help. We went from “Blackhole” to “Wormhole” (and back to “Blackhole”?), to better reflect the proposed data flow (data would not disappear forever!) and people got confused. Really confused. Which is obviously something that is not helpful during conversations. Pick a name, and stick to it! Lack of a team dedicated to it and inability to get the project listed as a personal goal of people (or teams), halted any progress leading us to a fearsome dead-end. What we learned: As with most failures, this one was also really valuable. We learned that: • we need to be a top line goal for people and teams • we need to examine really well what is out there (internally or externally to Mozilla) and investigate the possibility of re-using it. • we need a clear and common language to make communications as effective as possible • we need to be inclusive in all our procedures as a working group, with volunteers as well as all paid staff. • and in true Mozilla fashion: we need to start small, test and iterate with a focus on modularity. A way forward? Having those lessons learned from the process, we sat down last December as a group and re-aligned. We addressed all 5 issues and now we are ready to move forward. And the name of it? Baloo. Stay tuned for more info on our next detailed post ### Andrew Halberstadt — Add more mach to your B2G #### Getting Started tl;dr - It is possible to add more mach to your B2G repo! To get started, install pip: wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py -O - | python
Install b2g-commands:
$pip install b2g-commands To play around with it, cd to your B2G repo and run: $ git pull # make sure repo is up to date
$./mach help # see all available commands$ ./mach help <command> # see additional info about a command
#### Details
Most people who spend the majority of their time working within mozilla-central have probably been acquainted with mach. In case you aren't acquainted, mach is a generic command dispatching tool. It is possible to write scripts called 'mach targets' which get registered with mach core and transformed into commands. Mach targets in mozilla-central have access to all sorts of powerful hooks into the build and test infrastructure which allow them to do some really cool things, such as bootstrapping your environment, running builds and tests, and generating diagnostics.
A contributor (kyr0) and I have been working on a side project called b2g-commands to start bringing some of that awesomeness to B2G. At the moment b2g-commands wraps most of the major B2G shell scripts, and provides some brand new ones as well. Here is a summary of its current features:
• Bootstrap your environment - sets up system packages needed to build (includes setting up gcc-4.6)
• Easy to discover arguments - no need to memorize or look up random environment variables
• Helpful error messages where possible - clear explanations of what went wrong and how to fix it
• Fully compatible with existing build system including .userconfig
• List Android vendor ids for udev rules
• Clobber objdir/out directories
I feel it's important to re-iterate, that this is *not* a replacement for the current build system. You can have b2g-commands installed and still keep your existing workflows if desired. Also important to note is that there's a good chance you'll find bugs (especially related to the bootstrap command on varying platforms), or arguments missing from your favourite commands. In this case please don't hesitate to contact me or file an issue. Or, even better, submit a pull request!
If the feature set feels a bit underwhelming, that's because this is just a first iteration. I think there is a lot of potential here to add some really useful things. Unfortunately, this is just a side project I've been working on and I don't have as much time to devote to it as I would like. So I encourage you to submit pull requests (or at least submit an issue) for any additional functionality you would like to see. In general I'll be very open to adding new features.
#### Future Plans
In the end, because this module lives outside the build system, it will only ever be able to wrap existing commands or create new ones from scratch. This means it will be somewhat limited in what it is capable of providing. The targets in this module don't have the same low-level hooks into the B2G and gaia repos like the targets for desktop do into gecko. My hope is that if a certain feature in this module turns out to be especially useful and/or widely used it'll get merged into the B2G repo and be available by default.
Eventually my hope is that we implement some deeper mach integration into the various B2G repos (especially gaia) which would allow us to create even more powerful commands. I guess time will tell.
### Christian Heilmann — Translating marketing texts for speaking – an experiment
As part of the workweek I am currently at I set a goal to give a brownbag on “writing for speaking”. The reasons is that some of the training materials for the Mobile World Congress I recorded were great marketing/press materials but quite a pain to speak into a camera reading them from a teleprompter.
For the record: the original text is a good press release or marketing article. It is succinct, it is full of great soundbites and it brings the message across. It is just not easy to deliver. To show the issues and explain what that kind of wording can come across as I took the script apart. I explained paragraph by paragraph what the problems are and proposed a replacement that is more developer communication friendly. You can see the result on GitHub:
http://codepo8.github.io/marketing-translation/
The result is an easier to deliver text with less confusion. Here’s a recording of it to compare.
I will follow this up with some more materials on simpler communication for speaking soon.
### Lawrence Mandel — Lawrence Mandel Joins Mozilla Release Management
I’m excited to share that I am stepping into a new role with Mozilla as manager of the Release Management team. Below is an e-mail that my friend and manager Sheila Mooney sent to Mozilla employees last week announcing this change.
Date: Fri, 28 Feb 2014 11:19:07 -0800 (PST)
From: Sheila Mooney
To: team Mozilla
Subject: Changes in Release Management
All,
I am happy to share some changes I am making to my team. Effective immediately, Lawrence Mandel will be moving into the role of Manager of the Release Management team. With the Release Managers in tight collaboration with the Project/Program Managers, we can think beyond just keeping the trains running on time and tighten our focus on quality, metrics and process to ensure we are shipping the best possible products to our users. Lawrence's experience inside and outside Mozilla aligns closely with these goals and I am very excited to see what he does with this role!
Lawrence will be transitioning many of his current project management responsibilities to others in my team in order to focus fully on this new challenge. The Web Compatibility Engineers will continue to report to him and Chris Peterson will report to me
directly.
Please join me in congratulating Lawrence on his new opportunity!
Cheers,
Sheila
Tagged: mozilla, release management
### Byron Jones — happy bmo push day!
the following changes have been pushed to bugzilla.mozilla.org:
• [977505] Make the dashboard white-on-red counter easier to click
• [975195] “Your Outstanding Requests” emails don’t include superreview requests
• [956229] develop a system to track the lifetime of review/feedback/needinfo requests
• [926962] all tracking flags are visible on the ‘change many bugs at once’ page
• [977761] Create product and affiliations for Intellego project
• [978941] grammar issue
• [916633] join_activity_entries doesn’t reconstitute text with commas correctly.
• [966180] enable USE_MEMCACHE on most objects
• [956230] improve instrumentation of bugzilla’s internals
• [979092] changing timezone breaks MyDashboard
• [979727] increase the mod_perl sizelimit to 700_000 on production
• [979411] Fix content-type for woff files
• [977137] Comment and Preview tabs need accessibility markup
• [977523] Comment textarea has padding:0
• [980056] ReferenceError: REVIEW is not defined page.cgi javascipt error when viewing a patch in Splinter
• [979431] Please rename Talkilla product to Loop and update User Stories extension
discuss these changes on mozilla.tools.bmo.
Filed under: bmo, mozilla
### Amazon Pricing - Expensive or Cheap?
Amazon ondemand nodes are fantastic for rapid iteration, but using them in production is expensive naivety. It is expensive for Amazon to maintain spare capacity to allow customers to launch any of the wide variety of nodes they offer ondemand. Forecasing demand at Amazon scale can’t be easy. As a result, Amazon recommends that customers buy reserves with an upfront payment then pay a discounted rate after. This is brilliant as it shifts the capacity-planning burden to each customer. This would net us a 60% discount if we we could forecast our AWS usage perfectly.
Fortunately Amazon also has a spot-pricing model. Spot prices can be 70-90% lower than ondemand (we’ve also seen them 50% higher). The downside is that Amazon can kill these nodes at any point and node availability is limited compared to ondemand. Given that Amazon competition can’t match spot prices, Amazon might be selling their unused ondemand capacity at cost. I doubt that anyone smaller than Amazon can maintain their own hardware with salaried ops for less than Amazon’s spot prices.
### Spot Everything
we spent 2014 retrofitting our continuous integration architecture to cope with failure so we can run more of our workload on spot nodes.
On our January AWS bill we were 30% more cost-efficient. This was accomplished late in the month, we managed to have the bill not go up to cope with a higher-than-ever load. For February we were aiming to drop the bill to under $80K. The following is a summary of where we are. ### Provisioning • We now run the majority of our workload on Amazon spot nodes. Spot:ondemand ratio is between 2:1 and 7:1. Note we still pay more for ondemand portion of our bill because ondemand is a lot more expensive • At$74,389.03, our Feb bill is 36% lower than Jan.
• Our current AWS spending per job is approximately half of what we paid in December
• We now bid on a range of AWS node types to maximize node availability and minimize price. This results in >=50% lower spot bill. We now run a portion of our workload on 2x-faster VMs when cheaper spot machine types are not available.
### Scheduling
• Our AWS scheduler ramps up slower now to avoid temporary overprovisioning. Note the improvement on the right side of the graph (tall & narrow spikes are bad)
### Monitoring
• We are evaluating hostedgraphite.com for monitoring our efficiency. It’s nice to have someone offer a well-supported open-source-compatible solution that can cope with 30K+ of metrics our 1000s of VMs generate.
### Mozilla Data Center plans for March
Amazon S3 is cheap, fast and robust. EC2 is incredibly flexible. Both are great for quickly iterating on cool ideas. Unfortunately most of our infrastructure runs on physical machines. We need to improve our non-elastic inhouse capacity with what we learned in the cloud:
• Use a shared object cache for Windows/Mac builds. This should more than double Windows build speed. The plan is to use Ceph for S3-compatible shared object storage.
• Get OpenStack bare metal virtualization working so we could move as fast there as we do in EC2
### Cloud Plans for March
• Eliminate EBS usage for faster builds, 10% lower EC2 bill. Amazon EBS is the antithesis of cost-effectiveness.
• Deploy more jacuzzis for faster builds, less EC2 instances
• Run more things on spot, switch to cheaper ondemand nodes, maybe buy some reserves
• Bid on an even wider variety of spot nodes
• Probably wont hit another 30% reduction, focusing on technical debt, better metrics, etc
• Containerization of Linux builds
### Conclusion
Cloud APIs make cost-oriented architectures fun. Batch nature of c-i is a great match for spot.
In general, spot is a brilliant design pattern, I intend to implement spot workloads on our own infra. It’s too bad other cloud vendors do not offer anything comparable.
## March 05, 2014
### Dave Townsend — Developer Tools meet-up in Portland
Two weeks ago the developer tools teams and a few others met in the Portland office for a very successful week of discussions and hacking. The first day was about setting the stage for the week and working out what everyone was going to work on. Dave Camp kicked us off with a review of the last six months in developer tools and talked about what is going to be important for us to focus on in 2014. We then had a little more in-depth information from each of the teams. After lunch a set of lightning talks went over some projects and ideas that people had been working on recently.
After that everyone got started prototyping new ideas, hacking on features and fixing bugs. The amount of work that happens at these meet-ups is always mind-blowing and this week was no exception, even one of our contributors got in on the action. Here is a list of the things that the team demoed on Friday:
This only covers the work demoed on Friday, a whole lot more went on during the week as a big reason for doing these meet-ups is so that groups can split off to have important discussions. We had Darrin Henein on hand to help out with UX designs for some of the tools and Kyle Huey joined us for a couple of days to help work out the final kinks in the plan for debugging workers. Lot’s of work went on to iron out some of the kinks in the new add-on SDK widgets for Australis, there were discussions about memory and performance tools as well as some talk about how to simplify child processes for Firefox OS and electrolysis.
Of course there was also ample time in the evenings for the teams to socialise. One of the downsides of being a globally distributed team is that getting to know one another and building close working relationships can be difficult over electronic forms of communication so we find that it’s very important to all come together in one place to meet face to face. We’re all looking forward to doing it again in about six months time.
### Brian R. Bondy — Investing in our community through Code Firefox
Mozilla 2014 Goal
As Deb Cohen (VP, Chief of People) said:
Our goal this year is to find new ways for people to become part of us. This year we have a very aggressive goal, for all of us to look inside our teams, our work, our organization, and create some of these pathways.
What is Code Firefox?
The Code Firefox site (@codefirefox), is a new video and exercise framework which is highly inspired by Khan Academy. Its purpose is for on-boarding contributors and sharpening the skills of existing community members.
People learn differently. Providing different ways to consume information is crucial to growing Mozilla. For many people, Code Firefox provides an easier, and more consumable approach to learning how to contribute to Mozilla.
Would you like to start contributing patches to Mozilla? Start here
Testimonial
One prime example of Code Firefox's usefulness is of a new contributor who joined last month, and actively uses Code Firefox. He has already submitted 18 patches.
In a personal email Anuj Agarwal (Student at Vellore Institute of Technology) writes:
Just for fun, here is the patch I got reviewed today! And it was made possible only because of your tutorials. Thank you!
Code Firefox statistics
The site has not been promoted yet, but it already has:
• ~46,000 unique visits since it was released on October 30, 2013
• ~10,000 full video views across the 53 videos
• Most functionality is available without accounts, but there are still over 110 Code Firefox accounts and 35 YouTube subscribers. Most of these accounts are new Bugzilla users as well and several have patches.
What has Code Firefox accomplished?
51 videos, 3 exercises focused mostly on on-boarding new Firefox developers
Videos are captioned
Ability to track watched videos and completed exercises when logged in
Exercise framework that parses code and gives immediate feedback and experience
Videos and Exercises are accessible and searchable through tags
Where is the Code Firefox site going? (Code Firefox Goals)
Opening up the ability to post videos to other people
Ability to create different "Outline tracks", for example, a QA track.
More video and exercise content being added, initially for Firefox OS and Desktop
Working more closely with Student Ambassadors
Implement a point system
Interoperability with Mozillians in creative ways
Implementing hints for exercises
Highlights of benefits gained by Mozilla from the site
Brings in new contributors
Retains new and existing contributors
Sharpens skills of existing members of our community
Code Firefox uses and promotes Persona
Code Firefox will use and promotes Open Badges
Media coverage of Code Firefox so far
Some people have taken the time to write about Code Firefox:
What our community is saying
• Robert O'Callahan (Distinguished Engineer):
In all my years with Mozilla I've never seen such an exciting effort to engage new Firefox contributors. Well done!
• Josh Matthews (Community Engagement Lead):
To me, Code Firefox's value lies in the clear, forthright instruction provided, along with the bite-sized nature of the lessons, which provides a counterpoint to the existing long-winded and slightly overwhelming textual documentation. I have interacted with countless potential volunteers over the past several years, and there is a non-trivial segment of the population that immediately looks for instructional videos to aid in understanding. In addition, perhaps counter-intuitively, video explanations are often preferred by non-native English speakers as a visual reference to aid in comprehension, and I'm often asked at events whether these exist for Firefox development.
• Chris Peterson (Engineering Program Manager):
Facebook has its infamous bootcamp for new employees. Code Firefox should be required watching, end-to-end, for all new Mozilla engineers. Even non-engineers can benefit from the introductory videos. Given the positive community response and patches to prove it, Brian has shown that this e-learning format works. More than just lessons, Brian has built Code Firefox as a platform. I would love to see other Mozilla teams contribute videos for their feature areas. Even within Mozilla we have some technology silos that could learn from each other.
• Lukas Blakk (Senior Release Manager):
Getting into Open Source contribution is not always a clear path. In my experience, it took me 4 different attempts (MDN, Sumo, QA, AMO) before I found my path for a deeper dive and got 'hooked' on contributing to Mozilla. These videos and the technical mentorship they provide is already proving to be a valuable resource for engaging new coders and that is an area that can be hardest for a newcomer to break into alone since we are now such a legacy project. Fortunately Code Firefox is also a budding online community and that ensures no one is ever truly alone as they move up in their learning. Having someone (or several people) getting to focus more time on this particular pathway will ensure more robust community surrounds our software products and makes what we give back a product that is a reflection of that wider community. Win-win.
• Jared Wein (Firefox Engineer):
Code Firefox is an amazing site that is full of detailed, finely-crafted videos that guide interested people from being Firefox users to Firefox contributors. It is an invaluable tool and one that I wished was around when I was just getting started contributing to Firefox. Projects the size of Firefox can be very daunting and scary to newcomers. The tutorials on the site bring a level of comfort not found in many other places, and walk people through steps at a pace that they can handle. Before they know it they are knee deep in a great community of people who are working together to make Firefox and the Internet a better place for everyone.
• David Boswell (Community Engagement Lead):
Code Firefox and other efforts to help support coding contributors are crucial to growing and empowering new members of the Mozilla community.
• Kamil Jozwiak (QA Engineer):
Code Firefox has helped me out tremendously while I was contributing to Mozilla. It helped me complete my first patch and it's an amazing resource to sharpen your skills. I'm a Code Firefox lifer and visit the site on a daily basis to see if anything new has been added. I really believe in this project and I know from first hand experience how powerful this resource can be in helping people interested in the Mozilla mission.
• Rodrigo Silveira (Firefox Engineer):
Getting started with contributing to any code base can be daunting. Code Firefox videos are presented in such a friendly way that makes contributing to Firefox a lot more approachable. Being able to learn through video at your own pace is convenient too, you can get from zero to landing patches much faster. I liked it so much I had to help translate it so more people could benefit.
• Marco Mucci (Engineering Program Manager):
Part of wanting to make a difference is learning how to make one. Code Firefox is the tool of choice for learning how to contribute to Mozilla.
• Samuel Foster
@codefirefox has grown into a great resource for lifting you over the learning curve involved in making firefox awesomer. Nice work.
• David Bolter:
If you want to watch video tutorials on how to hack on Firefox, follow @codefirefox.
• Mark Finkle:
The Module Owner and Becoming A Reviewer videos on @codefirefox are awesome: http://codefirefox.com/#reviewing-code
• Till Schneidereit:
This really is fantastic - I wish I'd had something like these videos when I started contributing.
• Margaret Leibovic:
I know I'm late to the party, but @codefirefox is seriously awesome. Great work by @brianbondy!
• Lucas Rocha:
If you've been considering contributing to Firefox, @codefirefox is definitely a good start. Big thanks @brianbondy! http://buff.ly/18LSSZZ
• Asa Dotzler:
Mozillian @brianbondy has started publishing video tutorials on Firefox hacking. http://codefirefox.com/videos Follow @codefirefox for updates.
• Christian Heilmann:
Superb framework to create code tests by @brianbondy https://github.com/bbondy
• Mozilla Pakistan:
@codefirefox.com now supports accounts via @MozillaPersona You can track which videos you’ve watched too - pic.twitter.com/I4EizTAzbk
• Mozilla India:
Becoming a Mozilla contributor is now even more easy. http://codefirefox.com/ site aim to outline the process... http://fb.me/1ChAz9qPE
• Ian Elliot:
Other open source projects could also benefit from the same sort of idea - are you listening Linus?
• Alessio Placitelli:
Thank you @brianbondy for both http://codefirefox.com and http://goo.gl/bybZKK ! Very helpful for new #Firefox contributors!
• Jennie Rose Halperin:
http://codefirefox.com/ wanna get deep with your code? totally digging this @mozilla
codefirefox.com/ these videos are awesome. setting up firefox dev setup is pretty easy
• Rodrigo Ludgero:
Do the right thing. Some lessons to be learned. http://codefirefox.com/ I thought it was a great initiative. #codefirefox @codefirefox
• serge2k:
This is awesome, and I wish more projects would do it.
• iamleppert:
+1 for whoever's idea this was. We need more guides like this that ask that answer the basic questions on just dev process and work flows. Let's make it easier for people to contribute!
@FremyCompany I agree. I think the http://codefirefox.com/ project is our best bet. Not sure if Chrome could have that (let alone Opera, IE…)
• Michael Mahemoff:
Encouraging open source contributions, done right by Moz at http://CodeFirefox.com
• суперсолэ:
(now a serious tweet) If you're interested in contributing to Firefox, this is a fantastic site: http://codefirefox.com
• Ashley Myers:
OMG. This is so awesome. Videos on how the heck to actually contribute to Firefox: http://codefirefox.com cc/ @codefirefox
• Mike Rogers:
Decided over my Xmas break I'm going to try and contribute to Firefox somehow http://codefirefox.com
• Dongie Agnir:
@codefirefox Just wanted to let you know your website is an excellent resource! Please keep up the great work!
• Brian Graham:
This is awesome. I wish this existed when I wrote my first #FireFox patch.
• Swarnava Sengupta:
Thank you @codefirefox for such a great collection! Hope it will produce more developer all around the world! :)
• Mike Evans:
@angelinamagnum I like the style of @codefirefox, allows someone to get up to speed in an easy to digest manner. so more of that please :)
• Michael Kohler:
That's how I did my first patches! RT @codefirefox: [...]feature from start to finish, without knowing the code
• Hundreds of other tweets about Code Firefox
Would you like to create Code Firefox videos?
### Joel Maher — quick tip – when all else fails – “reseat”
While chatting with dminor the other day he mentioned his camera stopped working and after a reboot there was no mention of the camera hardware in the logs or via dmesg. His conclusion, the camera was not working. Since I have the same hardware and run Ubuntu 13.10 as he does he wanted a sanity check. My only suggestion was to turn off the computer, unplug it and take the battery out, wait 30 seconds then reassemble and power on.
Hey my suggestion worked and now dminor has a working camera again.
This general concept of reseating hardware is something that is easily forgotten, yet is so effective.
### Dave Huseby — Hacking B2G: Building with Distcc
How to set up a ramdisk and distcc for faster B2G builds.
### Have correct values in the manifest
The app type has to be at least privileged. No, web (hosted) apps won’t work with different domains if CORS is not enabled there.
Add the systemXHR permission too, or your XMLHttpRequests to domains without CORS enabled will instafail.
Example of the syntax for these two things in the manifest:
{ "type": "privileged", "permissions": { "systemXHR": { "description": "Allows loading remote content" } } }
### Add the “magic word” when creating XMLHttpRequest objects
The magic word being the mozSystem property:
request = new XMLHttpRequest({ mozSystem: true });
You should now be able to use the request in the usual way. Remember to add an error handler in case it fails!
We are using these superfailproof requests in our privileged app template to load definitions from MDN. Have a look!
Today two very exciting things happened:
1. Mozilla Brick 1.0 was finally released! That means that we can now… start working on 1.1! YAY, WE NEVER STOP!
2. Angelina’s article on Brick + X-Tag and web components in general was published: Custom Elements for Custom Applications – Web Components with Mozilla’s Brick and X-Tag
I have worked in both things (more in Brick than in the article, which I just helped edit) so it’s naturally obvious that I’m excited they’re finally published. And also since the article is Chapter 1 (as mentioned in my post), that means that next week you get Chapter 2–i.e. my article.
Stay put, friends. It’s going to rock. Almost literally.
### David Ascher — Product Thinking
I have a new job! Still with Mozilla, still doing a lot of what I’ve done in the past, just hopefully more/better/faster. The group I’m joining has a great culture of active blogging, so I’m hoping the peer pressure there will help me blog more often.
What’s the gig you ask? My new focus is to help the Mozilla Foundation make our products as adoptable as possible.
MoFo (as we affectionately call that part of the Mozilla organization) has a few main ways in which we’re hoping to change the world — some of those are programs, like Open News and the Science Lab, some are products. In a program, the change we’re hoping to effect happens by connecting brains together, either through fellowship programs, events, conferences, things like that. That work is the stuff of movement-building, and it’s fascinating to watch my very skilled colleagues at work — there is a distinctive talent required to attract autonomous humans to a project, get them excited about both what you’re doing and what they could do, and empowering them to help themselves and others.
Alongside these programmatic approaches, MoFo has for a while been building software whose use is itself impactful. Just like getting people to use Firefox was critical to opening up the web, we believe that using products like the Webmaker tools or BadgeKit will have direct impact and help create the internet the world needs.
And that’s where I come in! Over the last few years, various smart people have kept labeling me a “product person”, and I’ve only recently started to understand what they meant, and that indeed, they are right — “product” (although the word is loaded with problematic connotations) is central for me.
I’ll write a lot more about that over the coming months, but the short version is that I am particularly fascinated by the process that converts an idea or a pile of code into something that intelligent humans choose to use and love to use. That translation to me is attractive because it requires a variety of types of thinking: business modeling, design, consumer psychology, and creative application of technology. It is also compelling to me in three other aspects: it is subversive, it is humane, and it is required for impact.
It is subversive because I think if we do things right, we use the insights from billions of dollars worth of work by “greedy, evil, capitalist corporations” who have figured out how to get “eyeballs” to drive profit and repurpose those techniques for public benefit — to make it easy for people to learn what they want to learn, to allow people to connect with each other, to amplify the positive that emerges when people create. It is humane because I have never seen a great product emerge from teams that treat people as hyper-specialized workers, without recognizing the power of complex brains who are allowed to work creatively together. And it is required for impact because software in a repo or an idea in a notebook can be beautiful, but is inert. To get code or an idea to change the world, we need multitudes to use it; and the best way I know to get people to use software is to apply product thinking, and make something people love.
I am thrilled to say that I have as much to learn as I have to teach, and I hope to do much of both in public. I know I’ll learn a lot from my colleagues, but I’m hoping I’ll also get to learn on this blog.
I’m looking forward to this new phase, it fits my brain.
## March 04, 2014
### Rizky Ariestiyansyah — OpenX Quiz : Test your knowledge about Mozilla and Open Web
OpenX Quiz Version 1.0.2 Updated. This game is fun for learn about Internet, Open Web and Mozilla. Currently only 3 level available and will be updated in future. OpenX Quiz using jQuery, Bootstrap, Firefox...
### Can you safely deliver entropy to a remote system?
Running a system without enough entropy is like tolerating a toothache: something you’d really like to fix, but not quite bothersome enough to deal with.
I recently bought a Simtec EntropyKey to fix this locally: it’s a little USB dongle with avalanche-noise generation hardware and some firmware to test/whiten/deliver the resulting stream to the host. The dongle-to-host protocol is encrypted to protect against even USB man-in-the-middle attacks, which is pretty hardcore. I like it a lot. There’s a simple Debian package that continuously fills /dev/random with the results, giving you something more like this (which would look even better if Munin didn’t use entropy-consuming TCP connections just before each measurement):
But that’s on local hardware. What about virtual servers? I’ve got several remote VPS boxes, little Xen/KVM/VirtualBox slices running inside real computers, rented by the hour or the month. Like many “little” computers (including routers, printers, embedded systems), these systems are usually starved for entropy. They lack the sources that “big” computers usually have: spinning disk drives and keyboards/mice, both of which provide mechanical- or human- variable event timing. The EntropyKey is designed to bring good entropy to “little” machines. But I can’t plug a USB device into my remote virtual servers. So it’s pretty common to want to deliver the entropy from my (real) home computer to the (virtual) remote boxes. Can this be done safely?
### Nope!
Well, mostly nope: it depends upon how you define the threat model. First, let’s go over some background.
### Guessing Internal State
Remember that entropy is how you measure uncertainty, and it’s always relative to an observer who knows some things but not others. If I roll an 8-sided die on my desk right now, the entropy from your point of view is 3 bits. From my point of view it’s 0 bits: *I* know I just rolled a five. And now that *you* know that I rolled a five, it’s 0 bits from your POV too.
Computers use entropy to pick random numbers for cryptographic purposes: generating long-term SSH/GPG/TLS keys, creating ephemeral keys for Diffie-Hellman negotiation, unique nonces for DSA signatures, IVs, and TCP sequence numbers. Most of these uses are externally visible: the machine is constantly shedding clues as to its internal state. If the number of possible states is limited, and an eavesdropper can observe all (or most) of these clues, then they can deduce what that internal state is, and then predict what it will be next. The amount of computation Eve needs to do this depends upon how uncertain she is, and on the nature of the clues.
The most conservative model assumes that Eve sees every packet going into and out of the system, with perfect timing data, and that she knows the complete state of the system before the game begins (imagine that Eve creates a VM from the same EC2 AMI as you do). If she is truly omniscient, and the system is deterministic, then she will know the internal state of the system forever: all she has to do is feed her own clone the same input as your box receives, at the same time, and watch how its internal state evolves. She doesn’t even need to watch what your box outputs: it will always emit the same things as her clone.
If she misses a few bits (maybe she can’t measure the arrival time of a packet perfectly), or if there are hidden (nondeterministic) influences, then she needs to guess. For each guess, she needs to compare her subsequent observations against the predicted consequences of that guess, to determine which guess was correct. It’s as if she creates a new set of nearly-identical VMs for each bit of uncertainty, and then throws out most of them as new measurements rule them out.
There might be a lot of potential states, and it might take her a lot of CPU time to test each one. She might also not get a lot of observations, giving her fewer opportunities to discard the unknowns. Our goal is to make sure she can’t keep up: at any important moment (like when we create a GPG key), the number of possibilities must be so large that all keys are equally likely.
(In fact, our goal is to make sure she can’t retroactively catch up either. If we create a key, and then immediately reveal all the internal state, without going through some one-way function first, she can figure out what the state was *earlier*, and then figure out the key too. So the system also needs forward-security.)
### Bootstrapping Towards Entropy Is Technically Impossible …
To get out of this compromised Eve-knows-everything state, you have to feed it with enough entropy (which are bits that Eve doesn’t see) to exceed her ability to create and test guesses. But she’s watching the network. So you must feed entropy in locally (via the keyboard, locally-attached hardware, or non-deterministic execution).
Could you deliver entropy remotely if you encrypted it first? Sure, but you have to make sure Eve doesn’t know the key, otherwise she can see the data too, and then it isn’t entropy anymore. Encrypting it symmetrically (e.g. AES) means your remote random-number generator machine shares a secret key with the VM, but we already assumed that Eve knows the VM’s entire state, so it has no pre-existing secrets from her. To encrypt it asymmetrically (via a GPG public key) means the VM has a corresponding private key: again, Eve’s insider knowledge lets her decrypt it too.
Can you use authenticated Diffie-Hellman to build a secure connection *from* the VM to the remote entropy source? This would put a public key on the VM, not a private one, so Eve doesn’t learn anything from the key. But DH requires the creation of a random ephemeral key (the “x” in “g^x”), and Eve can still predict what the VM will do, so she can guess the ephemeral key (using the published g^x to test her guesses), determine the shared DH key, and decrypt the data.
So, in the most conservative model, there’s no way to get out of this compromised state using externally-supplied data. You *must* hide something from Eve, by delivering it over a channel that she can’t see.
### But It Might Be Possible In Practice
The real world isn’t quite this bad, for a few reasons:
• watching every input is actually pretty hard. The packet sniffer must be running 24×7, never drop a packet, and must capture high-resolution timestamps very close to the VM’s inputs
• busy computers have an awful lot of state, making Eve’s worst-case modeling job pretty expensive. It’s still deterministic, but depends on a lot of race conditions. The ideal kernel RNG would hash all of memory all the time, to make it maximally sensitive to system state. Unfortunately, that’s expensive and intrusive (“hey! the kernel is reading my private user data and publishing some derivative of it to the world!”), and good engineering practice (modularity) prefers small sub-systems with *reduced* sensitivity to unrelated inputs, so we may not get as much benefit from this as we’d like.
• kernel RNGs are designed to be forward-secure: it’s not as if /dev/urandom just returns the raw entropy pool. Every read and write causes the pool to be stirred. So observations don’t reveal state directly, and Eve has to do (significant) computation to check her guesses.
• RNGs also batch inputs into larger chunks to prevent small incremental attacks. If we added one bit of entropy at a time (say, one per second), then let Eve make some observations, she could probably deduce that one bit in time to repeat the process for the next bit. But if we hide it in memory (i.e. not allow it to influence anything remotely observable) for a few minutes, and then dump 128 bits in all at once, Eve has 128 seconds to test 2^128 possibilities, and won’t be able to keep up.
### How To Do It
So in practice, once the kernel pool gets perhaps 128 or 256 bits of real
entropy, Eve’s job becomes impossible. This needs to happen before any
significant secrets are generated. How can we get to this point?
• the best tool is a local hardware RNG that can feed entropy to the kernel without traversing the network. This might be a special CPU instruction (e.g. Intel’s RdRand) that can be used by the guest VM. Or the guest VM should be able to ask the host OS (dom0) for entropy, which can get it from an on-chip HWRNG (VIA Padlock) or USB-attached EntropyKey. This source should be used very early during startup, before first-boot SSH host keys are generated. It can be periodically refreshed afterwards, but it’s the initial seed that really matters.
• next best is for the guest VM creation process to include a unique initial seed. Linux systems typically save a few kB of entropy to disk at shutdown, and write it back into the kernel at boot: if the contents of disk remain secret, rebooting a box doesn’t cause it to lose entropy. The control system that creates VMs could pre-populate this entropy file from a real RNG, with fresh data for each one. I don’t know if EC2 AMIs work this way: I suspect the disk image is identical each time an AMI is instantiated, but the startup process might do something better.
• failing that, the VM should make network requests for entropy. These requests should go to a box that already has good entropy (perhaps relayed from box to box, ultimately supplied by some kind of HWRNG). And the requests should be as local as possible, so Eve would have to get her packet sniffer into the datacenter network to see it. Pulling entropy from multiple directions might help (maybe she can watch one router but not all of them). Pulling large amounts of data might help (maybe she won’t be able to keep up with the data), as might pulling it frequently over a long period of time (maybe the sniffer breaks down every once in a while: if you can get 256 bits through while it’s offline, you win). Try to include high-resolution timing data too (sample the TSC when you receive each packet and write the contents into the kernel pool along with the data).
You’d probably think you ought to encrypt these network requests, but as described above it’s not really clear what this buys you. The best hope is that it increases the cost of Eve’s guess-testing. You might not bother with authenticating this link: if the RNG is well-designed, then it can’t hurt to add more data, even attacker-controlled data (but note that entropy counters could be incorrectly incremented, which means it can hurt to *rely* on attacker-controlled data).
Continuing this analysis, you might not even bother decrypting the data before adding it to the pool, since that doesn’t increase the entropy by more than the size of the decryption key, so you can get the same effect by just writing the key into the pool too. (But it might be more expensive for Eve if her guess-testing function must include the decryption work).
And if you don’t bother decrypting it, then clearly there’s no point to encrypting it in the first place (since encrypted random data is indistinguishable from unencrypted random data). Which suggests that really you’re just piping /dev/urandom from one box into netcat, plus maybe some timestamps, and just have to hope that Eve misses a packet or two.
### Entropy Counters
What about entropy counters, and the difference between /dev/random and /dev/urandom? They’re trying to provide two different things. The first is to protect you against using the RNG before it’s really ready, which makes a lot of sense (see Mining Your Ps and Qs for evidence of failures here). The second is to protect you against attackers who have infinite computational resources, by attempting to distinguish between computational “randomness” and information-theoretic randomness. This latter distinction is kind of silly, in my mind. Like other folks, I think there should be one kernel source of entropy, it should start in the “off” mode (return errors) until someone tells it that it is ready, and switch to the “on” mode forevermore (never return errors or block).
But I’ll have to cover that in another post. The upshot is that it isn’t safe to make this startup-time off-to-on mode switch unless you have some confidence that the data you’ve added to the kernel’s entropy pool is actually entropy, so attacker-supplied data shouldn’t count. But after you’ve reached the initial threshold, when (in my opinion) you don’t bother counting entropy any more, then it doesn’t hurt to throw anything and everything into the pool.
(cross-posted to my personal blog)
### Armen Zambrano Gasparnian — Planet Release Engineering
If you're interested on reading about Mozilla's Release Engineering, you can subscribe to "Planet Release Engineering".
This is a central location that collects the blog posts of each one of Mozilla's Release Engineering team members.
### Patrick McManus — On the Application of STRINT to HTTP/2
I participated for two days last week in the joint W3C/IETF (IAB) workshop on Strengthening the Internet against Pervasive Monitoring (aka STRINT). Now that the IETF has declared pervasive monitoring of the Internet to be a technical attack the goal of the workshop was to establish the next steps to take in reaction to the problem. There were ~100 members of the Internet engineering and policy communities participating - HTTP/2 standardization is an important test case to see if we're serious about following through.
I'm pleased that we were able to come to some rough conclusions and actions. First a word of caution: there is no official report yet, I'm certainly not the workshop secretary, this post only reflects transport security which was a subset of the areas discussed, but I still promise I'm being faithful in reporting the events as I experienced them.
Internet protocols need to make better use of communications security and more encryption - even imperfect unauthenticated crypto is better than trivially snoopable cleartext. It isn't perfect, but it raises the bar for the attacker. New protocols designs should use strongly authenticated mechanisms falling back to weaker measures only as absolutely necessary, and updates to older protocols should be expected to add encryption potentially with disabling switches if compatibility strictly requires it. A logical outcome of that discussion is the addition of these properties (probably by reference, not directly through replacement) to BCP 72 - which provides guidance for writing RFC security considerations.
At a bare minimum, I am acutely concerned with making sure HTTP/2 brings more encryption to the Web. There are certainly many exposures beyond the transport (data storage, data aggregation, federated services, etc..) but in 2014 transport level encryption is a well understood and easily achievable technique that should be as ubiquitously available as clean water and public infrastructure. In the face of known attacks it is a best engineering practice and we shouldn't accept less while still demanding stronger privacy protections too. When you step back from the details and ask yourself if it is really reasonable that a human's interaction with the Web is observable to many silent and undetectable observers the current situation really seems absurd.
The immediate offered solution space is complicated and incomplete. Potential mitigations are fraught with tradeoffs and unintended consequences. The focus here is on what happens to http:// schemed traffic, https is comparably well taken care of. The common solution offered in this space carries http:// over an unauthenticated TLS channel for HTTP/2. The result is a very simple plug and play TLS capable HTTP server that is not dependent on the PKI. This provides protection against passive eaves droppers, but not against active attacks. The cost of attacking is raised in terms of CPU, monetary cost, political implications, and risk of being discovered. In my opinion, that's a win. Encryption simply becomes the new equivalent of clear text - it doesn't promote http:// to https://, it does not produce a lock icon, and it does not grant you any new guarantees that cleartext http:// would not have. I support that approach.
The IETF HTTPbis working group will test this commitment to encryption on Wednesday at the London #IETF89 meeting when http:// schemed URIs over TLS is on the agenda (again). In the past, it not been able to garner consensus. If the group is unable to form consensus around a stronger privacy approach than was done with HTTP/1.1's use of cleartext I would hope the IESG would block the proposed RFC during last call for having insufficiently addressed the security implications of HTTP/2 on the Internet as we now know it.
#ietf89 #strint
### Jen Fong-Adwent — A Thought Experiment
In this chatroom, each unique participant has an identifier that you can reference.
### Joel Maher — Where did all the good first bugs go?
As this is the short time window of Google Summer of Code applications, I have seen a lot of requests for mochitest related bugs to work on. Normally, we look for new bugs on the bugs ahoy! tool. Most of these have been picked through, so I spent some time going through a bunch of mochitest/automation related bugs. Many of the bugs I found were outdated, duplicates of other things, or didn’t apply to the tools today.
Here is my short list of bugs to get more familiar with automation while fixing bugs which solve real problems for us:
• bug 958897 – ssltunnel lives if mochitest killed
• Bug 841808 – mozfile.rmtree should handle windows directory in use better
• Bug 892283 – consider using shutil.rmtree and/or distutils remove_tree for mozfile
• Bug 908945 – Fix automation.py’s exit code handling
• Bug 912243 – Mochitest shouldnt chdir in __init__
• Bug 939755 – With httpd.js we sometimes don’t get the most recent version of the file
I have added the appropriate tags to those bugs to make them good first bugs. Please take time to look over the bug and ask questions in the bug to get a full understanding of what needs to be done and how to test it.
Happy hacking!
### My Firefox OS homescreen
I'm having fun building my own homescreen for Firefox OS. I call it "riverscreen". Code's on github. Totally WIP. Barely functional.
### Mike Hommey — Linux and Android try builds, now up to twice as fast
(Taras told me to use sensationalist titles to draw more attention, so here we are)
Last week, I brought up the observable build times improvements on Linux try builds with the use of shared cache. I want to revisit those results now there have been more builds, and to look at the first results of the switch for Android try builds, which are now also using the shared cache.
Here is a comparison between the repartition of build times from last time (about ten days of try pushes, starting from the moment shared cache was enabled) vs. build times for the past ten days (which, almost, start at the point the previous data set stopped)):
As expected, the build times are still improving overall thanks to the cache being fuller. The slowest build times are now slightly lower than the slowest build times we were getting without the shared cache. There is a small “regression” in the number of builds taking between 15 and 20 minutes, but that’s likely related to changes in the tree creating more cache misses. To summarize the before/after:
Unified Non-unified
shared after 10 days shared initially ccache shared after 10 days shared initially ccache
Average 17:11 17:11 29:19 31:00 30:58 57:08
Median 13:03 13:30 30:10 22:07 22:27 60:57
[Note I'm not providing graphs for non-unified builds, they are boringly similar, with different values, which average and median values should give a grasp on]
Android try builds also got faster with shared cache. The situation looks pretty similar to what we observed after the first ten days of Linux try shared cache builds:
[Note I removed two builds without shared cache from those stats, both of which were taking more than an hour for some reason I haven't investigated]
The fastest shared cache builds are, like for Linux builds, slower than the fastest ccache builds, and the slowest builds too, but as we can see above, those slowest builds get faster as the cache fills up. And as I wrote last week, work is under way to make the fastest builds faster.
This is what the average and median look like for Android try builds:
Unified Non-unified
shared ccache shared ccache
Average 17:14 24:08 27:49 43:00
Median 13:52 24:57 20:35 47:17
### Nick Fitzgerald — Memory Tooling In Firefox Developer Tools In 2014
A big push for the Firefox Developer Tools team this year is performance tools. Jim Blandy and I are collaborating on the memory half of performance tooling. What follows is a broad overview of our plans.
### Definitions
• ubi::Node: An abstract base class that provides a generic nodes-and-edges view of any sort of heap object. Not just the JavaScript world, but also XPCOM and the DOM!
• Category: A key/value pair with which we can tag an individual ubi::Node. Some categories are simple booleans, such as whether a DOM node is orphaned from its document. Others may have a value, for example an object may be categorized by its prototype and constructor. ubi::Nodes can have to many categories!
• Census: A semi-lightweight traversal of the heap that provides accurate category counts without saving the full heap state. It gives us totals, but not the specifics of individuals.
• Snapshot: A heavyweight traversal of the heap. It saves the full heap state for later inspection by creating a core dump.
• Core dump: A binary blob containing the full serialized heap state at a past instant in time.
### A Recurring Theme
As we build the infrastructure and lay the foundation for the memory panel, we will expose utility and testing functions developers can use now. Generally, the console object will expose these functions.
The benefit of this approach is two-fold. First, it enables developers to cash in on our work quickly. Second, it gives us a larger testing population; helping us catch and fix bugs as soon as possible.
### Graph Algorithms on the Heap
#### Depth First Search and Dominator Trees
If x dominates y, then any path from the global window to y must pass through x. We can use this information in two practical ways:
1. If you nullify all references to x, every y such that x dominates y will also become unreachable and will eventually be garbage collected.
2. We can calculate the retained size of x. That is, the amount of memory that will be reclaimed if x (and therefore also every y such that x dominates y) were to be garbage collected.
We can expose this information to developers with console.retainedSize(obj).
By doing a BFS in the heap graph from the global window to an object, we find the shortest retaining path for that object. We can use this path to construct a developer-friendly label for that object. Often the label we provide will be a snippet of JavaScript that can be evaluated in the console. For example: "window.MyApp.WidgetView.element". Other times, we will be forced to display labels that cannot be evaluated in the console: "window.[[requestAnimationFrame renderLoop]].[[ closure environment ]].player.sprite".
This can be exposed to developers as a useful little pair of methods on console. If you expect an object to be reclaimed by GC, you will be able to tag it with console.expectGarbageCollected(obj). Next, you would perform whatever actions are supposed to trigger the clean up of that object. Finally, you could call console.logRetained() to log the retaining path of any objects that you tagged via console.expectGarbageCollected that have not been garbage collected. I realize these aren't the greatest method names; please tweet me your suggestions!
### Tracking Allocation Sites
We will track the allocation site of every object in the heap. Allocation sites come into play in a few ways.
First, if you interact with one component of your app, and notice that an unrelated component is allocating or retaining objects, you most likely have an opportunity to reduce memory consumption. Perhaps that unrelated component can lazily delay any allocations it needs, thereby lowering your app's memory usage when that component isn't active.
Second, once developers know which objects are using their precious memory, the next info they need is where the objects were allocated. That leads to why they were allocated, and finally how to reduce those allocations. We can hack this workflow and group objects by allocation site then sort them for developers to effectively make the first step (which objects) redundant.
I'm not sure what the best way to expose this information to developers before the complete memory panel is ready. Tracking allocations isn't lightweight; we can't do it all the time, you have to turn the mode on. We could expose console.startTrackingAllocationSites() and console.stopTrackingAllocationSites(), and then allow calls to console.allocationSite(obj) if obj was allocated while we were tracking allocation sites. Or, we could expose console.startLoggingAllocationSites() and console.stopLoggingAllocationSites(), which could just dump every allocation site to the console as it occurs. Tweet at me if you have an opinion about the best API from which to expose this data.
### Putting it all together
The memory panel will feature a live-updating graph. To construct this graph we will frequently poll the recent categorized allocations, and the total, non-granular heap size. This gives us a fuzzy, slightly inaccurate picture of the heap over time, but it should be efficient enough for us to do at a high frequency. At a less frequent interval, we will take a census. This will be a reality check of sorts that gives us precise numbers for each category of objects in the heap.
You will be able to click on the graph to get a shallow view into the heap at that past moment in time. Alternatively, you will be able to select a region of the graph to view the difference in memory consumption between the start and end points of your selection.
If you need to deep dive into the full heap state, you'll be able to take snapshots, which are too heavy for us to automatically collect on an interval. These can be compared with other snapshots down to each individual object, so you will be able to see exactly what has been allocated and reclaimed in the time between when each snapshot was taken. They will also be exportable and importable as core dumps, so you could attach them to bug tickets, send to other developers, etc.
Darrin Henein has created a beautiful mockup of the memory panel. Caveat: despite said beauty, the mockup is still very much a work in progress, it is far from complete, and what we ship might look very different!
You can follow along with our work by watching the bugs in this bugzilla dependency graph.
2014 will be an exciting year for memory tooling in Firefox Developer Tools!
### Yunier José Sosa Vázquez — Deshabilita la carga de las imágenes a la antigua con Disable Load Images
Si eres de los que se enfadó con la llegada de Firefox 23 al ver que habían quitado la opción de cargar o no las imágenes automáticamente, ya no tendrás que sentirte así porque puedes tener esta funcionalidad de vuelta con Disable Load Images. Ya una vez estuvimos comentando el tema por aquí pero esta vez se trata de otra alternativa.
Sin ánimo de justificar, es bueno que todos sepan la razón por la que se quitó esta opción de Firefox. Resulta ser que en Bugzilla (la plataforma de Mozilla para reporte de bugs) hay muchas peticiones relacionado con este tema y la principal queja es el alto consumo de recursos cuando cargar imágenes esta deshabilitada en algunos sitios. Los desarrolladores investigaron al respecto pero dieron con la solución y en los reportes de salud en Firefox esta opción no era desactivada por muchos usuarios.
Pero bueno, vayamos al grano y hablemos del complemento.
Disable Load Images esta siendo desarrollado por Yaicel Torres y por mí, con el asesoramiento de Jorge Villalobos (Mozilla). Se encuentra en su versión 0.3 y con él podrás habilitar o deshabilitar la opción de cargar imágenes automáticamente y cuenta con una interfaz donde se podrá:
• Permitir o bloquear las imágenes de un determinado sitio.
• Obtener la dirección del sitio visitado en ese momento.
• Eliminar uno, varios o todos los sitios.
• Cambiar el estado de uno o varios sitios rápidamente.
Además, tiene soporte para los idiomas español e inglés.
A continuación, un video de como utilizar esta extensión:
Si deseas colaborar o ver el código puedes acceder a la dirección del proyecto en el GitLab de las comunidades. En próximas versiones se espera adaptar el diseño de la “ventana” al sistema operativo.
¡Espero que les guste Disable Load Images!
## March 03, 2014
### Margaret Leibovic — Dare 2B Digital 2014: Remix the Web!
Dare 2B Digital is an annual South Bay conference that brings 300 young women ages 12-16 together to encourage them to consider STEM fields in college by coming together for a full day of inspiring talks and workshops showcasing women’s work and relevance in technology. For the past four conferences, Lukas has signed Mozilla up as a sponsor and created a workshop that is run 3 times that day and reaches about 80-100 attendees. Last year, Lukas and I created a workshop to teach these girls how to create mobile HTML5 games. This year, Lukas couldn’t make it to the conference because she was busy organizing another great outreach event, so I volunteered to organize our workshop, and I recruited Katie and Heather to help me.
I really love Webmaker, a Mozilla project dedicated to helping people learn how to create amazing things on the web, so I decided to create a workshop to teach the girls how to use some of the Webmaker tools. My goal was to teach the girls how to use these tools to understand the basic building blocks of the web, as well as show them how easy it is to make their own web content. To prepare for the conference, I gathered 20 loaner laptops, ordered some swag, and remixed an existing Webmaker teaching kit to create an outline for the workshop.
We started off each workshop with a brief overview of how the web works (Katie used her teacher skills to create some nice whiteboard diagrams), and then we jumped right into using the Webmaker tools. We started by walking the girls through using the X-Ray Goggles to inspect webpages, and taught them that they can modify what they see in their browsers. We definitely heard lots of “This is so cool!!!” when we showed them how to change text and images on any webpage.
Once they felt comfortable with X-Ray Goggles, we pointed them to a gallery of existing Webmaker projects, and showed them how to use Thimble to remix those projects into their own. At this point, we let them loose to start working on their own remixes, and there was lots of enthusiasm and laughter as they started working on their own projects. We also felt thoroughly out of touch with youth culture when they started filling their projects with images of young male celebrities we had never even heard of.
Unfortunately, we only had an hour and 15 minutes for each workshop, which flew by, but we encouraged the girls to make their own Webmaker accounts to continue working on their remixes at home. They were definitely really excited to learn that all of these resources are available to them at home, and that they only need a web browser to get started!
### Ian Bicking — Towards a Next Level of Collaboration
With TogetherJS we’ve been trying to make a usable tool for the web we have, and the browsers we have, and the web apps we have. But we’re also accepting a lot of limitations.
For a particular scope the limitations in TogetherJS are reasonable, but my own goals have been more far-reaching. I am interested in collaboration with as broad a scope as the web itself. (But no broader than the web because I’m kind of biased.) “Collaboration” isn’t quite the right term — it implies a kind of active engagement in creation, but there’s more ways to work together than collaboration. TogetherJS was previously called TowTruck, but we wanted to rename it to something more meaningful. While brainstorming we kept coming back to names that included some form of “collaboration” but I strongly resisted it because it’s such a mush-mouthed term with too much baggage and too many preconceptions.
When we came up with “together” it immediately seemed right. Admittedly the word feels a little cheesy (it’s a web built out of hugs and holding hands!) but it covers the broad set of activities we want to enable.
With the experience from TogetherJS in mind I want to spend some time thinking about what a less limited tool would look like. Much of this has become manifest in Hotdish, and the notes below have informed its design.
### Degrees of collaboration/interaction
Intense collaboration is cool, but it’s not comprehensive. I don’t want to always be watching over your shoulder. What will first come to mind is privacy, but that’s not interesting to me. I would rather address privacy by helping you scope your actions, let you interact with your peers or not and act appropriately with that in mind. I don’t want to engage with my collaborators all the time because it’s boring and unproductive and my eyes glaze over. I want to engage with other people appropriately: with all the intensity called for given the circumstances, but also all the passivity that is also sometimes called for.
I’ve started to think in terms of categories of collaboration:
#### 1. Asynchronous message-based collaboration
This includes email of course, but also issue trackers, planning tools, any notification system. If you search for “collaboration software” this is most of what you find, and much of the innovation is in representing and organizing the messages.
I don’t think I have any particularly new ideas in this well-explored area. That’s not to say there aren’t lots of important ideas, but the work I want to do is in complementing these tools rather than competing with them. But I do want to note that they exist on this continuum.
#### 2. Ambient awareness
This is the awareness of a person’s presence and activity. We have a degree of this with Instant Messaging and chat rooms (IRC, Campfire, etc). But they don’t show what we are actively doing, just our presence or absence, and in the case of group discussions some of what we’re discussing with other people.
Many tools that indicate presence also include status messages which would purport to summarize a person’s current state and work. I’ve never worked with people who keep those status messages updated. It’s a very explicit approach. At best it devolves into a record of what you had been doing.
A more interesting tool to make people’s presence more present is Sqwiggle, a kind of always-on video conference. It’s not exactly always-on, there is a low-fidelity video with no audio until you start a conversation with someone and it goes to full video and audio. This way you know not only if someone is actually sitting at the computer, but also if they are eating lunch, if they have the furrowed brows of careful concentration, or are frustrated or distracted. Unfortunately most people’s faces only show that they are looking at a screen, with the slightly studious but mostly passive facial expressions that we have when looking at screens.
Instant messaging has grown to include an additional the presence indicator: I am currently typing a response. A better fidelity version of this would indicate if I am typing right now, or if I forgot I started typing and switched tabs but left text in the input box, or if I am trying hard to compose my thoughts (typing and deleting), or if I’m pasting something, or if I am about to deliver a soliloquy in the form of a giant message. (Imagine a typing indicator that gives a sense of the number of words you have typed but not sent.)
I like that instant messaging detects your state automatically, using something that you are already engaged with (the text input box). Sqwiggle has a problem here: because you aren’t trying to project any emotions to your computer screen, Sqwiggle catches expressions that don’t mean anything. We can engage with our computers in different ways, there’s something there to express, it’s just not revealed on our faces.
I’d like to add to the activity indicators we have. Like the pages (and web apps) you are looking at (or some privacy-aware subset). I’d like to show how you are interacting with those pages. Are you flopping between tabs? Are you skimming? Scrolling through in a way that shows you are studying the page? Typing? Clicking controls?
I want to show something like the body language of how you are interacting with the computer. First I wondered if we could interpret your actions and show them as things like “reading”, “composing”, “being pissed off with your computer”, etc. But then I thought more about body language. When I am angry there’s no “angry” note that shows up above my head. A furrowed brow isn’t a message, or at least mostly not a message. Body language is what we read from cues that aren’t explicit. And so we might be able to show what a person is doing, and let the person watching figure out why.
#### 3. Working in close parallel
This is where both people (or more than 2 people) are actively working on the same thing, same project, same goal, but aren’t directly supporting each other at every moment.
When you’ve entered into this level of collaboration you’ve both agreed that you are working together — you’re probably actively talking through tasks, and may regularly be relying on each other (“does what I wrote sound right?” or “did you realize this test is failing” etc). A good working meeting will be like this. A bad meeting would probably have been better if you could have stuck to ambient awareness and promoted it to a more intense level of collaboration only as needed.
#### 4. Working directly
This is where you are both locked on a single task. When I write something and say “does what I wrote sound right?” we have to enter this mode: you have to look at exactly what I’m talking about. In some sense “close parallel” may mean “prepared to work directly”.
I have found that video calls are better than audio-only calls, more than I would have expected. It’s not because the video content is interesting. But the video makes you work directly, while being slightly uncomfortable so you are encouraged to acknowledge when you should end the call. In a way you want your senses filled. Or maybe that’s my propensity to distraction.
There’s a lot more to video calls than this (like the previously mentioned body language). But in each feature I suspect there are parallels in collaborative work. Working directly together should show some of the things that video shows when we are focused on a conversation, but can’t show when we are focusing on work.
#### 5. Demonstrating to another person
This is common for instruction and teaching, but that shouldn’t be the only case we consider. In Hotdish we have often called it “presenting” and “viewing”. In this mode someone is the driver/presenter, and someone is the passenger/viewer. When the presenter focuses on something, you want the viewer to be aware of that and follow along. The presenter also wants to be confident that the viewer is following along. Maybe we want something like how you might say “uh huh” when someone is talking to you — if a listener says nothing it will throw off the talker, and these meaningless indications of active listening are important.
Demonstration could just be a combination of direct work and social convention. Does it need to be specially mediated by tools? I’m not sure. Do we need a talking stick? Can I take the talking stick? Are these interactions like a conversation, where sometimes one person enters into a kind of monologue, but the rhythm of the conversation will shift? If we focus on the demonstration tools we could miss the social interactions we are trying to support.
#### Switching modes
Between each of these styles of interaction I think there must be some kind of positive action. A natural promotion of demotion of your interaction with someone should be mutual. (A counter example would be the dangling IM conversation, where you are never sure it’s over.)
At the same time, the movement between modes also builds your shared context and your relationship with the other person. You might be proofing an article with another person, and you say: “clearly this paragraph isn’t making sense, let me just rewrite it, one minute” — now you know you are leaving active collaboration, but you also both know you’ll be reentering it soon. You shouldn’t have to record that expectation with the tool.
I’m reluctant to put boundaries up between these modes, I’d rather tools simply inform people that modes are changing and not ask if they can change. This is part of the principles behind Defaulting To Together.
### Ownership
At least in the context of computers we often have strong notions of ownership. Maybe we don’t have to — maybe it’s because we have to hand off work explicitly, and maybe we have to hand off work explicitly because we lack fluid ways to interact, cooperate, delegate.
With good tools in hand I see “ownership” being exchanged more regularly:
• I find some documentation, then show it to you, and now it’s yours to make use of.
• I am working through a process, get stuck, and need your skills to finish it up. Now it’s yours. But you might hand it back when you unstick me.
• You are working through something, but are not permitted to complete the operation, you have to hand it over to me for me to complete the last step.
Layered on this we have the normal notions of ownership and control — the login accounts and permissions of the applications we are using. Whether these are in opposition to cooperation or maybe complementary I have not decided.
### Screensharing vs. Peer-to-Peer
Perhaps a technical aside, but when dealing with real-time collaboration (not asynchronous) there are two distinct approaches.
Screensharing means one person (and one computer) is “running” the session — that one person is logged in, their page or app is “live”, everyone else sees what they see.
Screensharing doesn’t mean other people can’t interact with the screen, but any interaction has to go through the owner’s computer. In the case of a web page we can share the DOM (the current visual state of the page) with another person, but we can’t share the Javascript handlers and state, cookies, etc., so most interactions have to go back through the original browser. Any side effects have to make a round trip. Latency is a problem.
It’s hard to figure out exactly what interactivity to implement in a screensharing situation. Doing a view-only interaction is not too hard. There are a few things you can add after that — maybe you let someone touch a form control, suggest that you follow a link, send clicks across the wire — but there’s no clear line to stop at. Worse, there’s no clear line to express. You can implement certain mechanisms (like a click), but these don’t always map to what the user thinks they are doing — something like a drag might involve a mousedown/mousemove/mouseup event, or it might be implemented directly as dragging. Implementing one of those interactions is a lot easier than the other, but the distinction means nothing to the user.
When you implement incomplete interactions you are setting up a situation where a person can do something in the original application that viewers can’t do, even though it looks like the real live application. An uncanny valley of collaboration.
I’ve experimented with DOM-based screen sharing in Browser Mirror, and you can see this approach in a tool like Surfly. As I write this a minimal version of this is available in Hotdish.
In peer-to-peer collaboration both people are viewing their own version of the live page. Everything works exactly like in the non-collaborative environment. Both people are logged in as themselves. This is the model TogetherJS uses, and is also present as a separate mode in Hotdish.
This has a lot of obvious advantages over the problems identified above for screensharing. The big disadvantage is that hardly anything is collaborative by default in this model.
In the context of the web the building blocks we do have are:
• URLs. Insofar as a URL defines the exact interface you look at, then putting both people at the same URL gives a consistent experience. This works great for applications that use lots of server-side logic. Amazon is pretty great, for example, or Wikipedia. It falls down when content is substantially customized for each person, like the Facebook frontpage or a flight search result.
• Event echoing: events aren’t based on any internal logic of the program, they are something initiated by the user. So if the user can do something, a remote user can do something. Form fields are the best example of this, as there’s a clear protocol for doing form changes (change the value, fire a change event).
But we don’t have:
• Consistent event results: events aren’t state changes, and transferring events about doesn’t necessarily lead to a consistent experience. Consider the modest toggle control, where a click on the toggler element shows or hides some other element. If our hidden states are out of sync (e.g., my toggleable element is hidden, yours is shown), sending the click event between the clients keeps them consistently and perfectly out of sync.
• Consistent underlying object models. In a single-page app of some sort, or a whatever fancy Javascript-driven webapp, a lot of what we see is based on Javascript state and models that are not necessarily consistent across peers. This is in contrast to old-school server-side apps, where there’s a good chance the URL contains enough information to keep everything consistent, and ultimately the “state” is held on a single server or database that both peers are connecting to. But we can’t sync the client’s object models, as they are not built to support arbitrary modification from the outside. Apps that use a real-time database work well.
To make this work the application usually has to support peer-to-peer collaboration to some degree. A messy approach can help, but can never be enough, not complete enough, not robust enough.
So peer-to-peer collaboration offers potentially more powerful and flexible kinds of collaboration, but only with work on the part of each application. We can try to make it as easy as possible, and maybe integrate with tools or libraries that support the kinds of higher-level synchronization we would want, but it’s never reliably easy.
### Synchronized vs. Coordinated Experiences
Another question: what kind of experiences do we want to create?
The most obvious real-time experience is: everything sees the same thing. Everything is fully synchronized. In the screensharing model this is what you always get and what you have to get.
The obvious experience is probably a good starting point, but shouldn’t be the end of our thinking.
The trivial example here is the cursor point. We can both be editing content and viewing each other’s edits (close to full sync), but we don’t have to be at exactly the same place. (This is something traditional screensharing has a hard time with, as you are sharing a screen of pixels instead of a DOM.)
But other more subtle examples exist. Maybe only one person has the permission to save a change. A collaboration-aware application might allow both people to edit, while still only allowing one person to save. (Currently editors will usually be denied to people who don’t have permission to save.)
I think there’s fruit in playing with the timing of actions. We don’t have to replay remote actions exactly how they occurred. For example, in a Demonstration context we might detect that when the driver clicks a link the page will change. To the person doing the click the order of events is: find the link, focus attention on the link, move cursor to the link, click. To the viewer the order of events is: cursor moves, maybe a short click indicator, and boom you are at a new page. There’s much less context given to the viewer. But we don’t have to display those events with the original timing for instance we could let the mouse hover over its target for a more extended amount of time on the viewer.
High-level (application-specific) representation of actions could be available. Instead of trying to express what the other person is doing through every click and scroll and twiddling of a form, you might just say “Bob created a new calendar event”.
In the context of something like a bug tracker, you might not want to synchronize the comment field. Instead you might want to show individual fields for all participants on a page/bug. Then I can see the other person’s in-progress comment, even add to it, but I can also compose my own comment as myself.
This is where the peer-to-peer model has advantages, as it will (by necessity) keep the application in the loop. It does not demand that collaboration take one form, but it gives the application an environment in which to build a domain-specific form of collaboration.
We can imagine moving from screenshare to peer-to-peer through a series of enhancements. The first might be: let applications opt-in to peer-to-peer collaboration, or implement a kind of transparent-to-the-application screensharing, and from there tweak. Maybe you indicate some scripts should run on the viewer’s side, and some compound UI components can be manipulated. I can imagine with a component system like Brick where you could identify safe ways to run rich components, avoiding latency.
### How do you package all this?
Given tools and interactions, what is the actual context for collaboration?
TogetherJS has a model of a persistent session, and you invite people to that session. Only for technical reasons the session is bound to a specific domain, but not a specific page.
In Hotdish we’ve used a group approach: you join a group, and your work clearly happens in the group context or not.
One of the interesting things I’ve noticed when getting feedback about TogetherJS is that people are most interested in controlling and adding to how the sessions are setup. While, as an implementor, I find myself drawn to the tooling and specific experiences of collaboration, there’s just as much value in allowing new and interesting groupings of people. Ways to introduce people, ways to start and end collaboration, ways to connect to people by role instead of identity, and so on.
Should this collaboration be a conversation or an environment? When it is a conversation you lead off with the introduction, the “hello” the “so why did you call?” and finish with “talk to you later” — when it is an environment you enter the environment and any coparticipants are just there, you don’t preestablish any specific reason to collaborate.
### And in conclusion…
I’m still developing these ideas. And for each idea the real test is if we can create a useful experience. For instance, I’m pretty sure there’s some ambient information we want to show, but I haven’t figured out what.
Experience has shown that simple history (as in an activity stream) seems too noisy. And is history shown by group or person?
In the past I unintentionally exposed all tab focus and unfocus in TogetherJS, and it felt weird to both expose my own distracted state and my collaborator’s distraction. But part of why it was weird was that in some cases it was simply distraction, but in other cases it was useful multitasking (like researching a question in another tab). Was tab focus too much information or too little?
I am still in the process of figuring out how and where I can explore these questions, build the next thing, and the next thing after that — the tooling I envision doesn’t feel impossibly far away, but still more than one iteration of work yet to be done, maybe many more than one but I can only see to the next peak.
Who else is thinking about these things? And thinking about how to build these things? If you are, or you know someone who is, please get in contact — I’m eager to talk specifics with people who have been thinking about it too, but I’m not sure how to find these people.
### Ian Bicking — Towards a Next Level of Collaboration
With TogetherJS we’ve been trying to make a usable tool for the web we have, and the browsers we have, and the web apps we have. But we’re also accepting a lot of limitations.
For a particular scope the limitations in TogetherJS are reasonable, but my own goals have been more far-reaching. I am interested in collaboration with as broad a scope as the web itself. (But no broader than the web because I’m kind of biased.) “Collaboration” isn’t quite the right term — it implies a kind of active engagement in creation, but there’s more ways to work together than collaboration. TogetherJS was previously called TowTruck, but we wanted to rename it to something more meaningful. While brainstorming we kept coming back to names that included some form of “collaboration” but I strongly resisted it because it’s such a mush-mouthed term with too much baggage and too many preconceptions.
When we came up with “together” it immediately seemed right. Admittedly the word feels a little cheesy (it’s a web built out of hugs and holding hands!) but it covers the broad set of activities we want to enable.
With the experience from TogetherJS in mind I want to spend some time thinking about what a less limited tool would look like. Much of this has become manifest in Hotdish, and the notes below have informed its design.
### Degrees of collaboration/interaction
Intense collaboration is cool, but it’s not comprehensive. I don’t want to always be watching over your shoulder. What will first come to mind is privacy, but that’s not interesting to me. I would rather address privacy by helping you scope your actions, let you interact with your peers or not and act appropriately with that in mind. I don’t want to engage with my collaborators all the time because it’s boring and unproductive and my eyes glaze over. I want to engage with other people appropriately: with all the intensity called for given the circumstances, but also all the passivity that is also sometimes called for.
I’ve started to think in terms of categories of collaboration:
#### 1. Asynchronous message-based collaboration
This includes email of course, but also issue trackers, planning tools, any notification system. If you search for “collaboration software” this is most of what you find, and much of the innovation is in representing and organizing the messages.
I don’t think I have any particularly new ideas in this well-explored area. That’s not to say there aren’t lots of important ideas, but the work I want to do is in complementing these tools rather than competing with them. But I do want to note that they exist on this continuum.
#### 2. Ambient awareness
This is the awareness of a person’s presence and activity. We have a degree of this with Instant Messaging and chat rooms (IRC, Campfire, etc). But they don’t show what we are actively doing, just our presence or absence, and in the case of group discussions some of what we’re discussing with other people.
Many tools that indicate presence also include status messages which would purport to summarize a person’s current state and work. I’ve never worked with people who keep those status messages updated. It’s a very explicit approach. At best it devolves into a record of what you had been doing.
A more interesting tool to make people’s presence more present is Sqwiggle, a kind of always-on video conference. It’s not exactly always-on, there is a low-fidelity video with no audio until you start a conversation with someone and it goes to full video and audio. This way you know not only if someone is actually sitting at the computer, but also if they are eating lunch, if they have the furrowed brows of careful concentration, or are frustrated or distracted. Unfortunately most people’s faces only show that they are looking at a screen, with the slightly studious but mostly passive facial expressions that we have when looking at screens.
Instant messaging has grown to include an additional the presence indicator: I am currently typing a response. A better fidelity version of this would indicate if I am typing right now, or if I forgot I started typing and switched tabs but left text in the input box, or if I am trying hard to compose my thoughts (typing and deleting), or if I’m pasting something, or if I am about to deliver a soliloquy in the form of a giant message. (Imagine a typing indicator that gives a sense of the number of words you have typed but not sent.)
I like that instant messaging detects your state automatically, using something that you are already engaged with (the text input box). Sqwiggle has a problem here: because you aren’t trying to project any emotions to your computer screen, Sqwiggle catches expressions that don’t mean anything. We can engage with our computers in different ways, there’s something there to express, it’s just not revealed on our faces.
I’d like to add to the activity indicators we have. Like the pages (and web apps) you are looking at (or some privacy-aware subset). I’d like to show how you are interacting with those pages. Are you flopping between tabs? Are you skimming? Scrolling through in a way that shows you are studying the page? Typing? Clicking controls?
I want to show something like the body language of how you are interacting with the computer. First I wondered if we could interpret your actions and show them as things like “reading”, “composing”, “being pissed off with your computer”, etc. But then I thought more about body language. When I am angry there’s no “angry” note that shows up above my head. A furrowed brow isn’t a message, or at least mostly not a message. Body language is what we read from cues that aren’t explicit. And so we might be able to show what a person is doing, and let the person watching figure out why.
#### 3. Working in close parallel
This is where both people (or more than 2 people) are actively working on the same thing, same project, same goal, but aren’t directly supporting each other at every moment.
When you’ve entered into this level of collaboration you’ve both agreed that you are working together — you’re probably actively talking through tasks, and may regularly be relying on each other (“does what I wrote sound right?” or “did you realize this test is failing” etc). A good working meeting will be like this. A bad meeting would probably have been better if you could have stuck to ambient awareness and promoted it to a more intense level of collaboration only as needed.
#### 4. Working directly
This is where you are both locked on a single task. When I write something and say “does what I wrote sound right?” we have to enter this mode: you have to look at exactly what I’m talking about. In some sense “close parallel” may mean “prepared to work directly”.
I have found that video calls are better than audio-only calls, more than I would have expected. It’s not because the video content is interesting. But the video makes you work directly, while being slightly uncomfortable so you are encouraged to acknowledge when you should end the call. In a way you want your senses filled. Or maybe that’s my propensity to distraction.
There’s a lot more to video calls than this (like the previously mentioned body language). But in each feature I suspect there are parallels in collaborative work. Working directly together should show some of the things that video shows when we are focused on a conversation, but can’t show when we are focusing on work.
#### 5. Demonstrating to another person
This is common for instruction and teaching, but that shouldn’t be the only case we consider. In Hotdish we have often called it “presenting” and “viewing”. In this mode someone is the driver/presenter, and someone is the passenger/viewer. When the presenter focuses on something, you want the viewer to be aware of that and follow along. The presenter also wants to be confident that the viewer is following along. Maybe we want something like how you might say “uh huh” when someone is talking to you — if a listener says nothing it will throw off the talker, and these meaningless indications of active listening are important.
Demonstration could just be a combination of direct work and social convention. Does it need to be specially mediated by tools? I’m not sure. Do we need a talking stick? Can I take the talking stick? Are these interactions like a conversation, where sometimes one person enters into a kind of monologue, but the rhythm of the conversation will shift? If we focus on the demonstration tools we could miss the social interactions we are trying to support.
#### Switching modes
Between each of these styles of interaction I think there must be some kind of positive action. A natural promotion of demotion of your interaction with someone should be mutual. (A counter example would be the dangling IM conversation, where you are never sure it’s over.)
At the same time, the movement between modes also builds your shared context and your relationship with the other person. You might be proofing an article with another person, and you say: “clearly this paragraph isn’t making sense, let me just rewrite it, one minute” — now you know you are leaving active collaboration, but you also both know you’ll be reentering it soon. You shouldn’t have to record that expectation with the tool.
I’m reluctant to put boundaries up between these modes, I’d rather tools simply inform people that modes are changing and not ask if they can change. This is part of the principles behind Defaulting To Together.
### Ownership
At least in the context of computers we often have strong notions of ownership. Maybe we don’t have to — maybe it’s because we have to hand off work explicitly, and maybe we have to hand off work explicitly because we lack fluid ways to interact, cooperate, delegate.
With good tools in hand I see “ownership” being exchanged more regularly:
• I find some documentation, then show it to you, and now it’s yours to make use of.
• I am working through a process, get stuck, and need your skills to finish it up. Now it’s yours. But you might hand it back when you unstick me.
• You are working through something, but are not permitted to complete the operation, you have to hand it over to me for me to complete the last step.
Layered on this we have the normal notions of ownership and control — the login accounts and permissions of the applications we are using. Whether these are in opposition to cooperation or maybe complementary I have not decided.
### Screensharing vs. Peer-to-Peer
Perhaps a technical aside, but when dealing with real-time collaboration (not asynchronous) there are two distinct approaches.
Screensharing means one person (and one computer) is “running” the session — that one person is logged in, their page or app is “live”, everyone else sees what they see.
Screensharing doesn’t mean other people can’t interact with the screen, but any interaction has to go through the owner’s computer. In the case of a web page we can share the DOM (the current visual state of the page) with another person, but we can’t share the Javascript handlers and state, cookies, etc., so most interactions have to go back through the original browser. Any side effects have to make a round trip. Latency is a problem.
It’s hard to figure out exactly what interactivity to implement in a screensharing situation. Doing a view-only interaction is not too hard. There are a few things you can add after that — maybe you let someone touch a form control, suggest that you follow a link, send clicks across the wire — but there’s no clear line to stop at. Worse, there’s no clear line to express. You can implement certain mechanisms (like a click), but these don’t always map to what the user thinks they are doing — something like a drag might involve a mousedown/mousemove/mouseup event, or it might be implemented directly as dragging. Implementing one of those interactions is a lot easier than the other, but the distinction means nothing to the user.
When you implement incomplete interactions you are setting up a situation where a person can do something in the original application that viewers can’t do, even though it looks like the real live application. An uncanny valley of collaboration.
I’ve experimented with DOM-based screen sharing in Browser Mirror, and you can see this approach in a tool like Surfly. As I write this a minimal version of this is available in Hotdish.
In peer-to-peer collaboration both people are viewing their own version of the live page. Everything works exactly like in the non-collaborative environment. Both people are logged in as themselves. This is the model TogetherJS uses, and is also present as a separate mode in Hotdish.
This has a lot of obvious advantages over the problems identified above for screensharing. The big disadvantage is that hardly anything is collaborative by default in this model.
In the context of the web the building blocks we do have are:
• URLs. Insofar as a URL defines the exact interface you look at, then putting both people at the same URL gives a consistent experience. This works great for applications that use lots of server-side logic. Amazon is pretty great, for example, or Wikipedia. It falls down when content is substantially customized for each person, like the Facebook frontpage or a flight search result.
• Event echoing: events aren’t based on any internal logic of the program, they are something initiated by the user. So if the user can do something, a remote user can do something. Form fields are the best example of this, as there’s a clear protocol for doing form changes (change the value, fire a change event).
But we don’t have:
• Consistent event results: events aren’t state changes, and transferring events about doesn’t necessarily lead to a consistent experience. Consider the modest toggle control, where a click on the toggler element shows or hides some other element. If our hidden states are out of sync (e.g., my toggleable element is hidden, yours is shown), sending the click event between the clients keeps them consistently and perfectly out of sync.
• Consistent underlying object models. In a single-page app of some sort, or a whatever fancy Javascript-driven webapp, a lot of what we see is based on Javascript state and models that are not necessarily consistent across peers. This is in contrast to old-school server-side apps, where there’s a good chance the URL contains enough information to keep everything consistent, and ultimately the “state” is held on a single server or database that both peers are connecting to. But we can’t sync the client’s object models, as they are not built to support arbitrary modification from the outside. Apps that use a real-time database work well.
To make this work the application usually has to support peer-to-peer collaboration to some degree. A messy approach can help, but can never be enough, not complete enough, not robust enough.
So peer-to-peer collaboration offers potentially more powerful and flexible kinds of collaboration, but only with work on the part of each application. We can try to make it as easy as possible, and maybe integrate with tools or libraries that support the kinds of higher-level synchronization we would want, but it’s never reliably easy.
### Synchronized vs. Coordinated Experiences
Another question: what kind of experiences do we want to create?
The most obvious real-time experience is: everything sees the same thing. Everything is fully synchronized. In the screensharing model this is what you always get and what you have to get.
The obvious experience is probably a good starting point, but shouldn’t be the end of our thinking.
The trivial example here is the cursor point. We can both be editing content and viewing each other’s edits (close to full sync), but we don’t have to be at exactly the same place. (This is something traditional screensharing has a hard time with, as you are sharing a screen of pixels instead of a DOM.)
But other more subtle examples exist. Maybe only one person has the permission to save a change. A collaboration-aware application might allow both people to edit, while still only allowing one person to save. (Currently editors will usually be denied to people who don’t have permission to save.)
I think there’s fruit in playing with the timing of actions. We don’t have to replay remote actions exactly how they occurred. For example, in a Demonstration context we might detect that when the driver clicks a link the page will change. To the person doing the click the order of events is: find the link, focus attention on the link, move cursor to the link, click. To the viewer the order of events is: cursor moves, maybe a short click indicator, and boom you are at a new page. There’s much less context given to the viewer. But we don’t have to display those events with the original timing for instance we could let the mouse hover over its target for a more extended amount of time on the viewer.
High-level (application-specific) representation of actions could be available. Instead of trying to express what the other person is doing through every click and scroll and twiddling of a form, you might just say “Bob created a new calendar event”.
In the context of something like a bug tracker, you might not want to synchronize the comment field. Instead you might want to show individual fields for all participants on a page/bug. Then I can see the other person’s in-progress comment, even add to it, but I can also compose my own comment as myself.
This is where the peer-to-peer model has advantages, as it will (by necessity) keep the application in the loop. It does not demand that collaboration take one form, but it gives the application an environment in which to build a domain-specific form of collaboration.
We can imagine moving from screenshare to peer-to-peer through a series of enhancements. The first might be: let applications opt-in to peer-to-peer collaboration, or implement a kind of transparent-to-the-application screensharing, and from there tweak. Maybe you indicate some scripts should run on the viewer’s side, and some compound UI components can be manipulated. I can imagine with a component system like Brick where you could identify safe ways to run rich components, avoiding latency.
### How do you package all this?
Given tools and interactions, what is the actual context for collaboration?
TogetherJS has a model of a persistent session, and you invite people to that session. Only for technical reasons the session is bound to a specific domain, but not a specific page.
In Hotdish we’ve used a group approach: you join a group, and your work clearly happens in the group context or not.
One of the interesting things I’ve noticed when getting feedback about TogetherJS is that people are most interested in controlling and adding to how the sessions are setup. While, as an implementor, I find myself drawn to the tooling and specific experiences of collaboration, there’s just as much value in allowing new and interesting groupings of people. Ways to introduce people, ways to start and end collaboration, ways to connect to people by role instead of identity, and so on.
Should this collaboration be a conversation or an environment? When it is a conversation you lead off with the introduction, the “hello” the “so why did you call?” and finish with “talk to you later” — when it is an environment you enter the environment and any coparticipants are just there, you don’t preestablish any specific reason to collaborate.
### And in conclusion…
I’m still developing these ideas. And for each idea the real test is if we can create a useful experience. For instance, I’m pretty sure there’s some ambient information we want to show, but I haven’t figured out what.
Experience has shown that simple history (as in an activity stream) seems too noisy. And is history shown by group or person?
In the past I unintentionally exposed all tab focus and unfocus in TogetherJS, and it felt weird to both expose my own distracted state and my collaborator’s distraction. But part of why it was weird was that in some cases it was simply distraction, but in other cases it was useful multitasking (like researching a question in another tab). Was tab focus too much information or too little?
I am still in the process of figuring out how and where I can explore these questions, build the next thing, and the next thing after that — the tooling I envision doesn’t feel impossibly far away, but still more than one iteration of work yet to be done, maybe many more than one but I can only see to the next peak.
Who else is thinking about these things? And thinking about how to build these things? If you are, or you know someone who is, please get in contact — I’m eager to talk specifics with people who have been thinking about it too, but I’m not sure how to find these people.
### Lukas Blakk — I’m looking at you, Gift Horse
I’m going to say something that might be controversial, or hard to understand for some folks but it’s getting to the point where I’m starting to stay away from the office more than I’d like to so here goes:
The snacks. The never-ending supply that I would *never* eat otherwise. That I would not go to a corner store and purchase. I really wish they were gone. I wish that we, people who all make salaries above that needed for living decently, were accountable for buying and bringing in our own snacks as we chose. Keep them at your desk, share with nearby co-workers, I would love to see this. It would be so much better for me if the only things we had in the kitchen were fruit and veg. Milk for coffee, sure.
When I first started working for Mozilla, as a working class grew up broke kid, I was floored by all the free stuff & free food. I lived off it as an intern to save money. I appreciated it. It made me feel cared for. Now it’s like a trap. A constant test of my ability to make “good” decisions for myself 250 times a day. Often I fail. Failure makes me stay away from the office as an attempt to cope. Staying away from the office causes loss of connection with you all.
I suspect there might be feelings of being ‘punished’ if the snacks were less abundant (or even gone) because we’re used to all these ‘perks’ in our tech offices. It’s not something most offices (outside of tech industry) have and I would encourage a perspective shift towards accountability, recognizing the privileges we *already* have even without free all-day snacks, and thinking about what it means if some people have to choose to stay away. Considering the origin of these snacks is from a startup mentality where workers were expected to be pulling really long hours without getting up, out, or going home. Is that really what we want to promote and call a perk?
### Andrew Halberstadt — A Workflow for using Mach with multiple Object Directories
Mach is an amazing tool which facilitates a large number of common user stories in the mozilla source tree. You can perform initial setup, execute a build, run tests, examine diagnostics, even search Google. Many of these things require an object directory. This can potentially lead to some confusion if you typically have more than one object directory at any given time. How does mach know which object directory to operate on?
It turns out that mach is pretty smart. It takes a very good guess at which object directory you want. Here is a simplification of the steps in order:
1. If cwd is an objdir or a subdirectory of an objdir, use that
2. If a mozconfig is detected and MOZ_OBJDIR is in it, use that
3. Attempt to guess the objdir with build/autoconf/config.guess
The cool thing about this is that there are tons of different workflows that fit nicely into this model. For example, many people put the mach binary on their $PATH and then always make sure to 'cd' into their objdirs before invoking related mach commands. It turns out that mach works really well with a tool I had written quite awhile back called mozconfigwrapper. I won't go into details about mozconfigwrapper here. For more info, see my previous post on it. Now for the sake of example, let's say we have a regular and debug build called 'regular' and 'debug' respectively. Now let's say I wanted to run the 'mochitest-plain' test suite on each build, one after the other. My workflow would be (from any directory other than an objdir): $ buildwith regular
$mach mochitest-plain$ buildwith debug
$mach mochitest-plain How does this work? Very simply, mozconfigwrapper is exporting the$MOZCONFIG environment variable under the hood anytime you call 'buildwith'. Mach will then pick up on this due to the second step listed above.
Your second question might be why bother installing mozconfigwrapper when you can just export MOZCONFIG directly? This is a matter of personal preference, but one big reason for me is the buildwith command has full tab completion, so it is easy to see which mozconfigs you have available to choose from. Also, since they are hidden away in your home directory, you don't need to memorize any paths. There are other advantages as well which you can see in the mozconfigwrapper readme.
I've specially found this workflow useful when building several platforms at once (e.g firefox and b2g desktop) and switching back and forth between them with a high frequency. In the end, to each their own and this is just one possible workflow out of many. If you have a different workflow please feel free to share it in the comments.
### Michael Kaply — New Features for CCK2
I realize it's been quite a while since I've posted any updates. I've been heads down on some projects, as well as dealing with some personal issues.
I have been working on the CCK2, though, and I have a new version to share.
This version adds some requested features, including custom JavaScript in the AutoConfig file as well as better backup of your configurations. It also migrates configurations from the original CCK Wizard.
I've also changed the versioning to make it clear that this version is newer than the CCK Wizard.
My plan is to deprecate and remove the old CCK Wizard in the next few weeks, so please take some time to make sure the new CCK2 works for you.
### Doug Belshaw — What’s new with Open Badges?
Those keeping track will know that last year I moved teams within the Mozilla Foundation. I moved away from the Open Badges team to focus on (what is now) the Web Literacy Map. Despite this, I still have close ties to the Open Badges team. In fact, I’m currently helping design Webmaker and Web Literacy badges.
The big news at the start of 2014 on the Open Badges front is that there’s a new Badge Alliance to grow and develop the wider ecosystem. The Badge Alliance is a non-profit organisation to be led by Erin Knight, co-founder of the Open Badges Infrastructure (OBI). Over the next few months she’ll be joined at the Badge Alliance with a few members of the current Open Badges team. There’s more detail in Erin’s blog post.
Happily, Mozilla will continue to develop and nurture the open source technical stack behind the OBI. The next milestone is the release of BadgeKit in the next few months. This should remove any remaining friction from issuing Open Badges. For more on BadgeKit be sure to follow the blogs of Sunny Lee and Chris McAvoy. And, as ever, you should also follow Carla Casilli’s posts on badge system design.
If you want to keep up with what’s going on with Open Badges in general, the easiest thing to do is to keep tabs on the Open Badges blog. The weekly ‘Badger Beats’ in particular is a useful round-up of news from the world of badges. There’s also a good deal of conversation within the Open Badges discussion group. This is a friendly forum for those planning to dip their toes into the water for the first time.
Having joined Mozilla in 2012 to work both on the Open Badges project and (what’s grown into) the Web Literacy Map. I’m delighted that the former has been incubated with such success. I’m also pleased that the latter is to underpin both the next iteration of Webmaker and Mozilla’s aims to create a more web literate planet.
If you’d like to get involved with Mozilla’s work to create a better web then we’d love to have you onboard! The easiest way to get involved with the two projects I’ve mentioned is to join their respective weekly calls. The Open Badges community call is every Wednesday, and you can join us for the new #TeachTheWeb community call every Thursday.
Questions? I’ll do my best to respond to them in the comments below.
Image CC BY-NC-SA RSC Scotland
## March 02, 2014
### Tobias Markus — Atypical Confessions of an atypical contributor
I, your favorite hypocrite, traitor or whatever people might call me, thought about writing this for a long time. Just to give a different perspective on things. I have been a contributor for a rather long time (5 years to be exact). I confess that I am not a regular contributor. These things are mostly thoughts that I have, and I am going to be blunt about them. If people can’t deal with it, so be it. And this is not gonna be about Directory Tiles, even though I am eager to write my thoughts about them, but, no, not this time.
#1 – I hate the word ‘Mozillians’.
The word “Mozillians” suggest that people contributing to the Mozilla project are all the same. All one kind. It takes the focus away from potential differences in personality or culture. In my opinion, these differences need to be valued. For we are all different. And the fact that we contribute doesn’t take that difference away.
There’s another reason why I hate that word: “Mozillian” seems like “Human”. A status that, once acquired, lasts forever and cannot be taken away. However, what if I don’t want to be part of that group anymore? I think the term “contributor” is much more suited for that. It still gives some means of escape from the whole thing.
#2 – Products mean nothing to me.
Given there’s so much focus on products nowadays: I don’t like that. Products mean nothing to me. It’s just a name for what? Bunch of code? Initiatives? Philosophical thoughts? Honestly, do we need a name for everything? If we think about it, our product is not so different from other products. The browser is written in some programming language and evolved over years. Same for other products. That doesn’t make it ‘awesome’. That just means it’s evolved. Product names are just for identification, and that’s marketing. I don’t have anything to do with marketing reasons. I have my own mind.
Are we humans awesome? You’d assume it depends on the point of view. And YES: IT DOES!
#3 – I don’t like direction.
I am someone who values individuality. I don’t like direction. Giving direction means potentially saying “I know more than you do” or “I am better than you”, therefore I tell you what to do, and I will never accept that. Not when it comes to a such diverse group of people as the contributor base.
#4 – Good things take time
I don’t like for things being rushed. That’s not how I work. There have been so many things in the past years that have been rushed and then improved and improved or abandoned for reasons. Why not improve them and release them when ready? Unfinished projects do not make us more popular with the userbase.
#5 – Controversial discussions are good discussions
On a related note: In order for discussions to get most healthy, it’s important for them to be vivid. Vivid discussions means that any stand point is accepted. It might get a little heated from time to time, but that way we can ensure that there are a lot of thoughts covered in the discussion. I hate it when community doesn’t even have a say in what gets decided.
#6 – I hate the “1 million mozillians” initiative.
It’s hard to manage 1 million people. And frankly, I doubt Mozilla can do this. Let’s think about this: People are people, they have their own mind, their own ideals, their own hobbies, their own opinion. You can find more potential reasons in my comment here: http://hoosteeno.com/2013/12/17/a-new-mozillians-org-signup-process/#comment-159
What do they need 1 million contributors for? Hint: It’s not to benefit the people themselves.
### Jeff Griffiths — How I (quickly) write Firefox Extensions
Over the last 2 or so years I've written a lot of add-ons and in particular a lot of very very simple add-ons that are either quick examples to show someone how to do something, or to try to reproduce a bug in Firefox or the SDK. And because I'm lazy, I've automated a lot of the tedious parts of this. Here's how I do it.
### Disclaimer
I use OS X and a lot of this assumes having a reasonable UNIX shell environment. If you're on Windows and don't have bash, some parts of this will not work for you. Thankfully, node.js 'jus works' everywhere.
• you need to install the Add-on SDK, the instructions are over here. In particular you need to make sure that the bin/cfx script is on your $PATH environment variable. • in Firefox, install Wladimir Palant's excellent Extension Auto-installer extension. This extension allows you to reload newer builds of your extension into Firefox without having to re-start. ### Creating a skeletal add-on The cfx tool does this already, but it creates a skeletal add-onwith example code and I almost never want that. So I use this quick shell script called jpinit: #!/bin/bash _PWD=pwd mkdir -p "$_PWD/$1" && cd "$_PWD/$1" && cfx init echo "" > lib/main.js && echo "" > doc/main.md && echo "" > test/test-main.js && echo "" > ./README.md Put this on your path too, I tend to put scripts like this in $HOME/usr/local/bin or similar.
Once I've got a blank project going, I get to the fun part of actually implementing features. Whenenver I want to test my code, all I need to do is run this scipt and it will build and install my add-on in Firefox:
https://gist.github.com/canuckistani/9301061
Under the hood it's just using node's child_process module to first run cfx xpi, then wget to upload the xpi file to Firefox.
How does this even work? That's the magic of the 'Extension Auto-Installer' extension, how it works is it runs a local web server inside Firefox that listens on a port for xpi file uploads. If it gets an xpi file, it tries to install or reload it.
### Editor Support
I primarily use Sublime Text. The slightly tricky thing about using ST for add-on development is that internal Firefox and add-on code is able to use more advanced JS features. To convince ST that things like the let and yield keywords are okay, you need to do the following:
• install Brandon Benvie's JavaScriptNext package, and use it with JS files by going to 'View / Syntax / 'Open all with current extension as...' and selecting 'JavaScritpNext - ES6 Syntax'.
• install a linter, I use SublimeLinter. I use it in jshint mode, with jshint installed and this .jshintrc file
Here's a quick screencast to show you how quickly this can get you hacking:
When you consider how time-consuming this has been in the past, I'm pretty happy with it, in particular if I just need to hack on something to answer a question on Stack Overflow or from IRC. The time consuming part becomes writing code, and that's the way it should be.
I do expect this all to change soon; the Jetpack team has been working on some new features that will provide everyone with an even more streamlined process without the need for extra extensions or shell scripts, as well as an advanced debugger specifically for add-ons. For a glimpse of just how awesome you really need to check out Erik's post from last week.
### Christian Heilmann — Too easy – didn’t learn – my keynote at jQuery Europe 2014
I am right now on the plane back to England after my quick stint at Vienna giving the keynote at jQuery Europe 2014. True to my ongoing task to challenge myself as a speaker (and as announced here before) I made a bit of a bet by giving a talk that is not in itself technical, but analytical of what we do as developers. The talk was filmed and if you can’t wait, I made the slides available and recorded a screencast (with low sound, sorry).
There is also a audio recording on SoundCloud and on archive.org.
### Quick keynote recap
In the keynote, I tried to analyse the massive discrepancy between what we as web developers get and how happy we seem to be.
We are an elite group in the job market: we are paid well, our work environment is high-tech and our perks make other people jealous. We even get the proverbial free lunches.
And yet our image is that of unsatisfied, hard to work with people who need to be kept happy and are socially awkward. I was confused that a group with all the necessary creature comforts is not an example of how easy working together could be. Instead, we even seem to need codes of conduct for our events to remind people not to behave badly towards people of the other sex or cultural background. Are we spoiled? Are we just broken? Or is there more?
I’ve found a few reasons why we can come across as unsatisfied and hard to handle and the biggest to me was that whilst we are getting pampered, we lack real recognition for what we do.
When you get a lot, but you yourself feel you are not really doing much, you are stuck between feeling superior to others who struggle with things you consider easy and feeling like a fraud. Instead of trying to communicate out about what we do, how much work it involves and why we do things in a certain way we seem to flee into a world of blaming our tools and trying to impress one another.
### Initial Feedback
I am very happy to report that the feedback I got at the event was very good. I had some criticism, which is great as it gives me something to think about. And I had some heartfelt remarks from people who said I’ve opened their eyes a bit as to why they behaved in a certain way and now know how to fix some issues and clashes they had.
### Want more?
I don’t want to repeat it all here again – if wanted, I could write a larger article on the subject to be published somewhere with more eyeballs. Simply listen to the recording or wait for the video to be released.
### Material
I couldn’t have done this without watching some other talks and reading some other posts, so here are links to the materials used:
### Thanks
I want to thank the audience of jQuery Europe for listening and being open to something different. I also want to thank the organisers for taking the chance (and setting the speakers up in the most epic hotel I ever stayed in). I also want to point out that another talk at jQuery Europe 2014 – “A Web Beyond Touch” by Petro Salema was one of the most amazing first stage performances by a speaker I have seen. So keep your eyes open for this video.
Photo by Douglas Neiner
### Andy McKay — Foundations
As it turns out, software foundations can be pretty useful. There's a tipping point in open source software when all of a sudden money becomes involved and it starts to get serious. Companies are formed, trademarks are violated and all of a sudden, stuff becomes real.
About 10 years ago I was around when Plone went from a small project to a "starting to get serious project". Alexander Limi and Alan Runyan had the foresight right there and then to realise that they needed a foundation, someone to hold the IP and trademarks of Plone. This got it away from being controlled by individuals or companies and instead placed in the community.
The Plone Foundation was formed in 2004 and one of the issues was that a company had been formed, Plone Solutions. in Norway to provide consulting. Having a company with the projects name in the title was a trademark violation. It also leads to confusion within the project and implies a relationship between the company and the project that doesn't exist. The foundation and the company talked and the company amicably changed its name to Jarn instead. Although Jarn is no longer around, Plone is still going strong and so is the Plone Foundation.
As another example, recently the Python Software Foundation had to fight for the Python trademark in Europe when a hosting company tried to trademark Python. The company backed down when the Python community stepped up to help the foundation fight that and proceed with its own trademark.
The Mozilla foundation, not the Mozilla corporation, holds the trademark and intellectual property for Mozilla projects. To commit to a Mozilla project, you have to agree to the committers agreement. Like other foundations it fights against people abusing trademarks. For example, taking Firefox, bundling it up with malware and then distributing it under the Firefox trademark.
In all these cases it's not a company holding trademarks and any intellectual property (depending on the foundation and the software license). Instead a foundation is created by the developers and maintained by the development community. It is the foundations job to act on behalf of the projects software community to maintain and improve it.
And I think Node.js is finding out why it needs one.
Note: I was on the Plone Foundation board, I'm currently the secretary of the Django Software Foundation and I work at Mozilla Corporation (not the Mozilla Foundation)
### Planet Mozilla Interns — Willie Cheong: Mouse / MooseTaste of Good Old Times
Today I meet Erasmus again after almost 4 long years. Back in Singapore I remember we would hang out with the usuals every other day for lunch/dinner/12am meals. How time has gone by since then. I heard about how everyone was doing well and we had a great time catching up.
Ever since moving to Canada I have often wondered about whether old friends will meet again and despite the years, still have great time hanging out. I occasionally get dreams about meeting my old friends and feeling awkward in the moment because we’ve all changed and been disconnected for so long. The image of these friends frozen in my mind exactly as they were when I last saw them years ago.
Yes, indeed we have changed. The friends we once thought were the best people ever have grown, matured, started new careers, gotten new experiences and built new lives. But friends will always be friends. Meeting with Erasmus today felt good, and sort of heartwarming. It’s like watching Toy Story 3 after many years since Toy Story 2, but way better because this is real life.
## March 01, 2014
### Priyanka Nag — GNUnify 2014
This was my third GNUnify in a row as a participant....and the second one as an organizer. Being a student of SICSR and a member of PLUG, GNUnify is somehow way more than just another conference....its MY conference. Everything about GNUnify is a bit too special for me.
The GNUnify fever gets on all the organizers right from December, but this time, being away from college (because of my job)....I did catch the fever a bit late ;)
Right from 7th of Feb, right from a week before the commencement of the event, I went to college almost every evening; to jump into the excitement of GNUnify preparation. Its very difficult to explain others how we get this passion for the so called EXTRA work after office, but we who live it...just LOVE it!
GNUnify is of-course way more to me than just the Mozilla Dev rooms. This year, the Mozilla Dev rooms were a tough job though...due to the lack of budget.
The last MozCafe meeting that we had before GNUnify was a tricky one. Planning an event like GNUnify with "0" budget is not easy (rather its not possible)....someone we did manage it well with little spending from our own pockets :P
Day one was planned to be a bit different this year. We tried out 'the booth format' (instead of one to one talks, we had project tables (kind of booths) for as many Mozilla projects as we could. There were project experts in each booth) instead of the normal tracks. It wasn't much of a success though. There were several reasons behind the failure of this format on Day one:
• Lack of a proper space- The space provided wasn't exactly a suitable structure for booths.
• Improper crowd management - When in a technical conference, we never like to wait. Initially our booths were sooo much crowded that people had to wait outside the room which eventually ended up in us losing them.
• Improper publicity- Somehow, the entire booth format wasn't well advertised to our audience. The people who visited the Mozilla rooms expected the traditional tracks and were disappointed not to find them.
A glimpse of the MDN booth on Day I
Day two went much better. On this day, we had several different tracks like: Webmaker, MDN, Localization, Privacy & Security, Rust, Firefos OS, Reps and FSA. Things went better than expected here. There were sessions like Firefox OS where we had to send some of our audience away due to the lack of sitting space in the Dev rooms.
A few very important learning from GNUnify 2014:
• For any Open Source conference, using Windows OS while making a presentation should be strictly avoided. The Mozillians had to face some criticism as some of our speakers forgot this rule of thumb.
• A little more coordination is required within the team...mainly in situation where we have limited resources and a huge responsibility, everyone needs to understand their role well.
GNUnify 2014 was a good show...though there are obviously some immense chances of improvements. Hopefully 2015 will be even better :) | 2014-03-12 01:43:55 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 4, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.21664248406887054, "perplexity": 2488.9246132950298}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-10/segments/1394020792760/warc/CC-MAIN-20140305115952-00027-ip-10-183-142-35.ec2.internal.warc.gz"} |
http://dictionary.reference.com/reverseresults?q=%20r%C3%A9sum%C3%A9&db=reverse | # 1-20 of 20 possibilities
Definition/MeaningWord/Phrase
cardinal number that is the sum of nine and one; the base of the decimal system , , , ,
cardinal number that is the sum of ten and one , ,
cardinal number that is the sum of eleven and one , , ,
cardinal number that is the sum of twelve and one , , , ,
cardinal number that is the sum of thirteen and one , ,
cardinal number that is the sum of fourteen and one , ,
cardinal number that is the sum of fifteen and one , ,
cardinal number that is the sum of sixteen and one , ,
cardinal number that is the sum of seventeen and one , ,
cardinal number that is the sum of eighteen and one , ,
cardinal number that is the sum of one and one or a numeral representing this number , , ,
cardinal number that is the sum of nineteen and one , ,
cardinal number that is the sum of twenty and one , ,
cardinal number that is the sum of twenty-one and one , ,
cardinal number that is the sum of twenty-two and one , ,
cardinal number that is the sum of twenty-three and one , , ,
cardinal number that is the sum of twenty-four and one , ,
cardinal number that is the sum of twenty-five and one , ,
cardinal number that is the sum of twenty-six and one , ,
cardinal number that is the sum of twenty-seven and one , ,
Search another word or see résumé on Thesaurus | Reference | 2014-10-25 23:35:51 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9261178374290466, "perplexity": 943.459458876817}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-42/segments/1414119651455.41/warc/CC-MAIN-20141024030051-00066-ip-10-16-133-185.ec2.internal.warc.gz"} |
http://www.finderchem.com/which-identifies-all-the-integer-solutions-of-x-17.html | # Which identifies all the integer solutions of x 17?
Integer Solutions to the Equation an +bn ... This means we need only prove the FLT for all odd primes and ... S = X 2−Y Plugging these into equation 17, we have the ... - Read more
An integer triangle or integral triangle is a triangle all of whose sides ... then all the other points are at (x, y) ... all primitive solutions can be obtained by ... - Read more
## Which identifies all the integer solutions of x 17? resources
### Which identifies all the integer solutions of the equation ...
Which identifies all the integer solutions of the equation |x| = 12? A. 12 and ... Which identifies all the integer solutions of the equation |x| = 12?
### which identifies all the integer solutions of [x]=14 ...
Resources > Answers > which identifies all the integer solutions of [x]=... + Ask a question. 0 0 which identifies all the integer solutions of ...
### Which identifies all the integer solutions of the equation ...
Which identifies all the integer solutions of the equation |x| = 12? ... Weegy: x + y = 57 x - y = 17 Since you have 2 equations in 2 variables, ...
### How do I solve this for integer solutions of x, y and z ...
Assuming you didn't miss any brackets; i.e. the question asks us to find all integer solutions of the equation: xy + (1/(xyz)) + x + z = 0.138
### Find the number of integer solutions of x1 + x2 + x3 = 15
17. Find the number of ... Find the number of integer solutions of:.$$x + y + z \:=\: 15$$ ... Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
### Find all solutions of the equation. {image} Select the ...
Find all solutions of the following equation: sin x ... 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 ... integer: Find all solutions of the ...
### ACT Math Practice Questions with Detailed Solutions - sample 1
Solution Let x be the length of the side of the equilateral triangle. ... All real numbers are solutions of this equation. ... The nearest integer is 17.
### Transposable integer - Wikipedia, the free encyclopedia
The integer X is the repeating digits of the fraction 1 ... Find X. Solution: ... 3 = 17, giving X as the repeating digits of 2 ...
### Solutions to Exam 1 - Binghamton University
solution is then 193−105 = 88 and all solutions are given by the formula x = 88 ... x + 6 ≡ 3 (mod 17) or x + 6 ... p if there is no integer x such that a ...
### Sums of Three Cubes - MathPages
Sums of Three Cubes ... In general it seems to be a difficult problem to characterize all the solutions of x^3 ... the question of whether ALL integer solutions are ...
### An L1-norm method for generating all of efficient ...
found solutions. When all variables are integer and ... Integer programming duality in multiple ... 17. Figure 3 The all of efficient solutions of the MOLP example.
### The “Integer Brick” Problem - Durango Bill
... you may want to use these combinations to verify that they all have integer ... In the multiplication of 1 x 5 x 17 ... An external solution consists of integer ...
### Nick's Mathematical Puzzles: Solution 48
Show that x = 2, y = 4 is the only integer solution. ... 17.362: 10: 1.2915: ... k is a positive integer. Therefore all rational solutions are of the form x = (1 + 1 ...
### Integer | What are Integers | Integer Rules | Math ...
Integers is also considered as combination of positive ... find the integer? Solution: The numbers are consecutive so we take one integer as x and the another ...
### MathPages Wanted List
... If each "1" in the binary representation of the integer x signifies a ... has a solution with x,y,(x+y) all non ... (17) For any positive integer n ...
### Integer Programming - Imperial College London
Definitions Mixed Integer Programming Problem. min x0 = cTx subject to Ax = b x j ≥ 0 for j ∈ N = {1,...,n} x j ∈ Z for j ∈ Z ⊆ N. Note: x j ∈ N \Z are ...
### Consecutive Integer Problems (with worked solutions & videos)
... Consecutive Integer Problems. ... Solution: Step 1: Assign variables : Let x = least integer. ... The question wants all the 3 consecutive numbers: 29, ...
### how seperate integer part and fractional part? - CodeProject
... which you can store in an integer: double x = 0. 0; ... endl
### Fermat’s last theorem | Nature of Mathematics
Secondly we want x, y, z to all be ... Suppose that x^n + y^n = z^n has an integer solution (with of course x ... if Fermat’s theorem is true for some integer n ...
### An L1-norm method for generating all of efficient ...
... (a method for generating all the efficient solutions of a 0–1 multi ... efficient solutions to multi-objective integer linear ... 712X-8-17 Print ...
... which is what the Chinese Remainder ... since $17\equiv ... so the smallest positive solution is$x=348$, and the integer solutions are all the numbers ... ### CHAPTER XV: APPLIED INTEGER PROGRAMMING - Texas A&M University ... Y i identifies whether constraint i is active ... all possible integer solutions ... was more than 17, the solution value could move to X=4 and Y=3. ### Greatest Integer Function | Math@TutorVista.com Greatest integer function also called as the floor function is one of the generally used function in mathematics. The greatest integer function of a real number x is ... ### Complexity=2, Mode=basic - Math Practice and Math Help ... 14,15,16 are consecutive integers 14,17 ... Six more than an integer times five less than the integer is 42. Find all possible solutions ... Solution Let x = integer ### Consecutive Numbers - Questions and Solutions Questions and solutions for consecutive numbers., ... Setting up equations and solving leads to a non integer solution for x. ... All Topics; Reprints; Help; ### Find All Solutions Of The Following Equation 4 ... | Chegg.com Answer to Find all solutions of the following equation 4 cos^2x-4cos x +1= 0 Select the correct answer, ... where k is an integer ### Integers - Math Goodies Learn integers with lessons from Math ... Solution: The distance from ... Whole numbers less than zero are called negative integers. The integer zero is neither ... ### Math Forum - Ask Dr. Math I need to know how to get positive integer solutions of two Diophantine equations ... to find all integer solutions to an ... that all solutions are x ... ### elementary number theory - Find all integer solutions:$x ...
Find all integer solutions of the following equation: $$x^4+x^3+x^2+x=y^2$$ current community. chat blog. ... Find all of the integer solutions of $x^3y+y^3z+z^3x=0.$
### c# - How to Round Up The Result Of Integer Division ...
If I have x items which I want to display in ... All the integer math solutions are going to be more efficient than any ... to round up the value to the next integer.
### The number of solutions of (x) = m - Altgeld Hall
An old conjecture of Sierpinski´ asserts that for every integer k > 2, ... THE NUMBER OF SOLUTIONS OF φ(X) = M 17 For brevity, ... all prime is ˝ x(loglogx)3 Us 3s ...
Related Questions
Recent Questions | 2017-06-26 09:09:08 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.3475337624549866, "perplexity": 652.2881751419625}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-26/segments/1498128320695.49/warc/CC-MAIN-20170626083037-20170626103037-00068.warc.gz"} |
http://mathhelpforum.com/calculus/105014-trig-substitution-again-print.html | # Trig Substitution again
• Sep 29th 2009, 09:58 AM
Hellacious D
Trig Substitution again
The integral from 0 to a of (x^2)(((a^2)-(x^2))^.5) dx
It must be done using trig substitution. I have it down to
(((a^4)(2sqrt(2))-(a^4))/3 + ((a^4)-((a^4)(4sqrt(2))))/5
Is there any way to simply further?
• Sep 29th 2009, 11:01 AM
Amer
Quote:
Originally Posted by Hellacious D
The integral from 0 to a of (x^2)(((a^2)-(x^2))^.5) dx
It must be done using trig substitution. I have it down to
(((a^4)(2sqrt(2))-(a^4))/3 + ((a^4)-((a^4)(4sqrt(2))))/5
Is there any way to simply further?
$\int_{0}^{a} x^2\sqrt{a^2-x^2} dx$
let $a\sin u = x \Rightarrow a\cos u\cdot du = dx$
$\cos u = \frac{\sqrt{a^2-x^2} }{a}$
$\int a^2\sin ^2u (a\cos u )(a\cos u) du$
$\int a^4 \sin ^2u \cos ^2u\cdot du$
$\int \frac{a^4 \sin ^2(2u)}{4} du$
$\int \frac{a^4 (1-\cos 4u)}{8} du$
$\frac{a^4 (u)}{8} - \frac{a^4\sin 4u}{32}$
but $u=\sin ^{-1} \frac{x}{a}$
$\frac{a^4 \sin ^{-1} \frac{x}{a}}{8} - \frac{a^4\sin 4(\sin ^{-1} \frac{x}{a})}{32} \mid ^{a}_{0}$
$\frac{a^4 \sin ^{-1} (1)}{8} - \frac{a^4 \sin 4(\sin ^{-1} (1))}{32} - \frac{a^4 \sin ^{-1} (0)}{8} + \frac{a^4 \sin 4(\sin ^{-1} (0))}{32}$
$\sin ^{-1} (1) = \frac{\pi}{2}$
$\sin ^{-1} (0) = 0$ | 2016-09-28 16:19:47 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 13, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9957746267318726, "perplexity": 4746.646020636488}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-40/segments/1474738661555.40/warc/CC-MAIN-20160924173741-00268-ip-10-143-35-109.ec2.internal.warc.gz"} |
https://ischool.sg/Clones/index2/42219?url=https%3A%2F%2Fischool.sg%2Fquestions%2Fhashtag%3Ftype%3Dall%26tag%3DNumber%2Bx%2Bvalue%26level%3DPrimary%2B6?login=1 | Question
Fill in the blanks.
There are some $2 notes and$100 notes.
The ratio of $2 notes and$100 notes is 4 : 3.
1. Total number of notes = _____ u
2. Difference in the number of $2 notes and$100 notes = _____ u
3. Total value of notes = _____ u
4. Difference in the value of $100 notes and$2 notes = _____ u
4 m
(a)
Click button first when a symbol is required. X
(b)
Click button first when a symbol is required. X
(c)
Click button first when a symbol is required. X
(d)
Click button first when a symbol is required. X
Fill in the blanks.
There are some $2 notes and$100 notes.
The ratio of $2 notes and$100 notes is 4 : 3.
1. Total number of notes = _____ u
2. Difference in the number of $2 notes and$100 notes = _____ u
3. Total value of notes = _____ u
4. Difference in the value of $100 notes and$2 notes = _____ u | 2022-08-12 02:49:17 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5304842591285706, "perplexity": 5986.8684613075875}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-33/segments/1659882571538.36/warc/CC-MAIN-20220812014923-20220812044923-00491.warc.gz"} |
http://www.mathnet.ru/php/archive.phtml?jrnid=smj&wshow=issue&year=1993&volume=34&volume_alt=&issue=1&issue_alt=&option_lang=eng | RUS ENG JOURNALS PEOPLE ORGANISATIONS CONFERENCES SEMINARS VIDEO LIBRARY PACKAGE AMSBIB
General information Latest issue Archive Impact factor Subscription Search papers Search references RSS Latest issue Current issues Archive issues What is RSS
Sibirsk. Mat. Zh.: Year: Volume: Issue: Page: Find
Products and vector bundles within the category of $G$-supermanifoldsK. Bartocci, U. Bruzzo, D. Hernández Ruipérez 5 Fourth order accuracy collocation method for singularly perturbed boundary value problemsI. A. Blatov, V. V. Strygin 16 On Rosenthal's inequality and rearrangement invariant spacesM. Sh. Braverman 32 Varieties of associative rings in which all critical rings are basicM. V. Volkov 38 The Cauchy problem for certain degenerate quasilinear parabolic equations with absorptionA. L. Gladkov 47 On removable singularities of solutions to first order elliptic systems with irregular coefficientsN. S. Dairbekov 65 A continuous linear right inverse of the representation operator and applications to the convolution operatorsYu. F. Korobeinik, S. N. Melikhov 70 On normal solvability of the exterior differentiation on a warped cylinderV. I. Kuz'minov, I. A. Shvedov 85 Isomorphic crossed products of groups and prime ringsS. V. Mikhovski 96 On a countable system of convolution equationsV. V. Napalkov 106 Martingale inequalities in rearrangement invariant spacesI. Ya. Novikov 113 Anisotropic Sobolev spaces in the theory of functionsYu. A. Peshkichev 121 Extrinsic geometric properties of shortest geodesics in a neighborhood about a point of strict tangencyI. V. Polikanova 125 Weak convergence of probability measures in the spaces of continuously differentiable functionsS. M. Prigarin 140 On existence of a global solution to the initial-boundary value problem for the Boltzmann equationA. Sakabekov 145 On the system of equations of the laminar boundary layer in the presence of injection of a non-Newtonian fluidV. N. Samokhin 157 The central and secondary link problems for an equation and a second rank systemV. R. Smilyanskii 169 On mappings generating the embeddings of Sobolev spacesA. D.-O. Ukhlov 185 Conformal parametrization of curvilinear quadrangles by means of geodesic quadrangles on surfaces of constant positive curvatureG. A. Chumakov 193 Optimal control problem for the backward heat equationO. Yu. Imanuvilov 204 On existence of a solution periodic int to the first exterior mixed problem for the Sobolev systemS. I. Yanov 212 Abstracts of the Articles Submitted to VINITI On the form of the projections $\varphi_n$ of Ray's elements $\Phi_n$A. L. Anisimov 222 Cartesian products of some spaces close to absolute retracts. IP. V. Chernikov 222 On approximation of measurable mapsP. V. Chernikov 223 | 2020-12-02 13:07:51 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5167674422264099, "perplexity": 1007.8486748985788}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-50/segments/1606141708017.73/warc/CC-MAIN-20201202113815-20201202143815-00019.warc.gz"} |
https://math.stackexchange.com/questions/3253553/proof-confirmation-regarding-the-intersection-of-an-indexed-collection-of-sets | # Proof confirmation regarding the intersection of an indexed collection of sets
Let $$\{A_\alpha:\alpha \in \Lambda\}$$ be an indexed collection of sets. If $$\bigcap \{A_\alpha:\alpha \in \Lambda\} \neq \emptyset$$, then for each $$\beta \in \Lambda$$, $$A_\beta \neq \emptyset$$.
My thought was a proof through contraposition:
Assume $$A_\beta = \emptyset$$ for some $$\beta \in \Lambda.$$ It would follow that the intersection of $$A_\beta$$ with another set $$A_\gamma$$, where $$\gamma \in \Lambda$$ would yield the empty set. Thus $$\bigcap \{A_\alpha:\alpha \in \Lambda\} = \emptyset$$.
Is this proof valid or did I maybe overlook something. Any thoughts would be appreciated.
• It is valid, but could be shorter, observing that the intersection of all the $A_\alpha$s is contained in any $A_\beta$. – Bernard Jun 6 at 20:57
Going off of Bernard's comment, recall that for any sets $$A$$ and $$B$$ we have $$(A \cap B) \subset A$$. Therefore, supposing by contraposition that $$A_k = \emptyset$$ for some $$k \in \Lambda$$, we see that $$\bigcap_{\alpha} A_{\alpha} \subset A_{k} = \emptyset$$. Thus $$\bigcap_{\alpha} A_{\alpha} = \emptyset$$, and the proof is complete.
If $$\{A_\alpha|\;\alpha\in\Lambda\}$$ is a non-empty family of sets, and $$\bigcap\{A_\alpha|\;\alpha\in\Lambda\}\not=\varnothing$$, then let $$a$$ be one of its elements. By definition of the intersection of a set, $$a$$ is such that $$a\in A_\alpha$$ for all $$\alpha\in\Lambda$$. Now, $$a\not\in\varnothing$$, and therefore, $$A_\alpha\not=\varnothing$$, for all $$\alpha\in\Lambda$$, by the axiom of extensionality. | 2019-10-14 07:02:30 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 26, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9744357466697693, "perplexity": 73.58687708491554}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-43/segments/1570986649232.14/warc/CC-MAIN-20191014052140-20191014075140-00031.warc.gz"} |
http://lambda-the-ultimate.org/node/809 | ## organizing papers...
How do you guys organize your papers? I have a file naming scheme that's a big pain to manage and not terribly useful. I guess what I want is something like iPapers, but less tied to PubMed and cross-platform. (At least I need it to run on my Linux workstation, and hopefully on my Mac laptop...) And I guess in my dirtiest fantasies it would maybe integrate with Citeseer and CiteULike, but that's not so important to me, actually.
I'm sure semantic web types will tell me that I really want a general purpose RDF browser or something to manage general meta-data, but I'd be happy with something less general and more tailored to this domain.
Anyway, does anybody out there have a tool (or just an organizational discipline) that they're happy with? Satisfy my curiosity...
## Comment viewing options
### organizing papers
I started a directory long ago for holdling stuff I downloaded. I called it 'pie' so that no one would know that I was wasting time downloading research papers (as if).
I have one huge directory containing programming language papers, and a few others for other things (math, graphics, psychology, biology, etc.). Inside the huge directory are subdirectories for each topic. Since I haven't bothered to organize them at all, there are way too many and there are probably duplications.
Each one can contain a directory called 'printed', which holds the ones I've printed, in the hopes that I don't print out something I have already printed, and waste paper.
The funny thing is that I almost never go back to this repository, even though I've only read a portion of the papers in it. I think I just collect them obsessively -- you know, in case I'm stranded on a desert island with nothing but a computer and a power outlet.
It's kind of funny to look at the list now and see how haphazard the categorization is.
I wish I had written a short synopsis of each paper I read; it would be a useful web site by now. Hmm -- maybe this is something that LtU should consider having: a collection of summaries.
abstractinterpretation
algebraic
algol
analysis
ancient
arrows
atomicity
binding
biological
boxing
bsp
burstall
categorytheory
classic
combinators
compilation
concurrency
continuations
coroutines
co-stuff
curiosities
cute
datastructures
deforestation
defunctionalization
denotational
dependenttypes
derivative
design
discriminated_union
distributed
domaintheory
dsl
dynamicscoping
dynamictypes
exceptions
extensible
filters
flowanalysis
fold
functional
functionaldependencies
functionalhttp
garbagecollection
generative
genericity
gofer
graph.reduction
gui
henrybaker
hindley-milner
imperative
incremental
iterators
johnhughes
lambdacalculus
lazy
lecturenotes
lenses
linearity
listlessness
lockstep
logicprogramming
lowlevel
macros
media
metacircular
modules
multistage
namespaces
objects
optimization
parallelism
parsing
partial.evaluation
partial.types
patternmatching
persistence
picalculus
polymorphism
polytypic
primitives
python
records
recursion
reflection
relational
ruby
scheme
shape
shells
simulation
softtyping
strictness
subtyping
supercompilation
systemf
tags
testing
theory
toocloseforcomfort
trampolines
transactions
typeclasses
typeinference
types
undynamicking
unification
userdirectedoptimization
v
variant
virtual.machines
www
xml
ycombinator
### Organization
I started a directory long ago for holdling stuff I downloaded. I called it 'pie' so that no one would know that I was wasting time downloading research papers (as if).
Originally my papers were in a giant pile. I could usually get around still as many came from citeseer and had citeseer names (e.g. the wadler98monads example below). Further I could use the date that the file was created to see which I'd gotten most recently or to get in the general area where the paper would be.
However, at one point I was reading papers on database implementation and particularly full-text databases I decided (but had long since wanted to) make a full-text database and put my papers in it. After I made the first indices it was interesting to search for terms and see old papers that I hadn't read in a while, but mostly I haven't used it extensively.
### I print them, annotate them,
I print them, annotate them, and file them.
I'd like to say that I use citeulike (http://citeulike.org), but my discovery of that site coincided with ceasing reading academic papers.
### Eating my own dogfood
Anyway, does anybody out there have a tool (or just an organizational discipline) that they're happy with?
I wrote a simple document storage and cataloguing application for a completely different purpose a few years ago, and I use that to store my papers.
Unfortunately, I download them much faster than I read them or catalogue them, so this approach doesn't work as well as I would like. ;-)
Still, it beats sifting through hundreds of crypticly named pdf/ps files looking for that Wadler paper I wanted to reread.
### citeulike
One of the most liberating experiences of my life was deleting all the papers from my hard drive. That said, I haven't used CiteULike long enough to see how it fares in the long haul. But analogous experiences (e.g., Google vs. bookmarks) bodes well for the "labels" approach.
### Same here
I used a naming scheme like Frank, say "vazirani86unique.ps", and a script to generate one big HTML file from the articles. If a simple text file existed with the same name "vazirani86unique.txt" it would look in that file for the title, abstract and annotations. It got beyond the point that it was easily manageable though.
I didn't move the stuff to my new laptop though, and pretty happy at that. Nowadays, if I want to look something up - I just Google for it.
### My method
After I download a paper, I rename the file to something like "wadler98prettier", where the first is the author's last name, the second the year of publication, and the last an abstraction of the title. I store all my papers in one big directory Papers; or rather, I move them there after I've read them.
Concerning the filename: if there are multiple authors, I pick the one I read the most, or the most well-known: basically, I choose the one I know I will tend to associate most closely with the paper if I have to search for it. If it's a preprint or unpublished or has an unknown (to me) pubdate, I use a dash instead of the year. For the title, I choose some memory-jogging key words from the title. Again, the idea is that it reminds me of the paper; it needn't be accurate or mnemonic for someone else.
Also, I try to keep it short enough to double as a BibTeX key, and long enough to avoid collisions.
I also have a BibTeX file in my Papers directory, managed using BibDesk, which at some point I hope to update so it indexes all the papers there, but frankly I don't think that will ever happen.
I don't use a by-subject classification scheme. One reason is that I never go browsing through the papers by subject; instead, I remember a paper I need to check, and then maybe a couple other papers that it references, so the author-year-title scheme works better. Another reason is that any directory-based (i.e., hierarchical) classification scheme is going to be inadequate anyway, and of little use to me.
Oh, and I gzip all the PS files, since GhostView can read them that way, but not the DVI files, since Xdvi can't, and anyway they're pretty small. PDF's I keep as is, since nowadays they're usually compressed internally.
### Yeah, that's pretty much it...
That's almost exactly the method I use, right down to gzipping PS files... My naming scheme is a bit more cumbersome, but it's pretty much the same idea. I agree that no simple hierarchical scheme is much better than just a big directory of well-named files, but I'd like to have access to the full titles and full author info, for instance, and I'd really like to be able to do tagging or something similar, sort by different attributes, etc.
I know it's basically your standard metadata management problem, but unfortunately I don't know of a good standard solution. Maybe I should actually look at RDF editor/browsers...
### spotlight/desktop search
Now that I have Spotlight on my Mac (desktop search), I've uncategorized all my documents. Everything's in one directory and the filenames are typically the titles, abbreviated. The only reason for subdirectories is to keep related files together (chapters of a book, pages from a website, lecture series, etc)
Also, for every file, I try to have a corresponding .txt file that contains notes I've made about that article. I treat it like a log: never overwritten, always to be appended to. It is instructive to see how one's understanding has changed when you revisit a paper.
This approach frees me from having to give it a structure, in terms of filenames, directory hierarchies or RDF. Free-form notes and good text indexing work really well.
### Spotlight saved me
Now that I have Spotlight on my Mac (desktop search), I've uncategorized all my documents. Everything's in one directory and the filenames are typically the titles, abbreviated.
Same here. When I pitched all my old equipment and bought my PowerBook and Tiger, Spotlight saved me a lot of trouble. The titles are good enough for a filename and I just search for terms, assuming the words in PDF can be searched.
While this is basically a "me too" post, I just can't praise Spotlight enough.
### Also Completely OT
Geoff Wozniak: While this is basically a "me too" post, I just can't praise Spotlight enough.
The only thing I have to add to this is that the Mac users might also appreciate VoodooPad vs. a text file for notes. I'm using it to record my efforts in working through TAPL, for example, and also to keep notes on the various papers I'm reading.
Of course, if you don't mind giving up the nice UI, integration with Address Book, etc. there are plenty of nice serverless desktop wikis these days. My personal favorite is TiddlyWiki.
### I agree. Desktop search is ni
I agree. Desktop search is nice. I'm using
Copernic in Windows. Is there a Linux equivalent?
### JabRef
Today I stumbled across another BibTeX/organization tool: JabRef. It can launch PDF and PS viewers, and search CiteSeer. It seems to work a lot like BibDesk, but BibDesk is a Mac (Cocoa) app whereas JabRef is a Java (cross-platform) app. | 2022-05-28 08:30:00 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.47133246064186096, "perplexity": 1777.159926671645}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652663013003.96/warc/CC-MAIN-20220528062047-20220528092047-00587.warc.gz"} |
https://socratic.org/questions/if-you-are-quoting-a-question-in-a-statement-do-you-put-a-question-mark-after-th | # If you are quoting a question in a statement, do you put a question mark after the quote?
Mar 11, 2018
Put the question mark within the quotation marks.
#### Explanation:
If you are quoting a question, then the question mark goes within the quotation marks (otherwise it would look like you are questioning the statement).
Examples:
"What does this mean"? - this shows you maybe questioning the statement.
"What does this mean?" - this shows that this is part of the quotation. | 2020-03-28 18:32:33 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8148347735404968, "perplexity": 1067.5438115111465}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-16/segments/1585370492125.18/warc/CC-MAIN-20200328164156-20200328194156-00233.warc.gz"} |
https://socratic.org/questions/what-is-the-conjugate-acid-base-relationship-of-h2po4-and-hpo4#187568 | # What is the conjugate acid-base relationship of (H2PO4)- and (HPO4)-?
The conjugate base of an acid, any acid, is defined as the acid $\text{LESS}$ a proton, ${H}^{+}$. The conjugate acid of a base, any base, is defined as the base $\text{PLUS}$ a proton.
Phosphoric acid, ${H}_{3} P {O}_{4}$, is the parent acid. If it loses a proton, ${H}^{+}$, we conserve both mass and charge, and ${H}_{2} P {O}_{4}^{-}$ results. And what is the conjugate base of this beasty? Again, conserve mass and charge, and $H P {O}_{4}^{2 -}$ results. You did not conserve mass and charge in your question; I agree that this is all too easy to do.
What is the conjugate base of biphosphate, $H P {O}_{4}^{2 -}$? This species does not exist in water. And what is the conjugate base of bisulfate, $H S {O}_{4}^{-}$ (and this one does exist in water)? Can you tell me the conjugate acid of ${H}_{3} P {O}_{4}$? Conserve mass, and conserve charge, and these are trivial questions. | 2022-05-25 12:47:37 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 10, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8299352526664734, "perplexity": 1064.4599188096795}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652662587158.57/warc/CC-MAIN-20220525120449-20220525150449-00506.warc.gz"} |
https://graphscope.io/docs/latest/reference/networkx/generated/graphscope.nx.generators.spectral_graph_forge.spectral_graph_forge.html | # graphscope.nx.generators.spectral_graph_forge.spectral_graph_forge#
graphscope.nx.generators.spectral_graph_forge.spectral_graph_forge(G, alpha, transformation='identity', seed=None)[source]#
Returns a random simple graph with spectrum resembling that of G
This algorithm, called Spectral Graph Forge (SGF), computes the eigenvectors of a given graph adjacency matrix, filters them and builds a random graph with a similar eigenstructure. SGF has been proved to be particularly useful for synthesizing realistic social networks and it can also be used to anonymize graph sensitive data.
Parameters
• G (Graph) –
• alpha (float) – Ratio representing the percentage of eigenvectors of G to consider, values in [0,1].
• transformation (string, optional) – Represents the intended matrix linear transformation, possible values are ‘identity’ and ‘modularity’
• seed (integer, random_state, or None (default)) – Indicator of numpy random number generation state. See Randomness.
Returns
H – A graph with a similar eigenvector structure of the input one.
Return type
Graph
Raises
NetworkXError – If transformation has a value different from ‘identity’ or ‘modularity’
Notes
Spectral Graph Forge (SGF) generates a random simple graph resembling the global properties of the given one. It leverages the low-rank approximation of the associated adjacency matrix driven by the alpha precision parameter. SGF preserves the number of nodes of the input graph and their ordering. This way, nodes of output graphs resemble the properties of the input one and attributes can be directly mapped.
It considers the graph adjacency matrices which can optionally be transformed to other symmetric real matrices (currently transformation options include identity and modularity). The modularity transformation, in the sense of Newman’s modularity matrix allows the focusing on community structure related properties of the graph.
SGF applies a low-rank approximation whose fixed rank is computed from the ratio alpha of the input graph adjacency matrix dimension. This step performs a filtering on the input eigenvectors similar to the low pass filtering common in telecommunications.
The filtered values (after truncation) are used as input to a Bernoulli sampling for constructing a random adjacency matrix.
References
1
L. Baldesi, C. T. Butts, A. Markopoulou, “Spectral Graph Forge: Graph Generation Targeting Modularity”, IEEE Infocom, ‘18. https://arxiv.org/abs/1801.01715
2
M. Newman, “Networks: an introduction”, Oxford university press, 2010
Examples
>>> G = nx.karate_club_graph()
>>> H = nx.spectral_graph_forge(G, 0.3)
>>> | 2023-04-02 02:33:28 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.43863847851753235, "perplexity": 2800.8559146231305}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296950373.88/warc/CC-MAIN-20230402012805-20230402042805-00513.warc.gz"} |
http://trac.sasview.org/changeset/ccbbc3b5c0131e024eff66739282b0e4d6f7518d/sasmodels/ | # Changeset ccbbc3b in sasmodels
Ignore:
Timestamp:
Mar 28, 2019 12:41:49 PM (4 months ago)
Branches:
master
Children:
1c8ff89
Parents:
3f3df6c
Message:
Remove out of date documentation
File:
1 edited
### Legend:
Unmodified
rd7af1c6 in which :math:t is the thickness of the sample and :math:\lambda is the wavelength of the neutrons. Log Spaced SESANS ----------------- For computational efficiency, the integral in the Hankel transform is converted into a Reimann sum .. math:: G(\delta) \approx 2 \pi \sum_{Q=q_{min}}^{q_{max}} J_0(Q \delta) \frac{d \Sigma}{d \Omega} (Q) Q \Delta Q \! However, this model approximates more than is strictly necessary. Specifically, it is approximating the entire integral, when it is only the scattering function that cannot be handled analytically. A better approximation might be .. math:: G(\delta) \approx \sum_{n=0} 2 \pi \frac{d \Sigma}{d \Omega} (q_n) \int_{q_{n-1}}^{q_n} J_0(Q \delta) Q dQ = \sum_{n=0} \frac{2 \pi}{\delta} \frac{d \Sigma}{d \Omega} (q_n) (q_n J_1(q_n \delta) - q_{n-1}J_1(q_{n-1} \delta))\!, Assume that vectors :math:q_n and :math:I_n represent the q points and corresponding intensity data, respectively. Further assume that :math:\delta_m and :math:G_m are the spin echo lengths and corresponding Hankel transform value. .. math:: G_m = H_{nm} I_n where .. math:: H_{nm} = \frac{2 \pi}{\delta_m} (q_n J_1(q_n \delta_m) - q_{n-1} J_1(q_{n-1} \delta_m)) Also not that, for the limit as :math:\delta_m approaches zero, .. math:: G(0) = \sum_{n=0} \pi \frac{d \Sigma}{d \Omega} (q_n) (q_n^2 - q_{n-1}^2) | 2019-07-22 03:50:56 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9864094257354736, "perplexity": 11837.253505666993}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-30/segments/1563195527474.85/warc/CC-MAIN-20190722030952-20190722052952-00438.warc.gz"} |
http://hargup.in/sympy/week-5.html | # week 5
### Solving Trigonometric Function (part I)
This week I spend time on making trigonometric solvers work. Every trigonometric function can be written in terms of tan.
$$sin(x) = \frac{2*tan(x/2)}{tan^{2}(x/2)}$$
$$cos(x) = \frac{-tan^{2}(x/2) + 1}{tan^{2}(x/2) + 1}$$
$$cot(x) = \frac{1}{tan(x)}$$
A basic technique to solve trigonometric equations can be rewriting the equation in terms of tan. And if the equation is made by addition, multiplication or quotient of trigonometric functions then the transformed equation is a equivalent to a rational function in tan. That equation can be solved by the usual polynomial solving techniques.
Taking the example from the doc $cos(x) + sin(x)$ gets converted to $\frac{-tan^{2}(x/2) + 2*tan(x/2) + 1}{tan^{2}(x/2) + 1}$
The solution of this equations is $tan(x/2) = 1 +- sqrt(2)$. Since the inverse of tan is $\left\{2 \pi n + \operatorname{atan}{\left (y \right )}\; |\; n \in \mathbb{Z}\right\}$ the solution of the given equation is $$\left\{2 \pi n - \frac{\pi}{8}\; |\; n \in \mathbb{Z}\right\} \cup \left\{2 \pi n + \frac{3 \pi}{8}\; |\; n \in \mathbb{Z}\right\}$$
Though it appears this technique should work universally for trigonometric equation it fails for even $sin(x) = 0$. From the table above $sin(x) = \frac{2*tan(x/2)}{tan^{2}(x/2)}$ So, the $sin(x) = 0$ occurs at $tan(x/2) = 0$ which has solution $\left\{2 \pi n\; |\; n \in \mathbb{Z}\right\}$ But the solution is $\left\{ \pi n\; |\; n \in \mathbb{Z}\right\}$ . Why are we missing some solutions? The reason is $sin(x) = 0$ also occurs when denominator tends to $\infty$, i.e., the values where $tan^{2}(x/2) + 1$ tends to $\infty$. We had encountered a similar problem for the solution of $$\frac{1}{\left(\frac{x}{x + 1} + 3\right)^{2}}$$
here $x = -1$ is not a point in the domain of the of the equation. The solver simplifies the equation to
$$\frac{\left(x + 1\right)^{2}}{\left(4 x + 3\right)^{2}}$$
which extends the domain to include the point $x = -1$ which is also the solution to the transformed equation. There we wrote a sub procedure domain_check to verify if the returned solution is part of the domain of the original equation. The problem here is slightly different in the sense that transforming the equation decreases the domain of the solutions and not increase it.
To find such solution we have allow $\infty$ to be solution to equations, we will be working on extended reals instead of just reals. I think this change will simplify a lot of things.
Another thing which should be taken care off is that we cannot naively search for the values for which the denominator tends to infinity as for the same value numerator might also attain infinitely large value, we will have to conceder the limiting value of the equation. | 2017-11-22 03:50:22 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9028868675231934, "perplexity": 203.42871042986627}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-47/segments/1510934806455.2/warc/CC-MAIN-20171122031440-20171122051440-00008.warc.gz"} |
https://web2.0calc.com/questions/what-is-4-to-the-power-of-2012 | +0
# what is 4 to the power of 2012
0
159
8
what is 4 to the power of 2012
Nov 4, 2019
#1
0
4^2012 = 2.2115794807575113474152581518103 x 10^1211
Nov 4, 2019
#2
+109518
0
Can you do it with an ordinary old fashioned calculator?
I can but I am asking guest answerer if he/she can.
Melody Nov 4, 2019
edited by Melody Nov 4, 2019
#3
0
With Windows 10 comes an HP calculator that can calculate up to 10^10,000 and it has a "mod" key on it as well.
Nov 4, 2019
#4
+109518
0
Yes I know there are calculators online that can do it.
I do not think that this is how guest was expected to answer this question.
I asked you if you knew how to do it with a standard old fashioned calculator. (or with the web2.0 calc if you want)
Melody Nov 4, 2019
#5
+1
I didn't answer your question properly! You CAN use any ordinary calculator and calculate ANY very large number by using the "Log Key base 10". Example: 25^1E12. You simply take the exponent, or 1E12 and multiplied it by Log 25 base 10. You should get:1,397,940,008,672.037609572522210551. Then you would raise the fractional part to the power of 10 thus. 10^0.037609572522210551 =1.0904595806948112697717659697915 x 10^1,397,940,008,672.
Guest Nov 4, 2019
#6
+109518
+1
ok
Here is how I would present the answer.
$$y=4^{2012}\\ log_{10} \;y=log_{10} \;4^{2012}\\ log_2 \;y=2012\;log_2 \;4\\ log_2 \;y=2012*2\\ log_2 \;y=4024\\ \frac{log_{10}\;y}{log_{10}\;2}=4024\\ log_{10}\;y=4024*log_{10}2\\ log_{10}\;y\approx 1211.344703\\ y\approx 10^{1211.344703}\\ y\approx 10^{0.344703}*10^{1211}\\ y\approx 2.211581763*10^{1211}\\$$
Melody Nov 4, 2019
#7
+1
Wow! What a beautiful solution!!
Guest Nov 4, 2019
#8
+109518
0
thanks guest, I hope you understand it :)
Melody Nov 4, 2019 | 2020-05-30 00:24:10 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6496780514717102, "perplexity": 2466.0344466975503}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-24/segments/1590347406785.66/warc/CC-MAIN-20200529214634-20200530004634-00011.warc.gz"} |
https://www.gradesaver.com/textbooks/math/algebra/algebra-1-common-core-15th-edition/chapter-3-solving-inequalities-get-ready-page-161/14 | ## Algebra 1: Common Core (15th Edition)
In order to solve this algebraic expression, we must isolate the variable. A variable is the letter in the problem (for instance, in the equation 2x=10, x is the variable). In the expression $-12/7z=48$, z is being multiplied by a fraction, which we must cancel out. In order to cancel out a fraction being multiplied by a variable, we multiply both sides of the equation by the reciprocal of the fraction, which is the fraction flipped upside down. (For instance, the reciprocal of ⅖ is 5/2). Thus, we multiply both sides of the equation by -7/12 to obtain that z=-28 We plug -28 in for z and confirm that our answer is, indeed, correct. | 2020-02-24 03:37:28 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8650742173194885, "perplexity": 342.0372331305219}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-10/segments/1581875145869.83/warc/CC-MAIN-20200224010150-20200224040150-00418.warc.gz"} |
http://lists.infradead.org/pipermail/get_iplayer/2011-July/001648.html | # Is anyone else's running slooowwwwlllyyy?
Nigel Taylor njtaylor at asterisk.demon.co.uk
Tue Jul 12 12:37:55 EDT 2011
```On 07/12/11 16:40, Rog wrote:
>
> ----- Original Message ----- From: "Andy Bircumshaw"
> <andy at networkned.co.uk>
> Sent: Monday, July 11, 2011 11:32 PM
> Subject: Re: Is anyone else's running slooowwwwlllyyy?
>
>
>>
>> On 11 July 2011, at 11:36, ZULU wrote:
>>
>>> I am also having huge problems with Virginmedia speeds!
>>>
>>> My d/l of The Horizon Guide-Moon was apparently compromised by it
>>> taking too long.
>>>
>>> Now, I want to re-download it, but I cannot find the *.swfinfo* file
>>> to dump.
>>> There is no such file on this computer!!
>>
>> There is one, somewhere, but it's got nothing to do with forcing
>
> Hi Andy...
> I truly do not understand!
> Deleting this and also the partial d/l has always worked in the past.
> What is the *.swfinfo* file for?
See rtmpdump man page...
.....When this option is used, the SWF player is retrieved from the
specified URL and the hash and size are computed automatically. Also the
information is cached in a .swfinfo file in the user's home directory,
so that it doesn't need to be retrieved and recalculated every time
rtmpdump is run. The .swfinfo file records the URL, the time it was
fetched, the modification timestamp of the SWF file, its size, and its
hash. By default, the cached info will be used for 30 days before
re-checking.
>
>>
>> Just delete the bad or partial file and run:
>>
>> get_iplayer "the horizon guide" --get --force
>
> I am using the Web PVR Manager (Winndows XP P[ro), not the command line
> box, so how do I implement this please??
> i.e. where do I paste *get_iplayer "the horizon guide" --get --force* into?
> I tried the *Run* box but that doesn't work..
Under start -> programs -> get_iplayer
Your find get_iplayer which opens a cmd window, in the get_iplayer
environment, then you should be able to type the command
In the cmd window you should see c:\Program Files\get_iplayer> as the
prompt. It may update the index of available programs first before
giving the prompt.
>
> Rog
>
>
>>
>> _______________________________________________
>> get_iplayer mailing list | 2022-09-28 10:08:30 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8041282296180725, "perplexity": 12012.061663328057}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-40/segments/1664030335190.45/warc/CC-MAIN-20220928082743-20220928112743-00535.warc.gz"} |
http://openstudy.com/updates/51030501e4b03186c3f8f6c7 | Beautiful_Lier96 2 years ago simplify each radical expression. use absolute value symbols when needed. : 3√(-27x^6) ...
1. jim_thompson5910
Is the problem $\Large 3\sqrt{-27x^6}$ or is it $\Large \sqrt[3]{-27x^6}$ The first one is a square root, the second is a cube root
Find more explanations on OpenStudy | 2015-07-05 03:08:38 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6136646866798401, "perplexity": 1637.0348401211297}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-27/segments/1435375097199.58/warc/CC-MAIN-20150627031817-00027-ip-10-179-60-89.ec2.internal.warc.gz"} |
https://www.welt.de/regionales/berlin/article2330325/this-is-from-BMO-and-section-Berlin.html | 1. Home
2. Regionales
3. Berlin & Brandenburg
4. # this is from BMO and section Berlin: this is from BMO and section Berlin
Berlin & Brandenburg this is from BMO and section Berlin
## this is from BMO and section Berlin
this is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlin
this is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlinthis is from BMO and section Berlidfdnthis is from BMO and sectiodfdn Berlin df dsf | 2019-11-18 13:26:03 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8564140796661377, "perplexity": 3944.7975481817716}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-47/segments/1573496669795.59/warc/CC-MAIN-20191118131311-20191118155311-00550.warc.gz"} |
https://docs.ray.io/en/releases-1.0.0/tune/api_docs/suggestion.html | # Search Algorithms (tune.suggest)¶
Tune’s Search Algorithms are wrappers around open-source optimization libraries for efficient hyperparameter selection. Each library has a specific way of defining the search space - please refer to their documentation for more details.
You can utilize these search algorithms as follows:
from ray.tune.suggest.hyperopt import HyperOptSearch
tune.run(my_function, search_alg=HyperOptSearch(...))
## Summary¶
SearchAlgorithm
Summary
Website
Code Example
AxSearch
Bayesian/Bandit Optimization
[Ax]
ax_example
DragonflySearch
Scalable Bayesian Optimization
dragonfly_example
SkoptSearch
Bayesian Optimization
skopt_example
HyperOptSearch
Tree-Parzen Estimators
[HyperOpt]
hyperopt_example
BayesOptSearch
Bayesian Optimization
bayesopt_example
TuneBOHB
Bayesian Opt/HyperBand
[BOHB]
bohb_example
OptunaSearch
Optuna search algorithms
[Optuna]
optuna_example
ZOOptSearch
Zeroth-order Optimization
[ZOOpt]
zoopt_example
SigOptSearch
Closed source
[SigOpt]
sigopt_example
Note
Unlike Tune’s Trial Schedulers, Tune SearchAlgorithms cannot affect or stop training processes. However, you can use them together to early stop the evaluation of bad trials.
Want to use your own algorithm? The interface is easy to implement. Read instructions here.
Tune also provides helpful utilities to use with Search Algorithms:
## Saving and Restoring¶
Certain search algorithms have save/restore implemented, allowing reuse of learnings across multiple tuning runs.
search_alg = HyperOptSearch()
experiment_1 = tune.run(
trainable,
search_alg=search_alg)
search_alg.save("./my-checkpoint.pkl")
# Restore the saved state onto another search algorithm
search_alg2 = HyperOptSearch()
search_alg2.restore("./my-checkpoint.pkl")
experiment_2 = tune.run(
trainable,
search_alg=search_alg2)
Further, Tune automatically saves its state inside the current experiment folder (“Result Dir”) during tuning.
Note that if you have two Tune runs with the same experiment folder, the previous state checkpoint will be overwritten. You can avoid this by making sure tune.run(name=...) is set to a unique identifier.
search_alg = HyperOptSearch()
experiment_1 = tune.run(
cost,
num_samples=5,
search_alg=search_alg,
verbose=0,
name="my-experiment-1",
local_dir="~/my_results")
search_alg2 = HyperOptSearch()
search_alg2.restore_from_dir(
os.path.join("~/my_results", "my-experiment-1"))
Note
This is currently not implemented for: AxSearch, TuneBOHB, SigOptSearch, and DragonflySearch.
## Ax (tune.suggest.ax.AxSearch)¶
class ray.tune.suggest.ax.AxSearch(space=None, metric=None, mode=None, parameter_constraints=None, outcome_constraints=None, ax_client=None, use_early_stopped_trials=None, max_concurrent=None)[source]
Uses Ax to optimize hyperparameters.
Ax is a platform for understanding, managing, deploying, and automating adaptive experiments. Ax provides an easy to use interface with BoTorch, a flexible, modern library for Bayesian optimization in PyTorch. More information can be found in https://ax.dev/.
To use this search algorithm, you must install Ax and sqlalchemy:
$pip install ax-platform sqlalchemy Parameters • space (list[dict]) – Parameters in the experiment search space. Required elements in the dictionaries are: “name” (name of this parameter, string), “type” (type of the parameter: “range”, “fixed”, or “choice”, string), “bounds” for range parameters (list of two values, lower bound first), “values” for choice parameters (list of values), and “value” for fixed parameters (single value). • objective_name (str) – Name of the metric used as objective in this experiment. This metric must be present in raw_data argument to log_data. This metric must also be present in the dict reported/returned by the Trainable. • mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute. Defaults to “max”. • parameter_constraints (list[str]) – Parameter constraints, such as “x3 >= x4” or “x3 + x4 >= 2”. • outcome_constraints (list[str]) – Outcome constraints of form “metric_name >= bound”, like “m1 <= 3.” • ax_client (AxClient) – Optional AxClient instance. If this is set, do not pass any values to these parameters: space, objective_name, parameter_constraints, outcome_constraints. • use_early_stopped_trials – Deprecated. • max_concurrent (int) – Deprecated. Tune automatically converts search spaces to Ax’s format: from ray import tune from ray.tune.suggest.ax import AxSearch config = { "x1": tune.uniform(0.0, 1.0), "x2": tune.uniform(0.0, 1.0) } def easy_objective(config): for i in range(100): intermediate_result = config["x1"] + config["x2"] * i tune.report(score=intermediate_result) ax_search = AxSearch(objective_name="score") tune.run( config=config, easy_objective, search_alg=ax_search) If you would like to pass the search space manually, the code would look like this: from ray import tune from ray.tune.suggest.ax import AxSearch parameters = [ {"name": "x1", "type": "range", "bounds": [0.0, 1.0]}, {"name": "x2", "type": "range", "bounds": [0.0, 1.0]}, ] def easy_objective(config): for i in range(100): intermediate_result = config["x1"] + config["x2"] * i tune.report(score=intermediate_result) ax_search = AxSearch(space=parameters, objective_name="score") tune.run(easy_objective, search_alg=ax_search) ## Bayesian Optimization (tune.suggest.bayesopt.BayesOptSearch)¶ class ray.tune.suggest.bayesopt.BayesOptSearch(space=None, metric=None, mode=None, utility_kwargs=None, random_state=42, random_search_steps=10, verbose=0, patience=5, skip_duplicate=True, analysis=None, max_concurrent=None, use_early_stopped_trials=None)[source] Uses fmfn/BayesianOptimization to optimize hyperparameters. fmfn/BayesianOptimization is a library for Bayesian Optimization. More info can be found here: https://github.com/fmfn/BayesianOptimization. You will need to install fmfn/BayesianOptimization via the following: pip install bayesian-optimization This algorithm requires setting a search space using the BayesianOptimization search space specification. Parameters • space (dict) – Continuous search space. Parameters will be sampled from this space which will be used to run trials. • metric (str) – The training result objective value attribute. • mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute. • utility_kwargs (dict) – Parameters to define the utility function. The default value is a dictionary with three keys: - kind: ucb (Upper Confidence Bound) - kappa: 2.576 - xi: 0.0 • random_state (int) – Used to initialize BayesOpt. • random_search_steps (int) – Number of initial random searches. This is necessary to avoid initial local overfitting of the Bayesian process. • analysis (ExperimentAnalysis) – Optionally, the previous analysis to integrate. • verbose (int) – Sets verbosity level for BayesOpt packages. • max_concurrent – Deprecated. • use_early_stopped_trials – Deprecated. Tune automatically converts search spaces to BayesOptSearch’s format: from ray import tune from ray.tune.suggest.bayesopt import BayesOptSearch config = { "width": tune.uniform(0, 20), "height": tune.uniform(-100, 100) } bayesopt = BayesOptSearch(metric="mean_loss", mode="min") tune.run(my_func, config=config, search_alg=bayesopt) If you would like to pass the search space manually, the code would look like this: from ray import tune from ray.tune.suggest.bayesopt import BayesOptSearch space = { 'width': (0, 20), 'height': (-100, 100), } bayesopt = BayesOptSearch(space, metric="mean_loss", mode="min") tune.run(my_func, search_alg=bayesopt) save(checkpoint_path)[source] Storing current optimizer state. restore(checkpoint_path)[source] Restoring current optimizer state. ## BOHB (tune.suggest.bohb.TuneBOHB)¶ BOHB (Bayesian Optimization HyperBand) is an algorithm that both terminates bad trials and also uses Bayesian Optimization to improve the hyperparameter search. It is backed by the HpBandSter library. Importantly, BOHB is intended to be paired with a specific scheduler class: HyperBandForBOHB. This algorithm requires using the ConfigSpace search space specification. In order to use this search algorithm, you will need to install HpBandSter and ConfigSpace: $ pip install hpbandster ConfigSpace
See the BOHB paper for more details.
class ray.tune.suggest.bohb.TuneBOHB(space=None, bohb_config=None, max_concurrent=10, metric=None, mode=None)[source]
BOHB suggestion component.
Requires HpBandSter and ConfigSpace to be installed. You can install HpBandSter and ConfigSpace with: pip install hpbandster ConfigSpace.
This should be used in conjunction with HyperBandForBOHB.
Parameters
• space (ConfigurationSpace) – Continuous ConfigSpace search space. Parameters will be sampled from this space which will be used to run trials.
• bohb_config (dict) – configuration for HpBandSter BOHB algorithm
• max_concurrent (int) – Number of maximum concurrent trials. Defaults to 10.
• metric (str) – The training result objective value attribute.
• mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute.
Tune automatically converts search spaces to TuneBOHB’s format:
config = {
"width": tune.uniform(0, 20),
"height": tune.uniform(-100, 100),
"activation": tune.choice(["relu", "tanh"])
}
algo = TuneBOHB(max_concurrent=4, metric="mean_loss", mode="min")
bohb = HyperBandForBOHB(
time_attr="training_iteration",
metric="mean_loss",
mode="min",
max_t=100)
run(my_trainable, config=config, scheduler=bohb, search_alg=algo)
If you would like to pass the search space manually, the code would look like this:
import ConfigSpace as CS
config_space = CS.ConfigurationSpace()
CS.UniformFloatHyperparameter("width", lower=0, upper=20))
CS.UniformFloatHyperparameter("height", lower=-100, upper=100))
CS.CategoricalHyperparameter(
name="activation", choices=["relu", "tanh"]))
algo = TuneBOHB(
config_space, max_concurrent=4, metric="mean_loss", mode="min")
bohb = HyperBandForBOHB(
time_attr="training_iteration",
metric="mean_loss",
mode="min",
max_t=100)
run(my_trainable, scheduler=bohb, search_alg=algo)
## Dragonfly (tune.suggest.dragonfly.DragonflySearch)¶
class ray.tune.suggest.dragonfly.DragonflySearch(optimizer=None, domain=None, space=None, metric=None, mode=None, points_to_evaluate=None, evaluated_rewards=None, **kwargs)[source]
Uses Dragonfly to optimize hyperparameters.
Dragonfly provides an array of tools to scale up Bayesian optimisation to expensive large scale problems, including high dimensional optimisation. parallel evaluations in synchronous or asynchronous settings, multi-fidelity optimisation (using cheap approximations to speed up the optimisation process), and multi-objective optimisation. For more info:
To use this search algorithm, install Dragonfly:
$pip install dragonfly-opt This interface requires using FunctionCallers and optimizers provided by Dragonfly. Parameters • optimizer (dragonfly.opt.BlackboxOptimiser|str) – Optimizer provided from dragonfly. Choose an optimiser that extends BlackboxOptimiser. If this is a string, domain must be set and optimizer must be one of [random, bandit, genetic]. • domain (str) – Optional domain. Should only be set if you don’t pass an optimizer as the optimizer argument. Has to be one of [cartesian, euclidean]. • space (list) – Search space. Should only be set if you don’t pass an optimizer as the optimizer argument. Defines the search space and requires a domain to be set. Can be automatically converted from the config dict passed to tune.run(). • metric (str) – The training result objective value attribute. • mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute. • points_to_evaluate (list of lists) – A list of points you’d like to run first before sampling from the optimiser, e.g. these could be parameter configurations you already know work well to help the optimiser select good values. Each point is a list of the parameters using the order definition given by parameter_names. • evaluated_rewards (list) – If you have previously evaluated the parameters passed in as points_to_evaluate you can avoid re-running those trials by passing in the reward attributes as a list so the optimiser can be told the results without needing to re-compute the trial. Must be the same length as points_to_evaluate. Tune automatically converts search spaces to Dragonfly’s format: from ray import tune config = { "LiNO3_vol": tune.uniform(0, 7), "Li2SO4_vol": tune.uniform(0, 7), "NaClO4_vol": tune.uniform(0, 7) } df_search = DragonflySearch( optimizer="bandit", domain="euclidean", metric="objective", mode="max") tune.run(my_func, config=config, search_alg=df_search) If you would like to pass the search space/optimizer manually, the code would look like this: from ray import tune space = [{ "name": "LiNO3_vol", "type": "float", "min": 0, "max": 7 }, { "name": "Li2SO4_vol", "type": "float", "min": 0, "max": 7 }, { "name": "NaClO4_vol", "type": "float", "min": 0, "max": 7 }] df_search = DragonflySearch( optimizer="bandit", domain="euclidean", space=space, metric="objective", mode="max") tune.run(my_func, search_alg=df_search) save(checkpoint_dir)[source] Save state to path for this search algorithm. Parameters checkpoint_path (str) – File where the search algorithm state is saved. This path should be used later when restoring from file. Example: search_alg = Searcher(...) analysis = tune.run( cost, num_samples=5, search_alg=search_alg, name=self.experiment_name, local_dir=self.tmpdir) search_alg.save("./my_favorite_path.pkl") Changed in version 0.8.7: Save is automatically called by tune.run. You can use restore_from_dir to restore from an experiment directory such as ~/ray_results/trainable. restore(checkpoint_dir)[source] Restore state for this search algorithm Parameters checkpoint_path (str) – File where the search algorithm state is saved. This path should be the same as the one provided to “save”. Example: search_alg.save("./my_favorite_path.pkl") search_alg2 = Searcher(...) search_alg2 = ConcurrencyLimiter(search_alg2, 1) search_alg2.restore(checkpoint_path) tune.run(cost, num_samples=5, search_alg=search_alg2) ## HyperOpt (tune.suggest.hyperopt.HyperOptSearch)¶ class ray.tune.suggest.hyperopt.HyperOptSearch(space=None, metric=None, mode=None, points_to_evaluate=None, n_initial_points=20, random_state_seed=None, gamma=0.25, max_concurrent=None, use_early_stopped_trials=None)[source] A wrapper around HyperOpt to provide trial suggestions. HyperOpt a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions. More info can be found at http://hyperopt.github.io/hyperopt. HyperOptSearch uses the Tree-structured Parzen Estimators algorithm, though it can be trivially extended to support any algorithm HyperOpt supports. To use this search algorithm, you will need to install HyperOpt: pip install -U hyperopt Parameters • space (dict) – HyperOpt configuration. Parameters will be sampled from this configuration and will be used to override parameters generated in the variant generation process. • metric (str) – The training result objective value attribute. • mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute. • points_to_evaluate (list) – Initial parameter suggestions to be run first. This is for when you already have some good parameters you want hyperopt to run first to help the TPE algorithm make better suggestions for future parameters. Needs to be a list of dict of hyperopt-named variables. Choice variables should be indicated by their index in the list (see example) • n_initial_points (int) – number of random evaluations of the objective function before starting to aproximate it with tree parzen estimators. Defaults to 20. • random_state_seed (int, array_like, None) – seed for reproducible results. Defaults to None. • gamma (float in range (0,1)) – parameter governing the tree parzen estimators suggestion algorithm. Defaults to 0.25. • max_concurrent – Deprecated. • use_early_stopped_trials – Deprecated. Tune automatically converts search spaces to HyperOpt’s format: config = { 'width': tune.uniform(0, 20), 'height': tune.uniform(-100, 100), 'activation': tune.choice(["relu", "tanh"]) } current_best_params = [{ 'width': 10, 'height': 0, 'activation': 0, # The index of "relu" }] hyperopt_search = HyperOptSearch( metric="mean_loss", mode="min", points_to_evaluate=current_best_params) tune.run(trainable, config=config, search_alg=hyperopt_search) If you would like to pass the search space manually, the code would look like this: space = { 'width': hp.uniform('width', 0, 20), 'height': hp.uniform('height', -100, 100), 'activation': hp.choice("activation", ["relu", "tanh"]) } current_best_params = [{ 'width': 10, 'height': 0, 'activation': 0, # The index of "relu" }] hyperopt_search = HyperOptSearch( space, metric="mean_loss", mode="min", points_to_evaluate=current_best_params) tune.run(trainable, search_alg=hyperopt_search) save(checkpoint_path)[source] Save state to path for this search algorithm. Parameters checkpoint_path (str) – File where the search algorithm state is saved. This path should be used later when restoring from file. Example: search_alg = Searcher(...) analysis = tune.run( cost, num_samples=5, search_alg=search_alg, name=self.experiment_name, local_dir=self.tmpdir) search_alg.save("./my_favorite_path.pkl") Changed in version 0.8.7: Save is automatically called by tune.run. You can use restore_from_dir to restore from an experiment directory such as ~/ray_results/trainable. restore(checkpoint_path)[source] Restore state for this search algorithm Parameters checkpoint_path (str) – File where the search algorithm state is saved. This path should be the same as the one provided to “save”. Example: search_alg.save("./my_favorite_path.pkl") search_alg2 = Searcher(...) search_alg2 = ConcurrencyLimiter(search_alg2, 1) search_alg2.restore(checkpoint_path) tune.run(cost, num_samples=5, search_alg=search_alg2) ## Nevergrad (tune.suggest.nevergrad.NevergradSearch)¶ class ray.tune.suggest.nevergrad.NevergradSearch(optimizer=None, space=None, metric=None, mode=None, max_concurrent=None, **kwargs)[source] Uses Nevergrad to optimize hyperparameters. Nevergrad is an open source tool from Facebook for derivative free optimization. More info can be found at: https://github.com/facebookresearch/nevergrad. You will need to install Nevergrad via the following command: $ pip install nevergrad
Parameters
• space (list|nevergrad.parameter.Parameter) – Nevergrad parametrization to be passed to optimizer on instantiation, or list of parameter names if you passed an optimizer object.
• metric (str) – The training result objective value attribute.
• mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute.
• use_early_stopped_trials – Deprecated.
• max_concurrent – Deprecated.
Tune automatically converts search spaces to Nevergrad’s format:
import nevergrad as ng
config = {
"width": tune.uniform(0, 20),
"height": tune.uniform(-100, 100),
"activation": tune.choice(["relu", "tanh"])
}
optimizer=ng.optimizers.OnePlusOne,
metric="mean_loss",
mode="min")
run(my_trainable, config=config, search_alg=ng_search)
If you would like to pass the search space manually, the code would look like this:
import nevergrad as ng
space = ng.p.Dict(
width=ng.p.Scalar(lower=0, upper=20),
height=ng.p.Scalar(lower=-100, upper=100),
activation=ng.p.Choice(choices=["relu", "tanh"])
)
optimizer=ng.optimizers.OnePlusOne,
space=space,
metric="mean_loss",
mode="min")
run(my_trainable, search_alg=ng_search)
save(checkpoint_path)[source]
Save state to path for this search algorithm.
Parameters
checkpoint_path (str) – File where the search algorithm state is saved. This path should be used later when restoring from file.
Example:
search_alg = Searcher(...)
analysis = tune.run(
cost,
num_samples=5,
search_alg=search_alg,
name=self.experiment_name,
local_dir=self.tmpdir)
search_alg.save("./my_favorite_path.pkl")
Changed in version 0.8.7: Save is automatically called by tune.run. You can use restore_from_dir to restore from an experiment directory such as ~/ray_results/trainable.
restore(checkpoint_path)[source]
Restore state for this search algorithm
Parameters
checkpoint_path (str) – File where the search algorithm state is saved. This path should be the same as the one provided to “save”.
Example:
search_alg.save("./my_favorite_path.pkl")
search_alg2 = Searcher(...)
search_alg2 = ConcurrencyLimiter(search_alg2, 1)
search_alg2.restore(checkpoint_path)
tune.run(cost, num_samples=5, search_alg=search_alg2)
## Optuna (tune.suggest.optuna.OptunaSearch)¶
class ray.tune.suggest.optuna.OptunaSearch(space=None, metric=None, mode=None, sampler=None)[source]
A wrapper around Optuna to provide trial suggestions.
Optuna is a hyperparameter optimization library. In contrast to other libraries, it employs define-by-run style hyperparameter definitions.
This Searcher is a thin wrapper around Optuna’s search algorithms. You can pass any Optuna sampler, which will be used to generate hyperparameter suggestions.
Please note that this wrapper does not support define-by-run, so the search space will be configured before running the optimization. You will also need to use a Tune trainable (e.g. using the function API) with this wrapper.
For defining the search space, use ray.tune.suggest.optuna.param (see example).
Parameters
• space (list) – Hyperparameter search space definition for Optuna’s sampler. This is a list, and samples for the parameters will be obtained in order.
• metric (str) – Metric that is reported back to Optuna on trial completion.
• mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute.
• sampler (optuna.samplers.BaseSampler) – Optuna sampler used to draw hyperparameter configurations. Defaults to TPESampler.
Tune automatically converts search spaces to Optuna’s format:
from ray.tune.suggest.optuna import OptunaSearch
config = {
"a": tune.uniform(6, 8)
"b": tune.uniform(10, 20)
}
optuna_search = OptunaSearch(
metric="loss",
mode="min")
tune.run(trainable, config=config, search_alg=optuna_search)
If you would like to pass the search space manually, the code would look like this:
from ray.tune.suggest.optuna import OptunaSearch, param
space = [
param.suggest_uniform("a", 6, 8),
param.suggest_uniform("b", 10, 20)
]
algo = OptunaSearch(
space,
metric="loss",
mode="min")
tune.run(trainable, search_alg=optuna_search)
New in version 0.8.8.
## SigOpt (tune.suggest.sigopt.SigOptSearch)¶
You will need to use the SigOpt experiment and space specification to specify your search space.
class ray.tune.suggest.sigopt.SigOptSearch(space=None, name='Default Tune Experiment', max_concurrent=1, reward_attr=None, connection=None, experiment_id=None, observation_budget=None, project=None, metric='episode_reward_mean', mode='max', **kwargs)[source]
A wrapper around SigOpt to provide trial suggestions.
You must install SigOpt and have a SigOpt API key to use this module. Store the API token as an environment variable SIGOPT_KEY as follows:
pip install -U sigopt
export SIGOPT_KEY= ...
You will need to use the SigOpt experiment and space specification.
This module manages its own concurrency.
Parameters
• space (list of dict) – SigOpt configuration. Parameters will be sampled from this configuration and will be used to override parameters generated in the variant generation process. Not used if existing experiment_id is given
• name (str) – Name of experiment. Required by SigOpt.
• max_concurrent (int) – Number of maximum concurrent trials supported based on the user’s SigOpt plan. Defaults to 1.
• connection (Connection) – An existing connection to SigOpt.
• experiment_id (str) – Optional, if given will connect to an existing experiment. This allows for a more interactive experience with SigOpt, such as prior beliefs and constraints.
• observation_budget (int) – Optional, can improve SigOpt performance.
• project (str) – Optional, Project name to assign this experiment to. SigOpt can group experiments by project
• metric (str or list(str)) – If str then the training result objective value attribute. If list(str) then a list of metrics that can be optimized together. SigOpt currently supports up to 2 metrics.
• mode (str or list(str)) – If experiment_id is given then this field is ignored, If str then must be one of {min, max}. If list then must be comprised of {min, max, obs}. Determines whether objective is minimizing or maximizing the metric attribute. If metrics is a list then mode must be a list of the same length as metric.
Example:
space = [
{
'name': 'width',
'type': 'int',
'bounds': {
'min': 0,
'max': 20
},
},
{
'name': 'height',
'type': 'int',
'bounds': {
'min': -100,
'max': 100
},
},
]
algo = SigOptSearch(
space, name="SigOpt Example Experiment",
max_concurrent=1, metric="mean_loss", mode="min")
Example:
space = [
{
'name': 'width',
'type': 'int',
'bounds': {
'min': 0,
'max': 20
},
},
{
'name': 'height',
'type': 'int',
'bounds': {
'min': -100,
'max': 100
},
},
]
algo = SigOptSearch(
space, name="SigOpt Multi Objective Example Experiment",
max_concurrent=1, metric=["average", "std"], mode=["max", "min"])
## Scikit-Optimize (tune.suggest.skopt.SkOptSearch)¶
class ray.tune.suggest.skopt.SkOptSearch(optimizer=None, space=None, metric=None, mode=None, points_to_evaluate=None, evaluated_rewards=None, max_concurrent=None, use_early_stopped_trials=None)[source]
Uses Scikit Optimize (skopt) to optimize hyperparameters.
Scikit-optimize is a black-box optimization library. Read more here: https://scikit-optimize.github.io.
You will need to install Scikit-Optimize to use this module.
pip install scikit-optimize
This Search Algorithm requires you to pass in a skopt Optimizer object.
Parameters
• optimizer (skopt.optimizer.Optimizer) – Optimizer provided from skopt.
• space (dict|list) – A dict mapping parameter names to valid parameters, i.e. tuples for numerical parameters and lists for categorical parameters. If you passed an optimizer instance as the optimizer argument, this should be a list of parameter names instead.
• metric (str) – The training result objective value attribute.
• mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute.
• points_to_evaluate (list of lists) – A list of points you’d like to run first before sampling from the optimiser, e.g. these could be parameter configurations you already know work well to help the optimiser select good values. Each point is a list of the parameters using the order definition given by parameter_names.
• evaluated_rewards (list) – If you have previously evaluated the parameters passed in as points_to_evaluate you can avoid re-running those trials by passing in the reward attributes as a list so the optimiser can be told the results without needing to re-compute the trial. Must be the same length as points_to_evaluate. (See tune/examples/skopt_example.py)
• max_concurrent – Deprecated.
• use_early_stopped_trials – Deprecated.
Tune automatically converts search spaces to SkOpt’s format:
config = {
"width": tune.uniform(0, 20),
"height": tune.uniform(-100, 100)
}
current_best_params = [[10, 0], [15, -20]]
skopt_search = SkOptSearch(
metric="mean_loss",
mode="min",
points_to_evaluate=current_best_params)
tune.run(my_trainable, config=config, search_alg=skopt_search)
If you would like to pass the search space/optimizer manually, the code would look like this:
parameter_names = ["width", "height"]
parameter_ranges = [(0,20),(-100,100)]
current_best_params = [[10, 0], [15, -20]]
skopt_search = SkOptSearch(
parameter_names=parameter_names,
parameter_ranges=parameter_ranges,
metric="mean_loss",
mode="min",
points_to_evaluate=current_best_params)
tune.run(my_trainable, search_alg=skopt_search)
save(checkpoint_path)[source]
Save state to path for this search algorithm.
Parameters
checkpoint_path (str) – File where the search algorithm state is saved. This path should be used later when restoring from file.
Example:
search_alg = Searcher(...)
analysis = tune.run(
cost,
num_samples=5,
search_alg=search_alg,
name=self.experiment_name,
local_dir=self.tmpdir)
search_alg.save("./my_favorite_path.pkl")
Changed in version 0.8.7: Save is automatically called by tune.run. You can use restore_from_dir to restore from an experiment directory such as ~/ray_results/trainable.
restore(checkpoint_path)[source]
Restore state for this search algorithm
Parameters
checkpoint_path (str) – File where the search algorithm state is saved. This path should be the same as the one provided to “save”.
Example:
search_alg.save("./my_favorite_path.pkl")
search_alg2 = Searcher(...)
search_alg2 = ConcurrencyLimiter(search_alg2, 1)
search_alg2.restore(checkpoint_path)
tune.run(cost, num_samples=5, search_alg=search_alg2)
## ZOOpt (tune.suggest.zoopt.ZOOptSearch)¶
class ray.tune.suggest.zoopt.ZOOptSearch(algo='asracos', budget=None, dim_dict=None, metric=None, mode=None, **kwargs)[source]
A wrapper around ZOOpt to provide trial suggestions.
ZOOptSearch is a library for derivative-free optimization. It is backed by the ZOOpt package. Currently, Asynchronous Sequential RAndomized COordinate Shrinking (ASRacos) is implemented in Tune.
To use ZOOptSearch, install zoopt (>=0.4.0): pip install -U zoopt.
Tune automatically converts search spaces to ZOOpt”s format:
from ray import tune
from ray.tune.suggest.zoopt import ZOOptSearch
"config": {
"iterations": 10, # evaluation times
"width": tune.uniform(-10, 10),
"height": tune.uniform(-10, 10)
}
zoopt_search = ZOOptSearch(
algo="Asracos", # only support Asracos currently
budget=20, # must match num_samples in tune.run().
dim_dict=dim_dict,
metric="mean_loss",
mode="min")
tune.run(my_objective,
config=config,
search_alg=zoopt_search,
name="zoopt_search",
num_samples=20,
stop={"timesteps_total": 10})
If you would like to pass the search space manually, the code would look like this:
from ray import tune
from ray.tune.suggest.zoopt import ZOOptSearch
from zoopt import ValueType
dim_dict = {
"height": (ValueType.CONTINUOUS, [-10, 10], 1e-2),
"width": (ValueType.DISCRETE, [-10, 10], False)
}
"config": {
"iterations": 10, # evaluation times
}
zoopt_search = ZOOptSearch(
algo="Asracos", # only support Asracos currently
budget=20, # must match num_samples in tune.run().
dim_dict=dim_dict,
metric="mean_loss",
mode="min")
tune.run(my_objective,
config=config,
search_alg=zoopt_search,
name="zoopt_search",
num_samples=20,
stop={"timesteps_total": 10})
Parameters
• algo (str) – To specify an algorithm in zoopt you want to use. Only support ASRacos currently.
• budget (int) – Number of samples.
• dim_dict (dict) – Dimension dictionary. For continuous dimensions: (continuous, search_range, precision); For discrete dimensions: (discrete, search_range, has_order). More details can be found in zoopt package.
• metric (str) – The training result objective value attribute. Defaults to “episode_reward_mean”.
• mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute. Defaults to “min”.
save(checkpoint_path)[source]
Save state to path for this search algorithm.
Parameters
checkpoint_path (str) – File where the search algorithm state is saved. This path should be used later when restoring from file.
Example:
search_alg = Searcher(...)
analysis = tune.run(
cost,
num_samples=5,
search_alg=search_alg,
name=self.experiment_name,
local_dir=self.tmpdir)
search_alg.save("./my_favorite_path.pkl")
Changed in version 0.8.7: Save is automatically called by tune.run. You can use restore_from_dir to restore from an experiment directory such as ~/ray_results/trainable.
restore(checkpoint_path)[source]
Restore state for this search algorithm
Parameters
checkpoint_path (str) – File where the search algorithm state is saved. This path should be the same as the one provided to “save”.
Example:
search_alg.save("./my_favorite_path.pkl")
search_alg2 = Searcher(...)
search_alg2 = ConcurrencyLimiter(search_alg2, 1)
search_alg2.restore(checkpoint_path)
tune.run(cost, num_samples=5, search_alg=search_alg2)
## Repeated Evaluations (tune.suggest.Repeater)¶
Use ray.tune.suggest.Repeater to average over multiple evaluations of the same hyperparameter configurations. This is useful in cases where the evaluated training procedure has high variance (i.e., in reinforcement learning).
By default, Repeater will take in a repeat parameter and a search_alg. The search_alg will suggest new configurations to try, and the Repeater will run repeat trials of the configuration. It will then average the search_alg.metric from the final results of each repeated trial.
Warning
It is recommended to not use Repeater with a TrialScheduler. Early termination can negatively affect the average reported metric.
class ray.tune.suggest.Repeater(searcher, repeat=1, set_index=True)[source]
A wrapper algorithm for repeating trials of same parameters.
Set tune.run(num_samples=…) to be a multiple of repeat. For example, set num_samples=15 if you intend to obtain 3 search algorithm suggestions and repeat each suggestion 5 times. Any leftover trials (num_samples mod repeat) will be ignored.
It is recommended that you do not run an early-stopping TrialScheduler simultaneously.
Parameters
• searcher (Searcher) – Searcher object that the Repeater will optimize. Note that the Searcher will only see 1 trial among multiple repeated trials. The result/metric passed to the Searcher upon trial completion will be averaged among all repeats.
• repeat (int) – Number of times to generate a trial with a repeated configuration. Defaults to 1.
• set_index (bool) – Sets a tune.suggest.repeater.TRIAL_INDEX in Trainable/Function config which corresponds to the index of the repeated trial. This can be used for seeds. Defaults to True.
Example:
from ray.tune.suggest import Repeater
search_alg = BayesOptSearch(...)
re_search_alg = Repeater(search_alg, repeat=10)
# Repeat 2 samples 10 times each.
tune.run(trainable, num_samples=20, search_alg=re_search_alg)
## ConcurrencyLimiter (tune.suggest.ConcurrencyLimiter)¶
Use ray.tune.suggest.ConcurrencyLimiter to limit the amount of concurrency when using a search algorithm. This is useful when a given optimization algorithm does not parallelize very well (like a naive Bayesian Optimization).
class ray.tune.suggest.ConcurrencyLimiter(searcher, max_concurrent, batch=False)[source]
A wrapper algorithm for limiting the number of concurrent trials.
Parameters
• searcher (Searcher) – Searcher object that the ConcurrencyLimiter will manage.
• max_concurrent (int) – Maximum concurrent samples from the underlying searcher.
• batch (bool) – Whether to wait for all concurrent samples to finish before updating the underlying searcher.
Example:
from ray.tune.suggest import ConcurrencyLimiter
search_alg = HyperOptSearch(metric="accuracy")
search_alg = ConcurrencyLimiter(search_alg, max_concurrent=2)
tune.run(trainable, search_alg=search_alg)
## Custom Search Algorithms (tune.suggest.Searcher)¶
If you are interested in implementing or contributing a new Search Algorithm, provide the following interface:
class ray.tune.suggest.Searcher(metric=None, mode=None, max_concurrent=None, use_early_stopped_trials=None)[source]
Bases: object
Abstract class for wrapping suggesting algorithms.
Custom algorithms can extend this class easily by overriding the suggest method provide generated parameters for the trials.
Any subclass that implements __init__ must also call the constructor of this class: super(Subclass, self).__init__(...).
To track suggestions and their corresponding evaluations, the method suggest will be passed a trial_id, which will be used in subsequent notifications.
Not all implementations support multi objectives.
Parameters
• metric (str or list) – The training result objective value attribute. If list then list of training result objective value attributes
• mode (str or list) – If string One of {min, max}. If list then list of max and min, determines whether objective is minimizing or maximizing the metric attribute. Must match type of metric.
class ExampleSearch(Searcher):
def __init__(self, metric="mean_loss", mode="min", **kwargs):
super(ExampleSearch, self).__init__(
metric=metric, mode=mode, **kwargs)
self.optimizer = Optimizer()
self.configurations = {}
def suggest(self, trial_id):
configuration = self.optimizer.query()
self.configurations[trial_id] = configuration
def on_trial_complete(self, trial_id, result, **kwargs):
configuration = self.configurations[trial_id]
if result and self.metric in result:
self.optimizer.update(configuration, result[self.metric])
tune.run(trainable_function, search_alg=ExampleSearch())
set_search_properties(metric, mode, config)[source]
Pass search properties to searcher.
This method acts as an alternative to instantiating search algorithms with their own specific search spaces. Instead they can accept a Tune config through this method. A searcher should return True if setting the config was successful, or False if it was unsuccessful, e.g. when the search space has already been set.
Parameters
• metric (str) – Metric to optimize
• mode (str) – One of [“min”, “max”]. Direction to optimize.
• config (dict) – Tune config dict.
on_trial_result(trial_id, result)[source]
Optional notification for result during training.
Note that by default, the result dict may include NaNs or may not include the optimization metric. It is up to the subclass implementation to preprocess the result to avoid breaking the optimization process.
Parameters
• trial_id (str) – A unique string ID for the trial.
• result (dict) – Dictionary of metrics for current training progress. Note that the result dict may include NaNs or may not include the optimization metric. It is up to the subclass implementation to preprocess the result to avoid breaking the optimization process.
on_trial_complete(trial_id, result=None, error=False)[source]
Notification for the completion of trial.
Typically, this method is used for notifying the underlying optimizer of the result.
Parameters
• trial_id (str) – A unique string ID for the trial.
• result (dict) – Dictionary of metrics for current training progress. Note that the result dict may include NaNs or may not include the optimization metric. It is up to the subclass implementation to preprocess the result to avoid breaking the optimization process. Upon errors, this may also be None.
• error (bool) – True if the training process raised an error.
suggest(trial_id)[source]
Queries the algorithm to retrieve the next set of parameters.
Parameters
trial_id (str) – Trial ID used for subsequent notifications.
Returns
Configuration for a trial, if possible.
If FINISHED is returned, Tune will be notified that no more suggestions/configurations will be provided. If None is returned, Tune will skip the querying of the searcher for this step.
Return type
dict | FINISHED | None
save(checkpoint_path)[source]
Save state to path for this search algorithm.
Parameters
checkpoint_path (str) – File where the search algorithm state is saved. This path should be used later when restoring from file.
Example:
search_alg = Searcher(...)
analysis = tune.run(
cost,
num_samples=5,
search_alg=search_alg,
name=self.experiment_name,
local_dir=self.tmpdir)
search_alg.save("./my_favorite_path.pkl")
Changed in version 0.8.7: Save is automatically called by tune.run. You can use restore_from_dir to restore from an experiment directory such as ~/ray_results/trainable.
restore(checkpoint_path)[source]
Restore state for this search algorithm
Parameters
checkpoint_path (str) – File where the search algorithm state is saved. This path should be the same as the one provided to “save”.
Example:
search_alg.save("./my_favorite_path.pkl")
search_alg2 = Searcher(...)
search_alg2 = ConcurrencyLimiter(search_alg2, 1)
search_alg2.restore(checkpoint_path)
tune.run(cost, num_samples=5, search_alg=search_alg2)
save_to_dir(checkpoint_dir, session_str='default')[source]
Automatically saves the given searcher to the checkpoint_dir.
This is automatically used by tune.run during a Tune job.
Parameters
• checkpoint_dir (str) – Filepath to experiment dir.
• session_str (str) – Unique identifier of the current run session.
restore_from_dir(checkpoint_dir)[source]
Restores the state of a searcher from a given checkpoint_dir.
Typically, you should use this function to restore from an experiment directory such as ~/ray_results/trainable.
experiment_1 = tune.run(
cost,
num_samples=5,
search_alg=search_alg,
verbose=0,
name=self.experiment_name,
local_dir="~/my_results")
search_alg2 = Searcher()
search_alg2.restore_from_dir(
os.path.join("~/my_results", self.experiment_name)
property metric
The training result objective value attribute.
property mode
Specifies if minimizing or maximizing the metric.
## Shim Instantiation (tune.create_searcher)¶
There is also a shim function that constructs the search algorithm based on the provided string. This can be useful if the search algorithm you want to use changes often (e.g., specifying the search algorithm via a CLI option or config file).
tune.create_searcher(metric=None, mode=None, **kwargs)
Instantiate a search algorithm based on the given string.
This is useful for swapping between different search algorithms.
Parameters
• search_alg (str) – The search algorithm to use.
• metric (str) – The training result objective value attribute. Stopping procedures will use this attribute.
• mode (str) – One of {min, max}. Determines whether objective is minimizing or maximizing the metric attribute.
• **kwargs – Additional parameters. These keyword arguments will be passed to the initialization function of the chosen class.
Returns
The search algorithm.
Return type
ray.tune.suggest.Searcher
Example
>>> search_alg = tune.create_searcher('ax') | 2021-11-28 01:43:10 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.20509716868400574, "perplexity": 12222.393461731142}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964358443.87/warc/CC-MAIN-20211128013650-20211128043650-00550.warc.gz"} |
http://mathhelpforum.com/calculus/141156-use-alternating-series-test-print.html | # Use Alternating Series Test
• April 24th 2010, 03:55 PM
iyoo
The Absolute Convergence Test
The absolute convergence test states,
If Summation Notation (n=1 to n=infinity) abs(An) converges, then summation notation (n=1 to infinity) An converges.
So if abs (An) converges, does An converges absolutely? or should I check again for absolute convergent?
• April 24th 2010, 06:12 PM
tonio
Quote:
Originally Posted by iyoo
The absolute convergence test states,
If Summation Notation (n=1 to n=infinity) abs(An) converges, then summation notation (n=1 to infinity) An converges.
So if abs (An) converges, does An converges absolutely? or should I check again for absolute convergent?
If Abs(A_n) converges (absolutely) and then it converges (without the "absolutely" and without the absolute value).
Tonio
• April 25th 2010, 03:32 AM
HallsofIvy
Quote:
Originally Posted by iyoo
The absolute convergence test states,
If Summation Notation (n=1 to n=infinity) abs(An) converges, then summation notation (n=1 to infinity) An converges.
So if abs (An) converges, does An converges absolutely? or should I check again for absolute convergent?
$"\sum |A_n|$ converges" is exactly what "absolute convergence" means! | 2016-05-29 01:46:55 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 1, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.997448205947876, "perplexity": 11971.400322199384}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-22/segments/1464049278244.7/warc/CC-MAIN-20160524002118-00106-ip-10-185-217-139.ec2.internal.warc.gz"} |
http://phoenix2718.dothome.co.kr/?p=3414 | # Lecture 2: Markov Decision Processes | Reinforcement Learning | David Silver | Course
#### 1. Markov Process / Markov chain
##### 1.1. Markov process
Markov process or Markov chain is a tuple such that
• is a finite set of states, and
• is a transition probability matrix.
In a Markov process, the initial state should be given. How do we choose the initial state is not a role of the Markov process.
##### 1.2. State transition probability
state transition probability from to is
###### Episode
An episode of a Markov process is a trajectory of the transition states.
#### 2. Markov reward process
##### 2.1. Markov reward process (MRP)
Markov reward process is a tuple such that
• is a finite set of states,
• is a transition probability matrix,
• is a reward function, , and
• A reward function on state is .
• is a reward at time .
• is a discount factor, .
###### The steps of a MDP [sungjae]
1. Be on a state.
2. Move to a new state.
3. Gain a reward on arriving at the state.
4. Go to step 1
##### 2.2. Return
The return at time-step is denoted by .
is the total discounted reward from time-step .
##### 2.3. Value function in MRP
###### State value function
The state value function of a Markov reward process is the expected return starting from state .
##### 2.4. Bellman equation for MRP
###### Bellman equation for Markov reward processes
The Bellman equation for MRPs implies that can be represented by the multiple .
###### Solving the Bellman equation
• The computational complexity to solve is for states.
• This analytic method is only possible if is small.
• If is large, the following iterative methods are used to solve MRPs.
1. Dynamic programming
2. Monte-Carlo evalution
3. Temporal-Difference learning
#### 3. Markov decision process
##### 3.1. Markov decision process (MDP)
Markov decision process (MDP) is a Markov reward process with decisions of actions.
Markov decision process is a tuple such that
• is a finite set of states,
• is a finite set of actions,
• is a transition probability matrix,
• is a reward function, , and
• A reward function on state is .
• is a reward at time .
• is a discount factor, .
###### The steps of a MDP [sungjae]
1. Be on a state.
2. Take an action.
3. Gain a reward by the action
4. Arrive at a new state.
5. Go to step 1
##### 3.2. Policy
policy is a distribution over actions given states .
• A policy defines the action[behavior] of an agent.
• MDP policies only depend on the current state.
• MDP policies are parameterized by states.
• Policies are stationary[time-independent].
• stationary dynamic
##### 3.3. Value functions in Markov decision processes
There two value functions in MDPs: [1] the state-value function and [2] action-value function.
###### State-value function
The state-value function of an MDP is the expected return [1] starting from state and [2] following policy .
###### Action-value function
The action-value function is the expected return [1] starting from state , [2] taking action , and then [3] following policy
##### 3.4. Bellman expectation equation in MDP
###### Bellman expectation equation for
• is the current state.
• is the set of the actions able to be taken on .
• is an action on .
• is a particular policy.
• Conclusion: can be solved by .
###### Bellman expectation equation for
• is the reward function that returns reward if action is taken on state .
• Conclusion: can be solved by .
###### Bellman expectation equation for (2)
• Conclusion: can be solved by .
###### Bellman expectation equation for (2)
• Conclusion: can be solved by .
##### 3.5. Optimal value function
• The optimal value function specifies the best possible performance in the MDP.
• An MDP is solved‘ when we know the optimal value function.
###### Optimal state-value function
The optimal state-value function is is the maximum value function over all policies.
###### Optimal action-value function
The optimal action-value function is is the maximum value function over all policies.
###### Theorems
For any Markov decision process
• [★] There exists an optimal policy \pi_{*} that is better than or equal to all other policies, i.e., \pi \geq \pi^{*}, \forall{\pi}.
• All optimal policies achieve the optimal value function.
• All optimal policies achieve the optimal action function.
###### Finding an optimal policy
An optimal policy can be constructed by following formulation.
#### 4. Extensions to MDPs
[Our formulation] → [Extension]
• finite states → infinite states
• discrete states → continuous states
• fully observable states → partially observable states
• discounted future reward → undiscounted future reward
• maximum future reward → averaged future reward | 2018-09-26 03:11:18 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9161513447761536, "perplexity": 4341.683948087812}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-39/segments/1537267163146.90/warc/CC-MAIN-20180926022052-20180926042452-00160.warc.gz"} |
https://www.physicsforums.com/threads/maximum-induced-emf.358368/ | # Maximum Induced Emf
1. Nov 27, 2009
### Fazza3_uae
1. The problem statement, all variables and given/known data
A flat loop of wire of area 15.7 cm2 and 1.09 turns is perpendicular to a magnetic field whose magnitude decays in time according to B = 0.5 e−t/7. What is the maximum induced emf? Answer in units of V.
2. Relevant equations
$$\epsilon=$$ $$\Delta$$$$\Phi$$B/$$\Delta$$t
$$\epsilon=$$ - (dB/dt) N A Cos$$\theta$$
3. The attempt at a solution
I have:
A = 15.7 X 10-4 m2
N = 1.09 turns
B = 0.5 e-t/7
Maximum $$\epsilon$$ = E max. = ??
I found E max. = - ( 1.09) * ( 15.7 X 10-4 ) * Cos(0) * d(0.5 e-t/7)/dt
= 1.22 X 10-4 e-t/7
Then i found the first deravative of induced emf in terms of time & got another equation.
Then i made that equation equal to zero to find value of time for max. $$\epsilon$$.
But there is no such value for time. Calculator says false everytime which is true.
I tried to take the second deravative and equalize to zero and again same paroblem occured.
Soooo any help will be appreciated.
2. Nov 27, 2009
### kuruman
So what is the maximum value of E? More to the point, at what time is the above expression a maximum and what is that maximum value?
Last edited: Nov 27, 2009
3. Nov 27, 2009
### Fazza3_uae
Wow , thx kuruman for the help , it is right , when time is zero i get a maximum emf E.
but i have a question ,,, can i find the maximum by deravatives and how and when to use ???
thx in advance for all who are helping us ... ^^
4. Nov 27, 2009
### kuruman
You cannot find the maximum by derivatives because the exponential function does not a maximum or minimum. It is either monotonically decreasing or increasing.
5. Nov 28, 2009
### Fazza3_uae
thanks kuruman for eplanation. I understood now why i couldn't find a maximum value when deriving the equation. thanks a lot man . | 2017-12-18 02:17:04 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.568587601184845, "perplexity": 1591.861461671181}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-51/segments/1512948599549.81/warc/CC-MAIN-20171218005540-20171218031540-00130.warc.gz"} |
https://nrich.maths.org/public/topic.php?code=47&cl=3&cldcmpid=13795 | Resources tagged with: Creating and manipulating expressions and formulae
Filter by: Content type:
Age range:
Challenge level:
There are 132 results
Broad Topics > Algebraic expressions, equations and formulae > Creating and manipulating expressions and formulae
Chocolate Maths
Age 11 to 14 Challenge Level:
Pick the number of times a week that you eat chocolate. This number must be more than one but less than ten. Multiply this number by 2. Add 5 (for Sunday). Multiply by 50... Can you explain why it. . . .
How Much Can We Spend?
Age 11 to 14 Challenge Level:
A country has decided to have just two different coins, 3z and 5z coins. Which totals can be made? Is there a largest total that cannot be made? How do you know?
Partitioning Revisited
Age 11 to 14 Challenge Level:
We can show that (x + 1)² = x² + 2x + 1 by considering the area of an (x + 1) by (x + 1) square. Show in a similar way that (x + 2)² = x² + 4x + 4
Why 8?
Age 11 to 14 Challenge Level:
Choose any four consecutive even numbers. Multiply the two middle numbers together. Multiply the first and last numbers. Now subtract your second answer from the first. Try it with your own. . . .
Sums of Pairs
Age 11 to 16 Challenge Level:
Jo has three numbers which she adds together in pairs. When she does this she has three different totals: 11, 17 and 22 What are the three numbers Jo had to start with?”
Top-heavy Pyramids
Age 11 to 14 Challenge Level:
Use the numbers in the box below to make the base of a top-heavy pyramid whose top number is 200.
Age 11 to 14 Challenge Level:
Visitors to Earth from the distant planet of Zub-Zorna were amazed when they found out that when the digits in this multiplication were reversed, the answer was the same! Find a way to explain. . . .
Is it Magic or Is it Maths?
Age 11 to 14 Challenge Level:
Here are three 'tricks' to amaze your friends. But the really clever trick is explaining to them why these 'tricks' are maths not magic. Like all good magicians, you should practice by trying. . . .
Attractive Tablecloths
Age 14 to 16 Challenge Level:
Charlie likes tablecloths that use as many colours as possible, but insists that his tablecloths have some symmetry. Can you work out how many colours he needs for different tablecloth designs?
Unit Interval
Age 14 to 18 Challenge Level:
Take any two numbers between 0 and 1. Prove that the sum of the numbers is always less than one plus their product?
Interactive Number Patterns
Age 14 to 16 Challenge Level:
How good are you at finding the formula for a number pattern ?
The Simple Life
Age 11 to 14 Challenge Level:
The answer is $5x+8y$... What was the question?
Regular Hexagon Loops
Age 11 to 14 Challenge Level:
Make some loops out of regular hexagons. What rules can you discover?
Age 11 to 14 Challenge Level:
If you take a three by three square on a 1-10 addition square and multiply the diagonally opposite numbers together, what is the difference between these products. Why?
A Tilted Square
Age 14 to 16 Challenge Level:
The opposite vertices of a square have coordinates (a,b) and (c,d). What are the coordinates of the other vertices?
Special Numbers
Age 11 to 14 Challenge Level:
My two digit number is special because adding the sum of its digits to the product of its digits gives me my original number. What could my number be?
Cubes Within Cubes Revisited
Age 11 to 14 Challenge Level:
Imagine starting with one yellow cube and covering it all over with a single layer of red cubes, and then covering that cube with a layer of blue cubes. How many red and blue cubes would you need?
Leonardo's Problem
Age 14 to 18 Challenge Level:
A, B & C own a half, a third and a sixth of a coin collection. Each grab some coins, return some, then share equally what they had put back, finishing with their own share. How rich are they?
Always the Same
Age 11 to 14 Challenge Level:
Arrange the numbers 1 to 16 into a 4 by 4 array. Choose a number. Cross out the numbers on the same row and column. Repeat this process. Add up you four numbers. Why do they always add up to 34?
Chocolate 2010
Age 14 to 16 Challenge Level:
First of all, pick the number of times a week that you would like to eat chocolate. Multiply this number by 2...
Temperature
Age 11 to 14 Challenge Level:
Is there a temperature at which Celsius and Fahrenheit readings are the same?
Triangles Within Pentagons
Age 14 to 16 Challenge Level:
Show that all pentagonal numbers are one third of a triangular number.
Triangles Within Squares
Age 14 to 16 Challenge Level:
Can you find a rule which relates triangular numbers to square numbers?
Triangles Within Triangles
Age 14 to 16 Challenge Level:
Can you find a rule which connects consecutive triangular numbers?
Magic W
Age 14 to 16 Challenge Level:
Find all the ways of placing the numbers 1 to 9 on a W shape, with 3 numbers on each leg, so that each set of 3 numbers has the same total.
Summing Consecutive Numbers
Age 11 to 14 Challenge Level:
15 = 7 + 8 and 10 = 1 + 2 + 3 + 4. Can you say which numbers can be expressed as the sum of two or more consecutive integers?
Think of Two Numbers
Age 11 to 14 Challenge Level:
Think of two whole numbers under 10, and follow the steps. I can work out both your numbers very quickly. How?
Can They Be Equal?
Age 11 to 14 Challenge Level:
Can you find rectangles where the value of the area is the same as the value of the perimeter?
Painted Cube
Age 14 to 16 Challenge Level:
Imagine a large cube made from small red cubes being dropped into a pot of yellow paint. How many of the small cubes will have yellow paint on their faces?
Crossed Ends
Age 11 to 14 Challenge Level:
Crosses can be drawn on number grids of various sizes. What do you notice when you add opposite ends?
Multiplication Square
Age 14 to 16 Challenge Level:
Pick a square within a multiplication square and add the numbers on each diagonal. What do you notice?
How Do You React?
Age 14 to 16 Challenge Level:
To investigate the relationship between the distance the ruler drops and the time taken, we need to do some mathematical modelling...
Matchless
Age 14 to 16 Challenge Level:
There is a particular value of x, and a value of y to go with it, which make all five expressions equal in value, can you find that x, y pair ?
Special Sums and Products
Age 11 to 14 Challenge Level:
Find some examples of pairs of numbers such that their sum is a factor of their product. eg. 4 + 12 = 16 and 4 × 12 = 48 and 16 is a factor of 48.
Sixational
Age 14 to 18 Challenge Level:
The nth term of a sequence is given by the formula n^3 + 11n . Find the first four terms of the sequence given by this formula and the first term of the sequence which is bigger than one million. . . .
The Number Jumbler
Age 7 to 14 Challenge Level:
The Number Jumbler can always work out your chosen symbol. Can you work out how?
Marbles in a Box
Age 11 to 16 Challenge Level:
How many winning lines can you make in a three-dimensional version of noughts and crosses?
Always a Multiple?
Age 11 to 14 Challenge Level:
Think of a two digit number, reverse the digits, and add the numbers together. Something special happens...
Seven Squares
Age 11 to 14 Challenge Level:
Watch these videos to see how Phoebe, Alice and Luke chose to draw 7 squares. How would they draw 100?
Hallway Borders
Age 11 to 14 Challenge Level:
What are the possible dimensions of a rectangular hallway if the number of tiles around the perimeter is exactly half the total number of tiles?
Steel Cables
Age 14 to 16 Challenge Level:
Some students have been working out the number of strands needed for different sizes of cable. Can you make sense of their solutions?
Janine's Conjecture
Age 14 to 16 Challenge Level:
Janine noticed, while studying some cube numbers, that if you take three consecutive whole numbers and multiply them together and then add the middle number of the three, you get the middle number. . . .
Number Pyramids
Age 11 to 14 Challenge Level:
Try entering different sets of numbers in the number pyramids. How does the total at the top change?
Age 14 to 16 Challenge Level:
Kyle and his teacher disagree about his test score - who is right?
Age 14 to 16 Challenge Level:
Robert noticed some interesting patterns when he highlighted square numbers in a spreadsheet. Can you prove that the patterns will continue?
Reversals
Age 11 to 14 Challenge Level:
Where should you start, if you want to finish back where you started?
Christmas Chocolates
Age 11 to 14 Challenge Level:
How could Penny, Tom and Matthew work out how many chocolates there are in different sized boxes?
Lap Times
Age 14 to 16 Challenge Level:
Can you find the lap times of the two cyclists travelling at constant speeds? | 2020-07-12 07:37:54 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.49435749650001526, "perplexity": 1252.2051985167345}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-29/segments/1593657131734.89/warc/CC-MAIN-20200712051058-20200712081058-00100.warc.gz"} |
https://neurips.cc/virtual/2022/poster/53364 | ## Estimating the Arc Length of the Optimal ROC Curve and Lower Bounding the Maximal AUC
### Song Liu
##### Hall J #922
Keywords: [ density ratio estimation ] [ ROC Curve ] [ AUC maximization ] [ f-divergence ]
[ Abstract ]
[ [
Tue 29 Nov 2 p.m. PST — 4 p.m. PST
Abstract: In this paper, we show the arc length of the optimal ROC curve is an $f$-divergence. By leveraging this result, we express the arc length using a variational objective and estimate it accurately using positive and negative samples. We show this estimator has a non-parametric convergence rate $O_p(n^{-\beta/4})$ ($\beta \in (0,1]$ depends on the smoothness). Using the same technique, we show the surface area sandwiched between the optimal ROC curve and the diagonal can be expressed via a similar variational objective. These new insights lead to a novel two-step classification procedure that maximizes an approximate lower bound of the maximal AUC. Experiments on CIFAR-10 datasets show the proposed two-step procedure achieves good AUC performance in imbalanced binary classification tasks.
Chat is not available. | 2023-03-21 20:25:16 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7713907957077026, "perplexity": 1056.6202248849877}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296943746.73/warc/CC-MAIN-20230321193811-20230321223811-00725.warc.gz"} |
http://math.stackexchange.com/questions/67340/exercise-i-1-6-from-tenenbaums-introduction-to-analytic-and-probabilistic-numb | # Exercise I.1.6 from Tenenbaum's “Introduction to analytic and probabilistic number theory”
So this question has been asked before, see here, but instead of how to go from part 4 to part 5, I am having a difficult time proving part 4:
For each $\alpha > 0$ there exists a sequence of integers $\{n_1, n_2, \dots \}$, increasing in the weak sense, such that $p_{n_j} \sim \alpha j \qquad (j \to \infty)$.
How does it follow from the previous part?
-
A first step should be to figure out what the $n_j$ should look like. Because $p_n\sim n\log n$, we need that the sequence satisfies $\alpha j \sim n_j \log n_j$. Note that if $n_j \sim \alpha j/\log j$, then $\log n_j \sim \log \alpha +\log j -\log \log j \sim \log j$. Is this precise enough? Why or why not? – Aaron Sep 25 '11 at 5:04
Consider $$n_j=\left[\frac{\alpha j}{\log j}\right].$$
Then $$p_{n_j}\sim n_j \log(n_j)\sim \frac{\alpha j}{\log j}\log\left(\frac{\alpha j}{\log j}\right)=\alpha j+\frac{\alpha j}{\log j}\log\left(\frac{\alpha}{\log j}\right)$$
$$=\alpha j+O\left(\frac{\alpha j\log \log j}{\log j}\right)\sim \alpha j.$$
+1 for the correct use of several signs $\sim$ and $=$ in the same sentence. – Did Sep 25 '11 at 17:06 | 2016-06-30 17:50:53 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9161355495452881, "perplexity": 122.83158100278443}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-26/segments/1466783399106.96/warc/CC-MAIN-20160624154959-00002-ip-10-164-35-72.ec2.internal.warc.gz"} |
https://tex.stackexchange.com/questions/452408/add-vertical-space-for-individual-lines-in-an-array-in-lyx | # Add vertical space for individual lines in an array in LyX
I know that I can add vertical space for individual lines in an array in LaTeX by including an optional argument after the line break (see example below). Is there way to do this in LyX without using a text editor to directly modify the LyX source file?
$\left[\begin{array}{cc} \dfrac{1}{s} & \dfrac{1}{s}\\[1em] \dfrac{1}{s} & \dfrac{1}{s} \end{array}\right]$ | 2020-10-22 09:35:22 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8140279650688171, "perplexity": 887.5478083340088}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-45/segments/1603107879362.3/warc/CC-MAIN-20201022082653-20201022112653-00149.warc.gz"} |
http://clay6.com/qa/40075/if-p-is-the-length-of-perpendicular-from-the-origin-to-the-line-whose-inter | Browse Questions
If $p$ is the length of perpendicular from the origin to the line whose intercepts on the axes are $a$ and $b$, then show that $\large\frac{1}{p^2}$$= \large\frac{1}{a^2}$$ +\large\frac{1}{b^2}$
Can you answer this question?
Toolbox:
• Equation of a line whose $x$ and $y$ intercepts are $a$ and $b$ is $\large\frac{x}{a}$$+\large\frac{y}{b}$$=1$
• The perpendicular distance of a line $Ax+By+C=0$ from a point $(x_1, y_1)$ is given by $d=\large\frac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}$
Equation of a line whose intercepts on the axes are $a$ and $b$ is $\large\frac{x}{a}$$+ \large\frac{y}{b}$$=1$
This can be written as
$bx+ay=ab$
or $bx+ay-ab=0$------------(1)
The perpendicular distance $d$ of a line $Ax+By+C=0$ from a point $(x_1, y_1)$ is $d=\large\frac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}$------------(2)
Now comparing equation (1) and (2) we get,
$A=a, B=b$ and $c=-ab$
$\therefore$ perpendicular distance of the line passing through the point (0,0) is $p = \large\frac{|A(0)+B(0)-ab|}{\sqrt{a^2+b^2}}$
$\therefore p = \large\frac{|-ab|}{\sqrt{a^2+b^2}}$
Squaring on both sides we get,
$p^2=\large\frac{(ab)^2}{a^2+b^2}$
$\Rightarrow p^2(a^2+b^2)=a^2b^2$ | 2016-12-06 18:00:45 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7159789800643921, "perplexity": 206.35538250146143}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-50/segments/1480698541950.13/warc/CC-MAIN-20161202170901-00356-ip-10-31-129-80.ec2.internal.warc.gz"} |
https://forum.allaboutcircuits.com/threads/transformer-ratings.182253/ | # Transformer Ratings
#### jlawley1969
Joined Feb 22, 2021
97
Hi me again not understanding thing.
Ok so for a transformer like this https://www.we-online.com/catalog/datasheet/7491182012.pdf
the current saturation is 0.8A but it is rated at only 0.35A on the output for 12 v.
My question is if I am trying to use the transformer(in a flyback topology with TNY290) to generate only 5V does that mean I am able to get more current through the transformer? I know the wire thickness is what is limiting the current but my logic is that the power capability would be 4.2W so I could use 5v and 0.84A.
I just want someone to explain why I am wrong.
thanks
ps the reason I am wanting to use a transformer with a higher rated voltage is that I want a turns ratio that is closer to 10:1 instead of 20:1
#### crutschow
Joined Mar 14, 2008
28,204
The limit is determined by the saturation current of the transformer.
You cannot exceed that peak value for any operating conditions of the transformer.
#### jlawley1969
Joined Feb 22, 2021
97
#### jlawley1969
Joined Feb 22, 2021
97
Either way my question still stands about the power/current capabilities
#### Ian0
Joined Aug 7, 2020
3,761
Why do you want a 10:1 ratio? The ratio is the ratio of the output voltage to the flyback voltage, not to the primary voltage.
You should aim for a flyback voltage between 100V and 150V on a 230V AC supply (rectified to 325V DC).
The output current is probably the average output current, so it will give you a 2x 12V @ 0.35A power supply (8.4W)
The primary current is a sawtooth waveform with a pulse that lasts probably 1.5us.
On a 230V supply the current at the end of the pulse will be
$$I=\frac{Vt}{L}$$
which works out at 540mA
The energy stored will be
$$E=\frac{1}{2} I^2L$$
which works out at 133uJ
repeated 132000 times a second gives 17W for a hypothetical perfectly efficient transformer, enough headroom to produce the 8.4W output easily.
The main reason that the primary saturation current is so high is that flyback converters are usually designed with a much shorter ON time than OFF time.
Last edited:
#### shortbus
Joined Sep 30, 2009
8,966
So what would it be called then? WE's website says that transformer as well as the others in the series are " Designed for Tiny Switch ICs from Power Integration and NCP101x or 105x of ON Semiconductor "
#### jlawley1969
Joined Feb 22, 2021
97
yes ive read that a few times and the selection guide, Im just a little dumb lolol
#### jlawley1969
Joined Feb 22, 2021
97
Why do you want a 10:1 ratio? The ratio is the ratio of the output voltage to the flyback voltage, not to the primary voltage.
You should aim for a flyback voltage between 100V and 150V on a 230V AC supply (rectified to 325V DC).
The output current is probably the average output current, so it will give you a 2x 12V @ 0.35A power supply (8.4W)
The primary current is a sawtooth waveform with a pulse that lasts probably 1.5us.
On a 230V supply the current at the end of the pulse will be
$$I=\frac{Vt}{L}$$
which works out at 540mA
The energy stored will be
$$E=\frac{1}{2} I^2L$$
which works out at 133uJ
repeated 132000 times a second gives 17W for a hypothetical perfectly efficient transformer, enough headroom to produce the 8.4W output easily.
The main reason that the primary saturation current is so high is that flyback converters are usually designed with a much shorter ON time than OFF time.
what do you mean by the "output voltage to the flyback voltage, not to the primary voltage" is the flyback voltage the voltage above the rectified voltage?(I saw a figure on this before but I cant find it right now) and if so why use that ratio?
#### Ian0
Joined Aug 7, 2020
3,761
what do you mean by the "output voltage to the flyback voltage, not to the primary voltage" is the flyback voltage the voltage above the rectified voltage?(I saw a figure on this before but I cant find it right now) and if so why use that ratio?
The flyback voltage will be the voltage on the output capacitor plus a diode drop, multiplied by the transformer turns ratio.
The fly back voltage multiplied by the length of the fly back pulse will be the same as the supply voltage multiplied by the MOSFET on time.
#### shortbus
Joined Sep 30, 2009
8,966
yes ive read that a few times and the selection guide, Im just a little dumb lolol
The gap in the transformer core is what makes them a flyback, without the stored(magnetic) energy in the gap it would just be a transformer, and not work in the circuit. Ian0's drawing shows the "ringing" from that energy being released into the circuit.
#### BobaMosfet
Joined Jul 1, 2009
1,898
Hi me again not understanding thing.
Ok so for a transformer like this https://www.we-online.com/catalog/datasheet/7491182012.pdf
the current saturation is 0.8A but it is rated at only 0.35A on the output for 12 v.
My question is if I am trying to use the transformer(in a flyback topology with TNY290) to generate only 5V does that mean I am able to get more current through the transformer? I know the wire thickness is what is limiting the current but my logic is that the power capability would be 4.2W so I could use 5v and 0.84A.
I just want someone to explain why I am wrong.
thanks
ps the reason I am wanting to use a transformer with a higher rated voltage is that I want a turns ratio that is closer to 10:1 instead of 20:1
Title: Understanding Basic Electronics, 1st Ed.
Publisher: The American Radio Relay League
ISBN: 0-87259-398-3
#### Ian0
Joined Aug 7, 2020
3,761
The Würth part you quote in post #1 IS a flyback transformer. With no gap the inductance would be much larger than 900uH.
There are two lots of ringing.
The ringing at the point the MOSFET switches off is due to the resonance between the MOSFET capacitance and the transformer leakage inductance. This overshoot can kill your MOSFET. Ringing at this point should be clamped and reduced as much as possible.
The ringing at the end of the fly back pulse is the resonance between the primary inductance and the MOSFET, and its allowable (although there are integrated controller ICs which don’t like it going below 0V)
In fact, that ringing can be utilised to minimise switching losses by switching at the lowest point on the oscillation cycle, that makes a quasi resonant circuit, but that’s another story. . .
#### jlawley1969
Joined Feb 22, 2021
97
Title: Understanding Basic Electronics, 1st Ed.
Publisher: The American Radio Relay League
ISBN: 0-87259-398-3
Quit Bullying me!!lol
#### jlawley1969
Joined Feb 22, 2021
97
The Würth part you quote in post #1 IS a flyback transformer. With no gap the inductance would be much larger than 900uH.
There are two lots of ringing.
The ringing at the point the MOSFET switches off is due to the resonance between the MOSFET capacitance and the transformer leakage inductance. This overshoot can kill your MOSFET. Ringing at this point should be clamped and reduced as much as possible.
The ringing at the end of the fly back pulse is the resonance between the primary inductance and the MOSFET, and its allowable (although there are integrated controller ICs which don’t like it going below 0V)
In fact, that ringing can be utilised to minimise switching losses by switching at the lowest point on the oscillation cycle, that makes a quasi resonant circuit, but that’s another story. . .
Yeah I have a clamp with diode and TVS diode
but that is interesting about the quasi resonant thing, I saw that when I was looking into flyback but I am obviously already having a hard time with this....
#### Ian0
Joined Aug 7, 2020
3,761
I think TVS+diode is the best clamp - it doesn't waste any power if the pulse doesn't reach the TVS voltage. It's not great for EMC because of the sharp edge when it starts to conduct, but 10Ω in series reduces that.
Quasi resonant is great if you want to run it near its full output a lot of the time. Otherwise, it's no different to ordinary flyback. One problem is solves is that it just can't do subharmonic oscillation, which flyback can be prone to.
But sort out ordinary flyback first. What are you trying to achieve?
#### jlawley1969
Joined Feb 22, 2021
97
I think TVS+diode is the best clamp - it doesn't waste any power if the pulse doesn't reach the TVS voltage. It's not great for EMC because of the sharp edge when it starts to conduct, but 10Ω in series reduces that.
Quasi resonant is great if you want to run it near its full output a lot of the time. Otherwise, it's no different to ordinary flyback. One problem is solves is that it just can't do subharmonic oscillation, which flyback can be prone to.
But sort out ordinary flyback first. What are you trying to achieve?
I am trying to do 110VAC to 5VDC ~2A to power two USBs. I have got the voltage to work and charge my phone with 750871110 but only at like 200mA. I am waiting on some parts like Yclass capacitors and higher precision resistors before I continue testing.
The only issue I had with the transformer 750871110 was how big it is so thus why I was trying to figure out other transformers but I have since been able to squeeze 2 more mm of clearance out of the enclosure to make it fit but its still close.
I recently took apart on of those cheap usb wall outlet chargers and while it charged my phone at 1A it also only had 15 components and not even an opto isolator so I figure I am atleast close.lolol
#### Ian0
Joined Aug 7, 2020
3,761
I have used these
https://myrra.com/flyback/
The opto isolator can be eliminated by taking the feedback from the auxiliary winding. The Wurth part doesn't have an auxiliary winding.
#### shortbus
Joined Sep 30, 2009
8,966
I recently took apart on of those cheap usb wall outlet chargers and while it charged my phone at 1A
I might be missing something(not that unusual for me) But don't you think there's a reason it is only charging at that rate? Can a phone battery take a higher rate of charge? They do need to meet all of the standards set forth by governing bodies around the world. But I guess it would make some sort of viral video, setting a cell phone on fire just by charging it.
#### jlawley1969
Joined Feb 22, 2021
97
I might be missing something(not that unusual for me) But don't you think there's a reason it is only charging at that rate? Can a phone battery take a higher rate of charge? They do need to meet all of the standards set forth by governing bodies around the world. But I guess it would make some sort of viral video, setting a cell phone on fire just by charging it.
I forgot to mention that MY charger is only charger at 0.14A... so I am trying to get to 1A | 2021-12-04 20:00:40 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.46147823333740234, "perplexity": 1797.2127834103687}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964363006.60/warc/CC-MAIN-20211204185021-20211204215021-00111.warc.gz"} |
https://stats.stackexchange.com/questions/455080/clarifying-definition-of-probability-mass-function-pmf | # Clarifying definition of Probability Mass Function (PMF)
I am currently reading Deep Learning book, and I want to get better understanding of probability theory. In chapter 3.3.1 of Deep Learning book it states that:
Often we associate each random variable with a different probability mass function and the reader must infer which PMF to use based on the identity the random variable, rather than on the name of the function;P(x) is usually not the same as P (y).
And not many paragraphs latter, it saids the following:
Probability mass functions can act on many variables at the same time. Such a probability distribution over many variables is known as a joint probability distribution.P(x=x, y=y) denotes the probability that x=x and y=y simultaneously. We may also write P (x, y) for brevity
I am having hard time grasping these two paragraphs. What do they mean when they say that P(x) is USUALLY not the same as P(y). As I understood, random variable is basically a random phenomenon from a real world that we wish to model. And each random phenomenon has its own Probability Mass function. Does this mean that the first paragraph indicates that random variable y represents a different phenomenon, and in the second paragraph random variable y represents the same type of phenomenon as x and that is why we use the same probability mass function?
Welcome to CV!
Generally in mathematics, if $$f(x)$$ denotes a function, $$f(y)$$ denotes the same function; the input variable is just a dummy variable. You could call it $$x$$, $$y$$, or anything else, but the way the function operates on an input is the same.
When they say $$P(X)$$ is usually not the same as $$P(Y)$$, they're pointing out that this is different than the above situation. It is not the case that $$P$$ is some function, and $$X$$ and $$Y$$ are dummy variables representing the input. For pmf's $$P(X)$$ and $$P(Y)$$ are actually different functions, even though they're both denoted by $$P$$.
For this reason, in most texts, the pmf's are represented by $$P_Y(x)$$ and $$P_Y(y)$$ where the subscripts $$X$$ and $$Y$$ (capital letters) denotes the random variable the pmf is for, and $$x$$ and $$y$$ (lowercase letters) are the dummy variables representing the inputs to the function.
By definition, the pmf describes the probability that a random variable takes some value. The second paragraph is just saying that if we want to know when $$X$$ takes some value at the same time that $$Y$$ takes some value, we need to use the joint pmf, $$P(X, Y)$$.
• Hello! Thanks for the answer! However, I am still confused. I got the part where P(x) and P(y) are actually different PMF functions, and I do agree with the notation you have provided me with. But, in your last paragraph, are you saying that P(X, Y) is some third PMF function that is able to assing probabilities to both random variable X and random variable Y which represent different phenomenons? – Stefan Radonjic Mar 21 at 21:18
• $P(X, Y)$ assigns probabilities to outcomes of $X$ and $Y$ occurring simultaneously. For example, say I flip a twice. Let $X$ be a 1 if the first flip is a heads, otherwise 0. Let $Y$ be a 1 if the first flip is a heads, otherwise 0. Now if we want to know the probability that we get two heads in a row ($X$ = 1 and $Y$ = 1 simultaneously), we can use $P(X, Y)$. In this case $P(X = 1, Y = 1) = \frac{1}{4}$. So yes, $X$ and $Y$ represent different phenomenons, and $P(X, Y)$ assigns probabilities to outcomes of each that occur simultaneously. – Nick Koprowicz Mar 21 at 22:42
• Alright! Thanks for clarifying that! :) – Stefan Radonjic Mar 23 at 10:08 | 2020-10-26 12:57:09 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 21, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8610011339187622, "perplexity": 226.88027448438683}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-45/segments/1603107891228.40/warc/CC-MAIN-20201026115814-20201026145814-00437.warc.gz"} |
http://www.researchgate.net/publication/45894050_The_Symmetry_of_the_Boron_Buckyball_and_a_Related_Boron_Nanotube | Article
# The Symmetry of the Boron Buckyball and a Related Boron Nanotube
• ##### Nevill Gonzalez Szwacki
Chemical Physics Letters (Impact Factor: 2.15). 01/2010; DOI: 10.1016/j.cplett.2010.05.086
Source: arXiv
ABSTRACT We investigate the symmetry of the boron buckyball and a related boron nanotube. Using large-scale ab-initio calculations up to second-order M{\o}ller Plesset perturbation theory, we have determined unambiguously the equilibrium geometry/symmetry of two structurally related boron clusters: the B80 fullerene and the finite-length (5,0) boron nanotube. The B80 cluster was found to have the same symmetry, Ih, as the C60 molecule since its 20 additional boron atoms are located exactly at the centers of the 20 hexagons. Additionally, we also show that the (5,0) boron nanotube does not suffer from atomic buckling and its symmetry is D5d instead of C5v as has been described by previous calculations. Therefore, we predict that all the boron nanotubes rolled from the \alpha -sheet will be free from structural distortions, which has a significant impact on their electronic properties. Comment: 4 pages, 3 figures
0 Bookmarks
·
99 Views
• Source
##### Article: Low-energy boron fullerenes: Role of disorder and potential synthesis pathways
[Hide abstract]
ABSTRACT: We show by means of first-principles calculations that in boron nanostructures a large variety of two-dimensional structures can be obtained, all with similar energetic properties. Some of these new structures are more stable than both the B80 fullerenes initially proposed by Szwacki et al. [ Phys. Rev. Lett. 98 166804 (2007)] and boron nanotubes. At variance from other systems like carbon, disordered configurations are energetically comparable with ordered ones. Cage-like structures that are not ordered are thus comparable in energy to the more ordered original B80 fullerene. A comparison with other more disordered structures like bulk-like boron clusters is also presented. We found that in the presence of other seed structures (like Sc3 or Sc3N), some endohedral cage-like structures are energetically preferred over bulk-like clusters. This result opens a new pathway for the synthesis of the B80 fullerene as an endohedral fullerene as was done in the case of the C80 fullerene.
Physical review. B, Condensed matter 01/2011; 83(8). · 3.77 Impact Factor
• ##### Article: C60+ and B80+: A Comparative Study of the Jahn-Teller Effect
[Hide abstract]
ABSTRACT: The ground state wave function of the neutral icosahedral C60 and B80 belong to the totally symmetric representation, where the HOMOs are fivefold degenerate and form the basis of the Hu representation of the Ih point group. Hence both C60+, and B80+ are prone to a molecular distortion of the Jahn-Teller type. Density Functional Theory calculation is applied and revealed that a minimum energy configuration in D5d point group is obtained for C60+; whereas a slight S6 distortion of a D3d nuclear configuration is obtained for B80+. Thus the vibronic coupling between the 2Hu electronic states of both systems with the degenerate normal modes in the Ih point group are analysed and presented here in a comparative point of view. Moreover, a simple and efficient procedure, which is fully non-empirical, based on the harmonic approximation, is presented in order to calculate the Jahn-Teller parameters and the first order vibronic coupling coefficient.
Journal of Physics Conference Series 01/2013; 428:012005.
• ##### Article: Quantification of curvature effects in boron and carbon nanotubes: Band structures and ballistic current
[Hide abstract]
ABSTRACT: The zone-folding method is a widely used technique in computing the electronic structure of carbon nanotubes. In this paper, curvature effects of boron and carbon nanotubes of different diameters and chiralities are systematically quantified using the density-functional-based tight-binding method. Here, the curvature effect in a nanotube is defined as the difference between the one-dimensional band structure calculated from the tubular atomic structure and the band structure calculated from the related two-dimensional sheet with the zone-folding method. For each nanotube, we quantify this difference by calculating the standard deviation of the band energies σE and the maximal relative deviation between the derived ballistic currents δImax. For all considered nanotubes with diameters d>2 nm, the standard deviation σE is below 60 meV and decreases only slowly, whereas δImax is still as large as 8% and does not tend to zero for large d.
Physical review. B, Condensed matter 06/2013; 87(24). · 3.77 Impact Factor | 2014-12-19 13:20:45 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8333683013916016, "perplexity": 2556.5556147668963}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-52/segments/1418802768497.135/warc/CC-MAIN-20141217075248-00124-ip-10-231-17-201.ec2.internal.warc.gz"} |
https://web2.0calc.com/questions/need-help_70304 | +0
# need help
0
85
1
r and s are the roots of 3x^2 + 4x - 12 = 0. Find r^2+s^2+2rs
Jan 21, 2022
#1
+32957
+1
Divide $$3x^2+4x-12=0$$ by 3: $$x^2+\frac{4}{3}x-4=0$$ ...(1)
Quadratic with roots r and s: $$(x-r)(x-s)=0$$ or $$x^2-(r+s)x+rs=0$$ ...(2)
Compare (1) and (2) to see that $$r+s=-\frac{4}{3}$$ ...(3)
Note that $$r^2 +s^2 + 2rs = (r+s)^2$$
Now it should be easy to answer the question.
Jan 21, 2022 | 2022-05-18 12:47:39 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.973395824432373, "perplexity": 4193.748596075051}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652662522270.37/warc/CC-MAIN-20220518115411-20220518145411-00446.warc.gz"} |
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/325741 | Ah, specifically, the "Back reference with nest level" section of
http://oniguruma.rubyforge.org/oniguruma/files/Syntax_txt.html
On Jan 23, 2009, at 7:14 PM, Rob Biedenharn wrote:
> I think that you need to look at what Oniguruma might be able to do.
> http://oniguruma.rubyforge.org/
>
> I believe I've seen it demonstrated that balanced open/close pairs
> can be found with this regular expression engine. It might be ugly,
> however, but then you probably expected that.
>
> -Rob
>
> On Jan 23, 2009, at 5:33 PM, ivo welch wrote:
>
>> Dear Experts: I am very new to ruby, literally having just read the
>> ruby book.
>>
>> I want to write a program that does basic LaTeX parsing, so I need to
>> match '}' closings to the opening '{'. (yes, I understand that LaTeX
>> has very messy syntax, so this will only work for certain LaTeX
>> docs.)
>> Does a gem exist that facilitates closing-paren-matching fairly
>> painlessly? For example,
>>
>> sample = " \caption{my table \label{table-label} example:
>> $\sqrt{2+\sqrt{2}}$} more here {}"
>>
>> so, I want to find my "\caption" matcher ruby program to be able to
>> detect the closing paren, and provide me with everything in between
>> the opener and closer (i.e., "my table \label{table-label} example:
>> $\sqrt{2+\sqrt{2}}$"). Possible?
>>
>> I searched this mailing list first, but I only found discussions from
>> years back about this issue. I understand that this is not strictly
>> speaking a regular expression. I come from a perl background. There
>> are now some regex extension libraries that make it possible for the
>> built-in regex engine to parse matching parens
>> (Regexp::Common::balanced and Text::Balanced). I was hoping I could
>> find some similar gem for ruby.
>>
>> help appreciated.
>>
>> Sincerely,
>>
>> /iaw
>>
>
> | 2020-03-29 21:25:42 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5502057671546936, "perplexity": 6809.899165480341}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-16/segments/1585370496227.25/warc/CC-MAIN-20200329201741-20200329231741-00340.warc.gz"} |
https://mathhelpboards.com/threads/z-algebras.8041/ | # Z-Algebras
#### Peter
##### Well-known member
MHB Site Helper
After defining an R-algebra at the bottom of page 5 (see attachment from Sharp), on the top of page 6 we find the following:
----------------------------------------------------------------------------------
"We should point out at once that the concept of an R-algebra introduced in 1.9 above occurs very frequently in ring theory, simply because every ring is a Z-algebra. We explain in 1,10 why this is the case."
-----------------------------------------------------------------------------------
Sharp then proceeds as follows:
-----------------------------------------------------------------------------------
"Let $$\displaystyle R$$ be a ring. Then the mapping $$\displaystyle F \ : \ \mathbb{Z} \to R$$ defined by $$\displaystyle f(n) = n(1_R)$$ for all $$\displaystyle n \in \mathbb{Z}$$ is a ring homomorphism and, in fact, is the only ring homomorphism from $$\displaystyle \mathbb{Z}$$ to $$\displaystyle R$$.
Here
$$\displaystyle n(1_R) = 1_R + 1_R + ... \ ... + 1_R$$ (n-terms) ... for n > 0
$$\displaystyle n(1_R) = 0_R$$ for n = 0
and
$$\displaystyle n(1_R) = (-1_R) + (-1_R) + ... \ ... + (-1_R)$$ (n-terms) ... for n < 0
It should be clear from 1.5 (The subring criterion - see attachment) that the intersection of any non-empty family of subrings of a ring R is again a subring of R, This observation leads to the following Lemma (Lemma 1.10 - see attachment, page 6). ... ... ... "
------------------------------------------------------------------------------------
My first problem with the above is this:
Sharp writes: "Let $$\displaystyle R$$ be a ring. Then the mapping $$\displaystyle F \ : \ \mathbb{Z} \to R$$ defined by $$\displaystyle f(n) = n(1_R)$$ for all $$\displaystyle n \in \mathbb{Z}$$ is a ring homomorphism and, in fact, is the only ring homomorphism from $$\displaystyle \mathbb{Z}$$ to $$\displaystyle R$$."
But why is this the only ring homomorphism from $$\displaystyle \mathbb{Z}$$ to $$\displaystyle R$$?
My second problem is as follows: Sharp connects establishing a Z-Algebra (section 1,10 page 6) with establishing the structure of a polynomial ring - but what is the relationship and big picture here?
My third problem is the following:
Dummit and Foote on page 339 define Z-Modules (see attachment) , but seem to structure them slightly differently using a an element a from an abelian group (and not the identity of the group) whereas Sharp uses the multiplicative identity of a ring in establishing a Z-algebra. I presume this is because the abelian groups are being treated as additive and one cannot use the additive identity - can someone please confirm this please - or clarify and explain the links between Z_algebras and Z-modules.
I would really appreciate some help and clarification of these issues.
Peter
#### Deveno
##### Well-known member
MHB Math Scholar
First off, let's just say we have any old homomorphism:
$f:\Bbb Z \to R$.
Since for integers $k,m$ we have:
$f(km) = f(k)f(m)$
we have:
$f(m) = f(1\ast m) = f(1)f(m)$ and:
$f(k) = f(k \ast 1) = f(k)f(1)$
so we see that $f(1)$ is a multiplicative identity for $f(\Bbb Z)$ (even if $R$ is not commutative).
Moreover, since $f(k)f(m) = f(km) = f(mk) = f(m)f(k)$, we see that the image of $f$ is a commutative sub-ring of $R$ with unity.
If $R$ is a ring with unity, the unity of $R$ is unique, and if we insist that a ring homomorphism preserve the ring unity, then we have no choice but to set:
$f(1) = 1_R$
But then the homomorphism property:
$f(k+1) = f(k) + f(1) = f(k) + 1_R$
yields (via induction on $n$):
$f(n) = nf(1) = n(1_R)$, for all $n \in \Bbb Z^+$.
Also:
$f(0) = f(0+0) = f(0) + f(0)$ shows that $f(0) = 0_R$.
Finally, for $n \in \Bbb Z^+$:
$0_R = f(0) = f(n + (-n)) = f(n) + f(-n)$, which means that:
$f(-n) = -f(n) = n(-1_R)$.
This means that $f$ is completely determined by $f(1)$, and we only have one choice in the matter, so only one homomorphism is possible (this is NOT true if we do not require homomorphisms to preserve unity:
Consider $f:\Bbb Z \to \Bbb Z \times \Bbb Z$ given by $f(k) = (k,0)$ and
$g:\Bbb Z \to \Bbb Z \times \Bbb Z$ given by $g(k) = (k,k)$).
What this means, in the language of category theory, is that the integers are an INITIAL OBJECT in the category of commutative rings with unity (with morphisms consisting of unity-preserving ring homomorphisms). Naively, the integers are your basic "starter ring", they have a special role to play in the theory of commutative rings.
To get a better understanding of what is going on, here, let's look at an alternate definition of $R$-algebra, and show our two definitions are equivalent.
Alternate definition of $R$-algebra:
A (left) $R$-module $M$ together with a bilinear ($R$-linear in both arguments) operation:
$[\cdot,\cdot]:M \times M \to M$
that possesses an identity for this operation, $1_M$.
Suppose now that we have an $R$-algebra in the sense of Sharp, so we have a commutative ring with unity $R$, a commutative ring with unity $S$, and a ring homomorphism (which preserves unity) $f:R \to S$.
For our $R$-module, we will take $M = S$. We define the "scalar multiplication" as:
$r(s) = f(r)s$, where the right-hand side is the ring multiplication in $S$. It should be (hopefully) clear that this indeed does produce an $R$-module:
$(S,+)$ is an abelian group
$(r + r')(s) = f(r + r')s = [f(r) + f(r')]s = f(r)s + f(r')s = r(s) + r'(s)$
$r(s+s') = f(r)(s + s') = f(r)s + f(r)s' = r(s) + r'(s)$
$r(r'(s)) = r(f(r')s) = (f(r))(f(r'))s) = (f(r)f(r'))s = f(rr')s = (rr')(s)$
$1_R(s) = f(1_R)s = 1_Ss = s$
For our binary operation $[\cdot,\cdot]$, we will use the multiplication in $S$. So all we have to verify is bilinearity:
$[s,t+t'] = s(t+t') = st + st' = [s,t] + [s,t']$
$[s+s',t] = (s+s')t = st + s't = [s,t] + [s',t]$
$r[s,t] = r(st) = f(r)(st) = (f(r)s)t = [f(r)s,t] = [r(s),t]$
$r[s,t] = r(st) = r(ts) = f(r)(ts) = (f(r)t)s = s(f(r)t) = [s,f(r)t] = [s,r(t)]$
and identity: clearly we may take $1_M = 1_S$.
Now, conversely, suppose we have the alternate definition, and we wish to prove this is an $R$-algebra in the sense of Sharp. So we need to exhibit a (unity-preserving) ring homomorphism $f:R \to M$. Define:
$f: R \to M$ by $f(r) = r(1_M)$.
The proof that this is such a homomorphism is left to you.
(Note: the requirement that $S$ is commutative can actually be relaxed to the condition that $f(S) \subseteq Z(S)$, the center of $S$, and the above proofs remain the same. Can you spot where this is required?).
********
By dint of the unique homomorphism from $\Bbb Z$ to $R$, we see immediately that any ring is a $\Bbb Z$-algebra, the $\Bbb Z$-module structure comes from the fact that the additive group of a ring is an abelian group. Some care must be taken, however, when writing $\Bbb Z$-linear combinations of elements of $R$, because $R$ may be of finite characteristic.
Every $\Bbb Z$-algebra *is* a $\Bbb Z$-module, but not every $\Bbb Z$-module has a bilinear product associated with it (in much the same way as some vector spaces have a multiplication defined on them, but not every vector space does).
The polynomial ring $R[x]$ is, in fact, the free $R$-algebra generated by the set $\{x\}$. This is what is expressed by the theorem:
Let $R$ be any commutative unital ring with $a \in R$. Then there is a unique ring homomorphism:
$\phi_a:R[x] \to R$
such that if $f:\{x\} \to \{a\}$ is defined the only way possible, and $\iota: \{x\} \to R[x]$ is the inclusion map, then:
$\phi_a \circ \iota = f$
Such a theorem is called a "universal property", because it says $R[x]$ represents the most efficient way of creating an $R$-algebra out of the single element set $\{x\}$.
The homomorphism $\phi_a$ is often called "the evaluation map at $a$" which returns the element of $R$, for a given polynomial $p(x) \in R[x]$ given by forming the expression $p(a)$. It may be an interesting exercise for you to show that $\phi_a$ is completely determined by its value at $x$. | 2022-01-25 15:05:16 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9664384126663208, "perplexity": 212.03563578609183}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-05/segments/1642320304835.96/warc/CC-MAIN-20220125130117-20220125160117-00566.warc.gz"} |
https://mathoverflow.net/questions/369481/structures-for-random-graphs-with-structure | # Structures for random graphs with structure
Background
[You may skip this and go immediately to the Definitions.]
Crucial features of a (random) graph or network are:
• the degree distribution $$p(d)$$ (exponential, Poisson, or power law)
• the mean degree $$\bar{d}$$
• the mean clustering coefficient $$\bar{C}$$
• the mean distance $$L$$ and diameter $$D$$
Randomly generated graphs often are required to exhibit the small-world property, i.e. $$L\propto \log N$$ and $$\bar{C}$$ is “not small”. There are several random graph models that address at least one of these conditions:
While the Watts-Strogatz and the Barabasi-Albert model are modifications of the Erdős–Rényi model, and the Newman model is a specific generalization of the configuration model, I wonder if there is already a "meta-model" that tries to incorporate the best of all of these models. (Reference request.)
Generalizing both Watts-Strogatz's and Newman's model, I'd like to investigate random graphs that "interpolate between a randomized structure close to ER graphs and [some arbitrary regular graph]" (quote from Wikipedia).
For this, I'd like to have at hand a multitude of regular graphs which can
• be systematically symbolized and enumerated,
• be easily generated from their symbol (i.e. their adjacency matrices), and
• possibly have closed form expressions for the small-world characteristics $$L$$ and $$\bar{C}$$
Which regular graphs I have in mind can most easily be explained by an example.
Definitions
Let a vertex configuration be a graph that represents a vertex $$\nu$$ with a number of immediate neighbours $$\nu_0,\nu_2,\dots,\nu_{d-1}$$ and a shortest path (of arbitrary length) between each pair of consecutive neighbours $$\nu_i, \nu_{i+1}$$. A vertex configuration can be codified by the symbol $$(n_1.n_2.\dots.n_k)^m$$ which tells, that $$\nu$$ has degree $$d = m \cdot k$$ and is surrounded by an $$m$$-periodic sequence of $$n_i$$-faces resp. shortest cycles. (This is nothing but the standard definition of vertex configurations in geometry in the language of graph theory.)
Example:
$$(4)^4$$
A vertex is said to have a given vertex configuration $$\Gamma$$ when its neighbourhood together with one shortest path between neighbours is isomorphic to $$\Gamma$$. A graph is said to have a given vertex configuration $$\Gamma$$ when all of its vertices have vertex configuration $$\Gamma$$. A vertex configuration is said to be realizable when there is a graph that has it.
Now consider finite graphs in which all vertices have the same vertex configuration.
Questions
1. Are all vertex configurations $$\Gamma$$ realizable by graphs of more or less arbitrary size? How to prove or disprove this?
This has to do with the question if all vertex configurations (in the sense of geometry) which don't define a periodic tiling of the sphere (i.e. a regular polyhedron) define a periodic tiling of the Euclidean or hyperbolic plane.
2. If there are non-realizable vertex configurations: How do I check if a given vertex configuration is realizable?
3. Does a graph with a given vertex configuration $$\Gamma$$ have to be vertex-transitive?
4. Since the (equal) number of vertices of two vertex-transitive graphs with the same vertex configuration doesn't guarantee that they are isomorphic: By which general means can their "shape" be defined, so that two equally defined graphs must be isomorphic? (For an example: see below.)
5. Is there a systematic way to generate an adjacency matrix for a given realizable vertex configuration and "shape"?
With "shape" I mean what Dolbilin and Schulte call "neighborhood complexes (coronas)" in their paper The Local Theorem for Monotypic Tilings.
Examples
Consider the vertex configuration $$(4)^4$$ and a "shape" defined by numbers $$(4, 6)$$
When linking vertices on opposite sides of the shape all vertices have the same vertex configuration $$(4)^4$$, moreover the resulting graph is vertex-transitive:
We find diameter $$D = 5$$, clustering coefficient $$\bar{C} = 0$$, and mean distance $$L =\frac{1}{23}(4\times 1 + 7 \times 2 + 7 \times 3 + 4 \times 4 + 1 \times 5) \approx 2.61$$ for which to find a closed or recursive explicit expression (depending on $$(n,m)$$) seems to be feasible.
For the "shape"
with the same vertex configuration and number of vertices we find $$D = 5$$ and mean distance $$L =\frac{1}{23}(4\times 1 + 6 \times 2 + 6 \times 3 + 5 \times 4 + 2 \times 5) \approx 2.78$$
For the "shape"
with roughly the same number of vertices we find $$D = 4$$ and mean distance $$L =\frac{1}{24}(4\times 1 + 8 \times 2 + 8 \times 3 + 4 \times 4 ) \approx 2.5$$.
If you want a cluster coefficient $$\bar{C} = 1/2$$ you can start with a vertex configuration $$(3.n)^m$$, e.g. $$(3.4)^2$$:
Unfortunately, this configuration does not qualify because it doesn't tile a plane but the sphere (giving rise to the cuboctahedron). So you have to choose $$(3.4)^3$$ at least. To draw a nice "shape" of some size that can be made into a finite graph with vertex configuration $$(3.4)^m$$, $$m > 2$$, requires hyperbolic geometry. To find an adjacency matrix is even harder, as I guess (see question 5). Also the diameter $$D$$ and mean distance $$L$$ (as closed expressions).
Alternatively, one can add an edge to half of the $$n\cdot m$$ $$4$$-cycles (randomly chosen) of the $$(4)^4$$ graph - thus reducing diameter $$D$$ and mean distance $$L$$.
The following vertex configuration has notation $$(3.4.4.4)^1$$ and should provide counterexamples to question 1 (existence of graphs of arbitrary size) and question 3 (vertex-transitivity).
There are only finitely many graphs that realize this configuration, and all of them are finite with at most 24 vertices. Exactly two of them are planar, the edge-graph of rhombicuboctahedron (left), and the edge-graph of the closely related pseudo-rhombicuboctahedron (right). Only the first one is vertex-transitive.
All other graphs can be obtained from these by identifying vertices. For example, identifying antipodal vertices in the left graph gives a "projective polyhedron":
I highlighted the vertex configuration in the right image because it is not obvious in this drawing.
I think these are all the graphs with this configuration. I might be wrong, but there are certainly no such graphs with more than 24 vertices.
More generally, you might be interested in the Local Theorem from
which is concerned with the question when certain local restrictions imply global symmetry. Usually, it gives uniqueness and vertex-transitivity, but it only applies if the topology is "simply connected" (so, for tilings of the sphere, Euclidean/hyperbolic plane, but not for the torus, as you have seen in your question that the graph is not unique for $$(4)^4$$).
In the start of Section 3 (below Theorem 3.1) they state that the configuration $$(3.5.5.5)^1$$ can be realized as an infinite graph, but not as a vertex-transitive one. I have tried to track down this claim, but they only refer to the book "Tilings and Patterns" which contains literally thousands of tilings, and I was not able to find the desired one.
Finally, the following configuration $$(3.4.5)^1$$ should not be realizable at all:
To see this, note that the graph must contain a "triangular face" (since the configuration does). Each of the three edges of that triangle is shared either with a quadrangle, or a pentagon. W.l.o.g. assume that two edges are shared with a quadrange. But these two edges share a vertex, and so this vertex cannot be of type $$(3.4.5)^1$$.
In general it seems quite tricky to distinguish the realizable from the non-realizable configurations. As a rule of thumb, it seems that odd-faces pose a problem, similarly as they did in the previous example. So, e.g. a configuration $$(\mathbf 5.8.10)^1$$ cannot exist either for the same reason, as there is a pentagonal face that bounds two different kinds of faces, and there is no face-type repeated at a vertex.
Since you mention (in the comments) that you are mostly interested in $$(3.n)^m$$ (assuming $$n\ge 3$$, $$m\ge 2$$):
This configuration always exists, is unique and vertex-transitive (assuming a "simply connected topology", which we can translate as "the graph is planar").
It is finite only for $$(3.3)^2$$ (octahedron), $$(3.4)^2$$ (cuboctahedron) and $$(3.5)^2$$ (icosidodecahedron). You can consider it "planar" for $$\smash{(3.3)^3}$$ (triangular tiling) and $$\smash{(3.6)^2}$$ (trihexagonal tiling), and hyperbolic in all other cases.
The uniqueness and symmetry is essentially a consequence of the Local Theorem (and the related Extension Theorem) mentioned before. But in easy terms: if you try to build a graph with such a vertex configuration, and you start from any vertex, and then you try to complete the vertex configuration around any of the other vertices, you can do this only in a unique way (really, try it on paper). Since you make no choice in any (of the possibly infinitely many) steps, the result is unique.
• Thanks, your answer is relevant in two respects: First, it shows that a graph that realizes a configuration doesn't have to be vertex-transitive. (That's important for me to know, and it answers question 3) Second it shows that there are (of course) configurations that tile only the sphere (defining a polyhedron) but not a plane. This case was excluded in the remark to question 1. Aug 18 '20 at 13:15
• Do you have a tool at hand that draws graphs for given configurations? Aug 18 '20 at 13:20
• @Hans-PeterStricker Sadly no, I always do it by hand. Aug 18 '20 at 13:25
• @Hans-PeterStricker The graph with configuration $(3.n)^m$ exists, is unique and vertex-transitive. I edited my answer. Aug 18 '20 at 15:36
• @Hans-PeterStricker Okay, uniqueness is a lie. Imagine that you can build finite graphs of type $(3.3)^3$ by wrapping around the tiling to a torus as you did with $(4)^4$. The Local Theorm assumes that the "topology is simply connected" (e.g. sphere, Euclidean/hyperbolic plane). Similar wrapping might be possible in the spherical and hyperbolic case. I am not sure what this does to vertex-transitivity, but I am optimistic that it is preserved. I might edit the answer later. Aug 18 '20 at 15:46 | 2021-12-07 19:34:07 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 62, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7875373959541321, "perplexity": 460.2642358180354}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964363405.77/warc/CC-MAIN-20211207170825-20211207200825-00075.warc.gz"} |
https://proofwiki.org/wiki/Supremum_Inequality_for_Ordinals | # Supremum Inequality for Ordinals
## Theorem
Let $A \subseteq \operatorname{On}$ and $B \subseteq \operatorname{On}$ be ordinals.
Then:
$\displaystyle \forall x \in A: \exists y \in B: x \le y \implies \bigcup A \le \bigcup B$
## Proof
$\displaystyle x < \bigcup A$ $\implies$ $\displaystyle \exists z: \left({x < z \land z < A}\right)$ Definition of Set Union $\displaystyle$ $\implies$ $\displaystyle \exists y \in B: \exists z: \left({x < z \land z \le y}\right)$ By Hypothesis $\displaystyle$ $\implies$ $\displaystyle \exists y \in B: x < y$ $\displaystyle$ $\implies$ $\displaystyle x < \bigcup B$ Union of Ordinals is Least Upper Bound
Therefore:
$\displaystyle \bigcup A \subseteq \bigcup B$
and:
$\displaystyle \bigcup A \le \bigcup B$
$\blacksquare$
## Warning
The converse of this statement does not hold. | 2019-12-12 11:30:59 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 2, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.706340491771698, "perplexity": 404.62932962425606}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540543252.46/warc/CC-MAIN-20191212102302-20191212130302-00535.warc.gz"} |
https://bookdown.org/yihui/bookdown/preview-a-chapter.html | ## 5.2 Preview a chapter
Building the whole book can be slow when the size of the book is big. Two things can affect the speed of building a book: the computation in R code chunks, and the conversion from Markdown to other formats via Pandoc. The former can be improved by enabling caching in knitr using the chunk option cache = TRUE, and there is not much you can do to make the latter faster. However, you can choose to render only one chapter at a time using the function preview_chapter() in bookdown, and usually this will be much faster than rendering the whole book. Only the Rmd files passed to preview_chapter() will be rendered.
Previewing the current chapter is helpful when you are only focusing on that chapter, since you can quickly see the actual output as you add more content or revise the chapter. Although the preview works for all output formats, we recommend that you preview the HTML output.
One downside of previewing a chapter is that the cross-references to other chapters will not work, since bookdown knows nothing about other chapters in this case. That is a reasonably small price to pay for the gain in speed. Since previewing a chapter only renders the output for that specific chapter, you should not expect that the content of other chapters is correctly rendered as well. For example, when you navigate to a different chapter, you are actually viewing the old output of that chapter (which may not even exist). | 2017-11-20 15:42:12 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5083909630775452, "perplexity": 726.0679973361199}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-47/segments/1510934806070.53/warc/CC-MAIN-20171120145722-20171120165722-00096.warc.gz"} |
https://codereview.stackexchange.com/questions/6176/random-string-encrypt-decrypt | # Random string + encrypt/decrypt
Are there any security flaws in what I plan to do?
I need to store the following in my DB:
1. a random string to act as a salt for encrypting a password
2. the encrypted password that used the salt in #1
Here's the PHP code I have to accomplish the above tasks:
<?php
function decrypt($string,$encryption_key = '')
{
$initialization_vector = get_initialization_vector(); // Convert hexadecimal data into binary representation$string = hex2bin($string); // See: http://php.net/manual/en/mcrypt.ciphers.php return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$encryption_key, $string, MCRYPT_MODE_ECB,$initialization_vector));
}
function encrypt($string,$encryption_key = '')
{
$initialization_vector = get_initialization_vector(); // See: http://php.net/manual/en/mcrypt.ciphers.php$string = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $encryption_key,$string, MCRYPT_MODE_ECB, $initialization_vector); // Convert binary data into hexadecimal representation$string = bin2hex($string); return$string;
}
function get_initialization_vector()
{
// See: http://php.net/manual/en/mcrypt.ciphers.php
// MCRYPT_BLOWFISH selected as it appears to be one of the "universally"
// supported ciphers supported by the mcrypt extension
$initialization_vector_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB); // See: http://php.net/manual/en/function.mcrypt-create-iv.php // The source can be MCRYPT_RAND (system random number generator), MCRYPT_DEV_RANDOM // (read data from /dev/random) and MCRYPT_DEV_URANDOM (read data from /dev/urandom). // Prior to 5.3.0, MCRYPT_RAND was the only one supported on Windows.$initialization_vector = mcrypt_create_iv($initialization_vector_size, MCRYPT_RAND); return$initialization_vector;
}
function get_random_string($character_set = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',$minimum_length = 8, $maximum_length = 12) { if ($minimum_length > $maximum_length) {$length = mt_rand($maximum_length,$minimum_length);
}
else
{
$length = mt_rand($minimum_length, $maximum_length); }$random_string = '';
for ($i = 0;$i < $length;$i++)
{
$random_string .=$character_set[(mt_rand(0, (strlen($character_set) - 1)))]; } return$random_string;
}
function hex2bin($hexadecimal_data) {$binary_representation = '';
for ($i = 0;$i < strlen($hexadecimal_data);$i += 2)
{
$binary_representation .= chr(hexdec($hexadecimal_data{$i} .$hexadecimal_data{($i + 1)})); } return$binary_representation;
}
• I don't think “critique my code” is appropriate on this site. “Critique my protocol” could be, although a precise description of your security objectives would be preferable. There's a site for code critique in the Stack Exchange network: Code Review. Do not repost there for the time being; I've flagged a moderator, and if the moderators agree your question is fine for Code Review, they will migrate it there. – Gilles 'SO- stop being evil' Nov 20 '11 at 17:41
• How do you encrypt something with a salt? That doesn't make much sense. Typically you encrypt something with a key. Now, if instead of salt you meant to say key, then your scheme is very insecure. Think about it. You are storing the key and the ciphertext in the same place. If the attacker can access the database, she has both and can decrypt the ciphertext. – mikeazo Nov 20 '11 at 18:14
• Gilles - points 1 and 2 need critiquing, not the code. The code is just there to elaborate on my idea. – StackOverflowNewbie Nov 20 '11 at 22:54
• @mikeazo I believe he is salting like one should do in a hash. It's not a problem with his terminology, just that there's no reason to salt an encryption. – Kevin Nov 21 '11 at 15:08
## Why Encryption Doesn't Fit the Goal of Password Storage
Cryptographic hashing and encryption have two different purposes. Hashing is not reversible -- given a hash, you can't determine what made it except by testing to see if a source input matches the hash output. When used for passwords, this becomes a validation only question: "does this password (mixed with this salt) match?" With passwords, the goal is to prevent somebody with full access to the database from recovering passwords.
Encrypting passwords handles that goal poorly. To verify a password, one must have the encryption key. That means one is also able to determine the source password from looking at the encrypted version of the password. In the event of a compromise, having those encrypted fields and the key will result in the disclosure of all passwords regardless of how strong they were.
## The Rules of Crypto
You'll hear it a lot around here: don't roll your own. The problem is that the field has changed too much for "common sense" to really be something that's working on our favor. Encryption and password issues have evolved relatively fast on a human-life scale of time. Where not everybody is following that, a lot of varying ideas exist about how to solve these problems and many of them have been proven wrong.
If you're not current, the proper approach is to research the issue you're trying to solve rather than the method you're trying to solve it with.
To summarize what you are doing here:
You use AES in ECB-mode, with some unknown key, to encrypt a password.
You also try to use a random initialization vector as a salt for this encryption.
I see these problems:
• You don't need the hexadecimal encoding, if you define your database column with a binary type (BINARY or VARBINARY) instead of a text type. This will safe some storage space (and a tiny bit of processing time). | 2020-11-30 14:48:01 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2094051092863083, "perplexity": 1899.6883799986858}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-50/segments/1606141216175.53/warc/CC-MAIN-20201130130840-20201130160840-00506.warc.gz"} |
https://math.stackexchange.com/questions/1322807/visualising-3rd-degree-equations | # Visualising 3rd degree equations
I know that general second degree curve, i.e. $ax^2 + by^2 + 2hxy + 2gx + 2fy + c=0$ gives us the equation of different cross sections of a cone.
Similarly, what does a third degree* curve actually represent? Different cross sections of another solid structure, if so then which one? And what does a forth degree? ..fifth?
$^* =ax^3+ by^3 + 2dx^2y + 2ey^2x + 2jx^2 + 2ky^2 + 2hxy + 2gx + 2fy+ c=0$
• You seem to be doing two things at once. The quadratic curve above does indeed give (possibly degenerate) conic sections. An easier progression may be to either: A) Consider quadric surfaces, algebraic surfaces of degree 2 (i.e., just adding a third variable), or B) Consider cubic curves, arbitrary curves (two variables) of degree $3$. Or do you really one to add an extra variable and degree at once? – pjs36 Jun 12 '15 at 17:32
• Oh sorry, for the confusion. Actually I just wanted to increase power (without changing the number of variables) – Harshal Gajjar Jun 12 '15 at 17:38
• Thanks for the clarification! That WolframMathWorld link has some interesting information on the curves you're talking about, and you can even copy/paste your equation into Desmos, fix the exponents, and vary parameters to see what some curves look like. You're venturing steadily into "algebraic geometry" territory, and I know practically nothing about that. – pjs36 Jun 12 '15 at 17:57
• Thanks for sharing this @pjs36. The wolfram link was good but unfortunately didn't tell me anything about the structure.. Actually I'd tried varying all the parameters in Desmos, but couldn't get any clue from there. The graphs were strange, ~ three triangles approaching towards origin. – Harshal Gajjar Jun 12 '15 at 18:52
Consider a surface mapping $(x(u,v), y(u,v), z(u,v))$ from the unit square to $\mathbb{R}^3$ where $x,$ $y,$ and $z$ are total degree $d$ polynomials for some $d>2.$ The intersection of a plane $ax+by+cz+d=0$ with this surface is a degree $d$ implicit polynomial curve in $uv$ space.
An easily visualized subset of this type of curves are the superellipses defined by $(x/a)^d + (y/b)^d = 1.$ As $d$ approaches infinity, the curve approaches the rectangle with sides $2a$ and $2b$ and centered at the origin. | 2018-12-18 18:45:52 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7439425587654114, "perplexity": 621.5222379332187}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-51/segments/1544376829568.86/warc/CC-MAIN-20181218184418-20181218210418-00638.warc.gz"} |
https://cartesianproduct.wordpress.com/tag/unity/ | ## Saving a computer with Xfce
Regular readers will know of my contempt for Ubuntu Linux‘s standard “Unity” interface. Sadly I could find no simple way to transition to the Mint distro (which keeps Ubuntu’s simplicity but ditches the abomination that is Unity) and so thought I had no choice but to live with it.
But, bluntly, Unity was making the computer I am typing this on all but unusable – it was like a trip back 15 or more years in computing performance – thrashing, long delays, the whole “run Windows 3.1 on a 640KB box” experience. Unity had to go or the laptop (a vintage and a long way from the top of the range machine – but with 2GB RAM and two Athlon TK-57 processors not quite ready for the scrap yard) had to go.
In desperation this morning I installed Xfce (Xubuntu-desktop) – I wish I had done that years ago. The computer is usable again and I get to work with a clean and entirely functional desktop.
## The maths of the spirograph… with the drawings
Well, I sat down and thought this was going to be easy, but it has taken me three hours to work the maths of a smaller inner wheel rolling around inside a large outer wheel: mainly because for the first two of those I neglected the basic insight that the inner wheel rolls in the opposite direction to its direction of travel (think of it this way – as a car wheel moves forward the point at the top of the wheel moves backwards – relative to the centre of the wheel).
And instead of using MetaPost I resorted to a spread sheet – though I might do a MetaPost drawing still.
Anyway – assume you have a big wheel of unit radius and a small wheel inside it of radius $\frac{1}{R}$.
At any given time the centre of this small wheel will be at cartesian co-ordinates (assuming the big wheel is centred on (0,0):
($cos(\theta)(1 -\frac{1}{R})$ , $sin(\theta)(1 -\frac{1}{R})$) (1)
where $\theta$ is the angle of rotation of the small wheel relative to the centre of the big wheel.
But if the small wheel has moved through angle $\theta$ relative to the centre of the big wheel, then it will have itself rotated through the angle $R\theta$ – in the opposite direction to its rotation around the centre of the big wheel.
This means a fixed point on the surface of the small wheel will now be, compared to the centre of the smaller circle, at cartesian co-ordinates:
($\frac{cos(\theta - R\theta)}{R}$, $\frac{sin(\theta - R\theta)}{R}$) (2)
And we add (1) and (2) together to get the co-ordinates relative to the origin (ie the centre of the bigger circle).
Looking at the above it should be relatively obvious that if $R$ is an integer then the pattern will represent $R$ cusps – and not much less obvious is the fact that if $\frac{1}{R}$ can be expressed as a rational number then the pattern will repeat. But if $\frac{1}{R}$ cannot be expressed as a rational then it turns out there are a countably infinite number i.e., $\aleph_0$, number of cusps. In a way this is just a graphical way of representing an irrational number – it is a number that cannot be made to divide up unity (the circle) into equal proportions.
So here are the pretty pictures:
Let $R = 2$ and we have a degenerate case
Then the 3 cusps of the ‘deltoid’:
The four cusped astroid:
## The more people use “Unity” the less they like it
Admittedly this is a “focus group of one” but returning home from some weeks away, the other half says “you know the way my computer works now?” Me: “oh, Unity?” Her: “Yes. Well, it’s ****. Can you get rid of it?” Me: “I thought you said you liked it?” Her: “That was before I had to do some work.”
But it seems Canonical still are not prepared to admit their mistake.
## “bye bye ubuntu you suck now” – so how can I switch to Mint?
The first half of this blog’s title was a search string that took someone here. I tend to agree.
So is there a way to seamlessly switch to Mint? I don’t have a separate /home partition so the route that most people seem to recommend is blocked to me.
I think there used to be scripts but I cannot find any up to date ones, so can anyone help?
## Ubuntu annoyances and some fixes
OK, after a week of 11.10 I thought I’d list some of the problems and what to do about them. It’s not happy reading – I think it is fair to say Canonical have dropped the ball on this one.
• Unity – this is the joke Ubuntu think we should be using as a desktop interface. It’s rubbish, just use Gnome:sudo aptitude install gnome-panel and then select Gnome when you login (click on that wheel thing beside your name on the login dialog).
• Evolution – this is nearly as bad as the Unity decision, but Ubuntu have banjaxed Evolution and I can see no obvious fix – I am using Thunderbird instead, but it is also broken (a bug is in the Ubuntu bugzilla but no fix is apparent) and complains about the Ubuntu One address book. You just have to ignore the errors and hope somebody gets around to fixing it. Better yet, gets round to fixing the distro so that Evolution works on it.
• Skype – this too is broken by 11.10. But it can be fixed. sudo apt-get install libxss1:i386 && sudo apt-get install libqt4-core:i386 && sudo apt-get install libqt4-gui:i386 && sudo apt-get install libdbus-1-3:i386 (NB: use apt-get as aptitude seems to have some issues with this.) Be careful, though, as installing these libraries might cause you some other issues – have not for me, but they seem to drive a lot of other consequential changes.
## Upgrading to Ubuntu 11.10 and getting rid of “Unity”
I have now upgraded the laptop on which this is being typed to Ubuntu 11.10 and there were a few problems and issues:
• The upgrade killed the wireless connection and then failed (late on) because it could not download the Adobe Flash installer – but it was late enough in the upgrade process to allow me to boot into 11.10 and then complete anything that needed doing with sudo aptitude dist-upgrade
• You are forced to use the abomination that is “Unity” – still looks and feels like something a five-year-old would have designed. It’s a disgusting waste of time. You can probably tell I don’t like it. So get rid of it with sudo aptitude install gnome-panel
• Before I got to that point it tried to boot into something called “Ubuntu 3D” – which is something to do with the ludicrous Unity. It failed (this is running dual head) telling me I was exceeding the 3D capacity of my video card (at least that’s what I think it was trying to tell me) and then went into “Ubuntu 2D” – which worked reasonably well.
The issue I had with the desktop background disappearing when going dual head has gone, though Gnome panel handled the dual head properly while Unity 2D still had “issues”.
But, overall, it seems to have gone well enough. At least once I got rid of Unity. Have I told I don’t like it?
## Is Ubuntu in decline?
The conclusion in Linux Format magazine is that, yes, it is. It’s still the most popular distro, but the gap has closed with Mint (which offers Ubuntu-Done-Right I suppose) and Fedora.
Five years ago I was a Fedora user but then they issued a release that oopsed on booting, so I had no choice but to use Ubuntu and until the release of the awful “Unity” desktop have never thought of using anything else.
I guess I would just go straight to Debian if starting from scratch these days. | 2017-02-20 08:38:31 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 14, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.3380182087421417, "perplexity": 1073.284853414354}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-09/segments/1487501170434.7/warc/CC-MAIN-20170219104610-00169-ip-10-171-10-108.ec2.internal.warc.gz"} |
https://econpapers.repec.org/article/kapenreec/v_3a71_3ay_3a2018_3ai_3a2_3ad_3a10.1007_5fs10640-017-0159-y.htm | Does FDI Bring Environmental Knowledge Spillovers to Developing Countries? The Role of the Local Industrial Structure
Lutao Ning () and Fan Wang ()
Lutao Ning: University of London
Fan Wang: University of London
Environmental & Resource Economics, 2018, vol. 71, issue 2, 381-405
Abstract: Abstract This paper examines the environmental knowledge externalities of FDI within and across cities in an emerging economy context. It argues that the extent of these environmental externalities is contingent upon local industrial agglomeration. Using a panel dataset of 280 Chinese prefectural cities from 2003 to 2012, we employ a spatial economic approach. Although limited to evidence from soot and $$\hbox {SO}_{2}$$ SO 2 pollutants, our results suggest that FDI brings overall positive environmental knowledge externalities to a region, and also spillovers to nearby regions. Specialised cities may lock into a particular technological path, attenuating the absorption and diffusion of a variety of FDI environmental knowledge. Conversely, diversified cities promote cross-fertilisation of environmental knowledge and mitigate local pollution intensity at the aggregated city level. This study adds to the literature by highlighting the importance of considering both the spatiality of FDI and industrial structure in understanding FDI environmental knowledge spillovers.
Keywords: Foreign direct investment; Pollution; Industrial agglomeration; Specialisation; Diversity; China (search for similar items in EconPapers)
JEL-codes: L52 O33 O53 R12 R58 (search for similar items in EconPapers)
Date: 2018
References: View references in EconPapers View complete reference list from CitEc
Citations: View citations in EconPapers (1) Track citations by RSS feed
Access to the full text of the articles in this series is restricted.
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text
Ordering information: This journal article can be ordered from
http://www.springer. ... al/journal/10640/PS2 | 2019-12-05 18:18:46 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.17715659737586975, "perplexity": 12461.70753280959}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540481281.1/warc/CC-MAIN-20191205164243-20191205192243-00193.warc.gz"} |
https://proofwiki.org/wiki/Category:Poisson_Distribution | # Category:Poisson Distribution
This category contains results about the Poisson distribution.
Let $X$ be a discrete random variable on a probability space $\struct {\Omega, \Sigma, \Pr}$.
Then $X$ has the Poisson distribution with parameter $\lambda$ (where $\lambda > 0$) if and only if:
$\Img X = \set {0, 1, 2, \ldots} = \N$
$\map \Pr {X = k} = \dfrac 1 {k!} \lambda^k e^{-\lambda}$
It is written:
$X \sim \Poisson \lambda$
## Subcategories
This category has the following 3 subcategories, out of 3 total.
## Pages in category "Poisson Distribution"
The following 15 pages are in this category, out of 15 total. | 2022-08-14 15:16:37 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8062425255775452, "perplexity": 650.7220154516481}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-33/segments/1659882572043.2/warc/CC-MAIN-20220814143522-20220814173522-00300.warc.gz"} |
https://code.tutsplus.com/articles/html5-for-web-designers-book-review--net-13474 | Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From \$16.50/m
# HTML5 for Web Designers: Book Review
Length:MediumLanguages:
HTML5 is all the buzz right now: some people think you need to wait until it's "complete" to use it, while others are pushing the envelope and using what the browsers are supporting right now. If you're not following the HTML5 hype and aren't familiar with what's so exciting, today's book review will give you a great source to turn to: "HTML5 for Web Designers.
It should be obvious what this book is about: HTML5. However, that's a broad, tangential topic. More specifically, HTML5 for Web Designers is supposed to be a super-condensed, easy-reading version of the HTML5 spec, with a huge scoop of practicality stirred in. I've included a few quotes in this review so you can get an idea of what it's all about.
## Who Wrote It?
HTML5 for Web Designers was penned (well, probably typed) by the brilliant Jeremy Keith. If you're not familiar with Jeremy Keith, you've been missing a lot on the web. He's an Irish web developer, the technical director at Clearleft, a web development firm in Brighton, England. He's done a lot of work with Microfomats; for more by Jeremy, you should really check out his blog, Adactio. Mr. Keith was interviewed by Dan Benjamin and Jeffrey Zeldman on the Big Web Show, talking about why the book was written, why Jeremy was chosen to write it, and a lot of other fun stuff.
Listening to that podcast, you'll agree that Jeremy Keith was definitely the right guy to write this book. If you've never read anything by Jeremy Keith before, then a small piece of your web-developer self has yet to be born. Nothing in this book could be more practically explained. The website says it well:
In this brilliant and entertaining user's guide, Jeremy Keith cuts to the chase, with crisp, clear, practical examples, and his patented twinkle and charm.
You have to love all the fun quips Mr. Keith sprinkled in, from the subtle "an array of programmers" to the more obvious "If you ever use the autoplay attribute in this way, I will hunt you down."
## What's In The Book?
1. A Brief History of Markup
2. The Design of HTML5
3. Rich Media
4. Web Forms 2.0
5. Semantics
6. Using HTML5 Today
## Chapter 1: A Brief History of Markup
You might think such a concise book wouldn't have room for a chapter on the venerable past of HTML . . . but you couldn't be farther from the truth. In the very first chapter, Jeremy Keith takes you back to the beginning. He clearly explains the path from HTML 2.0 (there never was a version 1) right up to HTML5, visiting famous stops such as HTML 4, XHTML 1, and XHTML 2. He gives a great explanation of why it's not reasonable to wait for full HTML5 support before using it.
After HTML 4.01, the next revision to the language was called XHTML 1.0. The X stood for "eXtreme" and web developers were required to cross their arms in an X shape when speaking the letter. No, not really. The X stood for "eXtensible" and arm crossing was entirely optional.
## Chapter 2: The Design of HTML5
Before diving into too much nitty-gritty, Keith expains some of the philosophies behind HTML5. Among other things, he explains why the new doctype makes sense (and why doctypes are really irrelevant), what's been removed since HTML4, and how some elements have changed their identities. One of the most interesting parts of this chapter is his explanation of why there are no longer any deprecated elements, only obsolete ones. And don't miss the section on the new JavaScript API; I won't spoil it, but I'll tell you this: fun, fun, fun.
With HTML5, anything goes. Uppercase, lowercase, quoted, unquoted, self-closing or not; it's entirely up to you.
## Chapter 3: Rich Media
I think we'd all agree that the new media offerings in HTML5 are some of the most exciting additions . . . and some of the most controversial. If any of that controversy is caused by a lack of understanding, this chapter will make it all clear. Jeremy very clearly explains all you'd care to know about the canvas, audio, and video tags. He'll steer your through the murky waters of patchy support and poor accessibility and show you how to use these features successfully.
Fortunately, there's a way to use the audio element without having to make a Sophie's Choice between file formats. Instead of using the src attribute in the opening <audio> tag, you can specify multiple file formats using the source element instead.
## Chapter 4: Web Forms 2.0
This chapter is about one of the biggest parts of HTML5: forms. Usually, forms are a rather boring topic: not so in this book. Jeremy will take you through each one of the attributes and types of input, as well as teach you how to check for a browser's support of these new features. You'll be enlightened to read about why HTML5 includes things like native form validation, and whether or not you should style the new UI elements (Well, you can't, but he answer the question "Should you want to?").
I can see why the autofocus attribute has been added to HTML5—it's paving a cowpath—but I worry about the usability of this pattern, be it scripted or native. This feature could be helpful, but it could just as easily be infuriating. Please think long and hard before implementing this pattern.
## Chapter 5: Semantics
This is probably my favourite chapter; to start out, Mr. Keith discusses the issues behind the extensibility of HTML: should you be able to create your own tags, like in XML? Are there other ways to bring meaning to elements? He goes on from there to introduce several of the new elements that HTML5 brings to the table, and shows you how to use them correctly.
Before reading this book, I was somewhat confused about the roles of the new structural elements—things like section and article. Well, colour me enlightened; Jeremy Keith's explanation will make it all clear. If you really want to challenge yourself, read his explanation of HTML5's outline algorithm.
Back in 2005, Google did some research to find out what kind of low-hanging fruit could be found on the cowpaths of the web.
A parser looked at over a billion web pages and tabulated the most common class names. The results were unsurprising. Class names such as "header," "footer," and "nav" were prevalent. These emergent semantics map nicely to some of the new structural elements introduced in HTML5.
## Chapter 6: Using HTML5 Today
It's nice to know all the theories and specs, but can we really use it? today? As you'll see, the short answer is "yes"; the long answer is, well, you'll have to read the book. What's supported? What's can you use now? What workarounds are available? It's all in here, and you'll be up and running in no time.
I hope that this little sashay 'round HTML5 has encouraged you to start exploring this very exciting technology. I also hope that you will bring the fruits of your exploration back to the WHATWG.
## The Summary
It's amazing how much is actually covered on these subjects in only 85 pages. You'll learn everything from the history of HTML to how to correctly use the <b> and <i> tags (eh? yes, their back in HTML5). If you want to "try before you buy," you can check out the first chapter at A List Apart.
Is there anything I'd change in this book? I can't find anything to complain about; both the publishers and the author are individuals known for their amazing quality of work, and HTML5 for Web Designers is just one more testament to their skill.
## Who's the Book For?
If you're a web developer, you'll appreciate this book's practical knowledge and solid explanations of why things are the way they are. If you're primarily an experience designer, this book will give you a good grip on using HTML5 semantically and accessibly. If you're interested in the history of HTML, that's here. And if you just want a small but elegant book for your shelf, look no further.
In sum, if Nettuts+ is one of your regular web stops, you absolutely must buy HTML5 for Web Designers.
Or, what if you've already bought it . . . and read it. If that's the case, how's my analysis? Is there anything about the book that you would change?
HTML is the most important tool a web designer can wield. Without markup, the web wouldn't exist. I find it remarkable and wonderful that anybody can contribute to the evolution of this most vital of technologies. | 2021-07-26 14:01:49 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.2575165033340454, "perplexity": 2047.686202890637}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-31/segments/1627046152129.33/warc/CC-MAIN-20210726120442-20210726150442-00297.warc.gz"} |
https://tsfa.co/questions/Trigonometry?page=266 | Questions
Rank Topic Problem Formatted Problem
26501 Solve for x sec(x+81)=2
26502 Solve for x sec((3x)/2)=-2
26503 Solve for x sec((5x)/4)=2
26504 Solve for x sec(pi/2-u)=csc(u)
26505 Solve for x sec(2x)=(sec(x)^2csc(x)^2)/(csc(x)^2-sec(x)^2)
26506 Solve for x sec(2x+5)=csc(4x-5)
26507 Solve for x sec(3a+20)=csc(7a-30)
26508 Solve for x sec(a)=1.4734213
26509 Solve for x sec(x)-tan(x)sin(x)=cos(x)
26510 Solve for x sin(x)=-0.45
26511 Solve for x sin(2x+3)=cos(x-12)
26512 Solve for x sin(x)- square root of 3cos(x)=1
26513 Solve for x sin(x)=( square root of 2)/6
26514 Solve for x sin(x)=1246/5417
26515 Solve for x sin(x)=2/5
26516 Solve for x sin(x)=(21pi)/4
26517 Solve for x sin(x)=-3/2
26518 Solve for x sin(x)=3/4
26519 Solve for x sin(x)=-3/4
26520 Solve for x sin(x)=( square root of 6)/7
26521 Solve for x sin(x)=-12/13
26522 Solve for x sin(x)=15/25
26523 Solve for x sin(x)=40/50
26524 Solve for x sin(x)=6/5
26525 Solve for x sin(x)=6/8
26526 Solve for x sin(x)=(62sin(47))/70
26527 Solve for x sin(x)=73.2/93.6
26528 Solve for x sin(x)=-8/17
26529 Solve for x sin(x)=- square root of 3
26530 Solve for x sin(x)=x/100
26531 Solve for x sin(30)=5/x
26532 Solve for x sin(315)=x/12
26533 Solve for x sin(32)=x/28.31
26534 Solve for x sin(3x)+sin(x+pi/2) = square root of 3sin(x+pi/4)
26535 Solve for x sin(3x)=cos(3x)
26536 Solve for x sin(3x)=sin(2x+x)
26537 Solve for x sin(3x)-1=1/2
26538 Solve for x sin(3x)cos(x)-cos(3x)sin(x)=( square root of 2)/2
26539 Solve for x sin(45)=10/x
26540 Solve for x sin(48)=7/x
26541 Solve for x sin(4x)=-1.2x+1
26542 Solve for x sin(63.5)=5.432/x
26543 Solve for x sin(70)cos(x)-cos(70)sin(x)=( square root of 3)/2
26544 Solve for x sin(a)=0.43
26545 Solve for x sin(A)=( square root of 13)/7
26546 Solve for x sin(A)=(2mn)/(m^2-n^2)
26547 Solve for x sin(A)=5/9
26548 Solve for x sin(a-60)=-( square root of 3)/2
26549 Solve for x sin(B+15)=cos(2B+30)
26550 Solve for x sin(c)=0.8387
26551 Solve for x -sin(pix)=1
26552 Solve for x sin(x)- square root of 3cos(x)=0
26553 Solve for x in Radians tan(x)=1
26554 Solve for x sin(x)=0.19
26555 Solve for x sin(x)=-0.4
26556 Solve for x sin(x)=-0.456
26557 Solve for x y=1/7*sin(x)
26558 Solve for x y=3/5*sin(x)
26559 Solve for y y=arccos(-0.3)
26560 Solve for y y = log base 2 of 16
26561 Solve for y y = log base 4 of 1/2
26562 Solve for x y=tan(6x)^2
26563 Solve for x y=x^2+8x+25
26564 Solve for x y=x^2cos(x)
26565 Solve for x y=2x^2+5x-3
26566 Solve by Graphing sin(theta)^2-4(cos(-theta)-1)=0
26567 Solve for x y=2sec(x+1)
26568 Solve for x y=2sin(1/3x)
26569 Solve for x y=2sin(3x)
26570 Solve for x y=3-x^2
26571 Solve for x y=3cos(x-pi)-4
26572 Solve for x y=-3sin(1/2x)
26573 Solve for x y=-csc(2x)
26574 Solve for x y=sec(pix)
26575 Solve for x y=-tan(1/2x)
26576 Solve for @VAR z=2i
26577 Graph sin(theta)<0 , cos(theta)>0 ,
26578 Solve for @VAR z=-6
26579 Solve for x 2cos(X) = square root of 3
26580 Solve for x (cos(x)^2-sin(x)^2)^2=2sin(x)*cos(x)
26581 Solve for x (h^2-16h+64)+(k^2-12k+36)=100
26582 Solve for x ((sin(s-t))/(sin(t)))+((cos(s-t))/(cos(t)))=(sin(s))/(sin(t)cos(t))
26583 Solve for x (x^2+3x) natural log of 10=0
26584 Solve for x (x^4+5x^2-36)(2x^2+9x-5)=0
26585 Solve for x (1-cos(x)^2)cot(x)=sin(x)cos(x)
26586 Simplify Using Half-Angle Formula tan(67.5 degrees )
26587 Solve for x tan(x)=(sin(3x)-sin(x))/(cos(3x)+cos(x))
26588 Find the Cotangent Given the Point (-1/2,-( square root of 3)/2)
26589 Solve for x tan(x)=cot(2x)
26590 Solve for x tan(x)=csc(2x)-cos(2x)
26591 Solve for x tan(x)=sin(x)
26592 Find the Coterminal Angle (17pi)/6
26593 Solve for @VAR v=-3i-j
26594 Solve for @VAR v=8i
26595 Solve for x x(n)=3n-4
26596 Solve for x x- square root of 4x-4=4
26597 Solve for x -x+2y-3z+6=0
26598 Solve for x x=|8y|
26599 Solve for x x=4.4
26600 Solve for x tan(x)=pi
MathMaster requires javascript and a modern browser. | 2022-09-29 05:10:47 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8252721428871155, "perplexity": 7315.929259027576}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-40/segments/1664030335304.71/warc/CC-MAIN-20220929034214-20220929064214-00787.warc.gz"} |
https://plosjournal.deepdyve.com/lp/de-gruyter/homotopy-invariance-of-the-cyclic-homology-of-a-algebras-under-qwGZEfxPHV | # Homotopy invariance of the cyclic homology of A ∞-algebras under homotopy equivalences of A ∞-algebras
Homotopy invariance of the cyclic homology of A ∞-algebras under homotopy... AbstractIn the present paper, the cyclic homology functorfrom the category of A∞{A_{\infty}}-algebras over any commutativeunital ring K to the category of graded K-modules isconstructed. Further, it is shown that this functor sendshomotopy equivalences of A∞{A_{\infty}}-algebras into isomorphismsof graded modules. As a corollary, it is stated that the cyclichomology of an A∞{A_{\infty}}-algebra over any field is isomorphic tothe cyclic homology of the A∞{A_{\infty}}-algebra of homologies forthe source A∞{A_{\infty}}-algebra. http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Georgian Mathematical Journal de Gruyter
# Homotopy invariance of the cyclic homology of A ∞-algebras under homotopy equivalences of A ∞-algebras
, Volume 28 (6): 22 – Dec 1, 2021
22 pages
/lp/de-gruyter/homotopy-invariance-of-the-cyclic-homology-of-a-algebras-under-qwGZEfxPHV
Publisher
de Gruyter
© 2021 Walter de Gruyter GmbH, Berlin/Boston
ISSN
1572-9176
eISSN
1572-9176
DOI
10.1515/gmj-2021-2098
Publisher site
See Article on Publisher Site
### Abstract
AbstractIn the present paper, the cyclic homology functorfrom the category of A∞{A_{\infty}}-algebras over any commutativeunital ring K to the category of graded K-modules isconstructed. Further, it is shown that this functor sendshomotopy equivalences of A∞{A_{\infty}}-algebras into isomorphismsof graded modules. As a corollary, it is stated that the cyclichomology of an A∞{A_{\infty}}-algebra over any field is isomorphic tothe cyclic homology of the A∞{A_{\infty}}-algebra of homologies forthe source A∞{A_{\infty}}-algebra.
### Journal
Georgian Mathematical Journalde Gruyter
Published: Dec 1, 2021
Keywords: Cyclic homology; 55U10; 18G30; 55U43 | 2022-05-17 01:01:10 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8831734657287598, "perplexity": 4104.954475011711}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652662515466.5/warc/CC-MAIN-20220516235937-20220517025937-00616.warc.gz"} |
https://blender.stackexchange.com/questions/7272/how-to-pass-color-value-from-input-to-output-in-custom-python-node | # How to pass color value from input to output in custom python node
I want to make custom node that can be used in compositing nodes. I stuck in part when I need to pass color value (and do some operation on that) from input to output socket.
def init(self, context):
inp = self.inputs.new('NodeSocketColor', "Input 1")
inp2 = self.inputs.new('NodeSocketColor', "Input 2")
out = self.outputs.new('NodeSocketColor', "Out")
out2 = self.outputs.new('NodeSocketColor', "Out 2")
1. I don't know how to set up links (inp -> out, inp2 -> out2). Outputs are always connected to the first input socket.
2. How to change value before outputting.
From the code above I'm not exactly sure how to give a contextually direct solution, but in an attempt to help move along the issue...
1. Set up a node tree reference:
tree = bpy.context.scene.node_tree
2. Set up a link reference:
your_links = tree.links
your_link = your_links.new(your_node.outputs[0],another_node.inputs[0])
your_node.inputs[0].default_value = 0.3 | 2019-12-09 08:27:44 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.18774616718292236, "perplexity": 3519.8337760095383}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540518337.65/warc/CC-MAIN-20191209065626-20191209093626-00162.warc.gz"} |
https://stats.stackexchange.com/questions/411624/inter-rater-agreement-for-non-fully-crossed-designs | # Inter-rater agreement for non-fully crossed designs
I have a set of n subjects to be rated by i raters on a categorical scale that distinguishes k classes. Both the subjects and the raters are randomly sampled from a larger population of subject and raters. Each subject is rated by exactly m raters; however, different raters may rate different subjects. Thus, I have a non-fully crossed design where all subjects are rated by a fixed number of m multiple raters. Dummy data is shown in the image below; the uppercase letters in the cells are the categorical ratings assigned by raters to subjects.
I want to calculate inter-rater agreement; the overall aim of the study is to validate the rating system (the categorical scale of size k), i.e. assess its generalisability to other subjects and rathers from the same populations.
Now the question is: Which inter-rater agreement measure is the most appropriate one? Intraclass correlaction (ICC) is not an option because it is not suitable for categorical data. Cohen's kappa is also not an option, because it is only suitable for fully-crossed designs with exactly two coders, i.e. only if all raters rate all the subjects (see https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3402032/#!po=50.0000).
The most viable candidate seems to be Fleiss' kappa, because it is suitable for studies where any constant number of m coders is randomly sampled from a larger population of coders, with each subject rated by a different sample of m coders (see https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3402032/#!po=50.0000). But is it suitable given that not only the raters but also the subjects are sampled randomly? Besides that, what if I choose to use only two raters (m = 2), can Fleiss' kappa still be applied? There is conflicting information as to the minimum number of raters for Fleiss' kappa, e.g. "three or more raters" (https://www.statisticshowto.datasciencecentral.com/fleiss-kappa) vs. "any number of raters" (https://en.wikipedia.org/wiki/Fleiss%27_kappa).
Besides that, Krippendorff's alpha seems to be an alternative because it generalizes several inter-rater agreement statistics. However, I have also read that it is "more suitable when problems are posed by missing data in fully crossed designs" (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3402032/#!po=50.0000), so I am not sure if I can use it in the non-fully crossed design.
You can use generalized or "design-independent" formulas for chance-adjusted agreement. These will accommodate the fact that you have a non-crossed design. You can calculate these in R by replacing your empty cells with NA and providing the matrix to the cat_adjusted() function in my agreement package. | 2020-02-23 16:41:34 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7372039556503296, "perplexity": 1863.591742006709}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-10/segments/1581875145818.81/warc/CC-MAIN-20200223154628-20200223184628-00056.warc.gz"} |
http://mathhelpforum.com/calculus/128934-find-b.html | # Thread: find a and b
1. ## find a and b
Let f(x) = A sin ((2pi/B)*X)
.The graph of this function has a tangent line with a slope of 4
at the point (B/8 , 1)
find the exact values of a and b
so for a i put in B/8 for x and 1 for y and cancled out the b's and got
a= 1/sin(pi/4)
then for b do i find the derivative and make that = 4?
or is b infinate?
2. Originally Posted by valvan
Let f(x) = A sin ((2pi/B)*X)
.The graph of this function has a tangent line with a slope of 4
at the point (B/8 , 1)
find the exact values of a and b
so for a i put in B/8 for x and 1 for y and cancled out the b's and got
a= 1/sin(pi/4)
then for b do i find the derivative and make that = 4?
or is b infinate?
That's a good start and looks ok. Remember that $\sin \left(\frac{\pi}{4}\right) = \frac{1}{\sqrt2}$ and hence $\csc \left(\frac{\pi}{4}\right) = \sqrt{2}
$
$f'(x) = 4$
$\frac{d}{dx} \left[ \sqrt2 \sin \left(\frac{2\pi x}{B}\right) \right]$
$= \frac{2 \pi \sqrt{2} }{B} \cos \left(\frac{2\pi x}{B}\right) = 4$
It appears you'll need to use an iterative method | 2017-04-24 07:31:16 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 5, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6164740324020386, "perplexity": 902.4921045340357}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-17/segments/1492917119120.22/warc/CC-MAIN-20170423031159-00229-ip-10-145-167-34.ec2.internal.warc.gz"} |
https://www.zbmath.org/?q=an%3A0568.46055 | ## Leading large order asymptotics for $$(\phi ^ 4)_ 2$$ perturbation theory.(English)Zbl 0568.46055
Let $$B(t)=\sum^{\infty}_{k=0}a_ kt^ k/k!$$ for $$t$$ in a disk of non-zero radius $$R$$ be a representation of the Borel transform, $S(\phi)=\int_{\mathbb R^ 2}[(\nabla \phi)^ 2(x)+\phi^ 2(x)]\,d^ 2x- \ell n\int_{\mathbb R^ 2}\phi^ 4(x)\,d^ 2x$ where $$\phi \in W^{1,2}(\mathbb R^ 2)$$. The main result of the paper is as follows:
Let $$R$$ be a radius of convergence of the Borel transform. Then $R^{-1}=\lim_{k\to \infty}| a_ k/k!|^{1/k}=\exp [-\inf_{\phi \in W^{1,2}(\mathbb R^ 2)}S(\phi)+2].$
Reviewer: Yu. V. Kostarchuk
### MSC:
81T08 Constructive quantum field theory 46N50 Applications of functional analysis in quantum physics 81Q15 Perturbation theories for operators and differential equations in quantum theory 41A50 Best approximation, Chebyshev systems
Full Text:
### References:
[1] Lipatov, L. N.: Calculation of the Gell-Mann-Low function in scalar theory with strong non-linearity. Sov. Phys. JETP44, 1055-1062 (1976); Divergence of the perturbation-theory series and pseudoparticles. JETP Lett.25, 104-107 (1977); Divergence of the perturbation-theory series and the quasi-classical theory. Sov. Phys. JETP45, 216-223 (1977) [2] Brezin, E., LeGuillou, J. C., Zinn-Justin, J.: Perturbation theory at large order. I. The ?2N interaction. Phys. Rev.D15, 1544-1557 (1977) [3] Brézin, E., LeGuillou, J. C., Zinn-Justin, J.: Perturbation theory at large order. II. Role of the vacuum instability. Phys. Rev.D15, 1558-1564 (1977) [4] Brézin, E., Parisi, G., Zinn-Justin, J.: Perturbation theory at large orders for a potential with degenerate minima. Phys. Rev.D16, 408-412 (1977) [5] Simon, B.: Large orders and summability of eigenvalue perturbation theory: a mathematical overview. Int. J. Q. Chem.21, 3-25 (1982) [6] LeGuillou, J. C., Zinn-Justin, J.: Critical exponents for the n-vector model in three dimensions from field theory. Phys. Rev. Lett.39, 95-98 (1977) [7] Brézin, E., Parisi, G.: Critical exponents and large-order behaviour of perturbation theory. J. Stat. Phys.19, 269-292 (1978) [8] LeGuillou, J. C., Zinn-Justin, J.: Critical exponents from field theory. Phys. Rev.B21, 3976-3998 (1980) · Zbl 0978.82507 [9] Guerra, F., Rosen, L., Simon, B.: Boundary conditions in the P(?)2 Euclidean field theory. Ann. Inst. H. Poincaré Sect.A25, 231-334 (1976) [10] Jaffe, A.: Divergence of perturbation theory for Boson. Commun. Math. Phys.1, 127-149 (1965) · Zbl 0127.19706 [11] Eckmann, J.-P., Magnen, J., Sénéor, R.: Decay properties and Borel summability for the Schwinger functions inP(?)2 theories. Commun. Math. Phys.39, 251-271 (1975) [12] Spencer, T.: The Lipatov argument. Commun. Math. Phys.74, 273-280 (1980) [13] Herbst, I. W., Simon, B.: Some remarkable examples in eigenvalue perturbation theory. Phys. Lett.B78, 304-306 (1978) [14] Simon, B.: The P(?)2 Euclidean (quantum) field theory. Princeton: Princeton University Press 1974 · Zbl 1175.81146 [15] Glimm, J., Jaffe, A.: Quantum physics. Berlin, Heidelberg, New York: Springer 1981 · Zbl 0461.46051 [16] Breen, S.: Large order perturbation theory for the anharmonic oscillator. Thesis (Rutgers University, 1982), and preprint [17] Adams, R.: Sobolev spaces. London, New York: Academic Press 1975 · Zbl 0314.46030 [18] Ambrosetti, A., Rabinowitz, P. H.: Dual Variational Methods in Critical point Theory and Applications. J. Funct. Anal.14, 349-381 (1973) · Zbl 0273.49063 [19] Strauss, W. A.: Existence of solitary waves in higher dimensions. Commun. Math. Phys.55, 149-162 (1977) · Zbl 0356.35028 [20] Morrey, C. Jr.: Multiple integrals in the calculus of variations. New York: Springer 1966 · Zbl 0142.38701 [21] Simon, B.: Trace ideals and their applications. London, New York: Cambridge University Press 1979 · Zbl 0423.47001 [22] Brydges, D., Fröhlich, J., Seiler, E.: Construction of quantized gauge fields. II. Convergence of the lattice approximation. Commun. Math. Phys.71, 159-205 (1980)
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching. | 2022-07-03 02:35:16 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6630463004112244, "perplexity": 6641.5170873256475}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-27/segments/1656104209449.64/warc/CC-MAIN-20220703013155-20220703043155-00036.warc.gz"} |
https://answerriddle.com/the-question-which-of-these-countries-has-two-independence-days/ | # The Question: Which of these countries has two independence days?
The Question: Which of these countries has two independence days?
France
Sweden
Lithuania
South Korea | 2021-07-30 10:35:13 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9672583341598511, "perplexity": 4030.484130528812}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-31/segments/1627046153966.52/warc/CC-MAIN-20210730091645-20210730121645-00439.warc.gz"} |
https://mathoverflow.net/questions/133297/what%C2%B4s-essential-to-learn-about-complex-spaces-and-several-complex-variables-for/137326 | # What´s essential to learn about complex spaces and several complex variables for an algebraic geometer?
Hi, I don´t know if this question is suitable for this site. The field of several complex variables is too broad, so I would like to know what´s essential to learn about complex spaces and several complex variables for an algebraic geometer? Any references?
• Griffiths-Harris: "Principles of algebraic geometry", Voisin: "Hodge theory and complex algebraic geometry", Huybrechts: "Complex geometry". The material covered in these books is more than enough in order to get started. – Francesco Polizzi Jun 10 '13 at 13:45
• Just this Francesco? :p – diverietti Jun 10 '13 at 21:20
• I said "to get started" :-) – Francesco Polizzi Jun 11 '13 at 8:36
• Instead of Huybrechts: "Complex geometry". it think chern's complex manifolds without potential theory is where he copies from most of the stuff! – Koushik Jul 12 '14 at 7:58
The basic yoga of positivity in complex geometry is that ampleness of a line bundle $L$ is equivalent to the positivity of the curvature form of a smooth hermitian metric on $L$. This allows us to treat global algebraic questions involving ampleness and cohomology by looking at pointwise estimates of positive differential forms on our manifold. Once there, all of the machinery of Riemannian and complex geometry is available and hard global questions get converted into extremely computationally messy problems of linear algebra. For certain things, like cohomology of adjoint bundles $K_X \otimes L$, these methods work very well, for others they work less well or not at all, but it's always good to have another tool with which to attack problems. | 2018-11-19 18:41:06 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4825132489204407, "perplexity": 352.813366630125}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-47/segments/1542039746061.83/warc/CC-MAIN-20181119171420-20181119193420-00450.warc.gz"} |
https://www.nature.com/articles/srep01467?error=cookies_not_supported | ## Introduction
The portrait of a network divided into a dense core and a sparse periphery originated a few decades ago from scholars in economics and social sciences1,2,3, where such a dichotomy is of utmost importance to explain unequal economic growth and development among countries. But the same paradigm is undoubtedly crucial in other fields too, e.g., in communication networks4,5,6 or biology7,8,9, namely wherever one is aimed at revealing whether there exists a central core through which most of the network flow passes. This issue has clearly important connections with the many notions of node centrality10 although, when dealing with core-periphery, attention is mostly paid on the overall network structure rather than on the features of the individual nodes.
Following the seminal work by Borgatti and Everett11, network scientists have formalized several methods to check whether a given network is actually featuring a core-periphery structure, or some form of generalized representation (e.g., core-semiperiphery-periphery) and to properly assign each node to the relevant subnetwork8,12,13. Block-modeling approaches postulate a discrete network partition in two (i.e., core-periphery) or more blocks, with consequent constraints on the links allowed (i.e., periphery nodes cannot communicate each other). The fitness of such a model to network data is then assessed11,13. Other methods are aimed at defining a global, numerical indicator of core-periphery separation, based on the remark that core nodes should have large closeness centrality, i.e., small average distance from the rest of the network8,12.
We propose a technique which avoids an explicit (and often artificial) partition in subnetworks, like block-modeling requires and does not rely on any notion of distance, which is not univocally defined and is therefore ambiguous, in the important case of weighted networks. We associate a core-periphery profile to the network, namely a discrete, non-decreasing function α1, α2, …, αn (n is the number of nodes) that: provides a graphical portrait of the network structure; induces a numerical indicator quantifying to what extent an actual centralization exists; assigns a coreness value to each node. Thanks to the latter property, we introduce the generalized notion of α-periphery by grouping all nodes with coreness below a prescribed threshold α. The core-periphery profile is derived by a standard random walk (Markov chain) model and can be obtained in a very general modeling framework (directed and weighted networks).
In the paper, we first introduce the iterative algorithm that yields the core-periphery profile (leaving all technical details to the Methods section and to the Supplementary Information file). This paves the way to introducing an overall network centralization index and a notion of node coreness. By means of several examples, mostly based on real-world networks data, we show how the set of tools we have introduced allows one in classifying the overall core-periphery network structure. Moreover, it can reveal the peculiar role of some specific nodes, providing information which is complementary to, but independent from, other measures of node-centrality.
## Results
Let wij be the weight of the edge ij in a (possibly) directed, strongly connected10,14 network with nodes N = {1, 2, …, n}. At each (discrete) time step, a random walker which is in node i jumps to j with probability . Let πi > 0 be the asymptotic probability of visiting node i, i.e., the fraction of time steps spent on i. Given a subnetwork S (defined by the node subset with all the edges of the original network linking pairs of nodes in S), the persistence probability αS denotes the probability that a random walker which is currently in any of the nodes of S remains in S at the next time step. It is thus a measure of cohesiveness and, indeed, it proved to be an effective tool for finding and testing the community structure of networks15. The value of αS can be made explicit (see Methods) as
If the network is undirected, π has the closed form solution , where is the strength of node i (see Methods), so that the above expression simplifies to , i.e., the fraction of the weight emanating from the nodes of S remaining within S. Note that αS = 0 when S contains a single node (provided self-loops are ruled out), whereas αS = 1 when S is the entire network.
### Core-periphery profile
In a network with ideal core-periphery structure11, peripheral nodes (p-nodes) are allowed to link to core nodes only, namely no connectivity exists among p-nodes. This implies that αS = 0 for any subnetwork S composed of p-nodes only, since a random walker is constrained to immediately escape from the set of p-nodes. This suggests a strategy to identify the periphery: find the largest subnetwork with zero persistence probability. In most real-world networks, however, the structure is not ideal although the core-periphery structure is evident: a weak (but not null) connectivity exists among the peripheral nodes. This calls for the generalized definition of α-periphery, which denotes the largest subnetwork S with αS ≤ α: a random walker which is in any of the nodes of the α-periphery, will escape, at the next step, with probability 1 – α.
For a general network, finding the α-periphery falls in a class of problems known to be computationally untractable16. We propose a heuristic algorithm to find, for any given α, an approximation of the α-periphery. We start by the node i with weakest connectivity (see Methods) and generate a sequence of sets by adding, at each step, the node attaining the minimal increase in the persistence probability. Correspondingly, we obtain the core-periphery profile, that is the sequence 0 = α1 ≤ α2 ≤ … ≤ αn = 1 of the persistence probabilities of the sets Pk. It is a non-decreasing sequence, as formally stated in the Methods section and proved in the Supplementary Information. We then take the largest Pk such that αk ≤ α as our approximation of the α-periphery.
Although heuristic, the above “greedy” algorithm has a convincing rationale (and it provides a good approximation in small networks where the exact α-periphery can be computed – see Supplementary Information). We start from the least connected node because typically peripheral nodes have less connections than core nodes. Then we grow our periphery set by adding one node at a time, trying to keep it as disconnected (or weakly connected) as possible, as a periphery should be. We use the persistence probability to quantify this. While growing the periphery set, we will typically leave the inclusion of the most connected nodes to the last steps, since they would otherwise sharply enhance connectivity. Indeed, highly connected nodes are typically found at the core of the network.
Figure 1a displays the core-periphery profile of four types of artificial networks (see Supplementary Information for details), highlighting the inherent diversity in their structure. The limiting cases are: the pure star network (one center node, n – 1 peripheral nodes connected to the center only) for which α1 = … = αn–1 = 0, αn = 1; and the complete (unweighed, undirected, all-to-all) network, with no core-periphery structure by definition, for which αk grows linearly as αk = (k – 1)/(n – 1) (see Methods). The Erdős-Rényi and Barabási-Albert networks10,14 stand in the middle, with the former more similar to a complete network and the latter displaying a rather stronger core-periphery characterization17.
### Centralization and coreness
The above algorithm provides, as byproducts, two other important tools of analysis. The first one is a measure of core-periphery centralization (cp-centralization) C that naturally descends from the profile of Fig. 1a. Here we consider a network to be the more centralized, the more its core-periphery profile αk is similar to that of the star network. We can therefore quantify such a similarity by measuring the area between the αk-curve of a given network and that of the star network and normalizing (see Methods) to assign C = 1 to the star network itself (maximal centralization) and C = 0 to the complete network (no centralization). If we randomly generate 103 instances of Erdős-Rényi and Barabási-Albert networks, we obtain the distributions of C reported in Fig. 1b, whose mean values are C = 0.490 and C = 0.668, respectively.
If a network displays a definite core-periphery structure (large C), then the sequence αk naturally provides a measure of coreness of each node. Indeed, nodes are iteratively selected to build the sets Pk starting from the more peripheral and terminating with the most central ones. Thus, αk can be naturally regarded as a measure of coreness of the node inserted at step k. We have αk = 0 for all p-nodes (the periphery in the strict sense), whereas the coreness of the last inserted node is maximal and equal to αn = 1. Note, however, that such an αk-ranking is not relevant when the cp-centralization C is small, since in that case nodes are selected in a more or less random order (as for the complete network).
Figure 2a displays the core-periphery profile of a number of networks (see Supplementary Information for details). The social network describing the interactions within a troop of monkeys11 seems not to display any significant core-periphery structure. Indeed, it is not very different from a complete network, as testified by the αk-curve (C = 0.261) and by the graph itself (panel b). The situation is different with Zachary's karate club network18, having C = 0.709 and featuring 20 p-nodes over 34, i.e., a large periphery even if intended in the strict sense (panel c). The remaining profiles refer to networks that reveal a larger and larger level of core-periphery characterization. They are: the netscience network19, which describes the coauthorships (up to 2006) of scholars working on network science (C = 0.645); the protein-protein interaction network of Saccharomyces cerevisiae7 (C = 0.768); the international network of airports20,21 (C = 0.824); the Internet at the level of autonomous systems10,22 (C = 0.942); and the neural network of the worm Caenorhabditis elegans23 (C = 0.940). They all reveal a very broad periphery, as the number of p-nodes ranges from about 45% to 85% of n.
The statistical significance of the above results can be assessed by comparing the values obtained for the cp-centralization C with those resulting from a procedure of network randomization. For each network under scrutiny (Fig. 2a), we generate 100 randomizations which preserve the in- and out-strength of each node i (the in- and out-degree, if the network is unweighed - see Methods). For that, we use a standard switching method24 or, when needed, its extension to weighted networks25. For each randomization, we compute the cp-centralization Crand. Then we compare the C value of the original network with the statistics of the Crand values, obtaining the z-score
A large value of z indicates that the network under scrutiny has a significant, non-random core-periphery structure. As a matter of fact, given that a very mild (if not even null) connectivity exists among peripheral nodes in a network with strong core-periphery characterization, such a feature should be partially destroyed by randomization, resulting in a strong decrease of the corresponding Crand. Table 1 reveals that, in most cases, those networks which have larger C tend also to have larger mean(Crand) and larger z. The large mean(Crand) reveals that the entire ensemble of randomized networks, where edge shuffling can only be partial since individual node strength must be preserved, has a rather large centralization for structural reasons. But the large z reveals that the specific real-world network, which has been shaped by social, biological or technological forces, is much more peculiar than its random counterparts, as it displays a significantly much larger cp-centralization C.
### Weighted networks
Weights associated to edges may have a crucial role in determining the core-periphery structure, adding much information to the pure topological (i.e., binary) structure. The world trade network (wtn), which models the flows of commodities among countries26,27, is a case in point. In 2008 its largest connected component includes virtually all world countries (n = 181) and has a very large density (65% of the possible pairwise connections are active). As a consequence, its core-periphery profile does not substantially differ from that of a complete network (C = 0.349) if weights are ignored, since most countries trade with most of their potential partners (see Fig. 3a). However, countries (and their pairwise connections) are extremely diversified if weights are accounted for: import flows (in US dollars) range from 160 × 106 for Tonga to 2 × 1012 for the United States. Consequently, the weighted network displays a strong core-periphery characterization (C = 0.819), with a very small core composed of those few countries most of the world trade flow passes through. Indeed, the world map of Fig. 3b highlights that only very few countries have large coreness values (only United States, Germany, China, France, United Kingdom, Japan, Italy and the Netherlands, in order, have αk > 0.5).
### Core-periphery profile and k-shell decomposition
It is instructive to compare the technique of core-periphery profiling, above introduced, with k-shell (or k-core) decomposition6,28,29, a widely used method aimed at partitioning a network in layers, from the external to the more central ones. We first compare the two approaches on the toy-network of Fig. 4 (a slight modification of a previously discussed example30): we will see that the same peculiarities emerging from this example will be found in real-world networks too.
Assume the network is undirected and binary: in the k-shell decomposition, we begin by putting in the 1-shell the degree-1 nodes, as well as, recursively, those having degree 1 after removal of the former. Similarly, we put in the 2-shell the nodes with degree 2 after removal of the 1-shell, as well as, recursively, those having degree ≤ 2 after removal of the former and so on. In the network of Fig. 4, three shells are found moving from the less connected nodes to those with largest connectivity (see panel a). The method can be extended to weighted networks30 by replacing the degree di with a weighted degree which reinforces nodes with large strength σi. In Fig. 4a, for example, if the link AB is given a weight wAB = 3 while keeping all the others to 1, then node B moves from the 1- to the 2-shell, highlighting the stronger tie with the most central group of nodes30.
The classification obtained by core-periphery analysis is qualitatively similar for most nodes, but a few important differences exist (Fig. 4b). First, node B is qualified as a p-node (αk = 0) regardless of wAB. Second, despite its rather large degree, node C is classified as a p-node too. These two apparent “anomalies” are, however, fully consistent with the block-modeling paradigm put forward by Borgatti and Everett11, according to whom the standard pattern of connection is that “core nodes are adjacent to other core nodes, core nodes are adjacent to some periphery nodes and periphery nodes do not connect with other periphery nodes” (p. 377-378). Thus B is peripheral because its only connection, regardless of the weight, is with a core node: as such, it is excluded from any relevant transmission of information. Perhaps surprisingly, C is peripheral too: but it is connected to core nodes only and thus, despite its rather large connectivity, it essentially fails in bridging core and periphery.
We find similar features if we move to real-world networks. The graph of Fig. 5a illustrates the k-shell decomposition of the karate network (see Supplementary Information) and it should be directly compared with the graph of Fig. 2c to assess the role of each node. The two methods give consistent classifications “on average”, as testified by the trend highlighted in Fig. 5b, but many nodes are ranked rather differently from the two methods, for the reasons above discussed. The same type of results emerge if we analyze a medium-scale network (n = 1458) such as the ppi (see Fig. 2 and Supplementary Information), as put in evidence in Fig. 5c. Again, besides the overall consistency between the results of the two methods, we find nodes with large k-coreness ki (i.e., the shell to which the node belongs) but small αi, as node C in Fig. 4. But here we find the opposite too, namely nodes belonging to the external k-shells but having large αi: they are similar to node D in Fig. 4, which plays the important role of organizing center of a rather peripherical subnetwork. In summary, k-shell decomposition and core-periphery profiling appears to be capable of providing independent information in classifying the role and rank of nodes.
### Revealing anomalous nodes
Using now the wtn as an example, we present further results in order to stress the capability of the core-periphery profile to highlight peculiarities in the role of some specific nodes. For each node i, we consider its ranking according to two different indicators, namely the strength σi, which represents in this example the country's total trade volume and the coreness αi above defined. Figure 6 compares the two rankings (panel a): anomalous nodes are those far from the bisectrix and, among them, economically relevant are obviously those with top σ-rankings (lower-left corner, magnified in panel b).
The most striking anomaly is Mexico, which is 14th in the σ-ranking but only 121st in α-ranking. As a matter of fact, Mexico devotes 62% of its trade to United States (the second partner being China with 6% only). Despite its large trade amount, Mexico is thus a peripheral country since, simplifying the picture, it is connected to one single core node, similarly to node B in the network of Fig. 4b. Canada and Switzerland, also highlighted in Fig. 6b, are examples of a less definite anomalous role. They are 9th and 20th in the σ-ranking, respectively, but fall to 34th and 46th positions in the α-ranking. For Canada the situation is the same as Mexico, with a strong bias towards the United States. The strongest relationships of Switzerland, instead, are shared among four core countries, i.e., Germany, Italy, France and U.S.: thus the role of Switzerland is comparable to that of node C in the network of Fig. 4b.
It is instructive to compare the above results with those given by another sort of network profiling, i.e, rich-club analysis25,31, which is aimed at disclosing the tendency of nodes with large strength to form tightly interconnected subnetworks. For weighted, directed networks, we straightforwardly adapt the definition of Zlatic et al.25 in defining, for a given strength σ, the rich-club coefficient as the density of the subnetwork induced by the nodes with σi > σ:
In the above equation, n is the number of nodes with σi > σ and E is the number of edges connecting them. The function Φ(σ), that we denote as rich-club profile, is defined over the interval σmin = miniσi ≤ σ ≤ maxiσi ≤ σmax; it is discontinuous at each σ = σi and we let conventionally Φ(σ) = 1 for n ≤ 1. Figure 6c displays the rich-club profile for the wtn case. The final plateau (with Φ(σ) very close to 1) includes about 30 nodes, which correspond to a rich-club of countries forming an almost complete (all-to-all) trading network. Canada, Mexico and Switzerland are among them: this means that this type of network profiling hides their (semi-)peripheral topological role, not distinguishing them from the other members of the rich-club, mostly with a definite core position. We close by displaying two more (σ, α)-ranking plots, related to the netscience and airports networks (see Fig. 2 and Supplementary Information). The plots, which are in Fig. 7, confirm that the existence of anomalous nodes (large strength, small coreness) is not a feature of the wtn only, but is likely to be ubiquitous in medium/large scale, real-world networks. We report that we revealed the same anomalies when comparing the α-ranking to centrality measures other than the strength σi, namely closeness and betweenness centrality (with the standard mapping wij → 1/wij for weighted networks) and PageRank (which is equivalent to σi for undirected networks and strongly correlated for directed ones32).
## Discussion
The case-studies above discussed have shown that the core-periphery network structure can effectively be assessed by elaborating the information provided by a random walk (Markov chain) model. This provides both a global network portrait and an individual characterization (coreness) of each node.
The results highlight the complementarity between the core-periphery and other types of network profiling, such as k-shell decomposition or rich-club analysis. As a matter of fact, the peculiar role of some specific nodes can be revealed, providing information which shows to be independent from other measures of node-centrality. Moreover, the introduced coreness indicator is unambiguously defined in the general framework of directed, weighted networks, whereas other centrality measures which are often related to core-periphery analysis are not (for example, average distance or betweenness depend on the weight-to-distance mapping which is used). For these reasons, the core-periphery profile deserves to enter the toolbox of the network analyst, to back up other profiling tools (e.g., k-shell decomposition, rich-club analysis) devoted to assess both the global network structure and the role of each single node.
## Methods
### Persistence probabilities
We consider (possibly) directed, strongly connected10,14, n-node networks with weight matrix W = [wij], i.e., wij > 0 denotes the weight of the edge ij, which is set to 1 when the network is binary (i.e., unweighed), while wij = 0 if the edge ij does not exist. We assume there are no self-loops, namely wii = 0 for all i = 1, 2, …, n. For a directed network, we denote by and , respectively, the in- and out-strength of node i and by the (total) strength. In the case of undirected network, we simply define the strength as . Notice that in-, out- and total strength reduce to the in-, out- and total node degree (, and di) if the network is binary.
The standard description of the discrete-time evolution of a random walker on the network assumes that, at each time step, is the probability that a random walker which is in node i jumps to j, so that the probability πi,t of finding the walker in node i at time t is governed by the n-state Markov chain πt+1 = πtM, with πt = (π1,t π2,t … πn,t). Since connectedness implies that M is an irreducible matrix, the stationary probability distribution π = πM is unique and strictly positive33. For an undirected network it has the closed form . For directed networks, the stationary probability distribution π is computed, in principle, by routinely solving the n × n linear system π = πM or by iterating πt+1 = πtM until convergence33. Both methods become challenging for very large networks, although the sparsity of M can be exploited. Note that the problem is essentially equivalent to the computation of the PageRank centrality34, for which a large body of research is currently active, with new approaches including, e.g., decentralized and/or randomized techniques35,36. This is out of the scope of the present work, however: for our purpose, we assume that the vector π has been computed with a suitable method. In our case studies (see Supplementary Information) we used the standard Matlab routines for linear systems solution.
Let us now partition the node set N = {1, 2, …, n} into q subsets S1, S2, …, Sq. This correspondingly defines q subnetworks, each one formed by including all the edges of the original network linking pairs of nodes of the subset. If we assume that the Markov chain πt+1 = πtM is in the stationary state π, then the dynamics of the random walker at the subnetwork scale can be described by the q-node lumped Markov chain37,38,39 Πt+1 = ΠtU, where the entries of the q × q matrix U are given by
The entry ucd is the probability that the random walker is at time (t + 1) in any of the nodes of Sd, provided it is at time t in any of the nodes of Sc. The diagonal term αc = ucc is the persistence probability15 of the subnetwork Sc: it can be regarded as an indicator of the cohesiveness of Sc, as the expected escape time from Sc is τc = (1 – αc)−1. From (4) we obtain , which is equivalent40 to the ratio between the number of transitions of the random walker on the edges internal to Sc and the number of visits to the nodes of Sc. In the case of undirected networks, recalling that , αc simplifies to , which is the fraction of the strength of the nodes of Sc that remains within Sc.
### Core-periphery profile
We define the core-periphery profile αk, k = 1, 2, …, n, of the network by the following algorithm:
Step 1: Select at random a node i among those with minimal strength (σi ≤ σj for all ). Modulo a relabeling of the nodes, we can assume, without loss of generality, that the selected node is 1. Set P1 = {1}, hence α1 = 0.
Step k = 2, 3, …, n: Select the node attaining the minimum in:
If it is not unique, select at random one of the nodes with minimal strength σh among those attaining the minimum. Without loss of generality, we can assume that the selected node is k. Set .
We note that the algorithm may have some randomicity (in the selection of the initial node and when, at step k, many nodes with the same strength attain the same αk), but we verified this has negligible impact in the analysis of real-world cases (see Supplementary Information for details). The main property of the core-periphery profile, namely monotonicity, is stated in the following proposition, whose proof is in the Supplementary Information.
### Proposition
αk+1 ≥ αk for all k = 1, 2, …, n – 1.
The core-periphery profile of the (unweighed, undirected, all-to-all) complete network, which has wij = 1 for all ij, can readily be derived by using the above equation for αc and noting that, at step k, the set Pk is a k-node clique and thus contains k(k – 1)/2 edges. Therefore
### Centralization
We derive the explicit expression of the core-periphery centralization C. The (discretized) area between a generic core-periphery profile αk and that of the star network (αk = 0 for k = 1, 2, …, n – 1, αn = 1) is given by . For the complete network (see (6)) such expression becomes
Then we define the centralization C for a core-periphery profile αk as the complement to 1 of the normalized area, namely | 2023-02-06 14:28:09 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8007166385650635, "perplexity": 1275.7813720779172}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-06/segments/1674764500339.37/warc/CC-MAIN-20230206113934-20230206143934-00244.warc.gz"} |
https://proxies-free.com/tag/correctness/ | ## Prove Correctness of Algorithm? – Computer Science Stack Exchange
Given $$n$$ images placed in indexes $$x_1 < x_2 < … < x_n$$ and an
endless number of guards, where each guard if placed in index $$y$$ can
protect $$[y-0.5,y+1]$$. I want to protect all images with minimal
number of guards.
My suggestion for an algorithm:
Place guard in $$x_1+0.5$$ then do loop from $$i=2$$ to $$i=n$$, if image $$x_i$$ protected by previous guard then do nothing, else place a new guard at point $$x_i+0.5$$
I proved that my algorithm returns valid solution, but stuck on proving that it returns minimal solution.
I am trying to prove this claim:
let $$s_i$$ be the point where guard $$i$$ was placed by my algorithm, then for each $$i$$ there is a minimal solution which placed guards in points $$s_1, … , s_i$$
I went for induction and proved base case for $$i=1$$ But stuck on later steps. Any help?
## operating systems – Prove correctness of a solution to the critical section problem in general?
I was wondering if there is any formal, general way to prove the correctness of a candidate solution to the critical section problem in synchronisation. For example, in the image enclosed, i have considered the petersons solution to the critical section problem(reference : operating system concepts by gagne)
The example is worked out for all possible scenarios of concurrent execution and an observation is made that in any scenario, atmost one process enters inside the critical section, hence proving the mutual exclusion condition of the solution.
Doubt
Is there a better way to formally prove the above condition(and other conditions, such as bounded waiting and progress)? I wondered because the method I used above is really a brute force method and things can get pretty messy as the number of instructions increases. Thanks in advance.
## algorithms – Is correctness implied by an optimality proof?
New to proofs (in the context of analysis of algorithms).
I’m wondering, if I were to prove a greedy algorithm is the optimal solution, does this imply its correctness as well? (partial correctness + termination).
I’m trying to understand how The Job Sequencing Problem is correct but can only find proofs for its optimality. How can we be sure this algorithm is correct?
EDIT: I have found an excellent resource that uses a proof of optimality to show (I think) partial correctness as well. It is here but for the life of me I cannot understand it. A layman’s explanation would be amazing!
## Proof of Correctness Request for Greedy Algorithm that solves “The Weight Job Scheduling” problem
Today, in my self-lead studies, I found out about greedy algorithms, more specifically, a greedy approach to solve The Weighted Job Scheduling Problem.
I understand how the solution is implemented but, I’d love to see a proof of correctness for this solution (i.e. partial correctness and termination). If anyone can help me understand why this solution is correct mathematically in a general form, that’d really great!
## Proof of Correctness Request for Greedy Algorithm that solves “The Job Scheduling” problem
Today, in my self-lead studies, I found out about greedy algorithms, more specifically, a greedy approach to solve The Job Sequencing Problem.
I understand how the solution is implemented but, I’d love to see a proof of correctness for this solution (i.e. partial correctness and termination). If anyone can help me understand why this solution is correct mathematically in a general form, that’d really great!
## algorithms – Proof of Correctness : Arranging the sheep
I’ve come across a question in Codeforces contest 719(Div – 3).
The problem goes like this :
I was able to solve the problem by using another approach but had to use 4*n auxiliary space, where n is the length of the input string however the solution given in the editorial is way more efficient
The editorial goes like this
It basically says to choose the sheep whose number is ⌈k/2⌉ as pivot.(In the editorial they gave it as n/2 which is wrong. Consider it to be k/2, where k is the number of sheep in the given string.)
Here’s my doubt
Why sheep at present at ⌈k/2⌉ should make 0 moves to get an optimal solution. I’ve searched the internet but couldn’t find the proof. Can someone give me a generalized proof for this?.. Thanks in advance 🙂
Note :- The editorial link has the solutions for all the problems. Scroll down to find the editorial for Arranging the Sheep problem.
## Proof of correctness for D.P wordwrap problem?
I was reading another post about the time complexity of the word wrap problem ("The word wrap problem states that given a sequence of words as input, we need to find the number of words that can be fitted in a single line at a time") and this is the code they used to define their algorithm. I’ve defined the recurrence in the problem to be min(DP(j)+badness(i,j) for j in (i+1),(n+1).
import math
class Text(object):
def init(self, words, width):
self.words = words
self.page_width = width
self.str_arr = words
self.memo = {}
``````def total_length(self, str):
total = 0
for string in str:
total = total + len(string)
total = total + len(str) # spaces
line_len = self.total_length(str)
if line_len > self.page_width:
return float('nan')
else:
return math.pow(self.page_width - line_len, 3)
def dp(self):
n = len(self.str_arr)
self.memo(n-1) = 0
return self.judge(0)
def judge(self, i):
if i in self.memo:
return self.memo(i)
self.memo(i) = float('inf')
for j in range(i+1, len(self.str_arr)):
return self.memo(i)
``````
## How to prove correctness of the binary tree inversion algorithm?
Define the inversion of a binary tree as the tree whose left sub-tree is a mirror reflection of the original tree’s right sub-tree around the center and right sub-tree a mirror reflection of the original tree’s left sub-tree.
Consider the following binary tree inversion algorithm (source: LeetCode):
``````/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode() {}
* TreeNode(int val) { this.val = val; }
* TreeNode(int val, TreeNode left, TreeNode right) {
* this.val = val;
* this.left = left;
* this.right = right;
* }
* }
*/
public TreeNode invertTree(TreeNode root) {
if (root == null) return null;
TreeNode tmp = root.left;
root.left = invertTree(root.right);
root.right = invertTree(tmp);
return root;
}
``````
I sought to prove it inductively on the depth of tree but am stuck at the inductive step. How can I show that the mirror reflection of the left subtree (or right) around the center of the root tree is a combination of moving the subtree from `root.right` to `root.left` and inverting the subtree around the center of the subtree itself?
## sequences and series – Changing the order of summation – check for correctness
Assume $$|r|<1$$, I’m working with
begin{align*}A &=sum_{i=1}^{infty} sum_{j=i+1}^{infty} r^{j-i} sum_{u=1}^{i}frac{r^{i-u}}{u} sum_{v=1}^{j}frac{r^{j-v}}{v} \ &=sum_{u=1}^{infty} frac{1}{u} sum_{v=1}^{infty} frac{1}{v} sum_{i=u}^{infty} sum_{j: j geq i+1 & j geq v }^{infty} r^{j-i} r^{i-u}r^{j-v} \ &=sum_{u=1}^{infty} frac{1}{u} sum_{v=1}^{infty} frac{1}{v} sum_{i=u}^{infty} sum_{j = min{i, v} }^{infty} r^{2j-u-v} \ &=sum_{u=1}^{infty} frac{1}{u} sum_{v=1}^{infty} frac{1}{v}left( sum_{i: i geq u & i leq v}^{infty} sum_{j = i }^{infty} r^{2j-u-v} + sum_{i: i geq u & i > v}^{infty} sum_{j = v }^{infty} r^{2j-u-v} right) \ end{align*}
The initial sum seems to converge as per numerical simulations, however, further expanding by change of the order of the summations, I keep arriving at diverging or complex values.
Am I missing something during the change of the summation order?
## selection problem – proving correctness of algorithm to find minimum to \$f(b) = sum|x_i – b|\$
given a set of $$N$$ points $${(x_1, y_1),…(x_n, y_n)}$$ I need to find an algorithm with liner running time to find the line $$x=b$$ where $$f(b) = sum_{i=1}^{n}|x_i – b|$$ is minimal.
I wrote the following algorithm:
``````MINIMAL-SUM-DISTANCE(A) // A is an array of the point's x values
1 return SELECT(A, 0, length(A), floor(length(A) / 2))
``````
where SELECT is a function that find the kth smallest element in an array in $$O(n)$$ (using median of medians)
My problem is I don’t know how to prove the algorithm correctness. Previously I’ve used either loop invariant or induction to prove correctness, but in this instance loop invariant is useless and I don’t see how I can prove it with induction, the assumption that the algorithm is correct for $$n$$ doesn’t help me prove it is correct for $$n + 1$$ (at least as far as I can see). There is also the point that I’m not sure if I need to prove why I choose $$lfloor n / 2 rfloor$$, and if so how exactly to prove it. Originally I got to this solution by writing a simple script that, for a group of 3-20 points with x values -100 to 100, calculated the minimum by going on all integers between the minimum and the maximum x values. | 2021-07-27 21:41:48 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 24, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7478613257408142, "perplexity": 1154.6844705032358}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-31/segments/1627046153491.18/warc/CC-MAIN-20210727202227-20210727232227-00402.warc.gz"} |
https://blog.csdn.net/summerfang/article/details/747260 | # PHPUnit袖珍指南-第三章 PHPUnit的目的
5展示了如何用PHPUnit重写例4中的两个测试。
5 PHPUnit测试 Arraysizeof().
<?php
require_once 'PHPUnit2/Framework/TestCase.php';
class ArrayTest extends PHPUnit2_Framework_TestCase {
public function testNewArrayIsEmpty( ) {
// fixture
$fixture = Array( ); // fixture0$this->assertEquals(0, sizeof($fixture)); } public function testArrayContainsAnElement( ) { // fixture$fixture = Array( );
// fixture
$fixture[] = 'Element'; //fixture1$this->assertEquals(1, sizeof($fixture)); } } ?> 5告诉我们用PHPUnit来写测试的基本步骤是: 1. Class的测试类是ClassTest 2. ClassTest一般继承PHPUnit2_ Framework_TestCase 3. 测试是公有方法,没有参数,名字是test* 4. 在测试方法中,断言函数,如assertEquals()(见表6)用于断言实际值是否匹配期望值。 一个如PHPUnit的框架需要解决一系列问题,有些看起来互相冲突。测试必须同时满足以下条件: 易学 测试必须容易学,否则,开发人员不会去学 易开发 测试必须容易开发,否则,开发人员不会去开发 易读 测试代码必须没有外部关系,这样测试本身不会在杂乱无章中迷失。 容易执行 测试应该很容易执行,执行的结果以一种清楚和明确的格式表达出来。 快速执行 测试应该执行的很快,这样每天才能执行上千次。 代码隔离 测试之间不能互相影响,测试顺序的改变不应该影响结果。 可组合的 我们应该可以以任何组合来运行测试,这是代码隔离的一个必然结果。 这些约束条件有两个主要的冲突 易学vs易开发 测试通常不需要应用到编程全部的灵活性。很多测试工具提供了它们自己的测试脚本语言,这些语言只有书写测试所需特性的最小集,因为没有噪声来干扰你的测试内容,写出来的测试易读易写。但是学一种新的编织邮件和一套工具还是不方便的,容易混淆视听。 代码隔离vs快速执行 如果你想要一个测试的结果不影响另一个,每个测试在开始运行的阶段,都需要创建测试的全专题,返回后又要恢复运行之前的状态。可是,设置状态需要的时间很长(如,连接到数据库,用真实数据初始化到一个已知状态) PHPUnit解决这个问题的办法是采用PHP作为测试语言。有时,全功能的PHP对于书写短小的,直接的测试是过于强大了,不过,我们利用的程序员已经有使用PHP的全部经验。因为我们需要说服勉强的测试人员,降低书写这些初始测试的门槛是及其重要的。 -------------------------------------------------------------------------------------------------------------------- 原文: Chapter 3. PHPUnit's Goals So far, we only have two tests for the Array built-in and the sizeof( ) function. When we start to test the numerous array_*( ) functions PHP offers, we will need to write a test for each of them. We could write all these tests from scratch. However, it is much better to write a testing infrastructure once and then write only the unique parts of each test. PHPUnit is such an infrastructure. Example 5 shows how we have to rewrite our two tests from Example 4 so that we can use them with PHPUnit. Example 5. Testing Array and sizeof( ) with PHPUnit <?php require_once 'PHPUnit2/Framework/TestCase.php'; class ArrayTest extends PHPUnit2_Framework_TestCase { public function testNewArrayIsEmpty( ) { // Create the Array fixture.$fixture = Array( );
// Assert that the size of the Array fixture is 0.
$this->assertEquals(0, sizeof($fixture));
}
public function testArrayContainsAnElement( ) {
// Create the Array fixture.
$fixture = Array( ); // Add an element to the Array fixture.$fixture[] = 'Element';
// Assert that the size of the Array fixture is 1.
$this->assertEquals(1, sizeof($fixture));
}
}
?>
Example 5 shows the basic steps for writing tests with PHPUnit:
The tests for a class Class go into a class ClassTest.
ClassTest inherits (most of the time) from PHPUnit2_ Framework_TestCase.
The tests are public methods that expect no parameters and are named test*.
Inside the test methods, assertion methods such as assertEquals( ) (see Table 6) are used to assert that an actual value matches an expected value.
A framework such as PHPUnit has to resolve a set of constraints, some of which seem to conflict with each other. Simultaneously, tests should be:
Easy to learn to write.
Tests should be easy to learn to write; otherwise, developers will not learn to write them.
Easy to write.
Tests should be easy to write; otherwise, developers will not write them.
Test code should contain no extraneous overhead so that the test itself does not get lost in the noise that surrounds it.
Easy to execute.
Tests should run at the touch of a button and present their results in a clear and unambiguous format.
Quick to execute.
Tests should run fast so they can be run hundreds or thousands of times a day.
Isolated.
Tests should not affect each other. If the order in which the tests are run changes, the results of the tests should not change.
Composable.
We should be able to run any number or combination of tests together. This is a corollary of isolation.
There are two main clashes within this group of constraints:
Easy to learn to write versus easy to write.
Tests do not generally require all the flexibility of a programming language. Many testing tools provide their own scripting language that includes only the minimum necessary features for writing tests. The resulting tests are easy to read and write because they have no noise to distract you from the content of the tests. However, learning yet another programming language and set of programming tools is inconvenient and clutters the mind.
Isolated versus quick to execute.
If you want the results of one test not to affect the results of another test, each test should create the full state of the testing before it begins to execute, and return the world to its original state when it finishes. However, setting it up can take a long time (e.g., connecting to a database and initializing it to a known state using realistic data).
PHPUnit attempts to resolve these conflicts by using PHP as the testing language. Sometimes the full power of PHP is overkill for writing short, straight-line tests, but by using PHP, we leverage all the experience and tools programmers already have in place. Because we are trying to convince reluctant testers, lowering the barrier to writing those initial tests is particularly important.
PHPUnit errs on the side of isolation over quick execution. Isolated tests are valuable because they provide high-quality feedback. You do not get a report with a bunch of test failures that were really caused because one test at the beginning of the suite failed and left the world messed up for the rest of the tests. This orientation toward isolated tests encourages designs with a large number of simple objects. Each object can be tested quickly in isolation. The result is better designs and faster tests.
PHPUnit assumes that most tests succeed, and it is not worth reporting the details of successful tests. When a test fails, that fact is worth noting and reporting. The vast majority of tests should succeed and are not worth commenting on, except to count the number of tests that run. This is an assumption that is really built into the reporting classes and not into the core of PHPUnit. When the results of a test run are reported, you see how many tests were executed, but you only see details for those that failed.
Tests are expected to be fine-grained, testing one aspect of one object. Hence, the first time a test fails, execution of the test halts, and PHPUnit reports the failure. It is an art to test by running many small tests. Fine-grained tests improve the overall design of the system.
When you test an object with PHPUnit, you do so only through the object's public interface. Testing based only on publicly visible behavior encourages you to confront and solve difficult design problems before the results of poor design can affect large parts of the system. | 2018-11-20 15:42:07 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.18464268743991852, "perplexity": 1292.6661670386693}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-47/segments/1542039746465.88/warc/CC-MAIN-20181120150950-20181120172950-00522.warc.gz"} |
http://indico.fuw.edu.pl/contributionDisplay.py?contribId=40&confId=44 | # Scalars 2015
3-7 December 2015
Europe/Warsaw timezone
Home > Timetable > Contribution details
PDF | XML
# Scalar particle production at the STAR experiment in the Double Pomeron Exchange process
Presented by Dr. Wlodek GURYN
## Content
We shall describe the physics program with tagged forward protons, focusing on scalar particle production in the Central Exclusive Production (CEP) Process in polarized proton-proton collisions at the Relativistic Heavy Ion Collider, with the STAR detector at \sqrt{s} = 200 GeV. Preliminary results in CEP of two oppositely charged pions and kaons produced in the processes $pp\to pp \pi^+\pi^-$ and $pp\to pp \K^+\K^-$ shall be presented. Becasue of the quantum numbers of the Pomeron exchange these Double Pomeron Exchange processes favour scalar 0++ particle production. Hence the final states are dominated by gluonic exchanges. Silicon strip detectors placed in Roman Pots were used for measuring forward protons. The preliminary results are based on the measurement of the recoil system of charged particles in the STAR experiment's Time Projection Chamber. Ionization energy loss of charged particles was used for particle identification. In addition to those preliminary results, the present status and future plans of diffractive physics at STAR shall be described.
More | 2019-04-25 11:47:07 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.40393415093421936, "perplexity": 2987.331283716678}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-18/segments/1555578721441.77/warc/CC-MAIN-20190425114058-20190425135624-00041.warc.gz"} |
https://math.stackexchange.com/questions/3564689/proving-that-lim-x-y-rightarrow0-0fx-y-0-doesnt-hold-using-the-def | # Proving that $\lim_{(x,y)\rightarrow{}(0,0)}f(x,y)=0$ doesn't hold using the definition.
I realise that a comparable question has been asked in a different thread before but no definitions were used to prove the claim, thus I'd appreciate it if this one stays open.
I've just started a multi-variable calculus course and in one of the exercises we are asked to prove that $$\lim_{(x,y)\rightarrow{}(0,0)}f(x,y)=0$$ doesn't hold for $$f(x,y)=\frac{xy^2}{x^2+y^4}$$. Now I understand that if we were to observe the lines leading to $$(0,0)$$ that the limit is not always equal (for example $$x=0$$ and $$x=y^2$$) so that immediately tells us that the limit doesn't exist. But the question asks for a rigorous proof using the $$\epsilon-\delta$$ definition.
I tried following the negation of the definition to come up with a contradiction and I chose $$\epsilon=1>0$$ such that $$\forall{}\delta>0$$ and $$(x,y)\in\mathbb{R}-{}\{(0,0)\}$$ with $$||(x,y)||<\delta$$ that (and here I got stuck, not knowing how to show that the following inequality holds) $$|f(x,y)-0|=\left|\frac{xy^2}{x^2+y^4}\right|\geq{}1$$.
Edit: Maybe my choice of epsilon is awful..
• @infinity To demonstrate there exists such an $\epsilon$, OP has chosen some $\epsilon$ and is attempting to demonstrate the "for all $\delta$" part. Feb 29, 2020 at 21:31
• @angryavian Yeah I got confused there for a second.. Feb 29, 2020 at 21:32
We need to prove: There exists $$\varepsilon_{0}>0$$ such that for each $$\delta>0$$, there exists $$(x,y)\neq(0,0)$$ satisfying that $$||(x,y)-(0,0)||<\delta$$ and $$|f(x,y)-0|\geq\varepsilon_{0}$$.
Take $$\varepsilon_{0}=\frac{1}{10}$$. Let $$\delta>0$$ be arbitrary. Let $$t=\min(\frac{1}{2},\frac{\delta}{2})>0$$. Let $$(x,y)=(t^{2},t)$$. Clearly, $$(x,y)\neq(0,0)$$. Moreover, $$||(x,y)-(0,0)||=\sqrt{t^{4}+t^{2}}\leq\sqrt{t^{2}+t^{2}}=\sqrt{2}t<\delta$$. Now $$\begin{eqnarray*} f(x,y) & = & \frac{xy^{2}}{x^{2}+y^{4}}\\ & = & \frac{1}{2}. \end{eqnarray*}$$ This shows that $$|f(x,y)-0|\geq\varepsilon_{0}$$.
Fix $$\epsilon = 1/8$$. For any $$\delta > 0$$ you have $$f(0,\delta/2) = 0$$ and $$f(\delta_0^2, \delta_0) = \frac{1}{2}$$, where $$\delta_0$$ is small enough such that $$\|(\delta_0^2, \delta_0)\| < \delta$$ (e.g., choose $$\delta_0 = \min\{1, \delta/2\}$$).
Thus it is impossible for the statement "there exists $$L$$ such that $$|f(x,y) - L| < \epsilon$$ whenever $$\|(x,y)\| < \delta$$" to be true. This is because both $$(0, \delta/2)$$ and $$(\delta_0^2, \delta_0)$$ are within distance $$\delta$$ of $$(0,0)$$, and if the statement were true we would have $$\frac{1}{2}= |f(\delta_0^2, \delta_0) - f(0, \delta/2)| \le |f(\delta_0^2, \delta_0) - L| + |f(0, \delta/2) - L| < 2 \epsilon = \frac{1}{4}$$, a contradiction. | 2023-04-01 22:37:12 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 39, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9298762679100037, "perplexity": 63.83358706996111}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296950363.89/warc/CC-MAIN-20230401221921-20230402011921-00291.warc.gz"} |
https://socratic.org/questions/the-force-applied-against-a-moving-object-travelling-on-a-linear-path-is-given-b-54 | # The force applied against a moving object travelling on a linear path is given by F(x)= cosx + 2 . How much work would it take to move the object over x in [ 0, (13 pi) / 6] ?
Jul 22, 2017
The work is $= 14.1 J$
#### Explanation:
$\int \cos x \mathrm{dx} = \sin x + C$
$\int \left({x}^{n}\right) \mathrm{dx} = {x}^{n + 1} / \left(n + 1\right) + C \left(n \ne - 1\right)$
The work is
$\Delta W = F \left(x\right) \cdot \Delta x$
$F \left(x\right) = 2 + \cos x$
$W = {\int}_{0}^{\frac{13}{6} \pi} \left(2 + \cos x\right) \mathrm{dx}$
$= {\left[2 x + \sin x\right]}_{0}^{\frac{13}{6} \pi}$
$= \left(2 \cdot \frac{13}{6} \pi + \sin \left(\frac{13}{6} \pi\right)\right) - \left(0 + \sin 0\right)$
$= \frac{13}{3} \pi + \sin \left(\frac{13}{6} \pi\right)$
$= \frac{31}{3} \pi + \frac{1}{2}$
$= 14.1 J$ | 2019-09-22 22:37:14 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 11, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.34339234232902527, "perplexity": 1532.218831968404}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-39/segments/1568514575751.84/warc/CC-MAIN-20190922221623-20190923003623-00072.warc.gz"} |
https://brilliant.org/problems/2-variable-function-part2/ | # 2 variable function
Calculus Level 4
A function in x and y is defined as, f(x) +f(2x+y) +5xy = f(3x-y) +2x^2 + 1.Find the value of f(2015) in terms of $$a{ x }^{ b }+c$$. Then find x-2a-b+c.
× | 2018-01-19 00:06:23 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6430836915969849, "perplexity": 3500.1791301854378}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-05/segments/1516084887660.30/warc/CC-MAIN-20180118230513-20180119010513-00312.warc.gz"} |
http://physics.stackexchange.com/tags/plasma-physics/new | # Tag Info
1
Introduction to Plasma Physics by Francis Chen is probably one of the best sources for introductory plasma physics, despite being slightly dated (publication date of 1995) and using CGS units. It covers, among other things, particle motions in E&M fields plasmas as fluids (e.g., MHD) plasmas as particles (kinetic theory) controlled fusion As a ...
2
$\nabla\cdot\mathbf B=0$ does indicate that there are no magnetic monopoles, so there isn't a "starting" or "ending" point for field lines is mostly correct. So this must mean that magnetic field lines either form closed loops extend to infinity intersect the domain boundary (wall, stellar surface, etc) So the "starting & ending points" issue ...
8
One must be very careful in making the step from $\nabla\cdot\mathbf{B}=0$ to a statement such as "magnetic field lines do not start or end". Consider the field in the region of an X-point type magnetic null (in two dimensions). Take a 'volume' (i.e. an area) centred on the null point, and look at the field lines through the bounding curve. No matter how ...
2
Plasma wakefield acceleration works by introducing a driver into plasma and accelerating particles in its wake. The driver can either be a laser pulse or an electron beam. In both cases, the most common mechanism of acceleration is the so-called bubble (or blow-out/cavity) regime. This works by the driver pushing electrons in front of it while due to their ...
Top 50 recent answers are included | 2015-07-03 12:46:02 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4890633821487427, "perplexity": 1094.5667657334823}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-27/segments/1435375096061.71/warc/CC-MAIN-20150627031816-00040-ip-10-179-60-89.ec2.internal.warc.gz"} |
https://charmie11.wordpress.com/2011/09/20/basis-pursuit-and-matching-pursuit/ | # Basis Pursuit and Matching Pursuit
Suppose we observe a signal $x$. With a dictionary $D$, the signal $x$ is represented by a linear equation as $x = D\alpha$. Given the observed signal, our goal is to find the coefficients $\alpha$.
Assuming $\alpha$ sparse vector is one direction. Thus, the solution is formulated as
$\hat{\alpha} = \textrm{argmin}_{\alpha} ||\alpha||_{0}$
$\textrm{s.t. }x = D\alpha$.
However, this L0 norm minimization is known as NP-hard. Instead of L1 minimization, both Basis Pursuit (BP) and Matching Pursuit (MP) are applicable for this problem.
MP is categorized as a greedy algorithm that greedy minimizes $||x-D\alpha||$.
Basis pursuit is an L1 minimization that solves
$\hat{\alpha} = \textrm{argmin}_{\alpha} ||\alpha||_{1}$
$\textrm{s.t. }x = D\alpha$. | 2017-08-18 08:42:39 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 11, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8590118288993835, "perplexity": 773.4065247172784}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2017-34/segments/1502886104631.25/warc/CC-MAIN-20170818082911-20170818102911-00271.warc.gz"} |
https://ftp.aimsciences.org/article/doi/10.3934/dcdsb.2014.19.1667 | Article Contents
Article Contents
# Compact implicit integration factor methods for a family of semilinear fourth-order parabolic equations
• When developing efficient numerical methods for solving parabolic types of equations, severe temporal stability constraints on the time step are often required due to the high-order spatial derivatives and/or stiff reactions. The implicit integration factor (IIF) method, which treats spatial derivative terms explicitly and reaction terms implicitly, can provide excellent stability properties in time with nice accuracy. One major challenge for the IIF is the storage and calculation of the dense exponentials of the sparse discretization matrices resulted from the linear differential operators. The compact representation of the IIF (cIIF) can overcome this shortcoming and greatly save computational cost and storage. On the other hand, the cIIF is often hard to be directly applied to deal with problems involving cross derivatives. In this paper, by treating the discretization matrices in diagonalized forms, we develop an efficient cIIF method for solving a family of semilinear fourth-order parabolic equations, in which the bi-Laplace operator is explicitly handled and the computational cost and storage remain the same as to the classic cIIF for second-order problems. In particular, the proposed method can deal with not only stiff nonlinear reaction terms but also various types of homogeneous or inhomogeneous boundary conditions. Numerical experiments are finally presented to demonstrate effectiveness and accuracy of the proposed method.
Mathematics Subject Classification: 65M06, 35K25.
Citation:
• [1] M. Berger and P. Colella, Local adaptive mesh refinement for shock hydrodynamics, Journal of Computational Physics, 82 (1989), 64-84.doi: 10.1016/0021-9991(89)90035-1. [2] M. Berger and J. Oliger, Adaptive mesh refinement for hyperbolic partial differential equations, Journal of Computational Physics, 53 (1984), 484-512.doi: 10.1016/0021-9991(84)90073-1. [3] E. O. Brigham, The Fast Fourier Transform and its Applications, Prentice Hall, 1988. [4] S. Chen and Y.-T. Zhang, Krylov implicit integration factor methods for spatial discretization on high dimensional unstructured meshes: Application to discontinuous Galerkin methods, Journal of Computational Physics, 230 (2011), 4336-4352.doi: 10.1016/j.jcp.2011.01.010. [5] S. M. Cox and P. C. Matthews, Exponential time differencing for stiff systems, Journal of Computational Physics, 176 (2002), 430-455.doi: 10.1006/jcph.2002.6995. [6] Q. Du and W. Zhu, Stability analysis and applications of the exponential time differencing schemes, Journal of Computational Mathematics, 22 (2004), 200-209. [7] Q. Du and W. Zhu, Modified exponential time differencing schemes: Analysis and applications, BIT Numerical Mathematics, 45 (2005), 307-328.doi: 10.1007/s10543-005-7141-8. [8] R. Eymard, T. Gallouët and R. Herbin, Finite volume methods, Handbook of Numerical Analysis, 7 (2000), 713-1020. [9] B. Gustafsson, H.-O. Kreiss and J. Oliger, Time Dependent Problems and Difference Methods, volume 67. Wiley New York, 1995. [10] M. Hochbruck and C. Lubich, On krylov subspace approximations to the matrix exponential operator, SIAM Journal on Numerical Analysis, 34 (1997), 1911-1925.doi: 10.1137/S0036142995280572. [11] A. Jameson, W. Schmidt and E. Turkel, Numerical Solutions of the Euler Equations by Finite Volume Methods Using Runge-Kutta Time-Stepping Schemes, The 14th AIAA Fluid and Plasma Dynamics Conference, 1981.doi: 10.2514/6.1981-1259. [12] G.-S. Jiang and C.-W. Shu, Efficient implementation of weighted ENO schemes, Journal of Computational Physics, 126 (1996), 202-228.doi: 10.1006/jcph.1996.0130. [13] L. Ju, J. Zhang, L. Zhu and Q. Du, Fast Explicit Integration Factor Methods for Semilinear Parabolic Equations, Journal of Scientific Computing, 2014.doi: 10.1007/s10915-014-9862-9. [14] A.-K. Kassam and L. N. Trefethen, Fourth-order time stepping for stiff PDEs, SIAM Journal on Scientific Computing, 26 (2005), 1214-1233.doi: 10.1137/S1064827502410633. [15] B. Kleefeld, A. Khaliq and B. Wade, An ETD Crank-Nicolson method for reaction-diffusion systems, Numerical Methods for Partial Differential Equations, 28 (2012), 1309-1335.doi: 10.1002/num.20682. [16] S. Krogstad, Generalized integrating factor methods for stiff PDEs, Journal of Computational Physics, 203 (2005), 72-88.doi: 10.1016/j.jcp.2004.08.006. [17] R. LeVeque, Numerical Methods for Conservation Laws, Birkhauser, 1992.doi: 10.1007/978-3-0348-8629-1. [18] X. Liu and Q. Nie, Compact integration factor methods for complex domains and adaptive mesh refinement, Journal of computational physics, 229 (2010), 5692-5706.doi: 10.1016/j.jcp.2010.04.003. [19] X.-D. Liu, S. Osher and T. Chan, Weighted essentially non-oscillatory schemes, Journal of Computational Physics, 115 (1994), 200-212.doi: 10.1006/jcph.1994.1187. [20] Q. Nie, F. Wan, Y.-T. Zhang and X. Liu, Compact integration factor methods in high spatial dimensions, Journal of Computational Physics, 277 (2008), 5238-5255.doi: 10.1016/j.jcp.2008.01.050. [21] Q. Nie, Y.-T. Zhang and R. Zhao, Efficient semi-implicit schemes for stiff systems, Journal of Computational Physics, 214 (2006), 521-537.doi: 10.1016/j.jcp.2005.09.030. [22] Y. Saad, Analysis of some krylov subspace approximations to the matrix exponential operator, SIAM Journal on Numerical Analysis, 29 (1992), 209-228.doi: 10.1137/0729014. [23] J. Shen and H. Yu, Efficient spectral sparse grid methods and applications to high-dimensional elliptic problems, SIAM Journal on Scientific Computing, 32 (2010), 3228-3250.doi: 10.1137/100787842. [24] C. Van Loan, Computational Frameworks for the Fast Fourier Transform, volume 10. SIAM, 1992.doi: 10.1137/1.9781611970999. [25] A. Wiegmann, Fast Poisson, Fast Helmholtz and Fast Linear Elastostatic Solvers on Rectangular Parallelepipeds, Lawrence Berkeley National Laboratory, Paper LBNL-43565, 1999.doi: 10.2172/982430. [26] S. Zhao, J. Ovadia, X. Liu, Y. Zhang and Q. Nie, Operator splitting implicit integration factor methods for stiff reaction-diffusion-advection systems, Journal of Computational Physics, 230 (2011), 5996-6009.doi: 10.1016/j.jcp.2011.04.009. | 2023-03-27 01:59:03 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 1, "x-ck12": 0, "texerror": 0, "math_score": 0.5206275582313538, "perplexity": 1924.1419788600836}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296946584.94/warc/CC-MAIN-20230326235016-20230327025016-00061.warc.gz"} |
http://mathoverflow.net/questions/106971/homotopy-type-of-top4-pl4 | ## Homotopy type of TOP(4)/PL(4)
It is known (e.g. the Kirby-Siebenmann book) that $\mathrm{TOP}(n)/\mathrm{PL}(n)\simeq K({\mathbb Z}/2,3)$ for $n>4$. I believe it is also known (Freedman-Quinn) that $\mathrm{TOP}(4)/\mathrm{PL}(4)\to K({\mathbb Z}/2,3)$ is 5-connected. Is it known whether $\mathrm{TOP}(4)/\mathrm{PL}(4)$ is not equivalent to $K({\mathbb Z}/2,3)$?
Edit: The following lists the relevant definitions.
• The topological group $\mathrm{TOP}(n)$ is the group of self-homeomorphisms of ${\mathbb R}^n$ with the compact-open topology.
• The topological group $\mathrm{PL}(n)=|\mathrm{PL}_S(n)|$ is defined as the geometric realization of the simplicial group $\mathrm{PL}_S(n)$. The $k$-simplices of $\mathrm{PL}_S(n)$ are the piecewise linear homeomorphisms $\Delta^k\times{\mathbb R}^n\to\Delta^k\times{\mathbb R}^n$ which commute with the projection onto $\Delta^k$.
• With the above definitions, there exists a canonical map of topological groups $\mathrm{PL}(n)\to\mathrm{TOP}(n)$. Then the space $\mathrm{TOP}(n)/\mathrm{PL}(n)$ is defined as the homotopy fibre of the induced map $B\mathrm{PL}(n)\to B\mathrm{TOP}(n)$. It is not actually a quotient of a group by a subgroup.
• Here is a way of recovering the homotopy type of $\mathrm{TOP}(n)/\mathrm{PL}(n)$ as an actual quotient. Let $\mathrm{TOP}_S(n)$ be the singular complex of $\mathrm{TOP}(n)$: $\mathrm{TOP}_S(n)$ is the simplicial set whose $k$-simplices are continuous maps $\Delta^k\to\mathrm{TOP}(n)$; these are in canonical bijection with the homeomorphisms $\Delta^k\times{\mathbb R}^n\to\Delta^k\times{\mathbb R}^n$ commuting with the projection onto $\Delta^k$. Hence we obtain an inclusion of simplicial groups $\mathrm{PL}_S(n)\hookrightarrow\mathrm{TOP}_S(n)$, which induces by adjunction the previous map of topological groups $\mathrm{PL}(n)\to\mathrm{TOP}(n)$. The space $\mathrm{TOP}(n)/\mathrm{PL}(n)$ is weakly homotopy equivalent to the geometric realization of the simplicial set $\mathrm{TOP}_S(n)/\mathrm{PL}_S(n)$ (which is levelwise given by taking cosets).
-
What is $TOP(n)$? – Steven Landsburg Sep 12 at 3:20
It was unknown 20 years ago, when this question was proposed as Conjecture 3.10 in 'Differential Topology, Foliations, and Group Actions' by Paul A. Schweitzer. Link: tinyurl.com/cddp8oq – Benjamin Dickman Sep 12 at 6:32
@Steven Landsburg: From books.google.it/… I gather $TOP(n)$ is the group of self-homeomorphisms of $\mathbb{R}^n$ and $PL(n)$ the subgroup of piecewise linear ones. – Qfwfq Sep 12 at 9:44
@Qfwfq : This is not really my area, but I'm pretty sure that $TOP(n)$ is suppposed to classify topological microbundles on a space. This means that it is something like the classifying space for something like the group of germs of homeomorphisms of $\mathbb{R}^n$ (or maybe the pseudogroup of homeomorphisms between open sets in $\mathbb{R}^n$). Similarly for $PL(n)$. I don't have it at hand, but there are proper definitions in a book by Madsen and Milgram. – Sue Sep 12 at 15:35
$\text{TOP}(n)$ is in fact the group of self-homeomorphisms of ${\mathbb R}^n$, as Qfwfq states. – Ricardo Andrade Sep 12 at 19:04 | 2013-05-21 19:04:25 | {"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9450891017913818, "perplexity": 192.92026711425086}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2013-20/segments/1368700438490/warc/CC-MAIN-20130516103358-00081-ip-10-60-113-184.ec2.internal.warc.gz"} |
http://journal.svmo.ru/en/archive/article?id=1293 | On the topological conjugacy of gradient-like diffeomorphisms of surfaces with one-dimensional invariant sets
S. H. Kapkaeva1
Annotation In the paper we found conditions for the topological conjugacy of gradient-like 2-diffeomorphisms whose nonwandering set belongs to the invariant finite union of disjoint simple closed curves. The interrelation between the dynamics of diffeomorphisms and the topology of the ambient manifold is established. For a meaningful subclass of such systems their topological classification obtained Morse-Smale gradient-like diffeomorphism topological conjugacy, attractor, repeller
1Student, Mordovian State University after N.P. Ogarev, Saransk; kapkaevasvetlana@yandex.ru.
Citation: S. H. Kapkaeva, "[On the topological conjugacy of gradient-like diffeomorphisms of surfaces with one-dimensional invariant sets]", Zhurnal Srednevolzhskogo matematicheskogo obshchestva,16:1 (2014) 76–82 (In Russian) | 2021-12-07 17:30:10 | {"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8202367424964905, "perplexity": 2680.9870218011993}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964363405.77/warc/CC-MAIN-20211207170825-20211207200825-00460.warc.gz"} |