Search Results

Search found 39 results on 2 pages for 'rajat saxena'.

Page 2/2 | < Previous Page | 1 2 

  • ie7 preserve whitespace on dynamically injected text

    - by Rajat
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript"> function init(){ document.getElementById('test2').innerHTML = '1 2'; } </script> <style type="text/css"> #test{ white-space:pre; } #test2{ white-space:pre; } </style> <title></title> </head> <body onload="init();"> <div id="test"> 1 2 </div> <div id="test2"></div> </body> </html> Here is an example page showing my problem. I have two divs. Each has this text '1 2' with white-space. The only difference is that one is injected dynamically and one is in the html itself. If you open the above page in IE7, the text in div test2 doesn't respect white space. How can i get the same behavior for the text that is dynamically injected?? P.S. My doctype is triggering standards mode on IE7.

    Read the article

  • Utilising cssText to set styles with JavaScript

    - by Rajat
    I was going through Nicholas Zakas presentation on JavaScript here : http://www.slideshare.net/nzakas/writing-efficient-javascript (slide number: 89/139) He recommends using cssText property whenever you are setting a bunch of styles through JavaScript. The best solution is obviously adding those styles to a class and then using JS to add the classname to an element.However, in many situations, We resort to just setting the properties directly within JS when the number of properties are low. It seems from his presentation that using cssText property would be more efficient in such scenarios.I tried to look up more on the property but couldn't find much information. Has anyone used the 'cssText' property ? It would be great to have some more technical info on how the property helps.

    Read the article

  • Ideas on frameworks in .NET that can be used for job processing and notifications

    - by Rajat Mehta
    Scenario: We have one instance of WCF windows service which exposes contracts like: AddNewJob(Job job), GetJobs(JobQuery query) etc. This service is consumed by 70-100 instances of client which is Windows Form based .NET app. Typically the service has 50-100 inward calls/minute to add or query jobs that are stored in a table on Sql Server. The same service is also responsible for processing these jobs in real time. It queries database every 5 seconds picks up the queued jobs and starts processing them. A job has 6 states. Queued, Pre-processing, Processing, Post-processing, Completed, Failed, Locked. Another responsibility on this service is to update all clients on every state change of every job. This means almost 200+ callbacks to clients per second. Question: This whole implementation is done using WCF Duplex bindings and works perfectly fine on small number of parallel jobs. Problem arises when we scale it up to 1000 jobs at a time. The notifications don't work as expected, it leads to memory overflow etc. Is there any standard framework that can provide a clean infrastructure for handling this scenario?? Apologies for the long explanation!

    Read the article

  • Read IFrame content using JavaScript

    - by Rajat
    Ok, This is my first time dealing seriously with IFrames and I cant seem to understand a few things: First the sample code I am testing with: <head> <script type="text/javascript"> function init(){ console.log("IFrame content: " + window.frames['i1'].document.getElementsByTagName('body')[0].innerHTML); } </script> </head> <body onload="init();"> <iframe name="i1" src="foo.txt"/> </body> the file "foo.txt" looks like this: sample text file Questions: 1) The iframe seems to be behaving as a HTML document and the file text is actually part of the body instead. Why ? Is it a rule for an IFrame to be a HTML document. Is it not possible for the content of an iframe to be just plain text ?? 2) The file content gets wrapped inside a pre tag for some reason. Why is this so ? Is it always the case? 3) My access method in the javascript is working but is there any other alternative? [native js solutions please] If the content is wrapped in a pre tag always then I will actually have to lookup inside the pre tag rather than lookup the innerHTML

    Read the article

  • Stopping/Removing an embedded player.

    - by Rajat
    Hi, I am working on a webpage where i have to include an embedded video.The video is hosted on some other domain.I am able to embed the video and autoplay once the web page is loaded.However i have a requirement where i have to remove the div displaying the video once it is played , and in place of the video i have to now display some text. The problem is i am able to do autoplay by the autostart variable in the embed tag...but how do i know that the video has ended.The hosting company only provides an embed tag and they donot have any player apis to use. One way (or rather a workaround) that i feel is to start a eventlistener in the background and see for the total time of the video and when that time is reached remove the content.But the problem is what if the user pauses the video, then also the div would be deleted. I am new to flash.Are there some standard variables or actions that we can pass as flashvars to a swf file to stop a running player or to know the state of the player (Note we are only getting an embed tag from the video hosting site so we donot own that code and they donot have much documenation to help me out with the code). Thanks for your help.

    Read the article

  • replace all link href's with return of a function, with regex

    - by Rajat Singhal
    I have a function which returns a modified url, if passed a url.. I need to call this function on hrefs of all the links in my html data.. I can't use DomDocument, it's in php cli, I need regex solution.. I have tried preg_replace, and preg_replace_callback, but I simply don't understand the whole concept of using $1, $2 in the replacement string..If somebody can point to a good documentation,that'll be great too.. function modifyUrl($old_url) { ...... return $new_url; } $html = "...";//Long html content having links //need to call modifyUrl for all link's hrefs..

    Read the article

  • Is String.concat slower than Array approach to join strings

    - by Rajat
    Strings in JavaScript are immutable. Across the web and here on Stack Overflow as well, I came across the Array approach to concatenate strings: var a = []; a.push(arg1,arg,2....); console.log(a.join('')); I know that this approach is better than the simple console.log(arg1 + arg2 +.....); for reasons of skipping creating intermediate objects but how does it fair better against : arg1.concat(arg2,arg3.....);

    Read the article

  • Using jsDoc in Notepad++

    - by Rajat
    Hi, I use notepad++ for my JavaScript development now. I am wondering if anyone has successfully integrated jsDoc with notepad++ for easy code commenting. I was usint Aptana earlier and it was already integrated in it as ScriptDoc I believe but Aptana grew out to be painfully slow.

    Read the article

  • Floating an inline element to the right of a div

    - by Rajat
    I want to right-align an inline element to the right of a div. I have seen float="right" applied on a span to right align it but it seems semantically incorrect to me as floats are supposed to move "boxes" or block elements to the right or left of a container element. Is my understanding of Float wrong or is there another way of right-aligning inline elements in a container DIV.

    Read the article

  • CSS selector for first element with class

    - by Rajat
    I have a bunch of elements with a classname <p class="red"></p> <div class="red"></div> I cant seem to select the first element with the class="red" using the following CSS rule: .red:first-child{ border:5px solid red; } What is wrong in this selector and how to correct it ??

    Read the article

  • Retrieving the value of a concatenated variable within a Java FOR loop

    - by Rajat
    I have been using this "logic" in C++ and VB with success, but am tied up in Java... Simply put, public void DataProviderExample(String user, String pwd, String no_of_links, String link1, String link2, String link3) { for (int i=1;i<=no_of_links;i++) { String link = "link"+i; System.out.println(link); } Now, if the variables link1, link2 and link3 have a value of "X", "Y" and "Z" respectively, upon running this program, I get the following output - link1 link2 link3 What I want is - X Y Z Any ideas?

    Read the article

  • How to fix “Add Host to Workflow Farm problem” when installing Windows Azure Workflow in SharePoint2013 Preview

    - by ybbest
    Problem: When I try to configure the windows Azure workflow in SharePoint2013 preview, I got the following error see screenshot below. Detailed log can be found here. Solution: I asked the question in SharePoint StackExchange , Rajat’s help me to fix the problem .The solution for this is quite simple, instead of using the short form for your RunAs account, you should use the fully qualified name. So change administrator@YBBEST to [email protected] make the problem go away as shown below. Having other problems , check out AC’S blog on trouble-shooting the installation. References: How to: Set up and configure SharePoint 2013 workflows

    Read the article

  • Tuning GlassFish for Production

    - by arungupta
    The GlassFish distribution is optimized for developers and need simple deployment and server configuration changes to provide the performance typically required for production usage. The formal Performance Tuning Guide provides an explanation of capacity planning and tuning tips for application, GlassFish, JVM, and the operating system. The GlassFish Server Control (only with the commercial edition) also comes with Performance Tuner that optimizes the runtime for optimal throughput and scalability. And then there are multiple blogs that provide more insights as well: • Optimizing GlassFish for Production (Diego Silva, Mar 2012) • GlassFish Production Tuning (Vegard Skjefstad, Nov 2011) • GlassFish in Production (Sunny Saxena, Jul 2011) • Putting GlassFish v3 in Production: Essential Surviving Guide (JeanFrancois, Nov 2009) • A GlassFish Tuning Primer (Scott Oaks, Dec 2007) What is your favorite source for GlassFish Performance Tuning ?

    Read the article

< Previous Page | 1 2