Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 125: Line 125:


Is it possible to find out what hosting plan (shared hosting, VPS, dedicated server,...; how much memory, etc) a site is running on? If not, is there a list of selected sites and their hosting plan out there somewhere? (I'd be mostly interested in small to medium e-commerce sites.) [[User:Bamse|bamse]] ([[User talk:Bamse|talk]]) 19:46, 11 December 2012 (UTC)
Is it possible to find out what hosting plan (shared hosting, VPS, dedicated server,...; how much memory, etc) a site is running on? If not, is there a list of selected sites and their hosting plan out there somewhere? (I'd be mostly interested in small to medium e-commerce sites.) [[User:Bamse|bamse]] ([[User talk:Bamse|talk]]) 19:46, 11 December 2012 (UTC)

:Generally speaking there is no way to tell. In some cases you may be able to RDNS the host, figure out who the hosting company is, and then infer things about the server from the types of services that the company offers. But that's not much to go on. In many cases it won't give any clue about what's happening on the back end either. The only part you can see is the public-facing web server, but many services are spread across multiple machines. You might even only see a [[content distribution network]] rather than the actual server that the site operator uses. What are you really trying to find out or do? You might get a more helpful response if you can describe your goal or application more directly. [[Special:Contributions/66.127.54.40|66.127.54.40]] ([[User talk:66.127.54.40|talk]]) 07:23, 12 December 2012 (UTC)


= December 12 =
= December 12 =

Revision as of 07:23, 12 December 2012

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


December 7

What's a cell phone SIM card worth ?

There appears to be gold contacts on them. I realize it's very little gold. So, is it even worth a penny ? Would it be worth recycling them ? StuRat (talk) 07:17, 7 December 2012 (UTC)[reply]

I suppose there are several valuable materials in the SIM card, in the phone, and in any other consumer electronics. The question is whether collecting, transporting, and recycling them is worth the time and energy input. The answer to this question is generally no, unless the government forces you to do it. OsmanRF34 (talk) 18:59, 7 December 2012 (UTC)[reply]
See here [1]. There's gold in them there cards - just not a lot of it. AndyTheGrump (talk) 19:11, 7 December 2012 (UTC)[reply]

A quick way to create a world map from data

Something like this

I would like to make a world map from data.

The data looks like this (I can make an excel table, if it needed):

  • US - 1
  • Germany - 3
  • Egypt - 2
  • ....

Are were some quick and simple way to do it?

The output map should have Wikipedia-compatible license or no restrictions of usage (I would like to upload the map to Wikipedia)

Thanks! --Volucer (talk) 10:07, 7 December 2012 (UTC)[reply]

You could use this blank SVG map. For each country code, map your data point to an RGB color and add a line near the top of the SVG file like this:
.mx { fill: #ff0000; }
That colors Mexico red. Then just copy the legend from the C02 responsibility map. --Sean 14:42, 7 December 2012 (UTC)[reply]

Google evaluating results

While looking for some clarification as to the correct name being Tanquary Fiord or Tanquary Fjord I checked with Google to get a rough idea. For Tanquary Fiord I get 16,800 results and Tanquary Fjord sends me to the Fiord spelling. If I click on "Search instead for Tanquary Fjord" I get 865,000 results, somewhat less than the 1,000,000+ I got yesterday. So given that there are more results for Fjord why does Google want me to look at the Fiord results. Is it evaluating the results and see the fiord spelling as having better links? CambridgeBayWeather (talk) 13:46, 7 December 2012 (UTC)[reply]

I think its about your language settings or location. The Fiord results can be more "relevant" for the users with your location/language --Blacknight87 (talk) 13:56, 7 December 2012 (UTC)[reply]
I prefer to use Google Ngram viewer [2] for checks like this. Google's results are personalized for you based on search history, and the number of articles is a pretty loose estimate. The NGram viewer digs through a huge corpus of texts over hundreds of years, and can provide a chart of how common a phrase was over time. 209.131.76.183 (talk) 14:41, 7 December 2012 (UTC)[reply]
Thanks. CambridgeBayWeather (talk) 13:45, 8 December 2012 (UTC)[reply]

Switch on computer

Is it possible to have a computer switch on at a specific time automatically? For instance I have a remote computer which I might want to switch off overnight. I can switch off either manually (logging in via ssh) or with a cron job. But are there any computers that can switch on on their own, perhaps with a specific hardware/bios!? Not looking for any external devices here (power cable timers,...). bamse (talk) 20:51, 7 December 2012 (UTC)[reply]

If you have another computer on the same network you might be able to wake the off one with Wake-on-LAN (although I've had difficulty in practice getting that to work on some machines). 87.114.106.165 (talk) 21:01, 7 December 2012 (UTC)[reply]
Some BIOSes also have provisions for scheduled wake up. ¦ Reisio (talk) 21:03, 7 December 2012 (UTC)[reply]
I would say MOST BIOSes have scheduled wake up. It would only really work in the situation where you want the system to boot up at the same time every day - you don't want to have to reboot to BIOS and set a new time very often, and you can't update it through software. Well, you could if you were crazy I guess - Intel's Integrator Toolkit could be automated to generate a new BIOS file with the wakeup time configured by default, then the file could be flashed automatically. But don't do that. It is just a bad but amusing idea. 209.131.76.183 (talk) 12:45, 10 December 2012 (UTC)[reply]
ACPI has a facility to schedule wakeup times without having to re-flashing your bios. This is useful in cases like DVR-type devices where you want to wake the computer slightly before recording [3]. You just need to have a program that twiddles the appropriate APCI function calls to trigger to load the new wakeup times, and a BIOS which supports it decently. -- 205.175.124.30 (talk) 19:56, 10 December 2012 (UTC)[reply]
For Mac OS X, you can schedule your computer to turn on at a scheduled time: http://support.apple.com/kb/PH3954. This article describes something similar for Windows, if you have BIOS support (as mentioned upthread). http://lifehacker.com/5831504/how-can-i-start-and-shut-down-my-computer-automatically-every-morning. RudolfRed (talk) 23:05, 7 December 2012 (UTC)[reply]
And, for computers without the ability to turn themselves on, putting them in hibernate/sleep mode instead of turning them off may be the best you can do. This saves some power, but not as much as turning them off, and your scheduled processes should still run. StuRat (talk) 23:14, 7 December 2012 (UTC)[reply]
True hibernate i.e. S4 or 'suspend to disk' would use no more power while off then a computer turned off from the OS or from the power button on the computer (i.e. G2/S5), i.e. the way probably 99.9% of the world turns off their computers (for the other 0.1% who turn off at the power sockets i.e. G3 there will be some increased usage). 'Sleep' is a fairly imprecise term which could include, suspend to disk, S3 or suspend to RAM (which will use more power) or lesser modes which use even more power. See Advanced Configuration and Power Interface for details. Nil Einne (talk) 05:18, 8 December 2012 (UTC)[reply]


December 8

Windows 7 file search function

When I pick "Start", type in a file name at the bottom, and pick "See more results", the panel only gives the first 58 characters of the full path for each file name. This is grossly insufficient, and I don't see any way to resize it (we seem to have lost this ability from Win XP). Is there a way ? Can I run the Windows XP file search ? If not, is there something else I can download to do a proper search ? StuRat (talk) 04:03, 8 December 2012 (UTC)[reply]

If you are viewing in 'content' mode, there's no way to extend what's displayed that I'm aware of (although I almost never used content mode). If you're viewing in details mode, just expand the size of the tabs as normal. I don't believe Windows XP had a content mode, so I don't understand what you mean about 'lost this ability'. Nil Einne (talk) 04:25, 8 December 2012 (UTC)[reply]
A quick check seems to confirm Windows XP has no 'content' viewing mode. Nil Einne (talk) 04:59, 8 December 2012 (UTC)[reply]

I think I figured it out. In Windows XP you had options labelled List, Large Icons, Small Icons, and Details. Windows 7 seems to have the same options, under the icon with the "Change your view" rollover text. They've also added Content mode, which seems to be the default setting, and doesn't let me adjust the column widths. Once I change to Details mode, I can adjust the column widths. They also added "Extra Large Icons", "Medium Icons", and "Tiles" modes. StuRat (talk) 06:52, 8 December 2012 (UTC)[reply]

Resolved
If you actually want a decent search utility in Windows 7, I recommend File Locator Lite. Mitch Ames (talk) 09:06, 8 December 2012 (UTC)[reply]

Text only, ad-free web sites for cell phone browsing

My cell phone has web browsing capability, but I want to keep the lag and minutes usage down, so want text-only sites with no ads. So far:

1) I've found a good weather site (my old favorite, http://braille.wunderground.com/auto/braille), so I'm all set for weather.

2) I also found a news site at NPR, but would like news from other perspectives, as well, like BBC News. Do they offer such a service ? Does any other US or international news agency ?

3) I've had no luck with search engines. Google doesn't seem to provide this, and my searches didn't find any general search engines that match my criteria.

4) Then there's Wikipedia. Lots of cruft on these pages. Is there a way to access Wikipedia, say in a read-only mode, where I could look up things without seeing any illustrations ?

5) Any other good text-only, ad-free websites appropriate for web browsing from a cell phone ? StuRat (talk) 07:27, 8 December 2012 (UTC)[reply]

Is there no way to disable images in your browser? Does your phone support Java ME? If so, will Opera Mini run on it? Opera Mini definitely has the option, and it has "Opera Turbo", which proxies everything through their server and compresses it before sending it to you. I also noticed on my feature phone that Opera Mini was much faster than the built-in browser. -- Consumed Crustacean (talk) 07:42, 8 December 2012 (UTC) (edited 07:43, 8 December 2012 (UTC))[reply]
Yea, the default sites seem designed to suck down as many minutes as possible. I can turn various things on and off, like Java, Flash, cookies, etc. I left them all on, for now. But my phone does have a favorites option, and I'd like to fill those with sites like those listed above. StuRat (talk) 07:50, 8 December 2012 (UTC)[reply]
You're still using a circuit switched network for your phone? If not I don't understand why they charge in minutes. In most of the rest of the world, they charge in bytes (or multiples thereof). Nil Einne (talk) 13:44, 8 December 2012 (UTC)[reply]
They convert the bytes to "units", where 1 unit = a 1 minute phone call. For example, a text costs 0.3 minutes, and the weather site I mentioned above costs only 0.1 units. A 380K pic costs about 7 units, and God only knows what sending a video would cost me. A unit costs me about US$0.07. StuRat (talk) 15:53, 8 December 2012 (UTC)[reply]
For Wikipedia, try inserting .m. into the URL, for example [4] which shows only a few of the many words in this long article, and one of the pictures. Mobile browsers can use a link at the bottom of any Wikipedia article to switch to the mobile version of all pages. You can also download the free Wikipedia App which only works the "mobile" way. By either method, Wikipedia sends only thumbnail versions of pictures, rather than have the browser downsize big versions after downloading them. Jim.henderson (talk) 17:00, 8 December 2012 (UTC)[reply]
OK, thanks. I created my own landing page with no pics at all: [5]. From there I can do Wikipedia searches. StuRat (talk) 17:22, 8 December 2012 (UTC)[reply]

I thought of something else I'd like:

6) A language machine translator site, where I pick the from and to languages, then type in the text, and it translates it for me. I'm using Google translate now. Is there anything better ? StuRat (talk) 17:25, 8 December 2012 (UTC)[reply]

How do I recover Bookmarks/Favorites from an O/S which won't run ?

As I've mentioned previously, my XP computer died, and I replaced it with one running Windows 7. I can't boot into XP any more, but do have access to the hard drive (I copied the contents to an external hard drive). So, how can I access the bookmarks/favorites ? I had:

1) Firefox.

2) Opera.

3) Google chrome.

4) IE.

Firefox is where most of my bookmarks were. StuRat (talk) 07:45, 8 December 2012 (UTC)[reply]

In Firefox:
  • Show all bookmarks (Ctrl-Shift-B or from the Bookmark menu or toolbar depending on your configuration).
  • Select Import and Backup, Restore, Choose file
  • Navigate to the location of the profile that has the bookmarks (ie on image copied from the old machine), eg on XP, something like "C:\Documents and Settings\Mitch\Application Data\Mozilla\Firefox\Profiles\d56q1v9n.default\bookmarkbackups" (Application Data is hidden, so you may need to enable showing hidden folders)
  • Select the most recent bookmarks*.json to load all the bookmarks (warning - replaces all existing bookmarks)
(Or use a search engine to search for "firefox copying bookmarks one computer another" or similar to find lots of pages that tell you how to do it)
Mitch Ames (talk) 08:40, 8 December 2012 (UTC)[reply]
You can actually just copy the entire profile directory contents over. ¦ Reisio (talk) 08:44, 8 December 2012 (UTC)[reply]
To pile on, it's easiest to just copy the profile directory over, however the actual bookmarks should be in an sql database called places I think. There's also bookmarks in a more readable JSON format under bookmarkbackups, which may be another easier way. Shadowjams (talk) 13:50, 8 December 2012 (UTC)[reply]

Thanks so far. Is there any way to combine bookmarks together from two sources ? StuRat (talk) 21:52, 10 December 2012 (UTC)[reply]

You could try Export from one profile (your original), Import to another (your new) profile. They are under the Import and Backup menu, as above. I haven't used it myself, so I don't know if Import adds to existing bookmarks or replaces them. It's probably worth a try though. Mitch Ames (talk) 08:21, 12 December 2012 (UTC)[reply]

Abstraction level and programming paradigm

Can a low level computer language (something lower than High Level Assembly) be anything that's not declarative? OsmanRF34 (talk) 14:31, 8 December 2012 (UTC)[reply]

This really isn't a forum for OR debate. Anyhow, your question is too subjective and speculative to begin with. The answer is: it depends.
Sebastian Garth (talk) 19:34, 8 December 2012 (UTC)[reply]
Lisp machine is the closest real-world thing I can think of. However, like the article shows, the machine language isn't LISP - just optimized for it. 209.131.76.183 (talk) 17:12, 10 December 2012 (UTC)[reply]

Windows Movie Maker 2012 doesn't let you burn DVDs any more?

I have Windows 8 and the 2012 version of Windows Movie Maker. I used to be able to burn standard format video DVDs on it so I can watch a movie on my DVD player. But I can't seem to find this feature in the 2012 version of the app. Does anyone know if it's still there or if MS removed the feature? Also, if this feature has been removed, can anyone recommend a good DVD burning program? A Quest For Knowledge (talk) 17:52, 8 December 2012 (UTC)[reply]

List of features removed in Windows 8#Media_features, http://alternativeto.net/software/windows-dvd-maker/ Also now would be a great time to spend not very much at all ($25 on the lower end) on something that can play video without needing you to burn. ¦ Reisio (talk) 19:55, 8 December 2012 (UTC)[reply]


December 9

need a programme on synchronized block in java

the general form of synchronized block is

class table     
   {     
   .......    
    void printTable(int n)     
   {     
   synchronized(obj)     
   {    
    ......    
    }     
   }    
    }    

In the above code,i wrote synchronized(obj).Here obj means object of table class or it may be object of a string class or object of
Integer class or it may be any object of any class.
If we write this in place of obj it means it is object of table class.That means we are geting lock on table class.
In below programme I got lock on table class by putting this in place of obj.
But I am not able to write a programme to get lock on object of other than table class.
I want a programme which gets lock on object other than table class.
can any one give such type of programme?
you no need to write entire programme.you simply edit below programme.


   import java.io.*;    
       class table    
       {    
       void printTable(int n)    
       {    
       synchronized(this)    
       {    
       for(int i=1;i<=5;i++)    
       {    
       System.out.println(n*i);    
       try{    
       Thread.sleep(500);    
       }    
       catch(InterruptedException ie)    
       {System.out.println(ie);    
       }    
       }    
       }    
       }    
       }    
       class MyThread1 extends Thread    
       {    
       table t;    
       MyThread1(table t)    
       {    
       this.t=t;    
       }    
       public void run(){    
       t.printTable(5);    
       }    
       }    
       class MyThread2 extends Thread    
       {    
       table t;    
           
       MyThread2 (table t)    
       {    
       this.t=t;    
       }    
       public void run()    
       {    
       t.printTable(100);    
       }    
       }    
       class synchronizedblock1    
       {    
       public static void main(String args[]    
       )    
       {    
       table t=new table();    
       MyThread1 t1=new MyThread1(t);    
       MyThread2 t2=new MyThread2(t);    
       t1.start();    
       t2.start();    
       }    
       }    
       ==========================    
           
       output:    
           
       5    
       10    
       15    
       20    
       25    
       100    
       200    
       300    
       400
