Search Results

Search found 8634 results on 346 pages for 'base'.

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

  • nginx points the sub-directory of an alias folder to the base directory

    - by Starry
    I am new to Nginx. Now I have a confusion on nginx configurations: My web site contains folders in different locations: location / { root /Path1 } location ^~ /personal { alias /Path2 } When I query http://mysite/personal, I am accessing the content of /Path2 instead of /Path1 Now I want to add a sub-directory in /personal with specific configurations, so I add: location /personal/download { autoindex on; } But I got 404 error when querying http://mysite/personal/download. According to the error log, I am directed to /Path1/personal/download, which is not correct. How can I configure nginx, such that all access to http://mysite/personal/* will be directed to the same directory in /Path2?

    Read the article

  • Migrate reports from MS Access to OOo Base

    - by John Gardeniers
    I'm currently looking at upgrading our office machines from Office XP to Office 2010. For most users the standard edition is fine but just a few of us use Access. There are only a couple of standalone Access databases but the program is used fairly extensively (mostly by myself) as a front end to MySQL. As the cost different between standard and pro versions of Office 2010 is about $170 (AUD) I'm looking at possible alternatives to Access. I'm no huge fan of Open Office but could be convinced to use it if I can find a way to migrate the many reports we currently have in Access. The data is not a problem. So far I've found nothing to suggest this is even possible/practical but perhaps someone here knows otherwise. I'm also open to suggestions for other alternatives to Access but it must be able to produce flexible reports easily. That is the one real strength of Access in my view. Because of its subjective nature I'm making this community wiki.

    Read the article

  • ESXi 5.1 on Poweredge 510 freezes after base-esx update

    - by goober
    Background / Problem Just experienced an issue where an ESXi host was upgraded from 5.0 -- 5.1 perfectly fine. Then, I did a scan and remediated a patch (ESXi510-201210401-BG) Looking into the host on via the kvm switch, this appears to complete successfully. However, on reboot, the server hangs at the "Initializing Power Management" phase. I've read from various spots around the internet that this usually clears itself up again upon a cold boot, but given that our servers are in a different building with different access rules, the less I have to physically go there, the better. :) Question Is there anything I can do to avoid an ESXi host hanging at the "initialize power management" phase of boot after remediating the host to apply patches?

    Read the article

  • eTrayz: Replace base system with a bootstrapped Debian

    - by knoopx
    I bought an eTrayz NAS time ago. The device is more or less good but it ships with a closed-source custom linux and a bunch of broken web-apps. I wanted to replace the whole system with a raw Debian installation. I successfully bootstrapped a Lenny Debian into a chroot and I'm able to use use it. However I would like it to be the default system and to boot automatically at login. The device itself ships with a bundled 2.6.24.4 kernel. I think the kernel is on a dedicated flash memory so I would prefere not to re-flash it. What do you think is the best way to accomplish it?

    Read the article

  • Rewrite the Base URL with mod_rewrite

    - by rotespferd
    My Domain example.com points to the directory public_html. In the directory public_html/php is my index.php file. Now I want that the URL example.com points to *public_html/php/index.php*. I must do this with mod_rewrite because I have no access to the httpd.conf to do something wth Alias oder DocumentBase. In the directory public_html is my .htacces filewith the following content: RewriteEngine on RewriteCond %{HTTP_HOST} exaple.com$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /php/index.php [L,QSA] This do half of the job, because when I enter something like example.com/s in my browser it points to *public_html/php/index.php* as I want it to do. But when I just enter example.com it points to *public_html*. What can I do to fix this?

    Read the article

  • Change/check minimum iPhone OS for Universal apps?

    - by Moshe
    The dropdown in XCode shows a base SDK of 3.2, but my iPod Touch (2nd generation), running OS 3.1.3, will run the app just fine in debug mode. (Command + Return/Enter) What is the actual base SDK of my iPhone/iPod touch version of the app and how can I change this? Changing it by right clicking on the project name in the "Groups and Files" pane and changing "Base SDK" under the "Build", doesn't do much. Edit: While writing this question, I found that scrolling down in "Build" and changing "iPhone OS Deployment Target" seems to be what I'm looking for, I'm posting this anyway. Perhaps someone has more insight into this...

    Read the article

  • Why is ExecuteFunction method only available through base.ExecuteFunction in a child class of Object

    - by Matt
    I'm trying to call ObjectContext.ExecuteFunction from my objectcontext object in the repository of my site. The repository is generic, so all I have is an ObjectContext object, rather than one that actually represents my specific one from the Entity Framework. Here's an example of code that was generated that uses the ExecuteFunction method: [global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")] public global::System.Data.Objects.ObjectResult<ArtistSearchVariation> FindSearchVariation(string source) { global::System.Data.Objects.ObjectParameter sourceParameter; if ((source != null)) { sourceParameter = new global::System.Data.Objects.ObjectParameter("Source", source); } else { sourceParameter = new global::System.Data.Objects.ObjectParameter("Source", typeof(string)); } return base.ExecuteFunction<ArtistSearchVariation>("FindSearchVariation", sourceParameter); } But what I would like to do is something like this... public class Repository<E, C> : IRepository<E, C>, IDisposable where E : EntityObject where C : ObjectContext { private readonly C _ctx; // ... public ObjectResult<E> ExecuteFunction(string functionName, params[]) { // Create object parameters return _ctx.ExecuteFunction<E>(functionName, /* parameters */) } } Anyone know why I have to call ExecuteFunction from base instead of _ctx? Also, is there any way to do something like I've written out? I would really like to keep my repository generic, but with having to execute stored procedures it's looking more and more difficult... Thanks, Matt

    Read the article

  • Asp.net MVC 2, MvcContrib, and a base controller with redirect actions

    - by jeriley
    I've got a base controller that takes a couple generics, nothing overly fancy. public class SystemBaseController<TForm, TFormViewModel> : Controller where TForm : class, IForm where TFormViewModel : class, IViewModel ok, no big deal. I have a method "CompleteForm" that takes in the viewModel, looks kinda like this ... public ActionResult CompleteForm(TFormViewModel viewModel) { //does some stuff return this.RedirectToAction(c => c.FormInfo(viewModel)); } Problem is, the controller that inherits this, like so public class SalesFormController : SystemBaseController<SalesForm, SalesViewModel> { } I end up getting a error from MvcContrib - Controller name must end in 'Controller' at this point ... public RedirectToRouteResult(Expression<Action<T>> expression) : this(expression, expr => Microsoft.Web.Mvc.Internal.ExpressionHelper.GetRouteValuesFromExpression(expr)) {} The expression that's passed in is correct (SystemBaseController blahblah) but I'm not sure why its 1.) saying there's no controller at the end, and 2.) if I pull out everything into the controller (out of the base), works just fine. Do I need to write or setup some kind of action filter of my own or what am I missing?

    Read the article

  • Base Href vs. .htaccess RewriteBase

    - by Wayne
    Normally I use <base href="http://domain.com/" /><!--[if ie]></base><![endif]--> I haven't tried much with RewriteBase, I normally get confused and keep changing it till it works. Which method would be best, I obviously find the best solution because the links stay the same so that no links are broken most of the time when attaching a css file, e.g. http://domain.com/css/main.css It just always stay the same when accessing to sub-directories. Although, when I don't use the tag, and I access to a sub directory, it breaks the css links when I use <link href="css/main.css" rel="stylesheet" type="text/css" /> As my PHP documents would include the header, <?php include("include/global_header.php"); ?> If I do that without the I would have to use: <link href="../css/main.css" rel="stylesheet" type="text/css" /> Which can break when accessing to a sub-directory. So... does the RewriteBase work the same as the ? Your thoughts.

    Read the article

  • Extend base type and automatically update audit information on Entity

    - by Nix
    I have an entity model that has audit information on every table (50+ tables) CreateDate CreateUser UpdateDate UpdateUser Currently we are programatically updating audit information. Ex: if(changed){ entity.UpdatedOn = DateTime.Now; entity.UpdatedBy = Environment.UserName; context.SaveChanges(); } But I am looking for a more automated solution. During save changes, if an entity is created/updated I would like to automatically update these fields before sending them to the database for storage. Any suggestion on how i could do this? I would prefer to not do any reflection, so using a text template is not out of the question. A solution has been proposed to override SaveChanges and do it there, but in order to achieve this i would either have to use reflection (in which I don't want to do ) or derive a base class. Assuming i go down this route how would I achieve this? For example EXAMPLE_DB_TABLE CODE NAME --Audit Tables CREATE_DATE CREATE_USER UPDATE_DATE UPDATE_USER And if i create a base class public abstract class IUpdatable{ public virtual DateTime CreateDate {set;} public virtual string CreateUser { set;} public virtual DateTime UpdateDate { set;} public virtual string UpdateUser { set;} } The end goal is to be able to do something like... public overrride void SaveChanges(){ //Go through state manager and update audit infromation //FOREACH changed entity in state manager if(entity is IUpdatable){ //If state is created... update create audit. //if state is updated... update update audit } } But I am not sure how I go about generating the code that would extend the interface.

    Read the article

  • How to parse out base file name using Script-Fu

    - by ongle
    Using Gimp 2.6.6 for MAC OS X (under X11) as downloaded from gimp.org. I'm trying to automate a boring manual process with Script-Fu. I needed to parse the image file name to save off various layers as new files using a suffix on the original file name. My original attempts went like this but failed because (string-search ...) doesn't seem to be available under 2.6 (a change to the scripting engine?). (set! basefilename (substring filename 0 (string-search "." filename))) Then I tried to use this information to parse out the base file name using regex but (re-match-nth ...) is not recognized either. (if (re-match "^(.*)[.]([^.]+)$" filename buffer) (set! basefilename (re-match-nth orig-name buffer 1)) ) And while pulling the value out of the vector ran without error, the resulting value is not considered a string when it is passed into (string-append ...). (if (re-match "^(.*)[.]([^.]+)$" filename buffer) (set! basefilename (vector-ref buffer 1)) ) So I guess my question is, how would I parse out the base file name?

    Read the article

  • django powering multiple shops from one code base on a single domain

    - by imanc
    Hey, I am new to django and python and am trying to figure out how to modify an existing app to run multiple shops through a single domain. Django's sites middleware seems inappropriate in this particular case because it manages different domains, not sites run through the same domain, e.g. : domain.com/uk domain.com/us domain.com/es etc. Each site will need translated content - and minor template changes. The solution needs to be flexible enough to allow for easy modification of templates. The forms will also need to vary a bit, e.g minor variances in fields and validation for each country specific shop. I am thinking along the lines of the following as a solution and would love some feedback from experienced django-ers: In short: same codebase, but separate country specific urls files, separate templates and separate database Create a middleware class that does IP localisation, determines the country based on the URL and creates a database connection, e.g. /au/ will point to the au specific database and so on. in root urls.py have routes that point to a separate country specific routing file, e..g (r'^au/',include('urls_au')), (r'^es/',include('urls_es')), use a single template directory but in that directory have a localised directory structure, e.g. /base.html and /uk/base.html and write a custom template loader that looks for local templates first. (or have a separate directory for each shop and set the template directory path in middleware) use the django internationalisation to manage translation strings throughout slight variances in forms and models (e.g. ZA has an ID field, France has 'door code' and 'floor' etc.) I am unsure how to handle these variations but I suspect the tables will contain all fields but allowing nulls and the model will have all fields but allowing nulls. The forms will to be modified slightly for each shop. Anyway, I am keen to get feedback on the best way to go about achieving this multi site solution. It seems like it would work, but feels a bit "hackish" and I wonder if there's a more elegant way of getting this solution to work. Thanks, imanc

    Read the article

  • DDD and Entity Base, Model using multiple identity types

    - by Thomas
    I have a model that looks like this: public interface IEntity { int Id { get; set; } } Then the idea is to have my entities inherit from this interface: public class User : IEntity { public int Id { get; set; } } However, one of my entities actually has a Guid as an identifier. public class UserSession { public Guid Id { get; set; } } I really would like all my entities inheriting from the same interface but that would force me to add an integer based identity column to the UserSession which is unnecessary since Guid is the identity, but it would keep the domain model nice since all entities would inherit from the same base. What options do I have in this scenario? Can I have two base interfaces, one for int and one for Guid? Should I add an identity column into the UserSession entity although it is unnecessary? I need the Guid so I can't just get rid of it and replace it with and integer. Any thoughts on best practices?

    Read the article

  • ASP.NET page with base class with dynamic master page not firing events

    - by Kangkan
    Hi guys! I am feeling that I have terribly wrong somewhere. I was working on a small asp.net app. I have some dynamic themes in the \theme folder and have implemented a page base class to load the master page on the fly. The master is having the ContentPlaceHolder like: <asp:ContentPlaceHolder ID="cphBody" runat="server" /> Now I am adding pages that are derived from my base class and added the form elements. I know, Visual Studio has problem showing the page in the design mode. I have a dropdown box and wish to add the event of onselectedindexchange. But it is not working. the page is like this: <%@ Page Language="C#" AutoEventWireup="true" Inherits="trigon.web.Pages.MIS.JobStatus" Title="Job Status" AspCompat="true" CodeBehind="JobStatus.aspx.cs" %> <asp:Content ID="Content1" ContentPlaceHolderID="cphBody" runat="Server"> <div id="divError" runat="server" /> <asp:DropDownList runat="server" id="jobType" onselectedindexchange="On_jobTypeSelection_Change"></asp:DropDownList> </asp:Content> I have also tried adding the event on the code behind like: protected void Page_Load(object sender, EventArgs e) { jobType.SelectedIndexChanged += new System.EventHandler(this.On_jobTypeSelection_Change); if (!IsPostBack) { JobStatus_DA da = new JobStatus_DA(); jobType.DataSource = da.getJobTypes(); jobType.DataBind(); } } protected void On_jobTypeSelection_Change(Object sender, EventArgs e) { //do something here } Can anybody help? Regards,

    Read the article

  • Multiple Inheritence with same Base Classes in Python

    - by Jordan Reiter
    I'm trying to wrap my head around multiple inheritance in python. Suppose I have the following base class: class Structure(object): def build(self, *args): print "I am building a structure!" self.components = args And let's say I have two classes that inherit from it: class House(Structure): def build(self, *args): print "I am building a house!" super(House, self).build(*args) class School(Structure): def build(self, type="Elementary", *args): print "I am building a school!" super(School, self).build(*args) Finally, a create a class that uses multiple inheritance: class SchoolHouse(School, House): def build(self, *args): print "I am building a schoolhouse!" super(School, self).build(*args) Then, I create a SchoolHouse object and run build on it: >>> sh = SchoolHouse() >>> sh.build("roof", "walls") I am building a schoolhouse! I am building a house! I am building a structure! So I'm wondering -- what happened to the School class? Is there any way to get Python to run both somehow? I'm wondering specifically because there are a fair number of Django packages out there that provide custom Managers for models. But there doesn't appear to be a way to combine them without writing one or the other of the Managers as inheriting from the other one. It'd be nice to just import both and use both somehow, but looks like it can't be done? Also I guess it'd just help to be pointed to a good primer on multiple inheritance in Python. I have done some work with Mixins before and really enjoy using them. I guess I just wonder if there is any elegant way to combine functionality from two different classes when they inherit from the same base class.

    Read the article

  • Linker error: wants C++ virtual base class destructor

    - by jdmuys
    Hi, I have a link error where the linker complains that my concrete class's destructor is calling its abstract superclass destructor, the code of which is missing. This is using GCC 4.2 on Mac OS X from XCode. I saw http://stackoverflow.com/questions/307352/g-undefined-reference-to-typeinfo but it's not quite the same thing. Here is the linker error message: Undefined symbols: "ConnectionPool::~ConnectionPool()", referenced from: AlwaysConnectedConnectionZPool::~AlwaysConnectedConnectionZPool()in RKConnector.o ld: symbol(s) not found collect2: ld returned 1 exit status Here is the abstract base class declaration: class ConnectionPool { public: static ConnectionPool* newPool(std::string h, short p, std::string u, std::string pw, std::string b); virtual ~ConnectionPool() =0; virtual int keepAlive() =0; virtual int disconnect() =0; virtual sql::Connection * getConnection(char *compression_scheme = NULL) =0; virtual void releaseConnection(sql::Connection * theConnection) =0; }; Here is the concrete class declaration: class AlwaysConnectedConnectionZPool: public ConnectionPool { protected: <snip data members> public: AlwaysConnectedConnectionZPool(std::string h, short p, std::string u, std::string pw, std::string b); virtual ~AlwaysConnectedConnectionZPool(); virtual int keepAlive(); // will make sure the connection doesn't time out. Call regularly virtual int disconnect(); // disconnects/destroys all connections. virtual sql::Connection * getConnection(char *compression_scheme = NULL); virtual void releaseConnection(sql::Connection * theConnection); }; Needless to say, all those members are implemented. Here is the destructor: AlwaysConnectedConnectionZPool::~AlwaysConnectedConnectionZPool() { printf("AlwaysConnectedConnectionZPool destructor call"); // nothing to destruct in fact } and also maybe the factory routine: ConnectionPool* ConnectionPool::newPool(std::string h, short p, std::string u, std::string pw, std::string b) { return new AlwaysConnectedConnectionZPool(h, p, u, pw, b); } I can fix this by artificially making my abstract base class concrete. But I'd rather do something better. Any idea? Thanks

    Read the article

  • How to make ActionController::Base.asset_host and Base.relative_url_root independent?

    - by GSP
    In our Intranet environment we have a decree that common assets (stylesheets, images, etc) should be fed from Apache root while Rails apps runs from from a "sub directory" (a proxy to a Mongrel cluster). In other words: <%= stylesheet_tag '/common' %> # <link href="http://1.1.1.1/stylesheets/common.css" /> <%= link_to 'Home', :controller=>'home', :action=>'index' %> # <a href="http://1.1.1.1/myapp/" /> What I would like to do is define the assets and relative url in my configuration like this: ActionController::Base.asset_host=http://1.1.1.1 ActionController::Base.relative_url_root=/myapp But when I do this, the relative_url_root value gets appended to the asset_host value. (e.g. <link href="http://1.1.1.1/myapp/stylesheets/common.css"> ) Is there a way to stop this? And, more importantly, is there a best practice for how to deploy a rails app to an environment like this? (BTW, I don't want to simply hard code my asset paths since the development environment does not match the test and production environments.) Environment: Rails 2.3.4 Ruby 1.8.7 RedHat Linux 5.4?

    Read the article

  • Most awkward/misleading method in Java Base API ?

    - by JG
    I was recently trying to convert a string literal into a boolean, when the method "boolean Boolean.getBoolean(String name)" popped out of the auto-complete window. There was also another method ("boolean Boolean.parseBoolean(String s)") appearing right after, which lead me to search to find out what were the differences between these two, as they both seemed to do the same. It turns out that what Boolean.getBoolean(String name) really does is to check if there exists a System property (!) of the given name and if its value is true. I think this is very misleading, as I'm definitely not expecting that a method of Boolean is actually making a call to System.getProperty, and just by looking at the method signature, it sure looks (at least to me) like it should be used to parse a String as a boolean. Sure, the javadoc states it clearly, but I still think the method has a misleading name and is not in the right place. Other primitive type wrappers, such as Integer also have a similar method. Also, it doesn't seem to be a very useful method to belong in the base API, as I think it's not very common to have something like -Darg=true. Maybe it's a good question for a Java position interview: "What is the output of Boolean.getBoolean("true")?". I believe a more appropriate place for those methods would be in the System class, e.g., getPropertyAsBoolean; but again, I still think it's unnecessary to have these methods in the base API. It'd make sense to have these in something like the Properties class, where it's very common to do this kind of type conversions. What do you think of all this ? Also, if there's another "awkward" method that you're aware of, please post it. N.B. I know I can use Boolean.valueOf or Boolean.parseBoolean to convert a string literal into a boolean, but I'm just looking to discuss the API design.

    Read the article

  • C# Function Inheritance--Use Child Class Vars with Base Class Function

    - by Sean O'Connor
    Good day, I have a fairly simple question to experienced C# programmers. Basically, I would like to have an abstract base class that contains a function that relies on the values of child classes. I have tried code similar to the following, but the compiler complains that SomeVariable is null when SomeFunction() attempts to use it. Base class: public abstract class BaseClass { protected virtual SomeType SomeVariable; public BaseClass() { this.SomeFunction(); } protected void SomeFunction() { //DO SOMETHING WITH SomeVariable } } A child class: public class ChildClass:BaseClass { protected override SomeType SomeVariable=SomeValue; } Now I would expect that when I do: ChildClass CC=new ChildClass(); A new instance of ChildClass should be made and CC would run its inherited SomeFunction using SomeValue. However, this is not what happens. The compiler complains that SomeVariable is null in BaseClass. Is what I want to do even possible in C#? I have used other managed languages that allow me to do such things, so I certain I am just making a simple mistake here. Any help is greatly appreciated, thank you.

    Read the article

  • The Schema returned by the new query differ from the base query

    - by sochandara
    I am working on class project which required to work with Windows Application and this issue occurred to me that i don understand how to solved it can anybody help please? I want to show the NATIONALITYNAME instead of showing NATIONALITYID in the grid view SELECT COACH.COACHID, COACH.COACHFIRSTNAME, COACH.COACHLASTNAME, NATIONALITY.NATIONALITY FROM COACH INNER JOIN NATIONALITY ON COACH.NATIONALITYID = NATIONALITY.NATIONALITYID Error Message: "The Schema returned by the new query differ from the base query"![alt text][1]

    Read the article

  • rspec needs to be installed in base app

    - by Ryan Lanciaux
    I am having trouble building a gem. When I run rake it gives the the following error message: You need to install rspec in your base app I'm not completely certain what I should be doing to fix this. I have double checked that rspec is, in fact installed. Any help would be appreciated.

    Read the article

  • Extended Django base-class with multiple instances

    - by Gijs
    I'm modeling a simple movie database using Django. models.py defines a base model Person. I extend Person into Actor and Director, which works as I imagined. Persons must be unique. When (in the Admin) I create an instance of Actor, and this person is also a Director, it won't save because of the unique = True. Any ideas how to solve this problem? (generic foreign keys?) Thx

    Read the article

  • CSLA.net - Inheritable Base classes

    - by JMSA
    I was reading the book "Expert C# 2005 Business Objects". The book describes various base classes to be inherited by various classes to solve real-world problems. But the book does not provide examples of all those classes. Can anyone give me all of those examples (with reason) to better understand CSLA? For example, Which real-world objects are to be considered as Read-only Root Objects (Student/Product/Order, etc.)? And Why?

    Read the article

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