Jump to content

Wikipedia:Reference desk/Archives/Computing/2012 May 5

From Wikipedia, the free encyclopedia
Computing desk
< May 4 << Apr | May | Jun >> May 6 >
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.


May 5

[edit]

TV Motion Adaptive De-interlacer

[edit]

I suspect that this feature is malfunctioning on my Mom's new TV (JVC JLE47BC3001 47" 120Hz 1080p LED HDTV: [1]). It sounds like it should take an interlaced (60 Hz) image, split it into two, and fill in the missing lines on each to produce 120 Hz video, which it does correctly. However, the problem is that it sometimes plays the frames in the wrong order, resulting in the image appearing to move backwards.

1) Is this a known problem with this model ?

2) Is there a software fix that can be installed ?

3) If not, can this feature be disabled, showing the interlaced frame twice in a row, instead ?

4) With a 1080i broadcast, is the interlacing always done consistently ? That is, are the even lines the first frame and the odd lines the second, or vice versa ? (If they never envisioned the interlaced frames being pulled apart again, they may not have cared.)

StuRat (talk) 00:00, 5 May 2012 (UTC)[reply]

I suggest try badcaps or one like it, they have a "Troubleshooting TVs and Video Sources" sub-forum. Penyulap 10:30, 5 May 2012 (UTC)[reply]
Thanks. StuRat (talk) 04:38, 7 May 2012 (UTC)[reply]
[edit]

Everyone knows that Wikipedia is one of the world's most popular sites on the web. But what about its sister sites? They don't seems to be as popular or get as much media coverage as Wikipedia. In terms of usage, Alexa rank, media coverage etc. which is the most popular Wikipedia sister project? (as in, Wiktionary, Wikisource, Wikibooks etc.) Don't include Wikia, it's not a sister project. Narutolovehinata5 tccsdnew 04:53, 5 May 2012 (UTC)[reply]

I would presume that Wikimedia Commons, as a central repository for content on all projects, would be the most popular after Wikipedia. It is difficult to verify on Alexa because as far as I can tell they only give results for the second level domain (wikimedia.org) which also covers Meta and a few others. However, the rank for wikimedia.org is 167, compared with 705 for Wiktionary, and none of the others come close to that. (Wikibooks:2,727, Wikiquote:2,832, Wikisource:5,079, Wikinews:24,504 and Wikiversity:26,839) AJCham 10:17, 5 May 2012 (UTC)[reply]
Why are the sister projects so low in ranking? --151.75.39.16 (talk) 17:28, 5 May 2012 (UTC)[reply]

the name of the software used to split the wikipedia dump

[edit]

Hello, I use BzReader to read Wikipedia offline, the problem is that the size of the English dumps is very big (7.5 GB) and BzReader don't succeed to create the index. On the site we can download the dumps in parts, but as there are many parts (28) the search became very slow. I search the name of the software they use to split the dump, so I will split it just in two parts. Thank you and sorry for my English. Rabah201130 (talk) 09:42, 5 May 2012 (UTC)[reply]

Wikipedia:Database download might know, sorry I couldn't muster the interest to read it all myself. ¦ Reisio (talk) 16:29, 5 May 2012 (UTC)[reply]

How can there be a Trojan in a Wiki?

[edit]

The following page: encyclopediadramatica.se/IP (possibly unsafe site) - sets off Avast as an actual "malware attack" and is called a Trojan horse by people discussing it there. Is this some kind of virus checker freakout, or is there actually a way to embed something in a Wiki so that just visiting it your computer could be taken over? For that matter, why would NetscapeFirefox 12.0 still be vulnerable to getting taken over by a web page just by looking at it after all these security upgrades? That should never have been possible at all! Can someone shed some light on this issue? Wnt (talk) 15:19, 5 May 2012 (UTC)[reply]

To answer the obvious bits first: Yes, just reading a web site from a specific vulnerable user agent and/or operating system can compromise a system. I don't believe Netscape still maintains a browser, so if the issue has to do with a Netscape browser, it's almost certainly an out-of-date one.
As for the actual detection, Avast! should tell you by what name it is known, and also link you to more information (if not you can search about it by the name given). ¦ Reisio (talk) 16:35, 5 May 2012 (UTC)[reply]
Agree with Reisio: just communicating with a machine can compromise your system, provided that the software involved (the operating system and the browser/whatever) has a vulnerability. --151.75.39.16 (talk) 17:27, 5 May 2012 (UTC)[reply]
Dammit, it doesn't make sense though! You should be able to read a document without installing software from it! Can someone explain what this Trojan is, and what kind of vulnerability it can exploit that hasn't been fixed in all these years? Wnt (talk) 18:16, 5 May 2012 (UTC)[reply]
Don't know if it's related to this trojan, however vulnerabilities are not just a matter of installing software. Communication means that your machine in-puts and out-puts data. It is programmed to manage most of the input correctly, however it might not be prepared to manage malformed or other "pathological" input, in which case you have so-called "vulnerability". and this might happen at any OSI layer (think about a TCP/IP implementation bug in the OS) not only in the application layer (which does not even have to be HTTP + HTML, think about a bug in FTP implementation). --151.75.39.16 (talk) 18:59, 5 May 2012 (UTC)[reply]
Well, you are able to read a document safely as long as your system (OS, browser, plugins...) doesn't have the specific vulnerabilities that a site exploits. The problem is that modern sytems are complex enough that it is essentially impossible to avoid all vulnerabilities. Btw. even if your specific configuration isn't affected by this specific attack it is still good to know because the site is either malicious or - more likely - a too easy target for the actual bad guys. Either way you should expect more nasty surprises. KarlLohmann (talk) 22:18, 5 May 2012 (UTC)[reply]
To put it another way, is there any way that I can read what that page says, short of digging out an authentic Apple ][ and modem, FTPing the file, and viewing it in a text browser that actually goes by the principle that it displays a character for each byte rather than trying to execute it? Wnt (talk) 18:19, 5 May 2012 (UTC)[reply]
Modern webpages aren't just plain HTML. They contain elements such as ActiveX and Javascript and Adobe Flash and many others that web browsers execute automatically, because most of the time that is what you want. If you want to look at the page without any of that stuff, then look at the preferences in your browser to turn them off or use a tool such as NoScript to not run them. If you just want to look at the source of the page, you can use something like wget to download it and then look at it offline. RudolfRed (talk) 18:38, 5 May 2012 (UTC)[reply]
I viewed the page on a Mac and it seemed pretty kosher to me. I wonder what is setting Avast off. I don't see any indications of viruses. While it is possible for various plugins to do bad things to unsecured browsers, I'm not sure that's actually going to happen with this particular page. --Mr.98 (talk) 20:05, 5 May 2012 (UTC)[reply]
One possibility is that Avast is detecting the security alert image images.encyclopediadramatica .se/6/6b/Ipaddress.png as a possible hijack attempt since malware sites like to use fake error or warning boxes to spread. AFAIK, often these are mostly stimulated rather then pure images, but perhaps some of them are pure images so Avast is designed to detect that sort of thing. Another common problem when a normally okay but not highly reputable site (particularly one with ads for questionable services) like ED starts having malware warnings is someone managed to sneak in an ad designed to take advantage of security flaws. Nil Einne (talk) 14:05, 6 May 2012 (UTC)[reply]

Trying to make a window with a text entry area and a button that opens a dialog with what the text entry had using GTK

[edit]

But I only get a window with a button that does nothing. In main.c:

    #include <gtk/gtk.h>
    /* This is a callback function. The data arguments are ignored  
     * in this example. More on callbacks below. */
    static void on_BT_PRESS_CLICK( GtkWidget *widget,
                   gpointer data )
    {
    GtkEntry *entry = GTK_ENTRY((GtkWidget*)data);
    	gchar *text1 = "Entry says: ";
    	gchar *text2 = g_strconcat( text1, gtk_entry_get_text(entry), NULL );
    	gtk_message_dialog_new( (GtkWindow *)widget, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO,
    							GTK_BUTTONS_OK, text2 );
    }
    static gboolean delete_event( GtkWidget *widget,
                              GdkEvent  *event,
                              gpointer   data )
    {
    /* If you return FALSE in the "delete-event" signal handler,
     * GTK will emit the "destroy" signal. Returning TRUE means
     * you don't want the window to be destroyed.
     * This is useful for popping up 'are you sure you want to quit?'
     * type dialogs. */
    g_print ("delete event occurred\n");
    /* Change TRUE to FALSE and the main window will be destroyed with
     * a "delete-event". */
    return FALSE;
    }
    /* Another callback */
    static void destroy( GtkWidget *widget,
                     gpointer   data )
    {
    gtk_main_quit ();
    }
    int main( int   argc,
          char *argv[] )
    {
    /* GtkWidget is the storage type for widgets */
    GtkWidget *window;
    GtkWidget *button;
    GtkWidget *entry;
    GtkWidget *hbox; 
    /* This is called in all GTK applications. Arguments are parsed
     * from the command line and are returned to the application. */
    gtk_init (&argc, &argv);
    /* create a new window */
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
    hbox = gtk_hbox_new(TRUE, 0);
    /* When the window is given the "delete-event" signal (this is given
     * by the window manager, usually by the "close" option, or on the
     * titlebar), we ask it to call the delete_event () function
     * as defined above. The data passed to the callback
     * function is NULL and is ignored in the callback function. */
    g_signal_connect (window, "delete-event",
    G_CALLBACK (delete_event), NULL);
    /* Here we connect the "destroy" event to a signal handler.  
     * This event occurs when we call gtk_widget_destroy() on the window,
     * or if we return FALSE in the "delete-event" callback. */
    g_signal_connect (window, "destroy",
                       G_CALLBACK (destroy), NULL);
    /* Sets the border width of the window. */
    gtk_container_set_border_width (GTK_CONTAINER (window), 10);
    /* Creates a text entry box */
        entry = gtk_entry_new();
        gtk_entry_set_visibility( (GtkEntry *)entry, TRUE );
        /* pack in hbox */
        gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, FALSE, 0);
        gtk_widget_show(entry);
    /* Creates a new button with the label "Hello World". */
    button = gtk_button_new_with_label ("Press");
    /* When the button receives the "clicked" signal, it will call the
     * function hello() passing it entry as its argument.  The
     * function is defined above. */
    g_signal_connect (button, "clicked",
                       G_CALLBACK (on_BT_PRESS_CLICK), entry);
    /* This packs the button into the window (a gtk container). */
    gtk_container_add (GTK_CONTAINER (window), button);	
        /* This packs the entry into the window */
        gtk_container_add (GTK_CONTAINER (window), hbox);
        gtk_widget_show(button);
        gtk_widget_show(hbox);
    /* and the window */
    gtk_widget_show(window);   
    /* All GTK applications must have a gtk_main(). Control ends here
     * and waits for an event to occur (like a key press or
     * mouse event). */
    gtk_main ();    
    return 0;
    }

What I get is just a small window that has my button (no text entry), that does not bring up any dialog box when I press it. So I have no GtkEntry window in which to type anything. What am I doing wrong? Thanks. 69.243.220.115 (talk) 21:11, 5 May 2012 (UTC)[reply]

OK, I figured out what was wrong as to why the entry wasn't showing. I noticed that I added the hbox (which has the entry) and the button to the window, when I should have added the entry and the button to the hbox, and then add just the hbox to the window. I made that change and now both show up. But still nothing happens when I hit the button with or without text in the entry. If anyone sees anything wrong in the callback function, I'd appreciate knowing what's wrong. Thanks. 69.243.220.115 (talk) 12:49, 6 May 2012 (UTC)[reply]
There's two problems with the code to show the dialog:
  1. gtk_message_dialog_new() needs a toplevel window (not just any widget) as its first argument. So you need to call get_widget_get_toplevel() to walk up the widget hierarchy to find the enclosing toplevel window.
  2. gtk_message_dialog_new() generates a dialog box, but doesn't run it. The easiest way to do that, for a modal dialog, is gtk_dialog_run()
So that would make your callback read something like:
static void on_BT_PRESS_CLICK( GtkWidget *widget,
			       gpointer data )
{
  GtkEntry *entry = GTK_ENTRY((GtkWidget*)data);
  gchar *text1 = "Entry says: ";
  gchar *text2 = g_strconcat( text1, gtk_entry_get_text(entry), NULL );

  GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
  if (gtk_widget_is_toplevel (toplevel)) {
    GtkWidget * dialog = gtk_message_dialog_new((GtkWindow*)toplevel,
						GTK_DIALOG_MODAL, 
						GTK_MESSAGE_INFO,
						GTK_BUTTONS_OK, 
						text2);
    gtk_dialog_run(dialog);
    gtk_widget_destroy(dialog);
  }
}
Which shows the dialog. -- Finlay McWalterTalk 13:49, 6 May 2012 (UTC)[reply]
Thanks! I only had to change one small part of your code, which was to put:
gtk_dialog_run(GTK_DIALOG(dialog));

instead of

gtk_dialog_run(dialog);

Maybe I just have a picky compiler. 69.243.220.115 (talk) 14:30, 6 May 2012 (UTC)[reply]

Indeed - it should have generated a warning, but not an error (unless you were compiling with -Werror). But your code still has a bug - the last arg of gtk_message_dialog_new is a printf-style format string. Try the code above and enter hello %d into the entry - you'll see hello 42332432 (or some other integer). You'd avoid that by passing "%s" as one arg, followed by text2. But you can simplify to get:
static void on_BT_PRESS_CLICK (GtkWidget *widget,
			       gpointer  data){
  GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
  if (gtk_widget_is_toplevel (toplevel)) {
    GtkWidget *dialog = gtk_message_dialog_new((GtkWindow*)toplevel,
					       GTK_DIALOG_MODAL, 
					       GTK_MESSAGE_INFO,
					       GTK_BUTTONS_OK, 
					       "Entry says \"%s\"",
					       gtk_entry_get_text((GtkEntry*)data));
    gtk_dialog_run(GTK_DIALOG(dialog));
    gtk_widget_destroy(dialog);
  }
}
-- Finlay McWalterTalk 14:44, 6 May 2012 (UTC)[reply]
Thanks again. My eyes kind of glossed over the documentation detail that that parameter is a formatted string, as it wasn't giving me any errors as I was on a quest to just get it to work :) 69.243.220.115 (talk) 16:09, 6 May 2012 (UTC)[reply]

Which E-UTRA user equipment categories are in devices right now?

[edit]

And when will the other ones be introduced? Sagittarian Milky Way (talk) 21:22, 5 May 2012 (UTC)[reply]

E-UTRA, to help explain what this is. OP probably knows, but maybe not everyone else. RudolfRed (talk) 22:58, 5 May 2012 (UTC)[reply]

Limitations on viewing large animated GIFs here ?

[edit]

I uploaded this animated GIF:

It has 256 frames and should give the illusion of moving down the hallway. The uploaded file appears to be of the proper size (a bit over 60MB, which is less than the stated limit of 100MB for uploads). However, when I view it at full resolution I only see the first few frames, then a portion of a frame, then it repeats. How many frames it shows seems to vary a bit each time I reload it. So:

1) Does everyone else see this truncated version ?

2) What causes this ?

3) How do I fix it (obviously I could use much smaller animated GIFs).

StuRat (talk) 22:11, 5 May 2012 (UTC)[reply]

The file looks correct to me at full resolution. Perhaps your connection got interrupted or stalled in the middle of that 60 MB download? That said, I think the 1024x1024 resolution is really too big for an image like this (e.g. wider/taller than many browser frames without really adding anything to justify that size), and the use of a GIF tends to make the compression much poorer than you would get on an actual video format for something this simple. I also think the effect would be more compelling if it were faster. Dragons flight (talk) 22:36, 5 May 2012 (UTC)[reply]
Yes, this was meant as a test on the limitations of animated GIFs. I didn't restrict the speed, so it must be limited by the viewing browser/computer. Thus, it looks like I'd need to lower resolution to speed it up (or reduce the number of frames to appear to speed to up). How could I convert it into a better video format ? StuRat (talk) 22:44, 5 May 2012 (UTC)[reply]
Commons:Video ¦ Reisio (talk) 23:04, 5 May 2012 (UTC)[reply]
This is the exact same problem as I asked in #Who's censoring this stuff? above. (The slow display is normal while the image is being downloaded) I got 6 MB out of 60MB. I assume the download manager that fixed my problem will fix yours. There is something wrong with the Commons servers! Wnt (talk) 15:32, 6 May 2012 (UTC)[reply]
Actually, I uploaded this to Wikipedia, not Wikicommons. So the problem apparently is spread across both. But me getting a new download manager isn't going to help others to view my work, unfortunately. StuRat (talk) 04:37, 7 May 2012 (UTC)[reply]
I raised this at Commons:Village_pump#What's_the_matter_with_video_downloads? and was pointed to [2] - something about a recent switch from Squid to Varnish. Though the description of the bug there doesn't quite match what we experience - it's not so much that the download is slow as that the connection is simply broken. Wnt (talk) 16:56, 7 May 2012 (UTC)[reply]
They seem to have resolved the issue, at least temporarily, although it appears to play about 1/10th as fast as if I run it directly on my PC. StuRat (talk) 22:14, 8 May 2012 (UTC)[reply]

Seagate GoFlex USB to SATA adapter

[edit]

Dear Wikipedians:

I have a Seagate GoFlex USB to SATA adapter that I've recycled from a GoFlex drive that I disassembled. When I hook up the adapter to a desktop form factor (3.5 inch) SATA hard drive, nothing happens, my computer did not pick up the hard drive. When I hook up the adapter to a notebook form factor (2.5 inch) SATA hard drive, my computer picks up all the partitions on that hard drive. I am just wondering what is going on here.

Thanks,

70.31.158.164 (talk) 23:18, 5 May 2012 (UTC)[reply]

Is there a seperate power adaptor, or is the power coming from USB? If the power is from USB, the larger drive may need more power than the computer can give it. RudolfRed (talk) 23:44, 5 May 2012 (UTC)[reply]
The power is coming from the USB too. The Seagate GoFlex adaptor that I am reusing right now has USB plug at one end and a combo SATA data/power connector (that looks like this: ─────┐┌──, the longer one for power, the shorter one for data) at the other. Furthermore, the USB cable is itself detachable from the adaptor, giving me a regular class C (?) USB cable. Thanks, 70.31.158.164 (talk) 02:20, 6 May 2012 (UTC)[reply]
RudolfRed is correct. Our Serial ATA article indicates that 2.5" drives run on 5 volts, equal to that output by USB, but 3.5" drives usually require 12 V. AJCham 06:44, 6 May 2012 (UTC)[reply]
If it has both power and data but won't run the 3.5 drive then it is either not providing the 12v, or it cannot provide sufficient current to run the drive. Usually a physically larger drive will draw more power, you can try using a USB2.0 or 3.0 port on a computer to make sure that there is enough power being supplied form the computer, the lower the version of the USB, the less power it can transfer. Power and data don't have to come from the same place, if you can connect, mix and match cables you can have sata data supplied from one card or adaptor and power from another.
Hold onto the whole thing either way, network and let friends know you recycle computers and you'll get swamped in no time. The item will be a useful match for hardware you do not yet have. Penyulap 12:14, 6 May 2012 (UTC)[reply]

I understand now. Thank you for your contributions. BTW, now I am putting in a new 2.5 inch SSD into my desktop computer. I am worried: could the 12 volt power connection that desktop uses damage ("zap") my 2.5 inch SSD in anyway? Thanks. 70.31.158.164 (talk) 15:20, 6 May 2012 (UTC)[reply]

where the connectors are made to physically fit together there is almost no chance of problems, a big fat old power supply connecting to a sexy little SSD is all good. Penyulap 06:14, 7 May 2012 (UTC)[reply]
Great! Thanks for all your help Penyulap! 70.31.158.164 (talk) 19:56, 8 May 2012 (UTC)[reply]
Resolved