Does anyone have insight into the best practice to style a Visualforce page to match the SLDS for inclusion in a lightning component and printing?  I can hear the choirfolk chanting: Visualforce is so stale!  To which I say: Unless you want to actually print your work. (It would be amazing if lightning could print in a useful way.)  I'm working on a Visualforce page that will be included included in a lightning component that will also be used for a printed version of the VF page contents renderd as pdf.     To prevent recommendations to use the SLDS in Visualforce, it seems this is a dead end.  I've personally tried every permutation of apex:slds, lightningStylesheets="true", applyHtmlTag="false", applyBodyTag="false", renderAs="pdf", and renderAs="advanced_pdf".  I appears that any attempt to render Visualforce that includes the SLDS CSS causes Salesforce to puke with      An internal server error has occurred.   I'm not the first to discover this .  I haven't tried embedding the LDS CSS in a static resource because it appears this didn't work .  As @Ronnie , it seems using the SLDS CSS itself will not work because the pdf rendering engine Salesforce uses doesn't support modern CSS.  Which leave me asking: Can you recommend a best practice for styling a Visualforce page to conform with the SLDS without actually including the SLDS?
I have a VF page built on Lightning Design system (LDS) framework. When I add the renderAs="PDF" attribute, pdf does not show the content with LDS CSS/Style.  Reference Link:   Note1: apex:page tag has all the usual attributes which is required for pdf *     (showHeader="false" sidebar="false" standardStylesheets="false"   docType="html-5.0" applyHtmlTag="false" applyBodyTag="false")   Note2: Salesforce supports external stylesheet. That is, CSS file stored in Static resource. Link of example:   I also copied the whole css content from the LDS CSS file (Path: 'assets/styles/salesforce-lightning-design-system-vf.min.css') and applied as inline CSS in VF page. But still, there is no luck.  My styleSheet is referred in VF page as below  apex:stylesheet value="{!URLFOR($Resource.SLDS221,      'assets/styles/salesforce-lightning-design-system-vf.min.css')}"   Page works absolutely fine if it is not rendered as PDF.  Any suggestions?
LCM is associative: $\ \text{lcm}(\text{lcm}(a,b),c)=\text{lcm}(a,\text{lcm}(b,c))$ Definition: The least common multiple of $a.b\in\Bbb{Z}$ is the smallest  $k\in\Bbb{N}$ that is divisible by both a and b.         Proposition: $\text{lcm}(\text{lcm}(a,b),c)=\text{lcm}(a,\text{lcm}(b,c))\tag{2}$    Proof: We want to show $\text{lcm}(\text{lcm}(a,b),c)\mid\text{lcm}(a,\text{lcm}(b,c))$ and $\text{lcm}(a,\text{lcm}(b,c))\mid \text{lcm}(\text{lcm}(a,b),c)$ such that $\text{lcm}(\text{lcm}(a,b),c)=\text{lcm}(a,\text{lcm}(b,c))$.  Let $k=\text{lcm}(\text{lcm}(a,b),c)$, then $c\mid k$ and $\text{lcm}(a,b)\mid k$, but if we let $l=\text{lcm}(a,b)$, then $a\mid l\,\,\text{and}\,\, b\mid l$. Therefore $c\mid k\,\,,a\mid k\,\,\text{and}\,\, b\mid k$, but then $\text{lcm}(b,c)\mid k$. Thus $\text{lcm}(a,\text{lcm}(b,c))\mid k$      Question: Does this makes sense, ifso can I do the same for $\text{lcm}(\text{lcm}(a,b),c)\mid \text{lcm}(a,\text{lcm}(b,c))$? Proof of "continuity from above" and "continuity from below" from the axioms of probability One of the consequences of the axioms of probability ($\sigma$ field and probability axiom) is the "infinite subset" and "infinite union" property, I can't figure out how it follows from them.  if $A_1 \subseteq A_2 \subseteq \cdots$ then   $$P\left(\bigcup_{i=1}^{\infty}A_i \right) = \lim_{k \to \infty} P(A_k)  $$  If $A_1 \supseteq A_2 \supseteq \cdots$ then   $$P\left(\bigcap_{i=1}^{\infty}A_i \right) = \lim_{k \to \infty} P(A_k)  $$ The Chinese government has a really specific list of requirements for visa photos:    I had an old unused photo from last time I applied for a visa or passport, and compared it to the requirements (decided not to use it because it was damaged). It seemed to match most of the requirements, except that it seems that they want a photo which isn't square: The required width is less than the required height.  Assuming most drugstores are still providing square passport photos, the question becomes: Should I cut the photo to match the specified width?   What adds to the confusion is if you look at the  the box for the photo is nearly square, not the oblong shape in the requirements. And I have seen other advice that you need to make sure it fully fits the box.  Any advice about what to do here? Are there any clones/alternatives for running a Stack Exchange style Q&A site? Is there a way to add an error on a dynamically referenced field? Let's take this simple example:  opp.get('Name').addError('Invalid name');   This is not working, I'm looking for a similar minded way.  Thanks I was just wondering why Fresnel Lenses are not widely used in the production of solar electricity. Their use there would mean that you could produce heat within a fraction of a second, up to a few minutes and run a turbine to produce electricity.  Though it is used in welding, I am not sure what are the problems in producing electricity, as stated by :     New applications have appeared in solar energy, where Fresnel lenses can concentrate sunlight (with a ratio of almost 500:1) onto solar cells. Is the composition of two injective functions injective? Deriving the speed of the propagation of a change in the Electromagnetic Field from Maxwell's Equations I've been told that, from Maxwell's equations, one can find that the propagation of change in the Electromagnetic Field travels at a speed $\frac{1}{\sqrt{\mu_0 \epsilon_0}}$ (the values of which can be empirically found, and, when plugged into the expression, yield the empirically found speed of light)  I'm really not sure how I would go about finding $v = \frac{1}{\sqrt{\mu_0 \epsilon_0}}$ simply from Maxwell's equations in the following form, in SI units --  $$\nabla \cdot \mathbf{E} = \frac {\rho} {\epsilon_0}$$  $$\nabla \cdot \mathbf{B} = 0$$  $$\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}} {\partial t}$$  $$\nabla \times \mathbf{B} = \mu_0 \left( \mathbf{J} + \epsilon_0 \frac{\partial \mathbf{E}} {\partial t} \right)$$  Is what I believe true? (that the speed of propagation is derivable from Maxwell's Equations)  If not, what else is needed?  If so, can you provide a clear and cogent derivation? Find the smallest integer $n$ greater than $1$ such that the last $3$ digits of $n^2$ are the same as the last $3$ digits of $n$. Find the smallest integer $n$ greater than $1$ such that the last $3$ digits of $n^2$ are the same as the last $3$ digits of $n$.  So far I've got $n^2 = 1000k + n$ which means $n^2 ≡ n \mod 1000$. I  don't know how to proceed since 1000 seems to be a bit high. How many irreducible monic quadratic polynomials are there in $\mathbb{F}_p[X]$? Can some of you help me with my homework?     I had to count the irreducible, quadratic, monic polynomials in $\mathbb{F}_p[X]$ for arbitrary $p$.    I will show you what I tried myself.  Research effort  First of all the set $\{X^ 2 + bX +c : b, c \in \mathbb{F}_p \}$ contains $p^2$ elemenst. We need to substract the amount of elements that is reducible. These elements are exactly the set $A = \{(X+c)(X+d) : c, d \in \mathbb{F}_p \}$. There are $p(p-1)$ pairs of $(a,b) \in \mathbb{F}_p \times \mathbb{F}_p$ such that $a \neq b$, and there are $p$ pairs such that $a=b$.     When $a$ and $b$ are unequal, whe know that $a$ and $b$ can be swapped without changing anything to the polynomial $(X+a)(X+b)$, so I obtained that $|A| \leq p +(p-1)- \frac{1}{2}(p-1)=p-\frac{1}{2}(p-1)$.  In other to find out these are the elements, or that there are still less, I thought I had to assume that $(X+c)(X+d) = (X+\gamma)(X+\delta)$, to deduce some information about the realation between $(c,d)$ and $(\gamma, \delta)$, but this led to taking square roots in $\mathbb{F}_p$, and I am not familiar with that.  Could you please provide me some more information? A file manager with free icon placing option Change Folder Permissions Why do statisticians discourage us from referring to results as "highly significant" when the $p$-value is well below the conventional $\alpha$-level of $0.05$?  Is it really wrong to trust a result that has 99.9% chance of not being a Type I error ($p=0.001$) more than a result that only gives you that chance at 99% ($p=0.01$)? How can I use docker without sudo? On Docker's documentation pages, all example commands are shown without sudo, like this one:  docker ps   On Ubuntu, the binary is called docker.io. It also does not work without sudo:  sudo docker.io ps   How can I configure Docker so that I don't need to prefix every Docker command with sudo? How to call the method correctly in Preference.OnPreferenceChangeListener() Possible Duplicate:          There are a lot of really screwed up configurations out there, because people didn't take a minute to sit down and think about something as simple as the name for their Active Directory forest. I'm asking this question to self-answer so that this knowledge can be more readily available. If you think you have a better answer, by all means add your input (but be prepared to defend it!)   So, what should I name my new Active Directory? How do I add a DNS server via resolv.conf? Is /etc/resolv.conf useless in  (Precise Pangolin)?  I see that the DNS server information is stored in  now. The nmcli command line tool can list that for you.  If I want to add one more  server, will adding it to /etc/resolv.conf by using the resolvconf package help? I have been trying to create a function that does basically the same thing that the QGIS "dissolve" function. I thought it would be super easy but well apparently not. So from what I have gathered around, the use of fiona with shapely should be the best option here. I just began to mess around with vector files so this world is pretty new to me and python as well.  For these example, I am working with a county shapefile founded here  So here are some piece of code I gathered but can't find a way to make them work together  For now my best method is the following based on : . It works fine and I get a list of the 52 states as Shapely geometry. Please feel free to comment if there is a more straight forward way to do this part.  from osgeo import ogr from shapely.wkb import loads from numpy import asarray from shapely.ops import cascaded_union  ds = ogr.Open('counties.shp') layer = ds.GetLayer(0)  #create a list of unique states identifier to be able #to loop through them later STATEFP_list = [] for i in range(0 , layer.GetFeatureCount()) :     feature = layer.GetFeature(i)     statefp = feature.GetField('STATEFP')     STATEFP_list.append(statefp)  STATEFP_list = set(STATEFP_list)  #Create a list of merged polygons = states  #to be written to file polygons = []  #do the actual dissolving based on STATEFP #and append polygons for i in STATEFP_list :      county_to_merge = []     layer.SetAttributeFilter("STATEFP = '%s'" %i )      #I am not too sure why "while 1" but it works      while 1:         f = layer.GetNextFeature()         if f is None: break         g = f.geometry()         county_to_merge.append(loads(g.ExportToWkb()))      u = cascaded_union(county_to_merge)     polygons.append(u)  #And now I am totally stuck, I have no idea how to write  #this list of shapely geometry into a shapefile using the #same properties that my source.   So the writing is really not straight forward from what I have seen, I really just want the same shapefile only with the country dissolve into states, I don't even need much of the attribute table but I am curious to see how you can pass it on from the source to the new created shapefile.  I found many pieces of code for writing with fiona but I am never able to make it work with my data. Example from  :  from shapely.geometry import mapping, Polygon import fiona  # Here's an example Shapely geometry poly = Polygon([(0, 0), (0, 1), (1, 1), (0, 0)])  # Define a polygon feature geometry with one attribute schema = {     'geometry': 'Polygon',     'properties': {'id': 'int'}, }  # Write a new Shapefile with fiona.open('my_shp2.shp', 'w', 'ESRI Shapefile', schema) as c:     ## If there are multiple geometries, put the "for" loop here     c.write({         'geometry': mapping(poly),         'properties': {'id': 123},     })   The problem here is how to do the same with a list of geometry and how to recreate the same properties than the source. This question is a duplicate of  (but this question can't be marked as a duplicate because that question is on meta.stackoverflow.com, and this question is on meta.stackexchange.com).  I'm seeing a bug on stackoverflow.com. I'm not sure if the culprit is Stack Overflow, Google Chrome, or macOS.  (Below I refer to a "code box". By that I mean some text that begins with 4 spaces when editing a question or answer.)  When I hover over a code box that contains one long line of code, a horizontal scrollbar appears. When I stop hovering over the code box, very frequently (maybe 3 out of 4 times) the scrollbar does not disappear. Clicking elsewhere on the page also does not dismiss the scrollbar. The only way to dismiss it is to refresh the page.  ...After experimenting more, it appears to always happen if I enter the box from below, but not always when I enter from above. It seems to be triggered by hovering over the lower half of the box.  Also if I enter from the top and scroll to the right, then until I refresh the page again that scrollbox will behave normally (only show a scrollbar when scrolling, and disappear after). In that case the scrollbar also has a different appearance, being much less tall (maybe a quarter of the height of the code box rather than half as tall).  Further, if I get a box and scrollbar into that functional state and then hover over the lower part of the box for a bit, then sometimes eventually it will break and stay broken until refresh again.  And in any case hovering over the lower part of the box causes the scrollbar to get taller.  Here is a screenshot of the issue:        Google Chrome 71.0.3578.98 (Official Build) (64-bit)  macOS High Sierra 10.13.6  Here is a code box that repros the issue for me:  fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo   Here is another:  foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo Would a 9V alkaline power a 12V DC motor? I am thinking about buying a 12V DC motor but want to keep everything, including the motor, battery, and power switch somewhat compact. I am not very knowledgeable about these kind of things and am curious whether or not my 12V DC motor would run at all on a 9V battery.