How to return till date part only from a SQL Server datetime datatype
How to return only the Date from a SQL Server DateTime datatype
Is there any way to block websites without Root access I am searching for a way to block websites without having root access. Is there any way to do it? Any help will be appreciated. Javascript && operator as if statement? I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff? Installing Guest Additions causing problems How to prove this is a metric? I have 2 distance functions $d(x,y)=|x^2-y^2|$ and $d(x,y)=|x^3-y^3|$ and I am trying to prove that they are metrics on $\mathbb R$, or give a counterexample that they are not metrics on $\mathbb R$.  I managed to prove the first 3 properties for the 2nd function namely:   $d(x,y)\ge0$ $d(x,y)=0$ iff $x=y$ $d(x,y)=d(y,x)$   and I now have shown that the 1st function is not a metric.  But for the triangle inequality property, $d(x,y)\le d(x,z) + d(z,y)$, Im stuck on it. How would go about proving it for $d(x,y)=|x^3-y^3|$? Thanks. If you run a code snippet, a hat still appears (hats are above snippets in the Z-order) Prove that $\lfloor\lfloor x/2 \rfloor / 2 \rfloor = \lfloor x/4 \rfloor$ At this point, I am unclear as to how to handle encounter XP. Does each surviving party member receive a proportional share, or the full amount? That is, assume a 4-character party had completed an encounter worth 400 XP. Would each party member receive 100 XP, or 400 XP? Increase partition size on which Ubuntu is installed? I have Ubuntu installed on a drive. The problem is it is running low on disk space. This is installed on vmware. I expanded the virtual drive and booted into ubuntu. But when I opened gparted(sudo gparted), the move/resize option is unavailable. This is the partition Ubuntu is installed on, but I need to resize it. Any ideas? I am comfortable using command line Broken image link on the new Stack Exchange blog Before I jump on to the problem, let me first congratulate  and his team for the newly re-designed Stack Exchange blog. I like it very much, great job! While searching on Google, I stumbled upon  blog post of Jeff Atwood and found few broken images. There are currently four images are broken on this post, Here is one of them:    Upon doing an inspect element on one of the broken image (same goes for all other broken images on the post), I found out that it is currently pointing to: https://blog.stackoverflow.com/wp-content/uploads/stackexchange-genuine-example11.png The newly re-designed Stack Exchange blog is now moved to a new location:  and the old blog URL i.e.  has the correct mapping of URL redirection (also called URL forwarding) and works perfectly. But, the problem lies in the latter part i.e. /wp-content/uploads/ directory structure does not exist anymore at the new blog location. I read the Jon Chan's  post (nice writeup! btw) where he talks about his custom Python script. Here is the relevant excerpt taken from that post:  I wrote a Python script to go through all the imported posts, looked for references to WordPress hosted content, download all the static assets into images/wordpress in the repo, and changed all the links to relative paths on Jekyll. Worked surprisingly well.  In other words, all of the old /wp-content/uploads/ static assets is now resides under the /images/wordpress/ directory at the new blog location. So, Jon's find and replace script should have worked (which it did for the most of the part) as intended to be but apparently it did not catch few of them. At least on  blog post and few other like ,  or . We could possibly have more but these are the ones I have found so far. I believe it's a minor bug somewhere in the script and could be fixed with few lines of code tweaking. Also, the static content link mapping problem would not have occurred at all if the directory name was unchanged as the URL redirection (as stated above) would have taken care of it. But, there must a reason for this change. Upon investigating further, I found out that the issue with broken images does not end here. They will still appear as broken even if Jon's script replaces the path to the correct one. Because the images have not been uploaded (or copied) to the blog's new /images/wordpress/ directory at all. They are missing! For example, try clicking on the following link: ## I replaced old dir. path /wp-content/uploads/ to the new /images/wordpress/  So, in a nutshell, in order to fix this broken images link problem, we need to make sure that not only they are pointing to new path i.e. /images/wordpress/ but also do exists (i.e. uploaded) at the blog's new location. Please fix this at your earliest. Where can I ask questions regarding Electronics? Changing Screen Brightness Through Keyboard Functions on My Notebook I've installed Ubuntu 16.04 on my Asus X555LJ.  But I don't know how to install drivers or how to enable function keys to controls screen backlight brightness. This question is asked in various forms here but the question boils down to:  I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again.   How can I shrink my database? What files do I shrink?  What should my considerations be while doing this?  Should I do anything after? What if it is a large database? Can I shrink it in smaller increments? What is a good use case for static import of methods? Just got a review comment that my static import of the method was not a good idea. The static import was of a method from a DA class, which has mostly static methods. So in middle of the business logic I had a da activity that apparently seemed to belong to the current class:  import static some.package.DA.*; class BusinessObject {   void someMethod() {     ....     save(this);   } }    The reviewer was not keen that I change the code and I didn't but I do kind of agree with him. One reason given for not static-importing was it was confusing where the method was defined, it wasn't in the current class and not in any superclass so it too some time to identify its definition (the web based review system does not have clickable links like IDE :-) I don't really think this matters, static-imports are still quite new and soon we will all get used to locating them.  But the other reason, the one I agree with, is that an unqualified method call seems to belong to current object and should not jump contexts. But if it really did belong, it would make sense to extend that super class.  So, when does it make sense to static import methods? When have you done it? Did/do you like the way the unqualified calls look?  EDIT: The popular opinion seems to be that static-import methods if nobody is going to confuse them as methods of the current class. For example methods from java.lang.Math and java.awt.Color. But if abs and getAlpha are not ambiguous I don't see why readEmployee is. As in lot of programming choices, I think this too is a personal preference thing.   Thanks for your response guys, I am closing the question. What is the difference between "likelihood" and "probability"? Start script on open blender file How do I create a script file for terminal commands? In Windows I can write a file containing commands for cmd (usually .cmd or .bat files).  When I click on those files it will open cmd.exe and run them commands the file contains.  How would I do this in Ubuntu?         I'm sure this is a duplicate, but I can't find my answer. Its similar to these questions, but they don't answer the question: Rails: Could not find bcrypt-ruby-3.0.1 in any of the sources How to assign values to a MATLAB matrix on the diagonal? Is the product of symmetric positive semidefinite matrices positive definite?