Skip to content

Instantly share code, notes, and snippets.

View danielkmariam's full-sized avatar

Daniel Kidanemariam danielkmariam

  • London
View GitHub Profile
name := """play-training"""
organization := "com.example"
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.12.6"
libraryDependencies += guice
Compilation error
not found: type Circe
In /Users/danielk/projects/scala/play-training/app/controllers/HomeController.scala:14
10 * This controller creates an `Action` to handle HTTP requests to the
11 * application's home page.
12 */
13@Singleton
14class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) with Circe {
15
package controllers
import io.circe.generic.auto._
import io.circe.syntax._
import javax.inject._
import play.api._
import play.api.mvc._
/**
* This controller creates an `Action` to handle HTTP requests to the
<?php
// Initialize
$app = new SimpleHttpClient('http://uk.sodastream.int.sessiondigital.com/xmlconnect/');
$app->addCookie('app_code', 'uk_iph6');
$app->addCookie('screen_size', '600x400');
// Get gas cylinder products
<div class="how-to-apply">
<h3><?php echo $this->__('How to apply') ?></h3>
<ul class="how-to-apply-intructions">
<li>Minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum blandit praesent luptatum zzril delenit augue duis dolore.</li>
<li>Iriure dolor in hendrerit in vulputate velit esse molestie consequat.</li>
<li>Vel illum dolore eu feugiat nulla facilisis at vero eros. Minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum blandit praesent luptatum zzril delenit augue duis dolore.</li>
</ul>
</div>
nextStep: function(transport){
jQuery('.checkout-block-button button').mxLoaderOverlay('hide');
jQuery('#shipping-method-please-wait').hide();
if (transport && transport.responseText){
try{
response = eval('(' + transport.responseText + ')');
}
catch (e) {
response = {};
/**
* Returns the collection of posts
*
* @param array $categorySlugs Slug value of categories
* @param array $tagSlugs Slug value of tags
*
* @return Fishpig_Wordpress_Model_Mysql4_Post_Collection
*/
public function getPosts($categorySlugs = array(), $tagSlugs = array(), $filter=false)
{
public function setPartialSelect($type='category', $postTag='post_tag')
{
$cataoryPosts = $this->getCatagoryPosts($type, $postTag);
echo get_class($catagoryPosts);
$tagPosts = $this->getTaggedPosts($type, $postTag);
$this->getSelect()->reset()->union(array(
$cataoryPosts,
<?php $authors = Mage::getResourceModel('wordpress/user_collection') ?>
<?php if (count($authors) > 0): ?>
<ul>
<?php foreach($authors as $author): ?>
<li>
<a href="<?php echo $author->getUrl() ?>"><?php echo $author->getDisplayName() ?></a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
[vagrant@localhost scripts]$ php syspro.php sales_order_status_import
PHP Fatal error: Cannot redeclare class Mage_Core_Model_Resource_Db_Abstract in /mnt/project/Magento/app/code/community/Fishpig/Wordpress/Helper/LegacyHacks.php on line 22
PHP Stack trace:
PHP 1. {main}() /mnt/project/Magento/app/code/local/Cussons/Syspro/scripts/syspro.php:0
PHP 2. Cussons_Syspro_Shell_Runner->run() /mnt/project/Magento/app/code/local/Cussons/Syspro/scripts/syspro.php:7
PHP 3. Cussons_Syspro_Shell_Runner->_runInterface() /mnt/project/Magento/app/code/local/Cussons/Syspro/Shell/Runner.php:44
PHP 4. Cussons_Syspro_Model_Interface_Abstract->run() /mnt/project/Magento/app/code/local/Cussons/Syspro/Shell/Runner.php:50
PHP 5. Cussons_Syspro_Model_Interface_ImportAbstract->processStore() /mnt/project/Magento/app/code/local/Cussons/Syspro/Model/Interface/Abstract.php:40
PHP 6. Cussons_Syspro_Model_Interface_SalesOrderStatusImport->importItems() /mnt/project/Magento/app/code/local/Cussons/Syspro/Model/Interface/ImportA