mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Lounge

Reply
 
Thread Tools
Old 2010-12-16, 13:35   #1
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

427910 Posts
Default copy/paste k*b^n+c

Here's a minor problem I've come across, and a relatively simple solution to it:
When a number is represented like 243112609-1, it looks nice, but if you copy/paste it into a plain text field without being careful to preserve formatting, it ends up looking like 243112609-1. Of course, if it was just 2^43112609-1 to begin with, it would copy ok, but then it's not superscript. Then I remembered this little trick to make something appear one way and copy another way. As you might expect, this same trick can be used to fix this problem! Try it at http://www.w3schools.com/html/tryit....=tryhtml_intro, paste this into the body:
Code:
<style>
.z{
  float:right;
  font-size:.001px;
  color:transparent;
  display:inline-block;
  width:0px;
  }
</style>
 
87800*6<span class="z">^</span><sup>398859</sup>+1
It will appear as 87800*6398859+1, but when you copy it, it will come out as 87800*6^398859+1. You could also use this to make it copy into forum-formatted [sup] codes, like this: (with the same style block as before)
Code:
87800*6<span class="z">[sup]</span><sup>398859</sup><span class="z">[/sup]</span>+1
That will make it look like 87800*6398859+1, then when you copy it into a forum that supports the [sup] tag to superscript text, it looks like this: 87800*6398859+1
I think it'd be cool if sites that list primes in that sort of form (e.g. Top 5000, Wikipedia) used something like this, so meaning isn't lost when you copy/paste into a form like this one. Also, this forum could make tags like [sup] but with this (i.e. it looks the same as [sup] but it copies as ^, or [sup], or [thenewtag])

Last fiddled with by Mini-Geek on 2010-12-16 at 14:16
Mini-Geek is offline   Reply With Quote
Old 2010-12-16, 14:21   #2
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111011000112 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
Also, this forum could make tags like [sup] but with this (i.e. it looks the same as [sup] but it copies as ^, or [sup], or [thenewtag])
I'd like to see that.
CRGreathouse is offline   Reply With Quote
Old 2010-12-16, 18:43   #3
axn
 
axn's Avatar
 
Jun 2003

34×67 Posts
Default

tex tag does it here:
8*2^5-1

You can select the image and do copy/paste, and it will give you the underlying text.
axn is offline   Reply With Quote
Old 2010-12-16, 19:02   #4
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

10000101101112 Posts
Default

Quote:
tex tag does it here:


You can select the image and do copy/paste, and it will give you the underlying text.
I guess it depends on the browser (mine is Chrome 8.0.552.224, its result is above). "8*2^5-1" is the alt and title text for the image, but not all browsers copy that as text in place of the image. On the other hand, just hiding some text due to CSS trickery should still make it copy/paste correctly in any browser. In a strange configuration that ignores or misunderstands that CSS, it might show up as 87800*6^398859+1 or 87800*6^398859+1 (neither too bad). Besides that, I can't think of a good argument for why my idea is really better than just using Tex for this, except that you might want to keep it as text, just with a superscript, instead of making it a Tex image. Also, Tex images usually have other complicated formatting, so people may not be used to the idea of copy/pasting it and getting good-looking human-readable results.

Last fiddled with by Mini-Geek on 2010-12-16 at 19:03
Mini-Geek is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
conductivity of thermal paste wildrabbitt Hardware 5 2017-05-10 13:07
Beware thermal paste Mark Rose Hardware 14 2015-11-03 02:23
Best Thermal paste kracker Hardware 50 2015-02-23 23:41
XP Pro x64 Cut & Paste storm5510 Software 5 2013-10-29 12:34
copy all files roger Information & Answers 6 2008-04-30 01:55

All times are UTC. The time now is 22:00.


Sun Dec 4 22:00:50 UTC 2022 up 108 days, 19:29, 0 users, load averages: 1.51, 1.06, 0.91

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