Search Results

Search found 218 results on 9 pages for 'siva prasad varma'.

Page 8/9 | < Previous Page | 4 5 6 7 8 9  | Next Page >

  • javascript object's - private methods: which way is better.

    - by Praveen Prasad
    (function () { function User() { //some properties } //private fn 1 User.prototype._aPrivateFn = function () { //private function defined just like a public function, //for convetion underscore character is added } //private function type 2 //a closure function _anotherPrivateFunction() { // do something } //public function User.prototype.APublicFunction = function () { //call private fn1 this._aPrivateFn(); //call private fn2 _anotherPrivateFunction(); } window.UserX = User; })(); //which of the two ways of defining private methods of a javascript object is better way, specially in sense of memory management and performance.

    Read the article

  • How to write an R function that evaluates an expression within a data-frame

    - by Prasad Chalasani
    Puzzle for the R cognoscenti: Say we have a data-frame: df <- data.frame( a = 1:5, b = 1:5 ) I know we can do things like with(df, a) to get a vector of results. But how do I write a function that takes an expression (such as a or a > 3) and does the same thing inside. I.e. I want to write a function fn that takes a data-frame and an expression as arguments and returns the result of evaluating the expression "within" the data-frame as an environment. Never mind that this sounds contrived (I could just use with as above), but this is just a simplified version of a more complex function I am writing. I tried several variants ( using eval, with, envir, substitute, local, etc) but none of them work. For example if I define fn like so: fn <- function(dat, expr) { eval(expr, envir = dat) } I get this error: > fn( df, a ) Error in eval(expr, envir = dat) : object 'a' not found Clearly I am missing something subtle about environments and evaluation. Is there a way to define such a function?

    Read the article

  • [Concept] How does unlink() find the file to delete?

    - by Prasad
    My app has a 'Photo' field to store URL. It uses sfWidgetFormInputFileEditable for the widget schema. To delete the old image when a new image is uploaded, I use unlink before setting the value in the over-ridden setter and it works!!! if (file_exists($this->_get('photo'))) unlink($this->_get('photo')); Photos are stored in uploads/photos and when saving 'Photo' only the file name xxx-yyy.zzz is saved (and not the full path). However, I wish to know how symfony/php knows the full path of the file to be deleted? Part 2: I am using sfThumbnailPlugin to generate thumbnails. So the actual code looks like this: public function setPhoto($value) { if(!empty($value)) { Contact::generateThumbnail($value); // delete current Photo & create thumbnail $this->_set('photo',$value); // setting new value after deleting old one } } public function generateThumbnail($value) { $uploadDir = sfConfig::get('app_photo_upload'); // path to upload folder if (file_exists($this->_get('photo'))) { unlink($this->_get('photo')); // delete full-size image // path to thumbnail $thumbpath = $uploadDir.'/thumbnails/'.$this->get('photo'); // read a blog, tried setting dir manually, doesn't work :( //chdir('/thumbnails/'); // tried closing the file too, doesn't work! :( //fclose($thumbpath) or die("can't close file"); //unlink($this->_get('photo')); // doesn't work; no error :( unlink($thumbpath); // doesn't work, no error :( } $thumbnail = new sfThumbnail(150, 150); $thumbnail->loadFile($uploadDir.'/'.$value); $thumbnail->save($uploadDir.'/thumbnails/'.$value, 'image/png'); } Why can't the thumbnail be deleted using unlink()? is the sequence of ops incorrect? Is it because the old thumbnail is displayed in the sfWidgetFormInputFileEditable widget? I've spent hours trying to figure this out, but unable to nail down the real cause. Thanks in advance.

    Read the article

  • How to handle Windows Events in JAVA

    - by prasad
    I'd like to ask another question how to handle Windows' events in Java. To be specific, I'd like to know how to handle events such as mouse moved or mouse clicked in Windows XP and Vista. I want to wire my own custom behavior in my application to these events, even when my application is inactive or otherwise hidden. All help is appreciated!

    Read the article

  • How to retrieve the XML file which is under the project folder

    - by Vara Prasad.M
    I having an XML file and that file is under the Documents folder. If I actually give the entire path in C# then I am able to retrieve the XML values, but if I give the project path then it is not getting the values. For example: string fileNamePath=ConfigurationManager.AppSettings["XMLDocPath"].ToString() + fileName; m_xmld.Load(fileNamePath); It is throwing a runtime error.

    Read the article

  • writting an sql query

    - by Praveen Prasad
    iam having 2 tables table Items Table (this table holds all items iam having) itemId --------- Item1 Item2 Item3 Item4 Item5 table 2 users_item relation UserId || ItemId 1 || Item1 1 || Item2 userId one has stored 2 items Item1,Item2. Now i want to write a query on table1 (Items table) so that it displays all items which user1 has NOT chosen.

    Read the article

  • incrementing a table column's data by one || mySql

    - by Praveen Prasad
    iam having a table with columns like id || counter if i do something (some event) i want the counter's value(at a particular id) to increase by one , currently iam doing this : //get current value current_value = select counter from myTable where id='someValue' // increase value current_value++ //update table with current value update myTable set counter=current_value where id='someValue'; currently iam running 2 queries for this, please suggest me some way do it in one step.

    Read the article

  • Best way to build an application based on R?

    - by Prasad Chalasani
    I'm looking for suggestions on how to go about building an application that uses R for analytics, table generation, and plotting. What I have in mind is an application that: displays various data tables in different tabs, somewhat like in Excel, and the columns should be sortable by clicking. takes user input parameters in some dialog windows. displays plots dynamically (i.e. user-input-dependent) either in a tab or in a new pop-up window/frame Note that I am not talking about a general-purpose fron-end/GUI for exploring data with R (like say Rattle), but a specific application. Some questions I'd like to see addressed are: Is an entirely R-based approach even possible ( on Windows ) ? The following passage from the Rattle article in R-Journal intrigues me: It is interesting to note that the first implementation of Rattle actually used Python for implementing the callbacks and R for the statistics, using rpy. The release of RGtk2 allowed the interface el- ements of Rattle to be written directly in R so that Rattle is a fully R-based application If it's better to use another language for the GUI part, which language is best suited for this? I'm looking for a language where it's relatively "painless" to build the GUI, and that also integrates very well with R. From this StackOverflow question How should I do rapid GUI development for R and Octave methods (possibly with Python)? I see that Python + PyQt4 + QtDesigner + RPy2 seems to be the best combo. Is that the consensus ? Anyone have pointers to specific (open source) applications of the type I describe, as examples that I can learn from?

    Read the article

  • Exception throws There is no row at position 0

    - by Nimantha Prasad
    I wanted to check user is valid or not.it gives me the exception,When user valid it's working without issue,But if user invalid there's some issue. Exception is : There is no row at position 0 Here is the part of the code, public bool CheckUserExistAndReporter(string user) { int reporterDnnId = -1; SMSFunctionController mysms = new SMSFunctionController(); DataSet uds = mysms.GetUsersUnitByUserName(user); reporterDnnId = Convert.ToInt32(uds.Tables[0].Rows[0]["DnnUserID"]); if (reporterDnnId > 0) { bool isValidUser = true; return isValidUser; } //else //{ //bool isValidUser =false; //return isValidUser; // } return false; } Then i call thatone here. if (!CheckUserExistAndReporter(user)) { ErrorLog(messageIn); msgOut = "ugyldig Bruker";//Invalid User. } what is the error ?

    Read the article

  • pound character(#) in asp.net ajax

    - by Praveen Prasad
    iam using asp.net and asp.net-ajax every thing happens on browser urls are of format http://somepage#page1 http://somepage#page2 http://somepage#page3 now all these urls are in a secured folder when logged in user directly types (or use bookmark) a url like below, he is shown that page http://somepage#page2 -- (bookmarked url lying in secured folder) now when a user user who is not logged in directly type above url he gets redirected to login page but on login page in redirection url iam unable to read characters after pound (#) sign. iam just getting redirection url= "http://somepage" while i want it to be "http://somepage#page2" is there is any way i can do this

    Read the article

  • using regular expression / Remove special characters with linq to sql

    - by Prasad
    How can i use regular expressions with linq to sql in the asp.net mvc(C#) application? The columns in my MSSQL table (Products) has some special characters like (, - % ',.....). While searching for a product i need to search without that special chareters. For ex.: I have a product say (ABC-Camp's / One), when i search for "abccamp", it should pull the product. I am trying the query like: from p in _context.pu_Products where p.User_Id == userId && p.Is_Deleted == false && p.Product_Name.ToLower().Contains(text.ToLower()) select new Product { ProductId = p.Product_Id, ProductName = p.Product_Name.Replace("’", "").Replace("\"", ""), RetailPrice = p.Retail_Price ?? 0M, LotSize = p.Lot_Size > 0 ? p.Lot_Size ?? 1 : 1, QuantityInHand = p.Quantity_In_Hand ?? 0 } But i need to search without any special characters...

    Read the article

  • variable $base_path is not working

    - by Nidhi Prasad
    I am trying to get the value of base_path variable in PHP (on lamp server) . I have kept the code insider beta_test directory inside www directly. i.e, base path function should return " /beta_test/ " . But it is returning just single slash ( "/" ) . The code that I tried is <script type="text/javascript" src="<?php print base_path(); ?>sites/all/themes/people10/slider/call.js"></script> Expected output is <script type="text/javascript" src="/beta_test/sites/all/themes/people10/slider/call.js"></script> But its giving <script type="text/javascript" src="/sites/all/themes/people10/slider/call.js"></script> I am using php version 5.3.3.Can anyone please help me in getting this issue solved? I am newbie to php and drupal .

    Read the article

  • Check checkbox checked property using jQuery

    - by Prasad
    I need to check the checked property of a checkbox and perform an action based on the checked property using jQuery. For example, if the age checkbox is checked, then I need to show a textbox to enter age, else hide the textbox. But the following code returns false by default: if($('#isAgeSelected').attr('checked')) { $("#txtAge").show(); } else { $("#txtAge").hide(); } How do I successfully query the checked property?

    Read the article

  • Silverlight Cream for January 30, 2011 - 2 -- #1038

    - by Dave Campbell
    In this Issue: Max Paulousky, Renuka Prasad, Ollie Riches, Jesse Liberty(-2-, -3-, -4-, -5-), Medusa M, John Papa, Beth Massi, and Joost van Schaik. Above the Fold: Silverlight: "Stop What You Are Doing And Learn About Reactive Programming" Jesse Liberty WP7: "Windows Phone Looping Selector for Digits " Max Paulousky Lightswitch: "How To Send HTML Email from a LightSwitch Application" Beth Massi Shoutouts: Shawn Wildermuch has niether GooNews for users of his cool WP7 app or or for the WP7 Marketplace in general: R.I.P. GooNews From SilverlightCream.com: Windows Phone Looping Selector for Digits Max Paulousky expanded on the Looping selector for some customization allowing him to display width/height metric measurement selectors... great job, Max! WP7 – How to Create a Simple Checked Listbox In Windows Phone 7 Renuka Prasad has the code for a nicely-working checked Listbox for WP7 on his blog... the post is the code... WP7Contrib: Network Connectivity Push Model Ollie Riches had a post last week that I'm just catching up to... about the 'push model' for network connectivity they produced in WP7 Contrib. Using the Camera in Windows Phone 7 Jesse Liberty has a bunch of posts up... I'm just going to bite the bullet and catch up! ... this 'From Scratch post 24 is all about the camera in your WP7 dev travails... and he makes it look so darned easy :) Linq and Fluent Programming Jesse Liberty's next post is 'From Scratch 25 and is all about Linq and Fluent Programming which started with a discussion at Codemash with Bill Wagner... wanna get a handle on fluent programming? ... check this out. Stop What You Are Doing And Learn About Reactive Programming Another item you might want to get your head around is Reactive Programming, or Rx... Jesse Liberty has a great post up discussing this, as his 'From Scratch post 26... good external links, and lots of commentary as well. Rx–Reactive Programming for Windows Phone Jesse Liberty's 'From Scratch 27 follows the previous on about Rx by taking the Rx show to the WP7 development arena. Want a solid Rx example... here ya go! Reactive Extensions–Observable Sequences are First Class Objects Finally catching up with Jesse Liberty (for now), I find this 'From Scratch number 28 which is again on Rx and WP7 dev, expanding on the example from the previous post by harnessing the power of Rx Localizing Silverlight applications Medusa M has a nice post up at dotnetslackers on localization in Silverlight. If you haven't had to do localization before, it can get to be a pain... understanding an article like this will get you part of the way to being pain-free. Silverlight TV 59: What Goes Into Baking Silverlight? Very cool presentation for those of you interested in the bits ... John Papa's Silverlight TV number 59 is up and he's chatting with Andy Rivas about the process followed getting the bits to us. How To Send HTML Email from a LightSwitch Application Beth Massi's latest Lightswitch post is on sending HTML Email via SMTP from Lightswitch, and then follows that up with sending Email via Outlook automation. ViewModel driven animations using the Visual State Manager, DataStateBehavior and Expression Blend After some good user feedback, Joost van Schaik decided to make some modifications to his WP7 app, and got involved in a Page Title collapse animation driven from the ViewModel. Check out the nice write-up, video, external links, and source... all good! 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

  • Oracle Fusion Middleware (OFM) 11g (11.1.1.7) Starter Kit available & Customizable Demos

    - by JuergenKress
    OFM PS6 starter kit is now available from Global Sales Engineering (GSE, formerly DSS).  OFM Starter Kit provides a basic foundation to design and develop middleware demos. It is based on plug and play architecture and designed to use optimal hardware resources.  The starter kit is easily extendable to incorporate more Oracle Fusion Middleware components. New Features Built on the "Build your own demos (POC)" concept Starter Kit comes with core OFM Components Oracle Unified Directory (OUD, SOA, WebCenter Content and WebCenter Spaces) Starter Kit is available over the Internet and is tuned for optimal performance Portable/Downloadable version of the Starter Kit will be available soon. Please check Demos Corner. For and questions/feedback please contact chandan Das or Anand Prasad. Call to Action Review the Release Notes. & Visit the GSE Website and book the “OFM 11.1.1.7.0 Base Platform” customizable instance. Further information about this platform is available on this page. This announcement will appear in the archive as number 412. Customizable Demos We are happy to announce the availability of the SOA 11.1.1.7.0 Platform.  SOA 11g (11.1.1.7) Platform is fully featured, built on Plug and Play architecture, and designed to develop best of breed SOA demos. New Features Built on the "Build your own demos" concept Fusion Middleware products SOA, BAM, OSB, OEP, OER, OSR, WebCenter Content and WebCenter Spaces are installed, configured, and tuned for better performance Demo instances are available over the Internet Portable version of the platform will be available soon. Please check Demos Corner For questions/feedback please contact Anvesh Baluguri or Anand Prasad. Call to Action Review the Release Notes & Visit the GSE Website and book the “SOA 11.1.1.7.0 Platform” customizable demo. Further information about this platform is available on this page.  This announcement will appear in the archive as number 413. To get access to the demo environment please contact OPN! Support If you need assistance or encounter any issues please submit a GSE Repository ticket or call the GSE Support Hotline for assistance. The GSE Support Hotline is available 24 hours a day, Monday through Friday, at: US/CAN: +1.650.506.8763 & EMEA: +44 118 9240808 & APAC: +65.6436.2150 & LAD: +1.650.506.8763 & Japan: +81-3-6834-6097. SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Facebook Wiki Mix Forum Technorati Tags: OFM,demos,sales,marketing,dss,SOA Community,Oracle SOA,Oracle BPM,Community,OPN,Jürgen Kress

    Read the article

< Previous Page | 4 5 6 7 8 9  | Next Page >