Daily Archives

Articles indexed Saturday June 5 2010

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

  • How to disable the green power light on the Sony Vaio

    - by sri
    The Sony Vaio's green power light is extremely bright and very distracting! I can't even look at the screen without this power light being in my view!! Is there any way to disable it or reduce its intensity? Googling for "sony vaio disable green power light" (and similar combinations) didn't provide anything useful. I tried booting into the BIOS, but it didn't have an option for this. Also, the Viao Command Center didn't have any on it. I guess sticking a tape over the LED is the only option? Any help is greatly appreciated! Thanks!

    Read the article

  • Which parts of Graphics Pipelines are done using CPU & GPU?

    - by afriza
    Which parts of pipelines are done using CPU and which are done using GPU? Reading Wikipedia on Graphics Pipeline, maybe my question does not precisely represent what I am asking. Referring to this question, which "steps" are done in CPU and which are done in GPU? Edit: My question is more into which parts of logical high level steps needed to display terrain+3D models are using CPU/GPU instead of which functions.

    Read the article

  • Moq Testing a private method .Many posts but still cannot make one example work

    - by devnet247
    Hi, I have seen many posts and questions about "Mocking a private method" but still cannot make it work and not found a real answer. Lets forget the code smell and you should not do it etc.... From what I understand I have done the following: 1) Created a class Library "MyMoqSamples" 2) Added a ref to Moq and NUnit 3) Edited the AssemblyInfo file and added [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] [assembly: InternalsVisibleTo("MyMoqSamples")] 4) Now need to test a private method.Since it's a private method it's not part of an interface. 5) added the following code [TestFixture] public class Can_test_my_private_method { [Test] public void Should_be_able_to_test_my_private_method() { //TODO how do I test my DoSomthing method } } public class CustomerInfo { public string Name { get; set; } public string Surname { get; set; } } public interface ICustomerService { List<CustomerInfo> GetCustomers(); } public class CustomerService: ICustomerService { public List<CustomerInfo> GetCustomers() { return new List<CustomerInfo> {new CustomerInfo {Surname = "Bloggs", Name = "Jo"}}; } protected virtual void DoSomething() { } } Could you provide me an example on how you would test my private method? Thanks a lot

    Read the article

  • SQL Server Installation - What is the Installation Media Folder..??

    - by Devashri
    I am installing SQL server 2008. I have installed .Net framewok 3.5. Then I got folder SQL Server 2008.Then I performed following steps- In that I clicked configuration Tools. Then I clicked SQL Server Installation Center. I clicked "Installation" hyperlink on left side. Then I clicked "New SQL server stand-alone installation or add features to an existing installation" Then i got a window "Browse for SQL server Installation Media" which folder should i choose..?? OR is there any other method to install SQL Server..??

    Read the article

  • Error using MVCContrib TestHelper

    - by Brian McCord
    While trying to implement the second answer to a previous question, I am receiving an error. I have implemented the methods just as the post shows, and the first three work properly. The fourth one (HomeController_Delete_Action_Handler_Should_Redirect_If_Model_Successfully_Delete) gives this error: Could not find a parameter named 'controller' in the result's Values collection. If I change the code to: actual .AssertActionRedirect() .ToAction("Index"); it works properly, but I don't like the "magic string" in there and prefer to use the lambda method that the other poster used. My controller method looks like this: [HttpPost] public ActionResult Delete(State model) { try { if( model == null ) { return View( model ); } _stateService.Delete( model ); return RedirectToAction("Index"); } catch { return View( model ); } } What am I doing wrong?

    Read the article

  • InvalidOperationException: The Undo operation encountered a context that is different from what was

    - by McN
    I got the following exception: Exception Type: System.InvalidOperationException Exception Message: The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone). Exception Stack: at System.Threading.SynchronizationContextSwitcher.Undo() at System.Threading.ExecutionContextSwitcher.Undo() at System.Threading.ExecutionContext.runFinallyCode(Object userData, Boolean exceptionThrown) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteBackoutCodeHelper(Object backoutCode, Object userData, Boolean exceptionThrown) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.ContextAwareResult.Complete(IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken) at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) Exception Source: mscorlib Exception TargetSite.Name: Undo Exception HelpLink: The application is a Visual Studio 2005 (.Net 2.0) console application. It is a server for multiple TCP/IP connections, doing asynchronous socket reads and synchronous socket writes. In searching for an answer I came across this post which talks about a call to Application.Doevents() which I don't use in my code. I also found this post which has a resolution involved with Component which I also don't use in my code. The application does reference a library that I created that contains custom user controls and components, but they are not being used by the application. Question: What caused this to happen and how do I prevent this from happening again? Or a more realistic question: What does this exception actually mean? How is "context" defined in this situation? Anything that can help me understand what is going on would be very much appreciated.

    Read the article

  • How stop the link of href from being highlighted?

    - by udaya
    I am setting an anchor tag for an image. It is highlighted and I want to remove the image from being highlighted. How to do this? This is my anchor tag (some PHP in it): <a style="outline:none;" href="<? echo base_url();?>/friends/UploadPhoto"> <img src="<?=$imgp ?>" name="b1" width="90" height="80" border="0"/> </a>

    Read the article

  • How to manage db connections on server?

    - by simpatico
    I have a severe problem with my database connection in my web application. Since I use a single database connection for the whole application from singleton Database class, if i try concurrent db operations (two users) the database rollsback the transactions. This is my static method used: All threads/servlets call static Database.doSomething(...) methods, which in turn call the the below method. private static /* synchronized*/ Connection getConnection(final boolean autoCommit) throws SQLException { if (con == null) { con = new MyRegistrationBean().getConnection(); } con.setAutoCommit(true); //TODO return con; } What's the recommended way to manage this db connection/s I have, so that I don't incurr in the same problem.

    Read the article

  • Description of Google map

    - by sairam333
    Hi ,I want to display the map in my application .First of all i want to know about map api key not creation .That means api key is system dependent or debugger like that please give me some answers for this .Thanks in advance

    Read the article

  • How to disable Middleware and Request Context in some views.

    - by xRobot
    I am creating a chat like facebook chat... so in views.py of my Chat Application, I need to retrieve only the last messages every 3-4 seconds with ajax poll ( the latency is not a problem for me ). If I can disable some Middlewares and some Request Context in this view, the response will be faster... no ? My question is: Is there a way to disable some Middlewares and some Request Context in some views ?

    Read the article

  • Unable to cast object of type 'System.Byte[]' to type 'System.IConvertible'.

    - by alvn.dsza
    i get the error in following code Function ReadFile(ByVal sPath As String) As Byte Dim data As Byte data = Nothing Dim fInfo As FileInfo fInfo = New FileInfo(sPath) Dim numBytes As Long numBytes = fInfo.Length Dim fStream As FileStream fStream = New FileStream(sPath, FileMode.Open, FileAccess.Read) Dim br As BinaryReader br = New BinaryReader(fStream) data = Convert.ToByte(br.ReadBytes(numBytes)) `getting error on this line` Return data End Function

    Read the article

  • Will html5 and Javascript replace native applications?

    - by nimo
    I recently attended a conference on future of the web and web development and it was a lot of focus on HTML5 and how it will impact the way we look at the web and how we will use it. The majority of the speakers meant that it will replace native application on your desktop as well as in your mobile phone. I agree that you will be able to make a lot of great stuff with the new technology take bespin for example and the <video> and <canvas> tag will be amazing, but will it completely remove the need for native applications? Is there something you cannot do with Javascript and HTML5?

    Read the article

  • Run a universal app as a 'legacy' iPhone app on an iPod

    - by Paul Alexander
    I do most development testing on my iPad. When I test an iPhone app, it runs in 'compatibility' mode where the little iPhone app runs in a small window or x2 magnification. Now that I've created a universal app it runs as a native iPad app. For testing I'd like to use the simulated iPhone when I don't have an iPhone handy for testing. How can I build the project so that the iPad will run the app in compatibility mode?

    Read the article

  • What are unusual and creative usages of html5 canvas

    - by stej
    Canvas from html5 was introduced some time ago. Currently it's used (almost) only for demonstrations how cool it is - it's mainly related to painting, games and charts. Many of them can be found at Canvas demos. How creatively / unusually can canvas be used? Some examples: jsAscii - ASCII art from images with Javascript and Canvas (yea, I know, it's painting but not the classic one) Javascript compression using PNG and Canvas

    Read the article

  • How to check if a variable is defined in a Master file in ASP.NET MVC

    - by Mortanis
    I've got a Site.Master file I've created to be my template for the majority of the site, with a navigation. This navigation is dynamically created, based on a recursive Entity (called Page) - Pages with a parentID of 0 are top level, and naturally each child carries it's parent's Id in that field. I've created a quick little HTML Helper that accepts the ID of an Page and generates the nav by doing a foreach on the children that have a parentId matching the passed Id. On the majority of the site, I want the Site.Master to use a parentId of 0, but if I'm on a strongly typed View displaying a Page, I naturally want to use the Id of the page. Is there a way to do such conditional logic in a Site.Master (and, does that violate MVC rules)? "If I'm on a strongly typed Page of /Page/{Id}, use the Id render nav, else use 0"

    Read the article

  • Stepping over method without symbols - How to step into?

    - by joedotnot
    Using Visual Studio 2008 SP1 and a VB.NET project; I have some code which i cannot step into. The Immediate Window shows the message "Stepping over method without symbols 'Some.Namespace.Here'" How can i make sure the method always has symbols?! I need to step into every line of code. I am pressing F8 (which is "Step Into" in VS2008, from memory i think it used to be F11 in VS2005). This debugger stuff has always confused me: At the Solution level Property Pages i see a configuration dropdown with 4 values: Active (Debug), Debug, Release, All Configurations. - currently set to "Active (Debug)" At the Project level, i see a configuration dropdown with 2 values: Debug, Release. - currently set to "Debug"

    Read the article

  • Mootools Accordion nonfunctional in Opera

    - by nona
    While working as expected in all other browsers, opera refuses to tween the height of content. oddly enough, as i sat annoyed rapidly clicking it over and over again, if it's closed, and you select some text, and keep clicking the same spot long enough, sometimes it pops open. lol. seriously. ahh, it seems to sometimes open the first time clicked after the page is loaded. wth? the javascript: window.addEvent('domready', function(){ var content_height = [];i=0; $$( '.bio_accordion' ).each(function(item){ i++; content_height.push(item.getElement('.moreInfo').offsetHeight); var thisSlider = new Fx.Slide( item.getElement( '.moreInfo' ), { mode: 'horizontal' } ); thisSlider.hide(); item.getElement('.moreInfo').set('tween').tween('height', '0px'); var morph = new Fx.Morph(item.getElement( '.divToggle' )); var selected = 0; item.getElement( '.divToggle' ).addEvents({ 'mouseenter': function(){ if(!selected) this.morph('.div_highlight'); }, 'mouseleave': function(){ if(!selected) { this.morph('.divToggle'); } }, 'click': function(){ if (!selected){ if (this.getElement('.symbol').innerHTML == '+') this.getElement('.symbol').innerHTML = '-'; else this.getElement('.symbol').innerHTML = '+'; item.getElement('.moreInfo').set('tween', { duration: 1500, transition: Fx.Transitions.Bounce.easeOut }).tween('height', content_height[i]); selected = 1; thisSlider.slideIn(); } else{ if (this.getElement('.symbol').innerHTML == '+') this.getElement('.symbol').innerHTML = '-'; else this.getElement('.symbol').innerHTML = '+'; thisSlider.slideOut(); item.getElement('.moreInfo').set('tween', { duration: 1000, transition: Fx.Transitions.Bounce.easeOut }).tween('height', '0px'); selected = 0; } } }); } ); }); the html: <div class="bio_accordion"> <div class="divToggle">test<span class="symbol">-</span></div> <div class="moreInfo" style="margin-left:10px;"> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf </div> </div> the css: .bio_accordion { padding:0px; margin:0px; } .divToggle { cursor: pointer; color: #ffffff; background-color:#1089b5; padding: 8px; } .div_highlight { padding-left:30px; padding-right:30px; background-color:#096687; } .moreInfo { padding: 2px; padding-top:15px; padding-bottom:15px; overflow: hidden; } .symbol { float:right; }

    Read the article

  • Mac Security - Which one?

    - by Bob Rivers
    Hi, Recently I had my credit card cloned. A few hours after shopping at an online store (in which I trust and buy since 2006) I received a call from my bank asking if I recognize a $5,000 debt to a store(?!) called Church of Christ... I'm a Mac user (OS X 10.6.3). I always kept my system updated and I have firewall enabled (in my Mac and in my broadband router), but I decided to adopt some kind of protection. I don't want to rise passionate discussions. Real or not, snake oil or not, I need to have back my peace of mind... I read this and this posts. I selected two software that I think that could help me (both have more features other than just an antivirus). Does someone have feedback about Intego's VirusBarrier X6 or Trendmicro's Smart Surfing? Intego solutions seems to be better, but TrendMicro brand/name is stronger in corporate environment, so their solution should be good. Both solutions have 30 day free trial, but I would like to hear something from you. Any other solution that I should look? TIA, Bob

    Read the article

  • How can I apply a style to existing tikz node on specific slides

    - by Eugene Pimenov
    This is what I'm trying to do \begin{tikzpicture} [node distance = 1cm, auto,font=\footnotesize, % STYLES every node/.style={node distance=1.3cm}, comment/.style={rectangle, inner sep= 5pt, text width=4cm, node distance=0.25cm, font=}, module/.style={rectangle, drop shadow, draw, fill=black!10, inner sep=5pt, text width=3cm, text badly centered, minimum height=0.8cm, font=\bfseries\footnotesize\sffamily,rounded corners}, selected/.style={fill=red!40}] \node [module] (nodeA) {node A}; \node [module, below of=nodeA] (nodeA) {node B}; \only<1>{ \node [comment, text width=6cm, right=0.25 of nodeA] {short description of Node A}; \node [comment, text width=6cm, right=0.25 of nodeB] {short description of Node B}; } \only<2>{ \node [selected] (nodeA) {}; \node [comment, text width=6cm, right=0.25 of nodeA] {long description of node A}; } \only<3>{ \node [selected] (nodeB) {}; \node [comment, text width=6cm, right=0.25 of nodeA] {long description of node B}; } \end{tikzpicture} The problem is \node [selected] (nodeB) {}; creates a new node, but I want it to apply the style for the existing node. Is there any way to do so? Of course I could have copies of every node in selected state and not-selected state, but I really want to have a normal solution.

    Read the article

  • Locking on an object...

    - by Mystere Man
    I often see code like that which is shown here, ie where an object is allocated and then used as a "lock object". It seems to me that you could use any object for this, including the event itself as the lock object. Why allocate a new object that does nothing? My understanding is that calling lock() on an object doesn't actually alter the object itself, nor does it actually lock it from being used, it's simply used as a placeholder for multiple lock statements to anchor on. So my question is, is this really a good thing to do?

    Read the article

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