Search Results

Search found 9611 results on 385 pages for 'low power'.

Page 12/385 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Suspected power supply issue? PC repeatedly whirs for some seconds and then dies.

    - by benwebdev
    I've come home today and switched on the PC I've built a few months ago only for the machine to whir for a few short seconds and then die. It repeats this until I disconnect the power lead. Nothing is output to the screen and this cut out happens very quickly after switching it on. What could this be and how could it be fixed? Is it the power supply? I'm in despair :-( My spec is below, everything is new and was bought and assembled within the last 6months, system has been fantastic until now. Power Supply: 620W CoolerMaster Real Power M620 Motherboard: Gigabyte GA-X58A-UD3R Intel X58 (Socket 1366) DDR3 Processor: Intel Core i7 930 2.80GHz @ 4.00GHz RAM: 6GB DDR3 OS Windows 7 64bit Sapphire HD 5770 Vapor-X 1GB Graphics card 1TB Hitachi HDD 720GB Seagate Barracuda HDD 350GB Seagate Barracuda HDD EMu 0404 PCI Soundcard D-Link PCI-E wireless card Samsung DVD RW drive

    Read the article

  • Is it safe to use an IDE to SATA power adapter for an extended period of time?

    - by qwertymk
    I just bought a computer from HP and they failed to include SATA power connectors with the power supply other then the one HD and DVD drive. Meanwhile I have two IDE to SATA power adapters that came with my "USB 2.0 to SATA/IDE cable" http://www.amazon.com/USB-2-0-SATA-Cable-Adapter/dp/B001OORN06 3rd pic on the left. I was wondering if I would just open up my computer and use it to plug it my SATA drives to the IDE power sources and mount it to the motherboard, would it damage my drives in the long run or have any other significant effects. A friend told me he knows people who have had their HD burn out because of this

    Read the article

  • What are the essential considerations for setting up systems in a location with unreliable power?

    - by dunxd
    I deal with a lot of remote offices located in parts of the world where the local grid power supply is unreliable. Power can go off anytime with no warning, with outages ranging from minutes to days Power fluctuation is wild, with spikes and brown outs Currently the offices will have some or all of the following: A generator, with an inverter, or some sort of manual switch A big UPS or battery array connecting a number of devices Several smaller APC UPS with computers attached Low cost Voltage Regulators sometimes connected between mains and UPS or device. I know that each of these things needs to be appropriately rated for the equipment to which it is connected (although I am not sure how to calculate the correct rating). The offices will generally have the following equipment (in varying quantities): some sort of internet connection device (VSAT router, ADSL modem, WiMax router) Cisco ASA 5505 firewall a bunch of PCs printers one server I don't seek to replace the advice of an electrician, but in some of these locations they only answer the questions you ask them, so I need to make sure I have enough understanding of the essentials to protect equipment from damage, and possibly get through some power cuts.

    Read the article

  • Will an Australian power adapter with an American plug charge a Laptop safely?

    - by leeand00
    A friend of mine has a laptop that she brought from Egypt to America, and she is afraid to charge it. She told me the laptop was purchased in Australia and it has a plug like this: And the power adapter reads The relevant text on the power brick reads: Wide Range Input 100-240V-1.7A(1.7A) 50-60Hz 18.5(18.5V) = 3.5A(3.5A) 65W The other end of the power adapter looks like this: Laptop make and model: HP Pavilion dv5-1045TX

    Read the article

  • Simplify your Ajax code by using jQuery Global Ajax Handlers and ajaxSetup low-level interface

    - by hajan
    Creating web applications with consistent layout and user interface is very important for your users. In several ASP.NET projects I’ve completed lately, I’ve been using a lot jQuery and jQuery Ajax to achieve rich user experience and seamless interaction between the client and the server. In almost all of them, I took advantage of the nice jQuery global ajax handlers and jQuery ajax functions. Let’s say you build web application which mainly interacts using Ajax post and get to accomplish various operations. As you may already know, you can easily perform Ajax operations using jQuery Ajax low-level method or jQuery $.get, $.post, etc. Simple get example: $.get("/Home/GetData", function (d) { alert(d); }); As you can see, this is the simplest possible way to make Ajax call. What it does in behind is constructing low-level Ajax call by specifying all necessary information for the request, filling with default information set for the required properties such as data type, content type, etc... If you want to have some more control over what is happening with your Ajax Request, you can easily take advantage of the global ajax handlers. In order to register global ajax handlers, jQuery API provides you set of global Ajax methods. You can find all the methods in the following link http://api.jquery.com/category/ajax/global-ajax-event-handlers/, and these are: ajaxComplete ajaxError ajaxSend ajaxStart ajaxStop ajaxSuccess And the low-level ajax interfaces http://api.jquery.com/category/ajax/low-level-interface/: ajax ajaxPrefilter ajaxSetup For global settings, I usually use ajaxSetup combining it with the ajax event handlers. $.ajaxSetup is very good to help you set default values that you will use in all of your future Ajax Requests, so that you won’t need to repeat the same properties all the time unless you want to override the default settings. Mainly, I am using global ajaxSetup function similarly to the following way: $.ajaxSetup({ cache: false, error: function (x, e) { if (x.status == 550) alert("550 Error Message"); else if (x.status == "403") alert("403. Not Authorized"); else if (x.status == "500") alert("500. Internal Server Error"); else alert("Error..."); }, success: function (x) { //do something global on success... } }); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Now, you can make ajax call using low-level $.ajax interface and you don’t need to worry about specifying any of the properties we’ve set in the $.ajaxSetup function. So, you can create your own ways to handle various situations when your Ajax requests are occurring. Sometimes, some of your Ajax Requests may take much longer than expected… So, in order to make user friendly UI that will show some progress bar or animated image that something is happening in behind, you can combine ajaxStart and ajaxStop methods to do the same. First of all, add one <div id=”loading” style=”display:none;”> <img src="@Url.Content("~/Content/images/ajax-loader.gif")" alt="Ajax Loader" /></div> anywhere on your Master Layout / Master page (you can download nice ajax loading images from http://ajaxload.info/). Then, add the following two handlers: $(document).ajaxStart(function () { $("#loading").attr("style", "position:absolute; z-index: 1000; top: 0px; "+ "left:0px; text-align: center; display:none; background-color: #ddd; "+ "height: 100%; width: 100%; /* These three lines are for transparency "+ "in all browsers. */-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";"+ " filter: alpha(opacity=50); opacity:.5;"); $("#loading img").attr("style", "position:relative; top:40%; z-index:5;"); $("#loading").show(); }); $(document).ajaxStop(function () { $("#loading").removeAttr("style"); $("#loading img").removeAttr("style"); $("#loading").hide(); }); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Note: While you can reorganize the style in a more reusable way, since these are global Ajax Start/Stop, it is very possible that you won’t use the same style in other places. With this way, you will see that now for any ajax request in your web site or application, you will have the loading image appearing providing better user experience. What I’ve shown is several useful examples on how to simplify your Ajax code by using Global Ajax Handlers and the low-level AjaxSetup function. Of course, you can do a lot more with the other methods as well. Hope this was helpful. Regards, Hajan

    Read the article

  • Xubuntu 14.04 resolution low

    - by user3203576
    I installed Xubuntu 14.04 amd64 on the computer at the computer repair shop where I work, but the screen resolution is way low, like 1024 x 768 (that wouldn't be low for a laptop or anything, but for a large desktop screen it is) I went to the display settings, but the resolution wouldn't go higher than that. When I installed Xubuntu 14.04 i386 at my computer at home, I didn't have any problems with the resolution. Any help? update: I ran lspci | grep VGA and got: 00:0d.0 VGA compatible controller: NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2)

    Read the article

  • Google I/O 2012 - New Low-Level Media APIs in Android

    Google I/O 2012 - New Low-Level Media APIs in Android Dave Burke Jellybean introduces a new set of powerful low-level media APIs that provide developers with the ability to access hardware codecs directly from Java. This session introduces the new APIs with examples. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 470 15 ratings Time: 01:05:50 More in Science & Technology

    Read the article

  • Google I/O 2012 - New Low-Level Media APIs in Android

    Google I/O 2012 - New Low-Level Media APIs in Android Dave Burke Jellybean introduces a new set of powerful low-level media APIs that provide developers with the ability to access hardware codecs directly from Java. This session introduces the new APIs with examples. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 0 0 ratings Time: 01:05:50 More in Science & Technology

    Read the article

  • System low graphic error,asking for some command to fix it

    - by mantra
    While running Ubuntu 12.04 amd64 from USB in safe mode it shows an error that says the system system running in low graphics mode. When I click to reconfigure low graphics mode it prompts: ubuntu@ubuntu: It asks for some command. What should I do? I am a complete beginner on the Linux platform. Should I install it without fixing the graphics, or should I solve the graphics problem before installing?

    Read the article

  • power and modulo on the fly for big numbers

    - by user unknown
    I raise some basis b to the power p and take the modulo m of that. Let's assume b=55170 or 55172 and m=3043839241 (which happens to be the square of 55171). The linux-calculator bc gives the results (we need this for control): echo "p=5606;b=55171;m=b*b;((b-1)^p)%m;((b+1)^p)%m" | bc 2734550616 309288627 Now calculating 55170^5606 gives a somewhat large number, but since I have to do a modulooperation, I can circumvent the usage of BigInt, I thought, because of: (a*b) % c == ((a%c) * (b%c))%c i.e. (9*7) % 5 == ((9%5) * (7%5))%5 => 63 % 5 == (4 * 2) %5 => 3 == 8 % 5 ... and a^d = a^(b+c) = a^b * a^c, therefore I can divide b+c by 2, which gives, for even or odd ds d/2 and d-(d/2), so for 8^5 I can calculate 8^2 * 8^3. So my (defective) method, which always cut's off the divisor on the fly looks like that: def powMod (b: Long, pot: Int, mod: Long) : Long = { if (pot == 1) b % mod else { val pot2 = pot/2 val pm1 = powMod (b, pot, mod) val pm2 = powMod (b, pot-pot2, mod) (pm1 * pm2) % mod } } and feeded with some values, powMod (55170, 5606, 3043839241L) res2: Long = 1885539617 powMod (55172, 5606, 3043839241L) res4: Long = 309288627 As we can see, the second result is exactly the same as the one above, but the first one looks quiet different. I'm doing a lot of such calculations, and they seem to be accurate as long as they stay in the range of Int, but I can't see any error. Using a BigInt works as well, but is way too slow: def calc2 (n: Int, pri: Long) = { val p: BigInt = pri val p3 = p * p val p1 = (p-1).pow (n) % (p3) val p2 = (p+1).pow (n) % (p3) print ("p1: " + p1 + " p2: " + p2) } calc2 (5606, 55171) p1: 2734550616 p2: 309288627 (same result as with bc) Can somebody see the error in powMod?

    Read the article

  • With a typical USB hard drive enclosure, is the full range of drive power management functionality available?

    - by intuited
    In what may be an unrelated matter: is it possible to suspend a PC without unmounting an attached USB-powered drive, and then remounting it on resume? This is the behaviour I'm currently seeing (running Ubuntu linux 10.10). Are there certain models or brands that provide more complete control over this aspect of drive operation? My Friendly Neighbourhood Computer Store carries (part of) the Vantec Nexstar product line.

    Read the article

  • Must Keep the Power Flowing No Matter What! [Humorous Image]

    - by Asian Angel
    Who cares what it looks like as long as it works, right? Have you seen or created similar “quick fixes” to keep a computer running? Make sure to share your story in the comments! Barely Working Laptop Cord [Cheeseburger Network] 6 Ways Windows 8 Is More Secure Than Windows 7 HTG Explains: Why It’s Good That Your Computer’s RAM Is Full 10 Awesome Improvements For Desktop Users in Windows 8

    Read the article

  • ubuntu 12.04: Why my laptop is consuming more power than 11.10?

    - by sanz
    I had 11.10 X86 on my Asus laptop (sandybridge, Nvidia 520M). I had 8 hours' battery life with Bumblebee and Jupiter. Average battery discharge rate was around 10w. Later I changed, not upgraded, to 12.04.1 AMD64. I installed Jupiter. But there is no "restricted drivers" available so I guess Bumblebee will not work. So I removed nvidia drivers. Now I only get 4 hours' battery life. Average battery discharge rate is around 19w. The removal of nvidia driver did not make any difference. What's the cause? Nvidia video card not disabled or 64b version of Ubuntu?

    Read the article

  • How to turn off power management for external hard drive (Seagate GoFlex)?

    - by RPG Master
    I bought this 2tb Segate GoFlex this last Black Friday and since then every 15 minutes or so the drive spins down, and then a little while later completely dismounts. Very annoying. From what I understand you could turn this off using the including Windows and Mac only software. This function and what controls it isn't proprietary, right? There has to be something that'll let me set it in Ubuntu... Anyone have any suggestions? Also, I formatted it to EXT4. Hope I didn't screw myself up. :/

    Read the article

  • Computer turns off and on after start ..then goes dead

    - by Shiki
    I built a new PC from the following components: - CPU: Intel Core i7 950 - MB: Gigabyte X58A-UD3R - RAM: 2x2gb i7 Corsair memory - VGA: Zotac AMP2 GTX260 - HDD: 1 GreenSATA HDD (Western Digital 500gb RE2) When I turn it on, it goes for a few seconds, fans at maximum speed, then turns off. The again, it starts by itself.. and goes with fans on max speed, nothing happens. First I suspected my PSU. It's a Chieftec 450AA PSU. After I borrowed a Chieftec 550AA PSU, I tried to start with that. Exact same story. Any idea ? Do I need a bigger PSU? Reason why its not localized. I never seen this turn on, off, on. If you give answer for that, it would already help people like me, with the same problem.

    Read the article

  • (Why) are IEC C5/C6 connectors a necessity? Why not use C13/C14?

    - by Mike
    That's a question I was asking myself the first time I saw such a weird C5 plug. That was a while ago, but I came across it again and haven't found an answer yet. The only thing I could find out is that C5 is with 2.5A and C13 with 10A. But I guess it would technically be no problem building an AC adapter (e.g. for laptops) in which you plug the far more common C13 connector. http://en.wikipedia.org/wiki/IEC_connector

    Read the article

  • Preventing battery from charging

    - by intuited
    I'm running on UPS power and would like to prevent the laptop's battery from charging, to increase the amount of power available to other devices. Is there a way to do this? update The machine is a Dell Latitude D400. If people want more details, just ask. Also, I'm gathering that I need to explain my desired setup a little better. I've gotten a bunch of suggestions about taking the battery out. I'm not sure if people are suggesting to take the battery out while the machine is running — this, as I understand, is not a good idea with most laptops — or to just remove the battery altogether. The latter option is not optimal, because ideally I'd like to use the 30-60 minutes of power in the laptop battery and then switch over to UPS power. The details of the switch-over may constitute a separate question, but if I can't find a way to keep the laptop battery from charging, then removing the battery from the machine altogether may be the best way to do this. I'm not sure yet if this machine will run without a battery, but I'll check that out. Other than the laptop, the UPS is just supporting a cable modem and router and a USB hub. Again in the idealized version of this setup, all the power management changes would be automated, i.e. not require replugging anything or pressing Fn-keys. I'd like the machine to start using laptop battery power when apcupsd indicates that the UPS A/C is out, and then start using UPS power, but not charging the battery, when the battery is almost depleted.

    Read the article

  • Should mock objects for tests be created at a high or low level

    - by Danack
    When creating unit tests for those other objects, what is the best way to create mock objects that provide data to other objects. Should they be created at a 'high level' and intercept the calls as soon as possible, or should they be done at a 'low level' and so make as much as the real code still be called? e.g. I'm writing a test for some code that requires a NoteMapper object that allows Notes to be loaded from the DB. class NoteMapper { function getNote($sqlQueryFactory, $noteID) { // Create an SQL query from $sqlQueryFactory // Run that SQL // if null // return null // else // return new Note($dataFromSQLQuery) } } I could either mock this object at a high level by creating a mock NoteMapper object, so that there are no calls to the SQL at all e.g. class MockNoteMapper { function getNote($sqlQueryFactory, $noteID) { //$mockData = {'Test Note title', "Test note text" } // return new Note($mockData); } } Or I could do it at a very low level, by creating a MockSQLQueryFactory that instead of actually querying the database just provides mock data back, and passing that to the current NoteMapper object. It seems that creating mocks at a high level would be easier in the short term, but that in the long term doing it at a low level would be more powerful and possibly allow more automation of tests e.g. by recording data in an out of a DB and then replaying that data for tests. Is there a recommended way of creating mocks? Are there any hard and fast rules about which are better, or should they both be used where appropriate?

    Read the article

  • Low pagerank backlinks - does Google penalize?

    - by Programmer Joe
    I have a new stock discussion forum and I would like to promote it. Specifically, I have two ideas in mind to help promote it: 1) Become a member at other stock discussion forums. Make high quality posts, build a good reputation, and leave a link to my own forum in a non intrusive way (ie. in signature or at the end of my posts). This approach makes sense because you can find other members in other forums that are interested in stock discussion and a backlink to your forum, as long as it is not done in an intrusive/spammy way, should come across as acceptable. 2) Promote my site by writing articles at Squidoo, Hubpages, etc. This approach also makes sense because that's what Squidoo and Hubpages is for. The problem with both these approaches is that when I leave a backlink to my site, the page that I am leaving a backlink from may have a low PR - most likely, a PR of 0. Now, I have read that after the Penguin update by Google, your site can be penalized if you have too many backlinks from low PR pages: http://www.entrepreneur.com/article/224339 So, I am caught in a dilemma: a) If I start promoting my site via other stock forums, Squidoo, Hubpages, etc, but the backlink to my site comes from a page with low PR, Google may penalize my site. b) However, if I don't promote my site, nobody will ever discover it (aside from other promotion techniques like social media promotion, directories, etc).

    Read the article

  • What *exactly* gets screwed when I kill -9 or pull the power?

    - by Mike
    Set-Up I've been a programmer for quite some time now but I'm still a bit fuzzy on deep, internal stuff. Now. I am well aware that it's not a good idea to either: kill -9 a process (bad) spontaneously pull the power plug on a running computer or server (worse) However, sometimes you just plain have to. Sometimes a process just won't respond no matter what you do, and sometimes a computer just won't respond, no matter what you do. Let's assume a system running Apache 2, MySQL 5, PHP 5, and Python 2.6.5 through mod_wsgi. Note: I'm most interested about Mac OS X here, but an answer that pertains to any UNIX system would help me out. My Concern Each time I have to do either one of these, especially the second, I'm very worried for a period of time that something has been broken. Some file somewhere could be corrupt -- who knows which file? There are over 1,000,000 files on the computer. I'm often using OS X, so I'll run a "Verify Disk" operation through the Disk Utility. It will report no problems, but I'm still concerned about this. What if some configuration file somewhere got screwed up. Or even worse, what if a binary file somewhere is corrupt. Or a script file somewhere is corrupt now. What if some hardware is damaged? What if I don't find out about it until next month, in a critical scenario, when the corruption or damage causes a catastrophe? Or, what if valuable data is already lost? My Hope My hope is that these concerns and worries are unfounded. After all, after doing this many times before, nothing truly bad has happened yet. The worst is I've had to repair some MySQL tables, but I don't seem to have lost any data. But, if my worries are not unfounded, and real damage could happen in either situation 1 or 2, then my hope is that there is a way to detect it and prevent against it. My Question(s) Could this be because modern operating systems are designed to ensure that nothing is lost in these scenarios? Could this be because modern software is designed to ensure that nothing lost? What about modern hardware design? What measures are in place when you pull the power plug? My question is, for both of these scenarios, what exactly can go wrong, and what steps should be taken to fix it? I'm under the impression that one thing that can go wrong is some programs might not have flushed their data to the disk, so any highly recent data that was supposed to be written to the disk (say, a few seconds before the power pull) might be lost. But what about beyond that? And can this very issue of 5-second data loss screw up a system? What about corruption of random files hiding somewhere in the huge forest of files on my hard drives? What about hardware damage? What Would Help Me Most Detailed descriptions about what goes on internally when you either kill -9 a process or pull the power on the whole system. (it seems instant, but can someone slow it down for me?) Explanations of all things that could go wrong in these scenarios, along with (rough of course) probabilities (i.e., this is very unlikely, but this is likely)... Descriptions of measures in place in modern hardware, operating systems, and software, to prevent damage or corruption when these scenarios occur. (to comfort me) Instructions for what to do after a kill -9 or a power pull, beyond "verifying the disk", in order to truly make sure nothing is corrupt or damaged somewhere on the drive. Measures that can be taken to fortify a computer setup so that if something has to be killed or the power has to be pulled, any potential damage is mitigated. Thanks so much!

    Read the article

  • On a dual-GPU laptop, is using the discrete GPU ever more power efficient?

    - by Mahmoud Al-Qudsi
    Given a laptop with a dual integrated/discrete GPU configuration, is it ever more power efficient to use the discrete GPU instead of the integrated? Obviously when writing an email or working on a spreadsheet, the integrated GPU will always use less power. But let's say you're doing something graphics-medium but not graphics-intensive/heavy - is there a point where it actually makes sense to fire up the discrete GPU, not for performance but for power-saving reasons? Off the top of my head, I can think of a scenario where the external GPU supports hardware decoding of a particular video codec - I'd imagine there is a "price point" where using the GPU saves more energy than decoding that fully in software would. But I think most GPUs, integrated or discrete, pretty much decode just the plain-Jane h264. But maybe there is something more complicated, perhaps if you're doing something like desktop/windowing animations or a flash animation on a website (not an embedded flash video) - maybe the discrete GPU will use enough less power to make up for switching to it? I guess this question can be summed up as to whether or not you can say beyond doubt that if you don't care for performance on a laptop with two GPUs, always use the integrated GPU for maximum battery life.

    Read the article

  • High Power Consumption and Wakeups on my Asus X54H with 12.04

    - by Marogian
    So I've been using powertop to try and reduce the power consumption on my laptop as I only seem to get about 3 hours of battery. From reading other threads on here it seems my power consumption and wakeups are strangely high, here's a summary: The battery reports a discharge rate of 10.2 W Summary: 651.8 wakeups/second, 0.0 GPU ops/second and 0.0 VFS ops/sec The things which stand out as odd: 1.31 W 4.0 ms/s 166.7 Interrupt PS/2 Touchpad / Keyboard / Mouse So more than 10% of my battery is being consumed by my touchpad/keyboard? That doesn't seem right. 548 mW 34.3 ms/s 45.9 Process compiz 5% from Compiz. Is this correct? 376 mW 1.8 ms/s 47.5 Interrupt [51] i915 298 mW 1.4 ms/s 37.7 Timer tick_sched_timer Another few percent from these things- not quite sure what they are. For reference I've installed Laptop Mode Tools, Jupiter (on power save), the CPU governor is definitely on powersave and brightness is on minimum. What else can I do/Any ideas? I've seen other posts on here reporting laptop battery lives of ~8 hours and power consumption of 4W rather than my 10W... Thanks!

    Read the article

  • Opposite method of math power adding numbers

    - by adopilot
    I have method for converting array of Booleans to integer. It looks like this class Program { public static int GivMeInt(bool[] outputs) { int data = 0; for (int i = 0; i < 8; i++) { data += ((outputs[i] == true) ? Convert.ToInt32(Math.Pow(2, i)) : 0); } return data; } static void Main(string[] args) { bool[] outputs = new bool[8]; outputs[0] = false; outputs[1] = true; outputs[2] = false; outputs[3] = true; outputs[4] = false; outputs[5] = false; outputs[6] = false; outputs[7] = false; int data = GivMeInt(outputs); Console.WriteLine(data); Console.ReadKey(); } } Now I want to make opposite method returning array of Booleans values As I am short with knowledge of .NET and C# until now I have only my mind hardcoding of switch statement or if conditions for every possible int value. public static bool[] GiveMeBool(int data) { bool[] outputs = new bool[8]; if (data == 0) { outputs[0] = false; outputs[1] = false; outputs[2] = false; outputs[3] = false; outputs[4] = false; outputs[5] = false; outputs[6] = false; outputs[7] = false; } //After thousand lines of coed if (data == 255) { outputs[0] = true; outputs[1] = true; outputs[2] = true; outputs[3] = true; outputs[4] = true; outputs[5] = true; outputs[6] = true; outputs[7] = true; } return outputs; } I know that there must be easier way.

    Read the article

  • Wireless iwconfig rate auto too low

    - by Jamie Kitson
    Hi, left to its own devices my wireless connects at too low a speed. I have a 20meg internet connection and my wireless is slowing it down to like 3meg. When I reboot into windows it's fine. When I run iwconfig eth1 rate 24M or even 48M the connection is much faster and runs fine, why won't it automatically go higher? Is this the fault of the driver? I am running Broadcom's driver compiled from source. Would adding iwconfig eth1 rate 24M to rc.local be the right way to force it at boot? Output from iwconfig when rate=auto: eth1 IEEE 802.11 ESSID:"honeypot" Mode:Managed Frequency:2.417 GHz Access Point: xxx Bit Rate=1 Mb/s Tx-Power:24 dBm Retry min limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=5/5 Signal level=-47 dBm Noise level=-91 dBm Rx invalid nwid:0 Rx invalid crypt:2 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 Thanks, Jamie

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >