Search Results

Search found 68 results on 3 pages for 'salman akram'.

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

  • MyEclipse builds workspace on saving JSP page every time

    - by Tahir Akram
    Whenever I save a jsp page, MyEclipse IDE start building the workspace. It should build when I change in any class file. Or if there are classes that not compiled. But why it start building whole workspace when I change in a JSP file. I am stuck on it. Please advise me on this problem. I am using MyEclipse 5.5 over Eclipse 3.2 Thanks.

    Read the article

  • How to scroll LI items in a fixed height UL?

    - by Tahir Akram
    Here is my example HTML. And I want to have scroll for my LI items. Which are of 2 levels. Means, I want to apply class on every UL. So how can I do that. By using JQuery or CSS tweaking. PS: I am using this example. <ul id="nav" class="dropdown"> <li class="dir"> Item_Root <ul> <li class="dir"> Item_1_Level <ul> <li>Item_Level_2</li> <li>Item_Level_2</li> <li>Item_Level_2</li> <li>.... up to N items</li> </ul> </li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>Item_Level_1</li> <li>.... up to N items</li> </ul> </li> </ul>

    Read the article

  • Getting text values of li (even nested) in JQuery

    - by Tahir Akram
    Hi; <ul> <li class="item-i">AI</li> <li class="item-ii">AII <ul class="level-2"> <li class="item-a">A</li> <li class="item-b">B</li> <li class="item-c">C</li> </ul> </li> <li class="item-iii">III</li> </ul> How can I get values AI AII A B C III? What I tried so far is following: $(document).ready(function() { $('li').each(function(index) { alert($(this).text()); }); }); But it does not gave me required results. When it reaches "item-ii" it gave all result. I want item one by one.

    Read the article

  • Reusing OAuth request token when user refresh page - Twitter4j on GAE

    - by Tahir Akram
    Hi I am using Twitter4J API on GAE/J. I want to use the request token when user came to my page. (called back URL). And press refresh button. I write following code for that. But When user press refresh button. I got Authentication credentials error. Please see the stacktrance. It works fine when user first time used that token. HomeServlet.java code: HttpSession session = request.getSession(); twitter.setOAuthConsumer(FFConstants.CONSUMER_KEY, FFConstants.CONSUMER_SECRET); String token = (String) session.getAttribute("token"); String authorizedToken = (String)session.getAttribute("authorizedToken"); User user = null; if (!token.equals(authorizedToken)){ AccessToken accessToken = twitter.getOAuthAccessToken( token, (String) session .getAttribute("tokenSecret")); twitter.setOAuthAccessToken(accessToken); user = twitter.verifyCredentials(); session.setAttribute("authorizedToken", token); session.setAttribute("user", user); }else{ user = (User)session.getAttribute("user"); } TwitterUser twitterUser = new TwitterUser(); twitterUser.setFollowersCount(user.getFollowersCount()); twitterUser.setFriendsCount(user.getFriendsCount()); twitterUser.setFullName(user.getName()); twitterUser.setScreenName(user.getScreenName()); twitterUser.setLocation(user.getLocation()); Please suggest how I can do that. I have seen on many website. They retain the user with the same token. Even if user press browser refresh buttion again and again. Please help. Exception stacktrace: Reason: twitter4j.TwitterException: 401:Authentication credentials were missing or incorrect. /friends/ids.xml This method requires authentication. at twitter4j.http.HttpClient.httpRequest(HttpClient.java:469) at twitter4j.http.HttpClient.get(HttpClient.java:412) at twitter4j.Twitter.get(Twitter.java:276) at twitter4j.Twitter.get(Twitter.java:228) at twitter4j.Twitter.getFriendsIDs(Twitter.java:1819) at com.tff.servlet.HomeServlet.doGet(HomeServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5233) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363) at com.google.net.rpc.impl.Server$2.run(Server.java:838) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56) at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:536) at com.google.net.rpc.impl.Server.startRpc(Server.java:793) at com.google.net.rpc.impl.Server.processRequest(Server.java:368) at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:448) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290) at com.google.net.async.Connection.handleReadEvent(Connection.java:466) at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:759) at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:205) at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101) at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251) at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:394) at java.lang.Thread.run(Unknown Source)

    Read the article

  • How to get global variable in JQuery functions

    - by Tahir Akram
    I want to access my global javascript variable in JQuery methods. But I am unable to get it when I go to attach a click even to a div. As following. How can I do that? I mean do I need to rely on hidden fields for some state management? var divCount = 3; $(function() { //divCount is accessible here $("#sortable").sortable({ revert: true }); $("#new").click(function(){ if (divCount<7){ //divCount is not accessible here. why? and how? var thisCount = ++divCount; $("#draggable_"+thisCount).addClass("draggable"); } }); });

    Read the article

  • Techniques to avoid DeadlineExceededException in GAE/J?

    - by Tahir Akram
    I am developing an Twitter4J web application in Google App Engine/Java. I need to show two lists. One is Twitter friends and other is followers. With photo and screen name. It is working fine for people who have 20-30 followers and friends. But it gave me DeadlineExceededException when I try a user who has 150+ followers and friends. GAE throws this exception if web request take time more than 30 seconds. So what techniques I can adopt to avoid this exception. Should I generate two AJAX calls for each of my list. After page loads. So that every call will have its own 30 secs limit? Or what else you think? I am gone make it. Please help.

    Read the article

  • HttpSession problem in Google App Engine/J

    - by Tahir Akram
    I am writting a Twitter web app by using Twitter4J on GAE/J. I am saving Twitter and Request Token objects in session so that to be used after call back. I have two servlets. IndexServlet sets session and HomeServlet get from session (hits on call back by twitter oAuth). If I comment out session handling lines in both servlets then call backs works fine. Please suggest any workaround. I am sharing my code here. IndexServlet.java Twitter twitter = new Twitter(); twitter.setOAuthConsumer("<masked>", "<masked>"); RequestToken requestToken = null; try { requestToken = twitter.getOAuthRequestToken(); log.info("OAuth token has been taken"); } catch (TwitterException e) { log.warning(e.toString()); } HttpSession session = request.getSession(); if (session.getAttribute("twitter")==null){ session.setAttribute("twitter", twitter); out.println("-----------------------------> session is set"); } if (session.getAttribute("token")==null){ session.setAttribute("token", requestToken); out.println("-----------------------------> session is set"); } String authUrl = requestToken.getAuthorizationURL(); HomeServlet.java HttpSession session = request.getSession(); twitter = (Twitter)session.getAttribute("twitter"); r = (RequestToken)session.getAttribute("token"); twitter.setOAuthAccessToken(r.getAccessToken()); twitter.updateStatus("Hello World!"); Exception javax.servlet.ServletException: java.lang.ArrayStoreException: [Ljava.lang.String; at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:239) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4950) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4948) at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359) at com.google.net.rpc.impl.Server$2.run(Server.java:823) at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)

    Read the article

  • SQL Insert multilingual characters

    - by Usman Akram
    I am trying to create a table in my MS SQL database for Languages. I want to store an English name of Language and a local name of language in the database. i.e. Language, Language(local) English, English German, Deutsch Italian, Italiano Japanese, ??? ... ... I have 279 languages that I want to import, but when I import it shows '?????' for some like japanese, Russian and arabic etc The database Collation is Latin1_General_CI_AS. I would also like advise on multilingual websites; if i have a database of product descriptions and I want to have translation in multiple languages, should I go for separate databases or Can I have translation in one databse? (I prefer not to duplicate data!). Anything else to make sure users are able to write comments in different languages (char encoding on web?) and can be stored in database.

    Read the article

  • Can you load Google Maps API v3 via Google AJAX API loader

    - by Salman A
    Some time ago I used the regular method of loading Google Maps API like this: <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=abcdefg&sensor=true"> Later I switched to Google AJAX APIs to load Google Maps API. This was because a couple of "widgets" on my website needed the Google Ajax API loader so I chose to be consistent and used the AJAX APIs to load Google Maps as well: <script type="text/javascript" src="http://www.google.com/jsapi?key=abcdef"></script> <script type="text/javascript"> google.load("maps", "2", {"other_params": "sensor=true"}); </script> Now that I have finally decided to use Google Maps API v3, this page does not list API v3 in the available version list. None of the examples on API v3 documentation show the use of AJAX APIs as well. Is is possible (and supported) to load Google Maps API v3 via AJAX API loader?

    Read the article

  • difference between sql providers SQLOLEDB and SQLNCLI

    - by salman
    Hi Everyone I just need to know what's the difference between sql providers SQLOLEDB and SQLNCLI. I have one scenario where one SSIS package should fail. Now when I use SQLNCLI provider in the connection string the package terminates by throwing the error as expected. However when I use SQLOLEDB provider, the package behaves abnormally by ending successfully without throwing any error? Can someone shed some light on this scenario? Thanks.

    Read the article

  • Absolutely positioned element inside fixed positioned element

    - by Salman A
    Related to my previous question, I have a <div style="position: fixed;"> footer. The footer contains <a style="display: block; float: left;"> elements. Upon clicking one of these links I want a div to popup above that link. I am experimenting with a couple of CSS settings and got acceptable results but I am not sure if my CSS will work across browsers. I am wondering if some one can tell me a bullet proof and tested CSS solution to achieve something like this:

    Read the article

  • JBoss Database Connection Pool

    - by Salman
    I am new to jboss and i have been asked to incorporate jboss connection pooling mechanism with an existing web application. Considering that a web application database layer is properly written i.e. all resultsets, statements and connections being closed properly when not needed, What all code changes i will have to make in my web app after i have configured the jboss datasource properly. Can anybody please point me to a tutorial or a code sample which uses jboss datasource in a web app.

    Read the article

  • Setting height of a relatively positioned DIV

    - by Salman A
    I have following HTML+CSS markup: <div id="protofade" style="position: relative;"> <div style="position: absolute;"><img src="slide-01.jpg"></div> <div style="position: absolute;"><img src="slide-02.jpg"></div> <div style="position: absolute;"><img src="slide-03.jpg"></div> </div> Notice that the slides are absolute-positioned inside a relative-positioned element so that the top-left corners of all slides are aligned together. All slides are equal height, but the height is not pre-determined hence this problem: the "protofade" div does not have a height. Is there any CSS trick that can make this div as tall as the first slide without explicitly specifying height: NNpx.

    Read the article

  • Prototype/Scriptaculous Cycle (Slideshow) Plugin

    - by Salman A
    I've got a bunch of websites that use a few Prototype/Scriptaculous plugins such as lightbox and modalbox, hence include references to these two libraries on various pages. I now need to implement a slideshow on every page, and to follow suit, I need a Prototype cycle or slideshow plugin. The requirements are fairly simple: images should fade-in/out every N seconds four controls: prev, pause, play, next i'd prefer to add images to the slideshow via JavaScript; not by adding too many tags Can any one suggest an existing plugin that can be customized easily and is not bloated like most of the other plugins. Here is a jQuery plugin which provides similar functionality: http://malsup.com/jquery/cycle/lite/

    Read the article

  • MySQL MyISAM table performance... painfully, painfully slow

    - by Salman A
    I've got a table structure that can be summarized as follows: pagegroup * pagegroupid * name has 3600 rows page * pageid * pagegroupid * data references pagegroup; has 10000 rows; can have anything between 1-700 rows per pagegroup; the data column is of type mediumtext and the column contains 100k - 200kbytes data per row userdata * userdataid * pageid * column1 * column2 * column9 references page; has about 300,000 rows; can have about 1-50 rows per page The above structure is pretty straight forwad, the problem is that that a join from userdata to page group is terribly, terribly slow even though I have indexed all columns that should be indexed. The time needed to run a query for such a join (userdata inner_join page inner_join pagegroup) exceeds 3 minutes. This is terribly slow considering the fact that I am not selecting the data column at all. Example of the query that takes too long: SELECT userdata.column1, pagegroup.name FROM userdata INNER JOIN page USING( pageid ) INNER JOIN pagegroup USING( pagegroupid ) Please help by explaining why does it take so long and what can i do to make it faster. Edit #1 Explain returns following gibberish: id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE userdata ALL pageid 372420 1 SIMPLE page eq_ref PRIMARY,pagegroupid PRIMARY 4 topsecret.userdata.pageid 1 1 SIMPLE pagegroup eq_ref PRIMARY PRIMARY 4 topsecret.page.pagegroupid 1 Edit #2 SELECT u.field2, p.pageid FROM userdata u INNER JOIN page p ON u.pageid = p.pageid; /* 0.07 sec execution, 6.05 sec fecth */ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE u ALL pageid 372420 1 SIMPLE p eq_ref PRIMARY PRIMARY 4 topsecret.u.pageid 1 Using index SELECT p.pageid, g.pagegroupid FROM page p INNER JOIN pagegroup g ON p.pagegroupid = g.pagegroupid; /* 9.37 sec execution, 60.0 sec fetch */ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE g index PRIMARY PRIMARY 4 3646 Using index 1 SIMPLE p ref pagegroupid pagegroupid 5 topsecret.g.pagegroupid 3 Using where Moral of the story Keep medium/long text columns in a separate table if you run into performance problems such as this one.

    Read the article

  • Fixed header and footers gotchas and suggestion

    - by Salman A
    I am planning to revamp my blog layout and this time I plan to have position: fixed headers and footers, both will be ~40px tall. The header will contain the logo and search buttons, the footer is going to contain lots of items such as subscribe buttons, related posts, jump to top/comments/bottom buttons and so on (list is not finalized). Before I jump into this I am wondering if someone can tell me if its a good idea or not. And I'd also appreciate if you can point out best-practices and gotchas. The footer will contain facebook chat style popup for related posts and some other features so I am also wondering if its going to work with this layout. There will be ads too so this leaves me worrying if its possible to have a the header laying on top of ads (specially flash ads). Links to sample layouts will be appreciated.

    Read the article

  • Dynamically loading CSS and JavaScript using Prototype

    - by Salman A
    I have a classic ASP application that I've been constantly trying to modularize. Currently, almost all pages are divided in to two pages: an outer page that contains the layout, header, sidebar, footer an inner page that contains ASP code The outer pages use dreamweaver templates so updating layout and replicating changes is easy. The inner pages are managed by me. Now here is the problem: I had to add a lightbox to one page, I chose Lightbox 2 which requires Prototype. I ended up adding Prototype on every page, assuming that sooner or later I'll upgrade all pages, forms, ajax requests and other javascript to use Prototype. I've now added two other plugins -- Modalbox and Protofade; each with a pair of .JS and .CSS files. Since I'll be using these three plugins on specific set of pages I am wondering if I can load the required CSS and JS files dynamically. I do not want to access the document head and add include files there, I'll have to do this from inside a DIV where all ASP code is supposed to go.

    Read the article

  • HTML Links on IzPack HTMLInfoPanel not working correctly

    - by Salman
    In my installer (created using IzPack) i am using HTMLInfoPanel, in the HTML data for this info panel I have a website link and an email address. The problem is 1) When I click on the website link, the page is opened in the Installer panel itself, instead of open the page in the default browse window. 2) When I click on the email link, the page in the panel just refreshes and does nothing instead of opening the mail client for the user. Following is HTML for the link: <a href="http://www.XYZ.com/" target="_blank">XYZ, Ltd.</a> HTML for the eMail link: <A HREF="mailto:[email protected]" target="_blank">[email protected]</A> I couldn't find any help fixing this in the IzPack documentation other forums. Can somebody help solve this? I am using IzPack V 4.1

    Read the article

  • how to ssh in perl script

    - by Salman
    Hi I want to SSH to a server and execute a simple command like "id" and get the output of it and store it to a file on my primary server. I do not privileges to install Net::SSH which would make my task very easy. please provide me a solution for this. I tried using backticks but I am not able to store the output on the machine from which my script runs.

    Read the article

  • Dynamically determining table name given field name in SQL server

    - by Salman A
    Strange situation: I am trying to remove some hard coding from my code. There is a situation where I have a field, lets say "CityID", and using this information, I want to find out which table contains a primary key called CityID. Logically, you'd say that it's probably a table called "City" but it's not... that table is called "Cities". There are some other inconsistencies in database naming hence I can never be sure if removing the string "ID" and finding out the plural will be sufficient. Note: Once I figure out that CityID refers to a table called Cities, I will perform a join to replace CityID with city name on the fly. I will appreciate if someonw can also tell me how to find out the first varchar field in a table given its name.

    Read the article

  • Inconsistent table width when hideing/showing a set of columns

    - by Salman A. Kagzi
    I have got a an HTML table of around 40+ columns. To make this table fit in the screen and have the data in a re presentable format we have section in this table. i.e. there are some column that are always visible and the remainder a made visible when s specific radio button (describing a section) is selected. Each radio button is associated to different number of columns. We show/hide a column by setting/removing "display:none" style in all the cell under that column. This all works Just fine. Now the real problem is with the width of the columns in this table. I cant use fixed with with pixel settings. I have tried using the percentage setting by giving 50% to the always visible part and rest 50% is divided between the column in a section. But I am unable to get a fixed behavior i.e. the size of the table columns across IE & FF. Some columns are just right while some are really huge. How can I get the table to give consistent column width across browsers?

    Read the article

< Previous Page | 1 2 3  | Next Page >