Search Results

Search found 470 results on 19 pages for 'temperature'.

Page 16/19 | < Previous Page | 12 13 14 15 16 17 18 19  | Next Page >

  • ACER ASPIRE V3-571G-9435 Fan not kicking in leading to overclocking

    - by brythespy
    This laptop has always had this problem. The temperatures kick up to the thermal ceiling of 99C for the CPU (i7-3610QM) and 94C for the GPU (GT 640M). Problem is, the FAN doesn't give a damn. It's actually QUIETER when the temperatures are that high, than when it's at 60C or so. I figured it was a problem with the BIOS, so I updated that, no change. So maybe it was a problem with windows? Nope, same result on gaming with Ubuntu. The major problem of this, is that after gaming for ten minutes the CPU throttles itself to 1197MHz(as opposed to 3193), and the GPU goes down to 135MHz( as opposed to 843MHz). The problem is that the fan won't kick in like I know it can, because when the laptop is in POST, like at BIOS setup, the fan is like a vacuum cleaner it's so loud! I don't really care about noise, so I'd love to have the fan like that all the time as long as the temperatures don't fly through the roof... So, things I've tried so far, to avoid possible duplicate answers. Checked for dust: It's been this way since the laptop was new, and I've since then taken it apart. No dust buildup. Background stuff running?: No, problem persists across OS'es, and it happens while gaming anyways Manually underclocking both CPU/GPU: Using windows, I can force the CPU to stay at 1.1GHz, but the temperature STILL easily hits 99C after 5 min of gaming Contacted Acer support?: No help at all. They told me to update and reset the BIOS, which I have done multiple times. There are only about 6 changeable things anyway, none of which should affect the FAN control Third party fan control program?: None detect the fan So, I'm screwed until I can afford to replace this laptop, but I am very satisfied with performance in games... Whenever the CPU/GPU aren't being throttled. Anyone that can offer advice to solve this problem would be greatly appreciated. Hell, if you solved my problem I'd send you some monies through paypal.

    Read the article

  • Compaq Motherboard gives "CPU Fan Error"

    - by John
    I have a motherboard for a HP business desktop dx5150 PC. The model written on the board is "MS-7050" and it is for an AMD socket 939 processor. I got everything installed in it, and when I turned it on, it showed a message stating that there was a "CPU Fan Error" (or some similar language) and then turned off. It never stays on for more than about 30 seconds, probably less. The fan had previously been working great, but I replaced it anyway with a brand new Cooler Master fan. This did not work. I then reset the BIOS with the jumpers on the board, no dice. I replaced the CMOS battery. Same error. I then replaced the entire computer power supply with a brand new Antec, same error. The fan header is keyed, and has room for 3 pins. The CPU fan is designed the same way, so its not that I'm missing a temperature sensor or anything. Can anyone give some suggestions? Especially maybe some secret keystrokes to bypass this error?

    Read the article

  • Laptop Overheating with Windows 8

    - by Dany Khalife
    I recently installed Windows 8 on my HP G62 Laptop and i have been noticing a very strange problem with it. Let alone, for lets say 5 minutes, without even touching it, it starts to heat up and it reaches about 60 degrees (Celsius) with absolutely no applications open (not just on desktop but overall). I dug in a little deep and found out that Maintenance was running when the computer was Idle, so i turned that off From the System's Task Scheduler, and while there i also turned off other services i did not need hoping that would solve the problem. So after a few days, i noticed that the average temperature of my laptop dropped from 55 to 48 degrees while working on Visual Studio. And when i thought the problem had disappeared, it still did show up, only not after 5 minutes, but more like 10 minutes... Here is what i have done so far: Replacing the thermal paste on the CPU and the fan and cleaning the fan (this was like 6 months ago) Using a laptop cooler Running a virus scan (i just formatted my laptop so it would be really weird if i already caught something but who knows) Right now, i believe it has something to do with my gfx driver (Even though it IS up to date, looking closely at the screen, i can see the pixels slowly refresh (kinda like watching static on TV) which i wasn't able to do on Windows 7. If you have any ideas, let me know. Thanks

    Read the article

  • How I can fix the "Display Driver has stopped responding and has recovered"?

    - by Vitor Rangel
    I'm using a GeForce GTX 580, with Windows 7 64-bit. The driver version of the GTX is 301.42. The problem happens after a few minutes, when I'm playing specifc games. It won't happen in all games - And I don't have any idea why these games doesn't work. The games that doesn't work: Battlefield 3, Civilization V, Sniper Elite V2. The games that work: Mass Effect 3, Crysis 2, Team Fortress 2, Left 4 Dead 2, Skyrim, L.A. Noire. As you can see, it's not a problem of "The games that demand more stop working". I've tryed updating the driver of the graphics-card, the bios of the motherboard, even formated my computer (It was needing it) and instaled every driver in the last version possible. This problem happens since I bought my graphics-card, 6 months ago. After a few minutes, from 10 to 20, the pixels in the monitor become strange, with random colors and effects, like it was broken. Then, everything goes black, and the message appears "Display Driver has stopped responding and has recovered". After that, I need to close the game and start again. I am not overclocking, and my temperature never goes higher than 70ºC.

    Read the article

  • Win7 Hangs During App Install/Upgrade/Uninstall

    - by JadeMason
    I have a custom built PC that intermittently hangs when installing, uninstalling, or upgrading applications. Technical Specs ASUS P5E w/ WiFi Motherboard Intel Core2 Quad Q6600 Processor 4x 2GB G.Skill DDR2 800 SDRAM ASUS EAH2900XT / Radeon HD 2900XT 512MB Video Card Under normal operation the machine runs reliably, even under heavy load, such as video transcoding. The temperature never gets anywhere near where I would worry about it. However, the machine regularly hangs (complete lockup, no response to keyboard or mouse, no activity on-screen) when either installing a new application, uninstalling an existing application, or applying patches to existing applications or the OS. This is extremely frustrating as this machine is primarily used as a HTPC. Several apps are configured for automatic updates, and these updates sometimes cause the machine to lockup while we are watching content on the PC. In previously investigating this issue, I found one likely problem could be my Logitech Webcam. The Logitech software has a bug that leaves an entry in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\SessionManager\PendingFileRenameOperations Which references the Temp directory. My registry contained this error, so I uninstalled the webcam software and deleted this registry key value. Unfortunately, the machine will still intermittently hang. I've noticed that the hangs always happen when an install/upgrade/uninstall requires elevated privileges (presumably to modify the registry). I can typically get at least one install/upgrade/uninstall to complete after a reboot, but after that it is a game of russian roulette to see if the operation will succeed or hang the machine. The event log is not helpful, as log messages end at the time of the hang, with no record of a warning or error. My only recourse when the machine hangs in this way is to perform a hard reset/power cycle. Any tips on how to further debug this issue are greatly appreciated.

    Read the article

  • CPU not working on a specific motherboard

    - by Shaman
    I'm making a computer for someone and I met a weird problem. The CPU that I have doesn't work on this motherboard. The CPU is an Intel Pentium D 925 and the motherboard is an ECS G41T-M6, which in theory should work together. The only thing reused is the power source(400W). When I start the computer, the fans start, and that's it. The BIOS doesn't boot. I tried my own power source (600W Corsair) and nothing. Removed the RAM, no warning. In desperation I tried the last thing, swaped my own CPU with this one (Core2Duo E7200). Lo and behold, it worked. Both. The Core2Duo worked on the ECS with the old power source and the RAM that I used in the first place, and the Pentium D worked on my Gigabyte G31M-ES2L. What I discovered was that the Pentium D didn't receive power on the ECS, because I tried running it without the cooler and it remained at room temperature. On a side note, I also removed the HDDs just in case. So, in conclusion, any ideas? I can't return it, and I can still use it to upgrade another PC, but I would really prefer not to buy another CPU if possible.

    Read the article

  • Suspending/Screen Going Off When Still In Use (Ubuntu & Arch)

    - by luke
    I have a laptop (HP Pavilion G6) that was running Ubuntu and for a while now (at least 6 months) has been having a problems randomly suspending whilst still in use with a full battery and still being charged. Originally the problem was with Ubuntu so I first attempted to disable suspend using every way I could find (gui settings + dconf editor) this didn't work and it still kept suspending so I ended up switching to Arch Linux. Unfortunately not long after switching to Arch Linux I ended up experiencing the same problems. So yet again I modified the settings in /etc/systemd/logind.conf to prevent it from suspending and this time it worked, kind of. Now I am experiencing the screen going off and I have to change to a different tty (by using ctrl-alt-fx, which was something I also found I had to do sometimes when waking up from suspend in Ubuntu) to get the screen to go back on. The strange thing is this only happens when running a Linux distros and only occasionally (e.g. it may happen once/twice a week at most). But when it does happen it can happen multiple times in a row. And it only seems to happen when I am using it. This may just mean that it hasn't happened yet when I am not but generally if I leave it to run something or play a video it hasn't occurred only when I am using it regardless of which program I am using (e.g. it has occurred when using firefox, vim, even when using a virtualbox vm). At first I thought it could be the CPU temperature but after monitoring it I discovered it occurred a lot of the time when my CPU was less than 50 °C. I then checked /var/log/* but could not see anything related to it suspending only a few standard things from when it was woken up. I am really out of ideas and really hoping someone can help. Thanks in advance.

    Read the article

  • running a laptop continuously

    - by intuited
    I have an experienced laptop — a Dell Latitude D400, with a Pentium M CPU — that I'd like to run as an always-on server. This model was launched in 2004; I got mine second-hand in about 2007. I've heard that continuous operation is generally not a good idea with consumer hardware, but am lacking in specific knowledge about related problems, and have little idea of how much such usage patterns would reduce the lifespan of the machine. I'm mostly concerned with the unit's core components; parts such as the hard drive which are readily replaceable are, well, readily replaceable. What sorts of things can I do to increase the lifespan of this machine under such circumstances? For example, I'm guessing that it would be wise to limit the CPU frequency or take other steps to keep the internal temperature low. However, I'm not sure where the point of diminishing returns would lie with such an approach — 50°C? 40°C? Would it be useful to suspend the machine periodically, for perhaps an hour each day, or a few hours each week?

    Read the article

  • Laptop CPU fan not working properly

    - by Smith
    My laptop's CPU fan is suddenly acting very bizarre, and I am at a loss for what to do so I am asking for some help. Specifically, the fan is not even starting to spin until the CPU reaches 60 degrees Celsius (checked through HWmonitor). Once it is on, however, it properly stays on even when the CPU gets back to idle temps around 38 Celsius. Before, the fan was simply starting with the computer and staying on like normal. I've checked this for consistency both by allowing cold boots to ramp up temperature to 60 Celsius (the slow climb also causing the laptop to become unreasonably warm near the heatsink), and also running Prime95 immediately to kickstart the fan (this works every time). The fan seems to be stationary when turning the computer on from either sleep or shutdown. The fan will start at POST very briefly, and then stop completely. I've checked the BIOS for a SmartFan setting but haven't found any. I've opened the case to check for dust or debris and have not found anything (I applied some canned air to the area just in case). The laptop is a Lenovo ThinkPad Edge E430 and the CPU is an Intel Core i5 3210m @ 2.5 GHz. Any advice would really be appreciated.

    Read the article

  • Windows 7 Laptop Randomly Sleeping

    - by Josh Arenberg
    I'm running Windows 7 64-bit on a Lenovo laptop, and I have a problem wherein after I've put it to 'sleep' once, it will seemingly without any reason or warning go back to sleep every 10 to 15 minutes after that. Each time it wakes back up just fine, and you can happily continue on. However, 10 or 15 minutes later, it just drops out into sleep mode. I don't see any errors in the system logs. I don't think it's related to heat ( since it's not rebooting ). When I check the system event log, I can see where the machine goes to sleep, but it simply says "reason: application API", and doesn't indicate which app ( brilliant ). I don't see any errors from hardware or anything relating to sleep in the application log that would point to what is going on either. How can I find out which app is triggering this? EDIT: I confirmed that temperature wasn't the issue. I think it's important to keep in mind that this condition only happens after the first sleep. If I reboot, the problem goes away until I put it to sleep, after which it sleeps on it's own every few minutes. Is there no way to capture which app is calling the sleep routine?

    Read the article

  • Easily Plotting Multiple Data Series in Excel

    - by John
    I really need help figuring out how to speed up graphing multiple series on a graph. I have seperate devices that give monthly readings for several variables like pressure, temperature, and salinity. Each of these variables is going to be its own graph with devices being the series. My x-axis is going to be the dates that these values were taken. The problem is that it takes ages to do this for each spreadsheet since I have monthly dates from 1950 up to the present and I have about 50 devices in each spreadsheet. I also have graphs for calculated values that are in columns next to them. Each of these devices is going to become a data series in the graph. E.g. In one of my graphs I have all the pressures from the devices and each of the data series' names is the name of the device. I want a fast way to do this. Doing this manually is taking a very long time. Please help! Is there any easier way to do this? It is consistent and the dates all line up. I am just repeating the same clicks over and over again Thank you!

    Read the article

  • Diagnosing PC crashes (most often while using shared folders or torrents)

    - by Dyppl
    For the last few weeks my PC (pretty old P4 with WinXP SP3) has been crashing randomly. It just suddenly reboots instanteneously. It feels hardware-related but I wasn't able to determine wether it's software or hardware that causes it. I did notice a pattern though: it's more likely to crash when I copy a lot of files over network or have uTorrent running, but sometimes it crashes when I am not doing anything with it. Copying files from it over network causes it to crash in 1 to 10 minutes almost every time. Using torrents causes it to crash every 1-3 hours. With neither or that on it crashes every 24 hours or so. I ruled out the following probable causes: PSU (I bought a new one and turned off most of the drives so the power is sufficient 100%) Bad HDD or interface cable on my SATA disk from which I was originally copying the data over network (bought new SATA cable and later yanked out the HDD completely, PC still crashes without it) Video adapter (AGP slot is now empty, using the onboard VGA at the moment) Network adapter (removed it from PCI, using onboard LAN) CPU (I think: I changed the termopaste and it's temperature is below 50C) RAM (I think: I ran Memtest86 and it didn't show any errors) At the moment I only have only one system HDD and DVD drives, a mouse and a keyboard plugged in. The fact that it crashes most often when I use network extensively makes me think that maybe it's software related (I removed the network adapter from PCI and now am using an onboard one, so network hardware is unlikely to cause problems). I am now pondering system reinstall but it's not a pleasant solution so I decided to ask wether there are better ideas first. If someone can share a good diagnostic tool it would be great because I didn't find anything good. Thanks in advance, I hope that "help to diagnose" questions aren't entirely banned here. EDIT: Motherboard is actually ~4 years old as I replaced it back in 2007

    Read the article

  • How do I use XML prefixes in C#?

    - by Andrew Mock
    EDIT: I have now published my app: http://pastebin.com/PYAxaTHU I was trying to make console-based application that returns my temperature. using System; using System.Xml; namespace GetTemp { class Program { static void Main(string[] args) { XmlDocument doc = new XmlDocument(); doc.LoadXml(downloadWebPage( "http://www.andrewmock.com/uploads/example.xml" )); XmlNamespaceManager man = new XmlNamespaceManager(doc.NameTable); man.AddNamespace("aws", "www.aws.com/aws"); XmlNode weather = doc.SelectSingleNode("aws:weather", man); Console.WriteLine(weather.InnerText); Console.ReadKey(false); } } } Here is the sample XML: <aws:weather xmlns:aws="http://www.aws.com/aws"> <aws:api version="2.0"/> <aws:WebURL>http://weather.weatherbug.com/WA/Kenmore-weather.html?ZCode=Z5546&Units=0&stat=BOTHL</aws:WebURL> <aws:InputLocationURL>http://weather.weatherbug.com/WA/Kenmore-weather.html?ZCode=Z5546&Units=0</aws:InputLocationURL> <aws:station requestedID="BOTHL" id="BOTHL" name="Moorlands ES" city="Kenmore" state=" WA" zipcode="98028" country="USA" latitude="47.7383346557617" longitude="-122.230278015137"/> <aws:current-condition icon="http://deskwx.weatherbug.com/images/Forecast/icons/cond024.gif">Mostly Cloudy</aws:current-condition> <aws:temp units="&deg;F">40.2</aws:temp> <aws:rain-today units=""">0</aws:rain-today> <aws:wind-speed units="mph">0</aws:wind-speed> <aws:wind-direction>WNW</aws:wind-direction> <aws:gust-speed units="mph">5</aws:gust-speed> <aws:gust-direction>NW</aws:gust-direction> </aws:weather> I'm just not sure how to use XML prefixes correctly here. What is wrong with this?

    Read the article

  • Looking for Hardware that will easily interface with my .NET code.

    - by SkippyFire
    I'm a .NET C# developer looking to do some hardware interfacing/programming. I just want something super simple to mess around with. I have done one of those basic stamp projects, but I want something with less electrical work. A self-contained piece of hardware would be fine. I'm not really looking to do embedded programming... but that would actually be pretty cool if something was capable of running .net code. I'm looking for something that would be easy to connect, hopefully via USB. Serial ports seems to be more hit or miss nowadays with laptops and netbooks. Something I can easily send data to, like a mini LCD, or series of LED's. Better yet would be something that provides feedback, like a temperature sensor. The best would be something more featured that I could talk to. I would be able to send data to it, and it would send back responses. Maybe something like a servo that could report it's position? Or maybe something that I could set parameters on? Any ideas? Thanks in advance!

    Read the article

  • PIC C - USB_CDC_GETC() and retrieving strings.

    - by Adam
    Hi all, I'm programming a PIC18F4455 Microcontroller using PIC C. I'm using the USB_CDC.h header file. I have a program on the computer sending a string such as "W250025". However, when I use usb_cdc_getc() to get the first char, it freezes. Sometimes the program sends only 'T', so I really want to just get the first character. Why does my code never execute past received=usb_cdc_getc(); when I send "W250025"? if (usb_cdc_kbhit()) { //printf(lcd_putc, "Check 3"); delay_ms(3000); printf(lcd_putc, "\f"); received = usb_cdc_getc(); printf(lcd_putc, "Received "); lcd_putc(received); delay_ms(3000); printf(lcd_putc, "\f"); if (received == 'W'){ //waveform disable_interrupts(INT_TIMER1); set_adc_channel(0); load_and_print_array(read_into_int(), read_into_int());} else if (received == 'T'){ //temperature set_adc_channel(1); enable_interrupts(INT_TIMER1);} }

    Read the article

  • Who likes #regions in Visual Studio?

    - by Nicholas
    Personally I can't stand region tags, but clearly they have wide spread appeal for organizing code, so I want to test the temperature of the water for other MS developer's take on this idea. My personal feeling is that any sort of silly trick to simplify code only acts to encourage terrible coding behavior, like lack of cohesion, unclear intention and poor or incomplete coding standards. One programmer told me that code regions helped encourage coding standards by making it clear where another programmer should put his or her contributions. But, to be blunt, this sounds like a load of horse manure to me. If you have a standard, it is the programmer's job to understand what that standard is... you should't need to define it in every single class file. And, nothing is more annoying than having all of your code collapsed when you open a file. I know that cntrl + M, L will open everything up, but then you have the hideous "hash region definition" open and closing lines to read. They're just irritating. My most stead fast coding philosophy is that all programmer should strive to create clear, concise and cohesive code. Region tags just serve to create noise and redundant intentions. Region tags would be moot in a well thought out and intentioned class. The only place they seem to make sense to me, is in automatically generated code, because you should never have to read that outside of personal curiosity.

    Read the article

  • parsing xml using dom4j

    - by D3GAN
    My XML structure is like this: <rss> <channel> <yweather:location city="Paris" region="" country="France"/> <yweather:units temperature="C" distance="km" pressure="mb" speed="km/h"/> <yweather:wind chill="-1" direction="40" speed="11.27"/> <yweather:atmosphere humidity="87" visibility="9.99" pressure="1015.92" rising="0"/> <yweather:astronomy sunrise="8:30 am" sunset="4:54 pm"/> </channel> </rss> when I tried to parse it using dom4j SAXReader xmlReader = createXmlReader(); Document doc = null; doc = xmlReader.read( inputStream );//inputStream is input of function log.info(doc.valueOf("/rss/channel/yweather:location/@city")); private SAXReader createXmlReader() { Map<String,String> uris = new HashMap<String,String>(); uris.put( "yweather", "http://xml.weather.yahoo.com/ns/rss/1.0" ); uris.put( "geo", "http://www.w3.org/2003/01/geo/wgs84_pos#" ); DocumentFactory factory = new DocumentFactory(); factory.setXPathNamespaceURIs( uris ); SAXReader xmlReader = new SAXReader(); xmlReader.setDocumentFactory( factory ); return xmlReader; } But I got nothing in cmd but when I print doc.asXML(), my XML structure print correctly!

    Read the article

  • Did I implement clock drift properly?

    - by David Titarenco
    I couldn't find any clock drift RNG code for Windows anywhere so I attempted to implement it myself. I haven't run the numbers through ent or DIEHARD yet, and I'm just wondering if this is even remotely correct... void QueryRDTSC(__int64* tick) { __asm { xor eax, eax cpuid rdtsc mov edi, dword ptr tick mov dword ptr [edi], eax mov dword ptr [edi+4], edx } } __int64 clockDriftRNG() { __int64 CPU_start, CPU_end, OS_start, OS_end; // get CPU ticks -- uses RDTSC on the Processor QueryRDTSC(&CPU_start); Sleep(1); QueryRDTSC(&CPU_end); // get OS ticks -- uses the Motherboard clock QueryPerformanceCounter((LARGE_INTEGER*)&OS_start); Sleep(1); QueryPerformanceCounter((LARGE_INTEGER*)&OS_end); // CPU clock is ~1000x faster than mobo clock // return raw return ((CPU_end - CPU_start)/(OS_end - OS_start)); // or // return a random number from 0 to 9 // return ((CPU_end - CPU_start)/(OS_end - OS_start)%10); } If you're wondering why I Sleep(1), it's because if I don't, OS_end - OS_start returns 0 consistently (because of the bad timer resolution, I presume). Basically, (CPU_end - CPU_start)/(OS_end - OS_start) always returns around 1000 with a slight variation based on the entropy of CPU load, maybe temperature, quartz crystal vibration imperfections, etc. Anyway, the numbers have a pretty decent distribution, but this could be totally wrong. I have no idea.

    Read the article

  • Is this WPF error handling a good idea ?

    - by Adiel
    I have a multi threaded wpf application with various HW interfaces. I want to react to several HW failures that can happen. For example : one of the interfaces is a temperature sensor and i want that from a certain temp. a meesage would appear and notify the user that it happened. i came up with the follwing design : /// <summary> /// This logic reacts to errors that occur during the system run. /// The reaction is set by the component that raised the error. /// </summary> public class ErrorHandlingLogic : Logic { } the above class would consume ErrorEventData that holds all the information about the error that occurred. public class ErrorEventData : IEventData { #region public enum public enum ErrorReaction { } #endregion public enum #region Private Data Memebers and props private ErrorReaction m_ErrorReaction; public ErrorReaction ErrorReactionValue { get { return m_ErrorReaction; } set { m_ErrorReaction = value; } } private string m_Msg; public string Msg { get { return m_Msg; } set { m_Msg = value; } } private string m_ComponentName; public string ComponentName { get { return m_ComponentName; } set { m_ComponentName = value; } } #endregion Private Data Memebers and props public ErrorEventData(ErrorReaction reaction, string msg, string componenetName) { m_ErrorReaction = reaction; m_Msg = msg; m_ComponentName = componenetName; } } the above ErrorHandlingLogic would decide what to do with the ErrorEventData sent to him from various components of the application. if needed it would be forwarded to the GUI to display a message to the user. so what do you think is it a good design ? thanks, Adiel.

    Read the article

  • MySql "comments" parameter as descriptor?

    - by Nick
    So, I'm trying to learn a lot at once, and this place is really helpful! I'm making a little running log website for myself and maybe a few other people, and I have it so that the user can add workouts for each day. With each workout, I have a variety of information the user can fill out for the workout, such as running distance, time, quality of run, course, etc... I store this in a MySql database as a table with fields titled "distance", "time", "runquality", etc... Now, these field titles don't match up with what I want displayed on the running log, so I was thinking of using the "Comments" attribute for a field to store its human-readable title--thus the field "runquality" would have "Quality of run" as its comment, and then I would pull the comment with a SQL query and display it instead of the field name. Is this a good theoretical/practical way of going about it? And what sort of SQL would I use to pull the comment for the field anyway? Secondly, suppose I want to add the ability for the user to create their own workout descriptors. So say a user wants to add a "temperature" descriptor for their workout. Should I create a script that adds fields to my workout table, or should I create a separate table listing only workout descriptors and somehow link the descriptor table with the "contents" table? I haven't learned any theory about database design or anything so any help is appreciated!

    Read the article

  • Efficiently select top row for each category in the set

    - by VladV
    I need to select a top row for each category from a known set (somewhat similar to this question). The problem is, how to make this query efficient on the large number of rows. For example, let's create a table that stores temperature recording in several places. CREATE TABLE #t ( placeId int, ts datetime, temp int, PRIMARY KEY (ts, placeId) ) -- insert some sample data SET NOCOUNT ON DECLARE @n int, @ts datetime SELECT @n = 1000, @ts = '2000-01-01' WHILE (@n>0) BEGIN INSERT INTO #t VALUES (@n % 10, @ts, @n % 37) IF (@n % 10 = 0) SET @ts = DATEADD(hour, 1, @ts) SET @n = @n - 1 END Now I need to get the latest recording for each of the places 1, 2, 3. This way is efficient, but doesn't scale well (and looks dirty). SELECT * FROM ( SELECT TOP 1 placeId, temp FROM #t WHERE placeId = 1 ORDER BY ts DESC ) t1 UNION ALL SELECT * FROM ( SELECT TOP 1 placeId, temp FROM #t WHERE placeId = 2 ORDER BY ts DESC ) t2 UNION ALL SELECT * FROM ( SELECT TOP 1 placeId, temp FROM #t WHERE placeId = 3 ORDER BY ts DESC ) t3 The following looks better but works much less efficiently (30% vs 70% according to the optimizer). SELECT placeId, ts, temp FROM ( SELECT placeId, ts, temp, ROW_NUMBER() OVER (PARTITION BY placeId ORDER BY ts DESC) rownum FROM #t WHERE placeId IN (1, 2, 3) ) t WHERE rownum = 1 The problem is, during the latter query execution plan a clustered index scan is performed on #t and 300 rows are retrieved, sorted, numbered, and then filtered, leaving only 3 rows. For the former query three times one row is fetched. Is there a way to perform the query efficiently without lots of unions?

    Read the article

  • CPU overheating because of Delphi IDE

    - by Altar
    I am using Delphi 7 but I have trialed the Delphi 2005 - 2010 versions. In all these new versions my CPU utilization is 50% (one core is 100%, the other is "relaxed") when Delphi IDE is visible on screen. It doesn't happen when the IDE is minimized. My computer is overheating because of this. Any hints why this happens? It looks like if I want to upgrade to Delphi 2010, I need to upgrade my cooling system first. And I am a bit lazy about that, especially that I want to discahrge my computer and buy a new one (in the next 6 months) - probably I will have to buy a Win 7 license too. Edit: My CPU is AMD Dual Core 4600+. 4GB RAM Overheating means that temperature of the HDDs is raising because the CPU. Edit: Comming to a possible solution I just deleted all HKCU/CodeGear key and let started Delphi as "new". Guess what? The CPU utilization is 0%. I will investigate more.

    Read the article

  • Labview + National Instruments hardware or ???

    - by NSL
    I'm in the processes of buying a new data acquisition system for my company to use for various projects. At first, it's primary purpose will be to monitor up to 20 thermocouples and control the temperature of a composites oven. However, I also plan on using it to monitor accelerometers, strain gauges, and to act as a signal generator. I probably won't be the only one to use it, but I have a good bit of programming experience with Atmel microcontrollers (C). I've used Labview before, but ~5 years ago. Labview would be good because it is easy to pick up on for both me and my coworkers. On the flip side, it's expensive. Right now I have a NI CompactDAQ system with 2 voltage and one thermocouple cards + Labview speced out and it's going to cost $5779! I'm going to try to get the same I/O capabilities with different NI hardware for less $ + labview to see if I can get it for less $. I'd like to see if anyone has any suggestions other than Labview for me. Thanks in advance!

    Read the article

  • how do i make the app take correct input..?

    - by user1824343
    This is my windows app's one layout which converts Celsius to Fahrenheit. The problem is that when I try to input the temperature it shows some junk(for eg: if i enter '3' it displayin '3.0000009') and sometimes its even showing stack overflow exception. The output is also not shown properly : cel.text is the textbox for celsius. fahre.text is the textbox for fahrenheit. namespace PanoramaApp1 { public partial class FahretoCel : PhoneApplicationPage { public FahretoCel() { InitializeComponent(); } private void fahre_TextChanged(object sender, TextChangedEventArgs e) { if (fahre.Text != "") { try { double F = Convert.ToDouble(fahre.Text); cel.Text = "" + ((5.0/9.0) * (F - 32)) ; //this is conversion expression } catch (FormatException) { fahre.Text = ""; cel.Text = ""; } } else { cel.Text = ""; } } private void cel_TextChanged(object sender, TextChangedEventArgs e) { if (cel.Text != "") { try { Double c = Convert.ToDouble(cel.Text); fahre.Text = "" + ((c *(9.0 / 5.0 )) + 32); } catch (FormatException) { fahre.Text = ""; cel.Text = ""; } } else { fahre.Text = ""; } } } }

    Read the article

  • How can I create a rules engine without using eval() or exec()?

    - by Angela
    I have a simple rules/conditions table in my database which is used to generate alerts for one of our systems. I want to create a rules engine or a domain specific language. A simple rule stored in this table would be..(omitting the relationships here) if temp > 40 send email Please note there would be many more such rules. A script runs once daily to evaluate these rules and perform the necessary actions. At the beginning, there was only one rule, so we had the script in place to only support that rule. However we now need to make it more scalable to support different conditions/rules. I have looked into rules engines , but I hope to achieve this in some simple pythonic way. At the moment, I have only come up with eval/exec and I know that is not the most recommended approach. So, what would be the best way to accomplish this?? ( The rules are stored as data in database so each object like "temperature", condition like "/=..etc" , value like "40,50..etc" and action like "email, sms, etc.." are stored in the database, i retrieve this to form the condition...if temp 50 send email, that was my idea to then use exec or eval on them to make it live code..but not sure if this is the right approach )

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19  | Next Page >