Search Results

Search found 370 results on 15 pages for 'victor rodriguez'.

Page 12/15 | < Previous Page | 8 9 10 11 12 13 14 15  | Next Page >

  • Load a list of localized strings at once in IOS

    - by Victor Ronin
    I want to show a table with the list of strings which are localized. The straightforward method would be: a) Point data source to my ViewController b) Define an array c) Allocate the array in my ViewController and init (arrayWithObjects) it with the strings from localized resources (NSLocalizedString) d) Use this array in UITableViewDataSource delegated methods Mainly my concern is item b). The construction looks quite heavy and I wonder whether I can somehow specify and load whole list of localized string at once.

    Read the article

  • Verifying compiler optimizations in gcc/g++ by analyzing assembly listings

    - by Victor Liu
    I just asked a question related to how the compiler optimizes certain C++ code, and I was looking around SO for any questions about how to verify that the compiler has performed certain optimizations. I was trying to look at the assembly listing generated with g++ (g++ -c -g -O2 -Wa,-ahl=file.s file.c) to possibly see what is going on under the hood, but the output is too cryptic to me. What techniques do people use to tackle this problem, and are there any good references on how to interpret the assembly listings of optimized code or articles specific to the GCC toolchain that talk about this problem?

    Read the article

  • Convert image color space and output separate channels in OpenCV

    - by Victor May
    I'm trying to reduce the runtime of a routine that converts an RGB image to a YCbCr image. My code looks like this: cv::Mat input(BGR->m_height, BGR->m_width, CV_8UC3, BGR->m_imageData); cv::Mat output(BGR->m_height, BGR->m_width, CV_8UC3); cv::cvtColor(input, output, CV_BGR2YCrCb); cv::Mat outputArr[3]; outputArr[0] = cv::Mat(BGR->m_height, BGR->m_width, CV_8UC1, Y->m_imageData); outputArr[1] = cv::Mat(BGR->m_height, BGR->m_width, CV_8UC1, Cr->m_imageData); outputArr[2] = cv::Mat(BGR->m_height, BGR->m_width, CV_8UC1, Cb->m_imageData); split(output,outputArr); But, this code is slow because there is a redundant split operation which copies the interleaved RGB image into the separate channel images. Is there a way to make the cvtColor function create an output that is already split into channel images? I tried to use constructors of the _OutputArray class that accepts a vector or array of matrices as an input, but it didn't work.

    Read the article

  • What should I read to improve my C++ style

    - by Victor Ronin
    I was developing for quite long time already on C/C++ (mostly C, which makes style poorer). So, I know how to use it. However, quite often I stuck with style decisions like: - should I return error code here, throw exceptions, return error through a parameter - should I have all this stuff in constructor or should I create separate init function for that. and so on. Any solutions WILL work. However, each of them has cons and pros, which I know and most importantly which I don't know. It would be very nice to read something regarding overall C++ development style, coding practices and so forth. What do you recommend?

    Read the article

  • saving nested attributes

    - by Victor Martins
    I have a form that has a nested form like this: <%- for subscription in @task.subscriptions -% <%- semantic_fields_for "task[subscription_attributes][]", subscription do |subscription_form|% <%- subscription_form.inputs do -% <%= subscription_form.input :workhours, :label = subscription.user.full_name% <%- end -% <%- end -% <%- end -% And on the task model I have: accepts_nested_attributes_for :subscriptions attr_accessible :mission_id, :statuscode_id, :name, :objectives, :start_at , :end_at, :hours, :testimony ,:subscriptions_attributes In the form (view) I get the correct values on the workhours fields. But when I change the values and hit the submit button, the values are never changed. I can't figure out why...

    Read the article

  • Authentication in Rails, where to start?

    - by Victor P
    Hello. Im learning Rails by building apps. I want to make my first authenticated app: users signup, login, do some changes in models they have access to and logout. I did the Google search but it is quite confusing: many plugins, many tutorials. Don't know where to start. Is there a state-of-the-art authentication method for Rails? What do you use in Production to authenticate your users? Any help in this will be helpful. Thanks

    Read the article

  • Java: BufferedImage from raw BMP file format data

    - by Victor
    Hello there. I've got BMP file's raw pixels table in byte[], it's structure is: (b g r) (b g r) ... (b g r) padding ... (b g r) (b g r) ... (b g r) padding Where r, g, b are byte each, padding is to round row length up to a multiple of 4 bytes. So, how can I create new BufferedImage from this raw data without copying, just using this raw data? I took a look at creating BufferedImage from DataBuffer, but I just didn't get it. Unfortunately ImageIO is not allowed in my situation.

    Read the article

  • jquery attribute indexOf

    - by Victor
    When I am getting at an attribute onclick of custom(Reporting Services) checkbox it gives me correct result. However when I am trying to use indexOf on that result it says "Object doesn't support this property or method", i.e. this is fine, gives me a long string $('input[id*=CustomCheckBox]').click(function() { alert( $(this).attr("onclick") ); }); But this gives an error(object doesn't support this property or method): $('input[id*=CustomCheckBox]').click(function() { if ($(this).attr("onclick").indexOf("SomeString") > -1 ) { //do some processing here } } What would I need to modify so that indexOf is working properly?

    Read the article

  • Determining the order of a list of numbers (possibly without sorting)

    - by Victor Liu
    I have an array of unique integers (e.g. val[i]), in arbitrary order, and I would like to populate another array (ord[i]) with the the sorted indexes of the integers. In other words, val[ord[i]] is in sorted order for increasing i. Right now, I just fill in ord with 0, ..., N, then sort it based on the value array, but I am wondering if we can be more efficient about it since ord is not populated to begin with. This is more of a question out of curiousity; I don't really care about the extra overhead from having to prepopulate a list and then sort it (it's small, I use insertion sort). This may be a silly question with an obvious answer, but I couldn't find anything online.

    Read the article

  • What do you use Sinatra for?

    - by Victor P
    Im confused about Sinatra (the ruby framework). Is it a lightweight Rails replacement or you can have them running side by side? Can you do a web application (as in Rails)? For example a twitter clone?

    Read the article

  • jquery upgrade breaking existing code

    - by Victor
    I have a following event handler which worked in jquery 1.3.2 but stopped working when we upgraded to 1.8.2, still fired but doesn't do anything $('input.maskedInput').focus(function () { $(this).mask("999-999-9999"); }).blur(function () { $(this).unmask(); var numbers = $(this).val().replace(/-/g, '').replace(/_/g, ''); $(this).val(numbers.toString()); }); What could be a problem?

    Read the article

  • Beginner PHP: I can't insert data into MYSQL database

    - by Victor
    I'm learning PHP right now and I'm trying to insert data into a MySQL database called "pumpl2" The table is set up like this. create table product ( productid int unsigned not null auto_increment primary key, price int(9) not null, value int(9) not null, description text ); I have a form and want to insert the fields from the form in the database. Here is what the php file looks like. <?php // create short variable names $price = $_POST['price']; $value = $_POST['value']; $description = $_POST['description']; if (!$price || !$value || !$description) { echo "You have not entered all the required details.<br />" ."Please go back and try again."; exit; } @ $db = new mysqli('localhost', 'pumpl', '********', 'pumpl2'); if (mysqli_connect_errno()) { echo "Error: Could not connect to database. Please try again later."; exit; } $query = "insert into pumpl2 values ('".$price."', '".$value."', '".$description."')"; $result = $db->query($query); if ($result) { echo $db->affected_rows." product inserted into database."; } else { echo "An error has occurred. The item was not added."; } $db->close(); ?> When I submit the form, I get an error message "An error has occurred. The item was not added." Does anyone know what the problem is? Thank you!

    Read the article

  • In CakePHP, how to leave all prefixes?

    - by Victor Piousbox
    I have a link that goes like this: $this->Html->link('Welcome', array('controller' => 'users', 'action' => 'add')); I suspect it doesn't work (Firefox says the redirect will never complete), so I did this: $this->Html->link('Welcome', array('controller' => 'users', 'action' => 'add', 'my'=>false)); 'my' is a prefix. I also have 'admin', 'ajax', and 'rss'. So now instead of pointing to /users/add or /my/users/add, the link points to /rss/users/add. The link is in a header, in a layout so I don't know which prefix it will be invoked from. I want to go to /users/add, that is, leave all prefixes altogether. How do I do that in CakePHP? I'm using 1.3 version.

    Read the article

  • How to Not alter font in webpage after opening a file (pdf or jpg) in ASP.NET C#? [closed]

    - by Victor
    Possible Duplicate: How to not alter font in webpage after opening a pdf in ASP.NET C#? Previously I posted this question: How to open files from a specific route in ASP-NET c#? in fact, I have already asked this however it was only a minor question so I guess it wasn't that important in the previous post, so I will ask here. Whenever I open a pdf with: Response.Write("<script>window.open('FilePath');</script>"); All of the font in the page is altered, example, the letter's size increases and some of the letter's colors are switched to black instead of the font that I assigned. Is there a way that I can work around that?? http://imageshack.us/a/img838/5145/beforeja.png http://imageshack.us/a/img546/4760/afterw.png Oh and I noticed that this also happens when you open images like jpg

    Read the article

  • What does this line of code mean?

    - by Victor
    Hi, I am wondering what this line of code mean? b = (gen_rand_uniform()>0.5)?1:0; The gren_rand_uniform() is a function to generate random 0 and 1 numbers. However I don't get the meaning for >0.5 and 1:0. I know this is supposed to be a basic question, please bear with me. Thanks!

    Read the article

  • Search by ID, no keyword. Tried using :conditions but no result ouput.

    - by Victor
    Using Thinking Sphinx, Rails 2.3.8. I don't have a keyword to search, but I wanna search by shop_id which is indexed. Here's my code: @country = Country.search '', { :with => {:shop_id => params[:shop_id]}, :group_by => 'trip_id', :group_function => :attr, :page => params[:page] } The one above works. But I thought the '' is rather redundant. So I replaced it with :conditions resulting as: @country = Country.search :conditions => { :with => {:shop_id => params[:shop_id]}, :group_by => 'trip_id', :group_function => :attr, :page => params[:page] } But then it gives 0 result. What is the correct code? Thanks.

    Read the article

  • Getting this error in rails: `ActionView::Template::Error (code converter not found (UTF-8 to UTF-16))`

    - by Victor S
    I've started getting the following error in one of my views for some reason, I don't get it in development, but only in production. Here is a snippet of the backtrace, any ideas? ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)): 19: [title, summary.gsub(/^/, " "), nil].join("\n\n") 20: end 21: end.join 22: sections = sections.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding) 23: %> 24: 25: <%= raw sections %>

    Read the article

  • Fast image coordinate lookup in Numpy

    - by victor
    I've got a big numpy array full of coordinates (about 400): [[102, 234], [304, 104], .... ] And a numpy 2d array my_map of size 800x800. What's the fastest way to look up the coordinates given in that array? I tried things like paletting as described in this post: http://opencvpython.blogspot.com/2012/06/fast-array-manipulation-in-numpy.html but couldn't get it to work. I was also thinking about turning each coordinate into a linear index of the map and then piping it straight into my_map like so: my_map[linearized_coords] but I couldn't get vectorize to properly translate the coordinates into a linear fashion. Any ideas?

    Read the article

  • Rails group validation with just one error message

    - by Victor
    The following validation code in the model: validates :formatted_address, :zip, :city, :state, :country, :presence => true, :message => "is incomplete. Please enter full address." is displayed when either of the fields are empty. Let's say now :address and country are empty, 2 errors are displayed: Formatted Address is incomplete. Please enter full address. Country is incomplete. Please enter full address. How can I group the error message in the validation to just show one error message if either of the fields validated does not exist? Address is incomplete. Please enter full address. Thanks.

    Read the article

  • Silverlight Cream for February 22, 2011 -- #1050

    - by Dave Campbell
    In this Issue: Robby Ingebretsen, Victor Gaudioso, Andrea Boschin(-2-), Rudi Grobler(-2-), Michael Crump, Deborah Kurata, Dennis Delimarsky, Pete Vickers, Yochay Kiriaty, Peter Kuhn, WindowsPhoneGeek, and Jesse Liberty(-2-). Above the Fold: Silverlight: "Silverlight Simple MVVM Printing" Deborah Kurata WP7: "Creating theme friendly UI in WP7 using OpacityMask" WindowsPhoneGeek Tools: "KAXAML v1.8" Robby Ingebretsen Shoutouts: Peter Foot posted Silverlight for Windows Phone Toolkit–Feb 2011 Rudi Grobler posts his top requested features for WP7, Silverlight, and WCF: vNext ... see you in Seattle, Rudi! From SilverlightCream.com: KAXAML v1.8 Robby Ingebretsen just posted KAXML v1.8 that now supports .NET 4.0, WPF, and Silferlight4 ... go grab it. Learn how to use Blend to create a Data Store, Add Properties to it, etc... Victor Gaudioso has 3 new Silverlight and/or Expression Blend video tutorials up... first is this one on Creating a Data store, adding properties to it, oh... read the title :), Next up is: Send async messages across UserControls or even applications, followed by the latest: Create a Sketchflow Animation using the Sketchflow Animation Panel A base class for threaded Application Services Andrea Boschin continues his IApplicationServices series with this one on a base class he created to develop Application Services that runs a thread. Windows Phone 7 - Part #6: Taking advantage of the phone Andrea Boschin also has part 6 of his series at SilverlightShow on WP7... this one is covering a bunch of items... Capabilities, Launchers/Choosers, and gestures... plus the source for a fun game. {homebrew} Skype for WP7 Rudi Grobler posted about the availability of (some features of) Skype for WP7 being available. The XDA guys have working contacts and the ability to chat going, plus they're looking for poeple to join in... Follow Rudi's link, and let them know you're up for it! Simple menu for your WP7 application Rudi Grobler has another post up about a very simple menu control for WP7 that he produced that is also very easy to use. Attaching a Command to the WP7 Application Bar Michael Crump shows how to bind the application bar to a Relay Command with the use of MVVMLight in 7 Easy Steps :) Silverlight Simple MVVM Printing Deborah Kurata continues her MVVM series with this one on printing what your user sees on the page... but doing so within the MVVM pattern. Enhancing the general Zune experience on Windows Phone 7 with Zune web API Dennis Delimarsky apparently likes the Zune as much as I do, and has ratted out tons of information about the Zune API for use in WP7 apps... and lots of code... Validating input forms in Windows Phone 7 Pete Vickers takes a great detailed spin through validation on the WP7... the rules have changed, but Pete explains with some code examples. Windows Phone Shake Gestures Library Yochay Kiriaty discusses Shake Gestures for the WP7 device and then describes the "Windows Phone Shake Gesture Library" that detects shake gestures in 3D space... and after a great description has the link for downloading. What difference does a sprite sheet make? Peter Kuhn is writing a series at SilverlightShow on XNA for Silverlight Devs that I've highlighted. An outshoot of that is this discussion of the use of sprite sheets and game development. Creating theme friendly UI in WP7 using OpacityMask WindowsPhoneGeek has a new post up today on using Opacity Masks in WP7 to enable using one set of icons for either the dark or light theme.. too cool, you'll wanna check this out! Linq to XML Jesse Liberty continues with Linq with regard to WP7 with this post on Linq to XML... and why XML? crap... I was just saving/loading XML today! :) Lambda–Not as weird as it sounds Jesse Liberty then jumps into Lambda expressions... maybe it's a chance for me to learn WTF the lambdas really do that I use all the time! Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Silverlight Cream for March 30, 2010 -- #825

    - by Dave Campbell
    In this Issue: Jeremy Likness, Tim Greenfield, Tim Heuer, ondrejsv, XAML Ninja, Nikhil Kothari, Sergey Barskiy, Shawn Oster, smartyP, Christian Schormann(-2-), and John Papa And Glenn Block. Shoutouts: Victor Gaudioso produced a RefCard for DZone: Getting Started with Silverlight and Expression Blend Way to go Victor... it looks great! Gavin Wignall announced Metia launch FourSquare and Bing maps mash up – called Near.me Cheryl Simmons talks about VS2010 and the design surface: Changing Templates with the Silverlight Designer (and seeing the changes immediately) Michael S. Scherotter posted that New York Times Silverlight Kit Updated for Windows Phone 7 Series Jaime Rodriguez posted about 2 free chapters in his new book (with Yochay Kiriaty): A Journey Into Silverlight On Windows Phone -Via Learning WIndows PHone Programming Did you know there was "MSDN Radio"?? Tim Heuer posted follow-up answers to this morning's show: MSDN Radio follow-up answers: Prism for Silverlight, DomainServices and relationships Michael Klucher posted a great set of links for WP7 game development this morning: Great Game Development Tutorials for Windows Phone Zhiming Xue has 3 pages of synopsis and links for everything Windows Phone at MIX. This is the 1st, but at the top of the pages are links to the other two: Windows Phone 7 Content From MIX10 – Part I From SilverlightCream.com: Using WriteableBitmap to Simplify Animations with Clones Jeremy Likness takes a break from his LOB posts to demonstrate a page flip animation using WriteableBitmap to simplify the animation using clones. SAX-like Xml parsing Want some experience or fun with Rx? Tim Greenfield has a post up on building an observable XmlReader. nstalling Silverlight applications without the browser involved Last night I blogged Mike Taulty's take on the "Silent Install" for an OOB app, tonight, I'm posting Tim Heuer's insight on the topic. How to: Create computed/custom properties for sample data in Blend/Sketchflow ondrejsv posted an example of digging into the files that control the sample data for Blend to get what you really want. PathListBox Adventures – radial layout Check out the radial layout XAML Ninja did using the PathListBox ... and all code available. RIA Services and Validation Nikhil Kothari has a great (duh!) post up that follows his Silverlight TV on the same subject: RIA Services and validation... lots of good external links also. Windows Phone 7 Application with OData Sergey Barskiy did an OData to WP7 app by using the feed from MIX10. You can see a list of sessions, and click on one to see details. Getting Blur And DropShadow to work in the Windows Phone Emulator Shawn Oster responds to some forum questions about Blur and DropShadow effects not showing up in the WP7 emulator, and gives the code trick we have to do for now. Metro Icons for Windows Phone 7 We all got the other icon set for WP7 from MSDN, but smartyP pulled the Metro Icons from the PPT deck of the MIX10 presentations... good job! Fonts in SketchFlow Christian Schormann talks about fonts in Sketchflow, where they live on your machine, and how you can use them. Blend 4: About Path Layout, Part III Christian Schormann also has Part III of his epic tutorial up on Path Layout and Blend. This one is on dynamic resizing layouts, and he has links back to the other two if you missed them... or you can find them with a search at SilverlightCream... :) Simple ViewModel Locator for MVVM: The Patients Have Left the Asylum John Papa And Glenn Block teamed up to solve the View First model only without the maintenance involved with the ViewModel locator by using MEF. It only took these guys and hour... sigh... :) Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15  | Next Page >