Posts

asp.net mvc - MVC RememberMe Validation Glitch -

in mvc project validator unintentionally requires rememberme checkbox checked upon logging in. on ie8, not allow user login unless tick remember me box. other browsers fine including ie7. <input id="rememberme" type="checkbox" value="true" name="rememberme" data-val-required="the remember me? field required." data-val="false"> i tried change property in entity framework nullable bool? produces error: the best overloaded method match 'webmatrix.webdata.websecurity.login(string, string, bool)' has invalid argument so, doesn't able change fix issue. have tried on writing property jquery gets changed back. random , i'm suprised got on looked out of box technology. appreciated. here login model: public class loginmodel { [emailaddressattribute] [required] [stringlength(80)] [display(name = "email address")] public string username { get; set; } [required] ...

JQuery UI - Datepicker - Display date in another element -

i have following code on codepen. http://codepen.io/anon/pen/pnyvg my aim allow users input own dates , gets outputted element in more readable format e.g. type date or choose date, , display date in paragraph tag in following format "wednesday 7th august". also, have few additional pieces of functionality require, awesome if give me direction; once date outputted paragraphs each input, output number of nights in between 2 dates element be able use same date picker both inputs. similar behaviour used on following form; http://www.hipmunk.com/hotels-search it great if guys me out. thanks in advance, b look here started: $(function() { $( "#datepicker" ).datepicker({ altfield: "#alternate", altformat: "dd, d mm, yy" }); });

Copy Database in assets to data/database work in emulator but not work in device -

i have code: working in emulator fail in devices. want copy database stored in assets data/data/.... when load app apears "error file" (filenotfoundexception e) -> error public void copiardb() { try { string destpath = "/data/data/" + getpackagename() + "/databases/mibd"; file f = new file(destpath); if (!f.exists()) { copydb(getbasecontext().getassets().open("datosejer"), new fileoutputstream(destpath)); } } catch (filenotfoundexception e) { e.printstacktrace(); toast.maketext(mainactivity.this, "error file", toast.length_short) .show(); } catch (ioexception e) { e.printstacktrace(); toast.maketext(mainactivity.this, "error io", toast.length_short) .show(); } adaptadorbd db = new adap...

c# - Formatting of detail section in SAP Crystal Report -

Image
i using sap crystal report in wpf , want formatting (bold, color) of detail section’s last record of every group. is possible, please help. use snippet in formatting formulas. onlastrecord //if last record in report next() not work or next({table.group_field}) <> {table.group_field} //the next record starts new group for example, if wanted change last detail section's background color yellow in each group, use formatting formula: if (onlastrecord or next({table.group_field}) <> {table.group_field}) cryellow else crnocolor

orm - How to set default values for foreign keys in Entity Framework code-first models -

i'm using entity framework 5, code-first. i have poco looks this: public class order { public int id { get; set; } public string name { get; set; } public virtual status status { get; set; } public order() { this.status = new status() { id = 1 } } } this mapped fluently like: public class ordermap : entitytypeconfiguration<order> { public ordermap() { totable("order"); haskey(x => x.id); property(x => x.id); property(x => x.name).isrequired(); hasrequired(x => x.status) .withmany(x => x.orders) .map(x => x.mapkey("statusid")); } } in database, order table has default value of statusid set 1 . however, when adding new order , error: violation of primary key constraint 'status_pk'. cannot insert duplicate key in object 'dbo.status'. duplicate key value (1) if remove assignment status in order ctor, instead: cannot insert value null co...

How do modules work in Python? -

i wondering how module work in python.for example have code import requests r = requests.get("http://www.google.com") print r.status_code now according understanding, requests module should have python file containing class called "get" , within "get" class there must member variable called "status_code" when create object "r", variable status_code it. however, when looked @ files come in package, not find class named "get". find function called "get", under class called "response". since did not create object instance of "response" class, how can access "get" function inside it? i think missing key concept here, can point out me please? thanks when import requests file __init__.py is executed, if examine file in case, find line: from .api import request, get, head, post, patch, put, delete, options which means api.py importing get() function: def get(url,...

blackberry - Does porting Android application to BB 10 causes performance issues? -

i new blackberry 10 development. reading of documents understand possible port android applications bb 10. in fact way 1 can develop apps bb 10 using java language. i wonder porting apps ever cause performance issues in bb 10. client particular performance of application developing. can of experts here tell me whether there chance ported application slow in bb 10? thank in advance. awaiting reply jayakrishnan salim regarding performance, no issue reported. works fine, on mid-end android 2.3 device. however, not not every application can ported, restrictions applies: in particular, application can't contain native (c/c++) code.