Search Results

Search found 8367 results on 335 pages for 'temporal difference'.

Page 88/335 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • ServerAlias www.example.com is not recognized

    - by Tianzhou Chen
    Below is my config file: NameVirtualHost 12.34.56.78:80 < VirtualHost 12.34.56.78:80 ServerAdmin [email protected] ServerName domain1.com ServerAlias www.domain1.com DocumentRoot /srv/www/domain1.com/public_html1/ ErrorLog /srv/www/domain1.com/logs/error.log CustomLog /srv/www/domain1.com/logs/access.log combined < /VirtualHost < VirtualHost 12.34.56.78:80 ServerAdmin [email protected] ServerName domain2.com ServerAlias www.domain2.com DocumentRoot /srv/www/domain2.com/public_html1/ ErrorLog /srv/www/domain2.com/logs/error.log CustomLog /srv/www/domain2.com/logs/access.log combined < /VirtualHost The thing is when I put www.domain1.com into browser, apache2 doesn't retrieve the web page resides in /srv/www/domain1.com/public_html1/, instead, it gets the page from the default document root defined in another file. However, if I put www.domain2.com, everything works fine. I don't see any difference between two VirtualHost config block, so I wonder what does make the difference. BTW, I haven't put any .htaccess file under their document root. Thanks for your advice! Tianzhou

    Read the article

  • Use of IsAssignableFrom and "is" keyword in C#

    - by fearofawhackplanet
    While trying to learn Unity, I keep seeing the following code for overriding GetControllerInstance in MVC: if(!typeof(IController).IsAssignableFrom(controllerType)) { ... } this seems to me a pretty convoluted way of basically writing if(controllerType is IController) { ... } I appreciate there are subtle differences between is and IsAssignableFrom, ie IsAssignableFrom doesn't include cast conversions, but I'm struggling to understand the implication of this difference in practical scenarios. When is it imporantant to choose IsAssignableFrom over is? What difference would it make in the GetControllerExample? if (!typeof(IController).IsAssignableFrom(controllerType)) throw new ArgumentException(...); return _container.Resolve(controllerType) as IController;

    Read the article

  • How to solve rake tasks deprecation on the rails plugin?

    - by Dida
    Because of the concept introduced in here, Rails::Plugin is nothing more than a Rails::Engine, but since it's loaded too late in the boot process, it does not have the same configuration powers as a bare Rails::Engine. Opposite to Rails::Railtie and Rails::Engine, you are not supposed to inherit from Rails::Plugin. Rails::Plugin is automatically configured to be an engine by simply placing inside vendor/plugins. Since this is done automatically, you actually cannot declare a Rails::Engine inside your Plugin, otherwise it would cause the same files to be loaded twice. This means that if you want to ship an Engine as gem it cannot be used as plugin and vice-versa. Besides this conceptual difference, the only difference between Rails::Engine and Rails::Plugin is that plugins automatically load the file "init.rb" at the plugin root during the boot process. rake tasks in the rails plugins are deprecated and it is advised to use lib/tasks instead. How to solve this? Can I just simply move the plugin's tasks to the lib/tasks?

    Read the article

  • A good design pattern for almost similar objects

    - by Sam
    Hello, I have two websites that have an almost identical database schema. the only difference is that some tables in one website have 1 or 2 extra fields that the other and vice versa. I wanted to the same Database Access layer classes to will manipulate both websites. What can be a good design pattern that can be used to handle that little difference. for example, I have a method createAccount(Account account) in my DAO class but the implementation will be slightly different between website A and website B. I know design patterns don't depend on the language but FYI i m working with Perl. Thanks

    Read the article

  • JQuery Ajax help

    - by mtwallet
    Hi. I am creating a portfolio page for m personal site. I have a slider with a bunch of anchors that relate to projects I have worked on, each one contains a client logo that when clicked should load a html page into a div on the same page. I would like to use JQuery to achieve this my question is which method would I use load() or ajax(). This is not something I have done before so I'm a little confused what the difference is. Also if it makes any difference to my question I will be making the site content managed with MODX very soon. Many thanks in advance.

    Read the article

  • Google Visualization legend format Jquery ui tabs

    - by Liam
    I've got an issue when using the Google Visualization api line chart with Jquery ui tabs. I've got two graphs on two tabs. The first graph, which is visible by default displays fine: the second chart on the hidden tab seems to be messing up the key: I've tried changing the options but nothing I do seems to make any difference. Here are my options: options = { 'title': title, titleTextStyle: { color: color, fontSize: 20 }, 'width': 950, 'height': 400, hAxis: { minorGridlines: { count: x } }, chartArea: { width: 880 }, legend: { position: 'bottom', textStyle: { fontSize: 10 } } }; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.LineChart(document.getElementById(divId)); chart.draw(data, options); $('#tabs').tabs(); any thoughts on what is causing this and how to prevent it?? Edit If I remove the tabs() call it displays correctly. As per answer below from @Vipul tried setting the div to a fixed width, no difference.

    Read the article

  • how to calculate a bill from several tables on mysql?

    - by Audel
    I'm using mysql to create an hotel booking system, but i am struggling a little bit to calculate the final bill. I need a SELECT command to get data from several tables and make some calculations. Basically I just need to get the 'night cost' from a table called 'room_types'. Then, use DATEDIFF function to get the difference of days between the 'checkin' and 'checkout' columns in the table 'room_booking' and multiply the difference with the night cost and display the total. These are the tables I would be using: are room_booking, room_types, booking, and room. One booking may have several room bookings, so Im looking for a table that looks something like this: +------------+------------+---------------+------------------+ | bookingid | Room price | nights stayed | total room price | +------------+------------+---------------+------------------+ | B001 | 30.00 | 4 | 120.00 | +------------+------------+---------------+------------------+ | B001 | 40.00 | 3 | 120.00 | +------------+------------+---------------+------------------+ booking id comes from table 'booking' room price from 'room_types', 'nights stayed' is calculated from the table room_booking, using the datediff command between checkin and checkout . I hope i was clear

    Read the article

  • Is yield break equivalent to returning Enumerable<T>.Empty from a method returning IEnumerable<T>

    - by Mike Two
    These two methods appear to behave the same to me public IEnumerable<string> GetNothing() { return Enumerable.Empty<string>(); } public IEnumerable<string> GetLessThanNothing() { yield break; } I've profiled each in test scenarios and I don't see a meaningful difference in speed, but the yield break version is slightly faster. Are there any reasons to use one over the other? Is one easier to read than the other? Is there a behavior difference that would matter to a caller?

    Read the article

  • Why ruby object has two to_s and inspect methods that do the same thing? Or, so it seems.

    - by prosseek
    The p calls inspect, and puts/print calls to_s for representing its object. If I run class Graph def initialize @nodeArray = Array.new @wireArray = Array.new end def to_s # called with print / puts "Graph : #{@nodeArray.size}" end def inspect # called with p "G" end end if __FILE__ == $0 gr = Graph.new p gr print gr puts gr end I get G Graph : 0Graph : 0 Then, why does ruby has two functions do the same thing? What makes the difference between to_s and inspect? And what's the difference between puts/print/p? If I comment out the to_s or inspect function, I get as follows. #<Graph:0x100124b88>#<Graph:0x100124b88>

    Read the article

  • Load client-side accordion with pane open

    - by superexsl
    hey , I'm trying to change an AJAX accordion layout on the client-side. How can I make it so that when the page loads, the selected pane is opened? At the moment, I have this: Sys.require(Sys.components.accordion, function() { $("#accordion").accordion({ HeaderCssClass: "acc_header", HeaderSelectedCssClass: "acc_selectedheader", FadeTransitions: true, requireOpenedPane: false }); }); This works. However, if I add SelectedIndex = 1, it still starts off with the top pane opened and everything else closed. I tried change the 1 to other numbers (including -1), but it doesn't make a difference. Have I missed something here? (It's placed in an updatepanel, if that makes a difference) Thanks

    Read the article

  • Video learning for database design

    - by donpal
    I'm trying to learn good relational database design (using mysql and php if that makes any difference). I've already done some database work, so I'm not totally clueless, but I suspect that my solutions may not have adhered to best practices for efficient searching, optimization, etc. Can someone suggest a good set of videos on the topic? If you know something is superb or has really made a difference in your own learning, please post your suggestion. Prefer videos, but books (as long as they're not too huge) are ok too. But prefer videos. Thank you

    Read the article

  • fixed width bash prompt

    - by seaofclouds
    I'd like to set my bash prompt to a fixed width, and make up the difference in space before the $, so whether long or short, my prompt remains the same width: [name@host] ~/Directory/Dir...Another/LastDir $ [name@host] ~/Directory(branch) $ Currently, in a short directory path my prompt looks something like this: [name@host] ~/Directory(branch) $ a deeper directory path looks like this: [name@host] ~/Directory/Dir...Another/LastDir $ You can see I've truncated the PWD in the middle so I can see where the path begins, and where it ends. I'd like to make up the difference before the $. Here is my current prompt: # keep working directory to 30 chars, center tuncated prompt_pwd() { local pwd_symbol="..." local pwd_length=30 newPWD="${PWD/#$HOME/~}" [ ${#newPWD} -gt ${pwd_length} ] && newPWD=${newPWD:0:12}${pwd_symbol}${newPWD:${#newPWD}-15} } # set prompt prompt_color() { PROMPT_COMMAND='prompt_pwd;history -a;title_git' PS1="${WHITEONMAGENTA}[\u@\h]${MAGENTA} \w\$(parse_git_branch) ${MAGENTABOLD}\$${PS_CLEAR} " PS1=${PS1//\\w/\$\{newPWD\}} PS2="${WHITEONTEAL}>${PS_CLEAR} " } In my search, I found A Prompt the Width of Your Term which does do some fill, but couldn't get it working for this particular prompt.

    Read the article

  • time required in java

    - by Amol
    i would like to know how much time is required to execute the conditional loops individually. Like if i had an option to use "if else", "while","for", or "foreach" loop then which loop would get executed faster.I know the difference would be very small and most would say that it would not matter but if i were to have a program which would access thousands of data then this point would come into picture. I would like to know if i declare a variable in the beginning in java and if i were to declare it just before i use it will it make any difference. will the total time required be reduced? if yes then which is practically used (the one in which variables are declared in the beginning or where they are just declared b4 they are used)?

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >