Wikipedia:Reference desk/Archives/Computing/2015 October 26

Computing desk
< October 25 << Sep | October | Nov >> October 27 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 26

edit

Parse wikipedia pages

edit

In order to practice/learn some programming I was thinking of making an android app which takes as input wikipedia pages. Particularly I'd be interest in list articles with geo-coordinates. Is there a recommended way of how to browse/parse/extract the text and geo-data? Are there any licensing issues I should be aware of? bamse (talk) 12:41, 26 October 2015 (UTC)[reply]

The license is at Wikipedia:Text of Creative Commons Attribution-ShareAlike 3.0 Unported License. Basically, you can do what you want, but somewhere on the page you need to attribute the data you started with to Wikipedia --Guy Macon (talk) 19:27, 26 October 2015 (UTC)[reply]
Thanks. How about the programming part? Do I have to parse the html, or are there some more digestible forms available? bamse (talk) 22:35, 26 October 2015 (UTC)[reply]
Take a look at mw:API. The main formats supported are JSON and HTML. --Stephan Schulz (talk) 15:18, 27 October 2015 (UTC)[reply]
See also the API access libraries for various programming libraries. I believe the one for Python (2.7) is the most developed.-gadfium 20:13, 27 October 2015 (UTC)[reply]
Thanks. bamse (talk) 10:38, 28 October 2015 (UTC)[reply]

STOP: 0x0000007B (0xF78D2524, 0xC0000034, 0x00000000, 0x00000000) windows xp setup from cd

edit

OP curiousMahfuzur rahman shourov (talk) 15:06, 26 October 2015 (UTC)[reply]

It looks like you have a SATA CD drive running in "native" mode. That is a BIOS setting. Go into BIOS and see if you can find settings for your CD to change the SATA mode. It likely has two modes. Switch it to the other mode, whatever that is, and try again. 199.15.144.250 (talk) 15:11, 26 October 2015 (UTC)[reply]

reply to ip: op see problem also when install from usbMahfuzur rahman shourov (talk) 15:27, 26 October 2015 (UTC)[reply]

0x7B is INACCESSIBLE_BOOT_DEVICE and means that the OS doesn't have a driver for whatever device you're booting it from (CD or USB). Going into the BIOS settings and changing the CD/USB interface mode to something like "compatibility" may help. It would be better to install something newer than XP, unless this computer won't have Internet access. -- BenRG (talk) 19:02, 26 October 2015 (UTC)[reply]

@BenRG:problem gone, op use xp now with netMahfuzur rahman shourov (talk) 14:52, 27 October 2015 (UTC)[reply]

Intersection algorithm question

edit

At work, I have to write an algorithm taking a group of time intervals, and determining whether any intersect. Here's a plan I made to do it in O(n·log n) time:

  • For each interval, write its start time (with the flag "start") and end time (with the flag "end") into a list.
  • Sort the list.
  • Go through every element in the list.
    • If it has the flag "start", increase the "open intervals" counter by 1.
    • Likewise, if it has the flag "stop", decrease the counter by 1.
  • If the counter ever reaches 2, there are intersecting intervals.

Will this work or not? JIP | Talk 16:37, 26 October 2015 (UTC)[reply]

If you can exploit memory, you create an array of times (I'd likely use a hash table and sort the keys later). For every job (I'll call them jobs, since you didn't say what they were), insert that job into the array at every time that job is active. So, assume I have jobs JOB 1 from time 4 to 6, JOB 2 from time 1 to 5, and JOB 3 from 2 to 5. My array would be:
1 = 2
2 = 2,3
3 = 2,3
4 = 2,3,4
5 = 2,3,4
6 = 4
Now, you ask me if any jobs intersect with job 4. I know job 4 goes from time 4 to 6, so every job at index 4 through 6 intersects (except job 4, of course). This will require a lot of memory, but setup time will be, at worst, O(n log n) and execution time will be fixed - below O(n). 162.211.46.242 (talk) 17:25, 26 October 2015 (UTC)[reply]
I really can't do that. The intervals can be several months or years long and have a resolution of a single day, or even a single hour. It will require far too much memory to keep track of every point of time. Will my approach that I presented above work? JIP | Talk 17:46, 26 October 2015 (UTC)[reply]
Yes, it'll work. (You may need to take care at the endpoints depending on whether the intervals are supposed to be open, closed or half-open, but the algorithm can be adapted for that.) -- BenRG (talk) 18:50, 26 October 2015 (UTC)[reply]
(If the times are representable as integers and there's no danger of integer overflow, the simplest approach is to make all intervals start-closed and end-open by adding one to the start time if it's open and adding one to the end time if it's closed; then check the counter only when the time changes. If you can't do that, another approach is to represent the times as (t,s) pairs, ordered lexicographically, where t is the time and s is either "before" or "after" with before < after. An open interval starts after the start time and ends before the end time, etc., and you check the counter only when (t,s) changes.) -- BenRG (talk) 19:33, 26 October 2015 (UTC)[reply]
Thank you! The intervals are start-closed and end-open to begin with. (It's a fundamental feature of our system, this way we can stick intervals end-to-end with no gaps or overlaps.) I still have to take care of 0-length intervals, which end as soon as they start, but that's a special case and not likely to actually occur very often. JIP | Talk 19:59, 26 October 2015 (UTC)[reply]

1.2GHz dual-core or 1.2GHz quad-core?

edit

1.2GHz dual-core or 1.2GHz quad-core? What's the difference between a smartphone with one or the other?--Denidi (talk) 19:42, 26 October 2015 (UTC)[reply]

The quad core should have twice as many processors and so be able to do twice as many things at once. It may however be limited by power or battery life. Read Multi-core processor. Graeme Bartlett (talk) 20:19, 26 October 2015 (UTC)[reply]
Just to make it clear: does x-core 1.2 GHz mean x processors, each 1.2 GHz? I thought it meant one processing unit of 1.2 GHz, divided in x-cores. That still means quad-core is kind of better, but if both have the same GHz, would that be noticeable? --Denidi (talk) 22:13, 26 October 2015 (UTC)[reply]
It is becoming harder to discern actual performance from the number of cores, because marketing teams don't know how to express computers with many different types of CPU. In a conventional Intel CPU, each core was essentially identical; but even Intel's marketing gets caught up on the distinction between logical cores and physical cores and HyperThreading, so it's hard to interpret a core count. On a system on chip, it is not clear if the core count includes specialized peripheral accelerators and application-specific cores. The megahertz myth perpetuated the incorrect idea that more clock cycles yielded better performance. Along the same lines, larger core count does not automatically improve performance. What matters most is good design and effective execution by the involved engineering teams.
Here is Intel's Multi-Core Introduction website, which explains how they use the terminology.
Nimur (talk) 22:57, 26 October 2015 (UTC)[reply]
For example my phone chip is quad core 400 MHz, but it can do 800 MFlops or 2.5 billion integer operations per second is actual running.
What? More clock cycles does not imply a faster computer? What comes next? More megabytes not implying a better digital camera?3dcaddy (talk) 23:41, 26 October 2015 (UTC)[reply]
It probably means x CPUs (on the same die), each clocked at 1.2 GHz. If they are all the same CPU design, the quad-core may be twice as fast as the dual-core in CPU benchmarks. In real life there probably won't be much difference, because (a) it's unusual for more than two simultaneous CPU-hogging threads to be the bottleneck, and (b) smartphones have been "fast enough" for a few years now. -- BenRG (talk) 08:32, 27 October 2015 (UTC)[reply]
Note that when it comes to mobile devices, quite a few of the somewhat higher end ones now use ARM big.LITTLE architecture [1]. If they're advertised as Octacore or Hexacore, they're big.LITTLE with some "big" cores and some "little" cores. So the performance comparison between a Octacore and a Quadcore is complicated even with synthetic benchmarks. (With a highly multithreaded synthetic benchmark & if the CPU and software supports heterogeneous multi-processing you may get more performance, but it won't be double.) I strongly suspect some may be advertised this way even though they don't support ARM big.LITTLE#Heterogeneous multi-processing (global task scheduling), and so can't actually utilise that many threads simultaneously (or otherwise have a limit on the number of simultaneous threads that is less than the number of cores). See [2] for some more info on some examples of such CPUs. I don't think this happens with quad cores yet, and I think most along those lines have the "big" cores clocked higher than 1.2 ghz. Note also that power and cooling management can mean performance in an actual device may be more limited than theoretical power. See [3] for example. Nil Einne (talk) 12:31, 27 October 2015 (UTC)[reply]

@Denidi, Nimur, Nil Einne, and Graeme Bartlett:android app amount using multithread low, performance per single core more need, buy dual core cost-effectiveMahfuzur rahman shourov (talk) 14:57, 27 October 2015 (UTC)[reply]

IP address change and ISP

edit

Is there a way my ISP can change my IP address? I want it to be changed after November 1st, my last day editing as the IP I am using. Thanks and please be helpful. You can also leave a message at my talk page. Thanks. --74.130.133.1 (talk) 22:38, 26 October 2015 (UTC)[reply]

There is probably a way for them to do it, but I tend to doubt they will explicitly do it for you. But the only way to know for sure is to ask them.
But with that said: I know that if I turn off my DSL modem and wait 5-10 minutes, I always get a new dynamically-assigned (DHCP) IP address, and I believe this is pretty common for many kinds of home broadband connections. —Steve Summit (talk) 22:42, 26 October 2015 (UTC)[reply]
What does DSL mean? Do you have to turn off your connection for 5-10 minutes? How do you ask them? By the way, I am not going to change it yet until November 2nd, the day after the Packers play Denver. Please reply! Thanks and Go Pack Go! --74.130.133.1 (talk) 22:53, 26 October 2015 (UTC)[reply]
Couple things:
  • You talk about you changing your IP address on Wikipedia, and having your ISP change your IP address, as if they are two different things. But they are exactly the same thing. If your ISP were to change your IP address tomorrow, your edits here on Wikipedia would start showing up under that new address, and there would be no way for you to edit as 74.130.133.1 any more. Conversely, if your ISP does not change your IP address on November 1 as you wish, you're still going to be editing here as 74.130.133.1 on November 2 and 3 and 4, whether you want to or not.
  • To learn about DSL, just click on the handy link I provided.
  • How do you connect to the Internet? 56k modem? DSL? Cable modem? Carrier pigeon? Some other way?
  • To power cycle your modem (if you have one), just unplug its power supply from the wall socket, wait 10 minutes, then plug it back in.
  • To ask your ISP, contact their customer service department by telephone, email, or webpage. (Which ISP are you using?)
Steve Summit (talk) 23:01, 26 October 2015 (UTC)[reply]
In some cases an ISP assign an IP in a stick fashions, and will keep it if you connect again so fast. In such cases, leaving the modem off for 24 or may be 48 hours may be enough to convince the ISP to give you a new IP. Nil Einne (talk) 12:36, 27 October 2015 (UTC)[reply]
Thank you Scs. I found a video [4]. --74.130.133.1 (talk) 00:19, 27 October 2015 (UTC)[reply]
There is another way I can change my IP. Closing this. --74.130.133.1 (talk) 00:36, 27 October 2015 (UTC)[reply]
Isn't that just your internal IP address? I don't think it changes your public IP address. Why not just create an account? Dbfirs 12:30, 27 October 2015 (UTC)[reply]
I just want it changed. Right now, I am done with this ip. --74.130.133.1 (talk) 21:29, 27 October 2015 (UTC)[reply]
If your ISP (Time Warner Cable in Lexington) has assigned 74.130.133.1 to you, then only they can change it, but if you create an account on Wikipedia, and log in before editing, then you will no longer be associated with 74.130.133.1 for ordinary editors here. Dbfirs 01:35, 28 October 2015 (UTC)[reply]
I am closing this. Thanks for all the help people. --74.130.133.1 (talk) 20:28, 28 October 2015 (UTC)[reply]