Learn to indent your code. The above is a bit difficult to read. You can, for example, simply create a dummy class like:
class Dummy
{
}
Then you can give an object of this class as a constructor parameter to your class table and synchronise on this object:
class table
{
  private Dummy d;
  public table(Dummy d)
  {
    this.d=d;
  }
  public void doStuff()
  {
    synchronized (d)
    {
    }
  }
  //rest of code goes here
}
I am not going to write the entire code for you but you should get the general idea here. JIP | Talk 07:31, 9 December 2012 (UTC)[reply]
I already answered this at Wikipedia:Reference desk/Archives/Computing/2012 November 27#thread synchronization-1 (without dummy whatnots). -- Finlay McWalterTalk 13:58, 9 December 2012 (UTC)[reply]


Thanks for your response.But my doubt is unsolved.
what I am asking is "How to write a programme by locking an object in table class other than table class."
If we lock object of table class it means "no two objects of table class can't access synchronized block of table class "simultaneously."
According to JIP if we lock d,what is meant by ' getting lock on d'?which objects are trying to acces d .
with out the objects of table class how can we aceess table class block?
Like this I have somany doubts.So please write the entire programme which locks object of a class other than table class.
you no need to write entire code.you simplyedit the code which i gave.I hope you help me.

The objects that lock on d are your table objects in MyThread1 and MyThread2. When you have:
 table t = new table();
you can instead use the following:
 Dummy d = new Dummy();
 table t = new table(d);
then you just construct MyThread1 t1 and MyThread2 t2 like you did above. The example code I wrote above allows the table object to lock on some other object than itself, which is what you seem to have asked. Remember that for this to be of any use, both threads need to lock on the same object. JIP | Talk 19:52, 10 December 2012 (UTC)[reply]

Resizing partitions on Linux without losing data?

This morning I decided to do a system update to my Fedora 17 Linux system by typing yum update. The update failed, because the file system /boot needs 3 MB more free space. How can I resize my HD partitions without losing the data on them? JIP | Talk 08:48, 9 December 2012 (UTC)[reply]

The Parted Magic LiveCD (or LiveUSB) has all the tools you need, and their website has all the documentation on how to use said tools. WegianWarrior (talk) 09:37, 9 December 2012 (UTC)[reply]
I also had missized a /boot partition once. If repartitioning it doesn't work (it often won't) you may just want to move the old boot kernel and sysmap, etc., to a different partition. I've been doing that for a while. Unless you boot into an old kernel... in which case you'll have problems. Shadowjams (talk) 18:33, 9 December 2012 (UTC)[reply]
You may actually have tons of old kernels laying around there, if the updater works like others I have used. Move (or just delete) some of the oldest kernels. 209.131.76.183 (talk) 17:07, 10 December 2012 (UTC)[reply]
Yes, it appears I do have multiple kernels there. Here's the output of ls -l /boot:
total 48203
-rw-r--r--. 1 root root   119103 2012-08-21 22:24 config-3.5.2-3.fc17.x86_64
-rw-r--r--. 1 root root   122022 2012-10-10 15:31 config-3.6.1-1.fc17.x86_64
drwxr-xr-x. 2 root root     1024 2012-10-12 08:27 grub
drwxr-xr-x. 6 root root     1024 2012-10-12 08:33 grub2
-rw-r--r--. 1 root root 16997871 2012-09-01 16:27 initramfs-3.5.2-3.fc17.x86_64.img
-rw-r--r--. 1 root root 17502517 2012-10-12 08:33 initramfs-3.6.1-1.fc17.x86_64.img
drwx------. 2 root root    12288 2012-09-01 15:58 lost+found
-rw-------. 1 root root  2468248 2012-08-21 22:24 System.map-3.5.2-3.fc17.x86_64
-rw-------. 1 root root  2504428 2012-10-10 15:31 System.map-3.6.1-1.fc17.x86_64
-rwxr-xr-x. 1 root root  4782720 2012-08-21 22:24 vmlinuz-3.5.2-3.fc17.x86_64
-rwxr-xr-x. 1 root root  4831632 2012-10-10 15:31 vmlinuz-3.6.1-1.fc17.x86_64
uname -a reports: Linux teletran-1 3.6.1-1.fc17.x86_64 #1 SMP Wed Oct 10 12:13:05 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux Which of the above files can I safely delete? JIP | Talk 19:56, 10 December 2012 (UTC)[reply]
Can't you just do this from the package manager? It appears you have two kernel versions installed (3.5.2 and 3.6.1). I assume both show up in the GRUB startup menu. Can't you just uninstall the one you don't use, presumably the older one? --NorwegianBlue talk 21:25, 10 December 2012 (UTC)[reply]
rpm -qa | grep kernel reports this:
kernel-tools-3.6.1-1.fc17.x86_64
kernel-tools-libs-3.6.1-1.fc17.x86_64
kernel-headers-3.6.1-1.fc17.x86_64
libreport-plugin-kerneloops-2.0.14-1.fc17.x86_64
abrt-addon-kerneloops-2.0.13-1.fc17.x86_64
kernel-3.5.2-3.fc17.x86_64
kernel-3.6.1-1.fc17.x86_64
Which of these can I remove? JIP | Talk 18:21, 11 December 2012 (UTC)[reply]
Presumably you're running 3.6.1 without any issues. I would remove 3.5.2. 209.131.76.183 (talk) 18:26, 13 December 2012 (UTC)[reply]
Yes, I am running 3.6.1. So I just do rpm -e for any package containing "kernel" and "3.5.2" in its name? JIP | Talk 19:47, 13 December 2012 (UTC)[reply]
Who would have thought? That command worked, and when I rebooted, I got back to kernel 3.6.1 all fine, and was able to run yum update. JIP | Talk 08:28, 15 December 2012 (UTC)[reply]

Good opportunity to abandon a separate /boot. Copy the /boot directory to the / partition, re-run grub-install, modify /etc/fstab, done. ¦ Reisio (talk) 22:45, 9 December 2012 (UTC)[reply]

How to exponentiate BigInteger values in Java?

I am trying to compute a power of two in Java using BigIntegers. The line that eclipse doesn't like is the following:

public class JScanner_main {
....
BigInteger two = new BigInteger("2");
BigInteger exponent = lowbound;
BigInteger poweroftwo = two.pow(exponent);
....

Eclipse says

The method pow(int) in the type BigInteger is not applicable for the arguments (BigInteger)

What exactly is the problem here? Does that mean exponent cannot be a BigInteger? How can I solve this? -- Toshio Yamaguchi 13:10, 9 December 2012 (UTC)[reply]

No, for pow() the only acceptable argument type is int, per the BigInteger documentation. You can do this with modPow, as long as you supply a mod value that you know will be larger than the result:
import java.math.*;

public class big {
    public static final void main(String [] args){
	BigInteger b1 = new BigInteger ("2");

	System.out.println("2^^8 is " + b1.modPow(new BigInteger("8"),
                                                  new BigInteger("100000000000000000000000")));
    }
}
But to need that you'll need to be calculating a value > 2230, and I think you'll find BigInteger will chew through lots of time and memory to do that - see low long this takes just to calculate that value:
	System.out.println("2 to 2^^30 = " + new BigInteger("2").pow(1073741824));
-- Finlay McWalterTalk 13:40, 9 December 2012 (UTC)[reply]
Well, what I want to do is computing 2n for large values of n. I guess I better use multiply then and use a loop to compute the power. -- Toshio Yamaguchi 13:58, 9 December 2012 (UTC)[reply]
Storing the decimal expansion of 2230 will take about 200 Mbytes (100 Mbytes if they use BCD, but I don't think they do), so 2235 will take about 6 Gbytes to store (handwavy calculations here). You don't have enough memory to deal with decimals this gigantic. -- Finlay McWalterTalk 14:21, 9 December 2012 (UTC)[reply]
How large are the values of n ? Is n always a positive integer ? And does the answer need to be exact, right down to the one's position ? StuRat (talk) 16:47, 9 December 2012 (UTC)[reply]
I want to systematically test all even integers for a congruence as part of investigating a mathematical problem. I don't have any exact plans so far, but testing up to around 1015 or something would be nice. -- Toshio Yamaguchi 19:13, 9 December 2012 (UTC)[reply]
1015 is less than 250, so you don't need to be raising a BigInteger to the power of another BigInteger. You can just use the existing BigInteger.pow(int) call. -- Finlay McWalterTalk 19:39, 9 December 2012 (UTC)[reply]
Do you mean n = 1015 ? That's makes 2n so large it won't fit on any computer. If, on the other hand, you mean that 2n = 1015, then that's 125 GB, which is huge, but could fit on a hard drive. So, if you need to write out numbers that large, in full detail, it is theoretically possible, but it won't be quick. Do you need the exact number, or is some approximation acceptable ? StuRat (talk) 04:39, 10 December 2012 (UTC)[reply]
Please say what your actual goal is. This often has a huge impact on the algorithm you should use. If you for example want to search for Wieferich primes or near-Wieferich primes then computation of large powers of two is irrelevant for any meaningful search. Instead you should use modular exponentiation which will never compute values larger than p4 when you test p. Java has a modPow function for it. PrimeHunter (talk) 05:43, 10 December 2012 (UTC)[reply]
1015 will fit in a 64-bit regular int and doesn't need bignums, but as PrimeHunter says, you should probably say what you're actually trying to calculate (and the math ref desk may be more helpful than here). If you can test a billion numbers a second you're looking at a week or so of testing, if you want to test all the even numbers up to 10**15. But there very well may be optimizations possible. 66.127.54.40 (talk) 07:04, 10 December 2012 (UTC)[reply]
I plan to write a program to search for solutions of the congruence 2n ≡ 1 (mod (n + 1)2) (up to about n = 1015 or something, which I know will result in huge intermediate values in such a search area). I plan to use Java BigInteger data type for that. I haven't developed a specific algorithm for this task yet (another user earlier suggested repeated squaring modulo (n+1)2 might be useful). -- Toshio Yamaguchi 12:31, 10 December 2012 (UTC)[reply]
If you're just planning on doing this the obvious brute-force way, then I think modpow is exactly what you're looking for. Basically (psuedocode) two.modpow(n, (n+1)^2) == 1, assuming I understand the problem correctly - it has been a long time since I have actually done anything with modulo arithmetic. 209.131.76.183 (talk) 12:39, 10 December 2012 (UTC)[reply]
Modular exponentiation is definitely the way to go here. It would be very slow if the large powers of two were computed and tested directly. With p = n+1 you ask for 2p-1 ≡ 1 (mod p2). If this holds then we also have the weaker 2p-1 ≡ 1 (mod p). So p must either be an odd prime (which always satisfies the weaker condition by Fermat's little theorem), or a base 2 Fermat pseudoprime. The prime solutions are the Wieferich primes. PrimeGrid's Wieferich Prime Search currently says Completed Thru 692761e11.[6] If you are also interested in pseudoprime solutions then you can download all base 2 Fermat pseudoprimes below 1015 at http://www.cecm.sfu.ca/Pseudoprimes/. OEIS:A001567 has those below 1012. PrimeHunter (talk) 23:31, 10 December 2012 (UTC)[reply]
Hmm, my math is weak these days but I think that equality holds when (n+1) divides the order of the multiplicative group Z/(n+1)^2Z, i.e. (n+1) divides the Euler totient function of (n+1)^2. You can figure out the totient from the prime factorization of n+1 and (just guessing) you have higher chances of a match when n+1 is made of small factors. So you might get a more efficient search by constructing suitable n's instead of just exhaustively searching them. Do you know if the congruence even has any solutions? You might be able to make a probabilistic guess of how often they occur (maybe never) based on the distribution of prime factorizations of numbers. 66.127.54.40 (talk) 00:05, 11 December 2012 (UTC)[reply]
I definitely expect to find two solutions below 10000, namely 1092 and 3510. I don't think those numbers are base 2 pseudoprimes (A001567 doesn't list them). It is easy to see that if p is a Wieferich prime, then p-1 satisfies this congruence, but I don't know whether the numbers one less than Wieferich primes are the only solutions. For example, there might be solutions where n+1 is composite, although I believe that would mean any prime factor of n+1 would be a Wieferich prime and I don't know whether such numbers exist (if my conjecture about n+1 composite is correct, then the only prime factors smaller than about 7×1016 are 1093 and 3511, according to the latest search result from PrimeGrid here). -- Toshio Yamaguchi 07:04, 11 December 2012 (UTC)[reply]
Hm, interesting, I guess this problem is nontrivial. I just checked all even numbers up to 1e8 (took about 1.5 minutes on one core of my old 2.5 ghz Core 2 laptop) and 1092 and 3510 were the only matches. With a newer computer and a more careful implementation maybe you can get 10x speedup, so around 1e7/sec ignoring slowdowns as the numbers get bigger. Let's say 5e7 using multicore. So to get through 1e15 you need 2e7 seconds, or most of a year. Maybe there is some way to use a GPU. I think a naive Java program won't be optimal. 66.127.54.40 (talk) 08:35, 11 December 2012 (UTC)[reply]
I wrote about p = n+1 and explained that p must either be an odd prime or a base 2 Fermat pseudoprime. I didn't claim n had to be a pseudoprime. Prime p has already been tested by PrimeGrid up to 692761e11 = 6.92761×1016. The only numbers n you have to test up to 1015 are the 1801533 numbers for which n+1 is listed in the file at http://www.cecm.sfu.ca/Pseudoprimes/. This can be done in a minute. If you have problems with the file format then I can do it for you. Larger databases of base 2 pseudoprimes have also been computed but I don't know whether they are online. PrimeHunter (talk) 13:59, 11 December 2012 (UTC)[reply]
I think you are right that if p is a composite solution then the prime factors are Wieferich primes. There are such cases for many other bases than 2. For example base 26 where the solutions up to 107 of 26p-1 ≡ 1 (mod p2) are: 3, 5, 15=3×5, 71, 1065=3×5×71. PrimeHunter (talk) 03:22, 12 December 2012 (UTC)[reply]

Online store doesn't work with Firefox 16, but works with other browsers

This web store (warning: potentially NSFW content) isn't working in Firefox 16. Every time I put something in my shopping basket and try to go to the checkout, it tells me the shopping basket is empty. The exact same store works OK in Epiphany and in Midori. I haven't tested it on MSIE because Microsoft doesn't make software for Linux. Can anyone tell me what's the problem here? JIP | Talk 17:30, 9 December 2012 (UTC)[reply]

What happens when you try Firefox in safe mode? -- Finlay McWalterTalk 17:32, 9 December 2012 (UTC)[reply]
The exact same thing. I can select as many items as I like but I can never get to pay for them. JIP | Talk 17:35, 9 December 2012 (UTC)[reply]
WFM. Where’d you get your Firefox build? Try 17. ¦ Reisio (talk) 20:02, 9 December 2012 (UTC)[reply]
I got it from the Fedora 17 operating system. I updated to 17 but the problem still exists. JIP | Talk 06:15, 10 December 2012 (UTC)[reply]
Well since it works on my Linux box, my first guess is that there's something up with your build or the configuration you're using with it. One thing you might try is to get the binary build of Firefox from mozilla.com directly — if that works, it's even more likely there's some issue with Fedora's build/configuration, and you'd be even more justified filing a bug (at http://bugzilla.redhat.com/ I'm guessing). ¦ Reisio (talk) 00:14, 14 December 2012 (UTC)[reply]
OMG, what kind of shop is that? JIP | Talk likes having his ass spanked. JIP, be a good boy and use another browser. OsmanRF34 (talk) 00:22, 10 December 2012 (UTC)[reply]
No, I was there for the BoundCon tickets, actually. JIP | Talk 06:15, 10 December 2012 (UTC)[reply]

The problem might have been a corrupted cookie. I deleted all cookies from that site, which resulted in the site claiming my browser was rejecting cookies. I brought up the entire Firefox history, searched for the site's name, and clicked "Forget about this site". When I quit and restarted Firefox, and went to the site again, the store seemed to work OK. JIP | Talk 08:59, 15 December 2012 (UTC)[reply]

December 10

Laptop mouse

On my Asus laptop computer. My mouse pointer is very sensitive to everything. My "page up and down" option keeps interupting my pointer when I move about the page and I have to keep left clicking to go back to my pointer. This is very annoying. How do I stop he mouse from being so sensitive. — Preceding unsigned comment added by Bill2345bill (talkcontribs) 02:25, 10 December 2012 (UTC)[reply]

Do you mean the touchpad or an external mouse? Hcobb (talk) 03:37, 10 December 2012 (UTC)[reply]
And are the "page up and down options" the page up and page down buttons on the keyboard ? StuRat (talk) 04:25, 10 December 2012 (UTC)[reply]
I sometimes have the same problem. I think it is because my touchpad has a strip on the edge which acts like page up / page down. If you keep your fingers more towards the middle, maybe thet will reduce the problem. Astronaut (talk) 12:57, 10 December 2012 (UTC)[reply]
Or you could cover that strip with tape, perhaps. StuRat (talk) 19:16, 10 December 2012 (UTC)[reply]
You can disable the scroll function completely. From here: Click Start > Settings > Control Panel > Mouse. On Mouse Properties tab: Device Settings Tab > Settings > Virtual Scroll. Then remove the dot from the Enable fields.
You can also adjust the sensitivity of the touchpad in the same dialog box, although this mainly affects the 'speed', i.e. how far you have to push the mouse to move the cursor a given distance. It's possible that your touchpad driver has other options, so if the above doesn't give the solution you require, post back here with the details of your driver (can be found usingthese instructions). - Cucumber Mike (talk) 19:41, 10 December 2012 (UTC)[reply]

Wifi is only accpeting my laptop but not the others

I just received a new modem.. So I configured it, but seems it only accepting my laptop for wifi and no one else can Join the network either. Also, it doesn't have a "non-passworded" option. I want to make it so, the other laptops/devices can connect..

Here is a screenie of the interface. http://i.imgur.com/xHUdj.png Thanks for your help 181.50.171.193 (talk) 04:36, 10 December 2012 (UTC)[reply]

Try the "Access Control" section on the left. The other devices may be blocked by MAC address (or rather, not specifically permitted, and need their MAC addresses added here). -- Chuq (talk) 05:44, 10 December 2012 (UTC)[reply]
It doesn't seem that it is blocking any adress, it says "allow/block" filtering is "unactivated" meaning they should be able to connect to the network. 181.50.171.193 (talk) 06:13, 10 December 2012 (UTC)[reply]

INSTALLING ANDROID TO A PC

What are the advantages of installing Android Software to a Personal Computer? Any disadvantages? Thank you.175.157.50.100 (talk) 06:17, 10 December 2012 (UTC)[reply]

Do you mean installing a virtual android? The only advantage I can think of, is that if the operating system fails, you won't lose anything of value.. 181.50.171.193 (talk) 06:19, 10 December 2012 (UTC)[reply]
The biggest hurdle you can expect to run into is driver support. Although the system will likely boot and run, you probably won't have accelerated graphics out of the box. You'll also want to see if there is support for your touchscreen, if you have one. It's been over a year since I last experimented with Android on x86, so things may have improved greatly since then. You won't be able to run normal PC software any more, but you will have access to the app store. 209.131.76.183 (talk) 12:32, 10 December 2012 (UTC)[reply]
If all you want to do is run Android apps on your PC, there are solutions for that. BlueStacks lets you easily do so on Windows and OS X. With that, I'm not altogether sure what advantages installing a full-blown Android OS (e.g. Android-x86) on your computer would bring... -- Consumed Crustacean (talk) 18:47, 10 December 2012 (UTC)[reply]

Modifying the hardware of the Nokia 101?

How do I modify the hardware of my Nokia 101, adding a camera and web browsing? Write English in Cyrillic (talk) 12:00, 10 December 2012 (UTC)[reply]

Your only option is to get a camera, and a small device that can browse the Internet, and to use Duct tape to join it all together.
My personal advice is to get a new phone.

doubt on synchronized block 3

Do not think that it already asked question
the general form of synchronized block is

class table  
{
.......
void printTable(int n)
{
synchronized(obj)
{
......
}
}
}

Here obj means object of table class or object of any class.
1)If we write this in place of obj we get lock on the object of table class.
That means we can’t access the synchronized block simultaneously by same object of table class.
2) But if write other object’s name other than table class in place of obj,what it means?
Then which object can’t access the synchronized block simultaneously?
— Preceding unsigned comment added by Phanihup (talkcontribs) 12:16, 10 December 2012 (UTC)[reply]

Don't ask the same question over and over again. I already answered your question you asked a couple of days ago, read that answer instead. JIP | Talk 19:53, 10 December 2012 (UTC)[reply]

How to let Firefox extension FireGestures do "Open URL in new tab and active it / Search for Selection"?

Hello. I found a script in official site — "[Hybrid] Open Link in New Tab / Search for Selection", but it opens link in a background tab. Or is it influenced with other plugin (like Tab Mix Plus)? --202.117.145.244 (talk) 14:29, 10 December 2012 (UTC)[reply]

You might want to go to about:config and check your prefs that match InBackground. ¦ Reisio (talk) 20:09, 10 December 2012 (UTC)[reply]

ISO images vs burnt image

I'm trying to verify the integrity of a burnt DVD/CD image from a verified ISO, after the fact. Bit for bit the images are nearly identical, except the burnt DVD had about 300k of extra data. However upon looking at it, the extra is simply 0s. I assume this is padding, but can someone confirm that for me? Shadowjams (talk) 20:57, 10 December 2012 (UTC)[reply]

Do you mean decimal 0's (that is, the actual number zero), or binary 0's (that is, no data) ? StuRat (talk) 21:50, 10 December 2012 (UTC)[reply]
Those are the same thing. I think you mean ascii "0"s, which no, it is not. I'm really asking if someone is familiar with either the UDF format or how authoring software handle non-uniform end-blocks. Shadowjams (talk) 22:01, 10 December 2012 (UTC)[reply]

It's probably just the remainder that hasn't been written to. Mount the image and do a recursive diff or cmp and you can be sure. ¦ Reisio (talk) 23:39, 10 December 2012 (UTC)[reply]

I did, it seems to be on a sector boundary and the 300k or so of null data appears to be padding. It of course makes summing the disc/iso difficult because they're different (although if you exclude the 0s they sum perfectly). Shadowjams (talk) 00:05, 11 December 2012 (UTC)[reply]
Perhaps more important than the file format: what API or tool are you using to read the data from the DVD? For example, dd is generally the lowest-level file data-access available without directly calling into the device-driver. Those extra zeros could have been added by the file-reading function, and might not actually be present on the disc. Nimur (talk) 23:48, 10 December 2012 (UTC)[reply]
That's kind of interesting... how would I read more low level than dd though? I suppose it's an interesting point about whether it's the authoring software or dd that's padding the end, and maybe moot, but I guess my instinct is the authoring software's more likely to do the padding than dd is (or I guess to your point, the cdrom device driver). Shadowjams (talk) 00:05, 11 December 2012 (UTC)[reply]
It's not dd; dd is as dumb as a bucket - it just calls read(2) and write(2) until it's done. If you're calling read(2) on a block device like /dev/sr0 then that's a straight pass through to the block device driver. On doing something like you're doing I see exactly 16Kbytes of 00s when I read the disk back. I tried to read Brasero's source, so I could give you a meaningful answer about what "integrity check" really means, but doing that just made me sad. -- Finlay McWalterTalk 00:56, 11 December 2012 (UTC)[reply]
From my experience with Windows software, most software and/or drives do not add that much padding. I'm not entirely sure whether the drive or software is required to add padding if the DVD size is not a multiple of recording frames (i.e. the number of 2048 byte data sectors is not a multiple of 16) or whether it's acceptable to leave it as is. Some software or drives do add padding to ensure its a multiple of recording frames. Obviously an entire recording frame will be written in any case but I think if the disc says it's only X sectors, most software will read it as X sectors even if its only giving part of a frame, at least IIRC I have had discs which weren't an integer of recording frames. But this is irrelevent in your case since the extra size is significantly more then the maximum possible extra needed to ensure an entire recording frame is used (~30k). I'm pretty sure there's no reason to add that much and I don't think I've ever burnt something where I ended up with that much padding and I used to burn a lot of images, although I don't really understand the mention of 'authorising software'. My impression from the original question is we're referring to an ISO, in which case it was already authored and no authoring software need be involved, simply something to write the ISO to the disc. (It's possible you may be using authoring software to write the image, but in that case it's still not functioning as authoring software.) Nil Einne (talk) 06:02, 11 December 2012 (UTC)[reply]
I did some experiments on Linux with Brasero and then with growisofs (the part of dvd+rw-tools which, despite its name, actually writes iso images to disk); I think utilities like Brasero actually use growisofs to do the burning. I see that Brasero will pad files with 00s to the next 32kbyte boundary, so even a 1 byte iso will read back as a 32kbyte file, with all but the first byte 00s. The reason appears to be that growisofs insists on files that are multiples of 32kbytes. That's not the same as the block device's native block size (as reported by the BLKGETSIZE ioctl) which is 2048 bytes, as you would expect. So I'd understand where you'd get up to 32kbytes of 00 padding, but not 300kbytes. -- Finlay McWalterTalk 13:13, 11 December 2012 (UTC)[reply]
If it were me, I would consider the extra padding safe, assuming the rest of the file was copied properly. If you want to be sure, you could look into the specifications of ISO 9660 and make sure that extra data at the end won't hurt anything. I suspect that the various tables and directory entries specify the sizes and locations of everything, so there is no reason a reader would ever look past the end of the data into the zeroes (or further). If the directory is malformed, I suppose it could point past the end, but in that case your original has problems too. 209.131.76.183 (talk) 13:41, 11 December 2012 (UTC)[reply]
Thank you all for the thoughtful replies. Yeah, I'm confounded by the size of the padding, although it's all 0's so I'm not concerned about its integrity. The burning software in question was nero an it was just burning a standard ISO for a linux distro. It is a curious finding though. Maybe I'll experiment with the same ISO on a different burning program later and see if it's the same result. Shadowjams (talk) 16:58, 11 December 2012 (UTC)[reply]

December 11

I no longer see the option to select the size image you want.

1) Is this the same for everyone else ?

2) Is there a way to bring this option back ? StuRat (talk) 07:08, 11 December 2012 (UTC)[reply]

'Search Tools', underneath the input area, towards the right. For a significantly older look, you can add &sout=1 to the URI. ¦ Reisio (talk) 09:14, 11 December 2012 (UTC)[reply]
OK, thanks, that's where they hid it. StuRat (talk) 17:53, 11 December 2012 (UTC)[reply]
Resolved

On what's that site running

Is it possible to find out what hosting plan (shared hosting, VPS, dedicated server,...; how much memory, etc) a site is running on? If not, is there a list of selected sites and their hosting plan out there somewhere? (I'd be mostly interested in small to medium e-commerce sites.) bamse (talk) 19:46, 11 December 2012 (UTC)[reply]

Generally speaking there is no way to tell. In some cases you may be able to RDNS the host, figure out who the hosting company is, and then infer things about the server from the types of services that the company offers. But that's not much to go on. In many cases it won't give any clue about what's happening on the back end either. The only part you can see is the public-facing web server, but many services are spread across multiple machines. You might even only see a content distribution network rather than the actual server that the site operator uses. What are you really trying to find out or do? You might get a more helpful response if you can describe your goal or application more directly. 66.127.54.40 (talk) 07:23, 12 December 2012 (UTC)[reply]

December 12

How do I get Windows 7 to show me file extensions ?

That is, I want to see ".exe", or whatever, as part of the file name. StuRat (talk) 05:41, 12 December 2012 (UTC)[reply]

Ah yes, Windows being 'helpful' as usual, by making you do it the MS way... open the 'Folder Options' dialog from 'organize' for the relevant folder, click on the 'view' tab, then clear the 'Hide extensions for known file types' check box, and click 'OK'. Confused? You will be... AndyTheGrump (talk) 06:06, 12 December 2012 (UTC)[reply]