Search Results

Search found 1486 results on 60 pages for 'counter'.

Page 32/60 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • MySQL: Ignore the timestamp attribute

    - by Nique
    I have a timestamp column in my database, and i use it for almost every field, but now, i just want to update the hit counter.. and i do not want to update the timestamp column with it. I use the timestamp field to see the last 'content' update. Not for every hit. Is it possible to let mysql stop updating the timestamp column for just one query?

    Read the article

  • If array is thread safe, what the issue with this function?

    - by Ajay Sharma
    I am totally lost with the things that is happening with my code.It make me to think & get clear with Array's thread Safe concept. Is NSMutableArray OR NSMutableDictionary Thread Safe ? While my code is under execution, the values for the MainArray get's changes although, that has been added to Array. Please try to execute this code, onyour system its very much easy.I am not able to get out of this Trap. It is the function where it is returning Array. What I am Looking to do is : -(Array) (Main Array) --(Dictionary) with Key Value (Multiple Dictionary in Main Array) ----- Above dictionary has 9 Arrays in it. This is the structure I am developing for Array.But even before #define TILE_ROWS 3 #define TILE_COLUMNS 3 #define TILE_COUNT (TILE_ROWS * TILE_COLUMNS) -(NSArray *)FillDataInArray:(int)counter { NSMutableArray *temprecord = [[NSMutableArray alloc] init]; for(int i = 0; i <counter;i++) { if([temprecord count]<=TILE_COUNT) { NSMutableDictionary *d1 = [[NSMutableDictionary alloc]init]; [d1 setValue:[NSString stringWithFormat:@"%d/2011",i+1] forKey:@"serial_data"]; [d1 setValue:@"Friday 13 Sep 12:00 AM" forKey:@"date_data"]; [d1 setValue:@"Description Details " forKey:@"details_data"]; [d1 setValue:@"Subject Line" forKey:@"subject_data"]; [temprecord addObject:d1]; d1= nil; [d1 release]; if([temprecord count]==TILE_COUNT) { NSMutableDictionary *holderKey = [[NSMutableDictionary alloc]initWithObjectsAndKeys:temprecord,[NSString stringWithFormat:@"%d",[casesListArray count]+1],nil]; [self.casesListArray addObject:holderKey]; [holderKey release]; holderKey =nil; [temprecord removeAllObjects]; } } else { [temprecord removeAllObjects]; NSMutableDictionary *d1 = [[NSMutableDictionary alloc]init]; [d1 setValue:[NSString stringWithFormat:@"%d/2011",i+1] forKey:@"serial_data"]; [d1 setValue:@"Friday 13 Sep 12:00 AM" forKey:@"date_data"]; [d1 setValue:@"Description Details " forKey:@"details_data"]; [d1 setValue:@"Subject Line" forKey:@"subject_data"]; [temprecord addObject:d1]; d1= nil; [d1 release]; } } return temprecord; [temprecord release]; } What is the problem with this Code ? Every time there are 9 records in Array, it just replaces the whole Array value instead of just for specific key Value.

    Read the article

  • NamespaceContext and using namespaces with XPath

    - by Jherico
    Resolving an xpath that includes namepsaces in Java appears to require the use of a NamespaceContext object, mapping prefixes to namespace urls and vice versa. But I can find no mechanism for getting a NamespaceContext other than implementing it myself. This seems counter-intuitive. Is there any easy way to acquire a NamespaceContext from a document, or to create one, or failing that, to forgo prefixes altogether and specify the xpath with fully qualified names?

    Read the article

  • Checking OpenGL resource leaks

    - by kamziro
    So I have a rather large openGL program going, and checking for normal memory leaks (those by new and delete) is rather trivial -- just run it on valgrind. But what is the best way to check for potential opengl leaks? Is there an opengl utility that'll tell you how many resources (e.g framebuffers) are being used at the time, or such? Or is the only way to attach a counter to every glGenBlah and glDeleteBlah pairs?

    Read the article

  • \ref Chapter Name in LaTeX

    - by joec
    Is it possible to use \ref{chap:conclusion} to refer to the actual name of the chapter instead of the chapter counter in LaTeX? So that I can do this: See the \ref{chap:conclusion} chapter for more information See the Conclusion chapter for more information instead of: See Chapter \ref{chap:conclusion} for more See Chapter 6 for more Thanks

    Read the article

  • [PHP] Read and write to a file while keeping lock

    - by Znarkus
    Hi! I am making a simple page load counter by storing the current count in a file. This is how I want to do this: Lock the file Read the current count Increment it Write new count Unlock file/close it Can this be done? As I understand it, the file can't be written to without losing the lock. The only way I have come up with to tackle this, is to write a character using "r+" mode, and then counting characters.

    Read the article

  • oracle blob text search

    - by Skay
    Is it possible to search through blob text using sql statement? I can do select * from $table where f1 like '%foo%' if the f1 is varchar, how about f1 is a blob? Any counter part for this?

    Read the article

  • What does an empty run queue entry points to?

    - by EpsilonVector
    I'm trying to figure out the technicalities of scheduling in Linux. What I can't figure out is what happens with those entries in the run_queue where there are no running processes. In the run_queue we have a bitmap, a counter, and the array of lists themselves. For a list that is empty because there are no running tasks with its priority, what do the next and prev pointers point to?

    Read the article

  • fancybox image sometimes renders outside box

    - by Colleen
    I have the following django template: <script type="text/javascript" src="{{ STATIC_URL }}js/ jquery.fancybox-1.3.4.pack.js"></script> <link rel="stylesheet" href="{{ STATIC_URL }}css/ jquery.fancybox-1.3.4.css" type="text/css" media="screen" /> {% include "submission-form.html" with section="photos" %} <div class="commentables"> {% load thumbnail %} {% for story in objects %} <div class="image {% if forloop.counter|add:"-1"| divisibleby:picsinrow %}left{% else %}{% if forloop.counter| divisibleby:picsinrow %}right{% else %}middle{% endif %}{% endif %}"> {% if story.image %} {% thumbnail story.image size crop="center" as full_im %} <a rel="gallery" href="{% url post slug=story.slug %}"> <img class="preview" {% if story.title %} alt="{{ story.title }}" {% endif %} src="{{ full_im.url }}" full- image="{% if story.image_url %}{{ story.image_url }}{% else %} {{ story.image.url }}{% endif %}"> </a> {% endthumbnail %} {% else %} {% if story.image_url %} {% thumbnail story.image_url size crop="center" as full_im %} <a rel="gallery" href="{% url post slug=story.slug %}"> <img class="preview" {% if story.title %} alt="{{ story.title }}" {% endif %} src="{{ full_im.url }}" full- image="{{ story.image_url }}"> </a> {% endthumbnail %} {% endif %} {% endif %} </div> {% endfor %} {% if rowid != "last" %} <br style="clear: both" /> {% endif %} {% if not no_more_button %} <p style="text-align: right;" class="more-results"><a href="{% url images school_slug tag_slug %}">more...</a></p> {% endif %} </div> <script> $(document).ready(function(){ function changeattr(e){ var f = $(e.clone()); $(f.children()[0]).attr('src', $(f.children() [0]).attr("full-image")); $(f.children()[0]).attr('height', '500px'); return f[0].outerHTML; } $('.image a').each(function(idx, elem) { var e = $(elem); e.fancybox({ title: $(e.children()[0]).attr('alt'), content: changeattr(e) }); }); }); </script> and I'm occasionally getting weird display errors where the box will either not render anything at all (so it will show up as just a thin white bar, basically) or it will render only about 30 px wide, and position itself halfway down the page. In both cases, if I inspect element, I can see the "shadow" of the full picture, at the right size, with the right url. Image source doesnt' seem to make a difference, I'm getting no errors, and this is happening in both chrome and firefox. Does anyone have any ideas?

    Read the article

  • jQuery live search

    - by Barbara
    I really like the search function on iA and I was wondering how they did it. I found ejohn.org/blog/jquery-livesearch/ by John Resig but I still don't how to: add the counter (128/128 - the number encreases and decreases) highlight the word I'm searching in the text

    Read the article

  • countering a div opacity?

    - by Jason94
    If I have a div that acts like a box, and I make it real sexy with 10% opacity. How do I counter it since everything in the div also gets the opacity. Lets say i have a box(div) with a 1px border and text, putting opacity on it will make it look bad and i only want opacity on the background.

    Read the article

  • Arrange points in sequence.

    - by Himadri
    I have some points in 3D which are in a single plane. I want to arrange them in clock wise or counter clockwise order. The points can create a concave or convex polygon in a single plane. Can any body give any suggestions?

    Read the article

  • what is the best way to track unique visitors?

    - by dnkira
    hello what i want is to make user counter as true as possible. exluding bots, and clever users as much as possible. as 4 what i know, it can be done in several ways: ip (trouble with dinamic ones and proxy's) cookies (with session id maybe, but can be deleted or browser can be changed) flash cookies (not all users have it) any other ways? and what is the best?

    Read the article

  • Is there a way to bypass the jQuery error handler?

    - by oravecz
    If my Ajax call returns a successful result, but while processing the result I cause an exception, the error handler fires. This seems counter intuitive to me as I think the error handler should only fire when an error occurs as a result of making the Ajax call or via a server-side error. I am trying to use the Ajax function in a unit test so I would like to tell the difference between the two different failure scenarios.

    Read the article

  • How to execute machine language from memory?

    - by Mike Curry
    I wrote a program to compile a simple text program to a compiled executable... Is it possible that I can load an executable to memory an some how point a pc counter to the memory space at will? Here is what I made that I would like to store the programs to memory for execution on demand... Kind of wanting to make a little web language like php but compile it... Just for learning. http://spiceycurry.blogspot.com/2010/05/simple-compilable-programming-language.html

    Read the article

  • Ajax progress with PHP session

    - by FFish
    I have an app that processes images and use jQuery to display progress to the user. I done this with writing to a textfile each time and image is processed and than read this status with a setInterval. Because no images are actually written in the processing (I do it in PHP's memory) I thought a log.txt would be a solution, but I am not sure about all the fopen and fread's. Is this prone to issues? I tried also with PHP sessions, but can't seem to get it to work, I don't get why.. HTML: <a class="download" href="#">request download</a> <p class="message"></p> JS: $('a.download').click(function() { var queryData = {images : ["001.jpg", "002.jpg", "003.jpg"]}; $("p.message").html("initializing..."); var progressCheck = function() { $.get("dynamic-session-progress.php", function(data) { $("p.message").html(data); } ); }; $.post('dynamic-session-process.php', queryData, function(intvalId) { return function(data) { $("p.message").html(data); clearInterval(intvalId); } } (setInterval(progressCheck, 1000)) ); return false; }); process.php: // session_start(); $arr = $_POST['images']; $arr_cnt = count($arr); $filename = "log.txt"; for ($i = 1; $i <= $arr_cnt; $i++) { $content = "processing $val ($i/$arr_cnt)"; $handle = fopen($filename, 'w'); fwrite($handle, $content); fclose($handle); // $_SESSION['counter'] = $content; sleep(3); // to mimic image processing } echo "<a href='#'>download zip</a>"; progress.php: // session_start(); $filename = "log.txt"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle); echo $contents; // echo $_SESSION['counter'];

    Read the article

  • what's the right way to cause a subview to redraw when the device orientation changes?

    - by RobertL
    I have a view controller with a view and one subview. When the device orientation changes the view auto-redraws but the subview doesn't. If I explicitly do [subview setNeedsDisplay] it redraws but I don't have a logical place to put that call in my code. And, since I don't have to explicitly tell the view to redraw, it seems counter-intuitive to tell the subview to redraw. Is there a way to make the subview auto-redraw when the view redraws?

    Read the article

  • i = true and false in Ruby is true?

    - by alex
    Am I fundamentally misunderstanding Ruby here? I've been writing Ruby code for about 2 years now and just today stumbled on this... ruby-1.8.7-p249 > i = true and false => false ruby-1.8.7-p249 > i => true Could somebody explain what's going on here please? I'm sure it's to spec, but it just seems counter intuitive to me...

    Read the article

  • Drupal return number of results in a View

    - by Linda
    I have a view in Drupal that filters my content. It brings back 7 rows. All I want to return is the number or results returned(7). Is this possible? I tried using the View result counter but it returns a number for each results 1 2 3 4 5 6 7 I just need the 7 part. So in SQL I would do a select count(*)

    Read the article

  • MySQL Hibernate sort on 2 columns

    - by sammichy
    I have a table as follows Table item { ID - Primary Key content - String published_date - When the content was published create_date - When this database entry was created } Every hour (or specified time interval) I run a process to update this table with data from different sources (websites). I want to display the results according to the following rules. 1. The entries created each time the process runs should be grouped together. So the entries from the 2nd process run will always be after the entries from the first process run even if the published_date of an entry from the first run is after the published_date of an entry from the 2nd run. 2. Within the grouping by run, the entries by sorted by published_date 3. Another restriction is that I prefer that data from the same source not be grouped together. If I do the sort by create_date, published_date I will end up with data from source a, data from source b etc. I prefer that the data within each hour be mixed up for better presentation If I add a column to this table and store a counter which increments each time the process is run, it is possible to create a query to sort first by counter and then by published_dt. Is there a way to do it without adding a field? I'm using Hibernate over MySQL. e.g. Hour 1 (run 1) 4 rows collected from site a (rows 1-4) 3 rows collected from site b (rows 5-7) hour 2 (run 2) 2 row collected from site a (rows 8-9) 3 rows collected from site b (rows 10-12) ... After each run, new records are added to the database from each website. The create date is the time when the record was created in the database. The published date is part of the content and is read in from the external source. When the results are displayed I would like rows to be grouped together based on the hour they were published in. So rows 1-7 would be displayed before rows 8-12. Within each hourly grouping, I would like to sort the results by published date (timestamp). This is necessary so that the posts from all the sites collected in that hour are not grouped together but rather mixed in with each other.

    Read the article

  • How to effectively measure difference in a run-time.

    - by Knowing me knowing you
    Guys, in one of the excersises in TC++PL B.S. asks to: "Write a function that either returns a value or that throws that value based on an argument. Measure the difference in run-time between the two ways." Great pity he never explaines how to measure such things. I'm not sure if I'm suppose to write simple "time start, time end" counter or maybe there are more effective and practical ways to do it? Thanks in advance.

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >