Search Results

Search found 1117 results on 45 pages for 'angularjs directive'.

Page 6/45 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Single ErrorDocument directive to catch all errors (.htaccess)

    - by Mike Valeriano
    Hello. Is there something like a wildcard directive to catch all possible errors and deal with them in a single custom error page? ErrorDocument 404 /error.php?code=404 ErrorDocument 403 /error.php?code=403 ... ErrorDocument NNN /error.php?code=NNN #possible use of RegExp? I know I probably won't be dealing with a lot of custom error pages here, but I'm curious about this.

    Read the article

  • missing a using directive or an assembly reference

    - by cire1507
    I'm in the process of writing a small asp.net mvc application that is using the northwind.mdf. When building the solution I get this error: Error 1 The type or namespace name 'Order' could not be found (are you missing a using directive or an assembly reference?) Order is a table in the northwind database. any help is most appreciated.

    Read the article

  • Understanding a #define directive

    - by Meta
    Looking at the Windows SDK, I found this #define directive for MAKEINTRESOURCEW: #define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i)))) Can someone explain to me what the heck that means? For example, what would be the value of MAKEINTRESOURCEW(0)? (1)? (-1)?

    Read the article

  • #Define Compiler Directive in C#

    - by pm_2
    In C, I could declare a compiler directive as follows: #define MY_NUMBER 10 However, in C#, I only appear to be able to do this: #define MY_NUMBER Which is obviously useless in this case. Is this correct, or am I doing something wrong? If not, can anyone suggest a way of doing this, either at namespace or solution level? I thought of maybe creating a static class, but that seems to be overkill for one value.

    Read the article

  • Objective C @autoreleasepool directive

    - by Cemre
    I am reading a book which says (if I am not getting it wrong) wrapping some code with @autoreleasepool statement enables the ARC. First of all is this the case ? My second concern is when I am doing some iOS example programs, although I enable ARC when creating a new project, I never see this directive being used anywhere (in the automatically generated code). Does this mean that ARC is not being used ? Any ideas/pointers is appreciated.

    Read the article

  • Delphi Compiler Directive to Evaluate Arguments in Reverse

    - by Peter Turner
    I was really impressed with this delphi two liner using the IFThen function from Math.pas. However, it evaluates the DB.ReturnFieldI first, which is unfortunate because I need to call DB.first to get the first record. DB.RunQuery('select awesomedata1 from awesometable where awesometableid = "great"'); result := IfThen(DB.First = 0, DB.ReturnFieldI('awesomedata1')); Obviously this isn't such a big deal, as I could make it work with five robust liners. But all I need for this to work is for Delphi to evaluate DB.first first and DB.ReturnFieldI second. I don't want to change math.pas and I don't think this warrants me making a overloaded ifthen because there's like 16 ifthen functions. Just let me know what the compiler directive is, if there is an even better way to do this, or if there is no way to do this and anyone whose procedure is to call db.first and blindly retrieve the first thing he finds is not a real programmer.

    Read the article

  • #pragma directive and its uses in c

    - by sandy101
    Hello , can anyone tell my what does the #pragma can do in the c language . what are its uses and why the above program is not giving the output 'inside v1'& 'inside v2' in the following program ... include void v1(); void v2(); pragma startup v1 pragma exit v2 int main() { printf("inside main\n"); return 0; } void v1() { printf("inside v1\n"); } void v2() { printf("inside v2\n"); } i also want to know what a are the uses of the #pragma directive .... plz help

    Read the article

  • Must .aspx files have a page directive?

    - by Keith Bloom
    Around 90% of the pages for our websites have no .Net code embedded in them yet are published as .aspx files. I want these to render as fast as possible so I'm removing as much as I can. Does the .Net page directive have an impact on performance? I am thinking about two factors; the page speed for each GET and what happens when the file changes. The CMS system re-creates each page daily and I'm wondering if this triggers the ASP.Net compilation process.

    Read the article

  • Use a template parameter in a preprocessor directive?

    - by Ranju V
    Is it possible to use a non-type constant template parameter in a preprocessor directive? Here's what I have in mind: template <int DING> struct Foo { enum { DOO = DING }; }; template <typename T> struct Blah { void DoIt() { #if (T::Doo & 0x010) // somecode here #endif } }; When I try this with something like Blah<Foo<0xFFFF>>, VC++ 2010 complains something about unmatched parentheses in the line where we are trying to use "#if". I am guessing the preprocessor doesn't really know anything about templates and this sort of thing just isn't in its domain. What say? Thanks!

    Read the article

  • grunt angularjs doesn't process video files

    - by Daly
    I've set up my grunt file to copy, minify, uglify, revved and all that. It works fine with all media I use, except that recently I added a video to an html file, but it's not being copied to /dist, nor is the html being updated with the versioned file (that is not being copied nor revved). Not sure what I'm missing. Here is the html fragment: <div class="col-xs-4"> <div class="row flowplayer"> <video autoplay> <source type="video/mp4" src="/videos/wedding_planners_bride_smallweb.mp4"> </video> </div> </div> What do I need to add to my gruntfile.js file to process /videos the same way /images are just working out of the box? Thanks

    Read the article

  • Apache HTTP and WEblogic Plug-in Location Directive question

    - by user275633
    All, We are using Weblogic Portal and Apache 2.x http server with the weblogic plug-in for apache for load-balancing. We have an application that right now can only be accessed from one of our managed servers. What I would like to do is us the Location directive to direct all requests for that page to the one managed server and I can't get it to work. The context that the portal tries to forward to is something like /MyWebApp?portalusername= (where equals a legitimate user. For example /MyWebApp?portalusername=joesmith All other applications and the plug-in is load balancing as expected because every now and then you'll get sent to teh second managed server for this particular application and its not deployed. I tried various things in the apache http.conf like the following but can't seem to get it work? Any suggestions? The followign is a snippet of the httpd.conf: (Note formatting did not come thru properly but it is formatted correctly in my httpd.conf) Blockquote Location /MyWebApp SetHandler weblogic-handler WebLogicCluster myserver:7011 Location Blockquote Location / SetHandler weblogic-handler WebLogicCluster myserver:7011, myserver2:7012 Location Thanks in advance.

    Read the article

  • C# using namespace directive in nested namespaces

    - by MoSlo
    Right, I've usually used 'using' directives as follows using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AwesomeLib { //awesome award winning class declarations making use of Linq } i've recently seen examples of such as using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AwesomeLib { //awesome award winning class declarations making use of Linq namespace DataLibrary { using System.Data; //Data access layers and whatnot } } Granted, i understand that i can put USING inside of my namespace declaration. Such a thing makes sense to me if your namespaces are in the same root (they organized). System; namespace 1 {} namespace 2 { System.data; } But what of nested namespaces? Personally, I would leave all USING declarations at the top where you can find them easily. Instead, it looks like they're being spread all over the source file. Is there benefit to the USING directives being used this way in nested namespaces? Such as memory management or the JIT compiler?

    Read the article

  • Specificying a Page directive attribute on an NHaml page

    - by ManiacZX
    I am working on an MVC site using NHaml for the view engine. I have a page that needs to submit HTML code as a form value and am getting the System.Web.HttpRequestValidationException thrown at me. I want to specify the <%@ Page validateRequest="false" % so that this page will allow this data to be submitted but am unsure on how to do this with NHaml generating the pages.

    Read the article

  • ngModel and component with isolated scope

    - by Artem Andreev
    I am creating simple ui-datetime directive. It splits javascript Date object into _date, _hours and _minutes parts. _date uses jquery ui datepicker, _hours and _minutes - number inputs. See example: http://jsfiddle.net/andreev_artem/nWsZp/3/ On github: https://github.com/andreev-artem/angular_experiments/tree/master/ui-datetime As far as I understand - best practice when you create a new component is to use isolated scope. When I tried to use isolated scope - nothing works. ngModel.$viewValue === undefined. When I tried to use new scope (my example, not so good variant imho) - ngModel uses value on newly created scope. Of course I can create directive with isolated scope and work with ngModel value through "=expression" (example). But I think that working with ngModelController is a better practice. My questions: Can I use ngModelController with isolated scope? If it is not possible which solution is better for creating such component?

    Read the article

  • compiler directive defensive programming for adding ints to nsmuatablearray FMDB/EGODB

    - by johndpope
    I would like to throw a warning message when users try to add an int to an nsmutablearray basically any insert statement that includes values that are not nsstring / nsnumber cause run time crashes. It's exactly the same crash you get when you type %@ instead of %d NSLog(int); The crash is ok, but I want to throw a friendly 'FATAL' message to user. so far I have this try catch with isKindOfClass NSObject but ints are slipping through. #define FATAL_MSG "FATAL: object is not an NSObject subclass. Are you using int? use [NSNumber numberWithInt:1] \n" #define VAToArray(firstarg) ({\ NSMutableArray* valistArray = [NSMutableArray array];\ id obj = nil;\ va_list arguments;\ va_start(arguments, sql);\ @try { \ while ((obj = va_arg(arguments, id))) {\ if([obj isKindOfClass:[NSObject class]]) [valistArray addObject:obj];\ else printf(FATAL_MSG); \ }\ } \ @catch(NSException *exception){ \ printf(FATAL_MSG); \ } \ va_end(arguments);\ valistArray;\ }) - (void)test:(NSString*)sql,... { NSLog(@"VAToArray :%@",VAToArray(sql)); } // then call this [self test:@"str",@"test",nil]; when I call this [self test:@"str",2,nil]; throw the error message.

    Read the article

  • Conditional directive to identify C++ Builder personalities

    - by Narcís Calvet
    Hello, I have a Delphi component which I want to install and have it available at the component palette in Delphi but not in C++ Builder. In BDS/RAD 2006 and above I can either have it installed for both personalities or none. I need to do so because this component uses 3rd party libraries that doesn't support C++ Builder. I have looked at jedi.inc mentioned here but I'm not able to find the combination to be able to register the component in Delphi personalities only. The component should also work for D5, D6 and D7 but not for BCB5 and BCB6. Is this possible? BTW: Component is written in Delphi. C++ Builder shares same packages as Delphi. Thanks in advance.

    Read the article

  • Does the "using" directive provide any benefit?

    - by Adam Drummond
    Is there a programmatic benefit to using a using statement? Notice the difference between this sample: using Application.Data; namespace Application.Web { public class SampleClass { public void SampleMethod() { List<Category> categories = CreateCategoriesData(); Category expected = categories[0]; ... ... } } } And this one: namespace Application.Web { public class SampleClass { public void SampleMethod() { List<Data.Category> categories = CreateCategoriesData(); Data.Category expected = categories[0]; ... ... } } }

    Read the article

  • Preprocessor directive to test if this is C or C++

    - by Collin
    I'm trying to find a standard macro which will test whether a header file is being compiled as C or as C++. The purpose of this is that the header may be included by either C or C++ code, and must behave slightly differently depending on which. Specifically: In C, I need this to be the code: extern size_t insert (const char*); In C++, I need this to be the code: extern "C" size_t insert (const char*); Additionally, is there a way to avoid putting #ifdef's around every declaration in the header?

    Read the article

  • Preprocessor directive #ifndef for C/C++ code

    - by Leif Andersen
    In eclipse, whenever I create a new C++ class, or C header file, I get the following type of structure. Say I create header file example.h, I get this: /*Comments*/ #ifndef EXAMPLE_H_ #define EXAMPLE_H_ /* Place to put all of my definitions etc. */ #endif I think ifndef is saying that if EXAMPLE_H_ isn't defined, define it, which may be useful depending on what tool you are using to compile and link your project. However, I have two questions: Is this fairly common? I don't see it too often. And is it a good idea to use that rubric, or should you just jump right into defining your code. What is EXAMPLE_H_ exactly? Why not example.h, or just example? Is there anything special about that, or could is just be an artifact of how eclipse prefers to autobuild projects? Thank you for your help.

    Read the article

  • Any .NET '#region directive' convention ideas ?

    - by PaN1C_Showt1Me
    I really appreciate the possibility to define regions in your code, as it improves the readability insanely. Anyways, I'd like to have everyone using the same convention in all classes (with the predefined order of all regions) like: Private Fields Constructors Class Properties Event Handlers etc... Do you have any proposition how this division could look like (What regions have sense and what names should they have) and in which order should they be defined ?

    Read the article

  • C# and ASP.NET MVC: Using #if directive in a view

    - by Mega Matt
    Hi all, I've got a conditional compilation symbol I'm using called "RELEASE", that I indicated in my project's properties in Visual Studio. I want some particular CSS to be applied to elements when the RELEASE symbol is defined, and I was trying to do that from the view, but it doesn't seem to be working. My view code looks like this (shortened a bit for demo purposes): <% #if (RELEASE) %> <div class="releaseBanner">Banner text here</div> <% #else %> <div class="debugBanner">Banner text here</div> <% #endif %> With this code, and with the RELEASE symbol set, the 'else' code is running and I'm getting a div with the debugBanner class. So it doesn't seem to think that RELEASE is defined. It's worth noting that my actual C# code in .cs files is recognizing RELEASE and runs the correct code. It's only the view that is giving me the problem. Does anyone have any insight into this? Any help would be appreciated. Thanks.

    Read the article

  • Preprocessor #if directive

    - by Caslav
    I am writing a big code and I don't want it all to be in my main.c so I wrote a .inc file that has IF-ELSE statement with function and I was wondering can it be written like this: #if var==1 process(int a) { printf("Result is: %d",2*a); } #else process(int a) { printf("Result is: %d",10*a); } #endif I tried to compile it but it gives me errors or in best case it just goes on the first function process without checking the var variable (it is set to 0).

    Read the article

  • How to specify java script files required by an angular app

    - by Vishal Kaushik
    I'm looking for a way to specify required js files by an angular app. So that, we don't need to include an array of tag for all the files which may be required by some ng-app. The main idea behind this requirement is - we might not need to load all the resources on the browser at once. Which ever ng-app gets loaded onto the screen, will fetch its dependencies on its own from the server. Is there any existing way within angularJS to achieve this goal..?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >