Search Results

Search found 260 results on 11 pages for 'gabriel l oliveira'.

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

  • Where should libraries be placed, in windows?

    - by Gabriel Diaconescu
    I have just moved from Linux to Windows, and I have to use the Zend Framework library. Where should the library be placed? Directly on C drive Create a lib folder like C:/lib/ Create a lib folder in my user folder I am wondering if there is a classic folder where these kind of libraries are placed. Update:I am asking about the location on my own standpoint. The Zend Framework library is a PHP framework.

    Read the article

  • Shouldn't we count characters of code and comments instead of lines of code and comments? [closed]

    - by Gabriel
    Counting lines of code and comments is sometimes bogus, since most of what we write may be written in one or more lines, depending column count limitations, screen size, style and so forth. Since the commonly used languages (say C, C++, C# and Java) are free-form, wouldn't it be more clever to count characters instead? Edit: I'm not considering LOC-oriented programming where coders try to artificially match requirements by adding irrelevant comments or using multiple lines where less would be enough (or the opposite). I'm interested in better metrics that would be independent of coding style, to be used by honest programmers.

    Read the article

  • is there a formal algebra method to analyze programs?

    - by Gabriel
    Is there a formal/academic connection between an imperative program and algebra, and if so where would I learn about it? The example I'm thinking of is: if(C1) { A1(); A2(); } if(C2) { A1(); A2(); } Represented as a sum of terms: (C1)(A1) + (C1)(A2) + (C2)(A1) + (C2)(A2) = (C1+C2)(A1+A2) The idea being that manipulation could lead to programatic refactoring - "factoring" being the common concept in this example.

    Read the article

  • How can I get started using TDD to code some simple functionality?

    - by Gabriel
    I basically have the gist of TDD. I'm sold that it's useful and I've got a reasonable command of the MSTEST framework. However, to date I have not been able to graduate to using it as a primary development method. Mostly, I use it as a surrogate for writing console apps as test drivers (my traditional approach). The most useful thing about it for me is the way it absorbs the role of regression testing. I have not yet built anything yet that specifically isolates various testable behaviors, which is another big part of the picture I know. So this question is to ask for pointers on what the first test(s) I might write for the following development task: I want to produce code that encapsulates task execution in the fashion of producer/consumer. I stopped and decided to write this question after I wrote this code (wondering if I could actually use TDD for real this time) Code: interface ITask { Guid TaskId { get; } bool IsComplete { get; } bool IsFailed { get; } bool IsRunning { get; } } interface ITaskContainer { Guid AddTask(ICommand action); } interface ICommand { string CommandName { get; } Dictionary<string, object> Parameters { get; } void Execute(); }

    Read the article

  • Stop KDE services from running

    - by Gabriel
    I recently installed KDE with the command sudo apt-get install kubuntu-desktop. Now whenever I log into Unity I can see KDE-related services running in the background and I see no obvious way to prevent them from opening at startup. I checked bum but I see nothing there. These are the services I see running right now: kde4 klauncher knotify4 These ones I can identify as being related to KDE given their names, but there could be more. How can I prevent these services from launching by themselves? I should mention I often use KDE applications such as kate, okular and kile. Could these be responsible for opening those services?

    Read the article

  • Two graphical entities, smooth blending between them (e.g. asphalt and grass)

    - by Gabriel Conrad
    Supposedly in a scenario there are, among other things, a tarmac strip and a meadow. The tarmac has an asphalt texture and its model is a triangle strip long that might bifurcate at some point into other tinier strips, and suppose that the meadow is covered with grass. What can be done to make the two graphical entities seem less cut out from a photo and just pasted one on top of the other at the edges? To better understand the problem, picture a strip of asphalt and a plane covered with grass. The grass texture should also "enter" the tarmac strip a little bit at the edges (i.e. feathering effect). My ideas involve two approaches: put two textures on the tarmac entity, but that involves a serious restriction in how the strip is modeled and its texture coordinates are mapped or try and apply a post-processing filter that mimics a bloom effect where "grass" is used instead of light. This could be a terrible failure to achieve correct results. So, is there a better or at least a more obvious way that's widely used in the game dev industry?

    Read the article

  • Bricscad V12 on ubuntu 11.10!

    - by gabriel
    i tried to install bricscad from the deb file but is for 32bit systems.So i had problems and i downloaded the .tgz file and ran tar -xvf and i was in the directory /opt/bricsys/bricscad/v12 So i managed to run bricscad with the command sudo sh bricscad.sh in the directory this.So my question is, do you have any idea of how to make a launcher or smthing so i can run the program from an easier way?I cannot find it in dash(unity) or in the desktop. Any help will be great! Thanks

    Read the article

  • Can't login to Ubuntu One

    - by Gabriel
    I uninstalled Ubuntu One about two months ago and now I re-installed it. I can still login with my account through the site (Ubuntu One) but the client keeps telling me "The authentication failed". If I try to use the Recover password option it also fails with telling me that my email address is not recognized (while I can use it with zero issues through the site) If I attempt to create a new account from the client, it also fails to load the captcha every time. Something is clearly broken here but I can't figure out what it is. Any ideas?

    Read the article

  • Is there a jQuery lightbox plugin that has thumbnails inside the box?

    - by Gabriel
    I'm trying to find a lightbox style plugin in jQuery that displays thumbnails at the bottom of the picture (or video, or whatever). I found plenty of lightbox plugins, but none that allows navigation by thumbnail inside the box. The plugin must be able to open images, swf and inline content. I realize that jQuery will not be able to generate the thumbnails and that's ok. Do you have any good ones to suggest? Thanks

    Read the article

  • How do you proactively guard against errors of omission?

    - by Gabriel
    I'll preface this with I don't know if anyone else who's been programming as long as I have actually has this problem, but at the very least, the answer might help someone with less xp. I just stared at this code for 5 minutes, thinking I was losing my mind that it didn't work: var usedNames = new HashSet<string>(); Func<string, string> l = (s) => { for (int i = 0; ; i++) { var next = (s + i).TrimEnd('0'); if (!usedNames.Contains(next)) { return next; } } }; Finally I noticed I forgot to add the used name to the hash set. Similarly, I've spent minutes upon minutes over omitting context.SaveChanges(). I think I get so distracted by the details that I'm thinking about that some really small details become invisible to me - it's almost at the level of mental block. Are there tactics to prevent this? update: a side effect of asking this was fixing the error it would have for i 9 (Thanks!) var usedNames = new HashSet<string>(); Func<string, string> name = (s) => { string result = s; if(usedNames.Contains(s)) for (int i = 1; ; result = s + i++) if (!usedNames.Contains(result)) break; usedNames.Add(result); return result; };

    Read the article

  • Customizing Texmaker

    - by Gabriel Furstenheim
    I use LaTeX a lot but I find quite obnoxious all the crappy files it leaves behind when you compile: .aux, .log... Fortunately TeXMaker has the option "clean" that deletes all of these. However, I don't like having to remember to click on it every time I'm going to close a document, ie I'd like a button that both closes a document and cleans all that stuff. Any hint as how to do it? I suppose if I knew how to access the program code I'd be able to do it as I'd just have to put together two options that already exist. Thanks

    Read the article

  • How to deal with elimination of duplicate logic vs. cost of complexity increase?

    - by Gabriel
    I just wrote some code that is very representative of a recurring theme (in my coding world lately): repeated logic leads to an instinct to eliminate duplication which results in something that is more complex the tradeoff seems wrong to me (the examples of the negative side aren't worth posting - but this is probably the 20th console utility I've written in the past 12 months). I'm curious if I'm missing some techniques or if this is really just on of those "experience tells you when to do what" type of issues. Here's the code... I'm tempted to leave it as is, even though there will be about 20 of those if-blocks when I'm done. static void Main(string[] sargs) { try { var urls = new DirectTrackRestUrls(); var restCall = new DirectTrackRestCall(); var logger = new ConsoleLogger(); Args args = (Args)Enum.Parse(typeof(Args), string.Join(",", sargs)); if (args.HasFlag(Args.Campaigns)) { var getter = new ResourceGetter(logger, urls.ListAdvertisers, restCall); restCall.UriVariables.Add("access_id", 1); getter.GotResource += new ResourceGetter.GotResourceEventHandler(getter_GotResource); getter.GetResources(); SaveResources(); } if (args.HasFlag(Args.Advertisers)) { var getter = new ResourceGetter(logger, urls.ListAdvertisers, restCall); restCall.UriVariables.Add("access_id", 1); getter.GotResource += new ResourceGetter.GotResourceEventHandler(getter_GotResource); getter.GetResources(); SaveResources(); } if (args.HasFlag(Args.CampaignGroups)) { var getter = new ResourceGetter(logger, urls.ListCampaignGroups, restCall); getter.GotResource += new ResourceGetter.GotResourceEventHandler(getter_GotResource); getter.GetResources(); SaveResources(); } } catch (Exception e) { Console.WriteLine(e.InnerException); Console.WriteLine(e.StackTrace); }

    Read the article

  • Google I/O 2012 - Multi-Versioning Android User Interfaces

    Google I/O 2012 - Multi-Versioning Android User Interfaces Bruno Oliveira, Adam Powell This session will show you how to build user interfaces that work consistently across Android versions, from Eclair to today. We'll cover topics including the Action Bar, Fragments, style, size qualifiers, app structure, and navigation. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1533 51 ratings Time: 48:22 More in Science & Technology

    Read the article

  • Finding App Id under .ipa or .app

    - by Rafael Oliveira
    I'm building an application that search and recognizes any iPhone apps that user has in his/her computer. I would like to know a way to "extract" the id of the application from the .ipa file. I was trying to do the recognition using only the App File Name, but I discovered that the File Name is not the name of the app in Apple Store. Live Poker 6K Free by Zynga != Live Poker 3.7.ipa The id i'm talking about is the app id, like in, http://itunes.apple.com/app/live-poker-6k-free-by-zynga/id354901953?mt=8 the id is 354901953. Does any body has a clue how can I manage to find this information?

    Read the article

  • Rails validation error messages: Displaying only one per field

    - by Sergio Oliveira Jr.
    Rails has an annoying "feature" which displays ALL validation error messages associated with a given field. So for example if I have 3 validates_XXXXX_of :email, and I leave the field blank I get 3 messages in the error list. This is non-sense. It is better to display one messages at a time. If I have 10 validation messages for a field does it mean I will get 10 validation error messages if I leave it blank? Is there an easy way to correct this problem? It looks straightforward to have a condition like: If you found an error for :email, stop validating :email and skip to the other field. Ex: validates_presence_of :name validates_presence_of :email validates_presence_of :text validates_length_of :name, :in = 6..30 validates_length_of :email, :in = 4..40 validates_length_of :text, :in = 4..200 validates_format_of :email, :with = /^([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})$/i <%= error_messages_for :comment % gives me: 7 errors prohibited this comment from being saved There were problems with the following fields: Name can't be blank Name is too short (minimum is 6 characters) Email can't be blank Email is too short (minimum is 4 characters) Email is invalid Text can't be blank Text is too short (minimum is 4 characters)

    Read the article

  • UINavigationBar is getting buttons from another view

    - by Rafael Oliveira
    I have three Views, Splash, Login and List. From Splash I just wait and then Push Login View, with the Navigation Bar hidden. In Login I Show the NavigationBar, hide the BackButton1 and add a new RightButton1, then I check if Settings.bundle "login" and "pass" are set. If so, I push List View. Otherwise I stay in the Login view waiting for the user to fill the form and press a button. In List View I add a new RightButton2 and a new BackButton2. The problem is that if Settings.bundle data is not null, and in Login View I quickly push List View the RightButton1 appears in List View, or no buttons appear at all, or only BackButton2 doesn't appear... The most strange thing of all is that everything was OK and all of sudden it started to get messy. Login View: // Making the Navigation Bar Visible [self.navigationController setNavigationBarHidden:NO animated:NO]; // Hiding the Back Button in THIS view (Login) [self.navigationItem setHidesBackButton:YES]; // Inserting the Logout Button for the Next View (List) UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStylePlain target:nil action:nil]; self.navigationItem.backBarButtonItem = backButton; [backButton release]; UIBarButtonItem* newAccountButton = [[UIBarButtonItem alloc] initWithTitle:@"New Account" style:UIBarButtonItemStylePlain target:self action:@selector(newAccountButtonPressed)]; self.navigationItem.rightBarButtonItem = newAccountButton; [newAccountButton release]; List View // Making the Navigation Bar Visible [self.navigationController setNavigationBarHidden:NO animated:NO]; UIBarButtonItem* aboutButton = [[UIBarButtonItem alloc] initWithTitle:@"About" style:UIBarButtonItemStylePlain target:self action:@selector(aboutButtonPressed)]; self.navigationItem.rightBarButtonItem = aboutButton; [aboutButton release]; Any ideas ?

    Read the article

  • Creating spotlight in OpenGL scene

    - by Victor Oliveira
    Im studying OpenGL and trying to create a spot light at my application. The code that Im using for my #vertex-shader is below: #:vertex-shader #{ #version 150 core in vec3 in_pos; in vec2 in_tc; out vec2 tc; glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, 20.0f); GLfloat spot_direction[] = { -1.0, -1.0, 0.0 }; glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, spot_direction); glEnable(GL_LIGHT0); void main() { vec4 pos= vec4(vec3(1.0)*in_pos - vec3(1.0), 1.0); pos.z=0.0; gl_Position = pos; tc = in_tc; } } The thing is, everytime Im trying to run the code an Error that says: Type: other, Source: api, ID: 131169, Severity: low Message: Framebuffer detailed info: The driver allocated storage for renderbuffer 1. len = 157, written = 0 failed to compile vertex shader of deferred: directional info log for shader deferred: directional vertex info log for shader deferred: directional: ERROR: Unbound variable: when Specifications: Renderer: GeForce GTX 580/PCIe/SSE2 Version: 3.3.0 NVIDIA 319.17 GLSL: 3.30 NVIDIA via Cg compiler Status: Using GLEW 1.9.0 1024 x 768 OS: Linux debian I guess to create this spotlight is pretty much simple, but since Im really new to OpenGL I dont have a clue how to do it until now, even reading sources like: http://www.glprogramming.com/red/chapter05.html#name3 Read also in some place that light spots can get really hard to understand, but I cant avoid this step right now since Im following my lecture schedule. Could anybody help me?

    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

  • 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

  • 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

  • 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

  • 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

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