Search Results

Search found 1864 results on 75 pages for 'optional'.

Page 40/75 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • host MVC app inside a website

    - by Nishant
    I have a website (not a web application- in visual studio you get two options-create a website/project) running on IIS 6.0. Now I want to develop few features in MVC architecture. So I created one MVC application in visual studio and everything is working fine on localhost as a separate application. Now I want to host this MVC app also inside the website I have already deployed. I created a virtual directory(MVCDir) inside the default website in IIS 6.0. The global.asax file which was in root folder I added the routing function- Shared Sub RegisterRoutes(ByVal routes As RouteCollection) routes.Ignore("{resource}.axd/{*pathInfo}") routes.Ignore("{resource}.aspx/{*pathInfo}") routes.MapPageRoute("Default4", "{controller}/{action}/{id}", "~/MVCDir", False, New RouteValueDictionary(New With {.controller = "Home", .action = "Index", .id = Mvc.UrlParameter.Optional})) End Sub * NOTE- If I write routes.ignoreRoute instead of routes,ignore it says- IgnoreRoute is not a member of System.Web.RoutingCollection* I called this routing function inside application_start function now when I run domain.com/home/index How to solve this problem? it says resource not found

    Read the article

  • Can I to remove the labels from the bibliography and keeping it in the reference?

    - by Tae
    I'm writing the bibliography of my report with thebibliography environment because I don't need a BibTeX database (or I don't have the time for learn how to customize or write a style). Well, using the optional argument [label] I can specify as I want the cite references are show, for example: \bibitem[PNUD1996]{PNUD1996} PNUD. Desarrollo Humano en Chile 1996. Santiago: PNUD, 1996. So, if I write: in \cite{PNUD1996}. it produces: in [PNUD1996]. But the label also appear in the bibliography: [PNUD1996] PNUD. Desarrollo Humano en Chile 1996. Santiago: PNUD, 1996. Can I to remove the label from the bibliography and keeping it in the reference? I mean, to get: in [PNUD1996]. and PNUD. Desarrollo Humano en Chile 1996. Santiago: PNUD, 1996. Thanks, and sorry for my English :(

    Read the article

  • Logic for controll concurrent in block/method

    - by Hlex
    1)My environment is web application, I develop servlet to receive request. A) In some block/method i want to control concurrent to not greater than 5 B) if there are 5 request in that block , the new coming must wait up to 60 second then throws error C) if there are sleep/waiting request more then 30, the 31th request will be throwed an error How I do this? 2)(Optional Question) from above I have to distribute control logic to all clustered host. I plan to use hazelcast to share the control logic (e.g. current counter) I see they provide BlockingQueue & ExectorService but I have no idea how to use in my case. Please recommend if you have idea.

    Read the article

  • C# - Google like query engine.-

    - by MRFerocius
    Guys; Hope you are fine. I have to make a Web Project (very simple) I will have a DB with 2 tables. One table has 2 fields. From the WebPage I need a Google like search query, for example I have Movie Title and Movie Review on the Table. I need to be able to search those 2 fields like this: "Best Movie" + Action I will need to make a query to the DB to search for the "Best Movie" string togheter plus optional ACTION word on 2 fields of the table. Am I clear??? :) Does somebody know if this has already been made, and if it´s public and free and where to get it :) Thanks in advanced EDIT: My concern is to translate the Google like Symbols ("", +, -, ~) to build a valid query.

    Read the article

  • Is this a valid jquery getJSON call?

    - by Pandiya Chendur
    I am using jquery getJSON with asp.net mvc controller... I cant able to get it work.... public JsonResult GetMaterials(int currentPage,int pageSize) { var materials = consRepository.FindAllMaterials().AsQueryable(); var results = new PagedList<MaterialsObj>(materials, currentPage-1, pageSize); return Json(results); } and i am calling this with, $.getJSON('Materials/GetMaterials', "{'currentPage':1,'pageSize':5}", function(data) { }); This call doesn't seem to work.... when inspected through firebug i found this, The parameters dictionary contains a null entry for parameter 'currentPage' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.JsonResult GetMaterials(Int32, Int32)' in 'CrMVC.Controllers.MaterialsController'. To make a parameter optional its type should be either a reference type or a Nullable type.<br> Parameter name: parameters

    Read the article

  • Sign Up/Login system for multi-domain/multi-server

    - by David
    I'm thinking about a good solution for implementing a sign up/login system that works across different domains and servers. A working example is Olx (you can register in one domain, and your login will work in the rest of domains). The scenario is that every domain (one per country) has its own database. And there will be 2 servers (for example), each one will have the 50% of the domains (and so the 50% of databases). What would you suggest to start with? Database: MySQL 5.1 Server-side language: PHP 5.3 (I will be using Symfony 1.4, so if someone has some suggestion for this framework, it will be interesting too, although it is optional)

    Read the article

  • Scaffold default files are the best practice?

    - by antpaw
    Hey, i have some experience with MVC. but I'm new to rails. I'm using the scaffold command to generate some default files. The model looks clean and nice, but the controller and the views aren't really dry. The contents of new.html.erb and edit.html.erb are almost the same and the methods new/edit and create/update are doing almost the same thing. In other frameworks i've used only one view for updating and creating new entries and also the same method in my controller by setting the id as an optional parameter. Do they use this structure to keep things RESTful (i have not much of a clue about rest :()? Is it the best practice to use this default stuff for crud?

    Read the article

  • Can I improve this regex check for valid domain names?

    - by Josh
    So, I have been working on this domain name regular expression. So far, it seems to pick up domain names with SLDs and TLDs (with the optional ccTLD), but there is duplication of the TLD listing. Can this be refactored any further? params[:domain_name].downcase.strip.match(/^[a-z0-9\-]{2,63} \.((a[cdefgilmnoqrstuwxz]|aero|arpa)|(b[abdefghijmnorstvwyz]|biz)| (c[acdfghiklmnorsuvxyz]|cat|com|coop)|d[ejkmoz]|(e[ceghrstu]|edu)|f[ijkmor]| (g[abdefghilmnpqrstuwy]|gov)|h[kmnrtu]|(i[delmnoqrst]|info|int)| (j[emop]|jobs)|k[eghimnprwyz]|l[abcikrstuvy]| (m[acdghklmnopqrstuvwxyz]|me|mil|mobi|museum)|(n[acefgilopruz]|name|net)|(om|org)| (p[aefghklmnrstwy]|pro)|qa|r[eouw]|s[abcdeghijklmnortvyz]| (t[cdfghjklmnoprtvwz]|travel)|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]) (\.((a[cdefgilmnoqrstuwxz]|aero|arpa)|(b[abdefghijmnorstvwyz]|biz)| (c[acdfghiklmnorsuvxyz]|cat|com|coop)|d[ejkmoz]|(e[ceghrstu]|edu)|f[ijkmor]| (g[abdefghilmnpqrstuwy]|gov)|h[kmnrtu]|(i[delmnoqrst]|info|int)| (j[emop]|jobs)|k[eghimnprwyz]|l[abcikrstuvy]| m[acdghklmnopqrstuvwxyz]|mil|mobi|museum)| (n[acefgilopruz]|name|net)|(om|org)| (p[aefghklmnrstwy]|pro)|qa|r[eouw]|s[abcdeghijklmnortvyz]| (t[cdfghjklmnoprtvwz]|travel)|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]))?$/)

    Read the article

  • What explains the term orthogonal in a more non-nerd fashion?

    - by dontWatchMyProfile
    For example: Cardinality and optionality are orthogonal properties of a relationship. You can specify that a relationship is optional, even if you have specified upper and/or lower bounds. This means that there do not have to be any objects at the destination, but if there are then the number of objects must lie within the bounds specified. What exactly does "orthogonal" mean? I bet it's just a fancy soundig nerd-style word for something that could be expressed a lot easier to understand for average people ;) From wikipedia: In mathematics, two vectors are orthogonal if they are perpendicular, i.e., they form a right angle. The word comes from the Greek ????? (orthos), meaning "straight", and ????a (gonia), meaning "angle". Anyone?

    Read the article

  • Web UI for showing like/dislike community comments side-by-side

    - by Justin Grant
    We want to add a comments/reviews feature to our website's plugin gallery, so users can not only vote up or down a particular plugin, but also leave an optional short comment about what they liked or didn't like about it. I'm looking for inspiration, ideally a good implementation elsewhere on the web which isn't annoying to end users, isn't impossibly complex to develop, and which enables users to see both good and bad comments side-by-side, like this: Like: 57 votes Dislike: 8 votes --------------------------------- -------------------------------- "great plugin, saved me hours..." "hard to install" "works well on MacOS and Ubuntu" "Broken on Windows Vista with UAC enabled" "integrates well with version 3.2" More... More... Anyone know a site which does something like this?

    Read the article

  • How can you tell the source of the data when using the Stream.BeginRead Method?

    - by xarzu
    When using the Stream.BeginRead Method, and you are reading from a stream into a memory, how is it determined where you are reading the data from? See: http://msdn.microsoft.com/en-us/library/system.io.stream.beginread.aspx In the list of parameters, I do not see one that tells where the data is being read from: Parameters buffer Type: System.Byte[] The buffer to read the data into. offset Type: System.Int32 The byte offset in buffer at which to begin writing data read from the stream. count Type: System.Int32 The maximum number of bytes to read. callback Type: System.AsyncCallback An optional asynchronous callback, to be called when the read is complete. state Type: System.Object A user-provided object that distinguishes this particular asynchronous read request from other requests.

    Read the article

  • Java: JPA classes, refactoring from Date to DateTime

    - by bguiz
    With a table created using this SQL Create Table X ( ID varchar(4) Not Null, XDATE date ); and an entity class defined like so @Entity @Table(name = "X") public class X implements Serializable { @Id @Basic(optional = false) @Column(name = "ID", nullable = false, length = 4) private String id; @Column(name = "XDATE") @Temporal(TemporalType.DATE) private Date xDate; //java.util.Date ... } With the above, I can use JPA to achieve object relational mapping. However, the xDate attribute can only store dates, e.g. dd/MM/yyyy. How do I refactor the above to store a full date object using just one field, i.e. dd/MM/yyyy HH24:mm?

    Read the article

  • Pagination with multiple searcing criteria in codeigniter

    - by ASD
    By default the pagination links will be 1 and 2 If i use the search criteria, (id name), all the 2 are optional. $config['base_url'] = base_url()."index.php/searchStudent/".$id."/'".$name."'/"; $config['total_rows'] = count($search1); $config['per_page'] = '1';//display perpage $config['num_links'] = 1; $config['full_tag_open'] = ''; $config['full_tag_close'] = ''; $this-pagination-initialize($config); $data['patient_result'] = $this-Student_Model-searchStudent($id,$name,$config['per_page'],$this-uri-segment(3)); But its not working Whats wrong here?

    Read the article

  • Facebook redirect after login not working when url is dynamic

    - by dythffvrb
    This is my code: $loginUrl = $facebook->getLoginUrl(array( 'scope' => 'publish_actions', 'redirect_uri' => 'http://mysite.com/', )); It works but if I remove redirect_uri it doesn't work anymore. $loginUrl = $facebook->getLoginUrl(array( 'scope' => 'publish_actions' )); According to Facebook domcumentation redirect_uri is optional. https://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/ Im trying to redirect the users to the same url they were on before logging in. Update: This problem occurs when the url is mysite.com/post23 but when url is mysite.com/staticpage or mysite.com there are no problems Any workarounds? EDIT: It looks like a bug, it doesn't work with certain url in the same site I wil try and report it to Facebook.

    Read the article

  • How do I set default values on new properties for existing entities after light weight core data migration?

    - by Moritz
    I've successfully completed light weight migration on my core data model. My custom entity Vehicle received a new property 'tirePressure' which is an optional property of type double with the default value 0.00. When 'old' Vehicles are fetched from the store (Vehicles that were created before the migration took place) the value for their 'tirePressure' property is nil. (Is that expected behavior?) So I thought: "No problem, I'll just do this in the Vehicle class:" - (void)awakeFromFetch { [super awakeFromFetch]; if (nil == self.tirePressure) { [self willChangeValueForKey:@"tirePressure"]; self.tirePressure = [NSNumber numberWithDouble:0.0]; [self didChangeValueForKey:@"tirePressure"]; } } Since "change processing is explicitly disabled around" awakeFromFetch I thought the calls to willChangeValueForKey and didChangeValueForKey would mark 'tirePresure' as dirty. But they don't. Every time these Vehicles are fetched from the store 'tirePressure' continues to be nil despite having saved the context.

    Read the article

  • How do negated patterns work in .gitignore?

    - by chrisperkins
    I am attempting to use a .gitignore file with negated patterns (lines starting with !), but it's not working the way I expect. As a minimal example, I have the folllowing directory structure: C:/gittest -- .gitignore -- aaa/ -- bbb/ -- file.txt -- ccc/ -- otherfile.txt and in my gitignore file, I have this: aaa/ !aaa/ccc/ My understanding (based on this: http://ftp.sunet.se/pub//Linux/kernel.org/software/scm/git/docs/gitignore.html) is that the file aaa/ccc/otherfile.txt should not be ignored, but in fact git is ignoring everything under aaa. Am I misunderstanding this sentence: "An optional prefix ! which negates the pattern; any matching file excluded by a previous pattern will become included again."? BTW, this is on Windows with msysgit 1.7.0.2.

    Read the article

  • compiler warning on (ambiguous) method resolution with named parameters

    - by FireSnake
    One question regarding whether the following code should yield a compiler warning or not (it doesn't). It declares two methods of the same name/return type, one has an additional named/optional parameter with default value. NOTE: technically the resolution isn't ambiguous, because the rules clearly state that the first method will get called. See here, Overload resolution, third bullet point. This behavior is also intuitive to me, no question. public void Foo(int arg) { ... } public void Foo(int arg, bool bar = true) { ...} Foo(42); // shouldn't this give a compiler warning? I think a compiler warning would be kind of intuitive here. Though the code technically is clean (whether it is a sound design is a different question:)).

    Read the article

  • How 404 error asp.net mvc 2 IIS 7?

    - by Dmitriy
    Hello! I tried to catch 404 errors like this... But when i try to load http://localhost:11415/wfwe/wefwe/ - all good work. When i try to load http://localhost:11415/order/ - fail (with error The RouteData must contain an item named 'action' with a non-empty string value.) When i try to load http://localhost:11415/Images/ - fail with error File does not exist My routes: routes.Add("Order", new LowercaseRoute("Order/{action}/{id}", new RouteValueDictionary( new { controller = "Order", action = "", id = UrlParameter.Optional }), new MvcRouteHandler())); routes.Add("NotFound", new LowercaseRoute("{*url}", new RouteValueDictionary( new { controller = "Pages", action = "Http404", }), new MvcRouteHandler())); Why route NotFound - don't catch all 404 error. And When i try to upload to my hosting and try 404 i get this error (NotFound route not work at all) 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. I work with this all day, but nothig... please help me

    Read the article

  • how to check an ANTLR token is only used once or less in the parser

    - by Simon Kenyon Shepard
    In Antlr, if I have a rule for example: someRule : TOKENA TOKENB; it would accept : "tokena tokenb" if I would like TOKENA to be optional, I can say, someRule : TOKENA* TOKENB; then I can have : "tokena tokenb" or "tokenb" or "tokena tokena tokenb" but this also means it can be repeated more that once. Is there anyway I can say this token can be there 1 or less times but not more than one? so it would accept: "tokena tokenb" or "tokenb" BUT NOT "tokena tokena tokenb"? Many thanks

    Read the article

  • Maven: Multiple class with the same path implemented in different jar

    - by Phuong Nguyen de ManCity fan
    I'm running into trouble with having multiple class with the same path (i.e. same name, same package!!!). For some reason, gwt-dev comes with its own version of org.apache.xerces.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory. At the same time, spring also depends on these classes but from different jar. I don't know what should be, but look like xalan & xml-api are the two dependencies that spring depends on (these dependency are optional) Funny thing is that eclipse can run the same code (it's a unit test) without problem, but surefire cannot. So I guess the problem is due to the way each runner consider the priority of each jar. Now come to the question: How can I setup my POM so that I can sure that when ever any code running inside my app, then class from a jar will be selected over class from other jar? Thanks.

    Read the article

  • Making id'less url in asp.net mvc razor

    - by Sushant
    I am working with URL routing , and have some issues. I want my url to be like this: www.domain.com/p/myproduct But I also want to be able to retrieve the ID of the product, without accessing the database. I thought about having a URL like: www.domain.com/p/myproduct/1 But if I could hide the ID it would be better. So, how do I do it the simplest way? Currently my Global.asax has the following route: routes.MapLocalizedRoute("Product", "p/{productId}/{SeName}", new { controller = "Catalog", action = "Product", SeName = UrlParameter.Optional }, new { productId = @"\d+" }, new[] { "Nop.Web.Controllers" });

    Read the article

  • Are indivisible operations still indivisible on multiprocessor and multicore systems?

    - by Steve314
    As per the title, plus what are the limitations and gotchas. For example, on x86 processors, alignment for most data types is optional - an optimisation rather than a requirement. That means that a pointer may be stored at an unaligned address, which in turn means that pointer might be split over a cache page boundary. Obviously this could be done if you work hard enough on any processor (picking out particular bytes etc), but not in a way where you'd still expect the write operation to be indivisible. I seriously doubt that a multicore processor can ensure that other cores can guarantee a consistent all-before or all-after view of a written pointer in this unaligned-write-crossing-a-page-boundary situation. Am I right? And are there any similar gotchas I haven't thought of?

    Read the article

  • What you need BEFORE you submit your iPhone app to Apple

    - by Patty
    When submitting a new app to the iPhone app store, which of these are mandatory, and which are optional? (Free apps... or paying apps.) A bank account with direct deposit access. An email address to give out to the public. An email address for Apple to contact me. A support website. A company name. A support phone number for the public. A phone number for Apple to call me. My full name given out to the public.

    Read the article

  • Similar route mapping

    - by Denis Agarev
    I need to map to create controller what must response to two urls: "http://localhost/api/controller?id=1" (where only id value can change) "http://localhost/api/controller/anotherId/someconst" (where anotherId is the only one changing part) i map it to such route: routes.MapHttpRoute("Test", "api/{controller}/{id}/{someconst}", new { controller = "Test", someconst = RouteParameter.Optional }); And have to methods in my controller: public void Get(int id) { ... } public void Get(int anotherId, string someconst ) { ... } It works...But it doesn't look nice...cause "string someconst" is not a param, it's just a const part of url. But if i remove "string someconst" param second url wouldn't work. Is it possible to map one controller to two routes to resolve this urls to make it clear without fake param which is a const in fact?

    Read the article

  • What languages allow cross-platform native executables to be created?

    - by JT
    I'm frustrated to discover that Java lacks an acceptable solution for creating programs that will run via double-click. Other than .NET for Windows, what modern and high-level programming languages can I write code in that can be compiled for various platforms and run as a native/binary in each (Windows, Linux, OSX (optional)) Assuming I wanted to write code in python, for instance, is there a cohesive way that I could distribute my software which wouldn't require users to do anything special to get it to run? I want to write and distribute software for computer-illiterate and Java has turned out to be a real pain in this respect.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >