Search Results

Search found 1976 results on 80 pages for 'helper'.

Page 52/80 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • jquery ui autcomplete does not disapper with no result

    - by mike
    Hi, I'm using jquery ui autocomplete with the following code: $('#company').autocomplete({ source: function(request, response) { var company_name = $('#company').val(); $.ajax({ type: 'post', url: 'http://new.admin.localhost/client/helper/lookup_company_name', cache: false, data: { company : company_name }, dataType: 'json', success: function(data) { //alert(data); response($.map(data.companies, function(item) { return { label: item.company, value: item.company } })) } }) }, minLength: 2, }); This works as expected... The problem is, if the first few chars match something and then you enter a char that should "break" any match, it just keeps the drop down in place with the results for the last matched char... make sense? Would this be something I needed to change in the script that returns the data or something in the jquery? thanks!

    Read the article

  • Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language?

    - by szabgab
    I wonder why would a C++, C#, Java developer want to learn a dynamic language? Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language? What helper tasks can be done by the dynamic languages faster or better after only a few days of learning than with the static language that you have been using for several years? Update After seeing the first few responses it is clear that there two issues. My main interest would be something that is justifiable to the employer as an expense. That is, I am looking for justifications for the employer to finance the learning of a dynamic language. Aside from the obvious that the employee will have broader view, the employers are usually looking for some "real" benefit.

    Read the article

  • Possible to have empty values with Html For Helpers such as Html.TextBoxFor()?

    - by chobo2
    Hi Is it possible to have to make a html for helper in asp.net mvc 2.0 have a default value of "empty string" Like if I do this Html.TextBoxFor( u => u.ProductName) would render to <input id ="ProductName" name="ProdcutName" type="text" value="Jim" /> Now I don't want the textbox to display jim. I want it to display nothing. <input id ="ProductName" name="ProdcutName" type="text" value="" /> I tried to do this Html.TextBoxFor( u => u.ProductName, new { @value = " "}) but that seems to do nothing. So how can I do this. I hope you can do something like this otherwise I think these new helpers have a great flaw since now I need to use like javascript to remove them since I hardly ever want a default value in the textbox especially when I have a label right beside the textbox saying what it is.

    Read the article

  • How do I generate optimized SQL with my (added) partial methods on LINQ entities

    - by Ra
    Let's say I have a Person table with a FirstName and LastName column. I extended the Person LINQ entity class with a get property "FullName", that concatenates the first and last names. A LINQ query like: from person... select fullName where id = x generates SQL selecting all Patient columns, since FullName is evaluated after firing the query. I would like to limit the select clause to only the 2 columns required. This is a simple example, but the limitation it shows is that I cannot isolate my business/formatting rules but have to embed them in the LINQ query, so they're not reusable (since it is in the select part) or I need select both columns separately, and then concatenate them higher up in the data or business layer with static helper methods. Any ideas for a clean design using the entity partial classes or extensions? Thanks

    Read the article

  • Design pattern for data entry forms with LINQ2SQL

    - by petebob796
    I am about to start a new winforms data entry application, it already has the database designed which I am comfortable with. I was going to use LINQ2SQL to access the tables to keep things type safe but am now wondering about design patterns, something I am just getting into. Since LINQ is giving me objects to use should I still create classes in between to hold the validation code and helper methods or should these just go in with the UI? It just seems I will end up with classes sat in between with little code which will cause the UI classes to have code just getting and setting values in the intermediate class and returning from validation to flag errors... Any good reading on this? Should I consider the entity framework (or similar) instead?

    Read the article

  • Inline Zend Navigation links in view content saved to db

    - by takeshin
    I'm storing the page content in the database (both as markup and HTML code) and displaying this content in the view (let's say it's CMS or forum post). The this data have also some links to internal pages existing in sitemap (Zend_Navigation object). It's easy to insert the link in page body just by using <a> tag. But the contents of this inline links does not change when I update the sorce XML for Zend Navigation (url's, attributes, ACL permissions). How do you handle this case? Special markup for the link, converting the link using url view helper? Iterate Zend_Navigation object extracting specific link (one by one)?

    Read the article

  • Level designing with Cocos2d and Box2d

    - by Majster
    I want to learn how to make levels using cocos2d and box2d (for iOS). I am talking about a 2d platformer such as Limbo or Braid or something like that. How can I design and build levels like this? I have seen Level Helper for cocos2d but its not free and I don't think it makes physic objects for box2d. How is this accomplished in real games? How to make camera move with character and so on. Any starting points would be much appreciated.

    Read the article

  • mootools: $ not defined

    - by eaigner
    I've strange error i don't understand. I'm just moving my code from jQuery over to Mootools because it's much cleaner than the jQuery mess. Now when i use the $$('div.canvas') in mootools i get the correct element. When i try $(document).getElement('div.canvas') it tells me that $ is not defined. How can $$ and all helper functions like $lambda etc. be defined but not $? Has something changed there from 1.1 to 1.2 and the docs are not updated yet?

    Read the article

  • Generic object load function for scala

    - by Isaac Oates
    I'm starting on a Scala application which uses Hibernate (JPA) on the back end. In order to load an object, I use this line of code: val addr = s.load(classOf[Address], addr_id).asInstanceOf[Address]; Needless to say, that's a little painful. I wrote a helper class which looks like this: import org.hibernate.Session class DataLoader(s: Session) { def loadAddress(id: Long): Address = { return s.load(classOf[Address], id).asInstanceOf[Address]; } ... } So, now I can do this: val dl = new DataLoader(s) val addr = dl loadAddress(addr_id) Here's the question: How do I write a generic parametrized method which can load any object using this same pattern? i.e val addr = dl load[Address](addr_id) (or something along those lines.) I'm new to Scala so please forgive anything here that's especially hideous.

    Read the article

  • How do I post to a webservice and display the returned Response in MVC3 Razor Application?

    - by DavieDave
    I have need to call a webservice from an HTML helper extension I created (combinbation of Action and Image) and placed in the view as follows @Html.ActionImage("CallService", new { number = ViewBag.number, code = ViewBag.code, account = ViewBag.account, amount = ViewBag.amount }, "~/Content/sb_200x61.png", "Start the Process") I am making the action call and it calls the service and returns a string of the html response, but it doesn't look right. I am using the typical HttpWebRequest to do the POST Action in C# code. Here is the controller action code: public MvcHtmlString CallService(string number, string code, string account, decimal? amount) { string response = MyService.ServiceLayer.ClassName.callService(number, code, account, Convert.ToDecimal(amount); MvcHtmlString mstring = new MvcHtmlString(response); return mstring; } When it returns the string back it's looking like the all styling and js is removed. It that due to MvcHtmlString? Is there a better way to do this? Redirect somehow ?

    Read the article

  • using key/value collection in session

    - by jumpdart
    Question: What is a good datatype to keep in session for a large collection of keys and values to frequently reference and update? Application: Updating an old .NET web app with a million pages and grids to have all the grids maintain their sort. They currently access helper code to format themselves graphically on load and on sort. I figured I could add to that code to check for a key based on the page and grid id in a collection in session to see if it has a previous expression on load. and the on sort update/add its appropriate item in the collection. Thoughts? Dictionary vs NameValueCollection

    Read the article

  • Symfony form's i18n and add_empty

    - by David
    I have this widget: $this->setWidget('slug', new sfWidgetFormDoctrineChoice(array('model' => 'MyTable', 'method' => 'myMethod', 'key_method' => 'myMethod', 'add_empty' => 'Select option'))); Ok, what should I do to translate the "Select option"? I can't use the __() helper inside the form, and adding that string into my XLIFF file doesn't translate it automatically. If it can't be done, what workaround should I implement? I can't find any way, and neither can't find any tip in the official documentation. Thanks!

    Read the article

  • Help, I need to debug my BrowserHelperObject (BHO) (in C++) after a internet explorer 8 crash in Rel

    - by BHOdevelopper
    Hi, here is the situation, i'm developping a Browser Helper Object (BHO) in C++ with Visual Studio 2008, and i learned that the memory wasn't managed the same way in Debug mode than in Release mode. So when i run my BHO in debug mode, internet explorer 8 works just fine and i got no erros at all, the browser stays alive forever, but as soon as i compile it in release mode, i got no errors, no message, nothing, but after 5 minutes i can see through the task manager that internet explorer instances are just eating memory and then the browser just stop responding every time. Please, I really need some hint on how to get a feedback on what could be the error. I heard that, often it was happening because of memory mismanagement. I need a software that just grab a memory dump or something when iexplorer crashes to help me find the problem. Any help is appreciated, I'll be looking for responses every single days, thank you.

    Read the article

  • Are these REST HTTP response codes right, and what about the Content-Type?

    - by talentedmrjones
    I'm writing a controller helper that sets the proper response headers for my REST controller action. It's pasted below and should be simplified enough for those who aren't familiar with Zend Framework to understand what I'm doing. My question is: Are these codes correct for their respective responses, and in the case of "access denied" do I use a 401 or 403? Also, in case of responding with an error, I understand I should be placing a message in the response body, but should I set the "Content-Type" to "text/plain"? <?php class App_Controller_Helper_RestResponse extends Zend_Controller_Action_Helper_Abstract { public function denied() { // 403 or 401? } public function notFound() { // 404 } public function created() { // 201 } public function deleted() { // 204 } public function redirect() { // 301 // new url } public function malformed() { // 400 } public function gone() { // 410 } }

    Read the article

  • Better alternatives to know whether a control is valid in javascript?

    - by Anthony
    I want to know whether a control is valid or not in javascript. Is there a direct client side API available in Asp.Net which can tell me whether a control is valid or not? Eg. If I have 2 validators attached to a textbox, I need a function that can tell me whether the textbox is valid or not. If even 1 validator is not valid then it should return false. I can't seem to find a function that can give me this. Here is a little helper that I wrote which does the job but is inefficient: function isControlValid(control) { for (i = 0; i < Page_Validators.length; i++) { var validator = Page_Validators[i]; var controlId = validator.controltovalidate; if ($(control).attr('id') == controlId && validator.isvalid == false) { return false; } } return true; } Anybody has any better alternatives?

    Read the article

  • jQuery Draggable Problem

    - by Jimbo
    Im trying to get a div to be movable within the constrains of the browser window, by dragging the titlebar inside the div. My code is as follows: <div id='container'> <h3 class='title' id='titlebar'>My Title</h3> </div> <script type='text/javascript'> $(document).ready(function(){ $("#titlebar").draggable({ containment: 'window', scroll: false, helper: $('#container') }); }); </script> Something is wrong with this (it wont do anything at all) but I cant see the problem!

    Read the article

  • Transparently storing class state without exposing implementation

    - by RoToRa
    I have a model (MVC) class whose internal state (which basically contains of private int fields) I want to store. The program is running on Android (for now) so I need to store the in a Bundle, but I'll be using the same class later in a desktop application where I'll have to store the state some other way, so I can't reference Bundle directly in my class. So my question is: What is the best way to store (and retrieve) the state of a class without exposing it's implementation? The best I could think of removing the private access modifier so that the fields become package accessible and create read/write helper classes in the same package, but that somehow seems wrong.

    Read the article

  • Unit testing with Data Access Layer

    - by chobo
    Hi, what is a good way to write unit tests with a LINQ to SQL DAL? Currently I am doing some database testing and need to create helper methods that access the database, but I don't want those methods in my main repo's. So what I have is two copies of the DAL, one in my main project and one in the Test project. Is it easier to manage these things if I create a separate project for the data layer? I'm not sure which way is a better way to approach this. If I do create a data layer project would I move all my repo's to that project as well? I'm not sure how to properly setup the layers. Thanks

    Read the article

  • Accessing facebook sdk result Object using .NET 3.5 API?

    - by John K
    Consider the following in .NET 3.5 (using the Bin\Net35\Facebook*.dll assemblies): using Facebook; var app = new FacebookApp(); var result = app.Get("me"); // want to access result properties with no dynamic ... in the absence of the C# 4.0 dynamic keyword this provides only generic object members. How best should I access the facebook properties of this result object? Are there helper or utility methods or stronger types in the facebook C# SDK, or should I use standard .NET reflection techniques?

    Read the article

  • What does "static" mean in the context of declaring global template functions?

    - by smf68
    I know what static means in the context of declaring global non-template functions (see e.g. What is a "static" function?), which is useful if you write a helper function in a header that is included from several different locations and want to avoid "duplicate definition" errors. So my question is: What does static mean in the context of declaring global template functions? Please note that I'm specifically asking about global, non-member template functions that do not belong to a class. In other words, what is the difference between the following two: template <typename T> void foo(T t) { /* implementation of foo here */ } template <typename T> static void bar(T t) { /* implementation of bar here */ }

    Read the article

  • how to get a product's image in magento?

    - by lock
    im running on version 1.3.2.1 but on my client's server they had magento 1.3.0 so my previous code to display images for my local copy: echo $this->helper('catalog/image')->init($_product)->resize(163, 100); does not work on the client's installation looking at the results returned by their magento, ver 1.3.0 actually returns a url although it points to the skin's media folder is there a way to get the absolute image path for the image? or should i make changes somewhere else that would tell magento that the media directory should be on the root?

    Read the article

  • will_paginate route only works on page > 1

    - by Avishai
    I have the following routes defined: map.resources :categories, :has_many => :downloads map.resources :downloads, :member => {:go => :get}, :collection => {:tag => :get} map.connect '/downlods/page/:page', :controller => 'downloads', :action => 'index' map.connect '/categories/:category_id/downloads/page/:page', :controller => 'downloads', :action => 'index' For some reason, the first page that the will_paginate helper is called on causes links with ?page=2 to be rendered, while subsequent pages have links with /downloads/page/2. Do you know what might be causing this?

    Read the article

  • How to calculate end-point at a given center plus an radius and angle?

    - by mystify
    I'm trying to do some basic quartz core drawing with arcs, but have an F in math ;-) I have a point: CGPoint center = CGPointMake(100.0f, 100.0f); CGFloat radius = 50.0f; CGFloat startAngle = 20.0f / 180.0f * M_PI; CGFloat endAngle = 150.0f / 180.0f * M_PI; CGContextAddArc(c, center.x, center.y, radius, startAngle, endAngle, 0); Now I want to draw a little dot on the middle of the arc. I mean, not the center point, but the little curve (arc) which is made up between the angles 20-150 degrees. I looked into quartz but unfortunately, there seems no helper function to calculate this. Probably some hardcore trigonometric logic with atan and stuff of this kind needed?

    Read the article

  • CI controller function is ignored

    - by den-javamaniac
    Hi. I'm trying to pass through a CI tutorial (writing a simple forum) and I can't make a controller function called. To be more specific I have this in a controller: function __construct() { parent::Controller(); $this->load->helper('url'); } function index() { $data['title'] = "Wlcome to Gossip"; $data['heading'] = "Welcome to Gossip"; $data['query'] = $this->db->get('topic')->result(); $this->load->view('welcome', $data); } function topic() { echo 'testing...'; } and when I'm trying to access the /index.php/forum/topic/ uri it just prints out my index() function. Can any one point out what may cause the problem?

    Read the article

  • Magento - Using alternative "reviews count" on category list page

    - by Sam
    Hi All I noticed that on the category list page, the number of reviews (pulled from frontend/base/default/template/review/helper/summary_short.phtml) lists the full amount of reviews for an item, not the amount available to the store view you’re on. So, for example (using the sample data) the Samsung MM-A900M Ace has 5 reviews - however, when you click that link and are taken to the reviews page, it actually just has 2 (as only 2 are available to the English view). But on the reviews page, the review count is correct and says 2 reviews (this time pulled from frontend/base/default/template/review/product/view/count.phtml). Is there any way to use this review count on the category list?

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >