Search Results

Search found 7473 results on 299 pages for 'usage statistics'.

Page 58/299 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • boost::this_thread::disable_interruption usage confusion

    - by Evgenii
    boost/thread/pthread/shared_mutex.hpp contains this code: ... #include <boost/thread/detail/thread_interruption.hpp> ... class shared_mutex { ... void lock_shared() { boost::this_thread::disable_interruption do_not_disturb; boost::mutex::scoped_lock lk(state_change); while(state.exclusive || state.exclusive_waiting_blocked) { shared_cond.wait(lk); } ++state.shared_count; } ... }; but boost/thread/detail/thread_interruption.hpp does not contain implementation of disable_interruption, only the prototype. in boost_1_42_0/libs/thread/src/pthread we don't have the implementation too how does it work!???

    Read the article

  • Usage history for Windows 7

    - by Lajos Arpad
    Hello, a relative of mine has a problem. She's working at a company, using Windows 7 and can't set a password because if she's not there her boss might want to use some of her data, but she has suspicions that there is a colleague who spies on her files, because there is no password set for her computer. Does anybody know how can somebody view some kind of history of when was the computer turned on before and what files were opened/runned? Thanksin advance for your answers.

    Read the article

  • How much memory is my iphone app using (from Simulator)

    - by Jonathan
    I know this has something to do with Instruments, but well it's kind of confusing and searching for Instruments on Google doesn't help much. I'd like to know how well my app runs, like how much memory it uses. I just don't know where to find something like: "As close as we can tell from the simulator you'll app will currently be using xx MBs of RAM on a real iphone device." I need help on how to get this information.

    Read the article

  • Optimizing memory usage and changing file contents with PHP

    - by errata
    In a function like this function download($file_source, $file_target) { $rh = fopen($file_source, 'rb'); $wh = fopen($file_target, 'wb'); if (!$rh || !$wh) { return false; } while (!feof($rh)) { if (fwrite($wh, fread($rh, 1024)) === FALSE) { return false; } } fclose($rh); fclose($wh); return true; } what is the best way to rewrite last few bytes of a file with my custom string? Thanks!

    Read the article

  • typical memory usage of an iphone app

    - by climbon
    According to Instruments 'Net Bytes' of my app are never more than 2MB yet sometimes I receive memory warning and the app crashes because some views on the stack are unloaded by force. I'd like to know what is the typical memory footprint where system would not send you memory warning and unload the views ? I have so far tried this on OS 3.1.2 on iphone 3GS and 3G and with 3G giving warning almost 80% of the time I test the app on it.

    Read the article

  • Vector Usage in MPI(C++)

    - by lsk1985
    I am new to MPI programming,stiil learning , i was successful till creating the Derived data-types by defining the structures . Now i want to include Vector in my structure and want to send the data across the Process. for ex: struct Structure{ //Constructor Structure(): X(nodes),mass(nodes),ac(nodes) { //code to calculate the mass and accelerations } //Destructor Structure() {} //Variables double radius; double volume; vector<double> mass; vector<double> area; //and some other variables //Methods to calculate some physical properties Now using MPI i want to sent the data in the structure across the processes. Is it possible for me to create the MPI_type_struct vectors included and send the data? I tried reading through forums, but i am not able to get the clear picture from the responses given there. Hope i would be able to get a clear idea or approach to send the data PS: i can send the data individually , but its an overhead of sending the data using may MPI_Send/Recieve if we consider the domain very large(say 10000*10000)

    Read the article

  • Cross domain secure cookie usage?

    - by asdasda
    I have a website that came with a SSL site for HTTPS but its on a different server. Example being my website: http://example.com my SSL site: http://myhostingcompany.com/~myuseraccount/ So I can do transactions over HTTPS and we have user accounts and everything but it is located on a different domain. The cookie domain is set for that one. Is there a way I can check on my actual site to see if a cookie is set for the other one? And possibly grab its data and auth a user? I think this violates a major principle of security and can't be done for good reasons, but am i wrong? is this possible?

    Read the article

  • cuda 5.0 namespaces for contant memory variable usage

    - by Psypher
    In my program I want to use a structure containing constant variables and keep it on device all long as the program executes to completion. I have several header files containing the declaration of 'global' functions and their respective '.cu' files for their definitions. I kept this scheme because it helps me contain similar code in one place. e.g. all the 'device' functions required to complete 'KERNEL_1' are separated from those 'device' functions required to complete 'KERNEL_2' along with kernels definitions. I had no problems with this scheme during compilation and linking. Until I encountered constant variables. I want to use the same constant variable through all kernels and device functions but it doesn't seem to work. ########################################################################## CODE EXAMPLE ########################################################################### filename: 'common.h' -------------------------------------------------------------------------- typedef struct { double height; double weight; int age; } __CONSTANTS; __constant__ __CONSTANTS d_const; --------------------------------------------------------------------------- filename: main.cu --------------------------------------------------------------------------- #include "common.h" #include "gpukernels.h" int main(int argc, char **argv) { __CONSTANTS T; T.height = 1.79; T.weight = 73.2; T.age = 26; cudaMemcpyToSymbol(d_consts, &T, sizeof(__CONSTANTS)); test_kernel <<< 1, 16 >>>(); cudaDeviceSynchronize(); } --------------------------------------------------------------------------- filename: gpukernels.h --------------------------------------------------------------------------- __global__ void test_kernel(); --------------------------------------------------------------------------- filename: gpukernels.cu --------------------------------------------------------------------------- #include <stdio.h> #include "gpukernels.h" #include "common.h" __global__ void test_kernel() { printf("Id: %d, height: %f, weight: %f\n", threadIdx.x, d_const.height, d_const.weight); } When I execute this code, the kernel executes, displays the thread ids, but the constant values are displayed as zeros. How can I fix this?

    Read the article

  • What does CPU Time consist of? [closed]

    - by Sid
    What does CPU time exactly consist of? For instance, is the time taken to access a page from the RAM (at which point, the CPU is most likely idling) part of the CPU time? I'm not talking about fetching the page from the disk here, just fetching it from the RAM. Thanks

    Read the article

  • Disable update on battery percentage

    - by Kris B
    I have a service that performs background updates. I want to give the user the the option to disable the updates when their battery percentage reaches a certain level. From my research, I'm going to use a receiver in the onCreate method of my Service class, eg: public class MainService extends Service { @Override public void onCreate() { this.registerReceiver(this.BatInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); } private BroadcastReceiver BatInfoReceiver = new BroadcastReceiver(){ @Override public void onReceive(Context arg0, Intent intent) { int level = intent.getIntExtra("level", 0); } }; } I'm assuming the best practice is to leave the service running and check the battery level in the service and not perform the CPU intensive code based on the percentage? I don't actually stop the service itself and start it up again, based on the battery percentage?

    Read the article

  • Usage of initialize() vs. setup() in Mootools

    - by RyOnLife
    Mootools classes have an initialize() method that's called when a new object is instantiated. It seems that setup() is a commonly used method as well. Most classes I've observed call this.setup() from initialize() and nowhere else, which has left me wondering: What's the purpose of setup()? Why not just put the setup() code in initialize()? When does it make sense to use a setup() method?

    Read the article

  • C#: How to implement a smart cache

    - by Svish
    I have some places where implementing some sort of cache might be useful. For example in cases of doing resource lookups based on custom strings, finding names of properties using reflection, or to have only one PropertyChangedEventArgs per property name. A simple example of the last one: public static class Cache { private static Dictionary<string, PropertyChangedEventArgs> cache; static Cache() { cache = new Dictionary<string, PropertyChangedEventArgs>(); } public static PropertyChangedEventArgs GetPropertyChangedEventArgsa(string propertyName) { if (cache.ContainsKey(propertyName)) return cache[propertyName]; return cache[propertyName] = new PropertyChangedEventArgs(propertyName); } } But, will this work well? For example if we had a whole load of different propertyNames, that would mean we would end up with a huge cache sitting there never being garbage collected or anything. I'm imagining if what is cached are larger values and if the application is a long-running one, this might end up as kind of a problem... or what do you think? How should a good cache be implemented? Is this one good enough for most purposes? Any examples of some nice cache implementations that are not too hard to understand or way too complex to implement?

    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

  • question related to Iphone autorelease usage

    - by user524331
    Could someone help me please understand how allocation and memory management is done and handled in following scenario. i am giving a Psuedo code example and question thats troubling me is inline below: interface first { NSDecimalNumber *number1; } implementation ..... -(void) dealloc { [number1 release]; [super dealloc]; } ================================= interface second { NSDecimalNumber *number2; } implementation second ..... - (First*) check { First *firstObject = [[[First alloc] init] autorelease]; number1 = [[NSDecimalNumber alloc] initWithInteger:0]; **// do i need to autorelease number1 as well?** return firstObject; }

    Read the article

  • Esyndicat usage

    - by Noam
    Hello group, I am helping out a friend with setting up a web site based on eSyndicat. Is anyone here using this platform, can questions be asked here for it? If not, can you recommend a good place for that.

    Read the article

  • Does a CPU assigns a value atomically to memory?

    - by Poni
    Hi! A quick question I've been wondering about for some time; Does the CPU assign values atomically, or, is it bit by bit (say for example a 32bit integer). If it's bit by bit, could another thread accessing this exact location get a "part" of the to-be-assigned value? Think of this: I have two threads and one shared "unsigned int" variable (call it "g_uiVal"). Both threads loop. On is printing "g_uiVal" with printf("%u\n", g_uiVal). The second just increase this number. Will the printing thread ever print something that is totally not or part of "g_uiVal"'s value? In code: unsigned int g_uiVal; void thread_writer() { g_uiVal++; } void thread_reader() { while(1) printf("%u\n", g_uiVal); }

    Read the article

  • Should properties in C# perform a lot of work?

    - by Hamish Grubijan
    When a property is read from or is assigned to, one would not expect it to perform a lot of work. When setSomeValue(...) and getSomeValue(...) methods are used instead, one should not be that surprised that something non-trivial might be going on under the hood. However, now that C# gave the world Properties, it seems silly to use getter and setter methods instead. What is your take on this? Should I mark this Q as a community wiki? Thanks.

    Read the article

  • Android Static Variable Scope and Lifetime

    - by Edison
    I have an application that has a Service uses a ArrayList to store in the background for a very long time, the variable is initialized when the service started. The service is in the background and there will be frequent access to the variable (that's why i don't want to use file management or settings since it will be very expensive for a file I/O for the sake of battery life). The variable will likely to be ~1MB-2MB over its life tie. Is it safe to say that it will never be nulled by GC or the system or is there any way to prevent it? Thanks.

    Read the article

  • How can I limit user bandwidth usage?

    - by Scarface
    Ok, I have a site, and it serves all images and mp3s through a php script and can be controlled and limited, but I am now worried about overall bandwidth of my site. For example, what if someone just sends a million requests to one of my pages? Does anyone have any suggestions into server methods used to prevent this? Should I use mod_cband http://www.howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling_p2?

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >