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
public class CacheConfig extends CachingConfigurerSupport { | |
public void init() { | |
innerConnectionFactoryInitaaaa(); | |
} | |
} |
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
class Animal { | |
def say = { println("I am an animal") } | |
} | |
trait Furry extends Animal { | |
abstract override def say = { super.say; println("I am a furry animal") } | |
} | |
trait HasLegs extends Animal { | |
abstract override def say = { super.say; println("I have legs") } | |
} | |
trait FourLegs extends HasLegs { |
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
import akka.actor._ | |
import scala.concurrent.duration._ | |
import scala.collection.immutable | |
// received events | |
case class SetTarget(ref: ActorRef) | |
case class Queue(obj: Any) | |
case object Flush | |
// sent events | |
case class Batch(obj: immutable.Seq[Any]) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" | |
src="http://maps.google.com/maps/api/js?sensor=false"> | |
</script> | |
<script type="text/javascript"> | |
var geocoder; | |
var map; |
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
var geocoder; | |
var map; | |
var infowindow = new google.maps.InfoWindow(); | |
function initialize() { | |
geocoder = new google.maps.Geocoder(); | |
var latlng = new google.maps.LatLng(-34.397, 150.644); | |
var myOptions = { | |
zoom: 8, | |
center: latlng, | |
mapTypeId: google.maps.MapTypeId.ROADMAP |
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
有人用过cell么? | |
<span style="font-size: small;"><a target="_blank" href="http://rubyforge.org/frs/?group_id=2978&release_id=9650">http://rubyforge.org/frs/?group_id=2978&release_id=9650</a> | |
<br /></span> | |
<br /><span style="font-size: small;"> </span> | |
<br /><span style="font-size: small;"> | |
<br />非常小,源代码一目了然。感觉虽然有点土,但比自己做个module的方式好一点点 | |
<br />号称: 代替发挥component作用的controller, 这样就不需要邪恶的render_component了 | |
<br /></span> | |
<br /><span style="font-size: small;">A cell acts as a lightweight controller in the sense that it will assign variables and render a view.</span> |
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
var AI = {}; | |
new function(){ | |
AI.Pattern= pattern; | |
// 定义了 8 个偏移量 | |
// 可以简单通过加法得到任一点周围 8 个点的坐标 | |
// -11 -10 -9 | |
// -1 x 1 | |
// 9 10 11 | |
// 如左上角的坐标为 x + (-11) | |
var directions=[-11,-10,-9,-1,1,9,10,11]; |
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
obj-m := exercise2.o | |
KDIR :=/lib/modules/$(shell uname -r)/build | |
PWD :=$(shell pwd) | |
all: | |
$(MAKE) -C $(KDIR) M=$(PWD) modules | |
clean: | |
$(MAKE) -C $(KDIR) M=$(PWD) clean |
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
#include <stdlib.h> | |
int main() | |
{ | |
system("echo 'this is a test' > /proc/13081070/keke"); | |
} |
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
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/proc_fs.h> | |
#include <linux/sched.h> | |
#include <linux/uaccess.h> | |
#define STRINGLEN 1024 | |
char global_buffer[STRINGLEN]; | |
struct proc_dir_entry *example_dir, *hello_file, *current_file, *symlink; |
NewerOlder