Search Results

Search found 1890 results on 76 pages for 'tom willis'.

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

  • Can I create a collection in Scala that uses different equals/hashCode/compare implementations?

    - by Willis Blackburn
    I'm looking for as simple way to create an identity set. I just want to be able to keep track of whether or not I've "seen" a particular object while traversing a graph. I can't use a regular Set because Set uses "==" (the equals method in Scala) to compare elements. What I want is a Set that uses "eq." Is there any way to create a Set in Scala that uses some application-specified method for testing equality rather than calling equals on the set elements? I looked for some kind of "wrapEquals" method that I could override but did not find it. I know that I could use Java's IdentityHashMap, but I'm looking for something more general-purpose. Another idea I had was to just wrap each set element in another object that implements equals in terms of eq, but it's wasteful to generate tons of new objects just to get a new equals implementation. Thanks!

    Read the article

  • Hover/Fadeto/Toggle Multiple Class Changing

    - by Slick Willis
    So my problem is rather simple and complex at the same time. I am trying to create links that fade in when you mouseover them and fade out when you mouseout of them. At the same time that you are going over them I would like a pic to slide from the left. This is the easy part, I have every thing working. The image fades and another image slides. I did this by using a hover, fadeto, and toggle("slide"). I would like to do this in a table format with multiple images being able to be scrolled over and sliding images out. The problem is that I am calling my sliding image to a class and when I hover over the letters both images slide out. Does anybody have a solution for this? I posted the code that I used below: <html> <head> <script type='text/javascript' src='http://accidentalwords.squarespace.com/storage/jquery/jquery-1.4.2.min.js'></script> <script type='text/javascript' src='http://accidentalwords.squarespace.com/storage/jquery/jquery-custom-181/jquery-ui-1.8.1.custom.min.js'></script> <style type="text/css"> .text-slide { display: none; margin: 0px; width: 167px; height: 50px; } </style> <script> $(document).ready(function(){ $(".letterbox-fade").fadeTo(1,0.25); $(".letterbox-fade").hover(function () { $(this).stop().fadeTo(250,1); $(".text-slide").toggle("slide", {}, 1000); }, function() { $(this).stop().fadeTo(250,0.25); $(".text-slide").toggle("slide", {}, 1000); }); }); </script> </head> <body style="background-color: #181818"> <table> <tr> <td><div class="letterbox-fade"><img src="http://accidentalwords.squarespace.com/storage/sidebar/icons/A-Letterbox-Selected.png" /></div></td> <td><div class="text-slide"><img src="http://accidentalwords.squarespace.com/storage/sidebar/icons/TEST.png" /></div></td> </tr> <tr> <td><div class="letterbox-fade"><img src="http://accidentalwords.squarespace.com/storage/sidebar/icons/B-Letterbox-Selected.png" /></div></td> <td><div class="text-slide"><img src="http://accidentalwords.squarespace.com/storage/sidebar/icons/TEST.png" /></div></td> </tr> </table> </body> </html>

    Read the article

  • Trait, FunctionN, or trait-inheriting-FunctionN in Scala?

    - by Willis Blackburn
    I have a trait in Scala that has a single method. Call it Computable and the single method is compute(input: Int): Int. I can't figure out whether I should Leave it as a standalone trait with a single method. Inherit from (Int = Int) and rename "compute" to "apply." Just get rid of Computable and use (Int = Int). A factor in favor of it being a trait is that I could usefully add some additional methods. But of course if they were all implemented in terms of the compute method then I could just break them out into a separate object. A factor in favor of just using the function type is simplicity and the fact that the syntax for an anonymous function is more concise than that for an anonymous Computable instance. But then I've no way to distinguish objects that are actually Computable instances from other functions that map Int to Int but aren't meant to be used in the same context as Computable. How do other people approach this type of problem? No right or wrong answers here; I'm just looking for advice.

    Read the article

  • Spring MVC: How to get the remaining path after the controller path?

    - by Willis Blackburn
    I've spent over an hour trying to find the answer to this question, which seems like it should reflect a common use case, but I can't figure it out! Basically I am writing a file-serving controller using Spring MVC. The URLs are of the format http://www.bighost.com/serve/the/path/to/the/file.jpg, in which the part after "/serve" is the path to the requested file, which may have an arbitrary number of path segments. I have a controller like this: @Controller class ServerController { @RequestMapping(value = "/serve/???") public void serve(???) { } } What I am trying to figure out is: What do I use in place of "???" to make this work? I have two theories about how this should work. The first theory is that I could replace the first "???" in the RequestMapping with a path variable placeholder that has some special syntax meaning "capture to the end of the path." If a regular placeholder looks like "{path}" then maybe I could use "{path:**}" or "{path:/}" or something like that. Then I could use a @PathVariable annotation to refer to the path variable in the second "???". The other theory is that I could replace the first "???" with "**" (match anything) and that Spring would give me an API to obtain the remainder of the path (the part matching the "**"). But I can't find such an API. Thanks for any help you can provide!

    Read the article

  • Hiding UITabBar when rotating device iPhone

    - by Tom G
    Has anyone successfully hidden a UITabbar when rotating the device? I have one view in the UItabbar controller that i rotate (So effectively one tab that rotates) When this happens i want the tab bar to disappear... but nothing seems to work! Either the tabbar still remains visible Or it disappears along with the view Or the tabbar disappears and the view no longer rotates! So if anyone has successfully accomplished this task any advice would be greatly appreciated! Thanks Tom

    Read the article

  • Axis2 and OpenSAML

    - by Tom Kiley
    I'm trying to add SAML assertions to a SOAP web service that is built on the axis2 engine. I'm having a little trouble wrapping my head around how the two would interact. Could someone help point me in the right direction to add a SAML assertion to a response message from Axis2? Thanks, Tom

    Read the article

  • Form generator and data capture PHP application

    - by Tom
    Hi, Does anyone know of a PHP open source which can generate forms to be deployed across your website. These forms will collect and aggregate the data with in on database. There should also be the functionality to search across the forms (to generate reports and newsletter mailing lists) All the services I have found so far have been hosted solutions. Thanks Tom

    Read the article

  • session_id() in PHP

    - by Tom
    Hi, I am just trying the session_id function in PHP and I thought that it was unique for each machine that used the website? However, my flatmate and I have the same session_id for on two separate machines. I'm just using session_id() to create the session - am I doing it correctly? Thanks Tom

    Read the article

  • Warning: mysql_real_escape_string()?

    - by Tom
    Hi, I am getting the error; Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Why do I get this error? The mysql_real_escape_string() works on all of my pages apart from one? Is it something to do with MySQL being on a different server to the PHP server - if so, how do I fix it? Thanks Tom

    Read the article

  • tinymce, view only

    - by tom smith
    Hi. Evaluating Tinymce. I've looked at the docs/source/api, and have a question that I thought I'd pose to the stackoverflow group. Has anyone implemented Tinymce, who can tell me it it's possible to setup Tinymce to restrict a user, allowing the user to only "view" a text file, and be able to add additional buttons to the save/cancel row of buttons.. I think it should be, and that I'm missing something subtle.. Thanks -Tom

    Read the article

  • How to implement mib module in net-snmp with python?

    - by Tom Carly
    Hi, in the faq, i read this "..the agent can also support MIB modules implemented in perl or (from 5.4) python." I have built net-snmp with python support, but it's not clear yet how to actually implement my own MIB module with python now. The python scripts i see in the python directory are related to implementing an snmp client, not an snmp agent. Probably i just miss the point somewhere. Can someone give me a hint on how to get started with this? Thanks, Tom

    Read the article

  • How to intercept and apply effects to Firefox audio/sound output

    - by Tom
    Hi I want to build a Firefox extension that will allow me to directly manipulate the audio output, applying live filters and effects, from (for example) a streaming video site. Im struggling to find any good resources to help me. I think the effects bit will be ok but I need to find a way of intercepting the audio stream output. Does anyone know if this is possible? Thanks, Tom

    Read the article

  • PHP detecting if flash is installed

    - by Tom
    Hi, is it possible to detect if flash is installed using PHP. My aim is, that if it is installed it will play a flv file, and if not it will use another player eg; quicktime? If it is possible how do I go about doing it? Thanks Tom

    Read the article

  • How to create the new QTextDocument from existing widgets???

    - by Tom
    Hi, I'm absolutely confused with how to create the customized QTextDocument. I have the widget QWidget, which consists of some QLabels, QTableWidgets and QWidgets and I want to print it . I decided to create the new QTextDocument and insert in it all the defined widgets. I have already tried QTextCursor-insertBlock and insertText but my problem is how to define QTextBlockFormat or QTextCharFormat and say it, what is its "content", how to insert the widget in it. Can anyone help please? tom

    Read the article

  • PHP: How to implement a __get-like method for local function variables

    - by Tom Frost
    I'm no stranger to __get(), and have used it to make some very convenient libraries in the past. However, I'm faced with a new challenge (PHP 5.3, abbreviated and simplified my code for this question): <?php namespace test; class View { function __construct($filename, $varArray) { $this->filename = $filename; $this->varArray = $varArray; } function display() { include($this->filename); } function __get($varName) { if (isset($this->varArray[$varName])) return $this->varArray[$varName]; return "?? $varname ??"; } } ?> Above is a very, very simplified system for loading a View. This code would call the view and display it: <?php require_once("View.php"); use test\View; $view = new View("views/myview.php", array("user" => "Tom")); $view->display(); ?> My goal for this code is to allow the view "myview.php" to contain code like this: <p> Hello <?php echo $user; ?>! Your E-mail is <?php echo $email; ?> </p> And, used with the above code, this would output "Hello Tom! Your E-mail is ?? email ??" However, this won't work. The view is being included within a class method, so when it refers to $user and $email, it's looking for local function variables -- not variables belonging to the View class. For this reason, __get never gets triggered. I could change all my view's variables to things like $this-user and $this-email, but that would be a messy and unintuitive solution. I'd love to find a way where I can reference variables directly WITHOUT having PHP throw an error when an undefined variable is used. Thoughts? Is there a clean way to do this, or am I forced to resort to hacky solutions?

    Read the article

  • ASP.NET 4.0 , SQL 2008 Web development and deployment Cloud or Shared Hosting?

    - by Tom
    Just to give you a fair idea, I am new to the web development / hosting world and planning to develop a Multilingual Social networking Web Applications in ASP.NET 4.0 , expected the content to deliver in many countries German, France, China, India and MiddleEast. My question is will Cloud Hosting provides a development environment? or should i buy software and develop in my system?. Which is the best hosting model for my scenario. I do know there will not be many users and expecting a steady growth. Tom

    Read the article

  • Facebook Graph API With iPhone SDK

    - by Tom G
    Hi, Has anyone been able to implement Facebooks Graph API in a native iPhone Application? The documentation is pretty sparse when it comes to iPhone integration, but the calls to get users information looks a lot more light weight than the previous method of using FBConnect. So i would like to use it. I have seen a few posts about but none explain you you would implement the login button as we did previously with FBConnect? If any one has achieved this or can offer me any pointers that would be brilliant Thanks Tom

    Read the article

  • Java NIO (Netty): Exceptionhandling in Downstream Hanlders/Chain

    - by Tom
    Hello Experts, could someone please explain to me, how in netty "Downstream Exceptions" are handeled? According to the javadoc there are no Downstream exceptions: http://docs.jboss.org/netty/3.1/api/org/jboss/netty/channel/ExceptionEvent.html Given the case that in one of my downstream handlers an exception occures OR in the I/0 Thread itself, where can these errors be catched and handeled? thank you very much tom

    Read the article

  • jq div display script webkit issues

    - by Tom
    $(document).ready(function() { $('#chekboxes a').click(function(e) { $('.visible').removeClass('visible').addClass('invisible'); var thediv = $(this).attr('href'); $(thediv).removeClass('invisible').addClass('visible'); }) }); This simple bit of jq works in FF and not in Chrome and Safari. Despite googling widely, I cannot tell whether there's a way to make it work in Safari and Chrome or not. Does anyone know a fix or what is wrong ? Thanks, Tom

    Read the article

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