This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name := "testRequireJs" | |
version := "1.0-SNAPSHOT" | |
libraryDependencies ++= Seq( | |
jdbc, | |
anorm, | |
cache | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color] | |
status = auto | |
branch = auto | |
interactive = auto | |
diff = auto | |
[alias] | |
co = checkout | |
br = branch | |
ci = commit | |
st = status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php -r "echo htmlentities(htmlspecialchars('œ … ’'));" | |
œ … ’ | |
$ php test.php | |
œ … ’ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample.akka.testkit | |
import akka.actor.ActorSystem | |
import akka.actor.Actor | |
import akka.testkit.{TestKit, TestActorRef} | |
import org.scalatest.matchers.MustMatchers | |
import org.scalatest.WordSpec | |
class ImplicitSenderTest extends TestKit(ActorSystem("testSystem")) | |
// Using the ImplicitSender trait will automatically set `testActor` as the sender |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
_nS('controllers.admin.Products'); _root.controllers.admin.Products.search = | |
function() { | |
return _wA({method:"POST", url:"/" + "admin/product/search"}) | |
} | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Application extends Controller { | |
def async = Action { | |
IndexTestManager.index(IndexTest("1", "Here is the first name", "First category")) | |
IndexTestManager.index(IndexTest("2", "Then comes the second name", "First category")) | |
IndexTestManager.index(IndexTest("3", "Here is the third name", "Second category")) | |
IndexTestManager.index(IndexTest("4", "Finnaly is the fourth name", "Second category")) | |
IndexTestManager.refresh() | |
val indexQuery = IndexTestManager.query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models; | |
@Entity | |
public class Company extends Model { | |
@Id | |
public Long id; | |
public String name; | |
public static Finder<Long, Company> find = new Finder<Long, Company>(Long.class, Company.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_module_module_implements_alter(&$implementations, $hook) { | |
switch ($hook) { | |
case 'form_alter': | |
if (array_key_exists('my_module', $implementations)) { | |
// On veut que le hook_form_alter my_module soit le dernier exécuté | |
// On le remet à la fin du tableau | |
$my_module = $implementations['my_module']; | |
unset($implementations['my_module']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_module_form_alter(&$form, $form_state, $form_id) { | |
if ($form_id == 'page_node_form' && !user_access('administer content')) { | |
// Alter node edit form | |
$menu_items = $form['menu']['link']['parent']['#options']; | |
$menu_items_to_delete = array(); | |
$workbench_access_menus = workbench_access_get_user_tree(); | |
foreach ($menu_items as $menu_key => $menu_value) { | |
$ok = false; | |
foreach ($workbench_access_menus as $id => $workbench_access_menu) { |
NewerOlder