Daily Archives

Articles indexed Tuesday April 6 2010

Page 4/122 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Patching Synaptics Driver In Ubuntu

    - by danben
    I've got an HP Envy with the new Synaptics Clickpad - the device is not supported out of the box by Ubuntu, so I downloaded this patch (https://patchwork.kernel.org/patch/67335/), applied it to synaptics.c in the linux kernel source, rebuilt the kernel and booted from it. Nothing changed. I'm new to Linux and don't know much about driver configuration; how can I check that the newly-produced synaptics.o file is actually being used somewhere? Or if it is obvious, what step did I leave out? Separately, I tried following the instructions in this thread: http://georgia.ubuntuforums.org/showpost.php?p=8989185&postcount=11 There, someone posted the patch along with a Makefile and instructions for installation. When I followed those, my mouse stopped working altogether. Not desirable, but at least I know it had some effect. The Makefile is posted below; I get the gist of what it's doing, but don't have enough knowledge to figure out why it would cause the device to stop responding entirely. obj-m := psmouse.o psmouse-objs := psmouse-base.o synaptics.o psmouse-$(CONFIG_MOUSE_PS2_ALPS) += alps.o psmouse-$(CONFIG_MOUSE_PS2_ELANTECH) += elantech.o psmouse-$(CONFIG_MOUSE_PS2_OLPC) += hgpk.o psmouse-$(CONFIG_MOUSE_PS2_LOGIPS2PP) += logips2pp.o psmouse-$(CONFIG_MOUSE_PS2_LIFEBOOK) += lifebook.o psmouse-$(CONFIG_MOUSE_PS2_TRACKPOINT) += trackpoint.o psmouse-$(CONFIG_MOUSE_PS2_TOUCHKIT) += touchkit_ps2.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules install: @cp psmouse.ko /lib/modules/$(shell uname -r)/kernel/drivers/input/mouse/

    Read the article

  • C# event handlers not thread safe?

    - by Daniel
    So i've read around that instead of calling a event directly with if (SomeEvent != null) SomeEvent(this, null); i should be doing SomeEventHandler temp = SomeEvent; if (temp != null) temp(this, null); Why is this so? How does the second version become thread safe? What is the best practice?

    Read the article

  • Please tell me what is error in my date comparison sql query

    - by Rajesh Rolen- DotNet Developer
    Please help me to find out error in my SQL query. I have created this query to compare dates select * from Joinplans jp where cast(convert(varchar,GETDATE(),103) AS datetime) BETWEEN CASE(convert(varchar,jp.planstartDate,103) AS datetime) AND CASE(convert(varchar,DATEADD(DAY,jp.planDays,jp.planstartDate),103) AS DATETIME) It's giving me the error: incorrect near 'AS' I am using SQL Server 2005.

    Read the article

  • JQGrid with Column Reordering

    - by bruno
    Hey guys, I have a jqgrid and I can reorder my columns with this option in my JQGrid jQuery("#list").jqGrid({ sortable: true, ... }); This functionality let me reorder ALL my columns. But I want that some columns must be on fixed places. Is there a way to solve this..? Thanks in advance! Bruno

    Read the article

  • Find max integer size that a floating point type can handle without loss of precision

    - by Checkers
    Double has range more than a 64-bit integer, but its precision is less dues to its representation (since double is 64-bit as well, it can't fit more actual values). So, when representing larger integers, you start to lose precision in the integer part. #include <boost/cstdint.hpp> #include <limits> template<typename T, typename TFloat> void maxint_to_double() { T i = std::numeric_limits<T>::max(); TFloat d = i; std::cout << std::fixed << i << std::endl << d << std::endl; } int main() { maxint_to_double<int, double>(); maxint_to_double<boost::intmax_t, double>(); maxint_to_double<int, float>(); return 0; } This prints: 2147483647 2147483647.000000 9223372036854775807 9223372036854775800.000000 2147483647 2147483648.000000 Note how max int can fit into a double without loss of precision and boost::intmax_t (64-bit in this case) cannot. float can't even hold an int. Now, the question: is there a way in C++ to check if the entire range of a given integer type can fit into a loating point type without loss of precision? Preferably, it would be a compile-time check that can be used in a static assertion, and would not involve enumerating the constants the compiler should know or can compute.

    Read the article

  • I'm starting a new project in Perl, how should I begin?

    - by Brad Gilbert
    The question is about how to start a new Perl project. How should I create the skeleton of the Project? What should the directory layout look like? How do I start testing? What build system should I use? Should I even use a build system? I have been writing Perl programs for a while now. I only started to run tests on my recent programs. I know Perl the language fairly well, now it is time to learn the way to build full blown Perl projects. I already add these to the beginning of every Perl file: use strict; use warnings; # and occasionally use autodie; I have also used Moose.

    Read the article

  • Disable colour change when source list loses focus

    - by ICR
    When an item is selected in the source list it is highlighted in blue. When another element on the window is selected, however, the highlight becomes a lighter blue as the source list is no longer focused. I would like to change the behaviour so the item is always the darker blue, the same behaviour as seen in Finder.

    Read the article

  • What's the benefit of calling new on an object instance?

    - by Geo
    I'm reading [Programming Perl][1], and I found this code snippet: sub new { my $invocant = shift; my $class = ref($invocant) || $invocant; my $self = { color => "bay", legs => 4, owner => undef, @_, # Override previous attributes }; return bless $self, $class; } With constructors like this one, what's the benefit of calling new on an object instance? I assume that it's what it's for, right? My guess is that if anyone would want to write such a constructor, he would have to add some more code that copies the attributes of the first object to the one about to be created.

    Read the article

  • How should I build a privacy drop-down (select) menu?

    - by animuson
    I'm trying to build something similar to Facebook's privacy selection menu, except without the 'custom' option. It will only list a few options such as 'show to all', 'show to friends only', or 'completely hidden'. Right now I'm thinking of using simple JavaScript to change a hidden input field to the new value they click on, so if they clicked on the division for 'show to friends only' it would change the corresponding field, say 'email_privacy', to 1. Is there a better way to do this or am I pretty much on track? P.S. I am not planning on using a select element, I was planning on building a custom drop-down menu using CSS since select elements are so highly non-customizable. I'm doing it this way to save space, rather than having this massive selection menu at the right which takes up a bunch of space. Note: I'm not really interested in using jQuery, that's just extra libraries and crap that I don't want to load. I can do it in JavaScript just as easily so I might as well use that.

    Read the article

  • What's wrong in this iban validation code?

    - by Jackoder
    Hello coders, I'm working on a php iban validator but i have a problem I wrote like this: function IbanValidator($value) { $iban = false; $value= strtoupper(trim($value)); # Change US text into your country code if(preg_match('/^US\d{7}0[A-Z0-9]{16}$/', $value)) { $number= substr($value,4,22).'2927'.substr($value,2,2); $number= str_replace( array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'), array(10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35), $number ); $iban = (1 == bcmod($number,97)) ? true; } return $iban; } Thanks.

    Read the article

  • Retrieve Button value with jQuery

    - by Simon Hutton
    A simple one, I'm trying to retrieve the value attribute of a button when its been pressed using jQuery, here's what I have: <script type="text/javascript"> $(document).ready(function() { $('.my_button').click(function() { alert($(this).val()); }); }); </script> <button class="my_button" name="buttonName" value="buttonValue"> Button Label</button> In Firefox my alert displays 'buttonValue' which is great but in IE7 it displays 'Button Label'. What jQuery should I use to always get the button's value? Or should I be using a different approach? Many thanks. ANSWER: I'm now using <input class="my_button" type="image" src="whatever.png" value="buttonValue" />

    Read the article

  • R2 live migration between Opteron 8354 and 2435

    - by Safin09
    As per title, will the processor compatibility option allow a live migrate between an AMD Opeteron 2435 (dual proc, hex core) and an AMD Opteron 8354 (quad proc, quad core)? We are out of capacity and wish to use a newer dual socket server rather than an older (yet much more expensive) quad socket server in our cluster.

    Read the article

  • mysql configuration problem Error ERROR 2002 (HY000): Can't connect to local MySQL server through so

    - by manugupt1
    I recently installed OpenSuse11.1 and tried configuring mysql with it however after installation I was not even able to start it off I got the following error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) As suggested in one of the forums I enabled the skip-networking option in /etc/my.cnf which did not help I also tried binding it to the address using bind-address = 127.0.0.1 in the same /etc/my.cnf Please help me what to do......

    Read the article

  • Website Use Monitoring for 3 People

    - by linkedlinked
    I work in an IT startup with 2 partners, and I'm the programmer/IT guy -- in other words, the work horse. To make a long story short, I'm doing most of the work right now, while they spend all day on Facebook. That's OK, because they're paying my salary, but if the project fails, I'm sure they'll blame me for it (I'm doing my best to make sure that doesn't happen!), and I want some sort of recourse. I already have an app that blocks time-wasters on my local PC, and keeps logs of when the app is enabled (so I can say "I had Facebook blocked from 9am-5pm today.") Is there any way I can get a brief summary of the most heavily visited sites, split up by client PC? At the end of the month, I want to be able to say "You both load Facebook, on average, every 10 minutes. You spend hours a day on Youtube, and haven't opened up our bugtracker in weeks" and maybe have a nifty chart or graph to match it. We have a crappy D-Link router, and no IT budget. They are both on Windows Vista, I run Ubuntu Linux. I don't want to install any monitoring software on their PC, but I'm totally fine with, say, routing all the network traffic through my machine. I guess I can think of lots of ways to accomplish this (telnet into JSSH and list open tabs? log all the DNS requests, per-domain? even thinking of setting up a webcam on my desk and just keeping 5-minute snapshots...), I just don't really know where to start. Any advice is appreciated, thanks!

    Read the article

  • web page does not display properly

    - by Akil
    Hi, I have problem with one my conputer, it does not display any website properly. The background clouds on some websites do not show up, the layout of some websites are not properly displayed. And it only happen to only one computer. OS: Windows XP IE: 7 (not working on either IE7 or IE 8) I have tried to add my website as trusted site still that site is not working properly. I also tried Internet Options Advanced ... Check Show images, smart image dithering, enable visual styles in button and controls on webwage. Is there anything else I could do to fix the problem? Any help is appreciated

    Read the article

  • How to correct this glitch

    - by Rebol Tutorial
    I removed background: url(none); in my stylesheet because of load performance http://stackoverflow.com/questions/2577422/why-firebug-pretends-that-my-stylesheet-is-calling-my-xmlrpc The problem is that it now causes some glitch on css list. Any idea how to fix this ? Thanks. Update: picture below Tried to put background: none as suggested but didn't solve the problem/ ul.sidebar_list li ul li ul { margin: 0px; padding: 0px!important; float: left; width: 100%; list-style-type: none; background: none; }

    Read the article

  • Setting Curl's Timeout in PHP

    - by Moki
    I'm running a curl request on an eXist database through php. The dataset is very large, and as a result, the database consistently takes a long amount of time to return an XML response. To fix that, we set up a curl request, with what is supposed to be a long timeout. $ch = curl_init(); $headers["Content-Length"] = strlen($postString); $headers["User-Agent"] = "Curl/1.0"; curl_setopt($ch, CURLOPT_URL, $requestUrl); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, 'admin:'); curl_setopt($ch,CURLOPT_TIMEOUT,1000); $response = curl_exec($ch); curl_close($ch); However, the curl request consistently ends before the request is completed (<1000 when requested via a browser). Does anyone know if this is the proper way to set timeouts in curl?

    Read the article

  • Ruby: How can I have a Hash take multiple keys?

    - by zxcvbnm
    I'm taking 5 strings (protocol, source IP and port, destination IP and port) and using them to store some values in a hash. The problem is that if the IPs or ports are switched between source and destination, the key is supposed to be the same. If I was doing this in C#/Java/whatever I'd have to create a new class and overwrite the hashcode()/equals() methods, but that seems error prone from the little I've read about it and I was wondering if there would be a better alternative here.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >