Posts

c# - ASP.Net MVC 4 scaffolding complex types -

i have complex model. want create create, edit, list, etc. forms it. class contains many objects other classes. example in "create" form, want form able data classes , fill necessary tables. how can achieve that? sample of class this: public class buildingpermit { [key] [databasegeneratedattribute(databasegeneratedoption.identity)] public int id { get; set; } public permit permitinfo { get; set; } public datetime registereddate { get; set; } public int realstateid { get; set; } public virtual person owner{ get; set; } } when use "scaffolding", classes person or permit above getting ignored , fields system types only.

sas - Proc Import. Importing Character values as "Blank" from excel files -

i trying import multiple excel files using code below. there column in each excel file has both numeric , text values proc import importing numeric values, , put text values blank ('.'). can me issue? much. %let subdir=s:\temp\; filename dir "&subdir.*.xls"; data new; length filename fname $ 32767; infile dir eof=last filename=fname; input ; last: filename=fname; run; proc sort data=new nodupkey; filename; run; data null; set new end=last; call symputx(cats('filename',_n_),filename); call symputx(cats('dsn',_n_),scan(scan(filename,7,'\'),1,'.')); if last call symputx('nobs',_n_); run; %put &nobs; %macro import; %do i=1 %to &nobs; proc import datafile="&&filename&i" out=&&dsn&i dbms=excel replace; sheet = "sheet1"; getnames=yes; mixed=yes; run; %end; %mend import; %import the best way control data types in imported excel ...

python - django modelmultiplechoicefield and widget checkboxselectmultiple -

i have admin interface. here code form: class newrolefrom(forms.form): role = forms.modelmultiplechoicefield( queryset=role.objects.all(), widget=forms.checkboxselectmultiple ) so, it's simple, have role label(role:) each role in database rendered checkbox. can role objects choosen user. @ begining of each line have bullet, how can remove it? possible add on each others attribute when define list_display in admin.py ? in form template iterate on roles form.html {% role in form.role %} <div class="checkbox"> {{ role }} </div> {% endfor %} then pretty css.

arrays - Program returns incorrect values (C++) -

i've wrote simple code play around 2 dimensional arrays, aim of code being solve 2 linear simultaneous equations using matrix method (expressing coefficients in square matrix, computing inverse, multiplying inverse output of each of equations find results of 2 variables). there no warnings when code compiles, so, have no idea problem be. #include <iostream> using namespace std; double determinant(double parametermatrix[2][2]) { return parametermatrix[1][1] * parametermatrix[2][2] - parametermatrix[1][2] * parametermatrix[2][1]; } void invertmatrix (double parametermatrix[2][2], double inversematrix[2][2]) { double parameterdeterminant = determinant(parametermatrix); inversematrix[1][1] = parametermatrix[2][2] / parameterdeterminant; inversematrix[1][2] = - parametermatrix[1][2] / parameterdeterminant; inversematrix[2][1] = - parametermatrix[2][1] / parameterdeterminant; inversematrix[2][2] = parametermatrix[1][1] / parameterdeterminant; } ...

sling - Java do while loop to for each or for loop -

i'm pretty new java , trying figure out how convert below code loop or each loop. do { testpages.push(testparentpage); if(homepage != null && testparentpage.getpath().equals(homepage.getpath())){ isparent = true; break; } } while((testparentpage = testparentpage.getparent()) != null); any appreciated! thanks! it can rewritten in loop this: for (; testparentpage != null; testparentpage = testparentpage.getparent()) { testpages.push(testparentpage); if(homepage != null && testparentpage.getpath().equals(homepage.getpath())){ isparent = true; break; } } thought must admit don't know if serves benefit.

html - How do I make a div NOT follow me as I scroll? -

i have description box on blog stuck. follows you scroll , rather long description box doesn't show whole thing on page unless "ctrl + minus" , since follows way scroll, doesn't scroll down description box see whole length of description box. can edit make not stuck? i'm not great html take out css says position: fixed on block. that's best guess without seeing html/css

Is is possible to update APK and Store Listing before Publish in the NEW Android Developer Console? -

the "new developer console" standard users. must deal changes in behavior old console. used able upload , release apk update , update store listing in 1 step. cannot figure out how in new console. this tried: i uploaded apk using "simple mode", prompted "publish now" before getting chance change store listing (e.g. recent changes). i changed "advanced mode" , able upload apk , save draft. tried access store listing, said not save changes since had archived or reactivated 1 or more apks. i changed tactics. started going store listing , modified recent changes. tried going apk area upload new version , says can't save store listing without publishing. am missing something? please explain. i noticed same thing new developer console. however, doesn't matter don't let publish both @ same time since takes couple hours before store updates changes anyways. when see store update changes, see update of changes @ once,...