Jump to content

Wikipedia:Reference desk/Archives/Computing/2016 January 28

From Wikipedia, the free encyclopedia
Computing desk
< January 27 << Dec | January | Feb >> January 29 >
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.


January 28

[edit]

Mouse Cursor Jumping Around

[edit]

I edit Wikipedia using either of two computers, a desktop computer running Windows 7, and a laptop computer that is now running Windows 10, both using a mouse. (I don't plan to learn to use a trackpad.) On the laptop, I frequently have a problem with the mouse cursor jumping around, moving to where I don't want it. If I notice this before typing, I can move it back, and may have to undo the selection that it did while moving. If I don't notice until I type, I then realize that a considerable amount of text (that had been highlighted by the moving around) may have disappeared, or just that I have typed in the wrong place. This requires Ctrl-Z. No permanent harm done, but a nuisance. This never happens with the desktop machine. I have two possible theories as to the cause, and will listen to another. First, on the desktop, I have the mouse sitting on a brown wooden computer desk, but on the desktop, the mouse may be sitting on a white tablecloth or a white piece of paper or a magazine. Does the issue have to do with the surface, in which case would buying a small mouse pad help with the laptop? Alternatively, is the problem due to a bug or a setting in Windows 10? I knew that Windows 8, before upgrading to Windows 8.1, sometimes had mouse jump. Is there a mouse jump bug or misfeature in Windows 10? If so, this will cause me to choose not to upgrade from Windows 7 (which works fine for me) to Windows 10. Which is a more likely explanation? Is there a third explanation? Robert McClenon (talk) 00:13, 28 January 2016 (UTC) By the way, this also happens in Word. It isn't a Wikipedia thing in particular. It's a mouse thing. Robert McClenon (talk) 00:14, 28 January 2016 (UTC)[reply]

On the laptop you have a track pad that you don't use, is that right? Try actually disabling the track pad, you should be able to do this somewhere under device manager. I have seen this issue caused by track pad bugs. Vespine (talk) 04:59, 28 January 2016 (UTC)[reply]
Generally not so much a bug, as just the user's palm hitting the trackpad and causing an extra input. MChesterMC (talk) 09:26, 28 January 2016 (UTC)[reply]
Similar effects are caused by defect or wet optical mouse or placing it on shining surfaces like glas. --Hans Haase (有问题吗) 12:50, 28 January 2016 (UTC)[reply]
The optical mouse actually uses a small camera to look at the desktop with an LED light to illuminate it. It looks for movement in the image it sees but if the surface is very shiney, or transparent or if it's very uniform in brightness, it won't be able to measure motion accurately. Something like a page full of text in a magazine should work really well - so if you try that and the symptoms go away, then you might want to invest in a mouse-pad. I agree with the previous suggestion to disable the trackpad - that could be producing spurious results. If neither of those things work, then I'd try swapping the mouse (and the little USB gizmo if it's wireless) between the two machines and seeing if the problem stays with the laptop or becomes a problem on the desktop machine. If the fault follows the mouse then you might try changing the battery (if it's wireless) - and perhaps cleaning the lens underneath the mouse. Another possibility is that you somehow changed the mouse settings to give it crazy high speed or acceleration sensitivity. Find the mouse setup stuff in the control panel and set it back to the default settings. One weird mouse fault I once had was due to that camera under the mouse having a very specific focal length lens on it - so almost any variation in the height of the camera over the desktop would cause it to fail. The mouse had somehow lost it's little rubber feet - which lowered it a millimeter or two putting the camera out of focus...that's a long-shot though! SteveBaker (talk) 14:55, 28 January 2016 (UTC)[reply]
Clarifying that a magazine only works well if it's not glossy (as many are). A newspaper or any text on matte paper should be an ideal test that can rule out surface issues (or suggest that they are the problem). Real wood is also a pretty great optical mousing surface, though my cheap glossed laminate top does cause some slight skipping compared to better surfaces. Speaking of which, the people who really care about optical mouse response and control sensitivity are gamers, so OP might peruse these mouse pads if he decides on that route [1] SemanticMantis (talk) 17:01, 28 January 2016 (UTC)[reply]

Laserjet printer

[edit]

Dear Sir

I purchased second hand an Epson Aculaser c2900 color laserjet printer.

It has full blue, red, and yellow ink cartridges, however the black is empty. I am wondering if this printer will continue to print the color black text even with an empty black cartridge by mixing the blue, red, and yellow inks together to make black. Will this printer do this?

I read on the manufacturer website that it says "auto-switching to monochrome printing when color toners are depleted" which is the reverse of what I am asking. However the issue of empty black cartridge is not addressed.

Please let me know here, I am forbidden from giving you my email. — Preceding unsigned comment added by 122.15.163.132 (talk) 00:55, 28 January 2016 (UTC)[reply]

I don't really have a reference but I'm fairly certain most printers can not print black by using the color cartridges. While no doubt it would be "technically" possible to achieve this, I believe most printers require at least the black to print anything. Vespine (talk) 02:50, 28 January 2016 (UTC)[reply]
I doubt it will. The auto switch to monochrome is the opposite - print in B&W if the color ink is out. Bubba73 You talkin' to me? 04:39, 28 January 2016 (UTC)[reply]
Never operate a machine without toner. Toner is also a dry lubricant for the photo conductor. A damage of the photo conductor has an negative impact to the print quality and toner consumption. It also may affect the fusing unit whithin al larger number of prints. Do not operate a machine using cartridges containing toner only. When toner and photo conductor drum are separate units, the specific toner might be a two component toner which is not including the magnetic matieral. Single component toner is magnetic. New two component toner is not magentic. Blended two component toner behaves also magnetic. When operating a machine with empty the two component toner, the magnetic carrier material will be pulled to the photoconector and scrape it. This will not happen when the high voltage is operating normal and theres enough toner in the unit. The EPSON C2900 has toner only cardridges. Refill kits with chip replacement are avail.[2] It might have two component toner and a chip replacement was done. Check the instuctions what to do when refilling the toner. A mix of original and refilled toner migh have a impact on the print quality. --Hans Haase (有问题吗) 12:18, 28 January 2016 (UTC)[reply]
Note that even if it would do so, it's not a good idea. The mixed color black won't look very black, and you will use up the more expensive color toner. StuRat (talk) 03:44, 29 January 2016 (UTC)[reply]

Something similar can happen on inkjet printers. When the black is getting low on my Epson I get a message "Black ink is low. You can extend black cartridge life by printing with a mixture of other colours to create composite black. Do you want to do this for the current print job?" --rossb (talk) 09:18, 3 February 2016 (UTC)[reply]

How do you make a software to store huge quantities of information on your computer?

[edit]

Let's say you want to make a game. Many games allow people to save game and load old game. How do you make save and load? I've noticed that some games save game information in their own file format. How do people make their own file format? 140.254.136.157 (talk) 18:15, 28 January 2016 (UTC)[reply]

Complex file formats might be a container file format for several information. Typical specialized files formats contain just a header which describes the following content. Simple files, like plain text begin the content with the first byte. To access a huge number of data records, a data record of a table is being defined. This are relational databases. When data does not fit into records or ohter information is beeing taken from, see NoSQL. This are the chats and postings of social networks for exaple. --Hans Haase (有问题吗) 18:42, 28 January 2016 (UTC)[reply]
I have the impression that games would rather save in an xml format/text format and use an own extension like mygamedata.mygame. That's the easy way. You could also create a custom binary file.--Scicurious (talk) 20:53, 28 January 2016 (UTC)[reply]
It's all bytes. Many video games use game engines and/or software libraries that may make things easier for the programmer(s), but ultimately, you write bytes to a file, and read them back. Nothing personal, but this is a fairly basic programming question, so if you want a comprehensive answer you should probably start diving into learning how to program. Writing a simple video game is a good project for learning. --71.119.131.184 (talk) 02:34, 29 January 2016 (UTC)[reply]
I'm guessing from your Q that you imagine it saving all the images you see in every scene of the game. It's not done like that. Let's imagine a monster shoot-em-up where a vampire with 27% of his strength left is in room E8, that could be saved in a file as something like "E8VA27", or even less if you didn't care about making the file human readable. StuRat (talk) 03:41, 29 January 2016 (UTC)[reply]
A lot depends on whether the game allows you to save at literally any point - or only as specific points in the game (such as passing into a new level). In the latter case, you may only need to store the number of the level the player just reached, and their score/health/ammo/inventory. This may be a very small amount of information...a couple of dozen bytes maybe. But if you can save literally anywhere - then the player's position, speed, direction - along with that of all of the enemies - and maybe things like the current mental state of the AI's in the game and the amount of destruction done to the environment - which collectable items are now 'consumed'. So this can wind up being a much more complex problem. It's not at all unusual for programmers to forget to save every last scrap of important information (especially where things are randomly generated) - and it can sometimes be noticeable that when you 'restore' the game, everything isn't precisely as it was when you saved it. But (as StuRat points out) - what's being saved isn't pictures of the action or anything like that.
Actual file formats vary tremendously. While it's easier for the game to save and load a convenient format like XML, there is a problem with players cheating by hand-editing the file to give themselves more lives or a higher score or something...and that's generally considered highly undesirable. So quite often the file format will be obfuscated and quite possibly encrypted in order to make life harder for cheaters.
The amount of saved information is generally very small - hundreds to thousands of bytes in most cases. But there are exceptions. In games where the environment is heavily modified by the player (think of something like SimCity - where the entire city is created by the player as the game progresses), there might be a more significant amount of data to save in order to preserve every detail of the current game state.
Making your own file format is very easy - whatever data you choose to write into the file is your choice - and when you do that, you effectively have "your own file format". It's actually rarer to NOT have your own file format because in order to make something standard that encapsulates some special aspects of your game is harder. But, if you wanted to make it a standard, you might use XML or something similar.
I'm actually a game programmer - and we use XML to save game state while we're working on the game - specifically because it makes it easier for us to cheat(!). If I want to sort out a bug that my play-testers tell me only shows up in level 10, I don't want to have to work through levels 1..9 to get there - and I might want a million health points and an unrealistically large mountain of ammo while I test it. When the game goes live, we switch to an encrypted format to avoid cheating - and the game no longer generates or understands the XML version. Increasingly, we store all of that stuff online in a cloud-server database. That's nice because it makes cheating much harder - and it has the nice side-effect that you can switch from playing on one computer to another and still retain your saved games. We can also use data analytics to find where levels are too easy or too hard - or to see if something is going awry someplace.
SteveBaker (talk) 17:18, 29 January 2016 (UTC)[reply]

Recursively finding duplicates in a sequence that contains an increasing subsequence followed by a decreasing subsequence

[edit]

Hello,

I'm studying for a test in an introductory CS course, and I have encountered the following question: Your'e given an array of length "size" of integers. The array starts with strictly increasing subsequence (every consecutive elemnt is stricly larger than the previous element), and then appears a strictly decreasing subsequence (every consecutive elemnt is stricly smaller than the previous element). Write a function that returns 1 if some element in the array appears twice, 0 otherwise. for example, the function should return 1 for [1,3,4,9,12,10,7,4,2] and 0 for [1,4,5,6,9,2].

The question is not difficult, and the solution is straightforward. However, they require the function to be recursive, and take advantage of the unique structure of the array. In addition, the array should not be sorted. I would appreciate any insight\direction towards a solution to this problem.

Thanks. 19:25, 28 January 2016 (UTC) — Preceding unsigned comment added by 31.154.161.109 (talk)

Here's how to do it using a loop - doing it using recursion is left as an exercise for the reader (bearing in mind that we're not supposed to answer homework questions directly):
   i = 0
   j = size - 1
   do until i == j
      if a[i] == a[j]
         return 1
      else if a[i] < a[j]
         i = i + 1
      else
         j = j - 1
      end if
    loop
    return 0
Tevildo (talk) 19:41, 28 January 2016 (UTC)[reply]
Thanks! after reading your answer I noticed the resemblance to the "merge" part of mergesort. 31.154.161.109 (talk) 20:03, 28 January 2016 (UTC)[reply]