How to write my own regex
Learning Regular Expressions
How to get the Runtime-Type of an Object dynamically (for Primitive Data Types and SObjects) Is it possible to get the Type of an Object (it's not an SObject)?  String s = 'test'; doSomething(s);  public static void doSomething(o Object) {     // need to find out if o is a string or an integer     type = IsThereAMethodToGetTheTypeOf(o) // ?     if(type='String') {         // do something for strings here ....     } else {         // do something else ....     } }   I think the Type class can't help me, because it has no way to get the type of an existing object instance, right? Any there any other way?  Since there is most likely no perfect solution possible within the current platform limitations, I posted an Idea on IdeaExchange here:   For SObject I have already this  public static string getType(SObject obj) {     if(obj==null) return '';     return obj.getSObjectType().getDescribe().getName()+''; } Smaller membership symbol To mean that x is an element of X, we can write x \in X. However, in the standard packages, the membership symbol that results is too big; it draws too much attention to itself. This is especially evident when we're doing set theory and writing sets as lowercase, as in x \in y. Does anyone one how to draw a less attention-seeking membership symbol? In languages like Java and C#, strings are immutable and it can be computationally expensive to build a string one character at a time.  In said languages, there are library classes to reduce this cost such as C# System.Text.StringBuilder and Java java.lang.StringBuilder.  Does php (4 or 5; I'm interested in both) share this limitation?  If so, are there similar solutions to the problem available? Are there any free/open source alternatives to Adobe After Effects? I've been a illustrator and graphic designer for a number of years and now I'm looking to go more into motion graphics and visual effects. Is there anything that is open source/free (not a demo, education version or trial) that is as complex and feature-rich as Adobe After Effects but for Linux? I've tried Cinlerra, kdenlive, openshot and Blender and whilst they are good at video editing (and 3d modelling in Blender's case) they fall short in effects and compositing features.  I've also tried , but the project recently closed and the last update was quite buggy.  Also,  doesn't work and hasn't been updated in many many years, so don't mention it ;-) Can I cross the USA-Canada border with a birth certificate and a passport locator number? My US passport took too long to be shipped to me, and it will arrive after I need to leave. Will I be able to cross the border from the United States to Canada with a birth certificate (copy) and a passport locator number? Navigation bar is too long on progressbar theme, can it wrap? My navigation bar at the top of each slide (that links to each section) has too many sections. I would like to keep the bar and keep each section but I would like to wrap it i.e. have it on two lines.  Is that possible?  I am using compress and I am using  as a theme. I remember reading this book back in late 90's. It is about a slave that gathers some friends and goes into a desert to find/fight a dragon. There is also a revolt/uprising in the slaves' home town. I can't remember if this is a single book or a trilogy.  I think the rulers were called Sorcerer-lords or Sorcerer-Kings. And I remember one character was called Boris or Borys. Delete or remove all history, commits, and branches from a remote Git repo? Is there any hint that some of the beings in Tolkien's lore may have survived into "our" times? In Tolkien's lore, they are many very old beings. Is there any indication that some or even one would have been truly immortal and survived into what we would call "our" history or Age? Galadriel, Cirdan, Ingwe, Bombadil, Ungoliant, or any Maia or Ainur? Anyone or anything? Seems there must be some kind of carry-over seeing as how "man" existed in this time. How to get layer extent in OpenLayers or zoom to WMS layer extent? I have added WMS layers using follow:  basemap = new OpenLayers.Layer.WMS( "Layer Name1", "http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername'} );   utility = new OpenLayers.Layer.WMS( "Layer Name2", "http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername', transparent:"true"}, {isBaseLayer:false} );   Now I want to get zoom to my utility layer, How can I?  I have tried as following:  map.zoomToExtent(utility.getDataExtent()); Show Capslock on Windows 8 Difference between "does have" and "has" Possible Duplicate:                 What is the difference between does have and has? For example, compare she does have a car and she has a car. Why is no root pass needed to access MariaDB after upgrade to Ubuntu 16.04? Execute script after specific delay using JavaScript Is there any JavaScript method similar to the jQuery delay() or wait() (to delay the execution of a script for a specific amount of time)? Guest (not logged in) users can only sort questions with specific tag by newest I think this is platform wide (all SE sites).   Logout Choose a tag, eg.  on SO Try to sort questions by something other than newest   No matter what sorting is chosen, questions are sorted by newest Is it possible to dual boot two OS's at the same time? Is it possible to dual boot two OS's at the same time?  For example: I'm currently dual booting Ubuntu 11.04 and Windows 7. Ubuntu is running on a single 500gb HDD, Windows 7 is running on 1TB RAID 1 mirror. To switch between the two OS's, a reboot is required. Is it possible to switch between the two OS's without a reboot?  NOTE: I'm fully aware of the capabilities of VirtualBox and VMWare Player - I use both. Please don't answer "Use Virtualization!"  EDIT: If this is not possible can you share why it's not possible? To me, it doesn't seem like it would be that difficult. Keep in mind that my vision is unencumbered by knowledge! Subdivision Surface on curved mesh I'm trying to delete those ugly lines visible in the cylindrical shape of the lens. What is causing them is the added edge loops I made for the protruding detail with the switch. The problem is that if I delete those edges, it'll look even worse because of the n-gons. Any ideas? when does a functor map products into products? Italics markup not working in comments If I enter the following mark-down source:  “*blah*”   into a question or answer, then it works, but in a comment it doesn’t. The asterisks remain literal and don’t turn into italics. How to remove selected commit log entries from a Git repository while keeping their changes? I would like to remove selected commit log entries from a linear commit tree, so that the entries do not show in the commit log.  My commit tree looks something like:  R--A--B--C--D--E--HEAD   I would like to remove the B and C entries so that they do not show in the commit log, but changes from A to D should be preserved. Maybe by introducing a single commit, so that B and C become BC and the tree looks like.  R--A--BC--D--E--HEAD   Or, ideally, after A comes D directly. D' representing changes from A to B, B to C and C to D.  R--A--D'--E--HEAD   Is this possible? if yes, how?  This is a fairly new project so has no branches as of now, hence no merges as well.