Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 131/191 | < Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >

  • Changing style sheets depending on useragent

    - by John Vasiliou
    <script language="Javascript"> var deviceIphone = "iPhone"; var deviceIpod = "iPod"; //Initialize our user agent string to lower case. var uagent = navigator.userAgent.toLowerCase(); //************************** // Detects if the current device is an iPhone. function DetectiPhone() { if (uagent.search(deviceIphone) > -1) {document.write('<link rel="stylesheet" type="text/css" href="ui/mobile/css/site.css">'); } etc... Above is the start of my code. I am trying to change the CSS file depending on what platform the user is using. I currently use media="screen ... " but it doesn't work with the amount of platforms I'm trying to use. I need something a lot more detailed/complex that is why I'm turning to useragents. Any ideas why the css file doesn't change on my iPhone using the above code? Better yet, any ideas on another way to change style sheets depending on the users platform/screen resolution?

    Read the article

  • How can I make a new CTP (CakePHP) file in NetBeans?

    - by John Isaacks
    I have found a lot of info about adding CTP file support for NetBeans, but this is usually talking about code highlighting and treating a ctp file like a php file. This can be done at: Tools - Options - Miscellaneous - Files I have done this. However, when I try to create a NEW ctp file. I do not have the option. I tried going to Tools -> Templates to add a ctp template. There is no "new" button just an "add" button that looks for a file. I created a file on my desktop called cake_template.ctp on my desktop. I added it to the PHP templates in the template manager. I called the template "PHP Cake Template". Still when I go to create a new file, the option is not there. I restarted NetBeans, still the same. I just want to create a new .ctp file, it shouldn't be this difficult. Does anyone know how? I am using version 6.9.1

    Read the article

  • Is is possible to stringstream this way? to convert from string to int?

    - by John
    Is it possible to stringstream like this? I am trying to read with ifstream and convert it. string things = "10 11 12 -10"; int i1; int i2; int i3; int i4; stringstream into; into << things; into >> i1; into >> i2; into >> i3; into >> i4; I expect it to be : i1 = 10 i2 = 11 i3 = 12 i4 = -10 is that correct? Can the same stringstream variable be used multiple times? When I tried, the first time was ok but everything else later on is just 0.

    Read the article

  • Easy way to determine what content is not delivered using a secure HTTPS connection?

    - by John
    I have some pages that are sent via HTTPS. Internet Explorer sometimes complains about "This webpage contains content that will not be delivered using a secure HTTPS". I looked in the html source to confirm all content calls (href, src, etc...) are sent via https. My CSS files use relative paths. But I'm still getting these warnings. Is there an easy way to track down which items are not sent via HTTPS?

    Read the article

  • MySQL - Counting rows in preparation for greatest-n-per-group not working?

    - by John M
    Referring to SO and other sites have given me examples of how to use MySQL to create a 'greatest-n-per-group' query. My variant on this would be to have a query that returns the first 3 rows of each category. As the basis for this I need to sort my data into a usable sequence and that is where my problems start. Running just the sequence query with row numbering shows that changes in category are mostly ignored. I should have 35 categories returning rows but only 5 do so. My query: set @c:=0; set @a:=0; SELECT IF(@c = tdg, @a:=@a+1, @a:=1) AS rownum, (@c:=tdg) , julian_day, sequence, complete, year, tdg FROM tsd WHERE complete = 0 order by tdg, year, julian_day, sequence Do I have a syntax mistake with this query?

    Read the article

  • jquery loop hover button

    - by john morris
    ok i have 6 buttons, im trying to have a jquery listener for when you hover over one of the 6 buttons, it changes class. im using a for loop to do this, heres my code: $(document).ready(function() { for($i=1;$i<7;$i++) { $('#button'+i).hover(function() { $(this).addClass('hovering'); }, function() { $(this).removeClass('normal'); }); } }); each button has an id of "buttonx" ( the x being a number ) help?

    Read the article

  • What's a very easy C++ profiler (VC++)?

    - by John
    I've used a few profilers in the past and never found them particularly easy. Maybe I picked bad ones, maybe I didn't really know what I was expecting! But I'd like to know if there are any 'standard' profilers which simply drop in and work? I don't believe I need massively fine-detailed reports, just to pick up major black-spots. Ease of use is more important to me at this point. It's VC++ 2008 we're using (I run standard edition personally). I don't suppose there are any tools in the IDE for this, I can't see any from looking at the main menus?

    Read the article

  • Optimal way to initialize varying objects

    - by John Smith
    I have to initialize a lot of different types of objects based on an integer parameter. They all have the same overall initialization methods. At the moment I have the following code #def APPLE 1 #def PEAR 2 switch (t) { case APPLE: newobj = [[FApple alloc] init]; break; case PEAR: newobj = [[FPear] alloc] init]; break; default: retobj = nil; } I believe there must be a better way to do this. When I add FOrange I have to go and add another line here. What would be a better way?

    Read the article

  • SVN: change a past revision and have the change in current

    - by John Isaacks
    ok say I am on revision 4. I check it out, make some change and commit it. I am not on revision 5. I check it out again, am making some changes, but I am informed that there was a typo from revision 5 that needs to be changed right away. I don't want to fix it in my current working copy because I am in the middle of something and it wont be ready to commit yet. But I don't want to revert back to revision 5 and loose all my work. what I want to do is go back to revision 5, make the small change, commit it. And ALSO have that change made to my current working copy as well. I hope that makes sense. Is there a way to do that?

    Read the article

  • call_user_function_array() and __construct

    - by John
    I'm working on a simple framework, and I'm having a slight problem. I'd like to use call_user_function_array() to pass parameters to a function. That's fine, except the function I want to pass it to is __construct. I can't create an instance of an object with cufa(), and by instantiating an object, and then using cufa to call that instance's __construct(), I run into problems with a broken class because I'm calling the constructor twice (and one time it's called wrong.)

    Read the article

  • Beginner question about getting reference to cin

    - by John C
    I'm having problems wrapping my head around this. I have a function void foo(istream& input) { input = cin; } This fails (I'm assuming because cin isn't supposed to be "copyable". however, this works void foo(istream& input) { istream& baz = cin; } Is there a reason that I can get a reference to cin in baz but I cannot assign it to input? Thanks

    Read the article

  • Language restrictions on iPhone partially lifted?

    - by John Smith
    Apparently Apple has changed some term in the agreement again. From http://www.appleoutsider.com/2010/06/10/hello-lua/ section 3.3.2 is now Unless otherwise approved by Apple in writing, no interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s). Notwithstanding the foregoing, with Apple’s prior written consent, an Application may use embedded interpreted code in a limited way if such use is solely for providing minor features or functionality that are consistent with the intended and advertised purpose of the Application. instead of the original No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s). I am more interested in embedding Lua, but other people have other embeddings they want to make. I am wondering how you ask for permission, and what they mean by the terms "minor features" and "consistent" and how will Apple interpret this section? It seems to have enough loopholes to drive a real firetruck through. (BTW this is a terribly important question for me an my product.)

    Read the article

  • how to use oracle package to get rid of Global Temp table

    - by john
    I have a sample query like below: INSERT INTO my_gtt_1 (fname, lname) (select fname, lname from users) In my effort to getting rid of temporary tables I created a package: create or replace package fname_lname AS Type fname_lname_rec_type is record ( fname varchar(10), lname varchar(10) ); fname_lname_rec fname_lname_rec_type Type fname_lname_tbl_type is table of fname_lname_rec_type; function fname_lname_func ( v_fnam in varchar2, v_lname in varchar2 )return fname_lname_tbl_type pipelined; being new to oracle...creating this package took a long time. but now I can not figure out how to get rid of the my_gtt_1 how can i say... INSERT INTO <newly created package> (select fnma, name from users)

    Read the article

  • How to update MySQL table with a cumulative count of events with the same date

    - by John
    I have a table which I pull data from. This data has a date and a stock symbol. There can be multiple rows of data with the same date and different stock symbols. I need to update the table so that there is a running total for all rows with the same date. When a new date occurs the cumulative count re-sets to 1 and then resumes. A typical query: mysql> SELECT Sym 'sym' , fdate as 'FilledDate', TsTradeNum 'numT' -> FROM trades_entered_b2 -> WHERE fDate >= '2009-08-03' AND fDate <= '2009-08-07' -> LIMIT 10; +------+------------+------+ | sym | FilledDate | numT | +------+------------+------+ | WAT | 2009-08-03 | 0 | | ALGN | 2009-08-04 | 0 | | POT | 2009-08-05 | 0 | | PTR | 2009-08-06 | 0 | | SCHW | 2009-08-06 | 0 | | FDO | 2009-08-07 | 0 | | NBL | 2009-08-07 | 0 | | RRC | 2009-08-07 | 0 | | WAT | 2009-08-08 | 0 | | COCO | 2009-08-08 | 0 | +------+------------+------+ What I want: +------+------------+------+ | sym | FilledDate | numT | +------+------------+------+ | WAT | 2009-08-03 | 1 | | ALGN | 2009-08-04 | 1 | | POT | 2009-08-05 | 1 | | PTR | 2009-08-06 | 1 | | SCHW | 2009-08-06 | 2 | | FDO | 2009-08-07 | 3 | | NBL | 2009-08-07 | 4 | | RRC | 2009-08-07 | 5 | | WAT | 2009-08-08 | 1 | | COCO | 2009-08-08 | 2 | +------+------------+------+ What I need to do is update the TsTradeNum column with the correct values. I have tried to create a function and various queries all failed. Any ideas? Thanks in advance

    Read the article

  • Is it possible to take a half done web application that has been started using VB.NET and continue u

    - by John ClearZ
    A guy came to me there recently with a half done web app that has been created using VB.NET, nothing major, just a normal site. His original programmer couldn't continue so he wants me to finish it. Problem is I don't program using VB.NET nor have I any intention of learning it for a project this small. Usually I would run from something like this but I need the cash. Should I take the project and continue it using C# or just leave it. Has anyone had a similar experience and how did it turn out.

    Read the article

  • What's the advantage of an Adobe AIR app over a traditional desktop app?

    - by John
    I'm pretty familiar with using Adobe Flex & AS3, and compared with writing apps in JS/HTML I think it's very cool. However, since AIR is essentially a non-browser version of Flex with benefits like local storage, it seems to be competing as a cross-platform desktop application platform... and in that space it's much less mature than more established desktop technologies. So what's the advantage of creating a desktop application using AIR compared to something like Java (or C++ using a cross-platform GUI library like wxWidgets)? Java's equally capable of communicating with the server for instance, I'm not quite sure what AIR adds when competing head-to-head in the desktop development world?

    Read the article

  • Does a servlet-based stack have significant overheads?

    - by John
    I don't know if it's simply because page-loads take a little time, or the way servlets have an abstraction framework above the 'bare metal' of HTTP, or just because of the "Enterprise" in Jave-EE, but in my head I have the notion that a servlet-based app is inherently adding overhead compared to a Java app which simply deals with sockets directly. Forget web-pages, imagine instead a Java server app where you send it a question over an HTTP request and it looks up an answer from memory and returns the answer in the response. You can easily write a Java socket-based app which does this, you can also do a servlet approach and get away from the "bare metal" of sockets. Is there any measurable performance impact to be expected implementing the same approach using Servlets rather than a custom socket-based HTTP listening app? And yes, I am hazy on the exact data sent in HTTP requests and I know it's a vague question. It's really about whether servlet implementations have lots of layers of indirection or anything else that would add up to a significant overhead per call, where by significant I mean maybe an additional 0.1s or more.

    Read the article

  • High accuracy cpu timers

    - by John Robertson
    An expert in highly optimized code once told me that an important part of his strategy was the availability of extremely high performance timers on the CPU. Does anyone know what those are and how one can access them to test various code optimizations? While I am interested regardless, I also wanted to ask whether it is possible to access them from something higher than assembly (or with only a little assembly) via visual studio C++?

    Read the article

  • Accessing facebook sdk result Object using .NET 3.5 API?

    - by John K
    Consider the following in .NET 3.5 (using the Bin\Net35\Facebook*.dll assemblies): using Facebook; var app = new FacebookApp(); var result = app.Get("me"); // want to access result properties with no dynamic ... in the absence of the C# 4.0 dynamic keyword this provides only generic object members. How best should I access the facebook properties of this result object? Are there helper or utility methods or stronger types in the facebook C# SDK, or should I use standard .NET reflection techniques?

    Read the article

  • How to update (append to) an href in jquery?

    - by John Isaacks
    I have a list of links that all go to a google maps api. the links already have the daddr (destination) parameter in them as static. I am using Geo-Location to find the users position and I want to add the saddr (source address) to the links once I get the data. so basically I will need to add something like &saddr=50.1234567,-50.03452 at the tail end of all the links pointing to google maps All the links have a class called directions-link and from this page I have figured out how to change them: $("a.directions-link").attr("href", "http://www.google.com/"); However I only want to append my value to the end of the href without changing what the href already is. How can I do that? Thanks!!

    Read the article

< Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >