I have read up on this and tried it myself, but I cannot seem to figure out how to override a parent theme function using my child theme.  I need to know what I am doing wrong (and I am sure there are several wrong things).  Here is the function in the parent theme:  function html5_insert_image($html, $id, $caption, $title, $align, $url, $size, $alt) {     $url = wp_get_attachment_url($id);     $src = wp_get_attachment_image_src( $id, $size, false );     $html5 = "&lt;figure class='align$align'&gt;&lt;a href='$url'&gt;";     $html5 .= "&lt;img src='$src[0]' alt='$alt' /&gt;";     if ($caption) {          $html5 .= "&lt;figcaption&gt;$caption&lt;/figcaption&gt;";     }     $html5 .= "&lt;/a&gt;&lt;/figure&gt;";     return $html5; } add_filter( 'image_send_to_editor', 'html5_insert_image', 10, 9 );   Here is the function in the child theme:  function remove_html5_insert_image(){     remove_filter('init','html5_insert_image',1); } add_action('after_setup_theme','remove_html5_insert_image');
I've been reading around and trying to figure out how to do this, but for some reason I can't seem to override parent functions in my child theme.  I'm using TwentyTen as a parent - can anyone tell me why this function in my child theme isn't overriding the parent function please?  // Override read more link function osu_twentyten_continue_reading_link() {  return ' &lt;a href="'. get_permalink() . '"&gt;' . __( 'Read on &lt;span class="meta-nav"&gt;&amp;rarr;&lt;/span&gt;', 'twentyten-child' ) . '&lt;/a&gt;'; } function osu_twentyten_auto_excerpt_more( $more ) {  return ' &amp;hellip;' . osu_twentyten_continue_reading_link(); } remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' ); add_filter( 'excerpt_more', 'osu_twentyten_auto_excerpt_more' );   I thought you had to remove the filter/action etc. before re-adding it right?  Thanks,  osu
Completeness and Incompleteness Irreducible polynomial of degree $8$ Solving a Second Order Constant Matrix Differential Equation Given that $A$ is a constant coefficient matrix, how would one find a non-zero solution to the following equation: $$ x''+2Ax'+A^2x=0 $$ I am thinking this could incorporate systems of linear equations, but I am not sure how to use $x'=Ax$ or $x'=P(t)x +g(t)$ in this situation.   Any hints or suggestions are appreciated. I am trying to make a custom food recipe. I'm using spawn eggs with /replaceitem because spawn eggs are not obtainable in survival. This works fine when the player crafts only one spawn egg, but when I scroll over multiple spawn eggs, I receive only 1 of the custom food. BTW this food uses custommodeldata, so I can't simply add it into the crafting recipe. I cannot seem to find a way around this. If I make the item non-stackable, such as a piece of armor, mass crafting would be impossible. If I make an item.dropped scoreboard, the player could keep the item and use it to spawn mobs (griefing or for own profit.)  My command:    execute as @a[nbt={SelectedItem:{id:"minecraft:villager_spawn_egg"}}] run replaceitem entity @s weapon  minecraft:melon_slice{CustomModelData:10000101,display:{ Name:"{\"text\":\"Blue Melon Slice\",\"italic\":\"false\"}"}}     My problem is that the command does not see item count, as it is often used for weapons and armor only.    One way I thought to fix this issue is by storing the amount of custom food crafted in a scoreboard item and then giving the player that same count of the custom food, but I do not know how to do this; consequently, I don't know if this works.    Is there a way to do this method, or is there another, simpler method possible? I'm totally new to Ubuntu/Linux, using Ubuntu Server at the moment. Just trying to  figure out something basic.   How can you tell where you are installing a program. For example I just installed Sphinx search engine by placing the tarball that I downloaded from their site to my:  /home/sphinx   directory. I created the sphinx directory to place that tarball in. Then I ran these commands:  tar xvzf sphinx-0.9.8.1.tar.gz cd sphinx-0.9.8.1/ ./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql   and then these:  make sudo make install   Now I have a lot of files sitting in the directory where I ran these commands. Is this my Spynx installation or did it install somewhere else?  In windows if you run an installer (.exe file) anywhere the program will still install in your C:\Program Files directory. Does something similar apply to linux where all programs are installed in a central place, or can you install programs anywhere on the system.  Questions   I would prefer to keep all my installed programs in one place so what is the right place for this in terms of best practice. In other words what is the Linux equivalent of C:\Program Files? And how does one always install at this location, is it just a matter of placing the tarball and running the install commands from this location? What about if I use sudo apt-get to install a package. How can I point to this location to tell apt-get to always install there? Can I disable pinch to show all open tabs in Safari? What attracted Padmé to Anakin? problems installing mathtools How to deserialize a JSON String to Apex How can I deserialize this json object:      {     "response": {         "count": 1,         "benchmark": 0.22567009925842,         "requests": [             {                 "request": {                     "id": 537481,                     "image_thumbnail": "",                     "title": "Request for new bin(s) - residential",                     "description": "Propmain ref  3234-1114",                     "status": "submitted",                     "address": "36 Pine Tree Close",                     "location": "Peterborough, England",                     "zipcode": "PE1 1EJ",                     "user": "",                     "date_created": 1417173208,                     "count_comments": 0,                     "count_followers": 0,                     "count_supporters": 0,                     "lat": 52.599967,                     "lon": -0.233482,                     "user_follows": 0,                     "user_comments": 0,                     "user_request": 1,                     "rank": "0"                 }             }         ],         "status": {             "type": "success",             "message": "Success",             "code": 200,             "code_message": "Ok"         }     } }   What i've tried:   Map&lt;String,Object&gt; rawObj = (Map&lt;String,Object&gt;) JSON.deserializeUntyped(jsonString);     Map&lt;String,Object&gt; responseObj = (Map&lt;String,Object&gt;)rawObj.get('response');     List&lt;Object&gt; reqs = (List&lt;Object&gt;) responseObj.get('requests');     System.debug('Map Size = ' + reqs.size());     Map&lt;String, Object&gt; i = new Map&lt;String, Object&gt; ();     for (Object x : reqs) {          i = (Map&lt;String, Object&gt;)x; }     Map&lt;String,Object&gt; requests = (Map&lt;String,Object&gt;)i.get('request');     System.debug('Map Size = ' + i.size());     for (String field : i.keySet()){          Object id = i.get(field);         Object title = i.get('title');         System.debug('Id : ' + id);         System.debug('title : ' + title);          //System.debug('Title : ' + title);       } The English alphabet has a common pronunciation. For example, the letter b is pronounced like the word bee, the letter c like the word see, and the letter i like the word aye.  Is there a formal spelling for the letter names? I installed ubuntu 13.04 on my new notebook (that came with windows 8 installed) and now when I try to load windows 8 appear the error:  impossible to find command 'drivemap'. (this is in portuguese, I'm not sure if I translated it right invalid EFI file path.  ubuntu is working OK. someone knows what can I do to solve this and have both SO running? I have searched on the internet but couldn't find anything I could understand. can someone help me? Show if a user is online, idle, or offline on their account page? I want to display the status of the user on the account page. I added the following code in the theme I am using. It works, but users are never displayed offline. Why? What is wrong in the code? user.html.twig &lt;div class=&quot;bs-field-status&quot;&gt;   {% if status == 'Online' %}     &lt;i class=&quot;user-online fa fa-circle fa-lg&quot;&gt;&lt;/i&gt; Online   {% elseif status == 'Absent' %}     &lt;i class=&quot;user-absent fa fa-circle fa-lg&quot;&gt;&lt;/i&gt; Absent   {% else %}     &lt;i class=&quot;user-offline fa fa-circle fa-lg&quot;&gt;&lt;/i&gt; Offline   {% endif %} &lt;/div&gt;  bootstrap_subtheme_front_office.theme &lt;?php /**  * @file  * Bootstrap sub-theme.  *  * Place your custom PHP code in this file.  */  use Drupal\Core\Database\Database;  /**  * Implements hook_entity_presave().  */ function bootstrap_subtheme_front_office_preprocess_user(&amp;$variables) {   // get user object   $user = $variables['elements']['#user'];   //- The user has logged in at least once   if ($user-&gt;getLastLoginTime()) {     if (account_is_logged_in_less_then_thirty_minutes($user-&gt;id())) {       $status = 'Online';     }     else {       $status = 'Absent';     }   }   else {     $status = 'Offline';   }   $variables['status'] = $status; }  /**  * @param $uid  *  * @return bool  */ function account_is_logged_in_less_then_thirty_minutes($uid) {   $connection = Database::getConnection();   $query = $connection-&gt;select('sessions', 'sessions')     -&gt;fields('sessions', ['sid', 'uid', 'timestamp'])     -&gt;condition('sessions.uid', $uid, '=')     //- chef if the user was online in 30 minutes (60 * 30)     -&gt;condition('sessions.timestamp', \Drupal::time()         -&gt;getRequestTime() - (60 * 30), '&gt;')     -&gt;execute();   //- Get result.   $results = $query-&gt;fetchAll(\PDO::FETCH_OBJ);   return (count($results) &gt; 0) ? TRUE : FALSE; } Recently I'm working on a project aiming to convert the vibration of sound waves into electricity to charge batteries using a piezoelectric material (MFC type). I was trying to use the human voice as an input, but theoretically it was not enough, so do you have any ideas about some places that I can apply my project on it (that must be noisy or can give me vibrations)?  Moreover, has the MFC material been used before in this application? If I used many pieces of it in parallel would that help? Somewhere on Stack Exchange I saw the equation     $$\gcd(2^m-1,2^n-1)=2^{\gcd(m,n)}-1.$$   I had never seen this before, so I started trying to prove it. Without success...  Can anyone explain me (so actually prove) why this equation is true?  And can we say the same when replacing the '$2$' by any integer number '$a$'? I need to create file with name is the result of the command in Solaris I need to create only one file with name is the result of the command ls -l | head -2. I can't use environment variables. The filename must contain newline symbols.  I've tried to use touch 'ls -l | head -2', but it hasn't worked. how to prove $437\,$ divides $18!+1$? (NBHM 2012) I was solving some problems and I came across this problem. I didn't understand how to approach this problem. Can we solve this with out actually calculating $18!\,\,?$ Got a working screen via HDMI, but the DVI won't go past 1360x768 (a PackardBell Maestro monitor). Had no issues in Windows 7.  I've tried all the xrandr tricks, see the output below:   xrandr  Screen 0: minimum 8 x 8, current 3280 x 1080, maximum 16384 x 16384 VGA-0 disconnected (normal left inverted right x axis y axis) DVI-D-0 disconnected (normal left inverted right x axis y axis) HDMI-0 connected primary 1920x1080+1360+0 (normal left inverted right x axis y axis) 510mm x 287mm    1920x1080      60.0*+   59.9     50.0      1680x1050      60.0      1600x900       60.0      1440x900       59.9      1280x1024      75.0     60.0      1280x800       59.8      1280x720       60.0     59.9     50.0      1152x864       75.0      1024x768       75.0     70.1     60.0      800x600        75.0     72.2     60.3     56.2      720x576        50.0      720x480        59.9      640x480        75.0     72.8     59.9   DVI-D-1 connected 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm    1024x768       60.0 +    1360x768       60.0*    59.8      1152x864       60.0      800x600        72.2     60.3     56.2      680x384        60.0     59.8      640x480        59.9      512x384        60.0      400x300        72.2      320x240        60.1     cvt 1920 1080 # 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync  xrandr --newmode "test" 173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync  xrandr --addmode DVI-D-1 test X Error of failed request:  BadMatch (invalid parameter attributes)   Major opcode of failed request:  140 (RANDR)   Minor opcode of failed request:  18 (RRAddOutputMode)   Serial number of failed request:  37   Current serial number in output stream:  38    I'm using the latest driver from Nvidia (binary, 352.63) because Nouveau would show a black screen on my second monitor.  I got stuck on manually finding/creating a xorg.conf file and adding some monitor hacks, can anyone help me? I want to delete the record type which is default to the some profiles Record Type *Record Type Label    Sales Order *Record Type Name     Sales_Order  Namespace Prefix Description  Active        This record type Sales Order cannot be deactivated because the   following profiles use this record type as default.  This record type Sales Order cannot be deactivated because it is used by the following Objects.      Profiles- System Administrator, Standard User, CC_Customer Community   Plus Login Admin CC_Customer Community Plus Login User   CC_Marketing_Profile CC_Sales_Profile Chatter External User Chatter   Free User Chatter Moderator User Customer Community Plus Login User   Customer Community Plus User Deployment Manager Profile Read Only   Solution Manager Marketing User Contract Manager Pardot Sync User   Profile Objects CC_PO_Update Test_Utility   CC_CreateSalesOrderController_Test The X button stopped working on one of my PS3 controllers. It's hardly through abuse, the controller isn't a year old and I don't play a lot.  The button doesn't stick, it presses like the others, only the system isn't aware that I'm using it. I tried resetting it with the tiny reset button in the back, to no avail.  What can I do? How do you write something that was discussed in the past, while the issue still exists in the present?        The discussion resulted in the committee members highlighting crucial areas that need to be addressed.   The discussion resulted in the committee members highlighting crucial areas that needed to be addressed.      ......................     1'. The discussion resulted in the committee members highlighting crucial areas that need to be addressed if one is to achieve the desired outcome.      2'. The discussion resulted in the committee members highlighting   crucial areas that needed to be addressed if one were to   achieve the desired outcome.