Jump to content

Wikipedia:Reference desk/Archives/Computing/2011 September 8

From Wikipedia, the free encyclopedia
Computing desk
< September 7 << Aug | September | Oct >> September 9 >
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.


September 8

[edit]

How can you help me find my lost phone: A black-cased Sony Ericsson Xperia Play under Verizon's service?

[edit]

Hi, first of all, I may have to switch to another service provider because Verizon says they do NOT have the capability to track/ping my phone's location through its GPS feature.

I have since found various tracking apps and remotely authorized the downloads from the Android market site on my laptop. However, they tell me there is no way to install them remotely; they should have been done BEFORE the phone was lost. However, a store employee with Verizon told me face-to-face that getting a remote-install to happen anyway "would take hacking skills far beyond my own abilities."

1. (So would anyone know of a tutorial to get it done that way?)

He also suggested that I file a police report (on the grounds of possible theft) so that a subpoena can happen that would enable the phone to get location-pinged by law enforcement. I suppose that the law has their own forensic equipment to get it done this way. However, when I filed it at the local substation, he told me that with all the subpoenas Riley County has to process, mine could take a month to get done. (I have yet to know of any phone battery that can keep powering for a month.)

2. So whenever the phone can start getting pinged, in the event that the battery is already run down, can the phone's ping history also be found? (Therefore, the last 50 pings originating from one location would indicate that the phone likely is still there?)

3. Do you have any other suggestions? Any tricks up any of your sleeves that could lead me to reuniting with my phone again? Thanks, --70.179.163.168 (talk) 06:14, 8 September 2011

This blogger apparently had success remote installing LookOut's Plan B after the handset was already lost. This exact scenario does seem to be what Plan B was designed for, so you might have some luck. Serrio (talk) 10:13, 8 September 2011 (UTC)[reply]
I still haven't received the email from Plan B. Any other apps like it? Any other suggestions?
Turns out, my insurance only covers damaged and defective phones, not lost & stolen. --129.130.98.203 (talk) 18:41, 9 September 2011 (UTC)[reply]

Office Professional Plus 2010

[edit]

What's the licensing on Office Professional Plus 2010 - I'm sure I read somewhere that I can install it on upto three machines but can't confirm this - anyone able to help? --Cameron Scott (talk) 08:20, 8 September 2011 (UTC)[reply]

This chart and attached notes may help: Office 2010#Comparison. Note 1 says "Home and Student ... can be installed on three PCs in the same household.." Note 4 says "Home and Business boxed product can be installed on two PCs."
Note: "Office Professional Plus 2010 is available through Volume Licensing only." see http://office.microsoft.com/en-us/professional-plus/. So apparently it can be installed on multiple machines, but you need to buy the appropriate number of licenses.
"If you purchase a Traditional Disc retail license of Office Home and Business 2010 or Office Professional 2010, the retail license terms allow you to install, activate, and use Office Home and Business 2010 or Office Professional 2010 on your primary PC and your portable device such as your laptop. See Office 2010 FAQ (Pricing and licensing) № 9
You could also ask Microsoft directly on the Microsoft Office Forum, here - 220.101.30.184 (talk) 11:30, 12 September 2011 (UTC)[reply]

Financial news formatted to be read by computers

[edit]

In the article algorithmic trading, it says that "Financial market news is now being formatted by firms such as Need To Know News, Thomson Reuters, Dow Jones, and Bloomberg, to be read and traded on via algorithms." I've tried to find some examples and explanations of how these news are formatted and how the reading works, but I have not been successful. Could anyone point me to a site where this is explained in more detail? Thanks, /Marxmax (talk) 09:42, 8 September 2011 (UTC)[reply]

It's done using text analysis software and expert systems. See this article and this NYT article.Smallman12q (talk) 13:10, 8 September 2011 (UTC)[reply]

How programming languages work

[edit]

Sorry if the title isn't really a good description of what I am going to ask but here are a few things that I want to wrap my head around.

  1. In a language like C for example, you have the printf function which in the command line will print a string. But how does the shell know how to print this? If it is told to print "Hello" at what point in the system is it told how to actually "draw" a character? I'm thinking it just has to be defined at some point but where.
  2. A language like C can be used to make command line applications, GUI applications or even an OS or driver software. Theres something about this that seems strange to me. If you look at printf, it makes sense to print something to the command line assuming its defined somewhere how to do this (as mentioned in my previous question). But how could printf ever compile to something meaningful at such a low level as when developing a kernel or driver? --178.208.209.155 (talk) 09:52, 8 September 2011 (UTC)[reply]
1) When you compile your program it's linked with one or several libraries. For C, the C standard library contains printf. printf is really quite a complex function (with all kinds of formatted printing options) which eventually generates a single string. The library code then has to emit that which it does with a system call (usually to the write system call). Write takes as one if its arguments a file descriptor, and it's the same call that's used to write to a terminal (which is what you're talking about), to a pipe, or a file, or all kinds of other things (at least on unix, where almost everything has a file-like interface). On receiving that, the kernel has to route the write to whatever device will handle it. It knows how to do so by looking up the file descriptor in a table it already has, and with that it calls the appropriate code. A simple example is the (now very old fashioned case) where you had a serial terminal (a teletype machine plugged into a serial port) - the kernel would know that your process was attached to the teletype on /dev/tty2 which corresponded with a given serial port, and it would just squirt the string out that port. It's a bit more complex now when the terminal isn't really a little machine, but it's a window on your screen. In that case the terminal is usually a pseudo terminal, which means its implemented by another program. The kernel doesn't care (and mostly doesn't know) about the difference, so it just squirts the data at that program in the same way. The program (say it's xterm) receives that string and has to display it on its window using graphical calls, just like a little graphics program. That uses the system's graphics library (e.g. X, Cairo, GDI+) just like a word processor or a game uses. -- Finlay McWalterTalk 10:10, 8 September 2011 (UTC)[reply]
2) Yes, strictly printf is an application library call, intended by ordinary user mode applications, which works by the mechanism I've described above. The same printf usually isn't available in kernel code (or other supervisor mode code, like device drivers) because they don't run in an application context (with a controlling terminal and a process id and so forth). When a kernel is complied, it's not complied against the C standard library, but (at least with larger, mature kernels) there's a basic library that provides common kernel functions that kernel code and device drivers and file system code and stuff will want. That's mostly stuff like managing semaphores and queues and manipulating the various memory structures that kernel code uses to store and transmit its own data, but it frequently contains a printf (usually a lighter-weight one, with fewer features). It's up to the kernel's authors what happens when that's called - it might emit data over a network socket, to a log file, to an in-memory circular buffer, to the console driver (i.e. the basic text screen), over a serial port, or it might just drop it. All of these require some degree of an implementation and most require at least a basic device driver. You do run into a kind of chicken-and-egg case, where the device that's implementing your kernel printf has to be working first, so there's often some code in the early part of the kernel run that can't print anything. -- Finlay McWalterTalk 10:19, 8 September 2011 (UTC)[reply]
Just to add to the comprehensive answer above. The OP could also be curious about how the H in Hello is actually generated. When you press the H key, a keyboard interrupt is fired and your BIOS or OS reads one byte from the keyboard buffer, which in the case of H is ASCII character 72. If you're in the BIOS or text mode (or DOS in the old days) then a table is read which defines how to draw the character on the screen (by sending it to the video buffer and when your monitor refreshes vertically then you see the update). If you're in a GUI OS (operating system) like Windows then a similar sort of thing happens with the interrupt, but eventually a font file is read which defines how to draw the character graphically. BTW this brings back good but nerdy memories of Ralf Brown's interrupt list! Sandman30s (talk) 12:11, 8 September 2011 (UTC)[reply]

I think there is no way of really really understanding what is going on without understanding the concept of machine language, and that any program written in C gets compiled into an array of thousands or millions of machine language commands. Looie496 (talk) 14:55, 8 September 2011 (UTC)[reply]

