Search Results

Search found 14236 results on 570 pages for 'times square'.

Page 92/570 | < Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >

  • Getting started with SQLite (Android)

    - by Tarmon
    Hey Everyone, I have limited SQL background, basically a small amount of manipulation through HTML and mostly with pre-existing databases. What I am trying to do is set up a database that will store time information for bus routes. So basically I have different routes with stops for each route and then a list of times that the bus arrives at each stop. Here is an example of a table of times from their website: Link. I am wondering what would be the best way to layout my database/tables? Also what is the purpose of the _id field in each table? Thanks, Rob! P.S. Sorry if my lack of knowledge on the subject has caused me to post a duplicate question.

    Read the article

  • C# drawing and invalidating 2 lines to meet

    - by BlueMonster
    If i have 2 lines on a page as such: e.Graphics.DrawLine(blackPen, w, h, h, w); e.Graphics.DrawLine(blackPen, w2, h2, h2, w2); how would i animate the first line to reach the second line's position? I have the following method which calculates the distance between two points (i'm assuming i would use this?) public int Distance2D(int x1, int y1, int x2, int y2) { // ______________________ //d = &#8730; (x2-x1)^2 + (y2-y1)^2 // //Our end result int result = 0; //Take x2-x1, then square it double part1 = Math.Pow((x2 - x1), 2); //Take y2-y1, then sqaure it double part2 = Math.Pow((y2 - y1), 2); //Add both of the parts together double underRadical = part1 + part2; //Get the square root of the parts result = (int)Math.Sqrt(underRadical); //Return our result return result; } How would i re-draw the line (on a timer) to reach the second line's position? I've looked a lot into XAML (story-boarding) and such - but i want to know how to do this on my own. Any ideas? I know i would need a method which runs in a loop re-drawing the line after moving the position a tid bit. I would have to call Invalidate() in order to make the line appear as though it's moving... but how would i do this? how would i move that line slowly over to the other line? I'm pretty sure i'd have to use double buffering if i'm doing this as well... as such: SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); This doesn't quiet work, i'm not quiet sure how to fix it. Any ideas? protected override void OnPaint(PaintEventArgs e) { Distance2D(w, h, w2, h2); if (w2 != w && h2 != h) { e.Graphics.DrawLine(blackPen, (w * (int)frame), (h * (int)frame), (h * (int)frame), (w * (int)frame)); e.Graphics.DrawLine(blackPen, w2, h2, h2, w2); } else { t.Abort(); } base.OnPaint(e); } public void MoveLine() { for (int i = 0; i < 126; i++) { frame += .02; Invalidate(); Thread.Sleep(30); } } private void button1_Click(object sender, EventArgs e) { t = new Thread(new ThreadStart(MoveLine)); t.Start(); }

    Read the article

  • CKEditor Custom Plugins Button

    - by isparling
    I've written a custom plugin for CKEditor--successful on all fronts, save one currently: I can't, for the life of me, figure out how to customize the image on the button in the toolbar of the editor. As I'm a new user, you'll have to click through to see attached image; the highlighted square in the top left should have a pretty picture (like most of the other toolbar items). Thanks much for thoughts/advice/help. Isaac Screenshot: http://imgur.com/ZNNKe.jpg

    Read the article

  • A script that writes errors and should create a event-error

    - by helmich
    this if it works should check the internet connection if there is a connection it does nothing. if there isn't a connection it should write a error in a txtfile if that happend 5 times it should create a error but it doesn't I will show you the whole code that i have now and the piece of code that i want in a loop. I can't get it in the way i want. I want it to creat 1 Event-error after 5 times writing to the file. this is the whole code i will put the code i want in a loop under it strDirectory = "Z:\text2" strFile = "\foutmelding.txt" strText = "De connectie is verbroken" strWebsite = "www.helmichbeens.com" If PingSite(strWebsite) Then WScript.Quit 'Website is pingable - no further action required Set objFSO = CreateObject("Scripting.FileSystemObject") RecordSingleEvent Dim fout For fout = 1 To 5 : Do If fout = 5 Then Exit Do Set WshShell = WScript.CreateObject("WScript.Shell") Call WshShell.LogEvent(1, "Test Event") Loop While False : next '------------------------------------ 'Record a single event in a text file '------------------------------------ Sub RecordSingleEvent If Not objFSO.FolderExists(strDirectory) Then objFSO.CreateFolder(strDirectory) Set objTextFile = objFSO.OpenTextFile(strDirectory & strFile, 8, True) objTextFile.WriteLine(Now & strText) objTextFile.Close End sub '---------------- 'Ping my web site '---------------- Function PingSite( myWebsite ) Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" ) objHTTP.Open "GET", "http://" & myWebsite & "/", False objHTTP.SetRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MyApp 1.0; Windows NT 5.1)" On Error Resume Next objHTTP.Send PingSite = (objHTTP.Status = 200) On Error Goto 0 End Function '----------------------------------------------- 'Counts the number of lines inside the text file '----------------------------------------------- Function EventCount(fout) strData = objFSO.OpenTextFile(strDirectory & strFile,ForReading).ReadAll arrLines = Split(strData,vbCrLf) EventCount = UBound(arrLines) End Function This is the whole code, and it doesnt work correctly becaus it creats a event-log rightaway and it should do that after the script has written 5 times to the textfile here is the code that writes to a textfile Sub RecordSingleEvent If Not objFSO.FolderExists(strDirectory) Then objFSO.CreateFolder(strDirectory) Set objTextFile = objFSO.OpenTextFile(strDirectory & strFile, 8, True) objTextFile.WriteLine(Now & strText) objTextFile.Close End sub and here is the code but this part doesnt not work or atleast i think it is this part Dim fout For fout = 1 To 5 : Do If fout = 5 Then Exit Do Set WshShell = WScript.CreateObject("WScript.Shell") Call WshShell.LogEvent(1, "Test Event") Loop While False : next Function EventCount(fout) strData = objFSO.OpenTextFile(strDirectory & strFile,ForReading).ReadAll arrLines = Split(strData,vbCrLf) EventCount = UBound(arrLines) End Function this is the not working part and I don't know what to do anymore so can you please take a look at it tank you very much. btw: this code can be very usefull for a network administrator

    Read the article

  • Query performs poorly unless a temp table is used

    - by Paul McLoughlin
    The following query takes about 1 minute to run, and has the following IO statistics: SELECT T.RGN, T.CD, T.FUND_CD, T.TRDT, SUM(T2.UNITS) AS TotalUnits FROM dbo.TRANS AS T JOIN dbo.TRANS AS T2 ON T2.RGN=T.RGN AND T2.CD=T.CD AND T2.FUND_CD=T.FUND_CD AND T2.TRDT<=T.TRDT JOIN TASK_REQUESTS AS T3 ON T3.CD=T.CD AND T3.RGN=T.RGN AND T3.TASK = 'UPDATE_MEM_BAL' GROUP BY T.RGN, T.CD, T.FUND_CD, T.TRDT (4447 row(s) affected) Table 'TRANSACTIONS'. Scan count 5977, logical reads 7527408, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'TASK_REQUESTS'. Scan count 1, logical reads 11, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. SQL Server Execution Times: CPU time = 58157 ms, elapsed time = 61437 ms. If I instead introduce a temporary table then the query returns quickly and performs less logical reads: CREATE TABLE #MyTable(RGN VARCHAR(20) NOT NULL, CD VARCHAR(20) NOT NULL, PRIMARY KEY([RGN],[CD])); INSERT INTO #MyTable(RGN, CD) SELECT RGN, CD FROM TASK_REQUESTS WHERE TASK='UPDATE_MEM_BAL'; SELECT T.RGN, T.CD, T.FUND_CD, T.TRDT, SUM(T2.UNITS) AS TotalUnits FROM dbo.TRANS AS T JOIN dbo.TRANS AS T2 ON T2.RGN=T.RGN AND T2.CD=T.CD AND T2.FUND_CD=T.FUND_CD AND T2.TRDT<=T.TRDT JOIN #MyTable AS T3 ON T3.CD=T.CD AND T3.RGN=T.RGN GROUP BY T.RGN, T.CD, T.FUND_CD, T.TRDT (4447 row(s) affected) Table 'Worktable'. Scan count 5974, logical reads 382339, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table 'TRANSACTIONS'. Scan count 4, logical reads 4547, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table '#MyTable________________________________________________________________000000000013'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. SQL Server Execution Times: CPU time = 1420 ms, elapsed time = 1515 ms. The interesting thing for me is that the TASK_REQUEST table is a small table (3 rows at present) and statistics are up to date on the table. Any idea why such different execution plans and execution times would be occuring? And ideally how to change things so that I don't need to use the temp table to get decent performance? The only real difference in the execution plans is that the temp table version introduces an index spool (eager spool) operation.

    Read the article

  • Making a grid on iPhone using Opengl

    - by TheGambler
    I'm trying to make a grid similar to what you would see in these geo games(geoDefense/geometry wars). I'm wanting to apply separate transformation matrixes to each to create different effects. So, it makes since to me that I need to draw each square separately to that I can apply a different transformation to each one. The problem I'm having is mapping these grids out or connecting the squares. The coordinate systems is still confusing to me. I know it would be easy just to create a huge triangle strip but I'm not able to figure out a way to apply separate transformations to each square( quad ) if I use triangle strips. So first question: Can you apply different transformations to quads if you use a triangle strip to draw a huge grid? If so, any tips suggestions on how to do so? If not, how does one usually connect textures without using triangle strips? Here is my coord setup: const GLfloat zNear = 0.01, zFar = 1000.0, fieldOfView = 45.0; GLfloat size; glEnable(GL_DEPTH_TEST); glMatrixMode(GL_PROJECTION); size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0); CGRect rect = view.bounds; glFrustumf(-size, size, -size / (rect.size.width / rect.size.height), size / (rect.size.width / rect.size.height), zNear, zFar); glViewport(0, 0, rect.size.width, rect.size.height); Here is my draw: - (void)drawView:(GLView*)view; { int loop; //glColor4f(1.0, 1.0, 1.0, 0.5); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Grid Loop for( loop = 0; loop < kNumberSectionsInGrid; loop++ ) { //glLoadIdentity(); static Matrix3D shearMatrix; Matrix3DSetShear(shearMatrix, 0.2, 0.2); static Matrix3D finalMatrix; //Matrix3DMultiply(temp2Matrix, shearMatrix, finalMatrix); glLoadMatrixf(shearMatrix); glTranslatef(-1.0f,(float)loop,-3.0f); glScalef(0.1, 0.1, 0.0); Vertex3D vertices[] = { {-1.0, 1.0, 0.5}, { 1.0, 1.0, 0.5}, { -1.0, -1.0, 0.5}, { 1.0, -1.0, 0.5} }; static const Vector3D normals[] = { {0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, {0.0, 0.0, 1.0}, }; GLfloat texCoords[] = { 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0 }; glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glBindTexture(GL_TEXTURE_2D, texture[0]); glVertexPointer(3, GL_FLOAT, 0, vertices); glNormalPointer(GL_FLOAT, 0, normals); glTexCoordPointer(2, GL_FLOAT, 0, texCoords); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); } } glMatrixMode(GL_MODELVIEW);

    Read the article

  • Get the subdomain from a URL

    - by jb
    Getting the subdomain from a URL sounds easy at first. http://www.domain.example Scan for the first period then return whatever came after the "http://" ... Then you remember http://super.duper.domain.example Oh. So then you think, okay, find the last period, go back a word and get everything before! Then you remember http://super.duper.domain.co.uk And you're back to square one. Anyone have any great ideas besides storing a list of all TLDs? John

    Read the article

  • jQuery - Animate function

    - by Arun Kumar
    I have a piece of code shown below: $(".tagArea li").mouseover(function(){ $(this).animate({ borderWidth: "2px" }, 1000 ); }); $(".tagArea li").mouseout(function () { $(this).animate({ borderWidth: "1px" }, 1000 ); }); When I try to hover it on a particular list item, it properly animates but doesn't stop doing just once. It keeps doing 2 or 3 times. How to avoid this, I 've tried many a times but no positive result occurs to me. Kindly help.

    Read the article

  • How to find root cause for "too many connections" error in MySQL/PHP

    - by Nir
    I'm running a web service which runs algorithms that serve millions of calls daily and run some background processing as well. Every now and than I see "Too many connections" error in attempts to connect to the MySQL box" for a few seconds. However this is not necessarily attributed to high traffic times or anything I can put my finger on. I want to find the bottleneck causing it. Other than in the specific times this happens the server isn't too loaded in terms of CPU and Memory, and has 2-3 connections (threads) open and everything works smoothly. (I use Zabbix for monitoring) Any creative ideas on how to trace it?

    Read the article

  • c++ when to put method out side the class

    - by user63898
    i saw that some times in c++ applications using only namespace declarations with header and source file like this : #ifndef _UT_ #define _UT_ #include <string> #include <windows.h> namespace UT { void setRootPath(char* program_path, char* file_path); char * ConvertStringToCharP(std::string str); }; #endif //and then in UT.cpp #include "UT.h" namespace UT { char * ConvertStringToCharP(std::string str) { char * writable = new char[str.size() + 1]; std::copy(str.begin(), str.end(), writable); writable[str.size()] = '\0'; return writable; } void setRootPath(char* program_path, char* file_path) { //... } } is it better then defining classic class with static methods? or just simple class ? dose this method has something better for the compiler linker ? the methods in this namespace are called allot of times .

    Read the article

  • Solr adding document cycle & wait on response issue

    - by user1585896
    I am trying to send http post request to Solr for adding 50000 documents (all individual request one after another in while loop). I am using DefaultHttpClient in java to connect to Solr and when I use execute method on my HttpPost Solr takes 3 to 4 ms to response. I have commit=false, autoCommit=false, autoSoftCommit=false. My question is why it takes that much time to response and why cycle it follows to add new document. Basically I want to send add request but do not want to commit to see how many request can Solr handle without doing any kind of commits(without having to do any disk access). My guess is with above parameter tuned off I should be hitting Solr about 10000 times every second, but my result is 300 times a second. I am generating random data to add in my code.

    Read the article

  • Help with simple frame, and graphics in Java

    - by Crystal
    For hw, I'm trying to create a "CustomButton" that has a frame and in that frame, I draw two triangles, and a square over it. It's supposed to give the user the effect of a button press once it is depressed. So for starters, I am trying to set up the beginning graphics, drawing two triangles, and a square. The problem I have is although I set my frame to 200, 200, and the triangles I have drawn I think to the correct ends of my frame size, when I run the program, I have to extend my window to make the whole artwork, my "CustomButton," viewable. Is that normal? Thanks. Code: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class CustomButton { public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { CustomButtonFrame frame = new CustomButtonFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } }); } } class CustomButtonFrame extends JFrame { // constructor for CustomButtonFrame public CustomButtonFrame() { setTitle("Custom Button"); setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); CustomButtonSetup buttonSetup = new CustomButtonSetup(); this.add(buttonSetup); } private static final int DEFAULT_WIDTH = 200; private static final int DEFAULT_HEIGHT = 200; } class CustomButtonSetup extends JComponent { public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; // first triangle coords int x[] = new int[TRIANGLE_SIDES]; int y[] = new int[TRIANGLE_SIDES]; x[0] = 0; y[0] = 0; x[1] = 200; y[1] = 0; x[2] = 0; y[2] = 200; Polygon firstTriangle = new Polygon(x, y, TRIANGLE_SIDES); // second triangle coords x[0] = 0; y[0] = 200; x[1] = 200; y[1] = 200; x[2] = 200; y[2] = 0; Polygon secondTriangle = new Polygon(x, y, TRIANGLE_SIDES); g2.drawPolygon(firstTriangle); g2.setColor(Color.WHITE); g2.fillPolygon(firstTriangle); g2.drawPolygon(secondTriangle); g2.setColor(Color.GRAY); g2.fillPolygon(secondTriangle); // draw rectangle 10 pixels off border g2.drawRect(10, 10, 180, 180); } public static final int TRIANGLE_SIDES = 3; }

    Read the article

  • mongodb insert and return id with REST API

    - by abhi
    New to Mongodb,trying to get _id after mongodb insert without a round trip. $.ajax( { url: "https://api.mongolab.com/api/1/databases/xxx/collections/xx?apiKey=xxx", data: JSON.stringify( [ { "x" : 2,"c1" : 34,"c2" : getUrlVars()["c2"]} ] ), type: "POST", contentType: "application/json" } ); Thanks edit: Solved buy removing square bracers JSON.stringify( { "x" : 2,"c1" : 34,"c2" : getUrlVars()["c2"]} )

    Read the article

  • FULLTEXT Irrelevant results

    - by Imran Omar Bukhsh
    Just came across this issue using the fulltext search of mysql. I have like 250 records ( long articles like stuff ) and am using the fulltext MATCH AGAINST IN BOOLEAN MODE. Now if I search for a keyword e.g. 'Samsung' and if this keyword is present in ALL the records then it returns all the 250 records which it should ( of course without `IN BOOLEAN MODE it would return nothing as the keyword is present in more than 50% of the records ). Now the problem is that in some articles the keyword 'Samsung' occurs once and in others a couple of times, but MYSQL is giving a score of 1 to all the records returned, even those which have 'Samsung' like 15 times in them.

    Read the article

  • background music stops after 3/4 runs in iphone app

    - by amy
    I am playing sounds in loop in my app. So it should continue playing through out the app. but sometimes it stops after playing sound for 3/4 times.I don't understand whats happening. I am using audio-toolbox framework for playing sound. creating audio queue and then playing sounds in loop. I am also playing sound from ipod library using mediaplayer. Same thing happening with song from ipod. I have set [musicPlayer setRepeatMode: MPMusicRepeatModeOne]; but still it stops after 3/4 times.

    Read the article

  • text-aling:left align:left in google android browser is making the text in column around %20 of the page how this can be fixed?

    - by user981220
    Hello I have a problem with text-align: left or align: left no matter what I put the text get's stuck on the left side of the page in a big column how this can be fixed ? example of the code: <div class="maintext02"><span><p>text</p> .maintext02 { font-family:Georgia, "Times New Roman", Times, serif; color:#545454; line-height:25px; font-size:12px; width:943px; padding-top:15px; padding-bottom:15px; text-align:left; }

    Read the article

  • multiple regionDidChangeAnimated calls - what gives?

    - by mvexel
    I have a MKMapView inside a UITableView as a custom cell (don't ask ;) - don't know if it matters really), for which I register a regionDidChangeAnimated delegate method. This method gets called three times when the UITableView is loaded - once with the actual region and then two more times with a region that is way off. In the simulator, I consistently get a region with center (+37.43997405, -97.03125000). On the device, it seems to depend on the location reported by the location manager, which initializes the map view. Why am I getting three regionDidChangeAnimated calls? And why are the center coordinates for the last two of them off? This is the code I use to get the center coordinates: - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated { CLLocation *l = [[CLLocation alloc] initWithLatitude:self.mapView.centerCoordinate.latitude longitude:self.mapView.centerCoordinate.longitude]; (....)

    Read the article

  • Are spinlocks a good choice for a memory allocator?

    - by dsimcha
    I've suggested to the maintainers of the D programming language runtime a few times that the memory allocator/garbage collector should use spinlocks instead of regular OS critical sections. This hasn't really caught on. Here are the reasons I think spinlocks would be better: At least in synthetic benchmarks that I did, it's several times faster than OS critical sections when there's contention for the memory allocator/GC lock. Edit: Empirically, using spinlocks didn't even have measurable overhead in a single-core environment, probably because locks need to be held for such a short period of time in a memory allocator. Memory allocations and similar operations usually take a small fraction of a timeslice, and even a small fraction of the time a context switch takes, making it silly to context switch in the case of contention. A garbage collection in the implementation in question stops the world anyhow. There won't be any spinning during a collection. Are there any good reasons not to use spinlocks in a memory allocator/garbage collector implementation?

    Read the article

  • Big O Complexity of a method

    - by timeNomad
    I have this method: public static int what(String str, char start, char end) { int count=0; for(int i=0;i<str.length(); i++) { if(str.charAt(i) == start) { for(int j=i+1;j<str.length(); j++) { if(str.charAt(j) == end) count++; } } } return count; } What I need to find is: 1) What is it doing? Answer: counting the total number of end occurrences after EACH (or is it? Not specified in the assignment, point 3 depends on this) start. 2) What is its complexity? Answer: the first loops iterates over the string completely, so it's at least O(n), the second loop executes only if start char is found and even then partially (index at which start was found + 1). Although, big O is all about worst case no? So in the worst case, start is the 1st char & the inner iteration iterates over the string n-1 times, the -1 is a constant so it's n. But, the inner loop won't be executed every outer iteration pass, statistically, but since big O is about worst case, is it correct to say the complexity of it is O(n^2)? Ignoring any constants and the fact that in 99.99% of times the inner loop won't execute every outer loop pass. 3) Rewrite it so that complexity is lower. What I'm not sure of is whether start occurs at most once or more, if once at most, then method can be rewritten using one loop (having a flag indicating whether start has been encountered and from there on incrementing count at each end occurrence), yielding a complexity of O(n). In case though, that start can appear multiple times, which most likely it is, because assignment is of a Java course and I don't think they would make such ambiguity. Solving, in this case, is not possible using one loop... WAIT! Yes it is..! Just have a variable, say, inc to be incremented each time start is encountered & used to increment count each time end is encountered after the 1st start was found: inc = 0, count = 0 if (current char == start) inc++ if (inc > 0 && current char == end) count += inc This would also yield a complexity of O(n)? Because there is only 1 loop. Yes I realize I wrote a lot hehe, but what I also realized is that I understand a lot better by forming my thoughts into words...

    Read the article

  • MySQL SELECT WHERE returning empty with long numbers, although they are there

    - by brybam
    Alright, so basically the most simple query ever... I've done this a million times... SELECT * FROM purchased_items WHERE uid = '$uid' if $uid == 123 It works fine and returns all data in rows where uid is 123 if $uid == 351565051447743 It returns empty... I'm positive 351565051447743 is a possible uid in some rows, i literally copied and pasted it into the table. $uid is a string, and is being passed as a string. This is something i've done a million times, and i've never had this simple query not work. Any ideas why this is not working?

    Read the article

  • I can't get ExternalInterface.addCallback to work - trying to call an AS3 function from a js button

    - by Guillaume Riesen
    I'm trying to use ExternalInterface.addCallback to allow js to call an as3 method. My code is as follows: AS: ExternalInterface.addCallback("sendToActionscript", callFromJavaScript); function callFromJavaScript():void{ circle_mc.gotoAndStop("finish"); } JS: Switch to square function callToActionscript() { flashController = document.getElementById("jstoactest") flashController.sendToActionscript(); } It's not working. What am I doing wrong?

    Read the article

  • IE dynamic image caching issue?

    - by rdevitt
    I have an html page that is loading multiple iframes into which are embedded dynamic images created from a Tomcat server page (.jsp). This works as expected from Chrome and Firefox, but for some reason IE displays all of the images the same (as the first image). I've created an example: http://coupondiscounts.com/dev/jsImageTest.html jsImageTest.html -- This page simply loads 6 instances of the testImageFrame.html page in separate iframes one-at-a-time, using Javascript. testImageFrame.html -- This is the page loaded in all the iframes. It contains only a JavaScript block that writes out the current time and an img tag. The img is dynamically generated by a .jsp page on a different server. It should be a white box on a black background. In the box are the current time (from the Tomcat server using Java) and a randomly created double between 0 & 1. What happens (in IE): The page almost instantly loads four identical iframes. Depending on the speed of your machine, the JavaScript times may vary by a second or two. The images' times will all be the same as will be the random number. This holds true even for the last two iframes which are loaded 5 and 10 seconds after the others (using JavaScript setTimeout()). What should happen (as it does in Chrome and FF): The page loads the same 4 iframes, but the random numbers in the images will be different. The times in the images occasionally span a second as well. Anyone have a clue as to what's going on here? Is IE doing some strange caching? The image header has "no-cache," "no-store" and all that. I've tried it on IE6 and 7. You can use the "Next" button to create another iframe. In IE, the images are always the same. Notes: I don't really need iframes, just the images, but if I only use img tags, the problem appears in Chrome and FF as well. I also don't really need to load these iframes dynamically, I was just trying to abstract the issue further and allow a delayed load for the latter 2 images.

    Read the article

< Previous Page | 88 89 90 91 92 93 94 95 96 97 98 99  | Next Page >