Daily Archives

Articles indexed Wednesday May 26 2010

Page 10/118 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Does UIGestureRecognizer work on a UIWebView?

    - by rscott
    I am attempting to get a UIGestureRecognizer working with a UIWebview which is a subview of a UIScrollView. This sounds odd but when I have the numberOfTouchesRequired set to 2 the selector fires, but when numberOfTouchesRequired is set to one the selector doesn't fire. Here is my code: UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(select1:)]; tap1.numberOfTouchesRequired = 2; tap1.numberOfTapsRequired = 1; tap1.delegate = self; [self.ans1WebView addGestureRecognizer:tap1]; [tap1 release]; - (void) select1:(UILongPressGestureRecognizer *)sender { //Do Stuff } I've confirmed this by using the Apple sample for UIGestureRecognizer and inserting a webview in their nib. Their tap code works everywhere but inside the area of the webview.

    Read the article

  • Best way to encrypt certain fiels in SQL Server 2008?

    - by Josh
    I'm writing a .net web app that will read and write information to a SQL 2008 backend database. Some of this information will be highly confidential in nature so I want to encrypt certain data elements. I dont want to use TDE or any full-database encryption for performance reasons. My main concern is protecting this sensitive data as a last resort against a SQL injection or even a database server compromise. My question is what is the best way to do this to preserve performance? Is it faster to use the SQL2008 encryption functions such as EncryptByKey, or would it be faster to encrypt and decrypt the data in the .NET web app itself using a symmetric key stored in the secure web.config and store the encrypted values in the DB?

    Read the article

  • The Date type and the Android database

    - by cdonner
    I understand that SQLite stores dates as long integers. When I read rows into a cursor using the standard method (i.e. using the query() method that reads data into a cursor), the result is a date string that includes the time. If I want a different format, I have to parse the string back into a date - possible, but a bit backwards. By using a ViewBinder (as suggested in this question), I can pretty much do anything I want, but the date is already a string at the time the method executes. The accepted answer to the above question also suggests that storing dates as longs would help avoid this problem. I don't want to do that, just in case I want to interpret my data with something else than this application. Maybe I want to expose it via a provider. Is there a way to handle this in the database adapter instead, i.e. controlling the date format that the cursor contains, so that I don't have to change the schema, and don't have to parse the default output back into a Date type?

    Read the article

  • Ruby on Rails: url_for :back leads to NoMethodError for back_url

    - by Platinum Azure
    Hi all, I'm trying to use url_for(:back) to create a redirect leading back to a previous page upon a user's logging in. I've had it working successfully for when the user just goes to the login page on his or her own. However, when the user is redirected to the login page due to accessing a page requiring that the user be authenticated, the redirect sends the user back to the page before the one s/he had tried to access with insufficient permissions. I'm trying to modify my login controller action to deal with the redirect properly. My plan is to have a query string parameter "redirect" that is used when a forced redirect occurs. In the controller, if that parameter exists that URL is used; otherwise, url_for(:back) is used, or if that doesn't work (due to lack of HTTP_REFERER), then the user is redirected to the site's home page. Here is the code snippet which is supposed to implement this logic: if params[:redirect] @url = params[:redirect] else @url = url_for :back @url ||= url_for :controller => "home", :action => "index" end The error I get is: NoMethodError in UsersController#login undefined method `back_url' for # RAILS_ROOT: [obscured] Application Trace | Framework Trace | Full Trace vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `__send__' vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `polymorphic_url' vendor/rails/actionpack/lib/action_controller/base.rb:628:in `url_for' app/controllers/users_controller.rb:16:in `login' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in `process' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `synchronize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `process' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `__send__' vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `polymorphic_url' vendor/rails/actionpack/lib/action_controller/base.rb:628:in `url_for' vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `send' vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `perform_action_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in `perform_action_without_caching' vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action' vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache' vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action' vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send' vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_session_management_support' vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in `process' vendor/rails/actionpack/lib/action_controller/base.rb:392:in `process' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:184:in `handle_request' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in `dispatch' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `synchronize' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `dispatch' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:in `dispatch' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' vendor/rails/railties/lib/commands/servers/mongrel.rb:64 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' vendor/rails/railties/lib/commands/server.rb:49 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' script/server:3 vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `__send__' vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `polymorphic_url' vendor/rails/actionpack/lib/action_controller/base.rb:628:in `url_for' app/controllers/users_controller.rb:16:in `login' vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `send' vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `perform_action_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in `perform_action_without_caching' vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action' vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache' vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action' vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send' vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_session_management_support' vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in `process' vendor/rails/actionpack/lib/action_controller/base.rb:392:in `process' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:184:in `handle_request' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in `dispatch' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `synchronize' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `dispatch' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:in `dispatch' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in `process' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `synchronize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `process' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' vendor/rails/railties/lib/commands/servers/mongrel.rb:64 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' vendor/rails/railties/lib/commands/server.rb:49 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' script/server:3 Request Parameters: None Show session dump --- :user: :csrf_id: 2927cca61bbbe97218362b5bcdb74c0f flash: !map:ActionController::Flash::FlashHash {} Response Headers: {"Content-Type"="", "cookie"=[], "Cache-Control"="no-cache"} Bear in mind that I had it working earlier-- url_for(:back) knew how to operate properly before I added this logic. Thanks in advance for any ideas!

    Read the article

  • Ubuntu - Bash - How to Ctrl + R

    - by Greg_the_Ant
    I can't seem to locate recent commands I've run when I do Ctrl + R in my terminal, nor can I see them when I hit the up arrow. It was a long command. Is there a length limit to what is stored? I may have used sudo. Is sudo history stored somewhere else? If so how do I access it? Much thanks for any insight.

    Read the article

  • Jquery Ignore Event

    - by HealthWarning
    I'll just go straight to the point. Let's say we have this markup: <span href="">Text <a href="">Link</a></span> We have events bound to both elements. How do I make it such that when I click on the anchor tag, the event on the parent will not be triggered? I've tried using the Jquery method stopPropagation() but still no luck. Any thoughts? Thanks.

    Read the article

  • Simple Binding question, unable to bind to button command in a DataTemplate using MVVM Light Toolkit

    - by deliberative assembly
    I've been attempting to bind to buttons within a DataTemplate without much success. The button does not fire. Button Click works successfully outside of the DataTemplate. Yet if I create a Click="button_click" the click button is fired. The Button Content binds perfectly as well. Example to illustrate.. Why does the command not fire? Advice on how this should be handled this? The example is a simplified version of my real problem, I am currently not using a Listbox. I only recreated the same problem with a listbox..

    Read the article

  • When is it appropriate to use C++ exceptions?

    - by krebstar
    I'm trying to design a class that needs to dynamically allocate some memory.. I had planned to allocate the memory it needs during construction, but how do I handle failed memory allocations? Should I throw an exception? I read somewhere that exceptions should only be used for "exceptional" cases, and running out of memory doesn't seem like an exceptional case to me.. Should I allocate memory in a separate initialization routine instead and check for failures and then destroy the class instance gracefully? Or should I use exceptions instead? The class won't have anything useful to do if these memory allocations should fail.. EDIT: The consensus seems to be that running out of memory IS an exceptional case. Will see how to go about this.. Thanks.. :)

    Read the article

  • Android: Create TextView that flashes when clicked

    - by Jeremy
    How do I set up a TextView to flash when it is clicked? I essentially want one of the objects that is displayed in a ListActivity, but inside a normal View. I have tried to do this by adding an OnClickListener, but what I really need is something like adding an On(Un)SelectListener. Using the onClickListener, I can change the TextView background, but obviously the background stays that color. I thought of using a new Handler().postDelayed(new Runnable(){ ... }) kind of thing to reset the backround after some small time, but I did not know if this would be overkill for what I'm trying to do. What would you recommend?

    Read the article

  • Sifr Horizontal Menu with LI

    - by Rosaiani
    Hello, I am designing a very simple horizontal menu with sIFR and CSS list. The thing about it is that it assigns a certain width to it that makes texts of different widths´ spacing look weird on screen. I´ve seen a default width and height of a certain amount, but what I need is to make it so that the flash is exactly the size of the text. Has anyone bumped into this issue before? Thanks!

    Read the article

  • Please help me with java ee and eclipse tutorial

    - by tmt055
    im new to java ee platform and im having a hard time searching for a book for java ee that uses eclipse IDE. So please can you tell me any book that involves java ee and eclipse for beginners. and some tips from you how to learn this stuff and a follow up question, is java EE still good 20 years from now?

    Read the article

  • OpenSSL compatible API for Scala?

    - by pfleidi
    Hello, I'm working on a project with a friend. He's implementing his software in Ruby and I'm doing my stuff in Scala (with Lift). We're using some asynchronous encryption and he is using the ruby OpenSSL bindings for that: key = OpenSSL::PKey::RSA.generate(4096) self.public_key = key.public_key self.private_key = key What I'm looking for is a simple API which is compatible to OpenSSL and runs on the JVM. I need it to create key-pairs and to encrypt and sign our payload. Do you have any suggestions?

    Read the article

  • SQLAuthority News Win MS Office License Last 2 days

    Just a note for everybody who is from India and want to win FREE Office License, participate in very easy contest here. SQLAuthority News Virtual Launch Event for Office 2010 Contest Win MS Office License Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SQLAuthority News SQL Server Technology Evangelists and Evangelism

    This is the exact conversation that I had with three people during the recent SQL Server Public Training. Person 1: “Are you an SQL Server Evangelist?” Pinal : “No, but Vinod Kumar is.” Person 1: “Who are you? Person 2: “He is Pinal, haha!” Person 1: “I know that, but dont you evangelize SQL Server [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Windows repair console, impossible?

    - by Daniel
    I found an old Windows XP SP2 in my -trash- cd can and tried it on a 30 GB FAT32 partition. Installation went fine till the copying operation was completed and XP asked for reboot. After that either it starts over again or throws invalid disk. Starting over is an infinite loop the only way I see is to choose the "Repair console" but I'm not used to a DOS box. Can anyone help me through this harmful installation?

    Read the article

  • Loop over DOMDocument

    - by Zoredache
    I am following the suggestion from this question Robust, Mature HTML Parser for PHP, about parsing html that may be malformed with DOMDocument. Is there any easy way to loop over the parsed document? So I would like to loop over html like this. $html='<ul> <li>value1</li> <li>value1</li> <li>value3</li> </ul> <p>hello world</p>'; $doc = new DOMDocument(); $doc->loadHTML($html); ??? foreach (??? as $node) { print $node->nodeName.':'.$node->nodeValue; } And get results somewhat like this. ul: li:value1 li:value2 li:value3 p:hello world

    Read the article

  • C# WPF Slider Issue with IsMoveToPointEnabled

    - by Kirk
    I have IsMoveToPointEnabled on for my Slider, so when I click anywhere on the component the selector moves to my mouse. The problem is if I have this option on and click and hold the mouse down to drag the selector the selector doesn't move. Anyone know how to fix this?

    Read the article

  • Drupal using Solr externally on another machine?

    - by Meg
    I'd like to use the Drupal solr search module with the Apache Solr Search hosted on an external machine. I know that Acquia offer this as a service. But it's not an affordable option for me. I'd like to install Solr on an inexpensive VPS and have all my various Drupal sites which are on different hosts accessing the search functions. Am I barking up the wrong tree?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >