I have created a basic signup/login form with PHP.   Now I want to let my website create a subdomain for every user signed up on my website.   For example, My domain is "mydomain.com" and "Tom Smith" registers through the 'register form' with his name. I would like my website to automatically create a subdomain: "tomsmith.mydomain.com".   What is the best way to do this?
How do I create subdomain like  ? Do i have to access htaccess somehow? Is it actually simply possible to create it via pure php code or I need to use some external script-server side language?  To those who answered: Well, then, should i ask my hosting if they provide some sort of DNS access??
Someone who does not like excess Is there a robust command line tool for processing csv files? I work with CSV files and sometimes need to quickly check the contents of a row or column from the command line.  In many cases cut, head, tail, and friends will do the job; however, cut cannot easily deal with situations such as  "this, is the first entry", this is the second, 34.5   Here, the first comma is part of the first field, but cut -d, -f1 disagrees. Before I write a solution myself, I was wondering if anyone knew of a good tool that already exists for this job.  It would have to, at the very least, be able to handle the example above and return a column from a CSV formatted file.  Other desirable features include the ability to select columns based on the column names given in the first row, support for other quoting styles and support for tab-separated files.  If you don't know of such a tool but have suggestions regarding implementing such a program in Bash, Perl, or Python, or other common scripting languages, I wouldn't mind such suggestions. Bypass BIOS password set by faulty Toshiba firmware on Satellite A55-S1065 laptop? I want to set up a diary that compiles in two different orders: One is work by day, the other is work by project according to tags I give to the particular chunks of work I did each day.   For example, I write my diary as usual in work by day form:  2/2/15  -- bought a new screwdriver (tag: car maintainence)   -- scetched my plan for world domination (tag: world domination)  3/4/15  -- started studying physics (tag: world domination)  -- finished tax declaraction (tag: burocracy)   Compiling by project would yield tags as sections:  car maintainence    -- 2/2/15: bought a new screwdriver  world domination  -- 2/2/15: scetched my plan for world domination  -- 3/4/15: started studying physics  burocracy  -- 3/4/15: finished tax declaraction   I know this is pretty close to the literal programming paradigm the whole LaTex documentation follows: A code chunks in a document can be compiled to two different orders: For human understanding and for use by the machine. However, I want two human readable versions --say pdf-files-- as output. Is there some package that helps? Bold code in a question Frequently when I ask a question I have to include quite a bit of code for reference purposes.    It would be nice to be able to bold the important lines in the code.  For example this code:  &lt;DataTrigger Value="True"&gt;     &lt;DataTrigger.Binding&gt;         &lt;MultiBinding Converter="{StaticResource DisableWorkItemConverter}"&gt;             &lt;Binding ElementName="MainForm" Path="PickedWorkItemID"/&gt;             &lt;Binding Path="Id"/&gt;         &lt;/MultiBinding&gt;     &lt;/DataTrigger.Binding&gt;     &lt;Setter Property="IsEnabled" Value="False"/&gt;     &lt;Setter Property="IsSelected" Value="False"/&gt; &lt;/DataTrigger&gt;   Is not way long, but the important part (as seen in ) is the second to last line.  However, if I try to bold it, it ends up looking like this:  &lt;DataTrigger Value="True"&gt;     &lt;DataTrigger.Binding&gt;         &lt;MultiBinding Converter="{StaticResource DisableWorkItemConverter}"&gt;             &lt;Binding ElementName="MainForm" Path="PickedWorkItemID"/&gt;             &lt;Binding Path="Id"/&gt;         &lt;/MultiBinding&gt;     &lt;/DataTrigger.Binding&gt;     &lt;Setter Property="IsEnabled" Value="False"/&gt;     **&lt;Setter Property="IsSelected" Value="False"/&gt;** &lt;/DataTrigger&gt;   Not what I was going for.  It would be nice to be able to draw attention to specific lines of code when needed.    (One suggestion of a different color background sounds nice too (ie a yellow background to draw the eye to the relevant code.)  If there is some other way to bold in code please let me know. Wrong Sentence:     Never before in the history of the world such a thing has happened, I don't think that will ever happen again.   Right sentence:     Never Before in the history of the world has such a thing happened, I don't think that will ever happen again.   Why “has such a thing happened” is the right form, and why can't I use such a thing has happened? How to generate a random snowflake After installing Ubuntu 12.04 LTS on my HP Folio 13 I cannot get wireless to work. My kernel is 3.8.0-29-generic and my wireless module is a Broadcom BCM4313.  After running rfkill list all:  0: hp-wifi: Wireless LAN Soft blocked: no Hard blocked: no 1: hp-bluetooth: Bluetooth Soft blocked: no Hard blocked: no 2: hci0: Bluetooth Soft blocked: no Hard blocked: no   The wired connection works fine. The driver activation for Broadcom STA wireless driver fails every time. in the log it says  FATAL: Module wl not found. FATAL: Error running install command for wl   After running lspci -nnk | grep -iEA3 "(wireless|network|wlan)":  02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01) Subsystem: Hewlett-Packard Company Device [103c:1795] Kernel modules: bcma 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader [10ec:5209] (rev 01)   I have also tried this method and it did not work: . How do you make div elements display inline? Let $p, q \in \mathbb R$ be positive reals for which $p + q = 1$. How to prove that for any two natural numbers $n, m$ the following inequality is true?  $(1 - p^n)^m + (1 - q^m)^n \ge 1$  I don't have a big knowledge about solving inequalities, so I tried to use cauchy-schwarz inequality, binomial theorem and some other baisc techniques, but it lead me nowhere. I've been thinking about it for a long time and now I'm completly stuck. Hydrostatic pressure - doesn't density vary with depth? Our class is learning about hydrostatic water pressure and we have been told that we can calculate the force of the liquid on an object at any depth using "the density x 9.8 x the depth". However, as the depth increases, wouldn't the density of the liquid increase because of the weight of the liquid above it compressing it? So should't there be something in the equation to account for the varying density? To me, "density x 9.8 x depth" seems like it is saying that the density will be constant... How to change default user in WSL Ubuntu bash on Windows 10 I installed the WSL Bash on Windows 10 and set my user to e.g. 'abc' but now I want to change it to something else.  How can I change the user name of the user I'm logged in as?  When I open bash it automatically logs me in with my current user. Why enums require an explicit cast to int type? Using notify-send with cron How can I define a mathematical function as a LaTeX macro? How to fix the incompatility between BiBer and BiBLaTeX versions in TeXmaker? Ignoring somebody screws up the avatar list When I ignore a user, the avatar list looks weird.    The blank line beneath the row with the avatar of the ignoree is quite annoying.    I use Google Chrome on OS X.  There was a  tagged  but it still looks weird. Tips and resources for beginning designers Thanks to the internet, graphic design and programming are becoming increasingly overlapping fields.   As a programmer, I constantly find myself needing basic knowledge of Graphic Design, but have trouble locating thorough yet concise graphic design learning resources, and instead usually find bits and pieces of knowledge applicable to the task at hand.  Can you guys offer some tips or recommend some good books, tutorials, blogs, and websites which provide a beginner level overview of web design that have been, in your experience, effective and high quality learning materials. I'm not looking for tips on how to use image editing tools, but assuming a basic grasp of those, which resources and advice will best help a new designer create professional looking designs? In terminal, how can I write 'sagi' instead of 'sudo apt-get install' Finding a ray that intersects a polygon as many times as possible