Search Results

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

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

  • Is it possible to use an input within a <label> field?

    - by javanix
    I have a bunch of optional "write-in" values for a survey I'm working on. These are basically a radio button with a textbox within the answer field - the idea being that you would toggle the button and write something into the box. What I'd like to do is have the radio button toggled whenever a user clicks in the text field - this seems like a use-case that makes a lot of sense. Doing this: <input type="radio" id="radiobutton"><label for="radiobutton">Other: <input type="text" id="radiobutton_other"></label> works fine in Chrome (and I am guessing, other WebKit browsers as well), but there are weird selection issues in Firefox, so I'm assuming its a non-standard practice that I should stay away from. Is there a way to replicate this functionality without using JavaScript? I have an onclick function that will work, but we're trying to make our site usable for people who might have NoScript-type stuff running.

    Read the article

  • MVC4 link automatically redirected to default INDEX page/action even if defined action name with controller

    - by Raj Tamakuwala
    i am creating web mobile application in mvc4. My problem is when I click on particular link in my application,it works well, but sometimes it automatically redirected to INDEX page that is set as default page in global.asax as routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); Now I don't know why its automatically redirected to INDEX page,even if I have already defined controller and action name where it show redirected as, <a href='@(Url.Action( "ActivityWall", "Home"))' > </a> logically it should redirect to "ActivityWall" page,which it does.but sometime only it goes to INDEX page.then when I clear my cookie problem will again solved but after some time it again start redirecting to INDEX page. I also posted question related to cookies issue yesterday,but I think that is nit main issue. can someone help please ?

    Read the article

  • C#: how to update winform from thread?

    - by JackN
    A C# thread (Read()) causes System.NotSupportedException when it tries to update a winform based on received content. The full error message is Read() System.NotSupportedException: An error message cannot be displayed because an optional resource assembly containing it cannot be found at Microsoft.AGL.Common.MISC.HandelAr() at System.Windows.Forms.ProgressBar._SetInfo() at System.Windows.Forms.ProgressBar.set_Value() at ...ProcessStatus() at ...Read() The Build/Target Environment is: Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE. Is the problem writing to the ProgressBar from a Thread? If so, what is the correct C#/winforms method to update a ProgressBar from a Thread? In this application the Read() Thread is continuous: it is started when the application starts and runs forever. void ProcessStatus(byte[] status) { Status.Speed = status[5]; var Speed = Status.Speed/GEAR_RATIO; Status.Speed = (int) Speed; progressBarSpeed.Value = Status.Speed; ...

    Read the article

  • Poll: Require Semicolons and Forbid Tables?

    - by George Bailey
    There are a few very serious but opinionated and subjective arguments that I know of. Two of them are Whether or not to use semicolons in the event they are optional. There is a vote as here that also includes reasons Whether or not to use tables for non tabular data. There more information here Since the semicolon question arises often in JavaScript and the tables thing in HTML then there are probably many who run into both. I sort of expect a person who is strict with semicolons also to be strict about avoiding tables. I will post four CW answers here to vote on. Please vote what you think is right. If you want to talk about the reasons then please use Semicolons: Do you recommend using semicolons after every statement in JavaScript? Tables: Start your own question under the polls tag and follow the design of the semicolons question.

    Read the article

  • Range annotation between nothing and 100?

    - by aticatac
    Hi I have a [Range] annotation that looks like this: [Range(0, 100)] public int AvailabilityGoal { get; set; } It works as it should, I can only enter values between 0 and 100 but I also want the input box to be optional, the user shouldn't get an validation error if the input box is empty. If the user leaves it empty it should make AvailabilityGoal = 0 but I don't want to force the user to enter a zero. I tried this but it (obviously) didn't work: [Range(typeof(int?), null, "100")] Is it possible to solve this with Data Annotations or in some other way? Thanks in advance. Bobby

    Read the article

  • Trouble Avoiding Microsoft Outlook's Email Warning

    - by talbright
    I have a set of records in Microsoft Access that I am trying to send in an Email. The email feature works great. Except a warning message pops up every time a message is ready to send, and the user has to click "Allow" or "Deny" for every email sent. I looked up a workaround, and have been following the tutorial for it: http://www.everythingaccess.com/tutorials.asp?ID=Outlook-Send-E-mail-Without-Security-Warning. My problem is that when I put my message in the function it always returns false, and the message fails. Any help would be appreciated. Dim sendMail As Boolean Dim strMessage As String strMessage = Some Message sendMail = FnSafeSendEmail(![Email Id], "Subject", strMessage) The entire "FnSafeSendEmail" function can be found in the link provided. These are the parameters though. Public Function FnSendMailSafe(strTo As String, _ strCC As String, _ strBCC As String, _ strSubject As String, _ strMessageBody As String, _ Optional strAttachments As String) As Boolean The error is thrown on this line of the function. Dim blnSuccessful As Boolean blnSuccessful = objOutlook.FnSendMailSafe(strTo, strCC, strBCC, _ strSubject, strMessageBody, _ strAttachmentPaths)

    Read the article

  • Detect whether certain IIS features are present from InstallScript

    - by Christian Hayter
    I have an InstallScript project written in InstallShield 2010, which, amongst other things, shells out to several .NET MSI installers that install web apps. If any of these web apps are selected for installation by the end user, I need to check for the following optional IIS features from InstallScript code before allowing the install to proceed: ASP.NET (IIS 6+) WCF HTTP Activation (IIS 7+) IIS Metabase and IIS 6 configuration compatibility (IIS 7+) Can anyone point me in the right direction please? Ideally I'm looking for registry values that I can check directly from InstallScript code, but I guess some kind of WMI or COM check would be OK as well. PS: In case it's relevant, we need to support all versions of IIS from 5.1 onwards at this time. If 5.1 support is a problem, we may consider dropping it if we have to.

    Read the article

  • Core Data and BOOL setup

    - by John Valen
    I am working on an app that uses Core Data as its backend for managing SQLite records. I have everything working with strings and numbers, but have just tried adding BOOL fields and can't seem to get things to work. In the .xcdatamodel, I have added a field to my object called isCurrentlyForSale which is not Optional, not Transient, and not Indexed. The attribute's type is set to Boolean with default value NO. When I created the class files from the data model, the boilerplate code added for this property in the .h header was: @property (nonatomic, retain) NSNumber * isCurrentlyForSale; along with the @dynamic isCurrentlyForSale; in the .m implementation file. I've always worked with booleans as simple BOOLs. I've read that I could use NSNumber's numberWithBool and boolValue methods, but this seems like an aweful lot of extra code for something so simple. Can the @property in the header be changed to a simple BOOL? If so is there anything to watch out for? Thanks -John

    Read the article

  • Excel, VBA Vlookup, multiple returns into rows

    - by Sean Mc
    Very new to VBA, so please excuse my ignorance. How would you alter the code below to return the result into rows as opposed to a string? Thanks in advance.... data Acct No CropType ------- --------- 0001 Grain 0001 OilSeed 0001 Hay 0002 Grain function =vlookupall("0001", A:A, 1, " ") Here is the code: Function VLookupAll(ByVal lookup_value As String, _ ByVal lookup_column As range, _ ByVal return_value_column As Long, _ Optional seperator As String = ", ") As String Application.ScreenUpdating = False Dim i As Long Dim result As String For i = 1 To lookup_column.Rows.count If Len(lookup_column(i, 1).text) <> 0 Then If lookup_column(i, 1).text = lookup_value Then result = result & (lookup_column(i).offset(0, return_value_column).text & seperator) End If End If Next If Len(result) <> 0 Then result = Left(result, Len(result) - Len(seperator)) End If VLookupAll = result Application.ScreenUpdating = True End FunctionNotes:

    Read the article

  • How to get null when use head funtion with a empty list in cypher?

    - by PeaceMaker
    I have a cypher query like this. START dep=node:cities(city_code = "JGS"), arr=node:cities(city_code = "XMN") MATCH dep-[way:BRANCH2BRANCH_AIRWAY*0..1]->()-->arr RETURN length(way), transfer.city_code, extract(w in way: w.min_consume_time) AS consumeTime The relationship named "way" is a optional one, so the property named "consumeTime" will be a empty list when the relationship "way" not exsit. The query result is: | 0 | "JGS" | [] | | 1 | "SZX" | [3600] | When I want to use the head function with the property "consumeTime", it return a error "Invalid query: head of empty list". How can I get a result like this? | 0 | "JGS" | null | | 1 | "SZX" | 3600 |

    Read the article

  • How do you design a database to allow fast multicolumn searching?

    - by Fletcher Moore
    I am creating a real estate search from RETS data, but this is a general question. When you have a variety of columns that you would like the user to be able to filter their search result by, how do you optimize this? For example, http://www.charlestonrealestateguide.com/listings.php has 16 or so optional filters. Granted, he only has up to 11,000 entries (I have the same data), but I don't imagine the search is performed with just a giant WHERE AND AND AND ... clause. Or is this typically accomplished with one giant multicolumn index? Newegg, Amazon, and countless others also have cool & fast filtering systems for large amounts of data. How do they do it? And is there a database optimization reason for the tendency to provide ranges instead of empty inputs, or is that merely for user convenience?

    Read the article

  • Using regular expression to trim html

    - by Tim
    Been trying to solve this for a while now. I need a regex to strip the newlines, tabs and spaces between the html tags demonstrated in the example below: Source: <html> <head> <title> Some title </title> </head> </html> Wanted result: <html><head><title>Some title</title></head></html> The trimming of the whitespaces before the "Some title" is optional. I'd be grateful for any help

    Read the article

  • Please help clarify my regex pattern

    - by Dmitriy Sosunov
    I have the following string: <script>m('02:29:1467301/>Sender1*>some text message?<<02:29:13625N1/>Sender2*>Recipient2: another message??<>A<<02:29:1393100=>User1*|0User2*|%></B><<','');</script> N.B. messages are separated by << I need extract from message the following parts: 1. Time 2. Sender 3. Recipient 4. Text Recipient may being defined or not, this field is optional. I do this by the following pattern: (?<message>(?<time>\d{1,2}:\d{1,2}:[0-9a-z]+)/>(?<messageData>(?<sender>.+?)\*>(.+?)))<< But, I cannot extract recipient separately from the message text. (?<message>(?<time>\d{1,2}:\d{1,2}:[0-9a-z]+)/>(?<messageData>(?<sender>.+?)\*>(((?<recipient>.+?):){0,1}(?<messageText>.+?))))<< Please help correct my pattern.

    Read the article

  • Fluent Nhibernate left join

    - by Ronnie
    I want to map a class that result in a left outer join and not in an innner join. My composite user entity is made by one table ("aspnet_users") and an some optional properties in a second table (like FullName in "users"). public class UserMap : ClassMap<User> { public UserMap() { Table("aspnet_Users"); Id(x => x.Id, "UserId").GeneratedBy.Guid(); Map(x => x.UserName, "UserName"); Map(x => x.LoweredUserName, "LoweredUserName"); Join("Users",mm=> { mm.Map(xx => xx.FullName); }); } } this mapping result in an inner join select so no result come out is second table as no data. I'd like to generate an left join. Is this possible only at query level?

    Read the article

  • CoreData could not fulfill a fault when adding new attribute

    - by cagreen
    I am receiving a "CoreData could not fulfill a fault for ..." error message when trying to access a new attribute in a new data model. If I work with new data I'm ok, but when I attempt to read existing data I get the error. Do I need to handle the entity differently myself if the attribute isn't in my original data? I was under the impression that Core Data could handle this for me. My new attribute is marked as optional with a default value. I have created a new .xcdatamodel (and set it to be the current version) and updated my NSPersistentStoreCoordinator initialization to take advantage of the lightweight migration as follows: NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; NSError *error = nil; persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } Any help is appreciated.

    Read the article

  • Proper abstraction of the database tier in a 3 tier system?

    - by Earlz
    Hello, I am creating a 3 tier application. Basically it goes Client - (through optional server to be a thin-client) - Business Logic - Database Layer And basically making it so that there is never any skipping around. As such, I want for all of the SQL queries and such to be in the Database Layer. Well, now I'm a bit confused. I made a few static classes to start off the database tier but what should I do for the database connections? Should I just create a new database connection anytime I enter the Database Layer or would that be wasteful? Does Connection.Open() take time whenever you have a ConnectionPool? To me, it just feels wrong for the Business tier to have to pass in a IdbConnection object to the Database tier. It seems like the Database tier should handle all of that DB-specific code. What do you think? How can I do it the proper way while staying practical?

    Read the article

  • ASP MVC dynamic fields in editor

    - by Michael Pardo
    I have a form which will include some optional questions that need to asked of the user. In my model it may look like pubic Dictionary<String, String> Questions { get; set; } where the key is the label and value is the text box. How can I create and populate controls for this? I'm new to ASP MVC, but it makes sense that something like this would be built in. Is there a built in way to do this, or do I have to implement it myself? It seems like there should be a helper for it, since you don't really want to put this kind of code in the view. I've tried Html.EditorFor(model => model.Questions); but it just spits out "[key, value]" to the view.

    Read the article

  • How can I prevent MEF from throwing an exception when an Export is not found?

    - by Kilhoffer
    I have a class with an IList<T> property decorated with the [ImportMany(allowRecomposition = true)] attribute. There are some conditions in which the application might not find any available Exports of the requested type. Right now, it's throwing a CompositionException if no Exports of the requested type are found. I dislike application flow being determined by thrown exceptions, so I would rather not catch and react in this case. Rather, I just want program execution to continue. Is there a flag or something I can set to make this Import optional? I know for single import properties, you can do this: [Import(AllowDefault = true)] but 'AllowDefault' is not an option on the ImportMany attribute.

    Read the article

  • Building a NSPredicate for a filter

    - by John
    Hi, Just wondering what the best way to build a NSPredicate is if some filters are optional? This is basically for a filter, so if some options aren't selected I don't to filter by them eg. If I have option1 and option2 set for the filter. NSPredicate* predicate = [NSPredicate predicateWithFormat:@"option1 = %@ AND option2 = %@] .... otherwise if just option1 NSPredicate* predicate = [NSPredicate predicateWithFormat:@"option1 = %@] .... The key being there are 10 different options to filter, so I don't want to have to code for the 10x10 possible combinations. Thanks

    Read the article

  • Will .NET 4.0 apps work on Win 2008 R2 Server Core?

    - by markus
    When Windows Server 2008 R2 was launched, the "server core" edition started to become useful to me, because it lets me deploy .NET background applications isolated on their own virtual machine instance with only a small fraction of all the disk space overhead of a default Windows Server installation, and very few Windows Updates. It comes with a subset of .NET 3.5 SP1 integrated (as an optional feature). Now that .NET 4.0 is released, the redistributables explicitly state that it's not support on Server Core. Any chance that there will be a separate download available for Server Core (e. g. without WPF) any time soon, has anybody heard about it?

    Read the article

  • Java JPA @OneToMany neededs to reciprocate @ManyToOne?

    - by bguiz
    Create Table A ( ID varchar(8), Primary Key(ID) ); Create Table B ( ID varchar(8), A_ID varchar(8), Primary Key(ID), Foreign Key(A_ID) References A(ID) ); Given that I have created two tables using the SQL statements above, and I want to create Entity classes for them, for the class B, I have these member attributes: @Id @Column(name = "ID", nullable = false, length = 8) private String id; @JoinColumn(name = "A_ID", referencedColumnName = "ID", nullable = false) @ManyToOne(optional = false) private A AId; In class A, do I need to reciprocate the many-to-one relationship? @Id @Column(name = "ID", nullable = false, length = 8) private String id; @OneToMany(cascade = CascadeType.ALL, mappedBy = "AId") private List<B> BList; //<-- Is this attribute necessary? Is it a necessary or a good idea to have a reciprocal @OneToMany for the @ManyToOne? If I make the design decision to leave out the @OneToMany annotated attribute now, will come back to bite me further down.

    Read the article

  • Simple ASP.NET MVC Routing question

    - by Robert
    Hi there, I have two pages in my simple MVC App with two defined routes: routes.MapRoute( "Results", // Route name "Results/{id}", // URL with parameters new { controller = "Results", action = "Index", id = "" } // Parameter defaults ); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Main", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); I needed to have the results page load with just a product ID such as this: [MyDomain....]/Results/12345. But also the main page does a POST (using JQuery) to the Results Controller for updates using this route: [MyDomain....]/Main/Update along with a data bag. This works fine when I only have the "Default" route. But when I added the other "Results" route, all the POST calls to update are failing. Any ideas what I'm doing wrong??? Thanks a lot.

    Read the article

  • Allowing developer-specific settings in VS2008 projects

    - by Xavier Nodet
    Is it possible to combine the following properties, and if so, how? Store in our version control system some Visual Studio 2008 native C++ project files for the developers in our team that use this IDE. Allow some of those developers to tweak their projects (e.g. using debug version of third-party libraries instead of the usual ones). Make sure these modifications are done in files that are not versioned. In other words, I would like to allow developers to tweak some settings in their projects without risking that these changes are committed. An 'optional VSPROP' file approach seems doomed to fail, as VS2008 refuses to load projects that refer to non-existent VSPROP files... Any other suggestion? Is this possible with VS2010?

    Read the article

  • How can I make a Jeditable (jQuery) span activate editing on more than one event?

    - by JonathanHayward
    For the jQuery extension Jeditable, one of the parameters that can be specified is which DOM event will turn a div/span/... into a text input/textarea/... I would like to have more than one event serve as a trigger; that is, I would like either a click event or a contextmenu event to turn a span into an in-place edit area. Is there a graceful way to do this without forking Jeditable? --edit-- An example of code specifying the event is below. The parameter is optional, defaulting to a regular click. $(".edit_rightclick").editable("/ajax/save", { cancel: "Cancel", submit: "OK", tooltip: "Right click to edit.", event: "contextmenu", }); Calling twice, once for the regular click event with the event unspecified, and one for the contextmenu event (right-click if there are no switched mouse buttons or anything like that) does not seem to produce the intended effect of an element becoming editable in place on a click from either mouse button.

    Read the article

  • How does one search/poll all modal info in a frame automatically?

    - by user310631
    As you'll no-doubt be able to tell momentarily, I have little knowledge of the programming world. That being said, here goes.... In this scenario, there's a Java-based game that has a map of the game world oriented in an X, Y coordinate tile system. Some of the grid tiles are player cities, some are non-player locations. The game runs inside a frame in the browser, the X, Y coordinate map feature is one optional view, and the entire map is not available to view at any one time. Each grid tile has an "Onclick" event and an "Onmouseover" event. The mouseover event is a tooltip, the click event is something called a "modal" that has information specific to that tile. What I'd like to find out is: How can I poll all the grid tiles' "modal" information using some kind of script or other auto-running polling feature?

    Read the article

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