Search Results

Search found 8083 results on 324 pages for 'total newbie'.

Page 144/324 | < Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >

  • iphone app time counter

    - by Sam
    I would like to create a time counter in my app that shows the user how many minutes the app has been running the current session and total. How do I create such time counter and how do I save the value to the phone? I'm new to app developement.

    Read the article

  • Javascript: How to calculate the exact position of the viewport?

    - by batmanfu
    My problem is I need to get the position of the viewport relative to the extent of the entire document. I am only concerned with Firefox. My issue is that everything I have read says that: viewport height is window.innerHeight scroll position is window.pageYOffset document total height is document.height So, I would expect that if I scrolled to the bottom of a page that window.innerHeight + window.pageYOffset = document.height But it doesn't! Can someone please explain to me why this is?

    Read the article

  • how many lines of code does my class library have

    - by zachary
    for metrics reasons I need to know how many lines of code my class library has. I'm doing this for code coverage.... So if Class library 1 has 50 lines of code and 100% coverage And if Class library 2 has 500 lines of code and 0% coverage My total coverage is 90% Any idea how to do this? Is there a utility or a way to use Visual Studio?

    Read the article

  • Want to check fields for data fast.

    - by Tom
    We have a database setup that consists of two parts: a static structure, and dynamic additions. For each database, the dynamic can be different, and sometimes we don't have data for all the dynamic fields. Rigt now, we check for empties by looking at the total count of records in the entire table, but we want to move to a more refined method of checking for empties if possible. Is it possible to quickly check through several hundred fields and see which ones are empty and which ones are populated?

    Read the article

  • Cheap and cheerful rand() replacement.

    - by Mick
    After profiling a large game playing program, I have found that the library function rand() is consuming a considerable fraction of the total processing time. My requirements for the random number generator are not very onerous - its not important that it pass a great battery of statistical tests of pure randomness. I just want something cheap and cheerful that is very fast. Any suggestions?

    Read the article

  • [C++] Is it possible to roll a significantly faster version of sqrt

    - by John
    In an app I'm profiling, I found that in some scenarios this functions are able to take over 10% of total execution time. I've seen discussion over the years of faster sqrt implementations using sneaky floating-point trickery, but I don't know if such things are outdated on modern CPUs. MSVC++ 2008 compiler is being used, for reference... though I'd assume sqrt is not going to add much overhead though.

    Read the article

  • Mysql - GROUP BY Avoid using tempoary

    - by jwzk
    The goal of this query is to get a total of unique records (by IP) per ref ID. SELECT COUNT(DISTINCT ip), GROUP_CONCAT(ref.id) FROM `sess` sess JOIN `ref` USING(row_id) WHERE sess.time BETWEEN '2010-04-21 00:00:00' AND '2010-04-21 23:59:59' GROUP BY ref.id ORDER BY sess.time DESC The query works fine, but its using a temporary table. Any ideas?

    Read the article

  • calulate according to the DOB given

    - by rohini
    Hi I made student list containing roll no.,name, gender, DOB,Age ,marks1,marks2,marks3,total and avg. i want to right a code for age that is when i click on age it should display the correct age according to the DOB given. can you help using textbox events in c#

    Read the article

  • MySQL DATE_ADD usage, 5 day interval

    - by Webnet
    I'm trying to select the order total sum ($) and invoice count over a 5 day period in a single query. I can't seem to get this to happen though. The current query I have is here... SELECT COUNT(id) as invoice_count, SUM(orderTotal) as orders_sum, UNIX_TIMESTAMP(created) as created FROM ids_invoice WHERE DATE_ADD(created, INTERVAL +1 DAY) AND userId = '.$userId.$whereSql I'm not entirely sure DATE_ADD is the right function I'm looking for I'm fairly new to mysql date functions so perhaps I just missed the function I needed when going through mysql docs.

    Read the article

  • Stored Procedure in postgresql, multiple queries w/ agreggates.

    - by fenix
    I'm trying to write a store procedure that can take some input parameters (obviously), run multiple queries against those, taking the output from those and doing calculations, and from those calculations and the original queries, outputting a formatted text string like: Number of Rows for max(Z) matching condition x and y of total rows matching x (x&y/x*100). To explain the max(Z) bit, this will be the username field, it won't matter which actual entry is picked, because the where clause will filter the results by user id, is there a saner way to do this?

    Read the article

  • Cakephp: how do I know what route was used

    - by Jason
    So I am a total cakephp newb and one of the first things I expected to see basic info about each page request logged. More specifically, what route data including what controller/method is being used. Obviously I did not find what I was expecting and about the only kind of meaning info I can find is from the apache logs. What I expected was to see something similar to first log entry for a rails app request. Does cakephp not log this kind of data?

    Read the article

  • how can i do pagination without reaload page in wordpress

    - by Swap
    how can i do pagination without reaload page in wordpress. i have use following code for the pagination but here page is reaload for each pagination. what can i do to stop realod page???please suggest me. <?php $page = (get_query_var('page')) ? get_query_var('page') : 1 $limit=10; $offset = ( $page - 1 ) * $limit; $data = $wpdb->get_results("select * from wp_products order by product_id $sort_by LIMIT $offset,$limit "); $total=$wpdb->get_results("select * from wp_products "); $pages = COUNT($total); $pages = ceil($pages / $limit); $querystring = ""; foreach ($_GET as $key => $value) { if ($key != "page") $querystring .= "$key=$value&amp;"; } // Pagination ?> <div class="pagination"> <?php if( $pages > 1) { $range=1; $showitems = ($range * 2)+1; $page1=$page; $prev=$page1-1; if($page > 1) { echo "<a class=\"page gradient\" "; echo "href=\"?{$querystring}page=$prev"; echo "\">Previous</a> "; } for ($i = 1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $page+$range+1 || $i <= $page-$range-1) || $pages <= $showitems )) { if($i == $page) { echo "<span class=\" page active\">".$i."</span>"; } else { echo "<a class=\"page gradient\""; echo "href=\"?{$querystring}page=$i"; echo "\">$i</a> "; } } } if($page!=$pages) { if($showitems < $pages) { echo "..... "; } $page1=$page; $next=$page1+1; echo "<a " . ($i == $page ? "class=\"page active\" " : "class=\"page gradient\""); echo "href=\"?{$querystring}page=$next"; echo "\">Next</a> "; } } ?> </div>

    Read the article

  • SQL Math in Excel VBA

    - by Scott
    Excel seems to have a problem with doing math in SQL queries. SELECT ( SELECT sum(column) FROM table1 ) + ( SELECT sum(column) FROM table2 ) AS total This technique works completely fine in ASP and ASP.NET. Has anyone had success doing this in Excel VBA? (My database engine is SQL Server 2000.)

    Read the article

  • Sum of a summation in mysql

    - by dames
    I have the following query, in the top select statement (sum(l.app_ln_amnt)/count(l.app_ln_amnt)) works well but in the union I want to find the total of (sum(l.app_ln_amnt)/count(l.app_ln_amnt)) query from the top select statement However my solution seems to be off I need some help please select (sum(l.app_ln_amnt)/count(l.app_ln_amnt)), from receipt_history l UNION select SUM(sum(l.app_ln_amnt)/count(l.app_ln_amnt)), from receipt_history l

    Read the article

  • Unexpected output while using Microsoft Visual Studio 2008 (Express Edition) C++ Command Line Tool

    - by Sujith S Pillai
    One of my friends sent this code to me, saying it doesn't work as expected: #include<stdio.h> void main() { int a [10] ={23, 100, 20, 30, 25, 45, 40, 55, 43, 42}; int sizeOfInput = sizeof(a)/sizeof(int); int b, outer, inner, c; printf("Size is : %d \n", sizeOfInput); printf("Values before bubble sort are : \n"); for ( b = 0; b < sizeOfInput; b++) printf("%d\n", a[b]); printf("End of values before bubble sort... \n"); for ( outer = sizeOfInput; outer > 0; outer-- ) { for ( inner = 0 ; inner < outer ; inner++) { printf ( "Comparing positions: %d and %d\n",inner,inner+1); if ( a[inner] > a[inner + 1] ) { int tmp = a[inner]; a[inner] = a [inner+1]; a[inner+1] = tmp; } } printf ( "Bubble sort total array size after inner loop is %d :\n",sizeOfInput); printf ( "Bubble sort sizeOfInput after inner loop is %d :\n",sizeOfInput); } printf ( "Bubble sort total array size at the end is %d :\n",sizeOfInput); for ( c = 0 ; c < sizeOfInput; c++) printf("Element: %d\n", a[c]); } I am using Micosoft Visual Studio Command Line Tool for compiling this on a Windows XP machine. cl /EHsc bubblesort01.c My friend gets the correct output on a dinosaur machine (code is compiled using TCC there). My output is unexpected. The array mysteriously grows in size, in between. If you change the code so that the variable sizeOfInput is changed to sizeOfInputt, it gives the expected results! A search done at Microsoft Visual C++ Developer Center doesn't give any results for "sizeOfInput". I am not a C/C++ expert, and am curious to find out why this happens - any C/C++ experts who can "shed some light" on this? Unrelated note: I seriously thought of rewriting the whole code to use quicksort or merge sort before posting it here. But, after all, it is not Stooge sort...

    Read the article

  • how phpmyvisitors works?

    - by hd
    hi i have installed "phpmyvisitors" cms to get statistics of my sites visits. it is written in php and is open source. i gets many useful information like: -total visits -viewed pages -visitor browser informations -visitor distribution over the world -how visitors access to site -how much time they spend on sites and .... it is some think like Google Analytics.but fewer features. my question is: " how does it do all of them? "

    Read the article

  • Can i get the particular disk space(like C: ) using Jav program..?

    - by Venkats
    I used SystemEnvironment class in java for getting system information. In that i can get only RAM size, i can't get the specific disk space like c: and D: code is, com.sun.management.OperatingSystemMXBean mxbean = (com.sun.management.OperatingSystemMXBean)ManagementFactory.getOperatingSystemMXBean(); System.out.println("Total RAM:"+mxbean.getTotalSwapSpaceSize()/(1024*1024*1024)+""+"GB"); Can i get this using in java program?

    Read the article

  • Why does obj.getBounds().height give a larger height than obj.height?

    - by TC
    I'm new to Flash and ActionScript, but managing quite nicely. One thing that is continuously getting in my way are the width and height properties of DisplayObject(Container)s. I'm finally starting to get my head around them and learned that the width and height of a Sprite are determined solely by their contents for example. I do not understand the following though: I've got a Sprite that I add a bunch of Buttons to. The buttons all have a height of 30 and an y of 0. As such, I'd expect the height of the containing Sprite to be 30. Surprisingly, the height is 100. The Adobe documentation of the height property of a DisplayObject states: Indicates the height of the display object, in pixels. The height is calculated based on the bounds of the content of the display object. Apparently, the 'bounds' of the object are important. So I went ahead and wrote this little test in the Sprite that contains the Buttons: for (var i:int = 0; i < numChildren; ++i) { trace("Y: " + getChildAt(i).y + " H: " + getChildAt(i).height); trace("BOUNDS H: " + getChildAt(i).getBounds(this).height); } trace("SCALEY: " + scaleY + " TOTAL HEIGHT: " + height); This code iterates through all the objects that are added to its display list and shows their y, height and getBounds().height values. Surprisingly, the output is: Y: 0 H: 30 BOUNDS H: 100 ... (5x) SCALEY: 1 TOTAL HEIGHT: 100 This shows that the bounds of the buttons are actually larger than their height (and the height that they appear to be, visually). I have no clue why this is the case however. So my questions are: Why are the bounds of my buttons larger than their height? How can I set the bounds of my buttons so that my Sprite isn't larger than I'd expect it to be based on the position and size of the objects it contains? By the way, the buttons are created as follows: var control:Button = new Button(); control.setSize(90, 30); addChild(control);

    Read the article

  • Changing the block size of a dfs file in Hadoop

    - by Sam
    I found that my map tasks is currently inefficient when parsing one particular set of files (total 2 TB). I'd like to change the block size of files in the Hadoop dfs (from 64MB to 128 MB). I can't find how to do it in the documentation for only one set of files and not the entire cluster, does anyone know the command that would change the block size when I upload it (ie copy from local to the dfs)? Thanks!

    Read the article

  • How to get the duration of the video uploaded ?

    - by Holicreature
    i'm using ffmpeg to convert videos to desired formats and to generate the thumbnails.. I want to find the total duration of the video to display in the main page along with the thumbnails.. Can i use ffmpeg to find the duration when its being uploaded and store them on the database.? Is storing the duration in db is necessary or else is there any other method?

    Read the article

  • jQuery image loop not displaying any images

    - by user1871097
    I'm trying to create a very basic image gallery in jQuery. The goal is to have 3 images fade in and out in a sequential order. So image 1 is displayed, fades to image 2 etc. then the whole thing loops again. My HTML code so far is as follows: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Slider</title> <style type="text/css"> .slider{ width: 2848px; height: 2136px; overflow: hidden; margin: 30px auto; } .slider img{ width:2848px; height:2136px; display:none; } </style> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script> <script src="Slider2.js"></script> </head> <body onload="Slider2"();> <div class="slider"> <img id="1" src="31.jpg" border="0" alt="city"/> <img id="2" src="2vrtigo2.jpg" border="0" alt="roof"/> <img id="3" src="3.jpg" border="0" alt="sea"/> </div> </body> And the jQuery code looks like this: function Slider2() { var total = $(".slider img").size(); for (i=1; i<=total; i+=1) { $(".slider #"+i).fadeIn(600); $(".slider #"+i).delay(2000).hide; }} A quick syntactical note, I've also tried using i++ in the last argument of the For Loop. The result of this code is a blank, white page. I know some of the HTML is being compiled because the enormous 2848x2136 div creates scroll bars on the browser. If anyone could help me out, that would be greatly appreciated. Obviously I'm relatively new to web programming and would love some insight into why this isn't working. Thanks!

    Read the article

  • mysql query trouble

    - by Bharanikumar
    Hi , in my database i have phone numbers with country code , which look somthing like 0044-123456 0044-123456 0014-123456 0014-123456 0024-123456 0024-123456 0034-123456 0044-123456 0044-123456 0024-123456 0034-123456 084-123456 084-123456 i want to total up the numbers by country, something like this output 0044 (2) 0024 (2) 0034 (1) 084 (2) 064 (5) Is it possible to do this with a SQL query?

    Read the article

< Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >