Why does defining main() with no return type compile with no error?
What should main() return in C and C++?
How do I get the MAX row with a GROUP BY in LINQ query? For privacy and performance reasons, I'd like to prevent my computer from ever communicating with certain Internet hosts. I'd like to do this at the OS level, not through web browser plug-ins (not broad enough), or even through my home router (my laptop travels). I'd prefer to use built-in tools.  I'm running Windows 7 Professional 64-bit. I'm all too familiar with the Windows hosts file - and its limitations. There seems to be some confusion over whether hosts supports wildcards, but my own tests confirm that it does not.  I have experimented with Windows Firewall and the IP Security Policy MMC snap-in. So far as I can tell, both require numeric addresses. I don't want to block specific IP addresses, or ranges of addresses, in part because IP-address-to-hostname mappings can and do change.  Is there any tool in Windows 7 Professional with which I can block (or route to 0.0.0.0) communication with Internet hosts by hostname mask? If not, are there any good, free, third-party tools? Why can't the indefinite integral $\int\frac{\sin(x)}{x}\mathrm dx$ be found? Which is the best workflow to follow when texturing and importing textures from Substance Painter? So, I'm planning to texture a model using Substance Painter and will render it using the Cycles Render Engine. I will be also using the Principle Shader, heavily, to achieve realistic renders. So, which workflow in Substance Painter so that the textures are accurately rendered in Blender? Specular-Glossy? Or should I go with Metalic-Roughness? Is there a documentclass that produces 'endless' pages? Does anybody know of a documentclass that produces a page that has a fixed width and a variable length, depending on the actual content that needs to fit on the sheet? I'm trying to get something like a kind of scroll if possible. What does a two overlapping circles symbol mean in an electrical schematic/diagram? Search only for the currently active language Render scene with background jpg in python Fairly new to python and blender, so apologies if this is super basic. I've searched around and haven't found an answer.  I'd like to render some procedurally generated objects with a background image. In case it makes a difference, I'm using:    I don't need any interaction between the generated object and the background image so I've left a skeleton script I'm using to render below  import os DIR ="/home/path/to/folder" bg_file = os.path.join(DIR, "myimage.jpg") bg_img = bpy.data.images.load(bg_file) bpy.data.scenes['Scene'].render.filepath = os.path.join(DIR, "image") bpy.context.scene.camera = bpy.data.objects['Camera'] bpy.ops.render.render(write_still=True)   I managed to find some scripts that seem to be trying to do what I want online, but none that I could get to work. e.g.  import bpy filepath = "/home/path/to/folder" img = bpy.data.images.load(filepath)  for area in bpy.context.screen.areas:     if area.type == 'VIEW_3D':         space_data = area.spaces.active         bg = space_data.background_images.new()         bg.image = img         break  cam = bpy.data.cameras.new("Camera") cam_ob = bpy.data.objects.new("Camera", cam) bpy.context.scene.camera = cam_ob bpy.context.scene.objects.link(cam_ob) bpy.context.scene.objects.active = bpy.context.scene.objects["Camera"]   Any thoughts/tips would be greatly appreciated! What book features people living in a tree who move up it in a bubble? Suppose we want to prove $$ k \binom{n}{k} = n \binom{n-1}{k-1}$$   In the LHS we are choosing a team of $k$ players from $n$ players. Then we are choosing a captain. In the RHS we are choosing a captain from the $n$ players. Then we are choosing the remaining $k-1$ players from the $n-1$ players.   Is this a correct interpretation? Passing directly an array initializer to a method parameter doesn't work I use OS X Mavericks and have some company storage drives mounted (using smb or cfs). (smb://username@address.path.toserver.com/directory/data). When I work with files on the drive or copy files to the drive, some hidden files are created. Most of these files start with dot-dash ._ and then the filename of the original file, like:  ._test001.png ._test002.png ._test003.png   And most of the times, the famous ._.DS_Store and .DS_Store are also there.  On my Mac, these . dot items are invisible, but my windows colleagues do see these files. How can I prevent OS X from making these strange invisible files?  On  (and other internet sources) you can find a 'defaults write' to disable the creation of .DS_Store files on your network drives. But this does not work in Mavericks:  defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true   For now I use this oneliner, but doing a rm -rf does feel wrong in this case.  find . -type f -name "._*" -exec rm "{}" \;   Edit: I don't want to delete the files or exclude them from copying. I want them not to be created in the first place.  Edit: I prefer a 'native' OS X solution over third party apps.  Edit: This questions has two answers, one for the ._ files and one for the .DS_Store files. The bounty is rewarded for dot_clean, this native command line app cleans all ._ files. Unfortunately is does not clear the .DS_Store files, this can effectively be done with Asepsis. Asepsis stores .DS_Stores in a fixed location, and not in the folder itself. Preview: PDF Highlighting & Search Stop Working until Restart A problem has recently become much more prevalent for me when using Preview to search PDFs for text (using Command + F or the search box in the upper right).  At first, everything generally seems to go fine:    (as it should be) a list of thumbnails appears in the sidebar, indicating all of the pages that contain the search term. Generally, though not always, the term I search for will be highlighted on the first page that it occurs on.   But, after this, things quickly start malfunctioning:   Generally speaking, if I click on thumbnails lower on the list, Preview will take me to that page in the PDF (like it used to).  But, it will no longer highlight the searched for terms. Instead, Preview will make a low-pitched beeping noise of the sort that occurs when one tries to perform some un-permitted action in a variety of mac situations. Furthermore, once this occurs, I cease being able to make any highlights at all in the document I am viewing with Preview.  In fact, I can't even select any text any more.   Below is a list of unsuccessful efforts to resolve this:   Closing the side bar does not work to resolve this. x-ing out the search box in the upper right does not resolve this. Selecting the "Tools" menu and then "Text Selection" does not work either, nor does clicking on the text selection icon in the edit panel. If I quit preview and then re-open the PDF, I am able to highlight again.  But, the problem will re-surface as soon as I try performing another search. Working with the same files in other PDF programs (e.g. Skim, Acrobat, etc.) poses no problems.  I'm quite certain it isn't a problem with the underlying PDFs. None of the responses to  resolve this.  (indeed, I supplied one such response myself a while ago, but that trick and the others no longer work).   I've used Preview for many years without problem.  This issue started cropping up relatively recently for me, I believe within the past 3-4 months.  I had hoped that upgrading to Catalina might resolve it, but it did not.    I'd like to think I am fairly sophisticated with computers (I have a reputation of close to 8,000 on the main stackoverflow page), but I am baffled by this.  I also don't have a good handle on how I can get diagnostic information or how I can create a reproducible example.    Any leads on how to tackle this would be greatly appreciated. Ubuntu 16.04 VIM without python support! Although Ubuntu 16.04 release notes mention that:  The default VIM package has been built against python3 instead of python2.  Yet after I installed vim with the following command:  sudo apt-get install vim   And checked:  vim --version   It showed:  -python -python3   Is it a bug? How do I get vim with Python support? Why can't I cd to a quoted tilde ('~')? Writing my first script so I'm sure this is a basic question, but can someone please explain to me why I can:  cd ~ cd bin cd ~/bin cd 'bin'   But not  cd '~' cd '~/bin'   I need to cd to a directory path with a space in one of the directory names, so I need the quotes (it's Windows Program Files under wine). I can get around it with two cd commands, but why can't I put ~ in quotes?  If I type cd '~' (or cd "~") I get:  bash: cd: ~: No such file or directory How to get the spaces properly on the x axis, how to place the y values on the corresponding bars? I am using the following commands to draw a barchart.  \begin{tikzpicture}         \pgfplotstableread{ % Read the data into a table macro             Label       Female   Male               2006-2008    3     1              2007-2009    2     0             2008-2010    9     2             2019-2011    3     3             2010-2012    11    1              2011-2013    6     0             2012-2014    12    7             2013-2015    10    7             2014-2016    10    3         }\datatable          \begin{axis}[         compat=newest, %Better label placement %        axis on top,         ybar stacked,   % Stacked horizontal bars         xmin=0,              % Start x axis at 0         ymax=25,         ymin=0, ylabel={Number of students}, xlabel={Batches},bar width=10pt,         y axis line style={opacity=0},         yticklabels={\empty},         ytick style={draw=none},enlarge y limits={upper, value=0.2},         xtick=data,     % Use as many tick labels as x coordinates         enlarge x limits = .2,         xticklabels from table={\datatable}{Label}  % Get the labels from the Label column of the \datatable         ]         \addplot [fill=yellow] table [y=Male, x expr=\coordindex] {\datatable};    % Plot the "First" column against the data index         \addplot [fill=green!70!blue]table [y=Female, x expr=\coordindex] {\datatable}; %        \addplot [fill=red!80!yellow] table [y=Third, x expr=\coordindex] {\datatable}; \legend{Male,Female}         \end{axis}         \end{tikzpicture}   I got the picture as,     How to get the spaces properly on the x axis? How to place the y values on the corresponding bars? How to rotate the label 90 degree? How to take out the ticks on the top? Is there any other way of representing this data(two dim only)? (optional)   I hope all the questions can be answered in a single answer? My competitor is using Alexa to see what I am doing. I need to get stop Alexa from including my sites in their rankings. How can I do so?   Is it possible to deny access to any visitor with the Alexa toolbar and deny access to Alexa bot requests? How to extend my root (/) partition? What is the difference between HTML tags  and ? I would like to ask for some simple examples showing the uses of &lt;div&gt; and &lt;span&gt;.   I've seen them both used to mark a section of a page with an id or class, but I'm interested in knowing if there are times when one is preferred over the other. Discrete and compact subset must be finite