Html – Preventing wp from removing br and p tags

Is there a way to prevent WP from removing br and p tags from posts or pages ? so far I’ve added remove_filter(‘the_content’, ‘wpautop’); to my functions.php file which completely disables formatting. However when i edit a post or page, and in the HTML editor add br or p tags then switch back to visual… Read More »

Category: Uncategorized

Error 2 The system cannot find the file specified in Sublime Text 2, Windows 8

Just installed Sublime Text 2, try to build hello world program, and get this message: [Error 2] The system cannot find the file specified [cmd: [u’g++’, u”, u’-o’, u’/’]] [dir: C:Windowssystem32] [path: C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0] [Finished] What do I need to do to compile a program correctly in ST2? Best Solution Solved. Sublime Text 2 needs g++,… Read More »

Category: Uncategorized

The difference between == and === in Dart

Does Dart support == and === ? What is the difference between equality and identity? Best Solution Dart supports == for equality and identical(a, b) for identity. Dart no longer supports the === syntax. Use == for equality when you want to check if too objects are “equal”. You can implement the == method in… Read More »

Category: Uncategorized

C# – Linq Select: Using a value from a list if available

I am going to use some basic stripped down examples to illustrate my problem. I have a class: class Item { int ID; bool Selected; } Now lets say I have two lists of the Item class: List<Item> ListA = GetListA(); List<Item> ListB = GetListB(); Now I want to create a third list that has… Read More »

Category: Uncategorized

Java – Android – org.ksoap2.soapfault cannot be cast

I’m trying to access a Java Web Service from Android client, but it is showing me an error: “java.lang.classcastexception org.ksoap2.soapfault cannot be cast to org.ksoap2.serialization.soapobject” Can you help me? Here is my client web service code: import java.lang.reflect.Method; import android.app.Activity; import android.os.Bundle; import android.content.Context; import android.content.Intent; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.Window; import… Read More »

Category: Uncategorized

Don’t rewrite static css/js/img files

I’m trying to get my htaccess file not to rewrite my static files (js/css/images). This is my current htaccess file: RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule !.(jpg|css|js|gif|png)$ public/ [L] RewriteRule !.(jpg|css|js|gif|png)$ public/index.php?url=$1 How do I rewrite it? Best Solution RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^.*.(jpg|css|js|gif|png)$ [NC] RewriteRule ^(.*)$ public/index.php?url=$1 All… Read More »

Category: Uncategorized

C Program measure execution time for an instruction

I need to find the time taken to execute a single instruction or a few couple of instructions and print it out in terms of milli seconds. Can some one please share the small code snippet for this. Thanks.. I need to use this measure the time taken to execute some instructions in my project.… Read More »

Category: Uncategorized

Supporting typeahead autocomplete with ElasticSearch

Is there a standard way to implement character-by-character typeahead autocomplete using ElasticSearch for small fields (e.g. place names). (At the time of writing this, there are a number of discussions available via search, but nothing that seems definitive. (Also, I see there is talk of the effect of feature support for autocomplete/suggest in Apache Lucene… Read More »

Category: Uncategorized

Git svn – Unrecognized URL scheme error

I’m getting the following error on attempt to clone svn rep with git svn: eugene$ git svn clone https://my.site/svn/ here Initialized empty Git repository in /Users/eugene/Documents/workspace/test/here/.git/ Bad URL passed to RA layer: Unrecognized URL scheme for ‘https://my.site/svn’ at /usr/local/git/lib/perl5/site_perl/Git/SVN.pm line 148. svn checkout https://my.site/svn/ works just fine. I’ve re-run cpan SVN::Core and install finished fine,… Read More »

Category: Uncategorized