Posts

MS-Access VBA Date() works on one PC but not others -

i designing first database ground , have learned lot in last few weeks. 1 thing has been eating @ me though on login page have simple unbound text box control source =date() . this works on computer use days, other computer in facility working out of displays #name? instead of date. i have tried changing =now() , works fine on computers. apparently =date() has issues. if fields control source changed =date() informed the function entered can't used in expression . i have checked ms-access versions , tried on machines , without access. i need date() work because used elsewhere in more vital areas of code , may not able use now() in place. ideas why may not work on pc besides own? date() controlled visual basic applications x.xx reference. make sure reference installed , competing references removed. to this, open vba window , go tools --> references , ensure proper 1 checked.

c# - How to get the decorator objects from inside the decorated method -

in asp.net mvc 4 controller class have actions decorate customauthorize attribute access restricted roles. i roles inside action methods , need customauthorize attribute method decorated with. how do this? sample code of trying below: public class testcontroller : controller { // users in viewer , admin roles should [customauthorize("viewer", "admin")] public actionresult index() { //need customauthorizeattribute associated roles } } customauthorizeattribute subclass of system.web.mvc.authorizeattribute . if want attribute method can this, example reflection: var atrb = typeof(testcontroller).getmethod("index") .getcustomattributes(typeof(customauthorizeattribute), true) .firstordefault() customauthorizeattribute; or current method; var atrbcurrentmethod = system.reflection.methodbase.getcurrentmethod() .getcustomattributes(typeof(customauthorizeattribute)...

asp.net mvc - ?: and ?? Operators with Entity Framework -

why these operators not work within these examples? person.cityname = personinfo.cities.cityname ?? "-"; or person.cityname = personinfo.cities.cityname == null ? "-" : personinfo.cities.cityname; view generates system.nullreferenceexception. if not allowed advice? if cityname column nullable, should check hasvalue property follows. , if like, can check if either personinfo or personinfo.cities null. person.cityname = personinfo != null && personinfo.cities != null && personinfo.cities.cityname.hasvalue ? personinfo.cities.cityname.value : "-";

java - Get back to the default Tomcat error page on a redirected error page -

i building java web app using tomcat. using this: <error-page> <error-code>500</error-code> <location>/error.jsp</location> </error-page> in web.xml , redirect user-friendly error page, if server respond error. i want put link on user-friendly error.jsp page (name technical spec), when user clicks it, he/she gets original tomcat error page. is possible achieve ? if yes, how go doing that? i don't know if it's possible can still access error/exception's tech details on redirected page check post you'll find details on below: if declare <%@page iserrorpage="true" %> in top of error.jsp, have access thrown exception (and of getters) ${exception} in el.

c# - Casting Error on FileQueryConnection in Infopath 2013 Code -

i've been working on infopath form migrate infopath 2007 infopath 2013. bind data dropdownlist controls filequeryconnection has been used. // retrieve data connection bound manager drop-down list box filequeryconnection institutionconnection =(filequeryconnection)dataconnections[externalusersdc]; // returned owssvr.dll filter on external users of institution institutionconnection.filelocation = getfilelocation(currentsite, externalusersguid, externaluserinstitution, institution); // query data connection fill manager drop-down list box items institutionconnection.execute(); here externalusersdc name of infopath connection file. getfilelocation method gets list physical location works fine expected. casting error occurs while trying dataconnection filequeryconnection. error message follows; unable cast object of type 'microsoft.office.infopath.internal.sharepointlistadapterrwqueryadapterhost' type 'microsoft.office.infopath.filequeryconnection i...

python - how to display uploaded image with FileField in django template -

i'm learning django , i'm trying create simple upload site. figured out should use django filefield purpose want know how display images uploaded using field on index page using django template . know can use imagefield in case i'm trying know if possible filefield ? <img src="{{fileobj.url}}"/>

angularjs - Use angular in laravel views -

this firs question here i ve been trying find solution these days. i m building multi-page website , i d use angular front-end. i ve seen of people have issue of combining angular syntax laravel s i d know if it s possible include angular 1 of laravel s views without having re-route angular.html page angular directory. want know if there s way use angular directly "route::get('test', 'controller@gettest')" problem when set response on controller page( return view('pages.test')->with(array('1' => $1, '2' => $2)); ) angular scope method gets data whole , it s hard target array 1 example use in angularcontroller hope makes sense.... in advance!