Search Results

Search found 63 results on 3 pages for 'varun naik'.

Page 3/3 | < Previous Page | 1 2 3 

  • memory usage in iOS

    - by varun
    My app has a simple UI interface having simple buttons, date picker, picker view, table view, action sheet, toolbar, alert boxes etc. No images, no network access. Just plain simple UI. It accesses SQLite database a lot. ARC option is enabled. I have many questions to ask: In .h files, I am defining IBOutlets like @property(nonatomic, retain) IBOutlet UIButton *bt; Where do i need to do bt=nil? in didReceiveMemoryWarning or viewDidLoad Live Bytes in Instruments tool is 4-5MB. Is it enough or I need to reduce memory usage? If so, how can I do so? Please mention few important points. Also, what all need to be added to the following methods? applicationDidReceiveMemoryWarning UIApplicationDidReceiveMemoryWarningNotification

    Read the article

  • Blackberry Developement

    - by varun
    Hi, I am new to Blackberry Development.This is my first Question for you people. I am creating a search box for my project. But it looks like blackberry doesn't have an internal api for creating single line Edit field. I have created a Custom Field by extending BasciEditField overriding methods like layout, paint. In paint i am drawing a rectangle with getpreferred width and height. But the cursor is coming at default position (top-left) in Edit Field. Can any body tell me how i can draw it where my text is(i.e in middle of Edit Field by calling drwaText()). Thanks,

    Read the article

  • Testing Hibernate DAO, without building the universe around it.

    - by Varun Mehta
    We have an application built using spring/Hibernate/MySQL, now we want to test the DAO layer, but here are a few shortcomings we face. Consider the use case of multiple objects connected to one another, eg: Book has Pages. The Page object cannot exist without the Book as book_id is mandatory FK in Page. For testing a Page I have to create a Book. This simple usecase is easy to manage, but if you start building a Library, till you don't create the whole universe surrounding the Book and Page, you cannot test it! So to test Page; Create Library Create Section Create Genre Create Author Create Book Create Page Now test Page. Is there an easy way to by pass this "universe creation" and just test he page object in isolation. I also want to be able to test HQLs related to Page. eg: SELECT new com.test.BookPage (book.id, page.name) FROM Book book, Page page. JUnit is supposed to run in isolation, so I have to write the whole test case to create the Page. Any tips will be useful.

    Read the article

  • OpenCalais API using jQuery

    - by Varun
    Hi I've wanted to do some language processing for an application and have been trying to use the OpenCalais API. The call to the API works perfectly and returns data. The problem is that even though I can see the data in the firebug, I cannot access it because the callback never triggers. Details: the call requires callback=? as it is a JSONP request. so callback=foo SHOULD call the foo method once the data is returned, it doesn't. in fact, if callback is anything other than ? the call fails and doesn't return any data. (i've also checked JSLint to make sure the returned JSON is valid). tried using $.ajax instead of $.getJSON so that I can get an error callback, but neither the success or error callbacks fire. in firebug, usually when you make a JSON request, the request shows up in the console. In this case, the request doesn't show up in the console, but instead shows in the "Net" tab in firebug...dunno what that means, but somehow the browser doesn't think its an XHR request. any ideas? thanks.

    Read the article

  • PHP uploads and checking

    - by user147685
    Hi all, I want to update/insert file by using upload box to the database but before that it will check for the file type thats only pdf can be upload. Somthing wrong with the codes and i dont know what..Please help here are part of my updates codes: $id=$rs['id']; $qry = "SELECT a.faillampiran FROM {$CFG->prefix}ptk_lampiran a, {$CFG->prefix}ptk b WHERE a.ptkid=$id and b.id=$id"; $sql = get_records_sql($qry); if($_POST['check']){ $ext = pathinfo($faillampiran,PATHINFO_EXTENSION); $err = "Upload Only PDF File. "; if ($ext =='pdf'){ $qry="UPDATE {$CFG->prefix}ptk_lampiran SET faillampiran='".$faillampiran."' WHERE ptkid='".$_GET['id']."'"; $sql=mysql_query($qry); $qry = "SELECT a.faillampiran FROM {$CFG->prefix}ptk_lampiran a, {$CFG->prefix}ptk b WHERE b.id = '".$rs[id]."' AND a.ptkid = '".$rs[id]."' "; $sql = get_records_sql($qry); foreach($sql as $rs){ ?> <?=basename($rs->faillampiran); ?><br> <? } ?> <tr><td></td><td></td><td> <input type="file" size="50" name="faillampiran" alt="faillampiran" value= "<?=$faillampiran;?>" /> <input type="submit" name="edit" value="Muat naik fail ini" /><br /> </td></tr> } else { echo "<script>alert('$err')</script>"; } } else { foreach($sql as $rs){ ?> <?=basename($rs->faillampiran); ?><br> <? } ?> <input type="file" size="50" name="faillampiran" alt="faillampiran" value= "<?=$faillampiran;?>" /> <input type="submit" name="edit" value="Muat naik fail ini" /><br /> <?} Sori bout the messiness of the codes, im still a beginner in this languages. thx

    Read the article

  • Network error during uninstallation

    - by varunp88
    Hi, We are using WiX to create a setup. The installation works fine, but during uninstallation an error says that the [FileName].msi is missing in C:\Windows\Installer and the setup starts rolling back. It is not reproduced in all the machines. It happens only in few machines. Could someone please give a solution to this ? What may be the reason that this happens only in 5 machines out of some 100 machines ? Thanks and Regards, Varun

    Read the article

  • DTF CustomAction to WiX

    - by varunp88
    Hi All, I'm using a DTF immediate custom action. The Custom Action takes minimum of 5 minutes to perform its operation. Until that in the progress dialog, only the progress text is visible. The progress bar doesn't move at all. I set the ProgressText in the WiX file. How can i make the progress bar to move, so that it will be much user friendly. Now its just idle. It makes the feeling that the installer is struck in that action. Could someone please help me, how to give value to the progress control from C# DTF Custom Action. Thanks, Varun

    Read the article

  • Can nginx be used as a reverse proxy for a backend websocket server?

    - by John Reilly
    We're working on a Ruby on Rails app that needs to take advantage of html5 websockets. At the moment, we have two separate "servers" so to speak: our main app running on nginx+passenger, and a separate server using Pratik Naik's Cramp framework (which is running on Thin) to handle the websocket connections. Ideally, when it comes time for deployment, we'd have the rails app running on nginx+passenger, and the websocket server would be proxied behind nginx, so we wouldn't need to have the websocket server running on a different port. Problem is, in this setup it seems that nginx is closing the connections to Thin too early. The connection is successfully established to the Thin server, then immediately closed with a 200 response code. Our guess is that nginx doesn't realize that the client is trying to establish a long-running connection for websocket traffic. Admittedly, I'm not all that savvy with nginx config, so, is it even possible to configure nginx to act as a reverse proxy for a websocket server? Or do I have to wait for nginx to offer support for the new websocket handshake stuff? Assuming that having both the app server and the websocket server listening on port 80 is a requirement, might that mean I have to have Thin running on a separate server without nginx in front for now? Thanks in advance for any advice or suggestions. :) -John

    Read the article

  • Adding defaults and indexes to a script/generate command in a Rails Template?

    - by charliepark
    I'm trying to set up a Rails Template that would allow for comprehensive set-up of a specific Rails app. Using Pratik Naik's overview (http://m.onkey.org/2008/12/4/rails-templates), I was able to set up a couple of scaffolds and models, with a line that looks something like this ... generate("scaffold", "post", "title:string", "body:string") I'm now trying to add in Delayed Jobs, which normally has a migration file that looks like this: create_table :delayed_jobs, :force => true do |table| table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue table.integer :attempts, :default => 0 # Provides for retries, but still fail eventually. table.text :handler # YAML-encoded string of the object that will do work table.text :last_error # reason for last failure (See Note below) table.datetime :run_at # When to run. Could be Time.now for immediately, or sometime in the future. table.datetime :locked_at # Set when a client is working on this object table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead) table.string :locked_by # Who is working on this object (if locked) table.timestamps end So, what I'm trying to do with the Rails template, is to add in that :default = 0 into the master template file. I know that the rest of the template's command should look like this: generate("migration", "createDelayedJobs", "priority:integer", "attempts:integer", "handler:text", "last_error:text", "run_at:datetime", "locked_at:datetime", "failed_at:datetime", "locked_by:string") Where would I put (or, rather, what is the syntax to add) the :default values in that? And if I wanted to add an index, what's the best way to do that?

    Read the article

  • Calculate the digital root of a number

    - by Gregory Higley
    A digital root, according to Wikipedia, is "the number obtained by adding all the digits, then adding the digits of that number, and then continuing until a single-digit number is reached." For instance, the digital root of 99 is 9, because 9 + 9 = 18 and 1 + 8 = 9. My Haskell solution -- and I'm no expert -- is as follows. digitalRoot n | n < 10 = n | otherwise = digitalRoot . sum . map (\c -> read [c]) . show $ n As a language junky, I'm interested in seeing solutions in as many languages as possible, both to learn about those languages and possibly to learn new ways of using languages I already know. (And I know at least a bit of quite a few.) I'm particularly interested in the tightest, most elegant solutions in Haskell and REBOL, my two principal "hobby" languages, but any ol' language will do. (I pay the bills with unrelated projects in Objective C and C#.) Here's my (verbose) REBOL solution: digital-root: func [n [integer!] /local added expanded] [ either n < 10 [ n ][ expanded: copy [] foreach c to-string n [ append expanded to-integer to-string c ] added: 0 foreach e expanded [ added: added + e ] digital-root added ] ] EDIT: As some have pointed out either directly or indirectly, there's a quick one-line expression that can calculate this. You can find it in several of the answers below and in the linked Wikipedia page. (I've awarded Varun the answer, as the first to point it out.) Wish I'd known about that before, but we can still bend our brains with this question by avoiding solutions that involve that expression, if you're so inclined. If not, Crackoverflow has no shortage of questions to answer. :)

    Read the article

  • How to configure and run a fastcgi application using Lighthttpd...

    - by Airy
    Hi, i've installed Lighthttpd for windows and i'd created a simple program in c++ which uses fastcgi libraries. i'll post the code here... #include "fcgi_stdio.h" #include <stdlib.h> int count; void initialize(void) { count=0; } void main(void) { initialize(); while (FCGI_Accept() >= 0) { printf("Content-type: text/html\r\n" "\r\n" "<title>FastCGI Hello! (C, fcgi_stdio library)</title>" "<h1>FastCGI Hello! (C, fcgi_stdio library)</h1>" "Request number %d running on host <i>%s</i>\n", ++count, getenv("SERVER_HOSTNAME")); } } I've spawned the fastcgi application in lighthttpd using the below configuration in lightttpd-inc.conf fastcgi.server = ( ".exe" => ( "" => ( "bin-path" => "D:\tinycgi.exe", "port" => 8080, "min-procs" => 1, "max-procs" => 1 ) ) ) while sending a request using the browser the server is responding with this message in the console 2009-02-18 16:08:34: (mod_fastcgi.c.2494) unexpected end-of-file (perhaps the fa stcgi process died): pid: 0 socket: tcp:localhost:8080 2009-02-18 16:08:34: (mod_fastcgi.c.3325) response not received, request sent: 1 024 on socket: tcp:localhost:8080 for /new/tinycgi.exe , closing connection I think the fastcgi application is not spawned correctly. Thank you, Varun

    Read the article

  • The Virtues and Challenges of Implementing Basel III: What Every CFO and CRO Needs To Know

    - by Jenna Danko
    The Basel Committee on Banking Supervision (BCBS) is a group tasked with providing thought-leadership to the global banking industry.  Over the years, the BCBS has released volumes of guidance in an effort to promote stability within the financial sector.  By effectively communicating best-practices, the Basel Committee has influenced financial regulations worldwide.  Basel regulations are intended to help banks: More easily absorb shocks due to various forms of financial-economic stress Improve risk management and governance Enhance regulatory reporting and transparency In June 2011, the BCBS released Basel III: A global regulatory framework for more resilient banks and banking systems.  This new set of regulations included many enhancements to previous rules and will have both short and long term impacts on the banking industry.  Some of the key features of Basel III include: A stronger capital base More stringent capital standards and higher capital requirements Introduction of capital buffers  Additional risk coverage Enhanced quantification of counterparty credit risk Credit valuation adjustments  Wrong  way risk  Asset Value Correlation Multiplier for large financial institutions Liquidity management and monitoring Introduction of leverage ratio Even more rigorous data requirements To implement these features banks need to embark on a journey replete with challenges. These can be categorized into three key areas: Data, Models and Compliance. Data Challenges Data quality - All standard dimensions of Data Quality (DQ) have to be demonstrated.  Manual approaches are now considered too cumbersome and automation has become the norm. Data lineage - Data lineage has to be documented and demonstrated.  The PPT / Excel approach to documentation is being replaced by metadata tools.  Data lineage has become dynamic due to a variety of factors, making static documentation out-dated quickly.  Data dictionaries - A strong and clean business glossary is needed with proper identification of business owners for the data.  Data integrity - A strong, scalable architecture with work flow tools helps demonstrate data integrity.  Manual touch points have to be minimized.   Data relevance/coverage - Data must be relevant to all portfolios and storage devices must allow for sufficient data retention.  Coverage of both on and off balance sheet exposures is critical.   Model Challenges Model development - Requires highly trained resources with both quantitative and subject matter expertise. Model validation - All Basel models need to be validated. This requires additional resources with skills that may not be readily available in the marketplace.  Model documentation - All models need to be adequately documented.  Creation of document templates and model development processes/procedures is key. Risk and finance integration - This integration is necessary for Basel as the Allowance for Loan and Lease Losses (ALLL) is calculated by Finance, yet Expected Loss (EL) is calculated by Risk Management – and they need to somehow be equal.  This is tricky at best from an implementation perspective.  Compliance Challenges Rules interpretation - Some Basel III requirements leave room for interpretation.  A misinterpretation of regulations can lead to delays in Basel compliance and undesired reprimands from supervisory authorities. Gap identification and remediation - Internal identification and remediation of gaps ensures smoother Basel compliance and audit processes.  However business lines are challenged by the competing priorities which arise from regulatory compliance and business as usual work.  Qualification readiness - Providing internal and external auditors with robust evidence of a thorough examination of the readiness to proceed to parallel run and Basel qualification  In light of new regulations like Basel III and local variations such as the Dodd Frank Act (DFA) and Comprehensive Capital Analysis and Review (CCAR) in the US, banks are now forced to ask themselves many difficult questions.  For example, executives must consider: How will Basel III play into their Risk Appetite? How will they create project plans for Basel III when they haven’t yet finished implementing Basel II? How will new regulations impact capital structure including profitability and capital distributions to shareholders? After all, new regulations often lead to diminished profitability as well as an assortment of implementation problems as we discussed earlier in this note.  However, by requiring banks to focus on premium growth, regulators increase the potential for long-term profitability and sustainability.  And a more stable banking system: Increases consumer confidence which in turn supports banking activity  Ensures that adequate funding is available for individuals and companies Puts regulators at ease, allowing bankers to focus on banking Stability is intended to bring long-term profitability to banks.  Therefore, it is important that every banking institution takes the steps necessary to properly manage, monitor and disclose its risks.  This can be done with the assistance and oversight of an independent regulatory authority.  A spectrum of banks exist today wherein some continue to debate and negotiate with regulators over the implementation of new requirements, while others are simply choosing to embrace them for the benefits I highlighted above. Do share with me how your institution is coping with and embracing these new regulations within your bank. Dr. Varun Agarwal is a Principal in the Banking Practice for Capgemini Financial Services.  He has over 19 years experience in areas that span from enterprise risk management, credit, market, and to country risk management; financial modeling and valuation; and international financial markets research and analyses.

    Read the article

< Previous Page | 1 2 3