Daily Archives

Articles indexed Sunday April 25 2010

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

  • How to make an equation span the whole page / line in LaTeX?

    - by Reed Richards
    I have this equation and it's quite big (basically a FDM one) but it aligns with the text and then continues out on the right side to the nothingness. I've tried stuff like \begin{center} and \hspace*{-2.5cm} but to no avail. I want it to use the whole line not just from the left-margin and out to the right. How do I do it and do I need to install some special package for it? I use the \[ instead of the displaymath like this \[ Equation arrays here \] The code \[ \left( \begin{array}{cccccc} -(2\kappa+\frac{hV\rho}{2}) & (\frac{hV\rho}{2}-\kappa) & 0 & \cdots & 0 \\ -\kappa & -(2\kappa+\frac{hV\rho}{2}) & (\frac{hV\rho}{2}-\kappa) & 0 & \cdots \\ 0 & -\kappa & -(2\kappa+\frac{hV\rho}{2}) & (\frac{hV\rho}{2}-\kappa) & 0 & \cdots \\ \vdots & 0 & \ddots & \vdots \\ \vdots & \vdots & \vdots & -\kappa & -(2\kappa+\frac{hV\rho}{2}) & (\frac{hV\rho}{2}-\kappa) \\ 0 & \vdots & \vdots & 0 & \kappa - \frac{2h\kappa_{v}}{\kappa}(\frac{hv\rho}{2} - \kappa) & -2\kappa \\ \end{array} \right) \left( \begin{array}{c} T_{1} \\ T_{2} \\ \vdots \\ T_{n} \\ \end{array} \right) = \left( \begin{array}{c} Q(0) + \kappa T_{0} \\ Q(h) \\ Q(2h) \\ \vdots \\ Q((n-1)h) \\ 2\frac{\kappa_{v}}{\kappa_{v}}T_{out} \\ \end{array} \right) \]

    Read the article

  • How to develop good debugging skills? [closed]

    - by Sasha
    Possible Duplicate: Debugging techniques How can I improve my debugging skills? I am thinking in the context of C++ under UNIX, C#, and in general. Please suggest how I can improve in these areas in terms of: Approaches to take, where to start, and how to proceed. Tools to use, and how use them effectively. Recommended material (books, articles) to read and lectures to watch.

    Read the article

  • Specifying location of new inlineshape in Word VBA?

    - by Branan
    I'm working on a document "wizard" for the company that I work for. It's a .dot file with a header consisting of some text and some form fields, and a lot of VBA code. The body of the document is pulled in as an OLE object from a separate .doc file. Currently, this is being done as a Shape, rather than an InlineShape. I did this because I can absolutely position the Shape, whereas the InlineShape always appears at the beginning of the document. The problem with this is that a Shape doesn't move when the size of the header changes. If someone needs to add or remove a line from the header due to a special case, they also need to move the object that defines the body. This is a pain, and I'd like to avoid it if possible. Long story short, how do I position an InlineShape using VBA in Word? Oh, and this is for a 10-year-old system setup, so Office '97.

    Read the article

  • UIWebView paging / line cut off

    - by John
    Hi, I am trying to page a webpage, so disable scrolling, then the second page is the same webpage scrolled down the page height. The problem I have is that the bottom of the first page often has 1/2 a line of text, then the second page has the bottom half of the line. Is there a way to ensure the entire line falls on one of the pages? Similar to Stanza etc? Thanks

    Read the article

  • Can a Flash-based CFGRID render basic HTML in the cells?

    - by richardtallent
    (I'm very new to both Flex and CF -- more a .NET/ExtJS guy, so I'm a duck out of water.) I'm tweaking someone else's CFGRID code. It uses Flash format--HTML isn't an option since it would require redesigning the entire interface around the grid. Tha data I want to put in the grid have some very simple HTML elements-- <sub>, <sup>, and HTML entities like &deg;. I can imagine <i> or <b> might be there in the future. How can I tell a particular CFGRIDCOLUMN to render its contents as HTML? I've heard this is possible, but Google is not my friend tonight. Stuck with CF7 for a few more weeks, so if there are any CF8/CF9-specific solutions, please let me know those as well, but that won't help my immediate need.

    Read the article

  • What's one change in your lifestyle that positively affected your work and health?

    - by pbrodka
    We know that working many hours in front of computers gives us many bad and unhealthy habits, bad health conditions and so on, which in the long term decrease our productivity. Did you make any big changes in your lifestyle that made a big improvement in your health and productivity? Please name one such activity - it could be change of diet, more sports, less coffee, change in your work environment.

    Read the article

  • When is it good to start using project management applications?

    - by Mr.Gando
    Hello, I was wondering, when is the right time or the correct project size to start using project management applications ( like Redmine or Trac ). I have a serious project, for now it's only me developing, but I use redmine to set my project versions, issues, and estimations. I think it's a good idea, because you never know when somebody else is going to join the team, and also allows me to organize myself effectively. I ask this question because I was Teaching Assistant at my university for one year in a row for a course, and I got questions about this very very often. While I'm a believer of the KISS principle, I think that learning to use this tools early is a win-win most of the time. I really believe that we can avoid this question to become argumentative, and that there's somewhat of a consensus about this issue, which I consider quite important in todays software development world. So, when is the right time ? what is the correct project/team size ?

    Read the article

  • More efficient way to find media item in WMP media library?

    - by RoseOfJericho
    Hello, all. I am messing around with the WMPLib component provided by Windows Media Player 12 (wmp.dll) in VB.NET with .NET Framework 3.5 SP1. I am trying to retrieve a media item from my media library based on its name (assuming there are no duplicate names). At the moment, I'm grabbing the entire media library, and looping through every media item, and quitting the loop when I've found the correct media item. This works well (except for when a media item with that name cannot be found), but I was hoping there was a more efficient way of doing this. Here is my code so far: Public Class WMPTest Private myWMP As WMPLib.IWMPCore Private myMediaCollection As WMPLib.IWMPMediaCollection Private myTrack As WMPLib.IWMPMedia Private allTracks As WMPLib.IWMPPlaylist Public Sub New() ' This call is required by the Windows Form Designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. myWMP = New WMPLib.WindowsMediaPlayer myMediaCollection = myWMP.mediaCollection allTracks = myMediaCollection.getAll Dim theTrack As WMPLib.IWMPMedia = findTrack("Yellow Submarine") MessageBox.Show(theTrack.name) End Sub Public Function findTrack(ByVal strTrackName As String) As WMPLib.IWMPMedia For i As Integer = 0 To (allTracks.count - 1) If allTracks.Item(i).name = strTrackName Then myTrack = allTracks.Item(i) Exit For End If Next 'myTrack is now the track that we wanted to retrieve Return myTrack End Function End Class So what I really want is a way to optimize findTrack() to do its thing without looping through the entire media library (which could be huge). Anyone have a clue?

    Read the article

  • Test MVC using moq

    - by Raminder
    I am new to moq and I was trying to test a controller (MVC) behaviour that when the view raises a certain event, controller calls a certain function on model, here are the classes - public class Model { public void CalculateAverage() { ... } ... } public class View { public event EventHandler CalculateAverage; private void RaiseCalculateAverage() { if (CalculateAverage != null) { CalculateAverage(this, EventArgs.Empty); } } ... } public class Controller { private Model model; private View view; public Controller(Model model, View view) { this.model = model this.view = view; view.CalculaeAverage += view_CalculateAverage; } priavate void view_CalculateAverage(object sender, EventArgs args) { model.CalculateAverage(); } } and the test - [Test] public void ModelCalculateAverageCalled() { Mock<Model> modelMock = new Mock<Model>(); Mock<View> viewMock = new Mock<View>(); Controller controller = new Controller(modelMock.Object, viewMock.Object); viewMock.Raise(x => x.CalculateAverage += null, new EventArgs.Empty); modelMock.Verify(x => x.CalculateAverage()); //never comes here, test fails in above line and exits Assert.True(true); } The issue is that the test is failing in the second last line with "Invocation was not performed on the mock: x = x.CalculateAverage()". Another thing I noticed is that the test terminates on this second last line and the last line is never executed. Am I doing everything correct?

    Read the article

  • Accessing Virtual Host from outside LAN

    - by Ray
    I'm setting up a web development platform that makes things as easy as possible to write and test all code on my local machine, and sync this with my web server. I setup several virtual hosts so that I can access my projects by typing in "project" instead of "localhost/project" as the URL. I also want to set this up so that I can access my projects from any network. I signed up for a DYNDNS URL that points to my computer's IP address. This worked great from anywhere before I setup the virtual hosts. Now when I try to access my projects by typing in my DYNDNS URL, I get the 403 Forbidden Error message, "You don't have permission to access / on this server." To setup my virtual hosts, I edited two files - hosts in the system32/drivers/etc folder, and httpd-vhosts.conf in the Apache folder of my WAMP installation. In the hosts file, I simply added the server name to associate with 127.0.0.1. I added the following to the http-vhosts.conf file: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "c:/wamp/www/ladybug" ServerName ladybug ErrorLog "logs/your_own-error.log" CustomLog "logs/your_own-access.log" common </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot "c:/wamp/www" ServerName localhost ErrorLog "logs/localhost-error.log" CustomLog "logs/localhost-access.log" common </VirtualHost> Any idea why I can't access my projects from typing in my DYNDNS URL? Also, is it possible to setup virtual hosts so that when I type in http://projects from a random computer outside of my network, I access url.dyndns.info/projects (a.k.a. my WAMP projects on my home computer)? Help is much appreciated, thanks!

    Read the article

  • Setting Mnemonics and Hot Keys for a JOptionPane Dialog

    - by Daniel Bingham
    Is it possible to assign hotkeys and mnemonics to the buttons in a JOptionPane Dialog? I'd like to be able, in a JOptionPane generated message dialog with the options Yes, No and Cancel, press Y to hit the Yes button, N to hit the No button and escape to activate the escape button. Similarly in a dialog with Okay and Cancel buttons I'd like to be able to activate them with enter and escape. I've attempted passing JButtons into the JOptionPane's button Object array with the Mnemonics set already. The mnemonics work and the buttons show up correctly in the dialogs, however, they do not act properly when they are activated. Most noticeably they do not dispose of the dialog. What is the correct way to add hotkeys and Mnemonics to a JOptionPane Dialog's buttons? As always, my apologies ahead of time if this is a duplicate - I searched both Google and Stackoverflow and found nothing.

    Read the article

  • Cisco 7206 error trying to copy running-config (Bad file number)

    - by jasondewitt
    I have a cisco 7206 that terminates a bunch of pppoa sessions for dsl users. Today I noticed that if I tried to "show run" nothing happened. I mean that it doesn't show anything and just sends me right back to the command prompt. I decided I should probably try and back up the config and that is where I'm stuck. Any time I try to copy the running-config to tftp or to pcmcia card that I know is not full I get the following error: %Error opening system:/running-config (Bad file number) I get this error when I try to do anything with the running config. I've been googling around, but I haven't found any thing else that talks about this error. I've seen people say to erase the nvram and then try to "copy run start", but I don't want to erase the nvram until I can pull off a copy of the running-config. I would try to reboot it, but the startup-config that is on the nvram looks to be woefully out of date (good job me!). Any ideas what might be wrong? or how I can get the running config off the router?

    Read the article

  • Need to convert int value to hex value

    - by SA
    Hi, I need to convert char to hex values. Refer to the Ascii table but I have a few examples listed below: int 1 = 31 2 = 32 3 = 33 4 = 34 5 = 35 A = 41 a = 61 etc Therefore int test = 12345; Need to get the converted i = 3132333435

    Read the article

  • How to create database records for a financial year

    - by David A Gibson
    Hello, I need to create entities (specifically contracts) in a database table that are associated with a financial year. These contracts will be applied to projects. Any contract variation will be recorded by creating a new contract record for the same financial year but the original will remain associated with the project as a history. The projects can last several years and so at any one time a project will have a live contract record for each year as well as any number of historic contracts for that year. All of which is incidental but I'm trying to provide some context. If the contracts where for the year - it would be easy and I'd just store the Year either as a date field with the 1st of January or just an Integer. However the contracts run for financial years and I don't know how to approach this. I don't want a separate table containing the financial years as I don't want the users to have to maintain this. I don't want to store the financial year as a string "2009/2010" as this is not ideal for sorting/extracting the data. Any ideas will be helpful, my best so far is to have starting and ending year in 2 columns and just "KNOW" that starting is April of the year etc Thanks

    Read the article

  • Who "invented" i,j,k as integer counter variable names? [closed]

    - by mjy
    Possible Duplicate: Why are we using i as a counter in loops I've used these myself for more than 15 years but cannot really remember how/where I picked up that habit. As it is really widespread, I'm curious to know who originally suggested / recommended using these names for integer loop counters (was it the K&R book?).

    Read the article

  • Are there such things as Email Hooks?

    - by viatropos
    After hearing about git commit hooks, I was thinking maybe there are such things as email hooks... Is it possible for me to build a program that says "hey, you just received an email, now run this ruby script"? Something like a GMail Web Hook. Is there anything out there like that? I mean I could build a cron thing that checked my email all the time, but maybe there's a more formal way. Looking for an online email system to do this with, not say my Mac Mail.

    Read the article

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