text:
Kevin O'Neill PhD candidate in cognitive neuroscience at Duke University working with Dr. Felipe De Brigard and Dr. John Pearson on causal reasoning.

# Introduction

It might seem like creating web content is magic, but one tool makes it easy: markdown. What is markdown? Well, it’s a language for formatting documents using plain old text. So, if you have any computer with a plain text editor (even something like Notepad), you can write in Markdown! For live rendering, you can even use online editors like Dillinger. In this post, we’ll talk about how to write documents like blog posts in markdown. If you want to make a post on this website, you can either give me your markdown file, or post it yourself through GitHub.

Here is an outline of the topics we’ll cover. If you’re just looking for a cheatsheet, I would recommend this awesome reference.

# Formatting text

In word processors (like Word or Pages), you use buttons to format text, and the text appears to you as you formatted it: bolded text is bolded, and italicized text is italicized. In markdown, however, you use text annotations for formatting. While your text won’t appear formatted in your editor, it is human-readable, and can easily be converted into a formatted document like a web page.

Style Markdown Output
italics This is some *italicized* text This is some italicized text
bold This is some **bold** text This is some bold text
nested bold/italics This is some **bold _and_ italicized** text This is some bold and italicized text
all bold/italics This is some ***bold and italicized*** text This is some bold and italicized text
strikethrough This is some ~~bad~~ text This is some bad text
code This is some code This is some code
link This is a [link](https://google.com) This is a link
image This is an image: ![alt text](../assets/images/logo.jpg) This is an image

That’s it! And if you need anything else (e.g., superscript), you can always use raw HTML: x2 turns into x2.

# Formatting blocks of text

In addition to basic text formatting, you can also do formatting on blocks of text. There are two main cases here: quotes and code blocks.

## Block quotes

Block quotes are sections of text that you’d like to put in its own little box. Although they are usually used for quotes, you can use them whenever. To make a block quote, just put > before each line of text!

Markdown:

1
2
3
4
> This is one, really, really, really, really,
> really, really, really, really, really,
> really, really, really, really, really,
> really long block of text.

Output:

This is one, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really long block of text.

## Code blocks

The other main usage for block formatting is when you have code blocks of any sort. To make a code block, just wrap the code with   on either side!

Markdown:

1
2
3
4
5
6
7
8
9
10
11
12

def fibonacci(n):
""" Compute the nth number in the fibonacci sequence. """
if n <= 0:
return 0
elif n == 1 or n == 2:
return 1
else:
return fibonacci(n-1) + fibonacci(n-2)

print([ fibonacci(x) for x in range(10) ])

Output:

1
2
3
4
5
6
7
8
9
10
def fibonacci(n):
""" Compute the nth number in the fibonacci sequence. """
if n <= 0:
return 0
elif n == 1 or n == 2:
return 1
else:
return fibonacci(n-1) + fibonacci(n-2)

print([ fibonacci(x) for x in range(10) ])

If you want to add syntax highlighting, just add the name of the programming language after the first set of ’s!

Markdown:

1
2
3
4
5
6
7
8
9
10
11
12
python
def fibonacci(n):
""" Compute the nth number in the fibonacci sequence. """
if n <= 0:
return 0
elif n == 1 or n == 2:
return 1
else:
return fibonacci(n-1) + fibonacci(n-2)

print([ fibonacci(x) for x in range(10) ])

Output:

1
2
3
4
5
6
7
8
9
10
def fibonacci(n):
""" Compute the nth number in the fibonacci sequence. """
if n <= 0:
return 0
elif n == 1 or n == 2:
return 1
else:
return fibonacci(n-1) + fibonacci(n-2)

print([ fibonacci(x) for x in range(10) ])

Now that you have all of your text formatted, you might want to add some structure to your document. Thankfully, this is just as easy as text formatting.

Headings are (sub)titles that introduce different sections of your document, denoted by #. They come in six levels of varying size:

Markdown:

1
2
3
4
5
6

Output:

## Lists

There are two types of lists in markdown: unordered and ordered lists.

To make an unordered list, simply use the dash - with indentation for sub-bullets:

Markdown:

1
2
3
4
- first thing
- second thing
- oh yeah, one more thing
- third thing

Output:

• first thing
• second thing
• oh yeah, one more thing
• third thing

To make an ordered list, you can use digits and periods instead of dashes:

Markdown:

1
2
3
4
1. first thing
2. second thing
- oh yeah, one more thing
3. third thing

Output:

1. first thing
2. second thing
• oh yeah, one more thing
3. third thing

## Tables

Finally, you can make tables using a combination of the pipe character |, dashes -, colons :, and text. Each line of text represents one row of the table, and each cell in a row is separated by a pipe |. The first row (after an optional table header) specifies the alignment of text in the table using dashes and colons: :--- for left-, :---: for center-, and ---: for right-aligned (at least 3 dashes, you can use more for padding).

Here’s an example of a table with one right-aligned column, one center-aligned column, and one left-aligned column.

Markdown:

1
2
3
|                   Column 1 |        Column 2        | Column 3                  |
| -------------------------: | :--------------------: | :------------------------ |
| this text is right-aligned |  this text is centered | this text is left-aligned |

Output:

Column 1 Column 2 Column 3
this text is right-aligned this text is centered this text is left-aligned


text:
Least degree of positive part in degree zero divisor class on compact Riemann surfaces

Consider a compact Riemann surface $M$ of genus $g>1$ and a divisor $D$ of degree zero. Any such divisor can be expressed as difference of two effective divisors: $D=E_1-E_2$, we can think of $E_1$ as positive part of $D$. In each linear equivalence class (i.e. divisor class), there ought to be a 'simplest' form, by which I mean a divisor $D_0=E_1^0-E_2^0\in [D]$ with deg$(E_1^0)=$deg$(E_2^0)$ being smallest in the whole class $[D]$.

For example if $D=(f)$ for some meromorphic function $f$ on $M$, then this number is zero, because $D\sim 0-0$. Furthermore, if $g>1$, any divisor of the form $D=x-y$ with $x\neq y$ cannot be further 'reduced' by linear equivalence, so the least degree of positive part for it is 1.

My question is: is there any general theory that characterizes the least degree of positive part of a divisor of degree zero?

For example, since the set of divisor class of degree zero is identified with set of line bundles of degree zero, that is the Jacobian $Jac(M)$, there should be a disjoint union $Jac(M)=Jac(M)_0\coprod Jac(M)_1\coprod \ldots$ where $Jac(M)_n$ consists of divisor class with least degree of positive part being $n$. Is any of these dense in the torus $Jac(M)$ with its usual topology? What is this partition of a complex torus look like geometrically?

This is the topic of the Riemann--Roch theorem, Clifford's theorem, and Brill--Noether theory.

For example, Riemann--Roch shows that if deg $D \geq g$, then there is an effective divisor linearly equivalent to $D$. This implies that if $D$ has degree zero, then we can write it as a difference of degree $g$ divisors. This gives an upper bound for your question.

In general, the morphism $\operatorname{Sym}^d C \times \operatorname{Sym}^d C \to \operatorname{Pic}^0 C$ sending $(D_1,D_2) \to D_1 - D_2$ has Zariski closed image (its source and target are projective), and so the partition you ask about is a partition of the Jacobian into Zariski locally closed subsets. Since the source of this morphism has dimension $2d$, while its target has dimension $g$, this shows directly that this morphism is not surjective if $d < g/2$. One can say much more than this, but maybe this is enough to start with.

As one more example, I'll show that if $g \geq 2$, then this map is surjective when $d = g-1$ (so any degree zero divisor can be written as a difference of effective divisors of dgree $g-1$).

We begin with a preliminary result. Namely, let $K$ denote the canonical divisor (which has degree $2g-2$), and for any effective degree $g-1$ divisor $D$, consider the linear series $|K-D|$. Riemann-Roch shows that this has positive dimension (here we use the fact that $D$ is effective), and so we may write $K \equiv D + D'$, where $D'$ is also of degree $g-1$.

Now suppose given $D$ of degree zero, and consider $D + K$. This has degree $2g-2$, which is $\geq g$ (b/c $g \geq 2$), and so we may find an effective divisor $E$ so that $D + K \equiv E$. Now write $E = E_1 +E_2$, where each of $E_1,E_2$ is effective of degree $g-1$, and then write $K \equiv E_1 + E_1'$ as in the preceding paragraph. Putting this all together, we get that $D + E_1' \equiv E_2,$ i.e. that $D\equiv E_2 - E_1'$, which shows that $D$ is linearly equivalent to the difference of effective divisors of degree $g-1$.

format: plain


text:
# r survival::survreg parameter estimation by formula

I have some difficulties understanding the use of the formula in survival::survreg. I am trying to estimate weibull parameters for different groups of data. For convenience I want to use the formula to group the data. Please consider the following code:

library(survival)

a <- rweibull(500, scale = 4, shape = 2)
a.ind <- rep('a', length(a))
b <- rweibull(700, scale = 6, shape = 3)
b.ind <- rep('b', length(b))

A <- data.frame(ttf = c(a,b), group = c(a.ind, b.ind))

fit <- survreg(Surv(ttf)~group, data = A, dist = "weibull")

fit.a <- survreg(Surv(a)~1, dist = "weibull")
fit.b <- survreg(Surv(b)~1, dist = "weibull")

My question is, why are the estimated parameters from fit different to the parameters estimated in fit.a and fit.b (e.g. coef(fit)[1] != coef(fit.a))?

• This really isn't really a programming question. You really seem to have a question about how the parameters are estimated in this particular statistical model such that individual contributions are not additive. This question can probably better be answered by a statistician than a programmer. Consider posting to Cross Validated instead. Dec 12 '14 at 20:55
• @MrFlick: Anybody who read the help pages in pkg:survival could answer the question.
– DWin
Dec 12 '14 at 22:37

When you fit the model, regardless of the number of groups, only one scale parameter is estimated. If you fix it, then the shape parameter estimates will be the same as you expect:

fit.scale <- survreg(Surv(ttf)~group, data = A, dist = "weibull", scale = 0.5)
fit.a.scale <- survreg(Surv(a)~1, dist = "weibull", scale = 0.5)

> coef(fit.scale)[1]
(Intercept)
1.376969
> coef(fit.a.scale)
(Intercept)
1.376969

(Also note that, as documented in ?survreg.distributions, the parameterization of the survreg Weibull distribution is different from that of rweibull. You can find the conversions in the examples at the bottom of ?survreg.)


text:
## Australia PM Gillard announces carbon pricing plan; transport fuels exempt, but lowered fuel tax credits to bring carbon price to some businesses

##### 10 July 2011
 Australia’s per capita CO2 emissions are higher than those of the US due to an emissions-intensive energy sector. Click to enlarge.

Australia Prime Minister Julia Gillard unveiled Australia’s carbon pricing plan—a core element in a new clean energy plan—in a short address to the nation. Under the scheme, around 500 of the largest emitters in Australia—facilities that have direct greenhouse gas emissions of 25,000 tonnes of CO2-equivalent per year or more (excluding emissions from transport fuels and some synthetic greenhouse gases)—will need to buy and surrender to the Government a permit for every tonne they produce. The Government intends to introduce legislation to underpin the carbon pricing mechanism into Parliament in the second half of 2011.

For the first three years, the carbon price will be fixed, before moving to an emissions trading scheme in 2015. In the fixed price stage, starting on 1 July 2012, the carbon price will start at A$23 (US$24.75) a tonne, rising at 2.5% a year in real terms. From 1 July 2015, the carbon price will be set by the market. Gillard said that by 2020, this would cut emissions by some 160 million tonnes per year.

The carbon pricing mechanism will cover four of the six greenhouse gases counted under the Kyoto Protocol: carbon dioxide, methane, nitrous oxide and perfluorocarbon emissions from the aluminium sector. The remaining greenhouse gases counted under the Kyoto Protocol (hydrofluorocarbons and sulphur hexafluoride) will face an equivalent carbon price, which will be applied through existing synthetic greenhouse gas legislation.

During the flexible price period, an overall cap will be placed on Australia’s annual greenhouse gas emissions from all sources of pollution covered by the carbon price. There will be no limits on individual sectors, firms or facilities. A price ceiling and floor will apply for the first three years of the flexible price period—i.e., the trading scheme. The price ceiling will be set at A$20 above the expected international price and will rise by 5% in real terms each year. The price floor will be A$15, rising annually by 4% in real terms.

More than half of Australia’s emissions will be directly covered by the carbon pricing mechanism and around two-thirds will be covered by a carbon price applied through various means.

We have had a long debate about climate change in this country. Most Australians now agree our climate is changing, this is caused by carbon pollution, this has harmful effects on our environment and on the economy—and the Government should act. Economists and experts agree that the best way is to make polluters pay by putting a price on carbon.

The first Australian Government to announce a plan for a carbon price was John Howard’s back in 2007. A lot has happened since then; the debate has been difficult and divisive. And no government—no political party or leader—can claim to have got everything right during this time. But we have now had the debate, 2011 is the year we decide that as a nation we want a clean energy future. Now is the time to move from words to deeds.

—Prime Minister Gillard

Transport fuels will be excluded from the carbon pricing mechanism. However, where applicable, an equivalent carbon price will be applied through changes in fuel tax credits or excise. A carbon price will be applied to domestic aviation, domestic shipping, rail transport, and non-transport use of fuels.

A carbon price will not apply to household transport fuels, light vehicle business transport and off-road fuel use by the agriculture, forestry and fishing industries. In addition, at a later date, the Government will seek to establish an effective carbon price for heavy on-road liquid fuel use from 1 July 2014.

More than 50% of the funds raised from the carbon price will be used to fund tax cuts, pension increases and higher family payments. These will be permanent, Gillard said, matching the carbon price over time. Some of the collected tax money will fund investments in clean technologies such as solar, wind and geothermal—an estimated A$100-billion worth of investment in renewable over the next 40 years, Gillard said. For governance, the Government will rely on three entities: • An independent statutory body, the Climate Change Authority, to provide independent advice to the Government on the performance of the carbon price and other initiatives. One of the Authority’s roles will be to make recommendations to the Government on the year-by-year steps, and on the longer-term path, that Australia should take towards its 2050 target. The Government will make the final decisions. The Authority will report regularly on progress, giving the public an independent assessment of progress. The Authority will complete its first review—which will provide recommendations on the carbon pricing mechanism’s first five years of pollution caps—by February 2014. • The Clean Energy Regulator to administer the carbon pricing mechanism. • The Productivity Commission will undertake reviews relating to industry assistance, fuel tax arrangements and carbon pollution reduction activities internationally. Other elements of the clean energy plan include: • To assist households with price impacts, there will be two rounds of tax cuts and increases in pensions, allowances and benefits. Significant tax reform will mean that more than 1 million people will no longer need to file a tax return. Increasing the tax-free threshold and cutting taxes also boosts incentives to work. Household transport fuel consumption will not be subject to a carbon price. • The Government will provide assistance to industry to support jobs and competitiveness for emissions-intensive, trade-exposed industries, manufacturing, food processing, metal forgers and foundries, electricity generators and small business, as agreed by the Multi-Party Climate Change Committee. The Government is also separately investing in protecting jobs in the steel and coal industries. • A A$10-billion new commercially-oriented Clean Energy Finance Corporation will invest in renewable energy, low pollution and energy efficiency technologies.

• The Government will seek to negotiate the closure of around 2000 megawatts of highly polluting electricity generation capacity by 2020 to reduce pollution and facilitate a smooth energy market transition.

• Farmers and land managers will receive significant support to pursue climate change action on the land and enhance biodiversity through a suite of measures including the Carbon Farming Initiative, the Carbon Farming Futures program and a new Biodiversity Fund. Emissions from agriculture will not be subject to a carbon price.

• Low Carbon Communities will help local councils and communities improve energy efficiency in community facilities, including a new Low Income Energy Efficiency Program.

A further suite of energy efficiency measures will be developed in response to the report of the Prime Minister’s Task Group on Energy Efficiency. These include implementing mandatory CO2 standards for light vehicles.

Resources

• Australia Clean Energy Future website

If coal fired power plants converted to IGCC, they would be cleaner and more efficient. They could also make synthetic fuels that would contain no sulfur nor benzene.

Now that the voters have been sufficiently greenhouse gassed it's time for the shakedown.

I said clearly to state terrorists(julia gillard) to do fuels with all industrial big chimneys co2 expels and recycling them back at the input.

Well, it won't likely pass since the Australian pols understand the public no longer believes AGW hype. And they are dropping the "greenhouse gas" references to a minimum.

Meaning they know the old AGW ploy is a total loss and only by calling this an alternative energy tax - do they stand a chance of legislating it.

The funds raised should it ever be passed will help build the brand new energy infrastructure of CHP LANR/CF appliances for residences and light industry.

Nobody has the right to pollute. Whoever does should pay the consequences. Australia's approach is defensible and could be part of the health care cost. USA should take note, specially with the current ultra high deficit.

The number one killer in the US is heart disease. The reason is a lousy diet and lack of sufficient exercise. It has nothing to do with CO2 in the atmosphere.

The number two killer for US males is prostate cancer. Again there is no correlation to CO2 emissions.

Frankly, to blame CO2 emissions for poor health of the population is just so much remararkable nonsense.

Man...there are many other pollutants more harmful to the human species. Fine particles from diesel and tires etc, tobacco smoke, fireplace smoke, nano-particles, many chemicals, additives, coloring, are but a few. It is difficult to establish which is worse for our health, funk foods or pollutants. Nobody has been seriouly counting.

Harvey, you mean there are many "real" pollutants more harmful... CO2 of course is not one of them. Else, why do we legally sell it for human consumption in thousands of products? Doh!

CO2 has more of a global consequence, we all know what that is, so to say it is harmful to humans we know what that means too. Climate change that brings drought with crop failures and famine is harmful.

And not just droughts. Have you noticed how many more places have seen floods?

Er, because there is a huge increase in precipitation? Which has alleviated drought. AKA natural variation.

AGWs hide their fundamental religious fervor behind a facade of bad science (drought!, floods! fires! - locusts!) See the pattern?

And IF CO2 were so God-awful, why not stop selling it in billions of gallons of beverages each year? Doesn't every little bit help?

You must live in a very small world if you believe precipitation in one part of it alleviates a drought in another part of it. Even in different parts of one country you can get hit by both at the same time.

http://news.bbc.co.uk/2/hi/south_asia/2170004.stm

http://indiatoday.intoday.in/site/video/Hunger+worry+after+flood+&+drought/1/53394.html

http://www.worldbank.org.in/WBSITE/EXTERNAL/COUNTRIES/SOUTHASIAEXT/INDIAEXTN/0,,contentMDK:22204311~pagePK:141137~piPK:141127~theSitePK:295584,00.html

http://news.rediff.com/slide-show/2010/aug/26/slide-show-1-shocking-drought-in-the-middle-of-indias-floods.htm

Secondly, I'm not talking about normal levels of precipitation. For every degree of temperature rise air gains the ability to take up another 4% of water. With "natural variation" in air temps precipitation become greater than before. AKA floods. Floods don't alleviate the suffering of having your crops dry up, they just add to it with the suffering of having your house washed away.

If you want to use flood waters to alleviate drought you have to have the infrastructure in place to contain it, store it, and move it from where you have too much to where you have too little.

And THAT costs a sh/t load of money and takes a lot of time.

We may not know the effects that global warming and climate change will bring for a while yet, but why take the chance when the potential downside is something that we can not reverse right away. Having to live with the consequences for generations would not be good.

Gentlemen... Assuredly the coming energy revolution will put a quick end to the speculation that man made CO2 is causing the planet to misbehave. It is not too optimistic to see the massive adoption of distributed energy utilizing one of several LANR variations at costs estimated to be around \$100/kW.

This will put a fast end to coal-fired plants under construction or in planning. The revolution is we now have a perfectly green technology to produce energy with. And fossil will be the first major sector to take the hit. Unless they opt to participate withOUT monopoly powers.

@ HarveyD

I'm all for eliminating, through technical means, pollutants which are harmful to human health such as lead, diesel particulates, sulfur, etc. but a carbon tax on CO2 which isn't related to any health issues just makes zero sense unless you're a politician looking for more revenues ie more power.

We have enough trouble paying for bank fraud because the politicians are in the pockets of the Banksters.

Dustbowls and the consequent lack of food are a health issue. The destruction of local economies from drought has health impacts (not unlike the foreclosure crisis). If you want to reduce everything to its effects on human well-being, you can show that AGW is not trivial either.

The comments to this entry are closed.


text:
mersenneforum.org Wrong count at the ECM status page
 Register FAQ Search Today's Posts Mark Forums Read

 2014-09-08, 15:04 #1 MatWur-S530113     Apr 2007 Spessart/Germany 2·34 Posts Wrong count at the ECM status page today I finished and reportet >5000 curves stage 1 (stage 2 will be done with GMP-ECM) with B1=44e6 for each of the 4 exponents (2621, 2633, 2659, 2663). http://www.mersenne.org/results/?exp...2700&limit=100 At my accounts result-page everything is ok, but on the ECM status page were added only ~3000 curves @ 11e6: http://www.mersenne.org/report_ecm/?...ecmnof_hi=2680
 2014-09-08, 16:32 #2 VBCurtis     "Curtis" Feb 2005 Riverside, CA 23×3×5×43 Posts It's pretty rare to find a factor in stage 1 ECM for numbers already trial-factored; until you run stage 2 on these curves, you haven't really contributed ECM.
 2014-09-08, 17:44 #3 MatWur-S530113     Apr 2007 Spessart/Germany 16210 Posts hmmmm as long as I did ECM on Mersenne numbers the GIMPS status page countet only the stages 1 of the curves. And as I said all stages 2 will be done with GMP-ECM (with B2~1000*B1 instead of only 100*B1, but only 1.5 times as long as with prime95). If I find a factor with those stages 2 you can be sure, you will hear from it . But if 20k+ curves say 'no factor' I don't post the GMP-ECM files... The status page is only a help to decide which B1 is the best atm for a number. If the number shown there is to low, the next one who want to run ECM-curves on that number will choose a B1 to small.
 2014-09-08, 18:39 #4 VictordeHolland     "Victor de Hollander" Aug 2011 the Netherlands 23·3·72 Posts The server did what it is supposed to do, you only uploaded the stage 1 results, so it calculates the probabilities based on that. Why don't you report stage 2 results to the server?
2014-09-08, 20:51   #5
Prime95
P90 years forever!

Aug 2002
Yeehaw, FL

777610 Posts

Quote:
 Originally Posted by MatWur-S530113 today I finished and reportet >5000 curves stage 1 (stage 2 will be done with GMP-ECM) with B1=44e6
The server calculated that 5000 curves at B1=44e6 is equivalent to 3000 curves at B1=44e6, B2=44e8. The ECM status page outputs the number of curves done assuming B2=100*B1.

When you finish B2 and report the 5000 curves B1=44e6, B2=lots*B1 then the server will again figure out the number of equivalent curves at B2=100*B1.

Note that this will "double count" the curves curves you just reported. This error in the table is not of great consequence. At worst someone might start doing curves at B1=110e6 at little earlier than optimal -- no big deal.

2014-09-08, 21:45   #6
MatWur-S530113

Apr 2007
Spessart/Germany

2×34 Posts

Because it is not possible.
Just for fun I tried to post my latest result file of one GMP-ECM-worker (~600 kB, ~600 results stage 2, to the manual results page of GIMPS, result:
Quote:
 Did not understand 3,217 lines.
I tried to post this file at James' page (mersenne.ca), too, same result...

Just an example of the file:

Code:
Resuming ECM residue saved with Prime95
Using B1=1, B2=44000000-62879096296, polynomial Dickson(12), sigma=1536107296100755
Step 1 took 0ms
Step 2 took 92570ms
So, tell me how an I will flood the server with some hundreds of MB in the near future (and will earn about more then 3 times the GHz-days for ECM)^^

addition: I read Prime95's answer in the preview of my post: The calculation is much clearer now, thank you. But how I have to post the stages 2 which I did with GMP-ECM ?

Last fiddled with by MatWur-S530113 on 2014-09-08 at 21:47 Reason: changed 'QUOTE' to 'CODE'

 2014-09-08, 22:16 #7 Prime95 P90 years forever!     Aug 2002 Yeehaw, FL 25×35 Posts Does GMP-ECM post a summary at the end that totals the number of curves and the bounds? If so, we can get James to upgrade the manual results page. If we cannot do that, then email the summary to me and your primenet userid and I can enter them into the manual results form under your userid. I make it look like the results come from prime95. The checksum won't be right, but the web form let's me bypass the checksum. I've done this for others. Fortunately, there aren't many doing the GMP-ECM thing.
2014-09-08, 23:57   #8
MatWur-S530113

Apr 2007
Spessart/Germany

2×34 Posts

Quote:
 Originally Posted by Prime95 Does GMP-ECM post a summary at the end that totals the number of curves and the bounds? If so, we can get James to upgrade the manual results page. If we cannot do that, then email the summary to me and your primenet userid and I can enter them into the manual results form under your userid. I make it look like the results come from prime95. The checksum won't be right, but the web form let's me bypass the checksum. I've done this for others. Fortunately, there aren't many doing the GMP-ECM thing.
'Of course' GMP-ECM does not post such a summary.
I remember that you already did this one time for me some years ago, but in this case it is not necessary.
I will pm James about this problem with some ideas for solution the next days. I'm sure we will find one.

 Similar Threads Thread Thread Starter Forum Replies Last Post PhoebeAnn Information & Answers 10 2013-12-15 23:20 Prime95 PrimeNet 17 2009-07-10 18:46 rudi_m PrimeNet 5 2009-06-08 16:49 petrw1 PrimeNet 36 2008-04-26 00:48 Deamiter Software 1 2002-11-09 06:24

All times are UTC. The time now is 21:26.

Wed Jan 26 21:26:45 UTC 2022 up 187 days, 15:55, 1 user, load averages: 1.57, 1.64, 1.71


text:
# Torsional Newton–Cartan geometry and the Schrödinger algebra

@article{Bergshoeff2014TorsionalNG,
title={Torsional Newton–Cartan geometry and the Schr{\"o}dinger algebra},
author={Eric Bergshoeff and Jelle Hartong and Jan Rosseel},
journal={Classical and Quantum Gravity},
year={2014},
volume={32},
pages={135017}
}
• Published 19 September 2014
• Physics
• Classical and Quantum Gravity
We show that by gauging the Schrodinger algebra with critical exponent z and imposing suitable curvature constraints, that make diffeomorphisms equivalent to time and space translations, one obtains a geometric structure known as (twistless) torsional Newton-Cartan geometry (TTNC). This is a version of torsional Newton-Cartan geometry (TNC) in which the timelike vielbein t mu must be hypersurface orthogonal. For z = 2 this version of TTNC geometry is very closely related to the one appearing in… Expand

#### Tables from this paper

Gauging the Carroll algebra and ultra-relativistic gravity
A bstractIt is well known that the geometrical framework of Riemannian geometry that underlies general relativity and its torsionful extension to Riemann-Cartan geometry can be obtained from aExpand
Newton-Cartan gravity and torsion
• Physics
• 2017
A bstractWe compare the gauging of the Bargmann algebra, for the case of arbitrary torsion, with the result that one obtains from a null-reduction of General Relativity. Whereas the two proceduresExpand
Hořava-Lifshitz gravity from dynamical Newton-Cartan geometry
• Physics
• 2015
A bstractRecently it has been established that torsional Newton-Cartan (TNC) geometry is the appropriate geometrical framework to which non-relativistic field theories couple. We show that when theseExpand
Field theories with Conformal Carrollian symmetry
• Physics
• Journal of High Energy Physics
• 2019
A bstractConformal Carrollian groups are known to be isomorphic to Bondi-Metzner-Sachs (BMS) groups that arise as the asymptotic symmetries at the null boundary of Minkowski spacetime. The CarrollianExpand
Torsional Newton-Cartan geometry from the Noether procedure
• Physics
• 2016
We apply the Noether procedure for gauging space-time symmetries to theories with Galilean symmetries, analyzing both massless and massive (Bargmann) realizations. It is shown that at the linearizedExpand
Warped conformal field theory as lower spin gravity
• Physics
• 2015
Two dimensional Warped Conformal Field Theories (WCFTs) may represent the simplest examples of field theories without Lorentz invariance that can be described holographically. As such they constituteExpand
Field theory on Newton-Cartan backgrounds and symmetries of the Lifshitz vacuum
• Physics
• 2015
A bstractHolography for Lifshitz space-times corresponds to dual field theories on a fixed torsional Newton-Cartan (TNC) background. We examine the coupling of non-relativistic field theories to TNCExpand
Higher Symmetries of the Schr\"odinger Operator in Newton-Cartan Geometry
We establish several relationships between the non-relativistic conformal symmetries of Newton-Cartan geometry and the Schr\"odinger equation. In particular we discuss the algebra $\mathfrak{sch}(d)$Expand
Holographic reconstruction of 3D flat space-time
A bstractWe study asymptotically flat space-times in 3 dimensions for Einstein gravity near future null infinity and show that the boundary is described by Carrollian geometry. This is used to addExpand
Newton-Cartan supergravity with torsion and Schrödinger supergravity
• Physics
• 2015
A bstractWe derive a torsionfull version of three-dimensional N=2$$\mathcal{N}=2$$ Newton-Cartan supergravity using a non-relativistic notion of the superconformal tensor calculus. TheExpand

#### References

SHOWING 1-10 OF 58 REFERENCES
Boundary stress-energy tensor and Newton-Cartan geometry in Lifshitz holography
• Physics
• 2014
A bstractFor a specific action supporting z = 2 Lifshitz geometries we identify the Lifshitz UV completion by solving for the most general solution near the Lifshitz boundary. We identify all theExpand
Torsional Newton-Cartan geometry and Lifshitz holography
• Physics
• 2014
We obtain the Lifshitz UV completion in a specific model for z=2 Lifshitz geometries. We use a vielbein formalism which enables identification of all the sources as leading components of well-chosenExpand
Null-Killing vector dimensional reduction and Galilean geometrodynamics
• Physics
• 1995
The solutions of Einstein's equations admitting one non-null Killing vector field are best studied with the projection formalism of Geroch. When the Killing vector is lightlike, the projection ontoExpand
Newtonian gravity and the Bargmann algebra
• Physics
• 2011
We show how the Newton-Cartan formulation of Newtonian gravity can be obtained from gauging the Bargmann algebra, i.e., the centrally extended Galilean algebra. In this gauging procedure severalExpand
Non-relativistic conformal symmetries and Newton–Cartan structures
• Mathematics, Physics
• 2009
This paper provides us with a unifying classification of the conformal infinitesimal symmetries of non-relativistic Newton–Cartan spacetime. The Lie algebras of non-relativistic conformalExpand
Schrödinger Invariance from Lifshitz Isometries in Holography and Field Theory
• Physics
• 2015
We study non-relativistic field theory coupled to a torsional Newton-Cartan geometry both directly as well as holographically. The latter involves gravity on asymptotically locally LifshitzExpand
Conformal Lifshitz gravity from holography
• Physics, Mathematics
• 2012
A bstractWe show that holographic renormalization of relativistic gravity in asymptotically Lifshitz spacetimes naturally reproduces the structure of gravity with anisotropic scaling: the holographicExpand
Lifshitz holography: the whole shebang
• Physics
• 2014
A bstractWe provide a general algorithm for constructing the holographic dictionary for any asymptotically locally Lifshitz background, with or without hyperscaling violation, and for any values ofExpand
3D Newton?Cartan supergravity
• Physics
• 2013
We construct a supersymmetric extension of three-dimensional Newton–Cartan gravity by gauging a super-Bargmann algebra. In order to obtain a non-trivial supersymmetric extension of the BargmannExpand
Holographic renormalization for z = 2 Lifshitz spacetimes from AdS
• Physics
• 2012
Lifshitz spacetimes with the critical exponent z = 2 can be obtained by the dimensional reduction of Schrodinger spacetimes with the critical exponent z = 0. The latter spacetimes are asymptoticallyExpand


text:
# What is the slope and y-intercept of the line 8y - 2x = -4?

Mar 18, 2018

See the explanation

#### Explanation:

$8 y - 2 x = - 4$

Convert it in the form of $y = m x + c$

Here , $m$ is the slope of the line and $c$ is the $y$-intercept.

$\implies 8 y = 2 x - 4$

Divide by $2$ both sides

$\implies 4 y = x - 2$

$\implies y = \frac{1}{4} x - \frac{2}{4}$

$\implies y = \frac{1}{4} x - \frac{1}{2}$

On equating with $y = m x + c$

$\implies m = \frac{1}{4} \left(\text{Slope}\right)$

$\implies c = - \frac{1}{2} \left(y - \text{intercept}\right)$


text:
# 돼지에서 plasma protein에 의한 세포성면역 증진효과에 관한 연구 2. 혈액내 T 림프구 아군 및 MHC class 세포의 분포율

Plasma protein which has been known as one of nonspecific immunostimulators was added to feedstuff to examine its effect on the enhancement of cellular immune response in porcine immune system. A total of 40 piglets, 20 male and 20 female each, were fed for 30 days with or without plasma protein. The peripheral blood were collected and analyzed for the investigation of leukocyte subpopulations and their activities by using a panel of monoclonal antibodies specific to porcine leukocyte differentiation antigens and flow cytometry. The results obtained as follows. 1. Subpopulations expressing major histocompatibility complex(MHC) class I antigen were $96.2{\pm}3.1%$ and $86.6{\pm}3.8%$ in piglets fed with plasma protein and in piglets fed without plasma protein, respectively. 2. Proportion of leukocyte subpopulation expressing MHC class II antigens were significantly higher in the piglets fed with plasma protein than ones without plasma protein. The proportion was $27.6{\pm}3.6%$ and $16.6{\pm}2.2%$ in MHC class II DQ antigen, and $28.1{\pm}2.0%$ and $20.0{\pm}0.3%$ in MHC class II DR antigen, respectively. 3. A significant increase in the proportion of cells expressing poCD2 was not found in piglets fed plasma protein. 4. Proportion of subpopulation expressed porcine(Po) CD4 antigens which specific to helper T lymphocytes were not increased (18.3-19.1% vs. 25.6-28.8%), rather slightly decreased, in plasma protein-treated group. 5. The most important increase of proportion in plasma protein-treated group was the leukocyte subpopulation specific to $poCD8^+$ T cytotoxic/suppressor lymphocytes. The expression level was significantly higher up to 45.9-47.1% in plasma protein-treated group in comparing with 29.7-33.0% in non-plasma protein-treated group. 6. Lymphoblastogenetic responses using different concentrations of Con A mitogen and plasma protein has found that the responses of lymphocyte from piglets fed plasma protein was significantly activated (p<0.01). The activities measured by 3[H]-thymidine incorporation showed 3-6 times stronger in plasma protein-treated group than those in non-plasma protein-treated group. The study has concluded that plasma protein, which has known as a nonspecific immunostimulator, may have an immunoenhancing activities in porcine lymphoid system by increase the activated cell proportions and their blastogenetic properties which is critical to host immune responses.


text:
View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Textures not working in OpenGL 3+

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

13 replies to this topic

### #1blueshogun96  Members

Posted 17 January 2014 - 12:33 AM

I've been trying to make the transition to OpenGL 3.2 from OpenGL 2.1, and no matter what I do, textures just won't work!

My code for using textures has never failed me using OpenGL 2.1, and I have no idea why it's not working here.  I've checked various tutorials, guides, and similar questions.  Tried everything I could possibly think of, nothing fixed it.  I've checked for error codes, but I get GL_INVALID_ENUM everywhere!  Geometry works fine, all of the uniforms and attributes are located without problems.  So, I'm really lost here.

As much as I hate to just dump a load of code on you all, I have a very short amount of time to get this working, and I've already spent 2 hours trying to fix this.

vertex program:

#version 150

in  vec4 ipos;  /* Vertex position */
in  vec3 inor;  /* Vertex normal */
in  vec4 icol;  /* Vertex diffuse colour */
in  vec2 itex;  /* Vertex texture coordinates */

uniform mat4 mvp;   /* Modelview Projection matrix */
//uniform mat3 nm;    /* Normal matrix */

out vec4 ocol;  /* Output colour */
out vec2 otex;  /* Output texture coordinates */

void main()
{
/* Transform vertices */
gl_Position = mvp * ipos;

/* Transform normals */
mat3 nm = mat3(mvp);
vec3 normal = normalize( nm * inor );

/* Calculate light direction */
vec3 light_dir = vec3( 1.0, 1.0, -1.0 );
light_dir = normalize( light_dir );

/* Calculate the angle between the normal and the light's direction */
float n_dot_l = max( dot( normal, light_dir ), 0.0 );

/* Multiply vertex colour with the result */
ocol = icol * n_dot_l;

/* Pass through texture coordinates */
otex = itex;
}

fragment program:

#version 150

in vec4 ocol;
in vec2 otex;
out vec4 frag;

uniform sampler2D tex;

void main()
{
frag = ocol * texture( tex, otex );
}

Relevant code:

bool create_texture( const char* filename, unsigned int* tex )
{
int x, y, comp, req_comp = STBI_rgb_alpha;

stbi_uc* p = stbi_load( filename, &x, &y, &comp, req_comp );
if(p)
{
GLenum format = ( comp == 3 ) ? GL_RGB : GL_RGBA;

glGenTextures( 1, tex );
glBindTexture( GL_TEXTURE_2D, *tex );
glTexImage2D( GL_TEXTURE_2D, 0, format, x, y, 0, format, GL_UNSIGNED_BYTE, p );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
glGenerateMipmap( GL_TEXTURE_2D );

stbi_image_free(p);
}
else
{
return false;
}

return true;
}

bool init_vbo()
{
float* vertices = NULL;
float* normals = NULL;
float* texcoords = NULL;
object_type* obj = new object_type();
int vertex_count;

if( !create_texture( "/Users/admin/shogun3d/luna/media/mesh/dolphin/DOLPHIN.bmp", &texture ) )
return false;

return false;

vertex_count = obj->getvertices( &vertices, &normals, &texcoords );
prim = vertex_count/3;

printf( "Primitive count: %d\n", vertex_count );

delete obj;

glGenVertexArrays( 1, &vao );

glBindVertexArray(vao);
glGenBuffers( 3, vbo );
glBindBuffer( GL_ARRAY_BUFFER, vbo[0] );
glBufferData( GL_ARRAY_BUFFER, vertex_count*3*sizeof(float), vertices, GL_STATIC_DRAW );
glVertexAttribPointer( (GLuint) attrib_v_pos, 3, GL_FLOAT, GL_FALSE, 0, 0 );
glEnableVertexAttribArray(attrib_v_pos);

glBindBuffer( GL_ARRAY_BUFFER, vbo[1] );
glBufferData( GL_ARRAY_BUFFER, vertex_count*3*sizeof(float), normals, GL_STATIC_DRAW );
glVertexAttribPointer( (GLuint) attrib_v_normal, 3, GL_FLOAT, GL_FALSE, 0, 0 );
glEnableVertexAttribArray(attrib_v_normal);

glBindBuffer( GL_ARRAY_BUFFER, vbo[2] );
glBufferData( GL_ARRAY_BUFFER, vertex_count*2*sizeof(float), texcoords, GL_STATIC_DRAW );
glVertexAttribPointer( (GLuint) attrib_v_tex, 2, GL_FLOAT, GL_FALSE, 0, 0 );
glEnableVertexAttribArray(attrib_v_tex);

glBindVertexArray(0);

//glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );

delete [] vertices;
delete [] normals;
delete [] texcoords;

return true;
}

void draw_vbo()
{
extern Matrix4 projection_matrix;
Matrix4 translation_matrix, rotation_matrix, modelview_matrix, mvp_matrix;
VmathVector3 translation_vector = { 0.0f, 0.0f, -15.0f };
static float angle = 0;

translation_matrix = M4MakeTranslation( translation_vector );
rotation_matrix = M4MakeRotationY( angle ); angle += 0.04f;
modelview_matrix = M4Mul( translation_matrix, rotation_matrix );
mvp_matrix = M4Mul( projection_matrix, modelview_matrix );

glUniform1i( uniform_tex, 0 );
glEnable( GL_TEXTURE_2D );
glActiveTexture( GL_TEXTURE0 );
glBindTexture( GL_TEXTURE_2D, texture );
glUniformMatrix4fv( uniform_mvp, 1, false, &mvp_matrix.col0.x );
glBindVertexArray(vao);
glVertexAttrib4f( attrib_v_colour, 1.0, 1.0, 1.0, 1.0 );
glDrawArrays( GL_TRIANGLES, 0, prim*3 );
}

I've checked this over so many times, and can't find a single thing wrong with it.  All I know is that it isn't working, and I'm actually in the middle of preparing for a coding competition on Saturday.  Good thing I'm not running into this during the competition.  But still, this sucks.  Any ideas?  Thanks.

Shogun.

Follow Shogun3D on the official website: http://shogun3d.net

"Yo mama so fat, she can't be frustum culled." - yoshi_lol

"One objection to a “critique of C#” would be that you can’t talk about C# without talking about the whole “.Net experience”. However, one can approach the topic of Hitler without a complete discussion of Nationalist Socialism, so I feel justified." - Steve White.

### #2Sponji  Members

Posted 17 January 2014 - 03:49 AM

So, have you checked where those invalid enums come from? At least glEnable(GL_TEXTURE_2D) shouldn't be used, but I don't think that's the problem.

Derp

### #3blueshogun96  Members

Posted 17 January 2014 - 10:27 AM

I have checked (that was my first course of action), and they come randomly it looks like.  Even after moving on from that error, it continues to give me that, while other functions still work.

Shogun.

EDIT: Got rid of glEnable( GL_TEXTURE_2D ); and that stopped the errors.  Still no textures though.

Edited by blueshogun96, 17 January 2014 - 10:39 AM.

Follow Shogun3D on the official website: http://shogun3d.net

"Yo mama so fat, she can't be frustum culled." - yoshi_lol

"One objection to a “critique of C#” would be that you can’t talk about C# without talking about the whole “.Net experience”. However, one can approach the topic of Hitler without a complete discussion of Nationalist Socialism, so I feel justified." - Steve White.

### #4cgrant  Members

Posted 17 January 2014 - 12:00 PM

I'm assuming uniform_tex is the uniform location associated with the sampler in your fragment shader..If so did you check that you are getting back a valid location ?

### #5blueshogun96  Members

Posted 17 January 2014 - 01:35 PM

Yes, I did. When my vertex and fragment programs are loaded, the uniform_tex variable has a valid value. I checked it against -1.
Follow Shogun3D on the official website: http://shogun3d.net

"Yo mama so fat, she can't be frustum culled." - yoshi_lol

"One objection to a “critique of C#” would be that you can’t talk about C# without talking about the whole “.Net experience”. However, one can approach the topic of Hitler without a complete discussion of Nationalist Socialism, so I feel justified." - Steve White.

### #6Ohforf sake  Members

Posted 17 January 2014 - 02:18 PM

Is GL_RGB actually a valid internal format? I believe you have to use GL_RGBA8, even for 3 component textures.

### #7blueshogun96  Members

Posted 17 January 2014 - 03:24 PM

Tried it, still didn't work.

Follow Shogun3D on the official website: http://shogun3d.net

"Yo mama so fat, she can't be frustum culled." - yoshi_lol

"One objection to a “critique of C#” would be that you can’t talk about C# without talking about the whole “.Net experience”. However, one can approach the topic of Hitler without a complete discussion of Nationalist Socialism, so I feel justified." - Steve White.

### #8haegarr  Members

Posted 17 January 2014 - 03:35 PM

This line in the fragment shader

frag = ocol * texture( tex, otex );

need to be

frag = ocol * texture2D( tex, otex );

The driver should have told you an error like "function texture not declared" or so. Please check the state of compiled scripts before linking.

EDIT: Ups

Edited by haegarr, 18 January 2014 - 04:06 AM.

### #9blueshogun96  Members

Posted 17 January 2014 - 05:36 PM

texture2D is deprecated.

Keep in mind that I'm using GLSL 1.50, not 1.20.  Using texture2D will automatically generate errors.  Using texture in GLSL 1.50+ will automatically detect the sampler type.

Any more ideas?

Follow Shogun3D on the official website: http://shogun3d.net

"Yo mama so fat, she can't be frustum culled." - yoshi_lol

"One objection to a “critique of C#” would be that you can’t talk about C# without talking about the whole “.Net experience”. However, one can approach the topic of Hitler without a complete discussion of Nationalist Socialism, so I feel justified." - Steve White.

### #10Sponji  Members

Posted 18 January 2014 - 06:26 AM

Have you tried simplifying your shaders? That's usually one of the first things I do when something isn't working, commenting "unnecessary" stuff out. Like, are you sure your normals are correct? Is the light position is fine? Maybe try doing just simple out = texture(texmap, texcoord) in the fragment shader. And if it still wouldn't work, I'd use some OpenGL debugger (gDebugger) to see if it would tell me something.

Derp

### #11richardurich  Members

Posted 18 January 2014 - 08:40 AM

Are you using glGetError after every function when you say you're getting GL_INVALID_ENUM everywhere? The error doesn't clear until you call glGetError, so if you called 100 functions before calling glGetError the error could be for any one of the 100 functions. If so, it's probably only the first GL_INVALID_ENUM that matters since the others are likely just ripple effects.

The code you provided is way too long for me to try to debug without being able to compile and run it, so knowing which OpenGL call is the first one to generate an error would really help focus on a small enough amount of code to be manageable.

Also, it appears GL_RGB is a valid internal format for glTexImage2D since it's in table 1. People do normally use sized or compressed formats though.

### #12Charon  Members

Posted 18 January 2014 - 09:50 AM

What about using ARB_debug_output or KHR_debug to pinpoint the place where something is going wrong?

chaos, panic and disorder - my work here is finished

### #13mark ds  Members

Posted 25 January 2014 - 10:17 AM

Is the value of icol (in your vertex shader) zero by any chance?

What are the values of attrib_v_pos, attrib_v_normal & attrib_v_tex?

### #14arka80  Members

Posted 26 January 2014 - 03:28 PM

You are loading a bmp, according to these tutorials bmp stores bytes in BGR format, not RGB: glTexCoord2d call should be:

glTexImage2D(GL_TEXTURE_2D, 0,GL_RGB, width, height, 0, GL_BGR, GL_UNSIGNED_BYTE, data);

Maybe...

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


text:
# Simplification

• August 6th 2009, 07:23 PM
Dranalion
Simplification
Hello,

I am having trouble trying to simplify the following expression;

cos^2(x) - tan^2(x) / 1 + tan^2(x)

Help is much appreciated,

Dranalion
• August 6th 2009, 07:42 PM
songoku
Hi Dranalion

You can try to apply identity : $1 + \tan^2(x) = sec^2(x)$
• August 6th 2009, 07:58 PM
Dranalion
Given the identity,
sec^2(x) = 1 + tan^2(x)

This makes the identity:

cos^2(x) - tan^2(x)/sec^2(x)

Which is:

cos^2(x) - tan^2(x)/(1/cos^2(x))

How do I further simplify this expression?
• August 6th 2009, 08:04 PM
eXist
Quote:

Originally Posted by songoku
Hi Dranalion

You can try to apply identity : $1 + \tan^2(x) = sec^2(x)$

After you apply this you have:

$\frac{cos^2(x) - tan^2(x)}{sec^2(x)} = \frac{cos^2(x) - tan^2(x)}{\frac{1}{cos^2(x)}} = (cos^2x - tan^2x)(cos^2x) = cos^4x - sin^2x$

Hope this helps
• August 6th 2009, 08:08 PM
Dranalion
Sorry, the identity is actually the divided term to be subtracted from cos^2(x), as in:

cos^2(x) - [ tan^2(x)/(1/cos^2(x)) ]
• August 6th 2009, 08:14 PM
eXist
Then you just have this:

$cos^2x - \frac{tan^2x}{sec^2x} = cos^2x -$ $\frac{tan^2x}{\frac{1}{cos^2x}} = cos^x - (tan^2x)(cos^2x) = cos^2x - sin^2x$

• August 6th 2009, 08:20 PM
Dranalion
Thanks!

If you have cos^2(x) - sin^2(x), can you use the identity:
sin^2(x) + cos^2(x) = 1 to somehow simplify this further? Or is this as far as it can be simplified?
• August 6th 2009, 08:23 PM
eXist
Careful, we have: $cos^2x - sin^2x$

The identity reads: $cos^2x + sin^2x = 1$

Ours is not the same. In ours, we have the difference, so we cannot use that identity here.
• August 7th 2009, 07:45 AM
songoku
Hi Dranalion

$cos^2x - sin^2x = \cos(2x)$


text:
# Solving Quadratic Equations Word Problems

Then, use the zero product property to find the solution!We will discuss here how to solve the word problems using quadratic formula. If the speed of the stream is 1.5 km/h, find the speed of the boat in still water.

Tags: Edmund Wilson Essay HorrorEssay On Men And Women Communication12th Std Julius Caesar EssayPrinting Business PlanBusiness Plan For VcNuig Phd ThesisEssays On Human Growth And Development

In this tutorial, you'll see how to factor a quadratic equation using the guess and check method of factoring.Thus, in one single day Andrew covers part of the roof area, while Bill covers part of the roof area. Two tubes, working together, can fill the reservoir with the liquid in 12 hours.Working together, Andrew and Bill make of the whole work in each single day. The second root does not fit the given conditions: if Bill covers the roof in two days, then Andrew has 2-5=-3 days, which has no sense. The larger tube, if works separately, can fill the reservoir in 18 hours faster than the smaller tube. Find the number of girls present in the Sports Meet. In the Annual Sports Meet in a girls’ school, the girls present in the meet, when arranged in a solid square has 16 girls less in the front row, than when arranged in a hollow square 4 deep.Then, the speed of the boat up the stream (or against the stream) = (x - $$\frac$$) km/hour, and the speed of the boat down the stream (or along the stream) = (x $$\frac$$) km/hour.Therefore, time taken to travel 10 km up the stream = $$\frac$$ hours and time taken to travel 5 km down the stream = $$\frac$$ hours.i have tried them times and again, but nothing seems to work at all! The distributive property is a very deep math principle that helps make math work.In this lesson we present some typical word problems that may be solved using quadratic equations.Solution of quadratic equations is described in the lesson Introduction into Quadratic Equations in this module. Solution Let be the unknown current speed of the river in miles/hour.

• ###### Word Problems Quadratic Equations - Varsity Tutors

Word Problems Quadratic Equations Quadratic equations are quadratic functions that are set equal to a value. A quadratic equation is an equation that can be written in the standard form a x 2 + b x + c = 0, where a ≠ 0 and a, b, and c are integers.…

• ###### Quadratic Equations Problems with Solutions - Math

Quadratic Equations Problems with Solutions. Solve the quadratic equation texx^2+14x+45=0/tex In the answer box, write the roots separated by a comma.…

• ###### Three Methods of Solving Quadratics and Word Problems

Solve quadratic equations by inspection e.g. for xsup2/sup = 49, taking square roots, completing the square, the quadratic formula and factoring, as appropriate to the initial form of the equation. Recognize when the quadratic formula gives complex solutions and write them as a Â± bi for real numbers a and b.…

• ###### Solving quadratic equations from word problems.

Step by step guide to solving linear equations. When a linear equation is given, the following steps are taken to solve it and get the value of the unknown. 1. Identify the unknown to be solved for. If, for instance we have x + 3 = 7 - x, the unknown to be solved for is x. 2. Identify the like terms in the equation.…

• ###### How to solve Quadratic word problems -

Tips for quadratic word problems Carefully read down the full problem and understand the situation. Now looks for the condition, operations given in the word problem and find all. Here are some of the operation which you can find in word problem and their mathematical meaning. Now go for the.…

• ###### QUADRATIC WORD PROBLEMS -

HOW TO SOLVE QUADRATIC EQUATIONS Step 1 Write equation in Standard Form. Step 2 Factor the quadratic equation. Step 3 After the problem has been factored we will complete a step called the “T” chart. Create a T separating the two. Step 4 Once are separated, set each = to 0 and solve for the variable. Step 5 Check each of the roots in the ORIGINAL quadratic equation. 1.…

• ###### How to Solve Word Problems Requiring Quadratic Equations

Some word problems require quadratic equations in order to be solved. In this article, you will learn how to solve those types of problems. Once you get the hang of it, it will be very easy.…

• ###### Unit 6 Quadratic Word Problems -

QUADRATIC WORD PROBLEMS. Solving Quadratic Equations. Example 1 A rectangular lawn measuring 8 m by 4 m is surrounded by a flower bed of uniform width. The combined area of the lawn and the flower bed is 165 m 2.…


text:
# I cannot solve this recurrence...

$$\displaystyle a_n=x^n+ \frac{1}{x^n}$$.

I've found the following relation :

$$a_n=a_{n-1}.a_1 -a_{n-2}$$

Imagine we know the first term $$a_1$$, so $$\displaystyle a_1=x+\frac{1}{x}=c$$ (c is a constant).

Now can we find a general formula for $$a_n$$ involving c?I know that we can solve for x in $$a_1$$ , but then in $$x^{-n}$$ the denominator would be an ugly mess...

So my idea was to solve the recurrence relation

$$a_{n}=c.a_{n-1}-a_{n-2}$$.

We get $$a_2=c^2-2$$, $$a_3=c^3-3c$$, $$a_4=c^4-4c^2+2$$ etc.

Now look at $$a_4$$. It turns out it is equal to $$a_2^2 -2$$. Remind you of something?

That is kind of weird, isn't it?

Note by Bogdan Simeonov
4 years, 3 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

The expressions for $$a_n$$ are related to the Chebyshev Polynomial of the First Kind. You can find more information at the usual websites:

http://en.wikipedia.org/wiki/Chebyshev_polynomials

- 4 years, 3 months ago

Hmm...I can't find a relation between these Chebyshev polynomials and $$a_n$$...Could you please explain what they have in common?

- 4 years, 3 months ago

Let $$T_n(x)$$ denote the $$n$$th Chebyshev Polynomial of the First Kind. Then $a_n = 2 T_n \left( \frac{c}{2} \right).$

For example, $$T_3(x) = 4x^3 - 3x$$, so $a_3 = 2 T_3 \left( \frac{c}{2} \right) = 2 \left[ 4 \left( \frac{c}{2} \right)^3 - 3 \cdot \frac{c}{2} \right] = c^3 - 3c.$

- 4 years, 3 months ago

Aha!Now I get it...you let x=c/2 and then expressed $$a_n$$ as $$2T_n(\frac{c}{2})$$ .So the formula I got is actually the same as the one on the Wikipedia page , which says

$$\displaystyle T_n(x)=\frac{(x-\sqrt{x^2-1})^n +(x+\sqrt{x^2-1})^n }{2}$$

- 4 years, 3 months ago

There you go! Well done.

- 4 years, 3 months ago

You could solve it by considering the characteristic equation of the recurrence, which will be $$x^{2}-cx+1=0$$ Letting both solutions be $$a,b$$ you couldn't then 'hope' the general formula is of the form $$a_{n}=ua^{n}+vb^{n}$$ some constants $$u,v$$ then as you can calculate the first couple of terms of the sequence manually, you could solve the simultaneous equations for $$u,v$$ and maybe that might be your formula?

- 4 years, 3 months ago

That worked!Thanks! But that's practically solving for x in $$1+ \frac{1}{x}=c$$,which is equivalent to the characteristic equation.That is why u=v=1 works, because by Vieta we get ab=1, or $$a=\frac{1}{b}$$.So $$a^n+b^n=x^n+x^{-n}=a_n$$.That means that the only thing we needed is to solve for x in $$a_1$$... The final formula is

$$\displaystyle a_n=(\frac{(c+\sqrt{c^2-4})}{2})^n+(\frac{(c-\sqrt{c^2-4})}{2})^n$$

I don't know why, but I still am kind of confused :D

- 4 years, 3 months ago

The formula you got doesn't look too dissimilar to that for Chebyshev polynomials

- 4 years, 3 months ago

i know it can be generalized but how many times to write 2,how you will decide\

- 4 years, 3 months ago


text:
Lemma 37.58.6. Let $f : X \to S$ be a morphism of schemes. Assume $S$ is regular and $f$ is locally of finite type. Then $f$ is perfect.

Proof. See More on Algebra, Lemma 15.82.5. $\square$

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).


text:
pwiselinterp {cmna} R Documentation

Piecewise linear interpolation

Description

Finds a piecewise linear function that interpolates the data points

Usage

pwiselinterp(x, y)

Arguments

 x a vector of x values y a vector of y values

Details

pwiselinterp finds a piecewise linear function that interpolates the data points. For each x-y ordered pair, there function finds the unique line interpolating them. The function will return a data.frame with three columns.

The column x is the upper bound of the domain for the given piece. The columns m and b represent the coefficients from the y-intercept form of the linear equation, y = mx + b.

The matrix will contain length(x) rows with the first row having m and b of NA.

Value

a matrix with the linear function components

Other interp: bezier, bilinear(), cubicspline(), linterp(), nn(), polyinterp()

Other algebra: bilinear(), cubicspline(), division, fibonacci(), horner(), isPrime(), linterp(), nthroot(), polyinterp(), quadratic()

Examples

x <- c(5, 0, 3)
y <- c(4, 0, 3)
f <- pwiselinterp(x, y)

[Package cmna version 1.0.5 Index]


text:
1. ## challenging rate problem

Dear Sir,
I would apppreciate very much if someone can help me in the below problem.
Thanks.

Tom and John were jogging along a circular track surrounding a pond. The track measured 640 m. If they started from the same place and jogged in the same direction, Tom would take 16 minutes to catch up with John. If they jogged in the opposite direction, they would meet every 4 minutes. How long did Tom take to jog one round of the track?

2. ## Re: challenging rate problem

@kingman

My GUESS(i'm not completely sure):

Algebraically:
640meters; Distance or circumference of the track
4mintues; How much time passes when Tom is passed by John
640meters/4mintues = 120meters; Distance Tom travels when he is passed by John
640meters/120meters = 8laps; Number of 120m segments
8laps * 4mintues = 32minutes; How much time it takes Tom to complete the track

NOTE: Units are incorrect.

Graphing:

@All

What are the three ways to solve math problems? I forgot.

3. ## Re: challenging rate problem

Since Tom must jog 1 lap (640 m) more than John before catching up,
then the problem is same as Tom starting off 1 lap (640m) behind John:
Code:
             (640)            John........@ a mpm.............>16 min

Tom.......................@ (160 - a) mpm.....................>16 min
Since they meet every 4 min if starting in different directions, then
combined speed is 640/4 = 160 mpm (meters per minutes):
then, let John's speed = a mpm: then Tom's speed = 160 - a mpm.

Using the basic speed = distance / time formula, then for Tom:
(16a + 640) / (160 - a) = 16
Solve to get a = 60 : so Tom's speed = 160 - 60 = 100 mpm.

So time for Tom to jog 1 lap = 640 / 100 = 6.4 min = 6 min 24 sec.

4. ## Re: challenging rate problem

Originally Posted by ArcherSam
What are the three ways to solve math problems? I forgot.
LSP: Listen, Study, Practice !

How did you get this: "640meters/4mintues = 120meters" ? 640 / 4 = 160 ; no coffee yet?

5. ## Re: challenging rate problem

Originally Posted by Wilmer
Since Tom must jog 1 lap (640 m) more than John before catching up,
then the problem is same as Tom starting off 1 lap (640m) behind John:
Code:
             (640)            John........@ a mpm.............>16 min

Tom.......................@ (160 - a) mpm.....................>16 min
Since they meet every 4 min if starting in different directions, then
combined speed is 640/4 = 160 mpm (meters per minutes):
then, let John's speed = a mpm: then Tom's speed = 160 - a mpm.

Using the basic speed = distance / time formula, then for Tom:
(16a + 640) / (160 - a) = 16
Solve to get a = 60 : so Tom's speed = 160 - 60 = 100 mpm.

So time for Tom to jog 1 lap = 640 / 100 = 6.4 min = 6 min 40 sec.

thanks but is'nt 6.4 mins equals 6 mins and 24 secs.

6. ## Re: challenging rate problem

Can you explain how you reason out that Tom must jog 1 lap (640 m) more than John before catching up.
They started at the same point ( for eg point A) and I wonder whether they meet at same point A after 16 mins.
thanks

7. ## Re: challenging rate problem

Originally Posted by kingman
thanks but is'nt 6.4 mins equals 6 mins and 24 secs.

8. ## Re: challenging rate problem

Originally Posted by kingman
Can you explain how you reason out that Tom must jog 1 lap (640 m) more than John before catching up.
They started at the same point ( for eg point A) and I wonder whether they meet at same point A after 16 mins.
thanks
A little "difficult" to "see", I agree; here's proof:
16 min @ 100 = 1600 m - 2*640 = 320
16 min @ 60 = 960 - 640 = 320
So Tom catches up at point 320 m , having gone around 1 extra "640".

Anyhow, YOU draw a circle and simulate what's happening; you'll see!

9. ## Re: challenging rate problem

I agree that it's difficult to see if they're both moving. But if you use the standard trick of letting John stand still the whole time and Tom run at the rate of T-J, where T is Tom's speed and J is John's, then Tom will complete a lap at this new speed in 16 minutes, giving 16(T-J)=640.

You also know that if you combine their speeds, they do a lap in 4 minutes, so 4(T+J)=640.

10. ## Re: challenging rate problem

Originally Posted by LoblawsLawBlog
But if you use the standard trick...
Agree LLB; however, I feel it is better for someone to first understand...then use shortcuts...


text:
Welcome to ZOJ
 Problem Sets Information Select Problem Runs Ranklist
ZOJ Problem Set - 3405
Counting Factor Trees

Time Limit: 2 Seconds      Memory Limit: 65536 KB

Factoring, i.e., listing all the prime factors, of an integer is a useful skill that often helps to solve math problems. For example, one of the ways to find the GCD (Greatest Common Divisor) or LCM (Least Common Multiple) of two integers is by listing all their prime factors. The GCD is then the product of all the common factors; the LCM is the product of all the remaining ones.

The Factor Tree is a tool for finding such prime factorizations. The figure below demonstrates three factor trees of 108. At the beginning a root with a number is given, say N, which is to be factored. Then, the root is factored into two children N1 and N2 such that N = N1 × N2 (N1 ≥ 2, N2 ≥ 2). Note that N1 and N2 need not be prime. The same factoring process continues until all the leaves are prime.

While the prime factorization is unique, the factor tree reflects the order in which the factors were found, and is by no means unique. So, how many factor trees of a number are there?

#### Input

There are no more than 10000 cases. A line containing an integer N (2 ≤ N ≤ 1000000000) is given for each case.

#### Output

Print the number of factor trees of N in a line for each case. The answer will be fit in a signed 64-bit integer.

#### Sample Input

12
108
642485760

#### Sample Output

6
140
9637611984000

Author: GAO, Yuan
Contest: ZOJ Monthly, September 2010
Submit    Status


text:
• Call Now

1800-102-2727
•

# Convex mirror

Do you know which mirror is installed in your car as a side rearview mirror? In the car or vehicle, our requirement is to look at a wide area of the rear. Generally, we have three types of the mirror; plane mirror, concave mirror and convex mirror. All of them have different properties and hence different uses. In three of them, the convex mirror has the ability to make a virtual image of a small size. Hence we use a concave mirror in our cars so as to cover a larger rear area and to form a diminished image. Let's understand more about how it works!

Table of content

• Spherical mirror
• Convex mirror
• Characteristic of a convex mirror
• Terms related to Convex mirror
• Rule to draw a ray diagram
• Image formation by Convex mirror
• Mirror formula and magnification
• Uses of Convex mirror
• Practice problem
• FAQs

## Spherical mirror

Spherical mirrors are curved glass plates which are painted with a reflecting material like silver on one of the sides and the other side is used for the reflection. This spherical mirror can be of two types: one is a concave mirror and the other is a convex mirror. The spherical glass plates which are painted outward and the inner surface used for the reflection are the concave mirrors. The spherical glass plates which are painted from the inside and the outer surface used for the reflection are the convex mirrors.

## Convex mirror

The part of the hollow sphere which is silver painted from the inside and the outer surface is used for the reflection purpose and is known as a convex mirror. The figure shows a convex mirror.

## Characteristic of a convex mirror

A convex mirror has the following properties:

1. A convex mirror is also referred to as a diverging mirror because, when light rays hit its reflecting surface, they diverge.
2. Whatever the object's distance from the convex mirror, it always produces a virtual, erect and diminished image.
3. Convex mirrors do not focus the light ray toward a point as the rays after hitting always diverge.

## Term related to Convex mirror

These are the following terms related to the convex mirror.

1. Center of curvature - The centre of curvature is the centre of the imaginary sphere from which the convex mirror is taken. The centre of curvature is indicated by C as shown in the above figure.
1. Principal axis - A line joining the centre of curvature and the pole of the mirror is known as the principal axis.
1. Pole - Mirror pole refers to a point which is situated at the centre of the curved section of the mirror. It is denoted by P.
1. The radius of curvature - The radius of the imaginary sphere from which the convex mirror is taken is called the radius of curvature. The distance from any point on the spherical mirror to the centre of curvature is another way to define the radius of curvature. R is used to indicate it.
1. Focus - When a beam of parallel rays coming from infinity falls on the convex mirror, after the reflection it appears to pass through a point. This point is known as the focus of the spherical mirror. The letter F is used to denote it.
1. Focal length- The focal length of a spherical mirror is defined as the distance between the focus (F) and pole (P).

## Rule to draw a ray diagram

To trace the image of an object there are certain rules which help in locating the image.

1. When a ray of light parallel to the principal axis falls on a convex mirror, it seems to pass through the convex mirror's focus after the reflection as shown in the figure.

1. When a ray is pointed in the direction of the focus and falls on a convex mirror, after the reflection it becomes parallel to the axis of the convex mirror as shown in the figure.

1. When a ray of light falls on the convex mirror such that it is directed toward the centre of curvature of the mirror then after the reflection it returns back in the same direction.

1. When a ray incident on the pole of the mirror reflects obliquely similar to the plane mirror.

## Image formation by Convex mirror

Regardless of the object's position, the image created by a convex mirror is always virtual and upright. Let's examine the types of images created by convex mirrors in this part. There are two possibilities for the placing of an object to get an image.

1. When an object is placed at infinity: For tracing the location of the image we need at least two light rays. Consider two parallel rays which are coming from infinity. After the reflection, they diverge and will never meet. If we extend these reflected rays behind the mirror they will meet somewhere in the focus of the mirror. Hence a virtual image is created at the focus when an object is positioned at infinity. In comparison to the object, the image is smaller in size.

1. When an object is placed between infinity and pole : Draw a ray parallel to the principal axis. After the reflection it will diverge in different directions. The ray directed towards the center of curvature will return in the same direction. If we extend these rays behind the mirror, a virtual and diminished image will form in between the pole and the focus of the mirror.

## Mirror formula and magnification

The mirror formula is an equation that links focal length of the mirror, object distance and image distance. The equation is given as

$\frac{1}{f}=\frac{1}{u}+\frac{1}{v}$

Where,
u= The object's distance from the pole

v= The image's distance from the pole.

f= Focal length of the mirror

The height ratio of the image to the object is known as magnification. It is given as,

If u is the distance of the object from the mirror and v is the distance of the image then the magnification can be written as

$m=\frac{{h}_{i}}{{h}_{o}}=-\frac{v}{u}$

Sign convention : Distance measured in the direction of the incident ray is taken as positive and opposite to this direction is taken as negative. The distance in upward direction to the principal axis is taken as positive and the distance measured in downward direction is taken as negative.

## Uses of Convex mirror

The convex mirror can be used for the following purposes-

1. A convex mirror allows us to see a greater area which we could not do in a plane mirror.
2. In many cars, convex mirrors are used as rear-view (wing) mirrors. Convex mirrors are frequently used on the sides of cars to allow the driver to observe traffic or cars approaching from behind.
3. They are used on roadways to protect motorcyclists and drivers from danger in blind places like curves and corners.
4. They are used to provide a wider field of view. Convex mirrors are installed in building halls.

## Practice Problem

Q1. When an object is positioned 40 cm in front of a mirror, a virtual image appears at 20 cm behind the mirror. Determine the kind and focal length of the mirror.

Answer. Given, the distance of object u= -40 cm

Distance of image v=20 cm

Using the mirror formula,

$\frac{1}{f}=\frac{1}{u}+\frac{1}{v}$

$\frac{1}{f}=\frac{1}{-40}+\frac{1}{20}$

$\frac{1}{f}=\frac{1}{20}-\frac{1}{40}$

$\frac{1}{f}=\frac{2-1}{40}$

$\frac{1}{f}=\frac{1}{40}$

f=40 cm

Focal length of mirror is 40 cm. Since the focal length is positive, the mirror is convex.

Q2. A convex mirror with a focal length of 20 cm is placed 20 cm away from a point object. Find the image location.

The distance object from the mirror, u=-20 cm

The mirror's focal length, f=20 cm

According to the mirror formula,

$\frac{1}{\mathbit{f}}=\frac{1}{\mathbit{u}}+\frac{1}{\mathbit{v}}$

$\frac{1}{20}=\frac{1}{-20}+\frac{1}{\mathbit{v}}$

$\frac{1}{\mathbit{v}}=\frac{1}{20}+\frac{1}{20}$

$\frac{1}{\mathbit{v}}=\frac{2}{20}$

$\frac{1}{\mathbit{v}}=\frac{1}{10}$

v=10

The image is located 10 cm behind the mirror.

Q3. A 10 cm height object is placed in front of a convex mirror and forms an image of height 3 cm. Find the magnification of the mirror.

Answer. As we know the convex mirror always forms an erect image.

Given and

The magnification by the mirror is given as,

$m=\frac{{h}_{i}}{{h}_{o}}$

m=0.3

Hence the magnification by the convex mirror is 0.3

Q4. A convex mirror forming an image at a distance of 15 cm behind the mirror. If an object is placed at a distance of 45 cm in front of the mirror, what is the magnification of the mirror?

Answer. Given v=+15 cm and u=-45 cm

The magnification of the mirror is given as,

$m=-\frac{v}{u}$

$m=-\frac{+15}{-45}$

m=0.33

Hence the magnification of the mirror is 0.33.

## FAQs

Q1. Why is the convex mirror used in street lights?
As the convex mirror diverges the light rays which fall on it, when a source is placed in front of the convex mirror it diverges the incident rays to a wider area. Hence more area can be lightened with a small light source.

Q2. What is a diverging mirror?


text:
ASCII art “Hello-World!” [closed]

Your goal is to write the shortest program that outputs "Hello-World!" as ASCII art.

Rules :

• It must be human readable, I don't care about it's size (cols/rows)
• Output must contain only spaces (" "), sharps ("#") and newlines
• The output must work with a monospaced font (but the letters doesn't necessary use a monospaced font)
• In the result, each character must be separated from each other by at least one space

• bash: 33 characters – pastebin.com/HZ1w8z8g Is this acceptable? – manatwork Feb 6 '14 at 13:51
• Why the hyphen though?... – Timwi Feb 6 '14 at 14:16
• I suppose to make impossible or unfeasibly hard the use of something predefined like HQ9+. – manatwork Feb 6 '14 at 14:23
• @PeterTaylor: The output consisting of spaces and hashes must work with a monospaced font, but the letters represented by the plethora of hashes need not all have the same width. – Timwi Feb 6 '14 at 14:39
• Related, but different: Say “Hello” to the world in ASCII art – Ilmari Karonen Feb 6 '14 at 15:58

C#, 205 203 202 bytes

I'm storing the text as an array of 5 longs, each representing a row in the display. I iterate over the array, and use bitwise comparison to work out if each bit is a # (1) or a space (0).

class G{static void Main(){foreach(var c in new long[]{0x14401100505,0x16589102525,0x15455575557,0x5455505535,0x16448A02565})for(int i=0;i<42;i++)System.Console.Write((i>40)?"\n":(c&1L<<i)>0?"#":" ");}}

"cURL", 16 characters:

program: (computer science) a sequence of instructions that a computer can interpret and execute;

curl floris.us/h

Produces:

#   #      #  #           #   #          #     #  #
#   #  ##  #  #   ##      #   #  ##   ## #   ###  #
##### #### #  #  #  # ### # # # #  # #   #  #  #  #
#   # #    #  #  #  #     # # # #  # #   #  #  #
#   #  ##   #  #  ##       # #   ##  #    #  ###  #

I guess if I had a cooler domain, it would be shorter...

• Personally, I would consider this cheating. – The Guy with The Hat Feb 7 '14 at 22:40
• @RyanCarlson yes, but it's short... – Floris Feb 8 '14 at 0:53
• How is this different from putting an arbitrarily large program into a script called x, setting execute permission on x, setting the PATH to include the current directory, and then saying you have a one-character solution (just type x!). I think this whole class of solution is cheating. – steveha Feb 8 '14 at 4:31
• @mojo, figlet is at least a common program, to which people have access. Some people already have it installed, and others can install it. I don't think it's "cheating" to use such a program. But I do think this problem would be better if it required answers to be written in a programming language and not run any external programs or include any library modules. (That would of course invalidate my own answer, which depends on the user having the banner program installed.) – steveha Feb 8 '14 at 4:37
• @Floris You can transform your answer in a shell one: curl floris.us/h ;-) – Ionică Bizău Feb 9 '14 at 14:26

Shell + pyfiglet, 31 characters

pyfiglet can run as a shell tool, so we can simply go like this:

pyfiglet -f'3x5' 'Hello-World!'

which gives us:

# #      #   #          # #          #    #  #
# # ###  #   #  ###     # # ### ###  #  ###  #
### ##   #   #  # # ### ### # # #    #  # #  #
# # ###  ##  ## ###     ### ### #    ## ###
# #                     # #                  #

Looks much better with less line spacing.

Letters are separated with one space, and in terminal it's well readable.

• You could save two chars by just dropping the py. Also, there's no need to quote 3x5. – Ilmari Karonen Feb 7 '14 at 23:29
• Big rule abuse, nothing even remotely similar to golfing. – Tomas Feb 9 '14 at 14:05
• No need for any of those quotes – Kevin Feb 9 '14 at 16:53
• Why not just compile one of the other solutions in this post, and give the binary a one character name? – The111 Feb 9 '14 at 21:43
• I see your point. Please excuse my misunderstanding, then, based on many answers in this - and other - topics, I got the idea that the purpose was just to write the shortest code possible, any hack goes, but that would indeed lead to calling some URL containing ASCIIart through curl, and, granted, it would be pointless. Thanks for pointing that out, I'm still new to the idea, and not a sesoned programmer as well. I'll keep my libraries in my pants next time :) – Taku Feb 10 '14 at 10:30


text:
# Binary Precipitation

## The Al-Zr system #

In the Al-Zr system, $Al_3Zr$ can precipitate into an $\alpha$-Al (FCC) matrix. The Thermodynamics module provides some functions to interface with pyCalphad in defining the driving force and interfacial composition. However, it is also possible to use user-defined functions for the driving force and nucleation as long as the function parameters and return values are consistent with the ones provides by the Thermodynamics module. Calphad models for the Al-Zr system was obtained from the STGE database and Wang et al [1,2].

For a binary system, one hyperparameter that may need to be set in the Thermodynamics module for calculating interfacial compositions is the guess composition when finding a tie-line. The $Al_3Zr$ phase has a fixed composition at 25 at.% Zr, so the guess composition can be set to 24 at.% Zr.

from kawin.Thermodynamics import BinaryThermodynamics
from kawin.KWNEuler import PrecipitateModel
import numpy as np

therm = BinaryThermodynamics('AlZr.tdb', ['AL', 'ZR'], ['FCC_A1', 'AL3ZR'])
therm.setGuessComposition(0.24)

## Setting up the model #

Inititializing the KWN model will require the initial and final time, the number of time steps, the bounds for the particle size distribution (PSD) and the number of bins for the PSD.

The Al-Zr system will be ran at $450\text{ }^oC$ for 500 hours. 25,000 steps will be used. Adaptive time stepping is on by default; however, it tends to work well if if the model is initialized with at least 5,000 - 10,000 steps. The PSD will be composed of 100 bins ranging from 0.1 to 10nm. Bins will be added automatically to the PSD during the simulation to account for particles growing larger than the initial range.

The time can be either on a linear or a logarithmic scale.

#Initial and final time in seconds
t0 = 0
tf = 500*3600
steps = 2.5e4

#Create model
model = PrecipitateModel(t0, tf, steps, linearTimeSpacing = True)

## Model Inputs #

The interfacial energy and diffusivity are from Robson and Prangnell [3]. Although the diffusivity for this system is only a function of temperature, it needs to be defined as a function of both composition and temperature (to keep consistent with systems that use composition dependent diffusivity).

• $x_0 = 0.4 : \text{at.%}$
• $T = 450 : ^oC = 723.15 : K$
• $\gamma = 0.1 : J/m^2$
• $D = 0.0768 , exp\left(- \frac{242000}{R T}\right) : m^2/s$
• $a = 0.405 : nm = 0.405\mathrm{e}{-9} : m$
• 4 atoms per unit cell
• Dislocation density $\rho_D = 1e15$
xInit = 4e-3        #Initial composition (mole fraction)
model.setInitialComposition(xInit)

T = 450 + 273.15    #Temperature (K)
model.setTemperature(T)

gamma = 0.1         #Interfacial energy (J/m2)
model.setInterfacialEnergy(gamma)

D0 = 0.0768         #Diffusivity pre-factor (m2/s)
Q = 242000          #Activation energy (J/mol)
Diff = lambda x, T: D0 * np.exp(-Q / (8.314 * T))
model.setDiffusivity(Diff)

a = 0.405e-9        #Lattice parameter
Va = a**3           #Atomic volume of FCC-Al
Vb = a**3           #Assume Al3Zr has same unit volume as FCC-Al
atomsPerCell = 4    #Atoms in an FCC unit cell
model.setVaAlpha(Va, atomsPerCell)
model.setVaBeta(Vb, atomsPerCell)

#Average grain size (um) and dislocation density (1e15)
model.setNucleationDensity(grainSize = 1, dislocationDensity = 1e15)
model.setNucleationSite('dislocations')

#Set thermodynamic functions
model.setThermodynamics(therm)

## Solving the Model #

Now we can run the model. The current status of the model may be output by setting “verbose” to True with “vIt” being how many iterations will pass before the current status of the model is printed out.

model.solve(verbose=True, vIt=10000)

N Time (s) Temperature (K) Matrix Comp
10000	6.8e+05		723		0.0119

Phase	Prec Density (/m3)	Volume Frac	Avg Radius (m)
beta	4.724e+21	1.5532		8.4511e-09

N	Time (s)	Temperature (K)	Matrix Comp
20000	1.4e+06		723		0.0117

Phase	Prec Density (/m3)	Volume Frac	Avg Radius (m)
beta	3.885e+21	1.5538		9.1763e-09

Finished in 71.610 seconds.

## Plotting #

We can now plot the results. Here, we are plotting the precipitate density, volume fraction and average radius as a function of time and the size distribution density at the final time.

Everything will be plotted on a logarithmic time scale.

%matplotlib inline
import matplotlib.pyplot as plt

fig, axes = plt.subplots(2, 2, figsize=(12, 10))

model.plot(axes[0,0], 'Precipitate Density')
model.plot(axes[0,1], 'Volume Fraction')
axes[1,0].legend()
model.plot(axes[1,1], 'Size Distribution Density')

fig.tight_layout()

## Saving #

The model can be saved into a numpy .npz format or a .csv format.

PrecipitateModel.save(filename, compressed=True) or

PrecipitateModel.save(filename, toCSV=True)

To load the model, just make sure to add the file extension.

model = PrecipitateModel.load('file.npz') or

model = PrecipitateModel.load('file.csv')

## References #

1. A. T. Dinsdale, “SGTE Data for Pure Elements” Calphad 15 (1991) p. 317
2. T. Wang, Z. Jin and J. Zhao, “Thermodynamic Assessment of the Al-Zr Binary System” Journal of Phase Equilibria 22 (2001) p. 544
3. J. D. Robson and P. B. Prangnell, “Dispersoid Precipitation and Process Modeling in Zirconium Containing Commercial Aluminum Alloys” Acta Materialia 49 (2001) p. 599


text:
000028801 001__ 28801
000028801 037__ $$9arXiv$$aarXiv:0709.4302$$cnucl-ex 000028801 035__$$9arXiv$$zoai:arXiv.org:0709.4302 000028801 035__$$9SPIRESTeX$$zSukhovoj:2007qp 000028801 100__$$aSukhovoj, A.M.$$uDubna, JINR 000028801 245__$$aPossibilities to verify the level density and radiative strength functions, extracted from the two-step gamma-cascade intensities
000028801 246__ $$9arXiv$$aPossibilities to verify the level density and radiative strength functions, extracted from the two-step gamma-cascade intensities
000028801 269__ $$c2007-09 000028801 300__$$a8
000028801 520__ $$9arXiv$$aThe direct determination of the excitation level density and radiative strength functions of their exciting gamma-transitions is impossible for the larger part of the stable and long-life radioactive target nuclei. This circumstance is uniquely determined by the fact, that the level spacing much less than the resolution of the existing spectrometers of gamma-rays and charged particles. The extraction of these parameters of nucleus in this situation can be executed by their only fitting to the most probable values, reproducing the measured in the nuclear reactions spectra and sections. This inverse problem of mathematical analysis of its nature is principally ambiguous. Moreover, system of equations, those connecting the number of excitable levels and probability of the emission of charge particles are assigned usually within the framework of some assumptions about the mechanism of nuclear reaction and factors, determining the dynamics of the studied process. The verification of these parameters can be partially executed by the calculation of total gamma-spectra for their different sets. As, in particular, the results of this analysis show, the calculation of the structure of the excited levels to a change in the form of the energy dependence of radiative strength functions most likely must be considered to the neutron-binding energy. It is not possible to exclude the possibility of that, that also radiative, and neutron strength functions depend on the structure of neutron resonance and for the higher excitation energies.
000028801 65017 $$2INSPIRE$$aExperiment-Nucl
000028801 690C_ $$2INSPIRE$$aConference Paper
000028801 700__ $$aKhitrov, V.A.$$uDubna, JINR
000028801 700__ $$aKhang, Pham Dinh$$uHanoi U.
000028801 700__ $$aTan, Vuong Huu$$uVAEC, Hanoi
000028801 700__ $$aHai, Nguyen Xuan$$uVAEC, Hanoi
000028801 773__ $$tTo appear in the proceedings of$$wC06/05/24.3
000028801 909CO $$ooai:jdsweb.jinr.ru:28801$$pglobal
000028801 961__ $$x2007-09-27 000028801 961__$$c2007-10-08
000028801 970__ $$aSPIRES-7399340 000028801 980__$$aConference
000028801 980__ $$aarXiv 000028801 980__$$aCiteable
000028801 999C5 $$sPart.Nucl.,36,697 000028801 999C5$$sPhys.Atom.Nucl.,64,153
000028801 999C5 $$rnucl-ex/0110017 000028801 999C5$$sSov.J.Nucl.Phys.,37,165
000028801 999C5 $$sPhys.Rev.,126,671 000028801 999C5$$sFiz.Elem.Chast.Atom.Yadra,3,770
000028801 999C5 $$sSov.J.Nucl.Phys.,53,92 000028801 999C5$$sBull.Russ.Acad.Sci.Phys.,63,123
000028801 999C5 $$sAdv.Nucl.Phys.,7,229 000028801 999C5$$rnucl-ex/9910009$$sNucl.Instrum.Meth.,A447,494 000028801 999C5$$sPhys.Atom.Nucl.,62,192
000028801 999C5 sNucl.Phys.,A217,269


text:
Question

# Solve the equation (\sqrt{x^{2}-3x})=2x-6, inequality, or system of equations.

Equations
Solve the equation $$(\sqrt{x^{2}-3x})=2x-6$$, inequality, or system of equations.

2021-06-11

Step 1
To solve the equation: $$(\sqrt{x^{2}-3x})=2x-6$$
Solution:
$$(\sqrt{x^{2}-3x})=2x-6$$
on squaring both sides we get:
$$\Rightarrow (\sqrt{x^{2}-3x})^{2}=(2x-6)^{2}$$
$$\Rightarrow x^{2}-3x=(2x)^{2}-2(2x)(6)+6^{2}$$
$$\Rightarrow x^{2}-3x=4x^{2}-24x+36$$
$$\Rightarrow x^{2}-4x^{2}-3x+24x-36=0$$
$$\Rightarrow -3x^{2}+21x-36=0$$
$$\Rightarrow -3x^{2}+12x+9x-36=0$$
$$\Rightarrow -3x(x-4)+9(x-4)=0$$
$$\Rightarrow (x-4)(-3x+9)=0$$
$$\Rightarrow (x-4)=0, or (-3x+9)=0$$
$$\Rightarrow x=4, or 3x=9. \Rightarrow x=3$$
Step 2
Result:
Required solutions are, $$x=\{3,4\}$$


text:
# If an atom of tin has a mass number of 118 and an atomic number of 50, how many neutrons are in its nucleus?

There must be 68 neutrons in a ""^118Sn isotope.
Note that an examiner would be quite justified in asking you this question WITHOUT advice as to $Z$, the atomic number, if tin metal were specified. Do you agree?


text:
Question

# Hydrochloric acid isa.) Strong acidb.) Weak acidc.) Strong based.) Weak base

Hint: Hydrochloric acid has a very low value of pka. It gets completely dissociated into ${H^ + }$ cations and $C{l^ - }$ anions when dissolved in any solution. It has a very low value of pka. The higher value of pka indicates greater basicity.

First, let us understand what an acid or base actually is. Then we will move towards its strength whether strong or weak.

So, an acid can be defined as the chemical species which is capable of donating protons or ${H^ + }$ ions and base is the chemical species which can accept ${H^ + }$ ions. This concept of acid-base was given by Bronsted lowry.

So, if we see hydrochloric acid then it is chemically written as HCl. Here, one H atom combines with one chlorine atom giving the molecule. We know that the octet of chlorine gets complete after sharing one electron with the Hydrogen atom. So, it has no tendency to accept more hydrogen atoms. But HCl has one H atom which it can donate. So, it comes under the category of acids.

Now, we will see which is a strong acid and which one is weak.
This is explained on the basis of dissociation of ${H^ + }$ ions. If the dissociation of the acid is complete i.e. approximately 100% then the acid is said to be strong acid and in case it dissociates to low value then it is a weak acid.
HCl completely dissociates making it a strong acid.

So, the option a.) is the correct answer.

Note:

Acids and bases can be differentiated on the basis of pka value which is inversely proportional to ka value. The ka value is the dissociation constant. If pka value is low, then ka value will be high and acid will be strong.
Hydrochloric acid is stronger than sulphuric acid. The conjugate base formed in this case is $C{l^ - }$ which is a weak conjugate base. So, HCl is a strong acid.