Search Results

Search found 31207 results on 1249 pages for 'atg best practice in industries'.

Page 58/1249 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Javascript: Passing large objects or strings between function considered a bad practice

    - by Mr. Smee
    Is it considered a bad practice to pass around a large string or object (lets say from an ajax response) between functions? Would it be beneficial in any way save the response in a variable and keep reusing that variable? So in the code it would be something like this: var response; $.post(url, function(resp){ response = resp; }) function doSomething() { // do something with the response here } vs $.post(url, function(resp){ doSomething(resp); }) function doSomething(resp) { // do something with the resp here } Assume resp is a large object or string and it can be passed around between multiple functions.

    Read the article

  • Javascript Prototype Best Practice Event Handlers

    - by nahum
    Hi this question is more a consulting of best practice, Sometimes when I'm building a complete ajax application I usually add elements dynamically for example. When you'r adding a list of items, I do something like: var template = new Template("<li id='list#{id}'>#{value}</li>"); var arrayTemplate = []; arrayOfItem.each(function(item, index){ arrayTemplate.push(template.evaluate( id : index, value : item)) }); after this two options add the list via "update" or "insert" ----- $("elementToUpdate").update("<ul>" + arrayTemplate.join("") + "</ul">); the question is how can I add the event handler without repeat the process of read the array, this is because if you try add a Event before the update or insert you will get an Error because the element isn't still on the DOM. so what I'm doing by now is after insert or update: arrayOfItem.each(function(item, index){ $("list" + index).observe("click", function(){ alert("I see the world"); }) }); so the question is exist a better way to doing this??????

    Read the article

  • Best practice for web server user/group permissions

    - by Poe
    What's the best practice in a secure manner to setup the user/group and permissions? Here's what we currently have; web server runs as www/www. Fastcgi Php runs as www/www. User's shell/ftp account is username/username. We want the user to be able to have full access to all files, including those created by the web server 'www' from the shell or ftp. Similarly, we want the scripts run by fastcgi/php to be able to create files in user created directories and modify user created files.

    Read the article

  • Best Practice for creating Web Services

    - by Holograham
    To preface I am new to web development. I am looking at creating a core set of RESTful web services around a valuable document library of sorts (initial CRUD abilities). In doing so I am theoretically creating a perfectly re-usable and scalable back-end to be used by unanticipated applications in the future. My question centers around the best practice for doing this. My initial requirement has me also creating a unique front end. Would I make the front end and back end completely separate projects to enhance the re-usability. It would increase overhead. Looking at using GWT, Restlet, and JEE technology stack if this influences the setup at all.

    Read the article

  • Would this constructor be acceptable practice?

    - by Robb
    Let's assume I have a c++ class that have properly implemented a copy constructor and an overloaded = operator. By properly implemented I mean they are working and perform a deep copy: Class1::Class1(const Class1 &class1) { // Perform copy } Class1& Class1::operator=(const Class1 *class1) { // perform copy return *this; } Now lets say I have this constructor as well: Class1::Class1(Class1 *class1) { *this = *class1; } My question is would the above constructor be acceptable practice? This is code that i've inherited and maintaining.

    Read the article

  • Best practice for passing configuration to each GUI object

    - by Laimoncijus
    Hi, I am writing an application, where I do have few different windows implemented, where each window is a separate class. Now I need somehow to pass a single configuration object to all of them. My GUI is designed in way, where I have one main window, which may create some child windows of its own, and these child windows can have their own childs (so there is no possibility to create all windows in initialization part and feed the config object to all of them from the very beginning)... What would be best practice for sharing this configuration object between them? Always passing via constructor or maybe making it somewhere as final public static and let each window object to access it when needed? Thanks

    Read the article

  • postgresql duplicate table names best practice

    - by veilig
    My company has a handful of apps that we deploy in the websites we build. Recently a very old app needed to be included along side a newer app and there was a conflict w/ a duplicate table name needed to be used by both apps. We are now in the process of updating an old app and there will be some DB updates. I'm curious what people consider best practice (or how do you do it) to help ensure these name collisions don't happen. I've looked at schema's but not sure if thats the right path we want to take. As the documentation prescribes, I don't want to "wire" a particular schema name into an application and if I add schema's to the user search path how would it know which table I was referring to if two schema's have the same table name. although, maybe I'm reading to much into this. Any insights or words of wisdom would be greatly appreciated!

    Read the article

  • MVC best practice when adding functions to controller?

    - by Patrick
    Hi I'm writing a function in my controller; this is supposed to take in a form, process it, register the user in DB, send a confirmation email etc etc. to avoid this function to be too cluttered, I was thinking of calling some sub-functions (eg: function registration() { //process form.. _insertInDb($formdata) _send_mail($address); //load confirmation view.. } function _send_mail($to) { //code here } function _insertInDb($formdata) { //other code here... } I'm not sure whether writing all the functions in the controller would be best practice -maybe I should insert all 'supporting' function (eg send_mail and insertInDb in this example) in another file and then import them? This would probably make the controller much more readable.. what's your view?

    Read the article

  • Java 7 API design best practice - return Array or return Collection

    - by Shengjie
    I know this question has be asked before generic comes out. Array does win out a bit given Array enforces the return type, it's more type-safe. But now, with latest JDK 7, every time when I design this type of APIs: public String[] getElements(String type) vs public List<String> getElements(String type) I am always struggling to think of some good reasons to return A Collection over An Array or another way around. What's the best practice when it comes to the case of choosing String[] or List as the API's return type? Or it's courses for horses. I don't have a special case in my mind, I am more looking for a generic pros/cons comparison.

    Read the article

  • What is good practice for writing web applications that control daemons (and their config files)

    - by Jones R
    Can someone suggest some basic advice on dealing with web applications that interact with configuration files like httpd.conf, bind zone files, etc. I understand that it's bad practice, in fact very dangerous to allow arbitrary execution of code without fully validating it and so on. But say you are tasked to write a small app that allows one to add vhosts to an apache configuration. Do you have your code execute with full privileges, do you write future variables into a database and have a cron job (with full privileges) execute a script that pulls the vars from the database and throws them into a template config file, etc. Some thoughts & contributions on this issue would be appreciated. tl;dr - how can you securely write a web app to update/create entries in a config file like apache's httpd.conf, etc.

    Read the article

  • Best practice for error handling in codeigniter / php apps

    - by Industrial
    Hi everyone, We're working with a new codeigniter based application that are cross referencing different PHP functions forwards and backwards from various libraries, models and such. We're running PHP5 on the server and we try to find a good way for managing errors and status reports that arises from the usage of our functions. While using return in functions, the execution is ended, so nothing more can be sent back. Right? What's the best practice to send a status information or error code upon ending execution of actual function? Should we look into using exceptions or any other approach? http://us.php.net/manual/en/language.exceptions.php

    Read the article

  • Performing periodic audits and best practice

    - by DTown
    I'm doing a windows form and would like an audit task to happen every 30 seconds. This audit is essentially checking a series of services on remote computers and reporting back into a richtextbox the status. Current I have this running in an endless background thread and using an invoker to update the richtextbox in the main form. Is this best practice? If I made an endless loop in my main form that would prevent any of my buttons from working, correct? I'm just curious if every time I want to create a periodic audit check I have to create a new thread which checks the status or file or what have you?

    Read the article

  • iphone best practice, how to load multiple high quality images

    - by bennythemink
    Hi guys and girls, I have about 20-ish high quality images (~3840x5800 px) that I need to load in a simple gallery type app. The user clicks a button and the next image is loaded into the UIImageView. I currently use [UIImage imageWithContentsOfFile:] which takes about 6 seconds to load each image in the simulator :( if I use [UIImage imageNamed:] it takes even longer to load but caches the images which means its quicker if the user wishes to see the same images again. But it may cause memory problems later with all that caching crashing my app. I want to know whats the best practice for loading these? I'm experimenting with reducing image file size as much as is possible but I really need them to be high quality image for the purpose of the app (zoomable, etc.). Thanks for any advice

    Read the article

  • The best practice to setup hierarchy data

    - by eski
    I'm trying to figure out the best practice to setup hierarchy data that i take from a database into some contoller that would show the hierachy. Basicly this would look like a normal tree but when you press the items that are under "chapters" you get a link to another page. I have these tables and this is the way they are connected Period Courses Subjects Chapters I select Period from a DropDownBox and then i want all the courses in that period to line up. Under each course would be the subject and under them are the chapers, typical hierarchy. The tables are linked together with refrences to each other in linear way. I have tried to use treeview to show this, but dont understand how to do it. I though i could use <ul><il> tags and do it at runtime. Reapeter or datalist, possible ? Is it better to do this with databinding in XAML or in code ?

    Read the article

  • Best practice for creating objects used in for/foreach loops

    - by StupidDeveloper
    Hi! What's the best practice for dealing with objects in for or foreach loops? Should we create one object outside the loops and recreate it all over again (using new... ) or create new one for every loop iteration? Example: foreach(var a in collection) { SomeClass sc = new SomeClass(); sc.id = a; sc.Insert(); } or SomeClass sc = null; foreach(var a in collection) { sc = new SomeClass(); sc.id = a; sc.Insert(); } Which is better?

    Read the article

  • Best practice: Define form field name in backend or the template

    - by AbcAeffchen
    If you designing a webpage you should separate the backend from the frontend. But if you use forms you have to name them. But where should you set this name? e.g. PHP: $fieldName = 'email'; $template->setVar('field_name', $fieldName) ... if(!empty($_POST)) validate($_POST[$fieldName]); Template: <input type="text" name="{$field_name}"> Or just PHP: if(!empty($_POST)) validate($_POST['email']); Template: <input type="text" name="email"> Or should I write a function that can be called from the template an converts an array of field data (name, type, value, id, class, ...) into html code? Is there a best practice where to define fieldnames (types,etc.)? Notice: I used php and smarty like pseudocode (and tags), but its a general question.

    Read the article

  • global counter in application: bad practice?

    - by Martin
    In my C++ application I sometimes create different output files for troubleshooting purposes. Each file is created at a different step of our pipelined operation and it's hard to know file came before which other one (file timestamps all show the same date). I'm thinking of adding a global counter in my application, and a function (with multithreading protection) which increments and returns that global counter. Then I can use that counter as part of the filenames I create. Is this considered bad practice? Many different modules need to create files and they're not necessarily connected to each other.

    Read the article

  • best VNC Server for Linux?

    - by Javier Novoa C.
    I know this may be a question about personal preferences. But, in terms of: speed / memory usage / ease of configuration/ licensing , which is the best VNC server you know? I have tried TightVNC, TigerVNC, UltraVNC and RealVNC , but right now I can't figure out which one is the best (any of these I listed or any other) in terms of what I worried about right now (speed/consumption/config/licensing). What are your best choices?

    Read the article

  • Linux FHS: /srv vs /var ... where do I put stuff?

    - by wag2639
    My web development experience has started with Fedora and RHEL but I'm transitioning to Ubuntu. In Fedora/RHEL, the default seems to be using the /var folder while Ubuntu uses /srv. Is there any reason to use one over the other and where does the line split? (It confused me so much that until very recently, I thought /srv was /svr for server/service) My main concern deals with two types of folders default www and ftp directories specific application folders like: samba shares (possibly grouped under a smb folder) web applications (should these go in www folder, or do can I do a symlink to its own directory like "_/www/wordpress" - "/srv/wordpress") I'm looking for best practice, industry standards, and qualitative reasons for which approach is best (or at least why its favored).

    Read the article

  • Most suitable high availability solution

    - by Alex Bagnolini
    My company is hosting a website in a server with IIS, SQL Server and a 3rd party windows service (written in C#, source code available for amendments). We bought a new identical server, composed by: 1x Quad Core, 12GB RAM, 4x160GB SATA Raid 5, Windows Server 2008 R2 Datacenter, Public IP. We aim to put all webpages and the 3rd party windows service in an high-availability state. After some lab-testing on how to configure Failover Clustering and Hyper-V, we have deep doubts on what the "best" solution would be, by "best" meaning maintainable and able to correctly handle a physical server failure. Any suggestion on how we should configure the two servers? We don't need all the configuration's step, just an hint on the right direction to follow.

    Read the article

  • Oracle RAC interconnect in a Dell M1000e Blade Enclosure

    - by Antitribu
    We are looking at a Dell M1000e enclosure and appropriate Blades with 4 NICs each. We are planning on running Linux/Oracle 11g RAC on two blades, storage will be handled on an iSCSI SAN for which two NICs (via passthrough) will be connected leaving us with two NICs (via blade centre switches). We would like to have an interconnect (obviously) , an external IP and an internal IP. Would best practice be to: bond the remaining two interfaces and VLAN as appropriate to provide three virtual interfaces? run the interconnect on one interface and VLAN the external/internal interfaces? purchase a blade with more NICs as the above is a terrible idea? Another option? Please feel free to point out the blindingly obvious or to relevant documentation on support.oracle. I am specifically interested in supported configurations and best practices. Thanks!

    Read the article

  • Resource Pools and VMTools Best Practices

    - by LucD
    Are there any published (or non-published) best practices with using Resource Pools in a View environment? Using Shares/Limits etc...Also, when installing the VMTools on a desktop, are there any best practice configurations with running the tools within a desktop?Resource Pools and VMTools Best Practices

    Read the article

  • Enterprise Data Center System Admin/Engineer to Server Ratio

    - by Bob
    I know there have been similar questions asked over the last few months however looking at a Data Center Operations and know there are some really smart people out there that might be able to help. Looking for some staffing best practices based on first hand experience and was hoping that there is some experience in this area that can provide "best practice" application: Three High Availability (99.99% plus) Enterprise Level Data Centers geographically dislocated, one manned 24x7x365, one lights out, one co-location running HOT-HOT-HOT supporting a global community. More than 2,000 operating systems consisting of 95% Windows, 5% Linux and Solaris, 45% virtualized, more than 100TB storage. No desktop support, no Network Administration (administrated separately), running N+1 and serving more than 250 Billion page views annually. Based on experience what has been your experience with Server to "Data Center System Administrator/Engineer" ratio? Thanks in advance for your responses.

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >