Search Results

Search found 3240 results on 130 pages for 'groupwise maximum'.

Page 44/130 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • Hardware instancing for voxel engine

    - by Menno Gouw
    i just did the tutorial on Hardware Instancing from this source: http://www.float4x4.net/index.php/2011/07/hardware-instancing-for-pc-in-xna-4-with-textures/. Somewhere between 900.000 and 1.000.000 draw calls for the cube i get this error "XNA Framework HiDef profile supports a maximum VertexBuffer size of 67108863." while still running smoothly on 900k. That is slightly less then 100x100x100 which are a exactly a million. Now i have seen voxel engines with very "tiny" voxels, you easily get to 1.000.000 cubes in view with rough terrain and a decent far plane. Obviously i can optimize a lot in the geometry buffer method, like rendering only visible faces of a cube or using larger faces covering multiple cubes if the area is flat. But is a vertex buffer of roughly 67mb the max i can work with or can i create multiple?

    Read the article

  • How to Seamlessly Extend the Windows Server Trial to 240 Days

    - by Jason Faulkner
    The Microsoft evaluation releases of their products are incredibly valuable and useful tools as they allow you to have an unlimited number of test, demo and development environments to work with at no cost. The only catch is evaluation releases are time limited, so the more time you can squeeze out of them, the more useful they can be. Here we are going to show you how to extend the usage time of the Windows Server 2008 R2 evaluation release to its maximum. Make Your Own Windows 8 Start Button with Zero Memory Usage Reader Request: How To Repair Blurry Photos HTG Explains: What Can You Find in an Email Header?

    Read the article

  • Cannot scale frequency of a Core i7 2720QM

    - by user51414
    I own a Dell Latitude E6520 with an Intel CPU (Core i7 2720QM). After installing cpufrequtils, I get the following message : cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009 Veuillez rapportez les erreurs et les bogues à [email protected], s'il vous plait. analyse du CPU 0 : **pas de pilotes cpufreq reconnu pour ce CPU** maximum transition latency: 4294.55 ms. In English : no cpufreq pilot found for this CPU. Thus my CPU runs always at full speed (2,2 GHz) which consume the battery and shorten its life. I don't either know how to activate turbo mode. Please help ! Regards, Al

    Read the article

  • Monitor not detected - low resolution only

    - by Jens
    I just installed Ubuntu 11.1 on my desktop pc. It was a clean install, no upgrading. I have a Samsung Syncmaster BX2450 connected to the PC. My problem is that I cannot make Ubuntu recognize my monitor - which is capable of more than 1024. I ran a shut down of lightdm, and ran sudo X -configure, but it gave me a "configuration failed". Nothing seems to work - any ideas? VESA: GF119 Board - 13100000 xx@xxx:~$ lspci -nn |grep VGA 02:00.0 VGA compatible controller [0300]: nVidia Corporation GT520 [GeForce GT520] [10de:1040] (rev a1) xx@xxx:~$ xrandr -q xrandr: Failed to get size of gamma for output default Screen 0: minimum 640 x 480, current 1024 x 768, maximum 1024 x 768 default connected 1024x768+0+0 0mm x 0mm 1024x768 61.0* 800x600 61.0 640x480 60.0

    Read the article

  • Best way to do large XNA animations?

    - by Harold
    What's the best way to have large animations in XNA 4.0? I have created a spritesheet with the sprite being 250x400 (more of an image than a sprite but hey ho) and there are approximately 45 frames in the animation. This causes problems for XNA as it says that the maximum filesize for Reach is 2048. I'd rather not change to hidef as I heard that means that your game is less compatible with some computers and systems so does anyone have any idea what the best thing I could do is? The only thing I could come up with is to have a list of textures to flick through but that's not ideal.

    Read the article

  • Les réseaux de fibre optique trans-océanique proches de leur capacité maximale, comment gérer cette saturation ?

    Les réseaux de fibre optique trans-océanique proches de leur capacité maximale, comment gérer cette saturation ? C'est une information qui est restée assez discrète dans l'actualité, et qui pourtant soulève de nombreuses questions. Il semblerait en effet que le manque d'adresse IPv4 ne soit pas la seule pénurie qu'aient à affronter les internautes du monde entier dans les prochains mois et années. Michael Cembalest, qui travaille pour JP Morgan, a publié le graphique suivant, à propos des connexions intercontinentales. Son message ? La capacité des réseaux de fibre optique trans-océanique arrive à son maximum. Autrement dit, on ne va pas pouvoir continuer de pousser le bouchon... Pour l'instant, cette ...

    Read the article

  • Best solution for a team home server

    - by aliasbody
    I created a home server with Ubuntu 12.04 Server (using an old Netbook with an Atom CPU and 512Mb). The idea is just to be used for a small team (maximum 10 persons) that will have constant access by SSH to the main projects and could add features with Git, and will, as well, have their own directory (with VirtualHost configured) for their own personal projects. Everything is configured and running, but my question is : What is the best solution here for everyone to work? It is to have them on the http group and then all have access as normal users to the /var/www folder (that also contains GitWeb and Drupal), or would be to create a new user named after the project (as an example) where only those with the password could have access to work (configured with VirtualHost). Notice: The idea is to have 1 person responsible of the server directly (since he is the one who is hosting it), 2 more people that will have access to the root from their home in order to configure anything from their home, plus anyone else that joins the group without any root access, but just the necessary access to create personal works and work with Git.

    Read the article

  • What camera to choose for using with JMF (Java Media Framework)

    - by Leron
    For the past 2-3 weeks I've been searching for different ways to implement custom video streaming and in more general video capturing and manipulating, going through DVR-cards, Video Capture Cards and stuff like that. Somehow JMF was able to stay out of my sight for all this time, but since I find out about it I'm more and more sure that this is a comfortable level for me to start playing around with video and stuff. One major topic that occurs to me while searching for more info was the presence of many posts where people were complaining about the fact that any particular camera ( most of the time I think they mean web cameras) doesn't work with JMF. Even though there are a lot of different cameras (not necessarily a web cam) that are not that expensive I want to play it safe and buy one that is proven to work well with the JMF. Also due to lack of experience maybe this is irrelevant but since I'll buy the camera mostly for learning and experimenting I want to have the maximum freedom possible to mess with different features, options and so on.

    Read the article

  • Subterranean IL: The ThreadLocal type

    - by Simon Cooper
    I came across ThreadLocal<T> while I was researching ConcurrentBag. To look at it, it doesn't really make much sense. What's all those extra Cn classes doing in there? Why is there a GenericHolder<T,U,V,W> class? What's going on? However, digging deeper, it's a rather ingenious solution to a tricky problem. Thread statics Declaring that a variable is thread static, that is, values assigned and read from the field is specific to the thread doing the reading, is quite easy in .NET: [ThreadStatic] private static string s_ThreadStaticField; ThreadStaticAttribute is not a pseudo-custom attribute; it is compiled as a normal attribute, but the CLR has in-built magic, activated by that attribute, to redirect accesses to the field based on the executing thread's identity. TheadStaticAttribute provides a simple solution when you want to use a single field as thread-static. What if you want to create an arbitary number of thread static variables at runtime? Thread-static fields can only be declared, and are fixed, at compile time. Prior to .NET 4, you only had one solution - thread local data slots. This is a lesser-known function of Thread that has existed since .NET 1.1: LocalDataStoreSlot threadSlot = Thread.AllocateNamedDataSlot("slot1"); string value = "foo"; Thread.SetData(threadSlot, value); string gettedValue = (string)Thread.GetData(threadSlot); Each instance of LocalStoreDataSlot mediates access to a single slot, and each slot acts like a separate thread-static field. As you can see, using thread data slots is quite cumbersome. You need to keep track of LocalDataStoreSlot objects, it's not obvious how instances of LocalDataStoreSlot correspond to individual thread-static variables, and it's not type safe. It's also relatively slow and complicated; the internal implementation consists of a whole series of classes hanging off a single thread-static field in Thread itself, using various arrays, lists, and locks for synchronization. ThreadLocal<T> is far simpler and easier to use. ThreadLocal ThreadLocal provides an abstraction around thread-static fields that allows it to be used just like any other class; it can be used as a replacement for a thread-static field, it can be used in a List<ThreadLocal<T>>, you can create as many as you need at runtime. So what does it do? It can't just have an instance-specific thread-static field, because thread-static fields have to be declared as static, and so shared between all instances of the declaring type. There's something else going on here. The values stored in instances of ThreadLocal<T> are stored in instantiations of the GenericHolder<T,U,V,W> class, which contains a single ThreadStatic field (s_value) to store the actual value. This class is then instantiated with various combinations of the Cn types for generic arguments. In .NET, each separate instantiation of a generic type has its own static state. For example, GenericHolder<int,C0,C1,C2> has a completely separate s_value field to GenericHolder<int,C1,C14,C1>. This feature is (ab)used by ThreadLocal to emulate instance thread-static fields. Every time an instance of ThreadLocal is constructed, it is assigned a unique number from the static s_currentTypeId field using Interlocked.Increment, in the FindNextTypeIndex method. The hexadecimal representation of that number then defines the specific Cn types that instantiates the GenericHolder class. That instantiation is therefore 'owned' by that instance of ThreadLocal. This gives each instance of ThreadLocal its own ThreadStatic field through a specific unique instantiation of the GenericHolder class. Although GenericHolder has four type variables, the first one is always instantiated to the type stored in the ThreadLocal<T>. This gives three free type variables, each of which can be instantiated to one of 16 types (C0 to C15). This puts an upper limit of 4096 (163) on the number of ThreadLocal<T> instances that can be created for each value of T. That is, there can be a maximum of 4096 instances of ThreadLocal<string>, and separately a maximum of 4096 instances of ThreadLocal<object>, etc. However, there is an upper limit of 16384 enforced on the total number of ThreadLocal instances in the AppDomain. This is to stop too much memory being used by thousands of instantiations of GenericHolder<T,U,V,W>, as once a type is loaded into an AppDomain it cannot be unloaded, and will continue to sit there taking up memory until the AppDomain is unloaded. The total number of ThreadLocal instances created is tracked by the ThreadLocalGlobalCounter class. So what happens when either limit is reached? Firstly, to try and stop this limit being reached, it recycles GenericHolder type indexes of ThreadLocal instances that get disposed using the s_availableIndices concurrent stack. This allows GenericHolder instantiations of disposed ThreadLocal instances to be re-used. But if there aren't any available instantiations, then ThreadLocal falls back on a standard thread local slot using TLSHolder. This makes it very important to dispose of your ThreadLocal instances if you'll be using lots of them, so the type instantiations can be recycled. The previous way of creating arbitary thread-static variables, thread data slots, was slow, clunky, and hard to use. In comparison, ThreadLocal can be used just like any other type, and each instance appears from the outside to be a non-static thread-static variable. It does this by using the CLR type system to assign each instance of ThreadLocal its own instantiated type containing a thread-static field, and so delegating a lot of the bookkeeping that thread data slots had to do to the CLR type system itself! That's a very clever use of the CLR type system.

    Read the article

  • Modular enterprise architecture using MVC and Orchard CMS

    - by MrJD
    I'm making a large scale MVC application using Orchard. And I'm going to be separating my logic into modules. I'm also trying to heavily decouple the application for maximum extensibility and testability. I have a rudimentary understanding of IoC, Repository Pattern, Unit of Work pattern and Service Layer pattern. I've made myself a diagram. I'm wondering if it is correct and if there is anything I have missed regarding an extensible application. Note that each module is a separate project. Update So I have many UI modules that use the db module, that's why they've been split up. There are other services the UI modules will use. The UI modules have been split up because they will be made over time, independent of each other.

    Read the article

  • Why ISVs Run Applications on Oracle SuperCluster

    - by Parnian Taidi-Oracle
    Michael Palmeter, Senior Director Product Development of Oracle Engineered Systems, discusses how ISVs can easily run up to 20x faster, gain 28:1 storage compression, and grow presence in the market all without any changes to their code in this short video. One of the family of Oracle engineered systems products, Oracle SuperCluster provides maximum end-to-end database and application performance with minimal initial and ongoing support and maintenance effort, at the lowest total cost of ownership. Java or enterprise applications running on Oracle Database 11gR2 or higher and Oracle Solaris 11 can run up to 20X faster than traditional platforms on Oracle SuperCluster without any changes to their code.  Large number of customers are consolidating hundreds of their applications and databases on Oracle SuperCluster and are requiring their ISVs to support it. ISVs can become Oracle SuperCluster Ready and Oracle SuperCluster Optimized by joining the Oracle Exastack program. 

    Read the article

  • Les débits annoncés par les FAI dans leurs publicités sont-ils mensongers ? Faut-il afficher des vitesses plus proches de la réalité ?

    Les débits annoncés par les FAI dans leurs publicités sont-ils mensongers ? Faut-il modifier ces "jusqu'à" pour afficher des vitesses plus proches de la réalité ? C'est une pratique courante. Dans leurs publicités, les FAI affichent ostensiblement un débit pour vanter leurs offres. Mais, lorsque vous y regardez de plus près, vous apercevez les petits caractères "jusqu'à". Ceci vous indique que le la vitesse annoncée n'est en fait qu'un maximum théorique, et pas ce que vous aurez dans votre salon. Une différence qu'une majorité de consommateurs ne saisit pas. Outre manche, une procédure est actuellement en cours pour tenter de bannir ce type d'accroche des publicités liées aux offres haut débit. L...

    Read the article

  • How to play the sound of an object sliding on another object for a variable duration

    - by Antoine
    I would like to add sound effects to a basic 2D game. For example, a stone sphere is rolling on wood surface. Let's say I have a 2 second audio recording of this. How could I use the sample to add sound for an arbitrary duration ? So far I have two solutions in mind: a/ record the sound for an amount of time that is greater than the maximum expected duration, and play only a part of it; b/ extract a small portion of the sample and play it in a loop for the duration of the move; however I'm not sure if it makes sense with an audio wave.

    Read the article

  • BizTalk 2009 - Custom Functoid Wizard

    - by StuartBrierley
    When creating BizTalk maps you may find that there are times when you need perform tasks that the standard functoids do not cover.  At other times you may find yourself reapeating a pattern of standard functoids over and over again, adding visual complexity to an otherwise simple process.  In these cases you may find it preferable to create your own custom functoids.  In the past I have created a number of custom functoids from scratch, but recently I decided to try out the Custom Functoid Wizard for BizTalk 2009. After downloading and installing the wizard you should start Visual Studio and select to create a new BizTalk Server Functoid Project. Following the splash screen you will be presented with the General Properties screen, where you can set the classname, namespace, assembly name and strong name key file. The next screen is the first set of properties for the functoid.  First of all is the fuctoid ID; this must be a value above 6000. You should also then set the name, tooltip and description of the functoid.  The name will appear in the visual studio toolbox and the tooltip on hover over in the toolbox.  The descrition will be shown when you configure the functoid inputs when using it in a map; as such it should provide a decent level of information to allow the functoid to be used. Next you must set the category, exception mesage, icon and implementation language.  The category will affect the positioning of the functoid within the toolbox and also some of the behaviours of the functoid. We must then define the parameters and connections for our new functoid.  Here you can define the names and types of your input parameters along with the minimum and maximum number of input connections.  You will also need to define the types of connections accepted and the output type of the functoid. Finally you can click finish and your custom functoid project will be created. The results of this process can be seen in the solution explorer, where you will see that a project, functoid class file and a resource file have been created for you. If you open the class file you will see that the following code has been created for you: The "base" function sets all the properties that you previsouly detailed in the custom functoid wizard.  public TestFunctoids():base()  {    int functoidID;    // This has to be a number greater than 6000    functoidID = System.Convert.ToInt32(resmgr.GetString("FunctoidId"));    this.ID = functoidID;    // Set Resource strings, bitmaps    SetupResourceAssembly(ResourceName, Assembly.GetExecutingAssembly());    SetName("FunctoidName");                     SetTooltip("FunctoidToolTip");    SetDescription("FunctoidDescription");    SetBitmap("FunctoidBitmap");    // Minimum and maximum parameters that the functoid accepts    this.SetMinParams(2);    this.SetMaxParams(2);    /// Function name that needs to be called when this Functoid is invoked.    /// Put this in GAC.    SetExternalFunctionName(GetType().Assembly.FullName,     "MyCompany.BizTalk.Functoids.TestFuntoids.TestFunctoids", "Execute");    // Category for this functoid.    this.Category = FunctoidCategory.String;    // Input and output Connection type    this.OutputConnectionType = ConnectionType.AllExceptRecord;    AddInputConnectionType(ConnectionType.AllExceptRecord);   } The "Execute" function provides a skeleton function that contains the code to be executed by your new functoid.  The inputs and outputs should match those you defined in the Custom Functoid Wizard.   public System.Int32 Execute(System.Int32 Cool)   {    ResourceManager resmgr = new ResourceManager(ResourceName, Assembly.GetExecutingAssembly());    try    {     // TODO: Implement Functoid Logic    }    catch (Exception e)    {     throw new Exception(resmgr.GetString("FunctoidException"), e);    }   } Opening the resource file you will see some of the various string values that you defined in the Custom Functoid Wizard - Name, Tooltip, Description and Exception. You can also select to look at the image resources.  This will display the embedded icon image for the functoid.  To change this right click the icon and select "Import from File". Once you have completed the skeleton code you can then look at trying out your functoid. To do this you will need to build the project, copy the compiled DLL to C:\Program Files\Microsoft BizTalk Server 2009\Developer Tools\Mapper Extensions and then refresh the toolbox in visual studio.

    Read the article

  • Should I concentrate on writing code for money or my studies while in college?

    - by A-Cube
    I am college student of Software Engineering. My worries are that while I am concentrating on my studies, my peers are getting down with the code (e.g. HTML, ASP, PHP, etc) to earn money. Should I be worried that I am not doing coding like them? I was asked to be Microsoft Student Partner but I refused because the person what was doing before me told it was just arranging events. Nothing as such like getting with Microsoft and coding. Should I be writing code and earning money as I still am in 4th semester? I only have C++ as learning language in college. Will my job count on these projects that I do, or should I concentrate on studies for now to get maximum benefit?

    Read the article

  • How can I reach over 100% volume with a keyboard shortcut?

    - by suli8
    sometimes the sound of videos isn't enough for me. so i reach the sound indicator , over sound preferences and change it to a level higher than 100%. the question is how can i do it from the keyboard? now i can control the volume from the keyboard but it's maximum is 100%. is there a way to do that? EDIT 1: how to use amixer to do it? (as Lyrositor suggested) EDIT2: the closest answer , as Jo-erland, suggested is to set a hotkey to bring up the gnome-volume-control, and then to use left and right arrows to change volume also beyond the 100% mark. any other suggestions, to make this 1 step only? is it possible to set a hotkey to do a sequence of commands ?

    Read the article

  • Games display across both monitors when opened

    - by Mitch
    I am not sure what setting to change for this but I open games like Dungeon Crawl or a Steam game and the game wants to take up both screens. Is there a way to have the game open just on one screen xrandr shows this. So they are both on Screen 0: Screen 0: minimum 320 x 200, current 2966 x 900, maximum 8192 x 8192 LVDS1 connected 1366x768+1600+75 (normal left inverted right x axis y axis) 344mm x 193mm VGA1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 443mm x 249mm If you need any more info or can point me to a place you may have already found an answer please let me know.

    Read the article

  • Tracking Search Filter Parameters Using Google Analytics

    - by Petra Barus
    I'm just wondering if there is a way to do this using Google Analytics. Let's say I have a search filter like the one used in Trulia.com There is a text search for the location with other drop-downs for filtering by bedroom, land size, property type (apartments, house) etc. Is there a way to track the filter and obtain a report for some questions like below using Google Analytics What is the most popular property types (house, apartments) for search in New York area? What is the most common maximum price of users who are looking for apartments in San Francisco? (or actually Google Analytics is not suitable for this kind of thing?)

    Read the article

  • Projected trajectory of a vehicle?

    - by mac
    In the game I am developing, I have to calculate if my vehicle (1) which in the example is travelling north with a speed V, can reach its target (2). The example depict the problem from atop: There are actually two possible scenarios: V is constant (resulting in trajectory 4, an arc of a circle) or the vehicle has the capacity to accelerate/decelerate (trajectory 3, an arc of a spiral). I would like to know if there is a straightforward way to verify if the vehicle is able to reach its target (as opposed to overshooting it). I'm particularly interested in trajectory #3, as I the only thing I could think of is integrating the position of the vehicle over time. EDIT: of course the vehicle has always the capacity to steer, but the steer radius vary with its speed (think to a maximum lateral g-force). EDIT2: also notice that (as most of the vehicles in real life) there is a minimum steering radius for the in-game ones too).

    Read the article

  • New Whitepaper: Deploying E-Business Suite on Exadata and Exalogic

    - by Elke Phelps (Oracle Development)
    Our E-Business Suite Performance Team recently published a new whitepaper to assist you with deploying E-Business Suite on the Oracle Exalogic Elastic Cloud and Oracle Exadata Database Machine , also referred to as Exastack.  If you are considering a migration to Exastack, this new whitepaper will assist you understanding sizing requirements, deployment standards and migration strategies: Deploying Oracle E-Business Suite on Oracle Exalogic Elastic Cloud and Oracle Exadata Database Machine (Note 1460742.1) This whitepaper covers the following topics: Scalability and Sizing Examples - provides performance benchmark analysis with concurrent user counts, scaling analysis and sizing recommendations Deployment Standards - includes recommendations for deploying the various components of the E-Business Suite architecture on Exastack Migration Standards and Guidelines - includes an overview of methods for migrating from commodity hardware to Exastack References Our Maximum Availability Architecture (MAA) team has a number of whitepapers that provide additional information regarding Oracle E-Business Suite on the Oracle Exadata Database Machine.  Their library of whitepapers may be found here: MAA Best Practices - Oracle Applications Unlimited  Related Articles Running E-Business Suite on Exadata V2 Running Oracle E-Business Suite on Exalogic Elastic Cloud

    Read the article

  • Plugging two external screens to laptop via VGA and HDMI

    - by avilella
    I have an Asus U30JC laptop with a VGA and HDMI ports. I can connect my external screen (1920x1200) to either of those ports but I wonder if I would be able to use two screens at the same time, one plugged to the VGA and the other to the HDMI socket. Any ideas? Where should I find out? Doing xrandr, I get: Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192 LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 293mm x 164mm 1366x768 60.0*+ 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis)

    Read the article

  • Can I toggle word-wrapping on/off quickly in Gedit?

    - by Ivan
    Depending on nature of the text, some times line wrapping is convenient, some times it is just confusing. And every time I need to switch this (pretty frequently) I have to do to View - Preferences - Enable text wrapping - Close - 4 clicks, not mentioning all the hand, eye and thought motion. Can this be done a quicker way? Most of text editors have this 2 clicks away (in a menu) at maximum, some have it on a toolbar or a hot key, but I couldn;t find any quick way in Gedit :-( Maybe there is a hot key I don't know?

    Read the article

  • Finding Near-Earth Asteroids

    - by TATWORTH
    One of the puzzling aspects of hunting for Near Earth Asteroids is that more has been spent on Hollywood films about potential disasters should one hit the Earth than on finding them in the first place. While there are a number of on-going asteroid search programs, these are all Earth-based at the moment. The limitations of them are:Each telescope can only observe for a maximum average of 12 hours per day.As far as I am aware, all these programs are in the visible light only. (Once an asteroid is found, then radar tracking is possible when it is close.)Being Earth based they cannot see inside the Earth's orbit.The Asteroids being generally dark, do not show up well in visible light.A private group are proposing a radical alternative to this by orbiting an infra-red telescope in the orbit of Venus. In Infra-red, the asteroids are more readily seen. Here are some details: Source SPACE.com: All about our solar system, outer space and exploration

    Read the article

  • Adjusting server-side tickrate dynamically

    - by Stuart Blackler
    I know nothing of game development/this site, so I apologise if this is completely foobar. Today I experimented with building a small game loop for a network game (think MW3, CSGO etc). I was wondering why they do not build in automatic rate adjustment based on server performance? Would it affect the client that much if the client knew this frame is based on this tickrate? Has anyone attempted this before? Here is what my noobish C++ brain came up with earlier. It will improve the tickrate if it has been stable for x ticks. If it "lags", the tickrate will be reduced down by y amount: // GameEngine.cpp : Defines the entry point for the console application. // #ifdef WIN32 #include <Windows.h> #else #include <sys/time.h> #include <ctime> #endif #include<iostream> #include <dos.h> #include "stdafx.h" using namespace std; UINT64 GetTimeInMs() { #ifdef WIN32 /* Windows */ FILETIME ft; LARGE_INTEGER li; /* Get the amount of 100 nano seconds intervals elapsed since January 1, 1601 (UTC) and copy it * to a LARGE_INTEGER structure. */ GetSystemTimeAsFileTime(&ft); li.LowPart = ft.dwLowDateTime; li.HighPart = ft.dwHighDateTime; UINT64 ret = li.QuadPart; ret -= 116444736000000000LL; /* Convert from file time to UNIX epoch time. */ ret /= 10000; /* From 100 nano seconds (10^-7) to 1 millisecond (10^-3) intervals */ return ret; #else /* Linux */ struct timeval tv; gettimeofday(&tv, NULL); uint64 ret = tv.tv_usec; /* Convert from micro seconds (10^-6) to milliseconds (10^-3) */ ret /= 1000; /* Adds the seconds (10^0) after converting them to milliseconds (10^-3) */ ret += (tv.tv_sec * 1000); return ret; #endif } int _tmain(int argc, _TCHAR* argv[]) { int sv_tickrate_max = 1000; // The maximum amount of ticks per second int sv_tickrate_min = 100; // The minimum amount of ticks per second int sv_tickrate_adjust = 10; // How much to de/increment the tickrate by int sv_tickrate_stable_before_increment = 1000; // How many stable ticks before we increase the tickrate again int sys_tickrate_current = sv_tickrate_max; // Always start at the highest possible tickrate for the best performance int counter_stable_ticks = 0; // How many ticks we have not lagged for UINT64 __startTime = GetTimeInMs(); int ticks = 100000; while(ticks > 0) { int maxTimeInMs = 1000 / sys_tickrate_current; UINT64 _startTime = GetTimeInMs(); // Long code here... cout << "."; UINT64 _timeTaken = GetTimeInMs() - _startTime; if(_timeTaken < maxTimeInMs) { Sleep(maxTimeInMs - _timeTaken); counter_stable_ticks++; if(counter_stable_ticks >= sv_tickrate_stable_before_increment) { // reset the stable # ticks counter counter_stable_ticks = 0; // make sure that we don't go over the maximum tickrate if(sys_tickrate_current + sv_tickrate_adjust <= sv_tickrate_max) { sys_tickrate_current += sv_tickrate_adjust; // let me know in console #DEBUG cout << endl << "Improving tickrate. New tickrate: " << sys_tickrate_current << endl; } } } else if(_timeTaken > maxTimeInMs) { cout << endl; if((sys_tickrate_current - sv_tickrate_adjust) > sv_tickrate_min) { sys_tickrate_current -= sv_tickrate_adjust; } else { if(sys_tickrate_current == sv_tickrate_min) { cout << "Please reduce sv_tickrate_min..." << endl; } else{ sys_tickrate_current = sv_tickrate_min; } } // let me know in console #DEBUG cout << "The server has lag. Reduced tickrate to: " << sys_tickrate_current << endl; } ticks--; } UINT64 __timeTaken = GetTimeInMs() - __startTime; cout << endl << endl << "Total time in ms: " << __timeTaken; cout << endl << "Ending tickrate: " << sys_tickrate_current; char test; cin >> test; return 0; }

    Read the article

  • Lubuntu 13.04 Resolution Issue du to ppa makson96

    - by Choupa
    I've installed Lubuntu 13.04 on my notebook. (It's the first time I use Lubuntu) I had graphical issue, apparently due to the graphic driver (ATI Radeon Xpress 1200) I followed this procedure to correct my problem : sudo add-apt-repository ppa:makson96 sudo apt-get update sudo apt-get upgrade sudo apt-get install fglrx-legacy My graphical issue has been corrected but now it shows a low resolution (1024*768) and I can't change it. the xrandr result : xrandr: failed to get size of gamma output default Screen 0: minimum 1024x768, current 1027x768, maximum 1024x768 default connected 1024x768+0+0 0mmx0mm 1024x768 0.0* I've already read this topic but I don't really understand how things work there. I'd really appreciate your help ! Many thanks !

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >