Search Results

Search found 128 results on 6 pages for 'felipe cardoso martins'.

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

  • When should I use static variables with primitive types?

    - by Felipe Cypriano
    Recently I came across the question NSString: Why use static over literal? and in the comments arrived a new question. In Objective-C there some "special" types that are just maps to C primitives. Like the NSInteger. #if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64 typedef long NSInteger; #else typedef int NSInteger; #endif I know how to use the static keywords for objects but I don't understand the implications on C primitive types. When should I use a static NSInteger x instead of NSInteger x? What happens with the memory in both cases?

    Read the article

  • Xcode Video From UITableView [migrated]

    - by Luis Felipe Beltran
    I have created different UITableViews. Each of these are dynamic tables that contain NSarrays of words. Right now When a cell is tabbed it takes the user to another View (simple view controller) that has a label and a UIImageview that displays a picture. My problem is that I also want to show video. Some of these words need to show pictures, and others need to show video. I have shown video before but I have done it using a button. I need help! I would appreciate if you guys could help here. Again, Im trying to show a video from a UITableView after the user tabs a cell. (I have many videos not just one, so dynamically would be better if possible)

    Read the article

  • '6' key stuck when outside the graphical interface

    - by Felipe Jacob
    A strange thing has been happening since I installed Ubuntu. Whenever I'm not on the graphical interface, that is, if I do ctrl+alt+f2, or while the system is shutting down, or when I try to reset my password accessing root on security mode, the '6' key seems to be stuck. This doesn't affect my day-to-day usage at all, but whenever I change from the graphical console, I can't do anything because it keeps pressing '666666...'. Does anyone know why that might be happening? My keyboard is a Logitech G710+, and hasn't shown any other possible compatibility issues.

    Read the article

  • Web designer help needed [closed]

    - by Felipe Caiado
    I have a ongoing problem, not knowing where to start to learn how to program websites, and which languages I should learn first, I have already taken a good look on the web, and I havn't found a clear awnser yet. Help would be much apreciated, in the cents of finding some good languages to start to program; and a good learning source such as a book or a website that covers from the basiscs to the most advanced of those languages.

    Read the article

  • What command should be used to connect via SSH through squid proxy?

    - by Raul Cardoso
    I have set up a Squid HTTP Proxy (in centOS) and intended to use it also for ssh connections. Managed to configure putty (in a windows client) to use this proxy while connecting by ssh. Confirmed in the "target host" that the ssh connection was coming from Proxy server ip instead of the windows client IP. Used: targethost: 22 for ssh proxyserv: 3128 for proxy (along with proxy credentials) I'm now having problems connecting to the "target host" using Ubuntu and the same proxy server. I have tried the following: me@mycomp:~$ connect-proxy -H test@proxyserv:3128 targethost 22 Enter proxy authentication password for test@proxyserv: SSH-2.0-OpenSSH_6.2p2 Ubuntu-6 It hangs in last line, expecting some input. All attempts resulted in a "Protocol mismatch." error. Putty successfully connects to the http proxy and sends credentials, showing me ssh login right away. - How to do (with commands in Ubuntu) the same putty does? - Is there any other way than connect-proxy command to do this? Edit: Also tried the following with same result ("Protocol mismatch") me@mycomp:~$ connect-proxy -H test@proxyserv:3128 targethost 22 ssh -l myshel_login Thanks in advance Edit: Solution details (thanks to NickW pointing the right way) installed corkscrew and added to ssh_config Host targethost ProxyCommand corkscrew proxyserv 3128 %h %p /etc/ssh/proxypass created proxypass file login:password Restarted ssh and used a simple ssh command ssh mylogin@targethost (ssh password was asked as usual)

    Read the article

  • Windows 7 PPTP VPN problem

    - by Marco Martins
    Hi, I'm currently using an win 7 as an network server at my home. I've created some shared folders wich can be accessed easily from any pc on my network (win and mac computers) recently I decided to turn on the win 7 pptp to access remotely to my server from anywhere. the problem is with that on, on my router my server ip change, acording to my ipconfig on the cmd my router gets the ip from a "PPP adapter RAS (dial in)". when that happens I cannot access to the shared files over the lan on my mac, but i can connect to the vpn but again can't access to my files. (i've tried connecting to the vpn from another network and it worked, even the file share) anyone can help me? thanks

    Read the article

  • La NSA aurait espionné l'ancien président mexicain, le gouvernement demande des explications à Washington

    La NSA aurait espionné l'ancien président mexicain, le gouvernement demande des explications à Washington Le quotidien allemand Der Spiegel a révélé que la NSA aurait réussi il y a quelques années à pirater le serveur de messagerie du gouvernement mexicain et d'accéder entre autres aux courriels de l'ancien président Felipe Calderon ainsi qu'à ceux de plusieurs collaborateurs de son cabinet. L'agence de renseignements aurait alors eu connaissance d'informations liées à la diplomatie, à l'économie...

    Read the article

  • C# Assembly not found at runtime

    - by Gustavo Cardoso
    A strange error begans to happen with my XNA project on a new pc. I have two projects on the solution and a library that is used by both of them. One of the projects, a XNA Game Project, runs perfectly. The other project is a mix of WindowsForm and XNA. The form launches a XNA class when a button is clicked. When I run the program, it works great till the moment I click the button which launch the XNA class. A FileNotFoundException is fired exactly at the moment that the constructor will be executed. System.IO.FileNotFoundException was unhandled Message="Could not load file or assembly 'Microsoft.Xna.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d' or one of its dependencies. The system cannot find the path specified." The reference is correct, there is no problem on compilation. We already tried to delete the reference and add it again but it didn't work. Everything worked correctly in others teammate's pc. Anyone has any idea what is the problem?

    Read the article

  • if_attribute sintax problem on declarative_authorization

    - by Victor Martins
    I have an Organization that has_many Affiliations And a mission that has_one Organization So i can do this: m = Mission.first m.organization.affiliations A user also has_many affiliations so I can do: u = User.first u.affiliations In declarative_authorization I want a user to be able to manage a mission if he is affiliated to the organization of the mission. I'm trying this: has_permission_on :missions, :to => [:manage] do if_attribute [:affiliations, {:mission => :organization} ] => intersects_with { user.affiliations.type_admin } end But I get the error: [:affiliations, {:mission=>:organization}] is not a symbol What's wrong with the sintax?

    Read the article

  • if_attribute on declarative authorization

    - by Victor Martins
    I have a many-to-many relationship like this: A user has_many organizations through affiliations and vice-versa. I'm using declarative organizations and I only want a user to edit a particular organization if he is affiliated and the affiliationtype attribute of affiliation is a particular value. So affiliations has 3 columns , user_id, organization_id and affiliationtype_id I can do: o = Organization.find(:first) o.affiliatons[0].user and get the user now I wish to do this: has_permission_on [:organizations], :to => :edit do if_attribute (...) end That if_attribute should see if the current user is the organization.affiliation[?].user and if the organization.affiliation[?].affiliationtype_id = "3" I hope this is syntax issue ... I really need to get this working.

    Read the article

  • Creating a second form page for a has_many relationship

    - by Victor Martins
    I have an Organization model that has_many users through affiliations. And, in the form of the organization ( the standard edit ) I use semanting_form_for and semantic_fields_for to display the organization fields and affiliations fields. But I wish to create a separete form just to handle the affiliations of a specific organization. I was trying to go to the Organization controller and create a an edit_team and update_team methods then on the routes create those pages, but it's getting a mess and not working. am I on the right track?

    Read the article

  • if_attribute on declarative authorization. STUCK FOR DAYS!!!

    - by Victor Martins
    I can't seem to find a solution for this problem :s I have a many to many relationship like this: A user has_many organizations through affiliations and vice versa. I'm using declarative organizations and I only want a user to edit a particular organization if he is affiliated and the affiliationtype attribute of affiliation is a particular value. So affiliations has 3 columns , user_id, organization_id and affiliationtype_id I can do: o = Organization.find(:first) o.affiliatons[0].user and get the user now I wish to do this: has_permission_on [:organizations], :to => :edit do if_attribute (...) end That if_attribute should see if the current user is the organization.affiliation[?].user and if the organization.affiliation[?].affiliationtype_id = "3" I hope this is syntax issue ... I really need to get this working. Thanks in advance.

    Read the article

  • if_attribute syntax problem on declarative_authorization

    - by Victor Martins
    I have an Organization that has_many Affiliations And a mission that has_one Organization So i can do this: m = Mission.first m.organization.affiliations A user also has_many affiliations so I can do: u = User.first u.affiliations In declarative_authorization I want a user to be able to manage a mission if he is affiliated to the organization of the mission. I'm trying this: has_permission_on :missions, :to => [:manage] do if_attribute [:affiliations, {:mission => :organization} ] => intersects_with { user.affiliations.type_admin } end But I get the error: [:affiliations, {:mission=>:organization}] is not a symbol What's wrong with the syntax?

    Read the article

  • Validate a belongs to association in a build situation.

    - by Victor Martins
    I have a Mission model that has_many Task, and the Task belongs_to Mission For security I've made this validation on the Task Model: validates_presence_of :mission_id validates_numericality_of :mission_id But the problem is that when create a Mission and add tasks like this: @mission.tasks.build The validation returns error, because the mission id on the task is null ( the mission wasn't yet created ) If I delete the validation, the Mission and Task is created successfuly, but how can I keep the validation and still have this work? I could do a callback after the save, but I don't think that's right, because I don't want to save Tasks without a mission_id. P.S. I'm hidding my mission field on the form. If I have it visible, it will show the currect mission and everything is ok. But if I hidde it the error happens. <%= f.hidden_field :mission, :label => "Missão" %> Is the form reseting the attributes given by the controller on the new action?

    Read the article

  • NSTableView handling edititng cells correctly

    - by Martins
    Hi All, I have an NSTableView working correctly except when I'm editing one of the table items. If the user is still in edit mode, and it presses the Sheet OK button, the tableiew doesn't update. How do I force the tableview to commit the changes when the user press the ok button (closesheet). Also, how do I handle the ESC Key to cancel the editing? Sorry if the questions looks absurd, but I've been only on developing on Mac for a month.

    Read the article

  • Rspec Faker has_one fail in view

    - by Victor Martins
    I' trying to fix this for hours... I have this on a controller rspec test: it "show action should render show template" do task = Task.make task.mission = Mission.make get :show, :id => task response.should render_template(:show) end But it fails rendering the view because of this: <%=h @task.mission.name %> I don't get it... :/

    Read the article

  • Rails Layout Rendering with controller condition

    - by Victor Martins
    I don't know what's the best way to doing this. On my application.html.erb I define a header div. My default controller ( root ) is a homepage controller. And I wish that if I'm at index of the homepage the header is rendering with some content, but all other controllers render another content inside that header. How can I make a condition in that header div to render different content based on the controller that's being rendered?

    Read the article

  • Routing is using ID has action and action has ID after submitting a form

    - by Victor Martins
    I have a model User that has_one user_profile and a User_Profile belongs_to user in the User controller I have: def personal @user = User.find_by_id(params[:id]) @user_profile = @user.user_profile @user_profile ||= @user.build_user_profile end def update_personal @user = User.find_by_id(params[:id]) if @user.user_profile.update_attributes(params[:user_profile]) flash[:notice] = "OK" redirect_to @user else flash[:notice] = "Fail" render :action => 'update_personal' end end In my personal.html.erb view I have: <% semantic_form_for @user_profile, :url => { :action => "update_personal"} do |form| %> <%= form.inputs %> <%= form.buttons %> <%end%> And on the rountes I have: map.resources :users, :member => { :personal => :get, :update_personal => :put } Now the strange thing is that I can do: users/1/personal to see the form but when I submit I get this error: Unknown action No action responded to 1. It's trying to find an action with the name 1. Can anyone point me out on the right direction?

    Read the article

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