Search Results

Search found 74 results on 3 pages for 'srinivas nayak'.

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

  • Casting of interfaces

    - by Srinivas Reddy Thatiparthy
    interfaces provide a useful abstraction capability. One can have a class Foo implement some interfaces, say A, B, and C. Some client code may get a reference of type A, others one of type B, etc. each actually the same Foo object but the interface exposing only a narrow subset of the functionality. Of course, evil client code can try to cast the A reference to Foo, then access the other functionality.How to prevent this?

    Read the article

  • Any alternative or other option for anchor point in cocos2d ?

    - by Srinivas
    I have game application (cocos2d) in which, a ball is to be shooted from a cannon, this ball travels through a trajectory path and land on a building. Now the problem is that according to the requirement I have to increase the size of the background image due to which I have to set the Building image with anchor point now I have to put fire image on the building dynamically on different window locations, for this should I use same anchor point option or there are some alternative options to accomplish this task.

    Read the article

  • Gravatar : Is there a default image?

    - by Ritesh M Nayak
    I have implemented gravatar for a portal I am building and wanted to know if there is a default image URL for gravatar? Not all people who visit the site are logged in or have email addresses, in such a case, is there a default image that can be shown (accessible via gravatar url)

    Read the article

  • Can anyone tell me about a jQuery modal dialog box library that doesn't suck

    - by Ritesh M Nayak
    jQuery based modal dialog boxes are great as long as you do as much as the example tells you to. I need a jQuery based modal dialog box library that has to have the following characteristics: It should be fast, something like the add and link dialog on StackOverflow. Most libraries take an eternity to load the dialog with its fancy effects and stuff. I want to call it using a script. Show a hidden div or a span element inline. MOst of the libraries talk filling an anchor with rel, class and href=#hiddenDiv sort of things. I need to be able to what I want without adding unnecessary attributes to my anchor. Something like this function showDialog(values) { processToChangeDom(values); changeDivTobeDisplayed(); modalDialog.show(); } It should reflect changes I make to the DOM in the hidden Div. I used facebox and found out that it makes a copy of the hidden div and changes to the DOM doesn't reflect on the modal window. I need to be able call the close modal div using javascript and also attach beforeOpen and afterClose handlers to the action. Does anyone have any suggestions? I have already tried facebox, simplemodal and a whole range of libraries, most of them don't support one or the other of these functions I described above.

    Read the article

  • How do I get the java.concurrency.CyclicBarrier to work as expected

    - by Ritesh M Nayak
    I am writing code that will spawn two thread and then wait for them to sync up using the CyclicBarrier class. Problem is that the cyclic barrier isn't working as expected and the main thread doesnt wait for the individual threads to finish. Here's how my code looks: class mythread extends Thread{ CyclicBarrier barrier; public mythread(CyclicBarrier barrier) { this.barrier = barrier; } public void run(){ barrier.await(); } } class MainClass{ public void spawnAndWait(){ CyclicBarrier barrier = new CyclicBarrier(2); mythread thread1 = new mythread(barrier).start(); mythread thread2 = new mythread(barrier).start(); System.out.println("Should wait till both threads finish executing before printing this"); } } Any idea what I am doing wrong? Or is there a better way to write these barrier synchronization methods? Please help.

    Read the article

  • What is a good git server frontend for self hosted git repositories

    - by Ritesh M Nayak
    I am planning on deploying git for a project I am currently working on and was wondering if there are any free softwares that provide an easy to use web view of the git repository. I am primarily interested in using the front end to track changes, see diff information etc. There is a list of such front ends available here. Does anyone have any experience with any of these ? Which one would you suggest An open source clone of github would do just fine actually :D but I know thats too much to ask .

    Read the article

  • Hudson build on URL token

    - by Ritesh M Nayak
    I configured a hudson instance and have created jobs. While creating builds, I was able to see this option "Trigger the build by accessing this URL + SecretTOKEN" option. Now, I am unable to see that for any new jobs I create. Am I missing some setting or a configuration? The only change I made was running the servlet container from Root to a regular user.

    Read the article

  • Most useful Rails plugins, Ruby libraries and Ruby gems?

    - by Srinivas Iyer
    I have seen many sites which provide the whole list of Rails plugins, Ruby libraries and Ruby gems, but we hardly use few of them and some may not suit our requirement and we spend a whole lot of time searching for useful plugins which suits our requirement. I have created this poll, people can post useful libraries, gems and plugins which they have come across. It would be great help for newbies like me and to the entire Ruby on Rails community. Note: to keep this poll as useful as possible, please remember: Post only one library, gem, or plugin per answer Mention the name of the library, gem, or plugin which you find it useful. URL of the location of the resource We don't want duplicate answers, so before posting check if the library has been mentioned already. Thanks

    Read the article

  • What is the best practice for writing bookmarklets

    - by Ritesh M Nayak
    I am writing some bookmarklets for a project that I am currently working on and I was wondering what the best practice for writing a bookmarklet was. I did some looking around and this is what I came up with javascript:void((function() { var%20e=document.createElement('script'); e.setAttribute('type','text/javascript'); e.setAttribute('src','http://someserver.com/bookmarkletcode.js'); document.body.appendChild(e) })()) I felt this is nice because the code can always be changed (since its requested every time) and still it acts like a bookmarklet. Are there are any problems to this approach ? Browser incompatibility etc? What is the best practice for this?

    Read the article

  • How to override a class method of the gem in rails Application ?

    - by Srinivas Iyer
    Hi, Best practice to Override a class method of the gem in rails Application . I need to override the behaviour of the find method of a gem. following is the code in the gem module Youtube class display attr_accessor :base def find(id, options = {}) detailed = convert_to_number(options.delete(:detailed)) options[:detailed] = detailed unless detailed.nil? base.send :get, "/get_youtube", options.merge(:youtube_id => id) end end end How do i override the above find method in my YoutubeSearch Controller of Rails Application ? def find(id, options = {}) //Code here end Thanks

    Read the article

  • Hudson trigget builds remotely gives a forbidden 403 error

    - by Ritesh M Nayak
    I have a shell script on the same machine that hudson is deployed on and upon executing it, it calls wget on a hudson build trigger URL. Since its the same machine, I access it as http://localhost:8080/hudson/job/jobname/build?token=sometoken Typically, this is supposed to trigger a build on the project. But I get a 403 forbidden when I do this. Anybody has any idea why? I have tried this using a browser and it triggers the build, but via the command line it doesn't seem to work. Any ideas?

    Read the article

  • A question on delegates and method parameters

    - by Srinivas Reddy Thatiparthy
    public class Program { delegate void Srini(string param); static void Main(string[] args) { Srini sr = new Srini(PrintHello1); sr += new Srini(PrintHello2); //case 2: sr += new Srini(delegate(string o) { Console.WriteLine(o); }); sr += new Srini(delegate(object o) { Console.WriteLine(o.ToString()); }); //case 4: sr += new Srini(delegate { Console.WriteLine(“This line is accepted,though the method signature is not Comp”); });//case 5 sr("Hello World"); Console.Read(); } static void PrintHello1(string param) { Console.WriteLine(param); } static void PrintHello2(object param) { Console.WriteLine(param); } } Compiler doesn't complain about the case 2(see the comment),well,the reason is straight forward since string inherits from object. ,along the same lines ,Why is it complaining for anonymous method types(see the comment //case 4:) that “Cannot convert anonymous method to delegate type 'DelegateTest.Program.Srini' because the parameter types do not match the delegate parameter types” where as in case of normal method it doesn't ?or am i comparing apples with oranges? Another case is why is it accepting anonymous method without parameters?

    Read the article

  • How to display Unicode data with PHP

    - by Srinivas Tamada
    table 'abc' data : tid title 1 ????????????? ?. 2 ?????? ?????? $sql=mysql_query("select title from abd where tid='1'"); $row=mysql_fetch_array($sql); $title = $row['title']; echo $title; OutPut displaying like this: ???????????????? But I want to display ????????????? ?.

    Read the article

  • Hudson trigger builds remotely gives a forbidden 403 error

    - by Ritesh M Nayak
    I have a shell script on the same machine that hudson is deployed on and upon executing it, it calls wget on a hudson build trigger URL. Since its the same machine, I access it as http://localhost:8080/hudson/job/jobname/build?token=sometoken Typically, this is supposed to trigger a build on the project. But I get a 403 forbidden when I do this. Anybody has any idea why? I have tried this using a browser and it triggers the build, but via the command line it doesn't seem to work. Any ideas?

    Read the article

  • Redirecting the response from a filter throws an IllegalStateException

    - by Ritesh M Nayak
    I am writing a filter that will handle all authentication related tasks. My filter is a standard servlet filter as shown below @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { UserSession attribute = (UserSession)request.getSession().getAttribute("user_session_key"); if(attribute!=null && attribute.isValid()) { //proceed as usual, chain.doFilter(req, res); return; } else { //means the user is not authenticated, so we must redirect him/her to the login page ((HttpServletResponse)res).sendRedirect("loginpage"); return; } } But when I do this, I get an IllegalStateException thrown by Tomcat's ResponseFacade. How do I acheive this in a filter. I read in other SO threads that in TOmcat this is a problem as the response object is already commited. How do I get past this ?

    Read the article

  • How does one implement a truly asynchronous java thread

    - by Ritesh M Nayak
    I have a function that needs to perfom two operations, one which finishes fast and one which takes a long time to run. I want to be able to delegate the long running operation to a thread and I dont care when the thread finishes, but the threads needs to complete. I implemented this as shown below , but, my secondoperation never gets done as the function exits after the start() call. How I can ensure that the function returns but the second operation thread finishes its execution as well and is not dependent on the parent thread ? public void someFunction(String data) { smallOperation() Blah a = new Blah(); Thread th = new Thread(a); th.Start(); } class SecondOperation implements Runnable { public void run(){ // doSomething long running } }

    Read the article

< Previous Page | 1 2 3  | Next Page >