# Camera camera = Camera.open(); - - PowerPoint PPT Presentation

camera camera camera open camera camera camera open
SMART_READER_LITE
LIVE PREVIEW

# Camera camera = Camera.open(); - - PowerPoint PPT Presentation

# Camera camera = Camera.open(); Camera camera = Camera.open(); camera.setDisplayOrientation(90); camera.setDisplayOrientation(90); camera.unlock(); SurfaceHolder holder =


slide-1
SLIDE 1
slide-2
SLIDE 2

#

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7

slide-8
SLIDE 8

camera.unlock(); SurfaceHolder holder = getHolder(); holder.addCallback(this); holder.setType(SurfaceHolder.STP); MediaRecorder r = new MediaRecorder(); r.setCamera(camera); r.setAudioSource(MediaRecorder.AS); r.setVideoSource(MediaRecorder.VS); r.setOutFormat(MediaRecorder.MPEG4); Camera camera = Camera.open(); camera.setDisplayOrientation(90); Camera camera = Camera.open(); camera.setDisplayOrientation(90);

slide-9
SLIDE 9
slide-10
SLIDE 10

Console.WriteLine("Hi") … System.out.println("Hi"); …

C# Java

slide-11
SLIDE 11

function FZ(e, t) { var n = []; var r = e.length; var i = 0; for (; i < r; i += t) if (i + t < r) n.push(e.substring(i, i + t)); else n.push(e.substring(i, r)); return n; } function chunkData(str, step) { var colNames = []; var len = str.length; var i = 0; for (; i < len; i += step) if (i + step < len) colNames.push(str.substring(i, i + step)); else colNames.push(str.substring(i, len)); return colNames; }

slide-12
SLIDE 12

  

slide-13
SLIDE 13

package a.b.c class a extends SQLiteHelper { SQLiteDatabase b; public a(Context ctx) { b = getWritableDatabase(); } Cursor c(String str) { return b.rawQuery(str); }} package com.example.dbhelper class DBHelper extends SQLiteHelper { SQLiteDatabase db; public DBHelper(Context ctx) { db = getWritableDatabase(); } Cursor execSQL(String str) { return db.rawQuery(str); } }

slide-14
SLIDE 14
slide-15
SLIDE 15

Fundamental Problem

slide-16
SLIDE 16

f.open(“file” | “r”);

  • f. ?

D

f.open(“f2” | “r”); f.read(); f.open(“f1” | “r”); f.read(); f.open(“f2” | “w”); f.write(“c”);

slide-17
SLIDE 17

f.open(“file” | “r”);

  • f. ?

P(open | f. ) ~ 3/6 P(read | f. ) ~ 2/6 P(write | f. ) ~ 1/6

𝜹

f.open(“f2” | “r”); f.read();

D

f.open(“f1” | “r”); f.read(); f.open(“f2” | “w”); f.write(“c”);

slide-18
SLIDE 18

f.open(“file” | “r”);

  • f. open

P(open | f. ) ~ 3/6 P(read | f. ) ~ 2/6 P(write | f. ) ~ 1/6

𝜹

f.open(“f2” | “r”); f.read();

D

f.open(“f1” | “r”); f.read(); f.open(“f2” | “w”); f.write(“c”);

slide-19
SLIDE 19

f.open(“file” | “r”);

  • f. ?

P(read | open ) ~ 2/3 P(write | open ) ~ 1/3

𝜹

P(open | f. ) ~ 3/6 P(read | f. ) ~ 2/6 P(write | f. ) ~ 1/6

𝜹

D

f.open(“f2” | “r”); f.read(); f.open(“f1” | “r”); f.read(); f.open(“f2” | “w”); f.write(“c”);

slide-20
SLIDE 20

f.open(“file” | “r”);

  • f. read

P(read | open ) ~ 2/3 P(write | open ) ~ 1/3

𝜹

P(open | f. ) ~ 3/6 P(read | f. ) ~ 2/6 P(write | f. ) ~ 1/6

𝜹

D

f.open(“f2” | “r”); f.read(); f.open(“f1” | “r”); f.read(); f.open(“f2” | “w”); f.write(“c”);

slide-21
SLIDE 21

f.open(“file” | “r”);

  • f. ?

P(read | open ) ~ 2/3 P(write | open ) ~ 1/3

𝜹

P(open | f. ) ~ 3/6 P(read | f. ) ~ 2/6 P(write | f. ) ~ 1/6

𝜹

D

f.open(“f2” | “r”); f.read(); f.open(“f1” | “r”); f.read(); f.open(“f2” | “w”); f.write(“c”);

slide-22
SLIDE 22
slide-23
SLIDE 23

key idea: synthesize a function f:

→ 𝜹

slide-24
SLIDE 24

( )

fbest

fbest ∊ D fbest

fbest = argmin cost(D, f)

f ∊

𝜹

slide-25
SLIDE 25

elem.notify({ position: ‘top’, autoHide: false, delay: 100 });

Identifier elem Property notify Property position Property autoHide MemberExpression ObjectExpression CallExpression Property delay String ‘top’ Boolean false

slide-26
SLIDE 26

TCond ::= 𝜁 | WriteOp TCond | MoveOp TCond MoveOp ::= Up, Left, Right, DownFirst, DownLast, NextDFS, PrevDFS, NextLeaf, PrevLeaf,PrevNodeType, PrevNodeValue, PrevNodeContext WriteOp ::= WriteValue, WriteType, WritePos

Up Left WriteValue

𝜹 ← 𝜹 ∙

slide-27
SLIDE 27

fbest

fbest = argmin cost(D, f) f ∊

slide-28
SLIDE 28

fbest = argmin cost(D, f) f ∊

TCond ::= 𝜁 | WriteOp TCond | MoveOp TCond MoveOp ::= Up, Left, Right, ... WriteOp ::= WriteValue, WriteType, ...

P D

≈ 108

f cost(D, f) = (P)

D f P(element | f ( ))

𝑃( 𝐸 )

fbest

slide-29
SLIDE 29

elem.notify( ... , ... , { position: ‘top’, hide: false, ? } );

fbest to predict

Left WriteValue Up WritePos Up DownFirst DownLast WriteValue {} {hide} {hide} {hide, 3} {hide, 3} {hide, 3} {hide, 3} {hide, 3, notify} program

fbest

𝜹

slide-30
SLIDE 30

22.2% 30.4% 66.6%

D: fbest

slide-31
SLIDE 31

D: fbest

Hutter Prize Wikipedia Dataset uses a char-level DSL with state

1.62 1.67 51% 1.60 51% 1.44 51% 1.40 1.94

:

slide-32
SLIDE 32
slide-33
SLIDE 33

( ) fbest

fbest ∊ fbest

TCond ::= 𝜁 | WriteOp TCond | MoveOp TCond MoveOp ::= Up, Left, Right, DownFirst, DownLast, NextDFS, PrevDFS, NextLeaf, PrevLeaf, PrevNodeType, PrevNodeValue, WriteOp ::= WriteValue, WriteType, WritePos

fbest = argmin cost(D, f) f ∊ 𝜹