Daily Archives

Articles indexed Friday April 16 2010

Page 16/120 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Why are my flash drives getting formatted?

    - by user13743
    I've had two cheapie flash drive from Microcenter, and they booth out-of-the-blue became unformatted. When you insert then in the USB drive, windows says "The drive is not formatted. Do you want to format it now?" And then it can't actually format it. Nothing happened to them physically. For one, it 'died' during a reset, and the other, it was normal and then it was dead once when I inserted it, IIRC. What's the deal? Are these just cheap, crappy drives, or what?

    Read the article

  • python interval

    - by Apache
    hi expert, i've dev code for wifi scanning in python, now i trying to modify my code so it will scan wifi at specific interval, how this can be done thanks

    Read the article

  • jquery problem, jquery takes over all links on page

    - by vick
    <script type="text/javascript"> $(document).ready(function() { $("a").click(function() { $("#results").load( "jquery-routing.php", { pageNo: $(this).text(), sortBy: $("#sortBy").val()} ); return false; }); }); </script> <div id="results"> </div> <a href="jquery-routing.php?p=1">1</a> <a href="jquery-routing.php?p=2">2</a> that code works fine, only problem that after I run it all my a href links stop to work! The links become jquery ajax calls.. why?

    Read the article

  • Prototype mouseleave for two elements

    - by TenJack
    I have created a small navigation element that is positioned right on top of another element. It is only shown when a user mousenters/mouseovers the main element. I am having some trouble with the prototype. I would like this small nav element to be hidden when a user mouses out of the main box, but I would also like the small nav element to remain visible if a user mouses out of the main box but mouses into the small nav at the same time. This is my attempt so far with some pseudo-code to hopefully explain: $('main_box').observe('mouseenter', function(){ $('small_div').show() }) $('main_box').observe('mouseleave', function(){ if this element is $('small_div') then Event.stop() $('small_div').observe('mouseleave', function(){ if this element is $('main_box') Event.stop observe $('main_box') mouseleave else $('small_div').hide(); }) else $('small_div').hide(); }) The main thing I'm having trouble with is figuring out what element the mouse is over at a given point in time. Is there a way to do something like: on mouseleave do blah unless the mouse is over a specific element then do not do blah?

    Read the article

  • mysql_connect()

    - by Jacksta
    I am trying to connect to mysql and am getting an error. I put my servers ip address in and used port 3306 whihch post should be used? <?php $connection = mysql_connect("serer.ip:port", "user", "pass") or die(mysql_error()); if ($connection) {$msg = "success";} ?> <html> <head> </head> <body> <? echo "$msg"; ?> </body> </html> Here is the error its producing Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'server1.myserver.com' (using password: YES) in /home/admin/domains/mydomain.com.au/public_html/db_connect.php on line 3 Access denied for user 'admin'@'server1.myserver.com' (using password: YES)

    Read the article

  • logic of button to be disabled or not in mvc

    - by rod
    Hi All, Here's an excerpt from a book I'm reading about application design with MVC: Ideally, the view is so simple and logic-free as to need virtually no testing. Users (and developers before users) can reasonably test the view by simply looking at the pixels on the screen. Anything else beyond pure graphical rendering should ideally be taken out of the view and placed in the controller and model. This includes, for example, the logic that determines whether a certain button should be enabled or grayed out at some point. what does the bold statement mean to you? what would this look like? thanks, rod.

    Read the article

  • Can any language potentially be used to create any program?

    - by Matt
    I've heard that given a programmer with enough time and skill in any particular language and enough lines of code, then any program could be created with any given language. I know its certainly not going to be cost-efficient, for instance, to rewrite Adobe Photoshop in BASIC, but could a good enough and patient enough programmer potentially create any program in any language?

    Read the article

  • Haskell Type error

    - by Jon
    I am getting a Couldn't match expected type error on this code and am not sure why. Would appreciate it if someone could point me in the right direction as to fixing it. import qualified Data.ByteString.Lazy as S import Data.Binary.Get import Data.Word getBinary :: Get Word16 getBinary = do a <- getWord16be "Test.class" return (a) main :: IO () main = do contents <- S.getContents print getBinary contents Specifically it cannot match expected type 'S.ByteString - IO ()' to inferred type 'IO ()'

    Read the article

  • Android: how to place a button at an x,y position over top of Canvas

    - by Ben Mc
    Is it possible to place buttons at an X,Y position over the top of a Canvas? For example, on the opening screen of my game, I would like to place buttons for "Play Now", "Instructions", etc, right on top of the canvas. Right now, I'm looking at Touch locations on the Canvas and comparing them to various X,Y bounds. It works, but adding a button with a click listener would probably be much more efficient.

    Read the article

  • QT widget for on WindowsXP

    - by Surjya Narayana Padhi
    Hi Geeks, I need to create a widget which shows battery status(in percentage) inside my qt application. Can anybody suggest me how to get the winXP api to know the battery status. Then as the api will return the percentage I will display on my widget....

    Read the article

  • How can I use a variable as a module name in Perl?

    - by mjn12
    I know it is possible to use a variable as a variable name for package variables in Perl. I would like to use the contents of a variable as a module name. For instance: package Foo; our @names =("blah1", "blah2"); 1; And in another file I want to be able be able to set the contents of a scalar to "foo" and then access the names array in Foo through that scalar. my $packageName = "Foo"; Essentially I want to do something along the lines of: @{$packageName}::names; #This obviously doesn't work. I know I can use my $names = eval '$'. $packageName . "::names" But only if Foo::names is a scalar. Is there another way to do this without the eval statement?

    Read the article

  • SQL Command for the following table.

    - by Sanju
    I have a table named with "Sales" having the following columns: Sales_ID|Product_Code|Zone|District|State|Distributor|Total_Sales Now i want to generate a sales summary to view the total sales by zone and then by district and then by State by which distributor for the last/past month period. How can i write a Sql Statement to do this? Can anyone help me Plz. Thanks in advance. And i have another question that, how can i select the second largest or third largest values from any column of a table.

    Read the article

  • UIImage change raw pixels from white to clear?

    - by christo16
    I've tried some code from each of these questions: How to make one color transparent on a UIImage? How to mask a UIImage so that white becomes transparent on iphone? but have come up unsuccessful, unfortunately working with Core Graphics and images is not my strong suit. How would I go about accessing a UIImage's raw data and changing the white pixels to clear? Thanks!

    Read the article

  • Creating a Custom EventAggregator Class

    - by Phil
    One thing I noticed about Microsoft's Composite Application Guidance is that the EventAggregator class is a little inflexible. I say that because getting a particular event from the EventAggregator involves identifying the event by its type like so: _eventAggregator.GetEvent<MyEventType>(); But what if you want different events of the same type? For example, if a developer wants to add a new event to his application of type CompositePresentationEvent<int>, he would have to create a new class that derives from CompositePresentationEvent<int> in a shared library somewhere just to keep it separate from any other events of the same type. In a large application, that's a lot of little two-line classes like the following: public class StuffHappenedEvent : CompositePresentationEvent<int> {} public class OtherStuffHappenedEvent : CompositePresentationEvent<int> {} I don't really like that approach. It almost feels dirty to me, partially because I don't want a million two-line event classes sitting around in my infrastructure dll. What if I designed my own simple event aggregator that identified events by an event ID rather than the event type? For example, I could have an enum such as the following: public enum EventId { StuffHappened, OtherStuffHappened, YetMoreStuffHappened } And my new event aggregator class could use the EventId enum (or a more general object) as a key to identify events in the following way: _eventAggregator.GetEvent<CompositePresentationEvent<int>>(EventId.StuffHappened); _eventAggregator.GetEvent<CompositePresentationEvent<int>>(EventId.OtherStuffHappened); Is this good design for the long run? One thing I noticed is that this reduces type safety. In a large application, is this really as important of a concern as I think it is? Do you think there could be a better alternative design?

    Read the article

  • How can I check if an object has a specific method?

    - by Ghommey
    I want to use a method of an object. Like $myObject->helloWorld(). However there are a couple of methods so I loop through an array of method names and call the method like this: my $methodName ="helloWorld"; $myObject->$methodNames; This works quite nice but some objects don't have all methods. How can I tell whether $myObject has a method called helloWorld or not?

    Read the article

  • Drawing with element array in OpenGL ES

    - by FatalMojo
    Hello! I am trying to use OpenGLES to draw a x by y matrix of squares about an arbitrary point. I have an array sideVertice[] that holds a series of vertex structs defined as such typedef struct { GLfloat x; GLfloat y; GLfloat z; } Vertex3D; and an element array defined as such GLubyte elementArray[]; my draw loop is as such glLoadIdentity(); glVertexPointer(3, GL_FLOAT, 0, cube.sideVertice); for (int i=0; i<((cube.cubeSize + 1)*(cube.cubeSize + 1)); i++) { for (int j=0; j<=3; j++) { elementArray[j] = j + i*4; glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_BYTE, elementArray); } } for (int i=0; i<=3; i++) elementArray[i] = i; However, the visual output is corrupted and I cannot figure out what the problem is. here is an output of the vertice held in the array: 2010-04-15 23:44:48.816 RubixGL[4203:20b] vertex[0][0] x:-26.000000 y:1.000000 2010-04-15 23:44:48.817 RubixGL[4203:20b] vertex[1][1] x:-26.000000 y:26.000000 2010-04-15 23:44:48.826 RubixGL[4203:20b] vertex[2][2] x:-1.000000 y:1.000000 2010-04-15 23:44:48.829 RubixGL[4203:20b] vertex[3][3] x:-1.000000 y:26.000000 2010-04-15 23:44:48.830 RubixGL[4203:20b] Next Face 2010-04-15 23:44:48.830 RubixGL[4203:20b] vertex[0][4] x:1.000000 y:1.000000 2010-04-15 23:44:48.832 RubixGL[4203:20b] vertex[1][5] x:1.000000 y:26.000000 2010-04-15 23:44:48.837 RubixGL[4203:20b] vertex[2][6] x:26.000000 y:1.000000 2010-04-15 23:44:48.838 RubixGL[4203:20b] vertex[3][7] x:26.000000 y:26.000000 2010-04-15 23:44:48.848 RubixGL[4203:20b] Next Face 2010-04-15 23:44:48.849 RubixGL[4203:20b] vertex[0][8] x:-26.000000 y:-26.000000 2010-04-15 23:44:48.850 RubixGL[4203:20b] vertex[1][9] x:-26.000000 y:-1.000000 2010-04-15 23:44:48.851 RubixGL[4203:20b] vertex[2][10] x:-1.000000 y:-26.000000 2010-04-15 23:44:48.852 RubixGL[4203:20b] vertex[3][11] x:-1.000000 y:-1.000000 2010-04-15 23:44:48.853 RubixGL[4203:20b] Next Face 2010-04-15 23:44:48.853 RubixGL[4203:20b] vertex[0][12] x:1.000000 y:-26.000000 2010-04-15 23:44:48.854 RubixGL[4203:20b] vertex[1][13] x:1.000000 y:-1.000000 2010-04-15 23:44:48.854 RubixGL[4203:20b] vertex[2][14] x:26.000000 y:-26.000000 2010-04-15 23:44:48.855 RubixGL[4203:20b] vertex[3][15] x:26.000000 y:-1.000000 any ideas?

    Read the article

  • How can I use a Perl hash key that has a literal dot?

    - by imerez
    I have a hash in Perl which has been dumped into from some legacy code the name of the key has now changed from simply reqHdrs to reqHdrs.bla $rec->{reqHdrs.bla} My problem is now I cant seem to access this field from the hash any ideas? The following is my error Download Script Output: Bareword "reqHdrs" not allowed while "strict subs" in use

    Read the article

  • regex split problem

    - by sunil-mand99
    I have javascript string variable with var sttr="We prefer questions that can be answered --------------------- not just discussed --------------------- Provide details ---------------------------- Write clearly and simply --------------------------answer all the question" please suggest how to split the string into array of sentences on the basis of dashes(-----) using regex result should be array[0]=We prefer questions that can be answered array[1]=not just discussed array[2]=Provide details array[3]=rite clearly and simply array[4]=answer all the question Note: dash(-----) range after each sentence is between 10 to 50

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >