Posts

html - Bootstrap 3 Vertical Alignment Across Multiple Rows and Columns -

Image
i new bootstrap. started project , came across challenge regarding vertical alignment bootstrap's grid system. community of experts able shed light , assist solution. to better illustrate issue, have taken 4 screenshots (links attached @ bottom) each of lg, md, sm, , xs scenarios. hope images make sense you. the problem is, while lg scenario looks great , aligned properly, viewport changes, content of 2 columns start show misalignment. here html markup: <div class="container"> <div class="row row-centered"> <div class="col-sm-6 col-md-6 col-lg-6"> <div class="row row-centered"> <div class="hidden-xs hidden-sm hidden-md hidden-lg"></div> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <h2>header number 1</h2> </div> ...

android - Snackbar shown along with Toast -

i using google's design support library show snackbars. after compile apk , run on phone (nexus 5), snackbar shown along toast. running directly android studio works fine (only snackbar shown). appreciated. how can disable toast , show snackbar how can disable toast , show snackbar simply not use toast. not show itself.

python - Matplotlib Mollweide/Hammer projection: region of interest only -

Image
i wondering if there's way show region of interest plot based on mollweide/hammer projection in basemap (matplotlib). i trying set plot-bounds pacific plate, in link below. however, set_xlim , set_ylim functions not seem have effect. in advance guidance. http://geology.gsapubs.org/content/29/8/695/f1.large.jpg from documentation, both hammer , mollweide projections don't allow print out entire world maps. here's code using polyconic projection, bounded straight lines. trick here define corner longitude , latitudes on creation. from mpl_toolkits.basemap import basemap import matplotlib.pyplot plt import numpy np my_map = basemap(projection='poly', lat_0=0, lon_0=-160, resolution = 'h', area_thresh = 0.1, llcrnrlon=140, llcrnrlat=-60, urcrnrlon=-100, urcrnrlat=60) plt.figure(figsize=(16,12)) my_map.drawcoastlines() my_map.drawcountries() my_map.fillcontinents(color='coral', lake_color='aqua') my_map.drawmapb...

html - PHP multiply each value in the array by an additional argument -

i trying create php function multiplies values/content of array given argument. modify function can pass additional argument function. function should multiply each value in array additional argument (call additional argument 'factor' inside function). example $a = array(2,4,10,16). when say $b = multiply($a, 5); var_dump($b); should dump b contains [10, 20, 50, 80 ] here's code far: $a = array(2, 4, 10, 16); function multiply($array, $factor){ foreach ($array $key => $value) { echo $value = $value * $factor; } } $b = multiply($a, 6); var_dump($b); any idea? thanks! your function not right, has return array , not echo values. function multiply($array, $factor) { foreach ($array $key => $value) { $array[$key]=$value*$factor; } return $array; } rest fine. fiddle you can array_map $a...

c# - Pagination code issue -

i have written below lines of code acconmplishing pagination in asp.net using repeater control as <asp:linkbutton id="linkbutton1" runat="server" causesvalidation="false" onclick="pagenexte_click" data-rel="tooltip" data-original-title="previous page.">&laquo;</asp:linkbutton> <asp:repeater id="rptpager" onitemdatabound="rptpager_itemdatabound" runat="server"> <itemtemplate> <asp:linkbutton id="lnkpage" runat="server" text='<%#eval("text") %>' commandargument='<%# eval("value") %>' enabled='<%# eval("enabled") %>' onclick="page_changed"></asp:linkbutton> </itemtemplate> </asp:repeater> <asp:linkbutton id="linkbutton3" runat="server" causesvalidation="false" onclick="pagenext_click...

axapta - Dynamics AX : Restrict Security policy (xDS) -

we have defined projectmanager role. want restrict list of accessible project. idea allow access project of user's department. department information available in field of employee , in financial dimension on project. i've created xds , works fine. but project manager can work on projects other departments. want "disable" xds when user fills in timesheets. because xds restrict project list when user add line in timesheets. do have idea? first of all, can try deactivate xds operation: xdsservices xds = new xdsservices(); xds.setxdsstate(false); //do have xds.setxdsstate(true); then, regarding business case, may go command , restrict list of projects join query. or go xds myproject tempdb table containing projects worker works on. then, have no more filtering issue this. you'll have implement additioal filter/restriction on other departements projects.

dependencies - How to execute n1ql query of Couchbase in scala? -

i want execute nickel query in project , want convert task doing using view perform nickel. possible..?? if yes please provide example , executing nickel queries in scala,and have add additional dependencies in project. if yes please provide link too. any suggestions appreciated we planning/working on scala driver, right can use java sdk through scala pretty easily. recommend follow official docs, convert java examples scala: http://docs.couchbase.com/developer/java-2.1/java-intro.html you want java-client dependency first: librarydependencies := "com.couchbase.client" % "java-client" % "2.1.4" if use implict conversions, can make life little easier too: import com.couchbase.client.java.couchbasecluster import com.couchbase.client.java.query.query import scala.collection.javaconversions._ object connectandquery { def main(args: array[string]): unit = { val cluster = couchbasecluster.create() val bucket = cluster.openbuc...