Search Results

Search found 6726 results on 270 pages for 'rafael de f ferreira'.

Page 153/270 | < Previous Page | 149 150 151 152 153 154 155 156 157 158 159 160  | Next Page >

  • skip after_filter in controller before_filter

    - by Rafael Carício
    I'm using Intercom rails in my application and I would like to not include intercom script in a certain situation. So, I would like to skip the intercom after_filter when a value is set in the user session. I tried that, but it didn't worked: class ApplicationController < ActionController::Base before_filter :verify_session def verify_session if skip_intercom? self.class.skip_after_filter :intercom_rails_auto_include end end end Any idea if it's possible?

    Read the article

  • How to write an intersects for Shapes in android

    - by Rafael T
    I have an written an Object called Shape which has a Point representing the topLeftCorner and a Dimension with represents its width and height. To get the topRightCorner I can simply add the width to the topLeftPoint.x. I use to rotate them on a certain degree around their center. The problem after the rotation is, that my intersects(Shape) method fails, because it does not honor the rotation of the Shapes. The rotation will be the same for each Shape. My current implementation looks like this inside my Shape Object: public boolean intersects(Shape s){ // functions returning a Point of shape s return intersects(s.topLeft()) || intersects(s.topRight()) || intersects(s.bottomLeft()) || intersects(s.bottomRight()) || intersects(s.leftCenter()) || intersects(s.rightCenter()) || intersects(s.center()); } public boolean intersects(Point p){ return p.x >= leftX() && p.x <= rightX() && p.y >= topY() && p.y <= bottomY(); } Basically I need functions like rotatedLeftX() or rotatedTopRight() to work properly. Also for that calculation I think it doesn't matter when the topLeft point before a rotation of ie 90 will turn into topRight... I already read this and this Question here, but do not understand it fully.

    Read the article

  • What approaches are available to revert an IDirect3DDevice9 instance to its default render state?

    - by Rafael Goodman
    Given an instance of IDirect3DDevice9, what approaches are available to put it in its original render state (i.e. the state it was in when the device was initially created)? The cleanest way that I've come across is to create a state block via IDirect3DDevice9::CreateStateBlock just after the device has been created so that it can be applied later. Unfortunately, I'm operating under the constraints of an existing project such that I can't modify the device creation code; by the time my component gets the device, its default state has been modified. As a result, I'm looking for alternative approaches. Thx! ~Raf

    Read the article

  • PHP: imagepng is creating inordinately large files

    - by Rafael
    I'm using a simple thumbnailing script I wrote and it's pretty standard: $imgbuffer = imagecreatetruecolor($thumbwidth, $thumbheight); switch($type) { case 1: $image = imagecreatefromgif($img); break; case 2: $image = imagecreatefromjpeg($img); break; case 3: $image = imagecreatefrompng($img); break; case 6: $image = imagecreatefrombmp($img); break; case 15: $image = imagecreatefromwbmp($img); break; default: return log_error("Tried to create thumbnail from $img: not a valid image"); } imagecopyresampled($imgbuffer, $image, 0, 0, 0, 0, $thumbwidth, $thumbheight, $width, $height); $output = imagepng($imgbuffer, "$album/thumbs/$imgname.png", 9); 9 is the lowest quality setting, yet from a 400 x 600 JPEG image (at 56kB) I'm getting a thumbnail 27 kB in size (140 x 140). Using imagejpeg (quality of 80) instead of imagepng it's about 4kB. How can this be, especially at the lowest quality setting for imagepng? I tried using imagecopy instead of imagecopyresampled, and imagecreate instead of the true color version. Unfortunately the images come out mangled somehow. Is there any way to get PNG thumbnails of a reasonably small file size (about 4 kB at 140 x 140)? Or do I have to use JPEG?

    Read the article

  • Alternatives to Java bytecode instrumentation

    - by Rafael Regis
    I'm starting a project that will have to instrument java applications for coverage purposes (definition-usage of variables, etc). It has to add trace statements and some logic to the application and maybe remove statements. I have searched for ways of instrument Java code and what I always find is about bytecode instrumentation. My question is: It's the only way to instrument Java applications? There is any other way to do that? What are the advantages of bytecode instrumentation over the others? I'll probably use the bytecode solution, but I want to know what are the problems with the other approaches (if any) to decide precisely. Thanks!

    Read the article

  • SEO - List of links

    - by Rafael Carvalho
    I'd like to know if listing a set of partner sites/blogs is useful for the pagerank growth. Does Google see it as an incorrect act? I read somewhere that if people exchange links, google seeks it and marks as a bad technique. If it doesn't matter, is the content of the linked site relevant?

    Read the article

  • What is the best way to do scoped finds based on access control rules in Rails?

    - by Rafael Szuminski
    Hi I need to find an elegant solution to scoped finds based on access control rules. Essentially I have the following setup: Users Customers AccessControl - Defines which user has access to another users data Users need to be able to access not just their own customers but also shared customers of other users. Obviously something like a simple association will not work: has_many :customers and neither will this: has_many :customers, :conditions => 'user_id in (1,2,3,4,5)' because the association uses with_scope and the added condition is an AND condition not an OR condition. I also tried overriding the find and method_missing methods with the association extension like this: has_many :customers do def find(*args) #get the user_id and retrieve access conditions based on the id #do a find based on the access conditions and passed args end def method_missing(*args) #get the user_id and retrieve access conditions based on the id #do a find based on the access conditions and passed args end end but the issue is that I don't have access to the user object / parent object inside the extension methods and it just does not work as planned. I also tried default_scope but as posted here before you can't pass a block to a default scope. Anyhow, I know that data segmentation and data access controls have been done before using rails and am wondering if somebody found an elegant way to do it. UPDATE: The AccessControl table has the following layout user_id shared_user_id The customer table has this structure: id account_id user_id first_name last_name Assuming the the following data would be in the AccessControl table: 1 1 1 3 1 4 2 2 2 13 and so on... And the account_id for user 1 is 13 I need to be able to retrieve customers that can be best described with the following sql statement: select * from customers where (account_id = 13 and user_id = null) or (user_id in (1,3,4))

    Read the article

  • using context resource in gwt 2 hosted mode

    - by rafael
    Hello all, I am moving a web app from gwt 1.5 to gwt 2.0. I am trying to connect to the a database resource I have in my context.xml file.In gwt 1.5 I had set up root.xml in tomcat-conf-gwt-localhost. I have no idea where to set up the resource in GWT 2.0. I tried placing my context.xml file in war-META-INF with no luck. Anyone have an idea where to place the context.xml file to be able to use a jndi database resource in GWT 2.0? Thanks in advanced

    Read the article

  • SEO - List of links - Farmlinking?

    - by Rafael Carvalho
    I'd like to know if listing a set of partner sites/blogs is useful for the pagerank growth. Does Google see it as an incorrect act? I read somewhere that if people exchange links, google seeks it and marks as a bad technique. If it doesn't matter, is the content of the linked site relevant?

    Read the article

  • Need help in Hashtable implementation

    - by rafael
    Hi all, i'm quite a beginner in C# , i tried to write a program that extract words from an entered string, the user has to enter a minimum length for the word to filter the words output ... my code doesn't look good or intuitive, i used two arrays countStr to store words , countArr to store word length corresponding to each word .. but the problem is i need to use hashtables instead of those two arrays , because both of their sizes are depending on the string length that the user enter , i think that's not too safe for the memory or something ? here's my humble code , again i'm trying to replace those two arrays with one hashtable , how can this be done ? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int i = 0 ; int j = 0; string myString = ""; int counter = 0; int detCounter = 0; myString = Console.ReadLine(); string[] countStr = new string[myString.Length]; int[] countArr = new int[myString.Length]; Console.Write("Enter minimum word length:"); detCounter = int.Parse(Console.ReadLine()); for (i = 0; i < myString.Length; i++) { if (myString[i] != ' ') { counter++; countStr[j] += myString[i]; } else { countArr[j] = counter; counter = 0; j++; } } if (i == myString.Length) { countArr[j] = counter; } for (i = 0; i < myString.Length ; i++) { if (detCounter <= countArr[i]) { Console.WriteLine(countStr[i]); } } Console.ReadLine(); } } }

    Read the article

  • Choosing an Open Source Application Server for J2EE

    - by Rafael
    Hello, I know this may be a recurring topic, but I have read a lot of articles and I still have doubts. Also, I would like to hear more recent opinions about this. The main requirements of my application server are: flexible configuration, support for a extremely high number of concurrent users. It will be a system for the mobile communications industry, so it must have high availability as well. I am going to develop a J2EE application and Open Source Applications Servers are my only option. I have use GlassFish for a very small project and I really liked it. Thank you very much for your advise.

    Read the article

  • How to add or remove a value inside a table cell on selection / de-selection of checkbox of that row, trying to submit the value via Jquery?

    - by Raul
    Here is the table: <%= form_tag '', :id => "costs" do %> <table class="table table-bordered" id="service_cost"> <% @services.each do |service| %> <tbody> <tr> <td><%= check_box_tag :open_service, {}, false, :class => 'checkable' %></td> <td><%= service.phone %></td> <td><%= service.internet %></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td><%= service.house_keeping %> </td> <td>0.0 </td> <td><%= service.laundry %></td> <td><%= text_field_tag "service_cost", service.total, :class => "input-small" %></td> </tr> <% end %> when the form gets submitted, the javascript gets into action: $("#costs").submit(function(){ formData=$("#costs").serializeArray(); processFormData(formData) return false; }); This ensures form submission on selecting the checkbox: $('.checkable').live('change', function() { $(this).parents('form:first').submit(); }); But, what I am looking for is adding or removing a cell value based on checkbox selection/de-selection and submitting it, kindly suggest a way to do it.

    Read the article

  • Oracle : « Le Cloud reprend le meilleur des Mainframes » et en corrige les défauts, à condition qu'il s'appuie sur des standards ouverts

    Oracle : « Le Cloud reprend le meilleur des Mainframes » Et en corrige les défauts, à condition qu'il s'appuie sur des standards ouverts Il y a environ 7 ans, Oracle a entamé un virage stratégique. Son but était de simplifier les déploiements et les architectures IT. Aujourd'hui, l'éditeur aux multiples casquettes (BI, BPM, Hardware, SGBD, Java, etc.) est en train d'en faire un deuxième. Celui du Cloud . Et toujours sous le signe de la simplification. « Le meilleur Cloud sera complètement transparent pour les utilisateurs », prédit Andrew Sutherland, le cordial (et écossais) Senior Vice-Président Fusion Middleware Europe, de passage ce matin à Paris. Sous-entendu, t...

    Read the article

  • Hébergement : Ikoula lance une offre « deux achetés, un offert » valable jusqu'au 24 juin à 18h

    Hébergement : Ikoula lance une offre « deux achetés, un offert » Valable jusqu'au 24 juin à 18h L'hébergeur Ikoula lance pour cette semaine, et pour cette semaine uniquement, une offre promotionnelle particulière. Pour deux produits achetés, Ikoula offre le troisième. Pour en bénéficier, il suffit d'utiliser le même compte client pour l'achat des trois produits. La valeur de la prestation offerte (prix de la prestation + les options + la durée d'engagement) doit juste être inférieure à celles des deux prestations achetées individuellement. Votre commande sera par la suite validée manuellement par Ikoula (il faut donc choisir le mode de paiement hors-ligne). A noter q...

    Read the article

  • Visual Studio Talk Show #118 is now online - Command-Query Responsibility Separation (French)

    http://www.visualstudiotalkshow.com Erik Renaud: La sparation des responsabilits entre les commandes et les requtes Nous discutons avec Erik Renaud de la sparation des responsabilits entre les commandes et les requtes (Command-Query Responsibility Separation - CQRS). La plupart des applications lisent les donnes beaucoup plus frquemment qu'ils font des critures. Sur la base de cette dclaration, une bonne ide consiste sparer le code qui est responsable de lcriture des donnes du code qui est...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

  • Dernière minute : Le co-créateur du XML quitte Oracle pour Google, Tim Bray travaillera sur Android

    Dernière minute : Le co-créateur du XML quitte Oracle pour Google, Tim Bray travaillera sur Android Tim Bray, qui avait été à l'origine (en partie) de l'écriture du XML, vient d'annoncer il y a quelques heures sur son blog qu'il quittait Sun/Oracle pour rejoindre Google à un poste d'"Advocate Developper" centré sur Android. Il prédit que cela sera très excitant et semble ravi de ce changement. Il faut dire que ces derniers mois, ses relations avec son précédent employeur s'étaient quelque peu détériorées, notamment lorsqu'on lui avait fait censurer son blog à propos de la fusion Sun/Oracle. Il a donc cherché à quitter ses fonctions et a trouvé refuge chez Google, qui a carrément crée un poste juste p...

    Read the article

  • AJAX 4 no ASP.NET 4 Web Application

    - by renatohaddad
    Andei fazendo uns testes no AJAX Control Toolkit 4 que deverá ser usado com o ASP.NET 4 no Visual Studio .NET 2010 e confesso que gostei muito. O link para download é http://www.asp.net/ajaxlibrary/act.ashx e todas as instruções constam no site. Notei que há diversos controles novos e um que me chamou a atenção foi o de Upload assíncrono para controlar os uploads de arquivos para o server. Vale a pena estudar um pouco estas novidades. Para quem já usava o AJAX no ASP.NET 3.5, a idéia do Toolkit é igual, exceto a adição de novos controles. Com o AJAX vc pode mudar todo o comportamento da sua aplicação WEB, requisições no server passam a ser menos frequentes, o layout ajuda e muito com os controles do AJAX. Nativamente no VS 2010 já há o AJAX que a MS suporta nativamente (ScriptManager, UpdatePanel, UpdateProgress, etc), mas vale a pena implementar alguns controles do Toolkit. Bons estudos!

    Read the article

  • Bruxelles finance un client BitTorrent décentralisé dans le cadre d'une recherche sur l'amélioration des réseaux informatiques

    La Communauté Européenne finance un client BitTorrent entièrement décentralisé Dans le cadre d'une recherche sur l'amélioration des réseaux informatiques Il est déjà difficile d'expliquer au grand public la différence entre hacker et pirate. On souhaite donc beaucoup de patience et de courage au Professeur responsable du projet Tribler pour expliquer la différence entre BitTorrent et piratage. Il s'agit pourtant d'un projet intéressant à plus d'un titre. Technologiquement, Tribler est un client BitTorrent entièrement décentralisé. Autrement dit, un logiciel qui permet d'échanger des contenus de machine à machine, en gré à gré (ou ...

    Read the article

  • Steve Jobs promet une messagerie universelle sur l'iPhone, les mails tout-en-un dans un futur proche

    Steve Jobs promet une messagerie universelle sur l'iPhone, les mails tout-en-un dans un futur proche L'information est courte et nous laisse même sur notre faim. Mais, elle a le mérite d'être claire et officielle puisque provenant du patron d'Apple lui-même ! Steve Jobs a en effet répondu par l'affirmative à un admirateur qui lui demandait si dans le futur, il serait possible d'accéder à tous ses comptes e-mail en un clique. Une prochaine mouture de l'iPhone OS devrait donc embarquer un système de messagerie universelle. Bonne nouvelle ? Source : Une copie du message de Steve Jobs...

    Read the article

  • [News] Fluent.NET 1.0 disponible

    Fluent.NET est un framework Open Source proposant une surcouche des API .NET sous la forme d'interfaces fluentes. Le proc?d? s'appuie sur les extensions de m?thodes et facilite la lecture de code : "English speakers read from left to right, not from the outside in. So why are we writing code that way? Fluent.NET aims to correct this problem by adding extension methods where helper methods are typically used.". Le principe tend ? se g?n?raliser ces derni?res ann?es, notamment dans les langages de requ?tes objets.

    Read the article

  • FY12 Oracle PartnerNetwork Kickoff - junte-se a nós

    - by pfolgado
    Caro parceiro, Como temos vindo a anunciar, vai ter lugar no próximo dia 28/Jun (3ª feira), via web, o FY12 Oracle PartnerNetwork Kickoff. Dada a importância deste evento, durante o qual serão apresentadas em primeira mão as novidades quanto à oferta de produtos Oracle e quanto ao papel e oportunidades para os parceiros, queremos convidá-lo a juntar-se a nós para assistirmos em conjunto a esse evento, a partir do nosso Showroom, na companhia de outros parceiros e dos nossos VAD - Altimate e Diasa. Se aceitar o nosso convite, estaremos à sua espera às 13:45. Por questões logísticas, por favor envie-nos um email indicando quantas e quais as pessoas que irão estar presentes nesta sessão. Em qualquer dos casos, não deixe de se registar no link indicado na notícia anterior (register).

    Read the article

  • La Freebox V6 a été développée avec Qt et QML en C++, un framework sera disponible pour créer ses propres applications

    La Freebox V6 développée avec Qt et QML Un framework sera disponible pour créer ses propres applications Je sais ça s'écrit pas comme ça, mais c'est une très bonne annonce que voilà pour les utilisateurs de Qt ! En effet, toute l'interface utilisateur de la Freebox V6 a été développée à l'aide de Qt et du langage déclaratif QML. Ce dernier peut être utilisé conjointement avec du code en JavaScript ou être intégré à une application C++. Comme pour les PC et Mac, les développeurs auront plusieurs niveaux pour le développement d'applications : du natif et bas niveau, en C ou en C++ avec l'API 3D OpenGL ; un peu plus haut niveau avec Qt en C++ ou en JavaScript avec QML ; finalement, ...

    Read the article

  • iOS 5 pourrait accélérer le fonctionnement des applications Web en plein écran en activant le moteur JavaScript Nitro pour ce mode

    iOS 5 pourrait accélérer le fonctionnement des applications Web en plein écran En activant le moteur JavaScript Nitro pour ce mode Mise à jour du 20/06/2011 par Idelways Les applications Web épinglées sur l'écran de démarrage des iDevices et fonctionnant sous Safari mobile en mode plein écran pourraient bientôt bénéficier des progrès remarquables apportés par le moteur JavaScript « Nitro » avec l'arrivée d'iOS 5, actuellement en bêta. Comme on peut s'y attendre, cette annonce pointue, néanmoins importante et en tout cas prématurée ne vient pas directement d'Apple, mais de l'un de ses (ex. ?) employé ayant dévoilé ...

    Read the article

< Previous Page | 149 150 151 152 153 154 155 156 157 158 159 160  | Next Page >