I think that the most useful simple answer to question (1) is "no particular place". Any useful computer system is built out of layers upon layers of abstraction. So, at some point, there's a function to paint arbitrary dots on a screen (well, it's probably more complicated than that, but this will serve for now). Some other function uses it to draw curves. Some function uses curves to draw letterforms, like those used in TrueType fonts. Some function assembles lines of text. Some function uses that to handle textboxes, with line-wrapping. Somewhere in the terminal emulator, standard input and standard output are hooked up to the textbox functionality. For whatever definition of "drawing" you have, there exists a stage that draws that "H". There are a lot of different definitions of "drawing", so there are a lot of stages. This deeply-layered approach is the only way that anything ever gets done in software ... and this kind of touches on an answer to (2): software is only computation. A piece of functionality is said to be "high-level" simply if there are a lot of layers sitting beneath it. Any of these layers may be written in any language (though some are sometimes more suitable than others). Another way of looking at it is this: writing a (simple) compiler is easy, because all it has to do is take a description of computation (with a well-defined meaning, hopefully!) in one language, and turn them into a (presumably longer and uglier) description of computation in another (hopefully well-defined) language. Paul (Stansifer) 18:15, 8 September 2011 (UTC)[reply]

I'd press "Like" to the answer of Looie496. Down below it's really electronics. On top of that you have a chip that's smart enough to read instructions from memory. These instructions are still just numbers, but they mean things like "Get a value from the memory at position X and put it in register Y". "See if register Y now only has zeros in it, if so, skip 5 instructions". In for example the Apple II this is enough to "print" something to the screen. The video card shared some of the memory and if there was a value 0100000 it would light up 1 bit and be dark for the zeros. Programming by typing in numbers is not very efficient so that's why "they" came up with assembly. Now you had another program helping you make your own program. It enabled you to write MOVY X instead of the numerical version of it. On top of that came other languages like C that abstracted things even more. Still, you had to explain that if you wanted a variable to go from 1 to 10 it needed to add 1 to the variable each loop. Because of lazy creators of compilers the variable NumberOfPlayers meant something completely different than NumberofPlayers. On top of C came Basic, where you didn't have to explain what a loop was because it knew and it guessed right about the number of players variable. Then came a few improvements. Splitting a program into sections ("procedures") to do one task was a nice step. The next huge step was to invent objects. After that smaller, but brilliant steps were made like the introduction of Lambda expressions. That's where were now. In 5000 years people will hardly believe it, but case sensitivity and having to explain a loop to your compiler is nowadays considered "smart". But I'm diverting. Joepnl (talk) 23:30, 12 September 2011 (UTC)[reply]

How to use a 'Combo box' value as a 'Colmumn name' in a query?

[edit]

Hi all,

I am using Access 2007. Am a beginner.

I want to use the option selected in a combo box as a colum name in a select query. Following are the details.

Table name: Table_1
Column names: C_1, C_2, C_3, C_4
Form name: Form1
Text box name: Tb_1
Combo box name: Cb_1

The user enters a phrase to be searched for in 'Tb_1'. The user selects the column name (say 'C_2') from the combo box (Cb_1 in this case). Hence value of Cb_1 is C_2 now. A wildcard search (that is a select query) is to be performed on the selected column ('C_2' in this case) for the phrase entered.

I am using the following query:
Select Table_1.*
from
Table_1
where
Table_1.[Forms]![Form1]![Cb_1] Like "*"& [Forms]![Form1]![Tb_1] &"*"
;

But, I am not getting desired results.

As soon as I run the query, I get a box asking for value of Table_1.[Forms]![Form1]![Cb_1]
And even after entering a correct column name in the box, it returns ZERO results.

In short, I want to use the option selected in the combo box as a column name in a select query.

Can somebody please help. — Preceding unsigned comment added by 115.111.249.152 (talk) 10:14, 8 September 2011 (UTC)[reply]

The problem is that I don't think Access can do something like Table_1.[Forms]![Form1]![Cb_1]. It's getting confused, because it doesn't understand that what you want it to to do is resolve the combobox value and then get the column of the table from it. It's not obvious to me how to make this work in the context of the code as you likely have it (there are lots of other ways to make it work by using VBA). Later this morning I'll give Access a twirl though and see if I can't do something that won't require much modification from your current approach. --Mr.98 (talk) 12:00, 8 September 2011 (UTC)[reply]
I've looked at Access again and I'm convinced you can't do it the way you are trying to do it. You're trying to make the Query builder do too much -- you'll need to create the query in VBA and resolve the column string data yourself.
Example: I imagine you have a button or something on the form that opens up the Query in question. What you're going to do is use your own code instead of its generic code. Now I'm assuming you need this to build a Query object for some reason, so we'll just do that manually using DAO:
If Cb_1.Value = "" Or Cb_1.ListIndex = -1 Then
   MsgBox "You need to select a column."
   Exit Sub
End If

Dim qSql As String
qSql = "SELECT * FROM Table_1 WHERE Table_1." & Cb_1.Value & " LIKE ""*" & Tb_1.Value & "*"""

Dim qdef As DAO.QueryDef
'Check to see if the QueryDef already exists, and if so, clear it out
For Each qdef In CurrentDb.QueryDefs
   If qdef.Name = "myQuery" Then CurrentDb.QueryDefs.Delete "myQuery": Exit For
Next

'Create the new query
Set qdef = CurrentDb.CreateQueryDef("myQuery", qSql)
This will create the new query automatically. It works on my machine. Note that depending on what you're trying to do, creating a querydef might not be the most straightforward approach. But using VBA to create your SQL query is the way to go on this one. --Mr.98 (talk) 18:51, 8 September 2011 (UTC)[reply]


Thanks a ton Mr. 98. But I am facing one more problem. You are right, I do have a button which will be used to fire a query. This is exactly what I have put in the code:

Private Sub Command8_Click()

If Combo34.Value = "" Or Combo34.ListIndex = -1 Then
    MsgBox "You must select a Table and a corresponding Column before performing search."
    Exit Sub
End If


Dim qSql As String
qSql = "Select * From Table2 Where Table2." & Combo34.Value & " Like ""*" & Tb_1.Value & "*"""

Dim qdef As DAO.QueryDef
For Each qdef In CurrentDb.QueryDefs
    If qdef.Name = "myquery" Then CurrentDb.QueryDefs.Delete "myquery": Exit For
Next

Set qdef = CurrentDb.CreateQueryDef("myQuery", qSql)


End Sub

But when I run it, it says 'Run time error 424. Object required'. And when I click on 'Debug', it highlights the line qSql = "Select...".

Can you please help. Am a beginner, hence so many issues for getting it resolved. Thank you for your patience. — Preceding unsigned comment added by 115.111.249.152 (talk) 10:15, 9 September 2011 (UTC)[reply]

Hmm. Two thoughts: 1. Check that the names of the Combo box and the text box are correct. 2. Check that DAO is loaded (Tools/References, make sure Microsoft DAO Object Library is checked). --Mr.98 (talk) 12:33, 9 September 2011 (UTC)[reply]
Why would you use Access to do real programming? Assuming you are not working on a project that has major legacy problems, you can do anything with databases and much, much more using VB.Net Express which is free and has a bright future (and Access doesn't). Joepnl (talk) 22:39, 12 September 2011 (UTC)[reply]
Anyway, Combo34.Value must be ok so I guess Tb_1 has a problem (do you even have a Tb_1?). This is the kind of error that would be found by the compiler a long time before you'd hit F5 using a professional environment. Joepnl (talk) 22:49, 12 September 2011 (UTC)[reply]

S/MIME with ECC

[edit]

Is there any implementations of S/MIME, which can use ECC (ECDSA and ECDH) for signing and encrypting data (such as email or files)? There is rfc5753, which specifies standard for doing so, but is there any real program, which would implement this standard? -Yyy (talk) 12:05, 8 September 2011 (UTC)[reply]

Um.. maybe a Mozilla Thunderbird nightly build and Outlook? Looks a bit bleeding edge, and the Outlook implementation's probably non-standard. Nevard (talk) 22:44, 8 September 2011 (UTC)[reply]
Thanks! -Yyy (talk) 15:29, 9 September 2011 (UTC)[reply]

This mainboard

[edit]

Thoughts on this mainboard: http://www.msi.com/product/mb/H67MA-E45--B3-.html. It would be alongside a Intel Core i5 processor, and about 4 GB of RAM.

Main reason I ask is because I I want to do audio stuff, FL Studio, Pro Tools, etc, and also be able to record guitar/bass, and have a midi keyboard/controller attached.

Urgent!

Thanks! — Preceding unsigned comment added by 159.153.144.23 (talk) 17:55, 8 September 2011 (UTC)[reply]

If you're proposing to connect a guitar or bass to the LINE or MIC inputs on a normal computer motherboard, you'll get poor results. Those ports don't have the high impedance needed to match the guitar, and the analog components on an off the shelf sound card (or on the sound section of an integrated motherboard) have been cost-optimised for typical uses (games, Skype), giving you less than ideal performance for imaging music clearly. To properly record guitar and bass you're much better off using a dedicated adapter, such as Alesis' Guitarlink, Behringer's UGC102, or one of several devices made by Line 6. -- Finlay McWalterTalk 18:50, 8 September 2011 (UTC)[reply]
Thanks, I would use an external unit. Which I guess would be best anyway for guitar input, as I don't know if soundcards have guitar jack inputs. Different question, for midi input (midi controller), would an external unit just be as good as built into th sound card? Thanks!! — Preceding unsigned comment added by 159.153.144.23 (talk) 19:06, 8 September 2011 (UTC)[reply]
Unless you're comparing the worst possible no-brand midi-usb converter available to a great soundcard, yes. Nevard (talk) 22:38, 8 September 2011 (UTC)[reply]
On top of that, if you want to be a proper rockist, you have to record with a microphone the sounds produced by your guitar coming out of an amp. :p ¦ Reisio (talk) 19:43, 8 September 2011 (UTC)[reply]

Firefox 6.02 message

[edit]

I'm getting a message from my antivirus program that Firefox "tried to act as an Internet server". Is this okay? Clarityfiend (talk) 20:14, 8 September 2011 (UTC)[reply]

Yes. If you care why, here goes: Firefox runs as a single process, even when you invoke it multiple times. It can be invoked from other programs (which use the operating system's "open as a web page" function) or from the command line (when you say firefox http://foo.com). The first execution attempt looks for other firefox instances, fails, and so decides to be the "boss" instance. Subsequent calls look for other firefox instances and succeed (they find that boss instance); they send the boss a "please open this page" request, and immediately exit. How the "find others" and "send request" stuff is implemented varies by platform. On Linux and (as far as I'm aware other unix-like platforms like Solaris and OS-X) it uses a unix-domain socket. On Windows it uses a IP socket. It's the listen call for that which sets off security programs like Zonealarm. See this bugzilla report for discussion. hmm, I have that eerie feeling I've answered much this question before - I'll go check the archives-- Finlay McWalterTalk 20:24, 8 September 2011 (UTC)[reply]
Excellent answer, though, Finley, whether or not you've been here before. --Tagishsimon (talk) 20:28, 8 September 2011 (UTC)[reply]
Thanks. Clarityfiend (talk) 20:34, 8 September 2011 (UTC)[reply]

Three tower problems

[edit]

I'm battling with three towers that will not work.The first one is working reasonably well,but it goes quite slowly and is extremely loud-it whirrs away like a turbo fan.

The second one appears to have several-problems downloading-Flash will not load with anything.When I click the download I get an error message.I am unable to run anything immediately-when I try there is a box coming up asking me which programme I want to run it with.Most of the time,this ends up getting stuck in a loop of What programme do you want to run this with?Do you want to run this file?What programme do you want to run this with?Control Panel appears to be screwed too-clicking on any of the features there just brings up an error message so I can't change any settings

The third one I can't get to work at all.I switched it on as usual after a week's holiday and it now asks for a name and password to log on to Windows-since I have never had a password for this,I am totally stuck.I can't even get into Windows to try altering any settings.The only thing that has remotely worked is by leaving everything blank and clicking it...it then comes with 'Loading personal settings' but it immediately comes up 'Logging out'.There is no way to get this to work at all without a oassword which I do not have.

Any ideas gratefully received Lemon martini (talk) 21:11, 8 September 2011 (UTC)[reply]

This all looks like software problems to me - the first may have a bad fan, but it may also be so busy running malware that it runs hot and has few resources for user programs. If you don't have any important data and programs directly on the machines, a clean reinstall might be the easiest and safest way to them back to working condition - either with your original OS media, or with e.g. a recent release of Ubuntu Linux. --Stephan Schulz (talk) 11:14, 9 September 2011 (UTC)[reply]
The title made me think this was about the Towers of Hanoi, and boy was I lost when I read the questions :-) --LarryMac | Talk 12:57, 9 September 2011 (UTC)[reply]

Removing mark-up in Linux

[edit]

When I have text file with <>word</> and I want to remove the <> and </>s. How can that be accomplished? 88.9.108.128 (talk) 22:01, 8 September 2011 (UTC)[reply]

Do you have exactly those characters, <> and </>, or do you have something like an XML file or HTML file, with <tag> and </tag>? If you want an exact-character match to <> and </>, you can use "find and replace" in most text editors. If you want to remove tags with arbitrary contents, you need a little more effort; a regular expression processor tool like sed can do that. Nimur (talk) 22:19, 8 September 2011 (UTC)[reply]
No I have tags with text between them. I'll take a look at sed. At the first look, I have a basic structure: sed 's/string1/string2/' file1 > out and where string1 should be a regular expression that means <tag> or </tag> and string2 should be 'empty space.' 88.9.108.128 (talk) 22:46, 8 September 2011 (UTC)[reply]
Try any odd program called html2txt, if you just want it done now. Nevard (talk) 22:49, 8 September 2011 (UTC)[reply]
Well, I'd like to use sed. I'll need a regex for matching any <tag> or </tag> (but not what's inside them).88.9.108.128 (talk) 23:04, 8 September 2011 (UTC)[reply]
sed -e 's/<[^>]*>//g' foo.html >foo.txt should do it. Note that <something/> is included in <something>, so one RE is enough. --Stephan Schulz (talk) 23:12, 8 September 2011 (UTC)[reply]
It works, thanks.88.9.108.128 (talk) 23:20, 8 September 2011 (UTC)[reply]
I don't really understand your follow-up question, but in any case, it is greedy. — Kudu ~I/O~ 23:33, 8 September 2011 (UTC)[reply]
Sorry, it was a confusion of mine, I even deleted that before you posted. 88.9.108.128 (talk) 23:41, 8 September 2011 (UTC)[reply]
Just to clarify it for others: Regular expression matching in sed is greedy, i.e. it will give you the longest possible match. However, the RE I gave matches the starting '<', then any number of characters except for '>', then a single '>'. Thus, the arbitrary length middle part cannot include a '>'. --Stephan Schulz (talk) 08:47, 9 September 2011 (UTC)[reply]

Free online (no downloading anything) test to see how good one's graphics card is

[edit]

What is a site that isn't a spammy no-good garbage site and that really is legitimate and tests to see how good one's graphics card is without downloading anything? 69.243.220.115 (talk) 23:31, 8 September 2011 (UTC)[reply]

Why don't you just check your graphics card's specifications in your operating system configuration utility?
If you must use a web-based GPU benchmark, have a read at Tom's Hardware WebGL and Web Performance benchmark article. There are a lot of confounding factors you need to worry about.
But, if you really want to do this in a browser, here are some fun WebGL toys:
And of course, for good measure, have a read at Khronos Group's WebGL Standards page. These guys are involved in standardizing the WebGL platform and API. Naturally, they have an extensive listing of user-contributed WebGL examples. Nimur (talk) 02:00, 9 September 2011 (UTC)[reply]