Search Results

Search found 105 results on 5 pages for 'rafael regis'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • How to override a render to create a custom "render :my_format => argument" in rails 2.3(.5)?

    - by Rafael
    Hey! I would like to create a custom render as specified in title. For instance, I have my controller: class MyController < ApplicationController def index respond_to do |format| format.html # index.html.erb format.xml { render :xml => @objs } end end end , but I would like something like this: class MyController < ApplicationController def index respond_to do |format| format.html # index.html.erb format.xml { render :xml => @objs } format.my_format { render :my_format => @objs } end end end Is it possible? What are the steps I need to make it work? Thanks in advance! UPDATE I want something like in here. So I replaced the @objs with a method but it didn't work either (the method wasn't called). Obs: I register the mime type at config/initializers/mime_types.rb.

    Read the article

  • resolving incidents (closing cases) in CRM4 through webservices?

    - by Rafael D.
    Hello everybody, I'm trying to resolve/close Dynamics CRM4 cases/incidents through webservices. A single SetStateIncidentRequest is not enough and returns a Server was unable to process request error message. I think it has something to do with active workflows that trigger on case's attribute changes. I don't know if there's anything else preventing the request to work. Since it is possible to close those cases through the GUI, I guess there's a "correct" set of steps to follow in order to achieve it through CrmService; unfortunately, I've been googleing it for a while without finding what I want. Could anybody help me, please?

    Read the article

  • Convert a List of Options to an Option of List using Scalaz

    - by Rafael de F. Ferreira
    The following function transforms a list of Option[T] into a list of Some[T], in the case where all members are Some's, or None, in the case where there is at least one None member. I guess the code is clearer that this explanation: def lo2ol[T](lo: List[Option[T]]): Option[List[T]] = { lo.foldRight[Option[List[T]]](Some(Nil)){(o, ol) => (o, ol) match { case (Some(x), Some(xs)) => Some(x :: xs); case _ => None : Option[List[T]]; }}} I remember seeing somewhere a similar example, but using Scalaz to simplify the code. How would it look like?

    Read the article

  • How to 'assign' a value to an output reg in Verilog?

    - by Rafael Almeida
    ( insert really basic question disclaimer here ) More specifically, I have the following declaration: output reg icache_ram_rw And in some point of the code I need to put the zero value in this reg. Here's what I've tried and the outcomes: assign icache_ram_rw = 1'b0; ( declarative lvalue or port sink reg icache_ram_rw must be a wire ) icache_ram_rw <= 1'b0; ( instance gate/name for type "icache_ram_rw" expected - <= read ) How do I do it after all?!

    Read the article

  • ZF1 + Doctrine 2 ODM: Call to undefined method AnnotationReader::setDefaultAnnotationNamespace

    - by Rafael
    I am trying to setup a zf1 + doctrine mongo odm 1.0.0BETA4-DEV project. I am using https://github.com/Bittarman/zf-d2-odm branch but when I update doctrine version from 1.0.0BETA3 to 1.0.0BETA4-DEV, I get the following error: SCREAM: Error suppression ignored for ( ! ) Fatal error: Call to undefined method Doctrine\Common\Annotations\AnnotationReader::setDefaultAnnotationNamespace() in C:\htdocs\zf-d2-odm\library\Lupi\Resource\Odm.php on line 34 Call Stack # Time Memory Function Location 1 0.0007 139368 {main}( ) ..\index.php:0 2 0.0217 659008 Zend_Application->bootstrap( ) ..\index.php:25 3 0.0217 659104 Zend_Application_Bootstrap_BootstrapAbstract->bootstrap( ) ..\Application.php:355 4 0.0217 659120 Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap( ) ..\BootstrapAbstract.php:586 5 0.0314 1127240 Zend_Application_Bootstrap_BootstrapAbstract->_executeResource( ) ..\BootstrapAbstract.php:626 6 0.0314 1127368 Lupi_Resource_Odm->init( ) ..\BootstrapAbstract.php:683

    Read the article

  • ASP Calendar control returns Date type but I need Datetime to insert into SQL Server 2005

    - by rafael
    Hello, I am using a ASP Calendar control to insert a datetime value into a field to be part of an insert to a SQL Server 2005 db table. I get the following error when i submit the form to server and try to insert into table: [ArgumentException: The version of SQL Server in use does not support datatype 'date'.] Seems like Calendar control returns a Date type value. How could i make the Calendar control return a Datetime value instead? I know now that SQL Server 2005 does not support Date type fields.

    Read the article

  • How to build an offline web app using Flask?

    - by Rafael Alencar
    I'm prototyping an idea for a website that will use the HTML5 offline application cache for certain purposes. The website will be built with Python and Flask and that's where my main problem comes from: I'm working with those two for the first time, so I'm having a hard time getting the manifest file to work as expected. The issue is that I'm getting 404's from the static files included in the manifest file. The manifest itself seems to be downloaded correctly, but the files that it points to are not. This is what is spit out in the console when loading the page: Creating Application Cache with manifest http://127.0.0.1:5000/static/manifest.appcache offline-app:1 Application Cache Checking event offline-app:1 Application Cache Downloading event offline-app:1 Application Cache Progress event (0 of 2) http://127.0.0.1:5000/style.css offline-app:1 Application Cache Error event: Resource fetch failed (404) http://127.0.0.1:5000/style.css The error is in the last line. When the appcache fails even once, it stops the process completely and the offline cache doesn't work. This is how my files are structured: sandbox offline-app offline-app.py static manifest.appcache script.js style.css templates offline-app.html This is the content of offline-app.py: from flask import Flask, render_template app = Flask(__name__) @app.route('/offline-app') def offline_app(): return render_template('offline-app.html') if __name__ == '__main__': app.run(host='0.0.0.0', debug=True) This is what I have in offline-app.html: <!DOCTYPE html> <html manifest="{{ url_for('static', filename='manifest.appcache') }}"> <head> <title>Offline App Sandbox - main page</title> </head> <body> <h1>Welcome to the main page for the Offline App Sandbox!</h1> <p>Some placeholder text</p> </body> </html> This is my manifest.appcache file: CACHE MANIFEST /style.css /script.js I've tried having the manifest file in all different ways I could think of: CACHE MANIFEST /static/style.css /static/script.js or CACHE MANIFEST /offline-app/static/style.css /offline-app/static/script.js None of these worked. The same error was returned every time. I'm certain the issue here is how the server is serving up the files listed in the manifest. Those files are probably being looked up in the wrong place, I guess. I either should place them somewhere else or I need something different in the cache manifest, but I have no idea what. I couldn't find anything online about having HTML5 offline applications with Flask. Is anyone able to help me out?

    Read the article

  • Can UMDF drivers be packaged/shipped via WiX?

    - by Rafael Rivera
    Howdy Internets: I put together a WiX 3.0 package, utilizing the DIFx extensions, with the intentions to install a Windows 7 Sensor (UMDF driver). During installation, DIFXAPP logged "No matching devices found in INF" and simply threw the driver into storage. I read I'm to populate my INF with an appropriate DriverPackageType, but according to MSDN's enumerated list, nothing fits. Is UMDF driver installation a supported scenario? If not, what's the best practice for using WiX to install such drivers? Disassembling the DIfx extension shows intent to support Co-installer packages, I have yet to try 3.5 beta.

    Read the article

  • strange behavior when changing UINavigationController backItem title

    - by Rafael
    Hi, I'm changing the back button item title in the viewDidAppear of a controller in the following way: self.navigationController.navigationBar.backItem.title = @"Previous"; It changes the tittle properly, but the I'm having a strange behaviour. When I select the "previous" button, it changes the tittle of the controller that is up in the stack (i.e the parent controller now has the title "Previous". Do you now why this happened ??? Thanks in advanced for your help.

    Read the article

  • Using Fzip lib under Adobe Air App

    - by Rafael Oliveira
    I'm currently working on a project for Adobe Air (1.5.3) and I need to unzip a file, copy some of its contents to another file. Then I saw people talking about the Fzip (http://codeazur.com.br/lab/fzip) lib. The problem is that I don't know how to "import" or use this library with Javascript and Adobe Air, since Javascript doesn't have the import directive. How can I manage to do that ?

    Read the article

  • [ipad] Is there a SDK for the photo gallery?

    - by Rafael Steil
    The "Photos.app" in iPad has a gallery that you can browse all photos, including support for slideshow and other things. I'd like to know if this API is available (aka, not private) and which one it is (so I won't need to implement one photo gallery from scratch). I looked at http://github.com/facebook/three20, but I'm not sure if it is the same thing. Thank.

    Read the article

  • Loading velocity template inside a jar file

    - by Rafael
    I have a project where I want to load a velocity template to complete it with parameters. The whole application is packaged as a jar file. What I initially thought of doing was this: VelocityEngine ve = new VelocityEngine(); URL url = this.getClass().getResource("/templates/"); File file = new File(url.getFile()); ve = new VelocityEngine(); ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "file"); ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, file.getAbsolutePath()); ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_CACHE, "true"); ve.init(); VelocityContext context = new VelocityContext(); if (properties != null) { stringfyNulls(properties); for (Map.Entry<String, Object> property : properties.entrySet()) { context.put(property.getKey(), property.getValue()); } } final String templatePath = templateName + ".vm"; Template template = ve.getTemplate(templatePath, "UTF-8"); String outFileName = File.createTempFile("p2d_report", ".html").getAbsolutePath(); BufferedWriter writer = new BufferedWriter(new FileWriter(new File(outFileName))); template.merge(context, writer); writer.flush(); writer.close(); And this works fine when I run it in eclipse. However, once I package the program and try to run it using the command line I get an error because the file could not be found. I imagine the problem is in this line: ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, file.getAbsolutePath()); Because in a jar the absolute file does not exist, since it's inside a zip, but I couldn't yet find a better way to do it. Anyone has any ideas?

    Read the article

  • NSMutableArray: count is a method or a property?

    - by Rafael Oliveira
    I want to verify if I'm in the last cell of the UITable. Should I use a NSInteger property in my controller and store the value of the count of the data (it's an NSMutableArray) that populates the table? I'm asking because I don't know if count iterates over all objects of the array to count or if it only gets me a value of a count property. What would be better ? store the value: myCount = [myArray count] use directly: [myArray count] store numberOfRows: myCount = numberOfRowsInSection:[indexPath 0] use numberOfRows directly: numberOfRowsInSection:[indexPath 0]

    Read the article

  • Help creating a ColumnName Convention using FluentNHibernate

    - by Rafael E. Belliard
    I've been trying to specify a custom naming convention for my database table columns. So far, I have been able to setup a convention for the table's name, but not the actual columns. I've seen a few guides on the internet, but they're not working using the latest Fluent NHibernate (1.0.0 RTM). public class CamelCaseSplitNamingConvention : IClassConvention, IComponentConvention { public void Apply(IClassInstance instance) { instance.Table(instance.EntityType.Name.ChangeCamelCaseToUnderscore()); } public void Apply(IComponentInstance instance) { // is this the correct call for columns? If not, which one? } } Please help.

    Read the article

  • Definition of the job titles involved in a software development process.

    - by Rafael Romão
    I have seen many job titles for people involved in a software development process, but never found a consensus about they mean. I know many of them are equivalent, and found some other questions about that here in SO, but I would like to know your definitions and comments about them. I want not only to know if there is really a consensus, but also to know if what I suppose to be a Software Architect, is really a Software Architect, and so on. The job titles I mean are: Developer; System Analyst; Programmer; Analyst Programmer; Software Engineer; Software Architect; Designer; Software Designer; Business Manager; Business Analyst; Program Manager; Project Manager; Development Manager; Tester; Support Analyst; Please, feel free to add more titles to this list in your answers. It would be very helpful.

    Read the article

  • css format file?

    - by rafael
    please give me the code. input file: #box8 { position:absolute; } #box8 .buttons { text-align:left; } output file should be like this: headers:#box8 #box8 Items:position:absolute; text-align:left;

    Read the article

  • objectWithFieldNAme Best Practice for CoreData

    - by Rafael
    Hello, I'm trying to implements some methods for my CoreData models and I'm wonndering if the way I'm doing it is a good practice. I want to implement methods of the type getObjectsWithFieldName. This methods could be used by severals views. So the way I'm doing it is implementing a Class method in the model in the following way: +(NSArray *)getObjectWithFieldName:(NSString *)fieldName andContext:(NSManagedObjectContext *) context; Is this a good practice? Or there is another way to do it for iPhone Development? Thanks in advanced.

    Read the article

  • Algorithm to distribute objects in a box (like InDesign, Illustrator, Draw!)

    - by Rafael Almeida
    I have a set of rectangles with their corresponding positions and a big rectangle which serves as the 'bounding box' for these rectangles. I would like to know of an algorithm that would 'distribute the free space' evenly among the rectangles. Some of you may be familiar with the Distribute Spacing option in Adobe InDesign and similar layout-oriented apps. That would be what I'm looking for. I did try looking it up, but I'm not familiar with 'graphical' algorithms terminology and trying only terms relating to 'distribute' mainly yields results about Distributed Computing. So, even the names of the algorithms or better terms to look up would be a big help. Finally, the algorithm doesn't need to be rigorously the same as InDesign's one: pretty much any algorithm that 'distributes' objects inside a region will work fine. In fact, since I'm striving for visual appeal mainly, the more suggestions the better. =D

    Read the article

  • How to turn dynamic URL into static URL

    - by Rafael Carvalho
    I am developing a website using PHP and Apache. I wanna turn my URLs from www.example.com/book.php?book=title into something like this, if it is possible of course: www.example.com/book/title Notice that the title of the books are unique and cannot be repeated. I`ve read about this, but none of the posts were clear enough for a beginner like me. Do you guys know any tutorial that explains that? Thanks.

    Read the article

  • Setting Back Button Tittle in Navigation Controller problem

    - by Rafael
    Hi, I'm trying to change Back Button tittle in a navigation controller in the following way: In the parent controller I put this in vieDidLoad: self.title = @"Calendars"; self.navigationItem.backBarButtonItem.title = @"Previous"; But this controller is in the stack since I initialized the app: -(void)applicationDidFinishLaunching:(UIApplication *)application{ navController.viewControllers= [NSArray arrayWithObjects:aController,aBcontroller,nil]; [window addSubview:navController.view]; } So, the viewDidLoad in aController is not called until I select the back buttom the first time in the bController... Does anyone knows how to call viewDidLoad just when I push it into the stack? Or do you know another way to change the BackButtom title? Thanks in advanced for your help.

    Read the article

  • How to sanitize log messages in Log4j to save them in database

    - by Rafael
    Hello, I'm trying to save log messages to a central database. In order to do this, I configured the following Appender in log4j's xml configuration: <appender name="DB" class="org.apache.log4j.jdbc.JDBCAppender"> <param name="URL" value="jdbc:postgresql://localhost/logging_test" /> <param name="user" value="test_user" /> <param name="password" value="test_password" /> <param name="sql" value="INSERT INTO log_messages ( log_level, message, log_date ) VALUES ( '%p', '%m', '%d{yyyy-MM-dd HH:mm:ss}' )" /> </appender> This works fine, except some of the messages contain ', and then the appender fails. Is there an easy way to do this?

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >