Search Results

Search found 165 results on 7 pages for 'raphael oliveira'.

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

  • Tool for debugging KVO/Bindings in Cocoa

    - by Raphael Sebbe
    Is there any tool to log current observers of a given object, in the spirit of what "gdb info gc-roots" does? I found "gdb info gc-references" could do that (sort of) as a by-product of its original purpose, but that won't work with non garbage collected apps. Thanks!

    Read the article

  • Using layout view in Express with Consolidate and Mustache

    - by Raphael Caixeta
    I just started going through Node using Express and finally got Consolidate JS working properly to use Mustache as the templating view system per the instructions on the Consolidate JS Github page. Mustache is loading properly, but I'm now wondering how to include the layout file along in the rendering of the template. The default Jade system loads the content of the .render method inside of the layout.jade file. I'm just wondering how to do the same, but with Mustache. Any help is greatly appreciated! Code: index.js exports.index = function(req, res){ res.render('index', { title: "Work pl0x?" }); }); index.mustache Welcome to {{title}} I just want the index.mustache content to come in the "{{content}}" portion of the code below (layout.mustache). How can I do this? <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8" /> <title>Project Name | {{title}}</title> <link href="/stylesheets/style.css" rel="stylesheet" /> </head> <body> {{content}} </body> </html>

    Read the article

  • Iphone - UITextView Memory-leak

    - by Raphael Pinto
    I have a memory leak when i use a UITextView but I don't understand why : UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(20, 160, 280, 150)]; textView.text = @"Hello World"; textView.editable = FALSE; [self.view addSubview:textView]; [textView release]; Is someone could help me? :S

    Read the article

  • Shell how configure command to always work with some params?

    - by Gabriel L. Oliveira
    Hi. I want to know how to configure your environment to execute some command with specific params everytime you use it. So, if I have a command named: spec I want to know where I configure my bash to always use: spec -c --format nested instead of just 'spec' I tried to put this like an alias on my .bashrc file, like: alias spec='spec -c --format pretty' but didn't work. Any tip?

    Read the article

  • Rails route, show all elements on the same page

    - by Igor Oliveira Antonio
    I need to show all my elements on the same page. In routes: namespace :nourishment do resources :diets do resources :nourishment_meals, :controller => 'meals' get 'nourishment_meals/show_all_meals' => 'meals#show_all_meals', as: "show_all_meals" end end which will generate: nourishment_diet_nourishment_meals_path GET /nourishment/diets/:diet_id/nourishment_meals(.:format) nourishment/meals#index POST /nourishment/diets/:diet_id/nourishment_meals(.:format) nourishment/meals#create new_nourishment_diet_nourishment_meal_path GET /nourishment/diets/:diet_id/nourishment_meals/new(.:format) nourishment/meals#new edit_nourishment_diet_nourishment_meal_path GET /nourishment/diets/:diet_id/nourishment_meals/:id/edit(.:format) nourishment/meals#edit nourishment_diet_nourishment_meal_path GET /nourishment/diets/:diet_id/nourishment_meals/:id(.:format) nourishment/meals#show PATCH /nourishment/diets/:diet_id/nourishment_meals/:id(.:format) nourishment/meals#update PUT /nourishment/diets/:diet_id/nourishment_meals/:id(.:format) nourishment/meals#update DELETE /nourishment/diets/:diet_id/nourishment_meals/:id(.:format) nourishment/meals#destroy [**THIS**] nourishment_diet_show_all_meals_path GET /nourishment/diets/:diet_id/nourishment_meals/show_all_meals(.:format) nourishment/meals#show_all_meals The problem, when I do this: <%= link_to "Show all meals", nourishment_diet_show_all_meals_path, :class=>"button green" %> This error raise: Problem: Document(s) not found for class NourishmentMeal with id(s) show_all. Summary: When calling NourishmentMeal.find with an id or array of ids, each parameter must match a document Can someone help me?

    Read the article

  • Using attr_accessible in a join model with has_many :through relationship

    - by Paulo Oliveira
    I have a USER that creates a COMPANY and become an EMPLOYEE in the process. The employees table has an :user_id and a :company_id. class User has_many :employees has_many :companies, :through => :employees class Employee belongs_to :user belongs_to :company attr_accessible :active class Company has_many :employees has_many :users, :through => employees Pretty basic. But here's the thing, the resource EMPLOYEE has other attributes than its foreign keys, like the boolean :active. I would like to use attr_accessible, but this causes some problems. The attribute :user_id is set right, but :company_id is nil. @user.companies << Company.new(...) Employee id:1 user_id:1 company_id:nil So my question is: if :user_id is set right, despite it is not an attr_accessible, why :company_id isn't set right just the same? It shouldn't be an attr_accessible. I'm using Rails 3.0.8, and have also tested with 3.0.7.

    Read the article

  • Saving a bitmap to a Memorystream produces an inverted colors image

    - by Raphael
    I've created an image with GDI+ on my application and now I must convert this image to an array of bytes. My first thought was this simple code: public byte[] ToByte() { MemoryStream ms = new MemoryStream(); bitmap.Save(ms, ImageFormat.Bmp); return ms.GetBuffer(); } The problem with this approach is that when I finally save this image into a file the colors are inverted. What I'm I doing wrong?

    Read the article

  • SimpleXML adding html into Hash tree

    - by Miriam Raphael Roberts
    Question: I have an xml file that I am pulling from the web and parsing. One of the items in the xml is a 'content' value that has HTML. I am using SimpleXML/XMLin to parse the file like so: $xml= eval { $data-XMLin($xmldata, forcearray = 1, suppressempty= +'') }; When I use Dumper to dump the hash, I dsicovered that SimpleXML is parsing the HTML into the hash tree. 'content' => { 'div' => [ { 'xmlns' => 'http://www.w3.org/1999/xhtml', 'p' => [ { 'a' => [ { 'href' => 'http://miamiherald.typepad.com/.a/6a00d83451b26169e20133ec6f4491970b-pi', 'style' => 'FLOAT: left', 'img' => [ etc..... This is not what I want. I want to just grab content inside of this entry. How do I do this?

    Read the article

  • Cucumber - How configure it to use "--format pretty" as default?

    - by Gabriel L. Oliveira
    I'm starting learning rails, and having some troubles on configure cucumber to run my bdd tests. What I want is run cucumber features and this translate to cucumber features --format pretty I tried to do this editing the config/cucumber.yml file (on a rails project). Edited the line: default: <%= std_opts % features resulting on: default: <%= std_opts % --format pretty features But it make some erros happen: Using the default profile... All but one formatter must use --out, only one can print to each stream (or STDOUT) (RuntimeError) What I can do to make this option "--format pretty" default? Also, is there any other good option to put as default to make result more clear? Thank you.

    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

  • Database time data retrieval, time based queries

    - by Raphael Pineda
    I am new to time manipulation or time arithmetic operations and am currently developing a navigation system with Web server based information and currently I have this Database that contains a table peek hours whose columns are id, start_time, end_time , edge_id, day_of_the_week, edge_weight ------------------------------------------------------------------------ | Peek Hours | ------------------------------------------------------------------------ | | | | | | | | id | start_time | end_time | edge_id | day_of_the_week | edge_weight | | | | | | | | ------------------------------------------------------------------------ I am using PHP as a webservice and so based on the current time i want to get all the records that would fit this equation start_time< current_time < end_time

    Read the article

  • Gnome Desktop Icons Alignment

    - by Gabriel L. Oliveira
    Hi all. It has been a long time since I started to compare the gnome desktop to the windows desktop. But since I began to use linux, I realized that the "gnome way" to align the icons on Desktop is not that nice for me. And comparing to Windows's way, windows is better for me. (remember, for me). I'd like to know if anyone has some tip to make "gnome desktop icon alignment" more like windows do. I tried to reduce the icon's size, did something, but was not that all. So, could anyone tell another tip? I like when I put something on windows desktop, and wherever I put the file, Windows organize the file and put the icon right after the last icon (in a cascade style) (and automatically). Any tips?

    Read the article

  • How to detect application préference changes.

    - by Raphael Pinto
    I created a Settings.bundle in my app where the user can change some properties like font size. It works. But when I leave my App, and I change my setting, I don't know how I can get notified of the change. For the moment, I create a function call each time a view is loaded that check for app settings. But I wonder if there is an other and proper way to do this.

    Read the article

  • Shell - How to find directory of some command?

    - by Gabriel L. Oliveira
    I know that when you are on shell, the only commands that can be used are the ones that can be found on some directory set on PATH. Even I don't know how to see what dirs are on my PATH variable (and this is another good question that could be answered), what I'd like to know is: I come to shell and write: $ lshw I want to know a command on shell that can tell me WHERE this command is located. In other words, where this "executable file" is located? Something like: $ location lshw /usr/bin Anyone?

    Read the article

  • Rhino Mocks - Do we really need stubs?

    - by Marcelo Oliveira
    If it's possible to change mock behaviour in Rhino Mocks using mock.Stub().Return(), why do we need Stubs anyway? What do we lose by always using MockRepository.GenerateMock()? One big benefit of using Mocks instead of Stubs is that we will be able to reuse the same instance among all the tests keeping them cleaner and straightforward. The moq framework works in a similar way... we don't have different objects for mocks and stubs. (please, don't answer with a link to Fowler's "Mocks aren't stubs" article)

    Read the article

  • Python: Pass parameter one time, but use more times

    - by Gabriel L. Oliveira
    I'm trying to do this: commands = { 'py': 'python %s', 'md': 'markdown "%s" "%s.html"; gnome-open "%s.html"', } commands['md'] % 'file.md' But like you see, the commmands['md'] uses the parameter 3 times, but the commands['py'] just use once. How can I repeat the parameter without changing the last line (so, just passing the parameter one time?)

    Read the article

  • Pass parameter one time, but use more times

    - by Gabriel L. Oliveira
    I'm trying to do this: commands = { 'py': 'python %s', 'md': 'markdown "%s" "%s.html"; gnome-open "%s.html"', } commands['md'] % 'file.md' But like you see, the commmands['md'] uses the parameter 3 times, but the commands['py'] just use once. How can I repeat the parameter without changing the last line (so, just passing the parameter one time?)

    Read the article

  • UITextField start at end of text

    - by Raphael Pinto
    I created an UITextField in my App. This text field display a long text. The problem is that when I first open the view containing the UITextField, it is automaticaly show the end of my text. But I want it to show the begining. I read the UITextFiled Class Reference on Apple dev center, but nothing seem to allow me to change it. How can I do?

    Read the article

  • Error when creating an image from a UIView

    - by Raphael Pinto
    Hi, I'm creating an image from a view whith the folowing code : UIGraphicsBeginImageContext(myView.bounds.size); [myView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); The image is created in the user album but in the consol I get this : 2010-05-11 10:17:17.974 myApp[3875:1807] sqlite error 8 [attempt to write a readonly database] 2010-05-11 10:17:18.014 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3d87f 0x34e3b029 0x34e3b22b 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.077 myApp[3875:1807] sqlite error 8 [attempt to write a readonly database] 2010-05-11 10:17:18.087 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3b053 0x34e3b22b 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.091 myApp[3875:1807] sqlite error 8 [attempt to write a readonly database] 2010-05-11 10:17:18.095 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3b085 0x34e3b22b 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.111 myApp[3875:1807] sqlite error 1 [SQL logic error or missing database] 2010-05-11 10:17:18.115 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3d87f 0x34e3b029 0x34e3b4dd 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.120 myApp[3875:1807] sqlite error 1 [SQL logic error or missing database] 2010-05-11 10:17:18.124 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3b053 0x34e3b4dd 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.129 myApp[3875:1807] sqlite error 1 [cannot commit - no transaction is active] 2010-05-11 10:17:18.133 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3b085 0x34e3b4dd 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 I don't know where the problem come from. Can you help me?

    Read the article

  • [MySQL] Load data from .csv applying regex before insert into table

    - by Gabriel L. Oliveira
    I know that there is a code to import .csv data into a mysql table, and I'm using this one: LOAD DATA INFILE "file.csv" INTO TABLE foo FIELDS TERMINATED BY "," LINES TERMINATED BY "\\r\\n"; The data inside this .csv are lines like this example: 08/e0/Breast_Cancer_Res_2001_Nov_2_3(1)_55-60.tar.gz Breast Cancer Res. 2001 Nov 2; 3(1):55-60 PMC13900 b0/ac/Breast_Cancer_Res_2001_Nov_9_3(1)_61-65.tar.gz Breast Cancer Res. 2001 Nov 9; 3(1):61-65 PMC13901 I just want the first part (the .tar.gz path), always on the pattern (letter or number)(letter or number) / (letter or number)(letter or number)/... and the part starting by 'PMC', always on the pattern PMC(number...) where 'number' means a number between 0 to 9 and a letter means a letter between a to z (both upper and lower case) So, applying the LOAD DATA, and the regex, and inserting the result entries on my sql table, the result table should be: 1 08/e0/Breast_Cancer_Res_2001_Nov_2_3(1)_55-60.tar.gz PMC13900 2 b0/ac/Breast_Cancer_Res_2001_Nov_9_3(1)_61-65.tar.gz PMC13901 What should be the SQL command to do all this?

    Read the article

  • How to make the TextView invisible when there are items in listView?

    - by Raphael Thomas Liewl
    I like to display textView when there are no items in the listView whereas the textView will not display when there are items in the listView. My problem is even there are items in the listView, the textView still will be displayed in a short time and then load the items into listView. So, how to make the TextView invisible when there are items in listView? Here is the codes: public void onCreate(Bundle savedInstancesState){ super.onCreate(savedInstancesState); setContentView(R.layout.list_screen); user = getIntent().getExtras().getString("user"); Log.d("dg",user); getList(); lv = (ListView) findViewById(android.R.id.list); emptyText = (TextView)findViewById(android.R.id.empty); lv.setEmptyView(emptyText); } list_screen.xml <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ListView android:id="@+id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <TextView android:id="@+id/android:empty" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/no_friend" android:gravity="center_vertical|center_horizontal"/> </LinearLayout>

    Read the article

  • Listing known CSS classes using Javascript

    - by Fred Oliveira
    I'm trying to find a good way to collect the names of classes defined in the stylesheets included with a given document. I know about document.StyleSheetList but it doesn't seem like it'd be easy to parse. What I'm looking for is something like, for a stylesheet document such as: .my_class { background: #fff000; } .second_class { color: #000000; } I could extract an array like ["my_class", "second_class"]. This obviously assumes the favorable scenario of a fully loaded dom and stylesheets. I've been looking everywhere for a good way to do something like this and so far, have made little progress. Does anyone have any idea about how to pull this off? Thanks!

    Read the article

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