Easy creation of properties that support indexing in C#
Is named indexer property possible?
Crop jpeg into circular tikz node \documentclass[demo]{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[circle,draw,inner sep=2cm]{\includegraphics{myimage.jpg}}; \end{tikzpicture} \end{document}   How do I modify the above code so that the included image is adapted to the circle shape and cropped of the exceeding parts?  I want to specify a shape (a circle) and then include an image respecting the given dimension and cropped. 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. java math calculation for coordinates of circle given radius of 1.00 House computer with AI takes over home, tries to procreate with woman Encouraging users to create an account (and keep it) I know SO's policy is &quot;you don't have to register to ask questions,&quot; but there are so many new members and so many hit-and-runs... The majority of the questions I see now are coming from new users (i.e., it's their first question). Although unregistered users should still be able to ask questions, I think we should encourage users to create an account. Here is a couple of ways we could do that:  Explicitly encourage people to get an account: there's currently nothing telling people to do that. Maybe tell people something like &quot;Get an account, it's easy!&quot; and maybe show some of the perks of having an account (and having rep).  Maybe give a few bonus points for registering; and have that enable a basic privilege. It could be taken from one of the , for example.   Of course getting people to register is just half of the battle. I don't know what the stats are on this, but I think there's a number of users who create multiple accounts anyways. We could curb that by:  Having smart(er)? duplicate account detection systems, alerting someone who is about to create a new account and possibly has an account already. Give them a message like &quot;Hey, it looks like you already have  account, are you sure you want to create a new one?&quot;  Create a new privilege (10k? 20k?) that gives users tools to detect possible duplicate accounts, eg: &quot;List users with the same e-mail,&quot; &quot;List users with the same IP addresses,&quot;  etc. (without revealing said emails and IPs). Then the 10k/20k can look at other stuff (e.g.: posts) and refer the new user to a moderator for a possible merge. How to export Polygons to CSV with coordinates? I am very new to QGIS, so please bear with me.  I have a ".shp" file, which is contains a set of boundaries for suburbs of Australia. I opened it to QGIS and I would like to export it into a CSV file so that the final file would be like following.  POSTCODE, LATITUDE, LONGITUDE  When I select "Layer > Open attribute table" I can see the "postcode" column.  I had a look at a similar question here     Which told me to simply go to "Layer > Save as" and then type "GEOMETRY=AS_XY" or "GEOMETRY=AS_XYZ" in the "Layer" section of the "OGR creation options".  I followed exactly, but the latitude and longitude values are not being returned. I recently got a new router, a DRL-600L Router from D-Link, and was setting up some filters to block out certain websites.  One problem I am having is blocking out addresses that use https instead of http.  For example, I'm trying to block out Facebook, because Facebook.   So far, the filter filters http://www.facebook.com perfectly fine, but for the url https://www.facebook.com, it won't block that.  How can I block those kinds of websites? Deploy Community Builder audience page assignments with ant migration tool? In Community Builder, if you create audiences and assign them to page variations, you cannot deploy these using change sets, according to .  In fact, Audience doesn't even appear in the list of change set components.  On the other hand, Audience metadata can be deployed using the ant migration tool, so I was hopeful that the audience assignments would also be deployable.  Unfortunately, I haven't had success in deploying any audience assignments, either for entire pages or for components on a page.  Has anyone found a workaround for deploying audience assignments for Community Builder pages?  I should say that I'm using the Build Your Own template.  If it can't be deployed, is there at least a way to get a list of audience assignments so I don't have to open every single page in the Community Builder to check?  Here's what I'm using in my package.xml manifest.  All the community builder page variations and all the audiences are created correctly, but the assignments are not.  &lt;types&gt;     &lt;members&gt;*&lt;/members&gt;     &lt;name&gt;Audience&lt;/name&gt; &lt;/types&gt; &lt;types&gt;     &lt;members&gt;*&lt;/members&gt;     &lt;name&gt;CustomSite&lt;/name&gt; &lt;/types&gt; &lt;types&gt;     &lt;members&gt;*&lt;/members&gt;     &lt;name&gt;SiteDotCom&lt;/name&gt; &lt;/types&gt; How would I prove that for all elements of a set {n | n ∈ ℕ ∧ n &gt; 7} (all natural numbers greater than 7), there are multiples of 3 and 5 which, when added up, are equal to that element of the set?  A := {n | n ∈ ℕ ∧ n &gt; 7} ∀ n ∈ A: n = x*3 + y*5   I do understand why this is true:   8 = 1*3 + 1*5 9 = 3*3 + 0*5 ...  15 = 0*3 + 3*5   and this pattern repeats once 16 is reached, as 8 can be replaced with 1*3 + 1*5, so I'd basically have to add 1 to x and y for every time 8 fits in n.  I am however not sure how I can formulate this mathematically correct.  Thanks in advance, CrushedPixel How to achieve this smudge effect in photoshop? Why does Worf want O'Brien to go to Minsk? Why are place names in some old books a capital letter followed by dashes, and what is this phenomenon called? This is something very odd I have noticed in some older books, most recently in "Crime and Punishment" by Dostoyevsky.  Place names, when not specifically essential or well-known, are made up of one letter followed by a line of underscores (i.e. "X_____").  I think I recall reading something similar in another older work, possibly by Jane Austin?  Apologies if this is a duplicate; I've searched quite extensively and can't seem to figure it out.  I don't know a name for this, so can't search easily for it. I have an issue with my Minecraft launcher - I downloaded modpack for minecraft then the launcher started an update for the modpack version which it's 1.6.2, however then I started to get the issue      [15:40:59 ERROR]: Gave up trying to download      for job 'Version &amp; Libraries'      [15:40:59 ERROR]: Job 'Version &amp; Libraries' finished with 26   failure(s)! (took 0:01:06.362)   At the same time I had just downloaded Avira antivirus and ran it, but unfortunately  removing it and trying again didn't help. I've tried to restore the system to the point before downloading the antvirus and the mod pack a 2 days ago, I've tried turning off the firewall and I have tried removing the whole .minecraft folder all with no luck at all. I can't figure it out, all the servers are working and I have good internet connection but some of the files download fine and other don't.  The full log is here:  [15:40:59 WARN]: Couldn't download https ://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar for job 'Version &amp; Libraries' java.net.SocketTimeoutException: connect timed out         at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) ~[?:1.7.0_45]         at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:1.7.0_45]         at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:1.7.0_45]         at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:1.7.0_45]         at java.net.PlainSocketImpl.connect(Unknown Source) ~[?:1.7.0_45]         at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:1.7.0_45]         at java.net.Socket.connect(Unknown Source) ~[?:1.7.0_45]         at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) ~[?:1.7.0_45]         at sun.net.NetworkClient.doConnect(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.HttpsClient.&lt;init&gt;(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.HttpsClient.New(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ~[?:1.7.0_45]         at java.net.HttpURLConnection.getResponseCode(Unknown Source) ~[?:1.7.0_45]         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) ~[?:1.7.0_45]         at net.minecraft.launcher.updater.download.ChecksummedDownloadable.download(ChecksummedDownloadable.java:49) ~[launcher.jar:?]         at net.minecraft.launcher.updater.download.DownloadJob.popAndDownload(DownloadJob.java:108) [launcher.jar:?]         at net.minecraft.launcher.updater.download.DownloadJob.access$000(DownloadJob.java:12) [launcher.jar:?]         at net.minecraft.launcher.updater.download.DownloadJob$1.run(DownloadJob.java:89) [launcher.jar:?]         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.7.0_45]         at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.7.0_45]         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.7.0_45]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.7.0_45]         at java.lang.Thread.run(Unknown Source) [?:1.7.0_45] [15:40:59 ERROR]: Gave up trying to download https ://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar for job 'Version &amp; Libraries' [15:40:59 ERROR]: Job 'Version &amp; Libraries' finished with 26 failure(s)! (took 0:01:06.362) JavaScript get clipboard data on paste event (Cross browser) Connecting to Oracle database with ArcGIS for Desktop? What are irreducibles in the ring $R$ of entire functions? Is there a way to start a PC with Ubuntu from the Keyboard? Because my button &quot;Power&quot; is broken. Why does time change in Ubuntu after installing Windows Today I was installing Windows 7 on the same computer I have Ubuntu. For some reason, after installing Windows 7 and going back to Ubuntu the time went from the correct hour at that moment, 12:30PM to 7:30AM. This happened after installing Windows 7. For what I understand the BIOS has a time set, Ubuntu has the same time that is shown in the BIOS when installing it. At least up to this point is what I have seen. Now after installing Windows 7 (And believe me this is only for testing the performance of Windows 7 against Ubuntu in which case Windows 7 is falling behind a lot on the same hardware) the time changes in Ubuntu to the wrong one that is set in Windows 7.  I actually do not change the time in Windows 7 since this is one of the checks I am doing to see if the operating system can correctly grab the time. Windows 7 fails. Ubuntu does not BUT Windows 7 actually changes the time for Ubuntu if I boot with it afterwards.  So my question is, why/how does time change in Ubuntu after installing Windows.  NOTE - I have set Ubuntu time to "manual" instead of grabbing it from the Internet just to test out this. What is the best place for storing binary files that are related to data in your database? Should you:   Store in the database with a blob Store on the filesystem with a link in the database Store in the filesystem but rename to a hash of the contents and store the hash on the database Something I've not thought of   The advantages of (1) are (among others) that atomicity of transactions is preserved. The cost is that you might dramatically increase storage (and associated streaming/backup) requirements  The goal of (3) is to preserve atomicity to some degree - if you can enforce that the filesystem you are writing to does not allow files to be changed or deleted, and always has the correct hash as filename. The idea would be to write the file to the filesystem before permitting the insert/update referencing the hash - if this transaction fails after the filesystem write but before the database DML, that is fine because the filesystem is 'faking' being the repository of all possible files and hashes - it doesn't matter if there are some files in there that are not being pointed to (and you could clean them up periodically if you are careful)  EDIT:  It looks like some RDBMSs have this covered in their individual ways - I'd be interested to know how others do it - and particularly in a solution for postgres link new object to scene with python in 2.8 In Python 2.8, I would like to create copies of the object 'CubeTemplate' but am having no luck.  I have reviewed every blender.stackexchange post on this subject (, ,  and ) but cannot get them to work - either they don't apply or the sample code throws errors (perhaps because it was pre 2.8).  The code below throws this error:       AttributeError: 'bpy_prop_collection' object has no attribute 'link'   for x in range(1, 3):     bpy.data.objects['CubeTemplate'].select_set(True)     bpy.context.view_layer.objects.active = bpy.data.objects['CubeTemplate']     me = bpy.context.object.data # use current object's data     me_copy = me.copy()     ob = bpy.data.objects.new('CubeCopy'+str(x), me_copy)     ob.location = (0, 0, x)     scene = bpy.context.scene     scene.objects.link(ob)     scene.update()