How to make rounded indents in objects I am looking to make details on the handle of a sword, and am trying to use the Boolean modifier to cut into the cylindrical handle. Unfortunately, Blender does not seem to enjoy cutting the objects when the subdivision surface modifier is high detail. I would like for the curves to look smooth. Is there another way for me to create these rounded cutouts or am I using Boolean wrong? The Blend File:
How can I make a rounded indentation on a cylinder? I'm trying to do a cosmetic bottle in blender but i don't how to do this thing in the image. How to do this round edge on the cap. Can anyone help me?
Can anyone explain why a semi-simple finite dimensional Lie algebra $\mathfrak{g}$ has to be perfect ?   The natural way to prove something like that would be to look to the algebra generated by the Lie brackets, which when $\mathfrak{g}$ is not perfect would be expected to be solvable. But it doesn't seem to work. Is my sugar daddy scamming me prove that $24 \mid a(a^2-1)$ If $a$ is an odd integer, prove that $24 \mid a(a^2-1)$.  I proved in my class that $a^2=8k+1$ for some $k$, provided $a$ was odd.  So $$a(a^2-1)=(2k-1)(8k+1-1)=8k(2k-1)$$ but I can't pull a $24$ out of it. This is intended to be a canonical question regarding possible endings of the game.  For each question, assume a single proper strike was made, and note where an improper strike would change the game outcome (beyond an additional point for the opponent).  If the Queen has been covered:     What happens if I pocket my last C/m and the Striker? What happens if I pocket my opponent's last C/m? What happens if I pocket my opponent's last C/m and the Striker? What happens if I pocket both players' last C/m? What happens if I pocket both players' last C/m and the Striker?     If the shot covers the Queen:     What happens if I pocket my last C/m and the Queen? What happens if I pocket my last C/m, the Queen and the Striker? What happens if I pocket my opponents' last C/m and the Queen? What happens if I pocket my opponents' last C/m, the Queen and the Striker? What happens if I pocket both players' last C/m and the Queen? What happens if I pocket both players' last C/m, the Queen and the Striker?     If the Queen is left on the board:     What happens if I pocket my last C/m, leaving the Queen? What happens if I pocket my last C/m and the Striker, leaving the Queen? What happens if I pocket my opponent's last C/m, leaving the Queen? What happens if I pocket my opponent's last C/m and the Striker, leaving the Queen? What happens if I pocket both players' last C/m, leaving the Queen? What happens if I pocket both players' last C/m and the Striker, leaving the Queen? I have B1/B2 Visa. Can I travel for Business trip to US with this Visa? Show that if $fd'=f'd $ and the pairs $f, d $ and $f',d' $ are coprime, then $f=f' $ and $d=d' $. Show that if $fd'=f'd $ and the pair $f, d $ are coprime, that is gcd($d,f $)=1, as is the pair $f',d' $, then $f=f' $ and $d=d' $.  This should be simple, but I couldn't verify it. Thanks in advance! I am trying to read a custom (non-standard) CSS property, set in a stylesheet (not the inline style attribute) and get its value. Take this CSS for example:  #someElement {   foo: 'bar'; }   I have managed to get its value with the currentStyle property in IE7:  var element = document.getElementById('someElement'); var val = element.currentStyle.foo;   But currentStyle is MS-specific. So I tried getComputedStyle() in Firefox 3 and Safari 3:  var val = getComputedStyle(element,null).foo;   ...and it returns undefined. Does anyone know a cross-browser way of retreiving a custom CSS property value?  (As you might have noticed, this isn't valid CSS. But it should work as long as the value follows the correct syntax. A better property name would be "-myNameSpace-foo" or something.) Segmentation Fault when attempting to print value in C Java: how do I check if a Date is within a certain range? I have a series of ranges with start dates and end dates. I want to check to see if a date is within that range.  Date.before() and Date.after() seem to be a little awkward to use. What I really need is something like this pseudocode:  boolean isWithinRange(Date testDate) {     return testDate &gt;= startDate &amp;&amp; testDate &lt;= endDate; }   Not sure if it's relevant, but the dates I'm pulling from the database have timestamps. Why do people not upvote, or accept answers that worked for them? I am regular Stack Exchange user, especially at Stack Overflow.  One of the things I really dislike about new and sometimes veteran users is that:   Either they do not accept an answer that works for them, Or they accept the answer but do not vote it up   I mean they can really both accept the answer and vote it up but somehow they wouldn't =(.  How many of you feel the same way? Imagine that a pebble is placed on a uniformly rotating, frictionless disk.  What will happen to this pebble? Will the disk slide under it and the pebble stay as is? Or will there be a centrifugal force on the pebble and it'll be thrown off the disk? How to float until on left (or right) page? Generalizing a sequence. Consider a sequence of the form:  $x[n]=-1,-1...,1,1,...,-1,-1...,1,1... \quad n&gt;0$  One can think of this as a square wave ($\pm1$) with a 50 % duty cycle (coming from EE).  For the simplest case of such a series i.e. $-1,+1,-1,+1,-1...$, a general equation is quite trivial ($x[n]=-1^n$).  Can we have e general equation for the other cases i.e. when there are multiple $-1$'s followed by $+1$'s ? I read this story in the early 2000s, but it was a Chinese translation so the English version could be older.  The beginning is a bit like the Passengers movie: on a spaceship, a man woke up from stasis too early and found that he could not go back to sleep. So he has to spend his whole life on the spaceship, alone.  For some reason (technical or ethical), instead of waking other people up, he created a fantasy adventure story featuring a brave prince as a pastime. He did stories, and drawings all over the inside of the ship. Then he died, not knowing how people are going to respond to his work. What does the double slash mean in `${f// /_}`? I'm learning Bash, and I want to replace space characters with other "non blank" characters. I'm using a for loop:  for f in *\ *; do mv "$f" "${f// /_}"; done   My question is, why are the double slash and the space in ${f// /_}? What does ${f// /_} do? Short story ID: Bouncing-Ball Time Travel A little help please. The story I'm looking for is probably late-50's to mid-60's, and may well have occurred in an SF magazine.  A professor is demonstrating his new time machine to a scientific audience. The machine looks like two large spheres touching each other. In operation, one is sent back into deep time (let's say, although my memory has dropped this particular datum, 10 billion years). It will then return to the present, then bounce off its twin and jump back half that temporal distance (5 billion years), return, bounce half again (2.5 billion years), etc. Each trip will take half the time (in present-day units) as the previous, so the whole thing will be over in a finite time.  Before anyone can stop him, he activates it. He begins lecturing the audience, asserting that whatever has happened has always happened. At decreasing intervals the sphere reappears and bounces with a resonant "Boing!". At each jump, the narrative establishes that the appearance of the sphere did change history, and these changes are reflected in the professor's speech.  So it becomes something like "(Boing!) And those who say that this is dangerous might as well be claiming that the day is not 26 hours long (Boing!) or that there are three moons, not seven (Boing!)", etc. And when the final (Boi-Bo-B-B-Boing!) fades away he raises his tentacles in triumph and cries, "See? Nothing has changed!" How do you convert LPCWSTR to const char *? Working with IPv6 Addresses in PHP After searching around somewhat thoroughly, I noticed a slight lack of functions in PHP for handling . For my own personal satisfaction I created a few functions to help the transition.  The IPv6ToLong() function is a temporary solution to that brought up here: . It will split the IP in to two integers and return them in an array.  /**  * Convert an IPv4 address to IPv6  *  * @param string IP Address in dot notation (192.168.1.100)  * @return string IPv6 formatted address or false if invalid input  */ function IPv4To6($Ip) {     static $Mask = '::ffff:'; // This tells IPv6 it has an IPv4 address     $IPv6 = (strpos($Ip, '::') === 0);     $IPv4 = (strpos($Ip, '.') &gt; 0);      if (!$IPv4 &amp;&amp; !$IPv6) return false;     if ($IPv6 &amp;&amp; $IPv4) $Ip = substr($Ip, strrpos($Ip, ':')+1); // Strip IPv4 Compatibility notation     elseif (!$IPv4) return $Ip; // Seems to be IPv6 already?     $Ip = array_pad(explode('.', $Ip), 4, 0);     if (count($Ip) &gt; 4) return false;     for ($i = 0; $i &lt; 4; $i++) if ($Ip[$i] &gt; 255) return false;      $Part7 = base_convert(($Ip[0] * 256) + $Ip[1], 10, 16);     $Part8 = base_convert(($Ip[2] * 256) + $Ip[3], 10, 16);     return $Mask.$Part7.':'.$Part8; }  /**  * Replace '::' with appropriate number of ':0'  */ function ExpandIPv6Notation($Ip) {     if (strpos($Ip, '::') !== false)         $Ip = str_replace('::', str_repeat(':0', 8 - substr_count($Ip, ':')).':', $Ip);     if (strpos($Ip, ':') === 0) $Ip = '0'.$Ip;     return $Ip; }  /**  * Convert IPv6 address to an integer  *  * Optionally split in to two parts.  *  * @see https://stackoverflow.com/questions/420680/  */ function IPv6ToLong($Ip, $DatabaseParts= 2) {     $Ip = ExpandIPv6Notation($Ip);     $Parts = explode(':', $Ip);     $Ip = array('', '');     for ($i = 0; $i &lt; 4; $i++) $Ip[0] .= str_pad(base_convert($Parts[$i], 16, 2), 16, 0, STR_PAD_LEFT);     for ($i = 4; $i &lt; 8; $i++) $Ip[1] .= str_pad(base_convert($Parts[$i], 16, 2), 16, 0, STR_PAD_LEFT);      if ($DatabaseParts == 2)             return array(base_convert($Ip[0], 2, 10), base_convert($Ip[1], 2, 10));     else    return base_convert($Ip[0], 2, 10) + base_convert($Ip[1], 2, 10); }   For these functions I typically implement them by calling this function first:  /**  * Attempt to find the client's IP Address  *  * @param bool Should the IP be converted using ip2long?  * @return string|long The IP Address  */ function GetRealRemoteIp($ForDatabase= false, $DatabaseParts= 2) {     $Ip = '0.0.0.0';     if (isset($_SERVER['HTTP_CLIENT_IP']) &amp;&amp; $_SERVER['HTTP_CLIENT_IP'] != '')         $Ip = $_SERVER['HTTP_CLIENT_IP'];     elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &amp;&amp; $_SERVER['HTTP_X_FORWARDED_FOR'] != '')         $Ip = $_SERVER['HTTP_X_FORWARDED_FOR'];     elseif (isset($_SERVER['REMOTE_ADDR']) &amp;&amp; $_SERVER['REMOTE_ADDR'] != '')         $Ip = $_SERVER['REMOTE_ADDR'];     if (($CommaPos = strpos($Ip, ',')) &gt; 0)         $Ip = substr($Ip, 0, ($CommaPos - 1));      $Ip = IPv4To6($Ip);     return ($ForDatabase ? IPv6ToLong($Ip, $DatabaseParts) : $Ip); }   Someone please tell me if I'm reinventing the wheel here or I've done something wrong.  This implementation converts IPv4 to IPv6. Any IPv6 address it doesn't touch. Currentsection TOC in scrartcl? I like to get a toc at beginning of some of my sections, like in beamer where I can use \tableofcontents[currentsection] is there a possibility in scrartcl?  Something like this:  \documentclass[10pt,a4paper]{scrartcl} \usepackage[ngerman]{babel}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \begin{document}  \tableofcontents %complete  \section{First}  \section{Second} \tableofcontents %just subsection and subsubsection \subsection{SecondSub} \subsubsection{please} \subsection{this} \subsection{SecondSub2} \subsection{parts}  \section{Third} \subsection{another}  \end{document}   Looks like:  Inhaltsverzeichnis %complete  1 First  2 Second 2.1 SecondSub.......................2 2.1.1 please........................2 2.1.2 this..........................2 2.2. SecondSub2.....................3 2.2.1 parts.........................4  3 Third 3.1 another ........................5   1 First  2 Second  Inhaltsverzeichnis %just subsection and subsubsection 2.1 SecondSub.......................2  2.1.1 please........................2  2.1.2 this..........................2 2.2. SecondSub2.....................3  2.2.1 parts.........................4  2.1 SecondSub  2.1.1 please   2.1.2 this  2.2. SecondSub2  2.2.1 parts   3 Third  3.1 another Use a shell variable in awk