camera camera camera open camera camera camera open
play

# 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 =


  1. #

  2. • • • • • • • • • • • •

  3. Camera camera = Camera.open(); Camera camera = Camera.open(); camera.setDisplayOrientation(90); camera.setDisplayOrientation(90); 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);

  4. C# Java System.out.println("Hi"); Console.WriteLine("Hi") … …

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

  6.   

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

  8. Fundamental Problem

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

  10. D f.open (“f2” | “r”); f.read(); f.open (“file” | “r”); f.open (“f2” | “w”); f. ? f.write (“c”); f.open (“f1” | “r”); f.read(); P( open | f. ) ~ 3/6 P( read | f. ) ~ 2/6 P( write | f. ) ~ 1/6 𝜹

  11. D f.open (“f2” | “r”); f.read(); f.open (“file” | “r”); f.open (“f2” | “w”); f. open f.write (“c”); f.open (“f1” | “r”); f.read(); P( open | f. ) ~ 3/6 P( read | f. ) ~ 2/6 P( write | f. ) ~ 1/6 𝜹

  12. P( read | open ) ~ 2/3 P( write | open ) ~ 1/3 D 𝜹 f.open (“f2” | “r”); f.read(); f.open (“file” | “r”); f.open (“f2” | “w”); f. ? f.write (“c”); f.open (“f1” | “r”); f.read(); P( open | f. ) ~ 3/6 P( read | f. ) ~ 2/6 P( write | f. ) ~ 1/6 𝜹

  13. P( read | open ) ~ 2/3 P( write | open ) ~ 1/3 D 𝜹 f.open (“f2” | “r”); f.read(); f.open (“file” | “r”); f.open (“f2” | “w”); f. read f.write (“c”); f.open (“f1” | “r”); f.read(); P( open | f. ) ~ 3/6 P( read | f. ) ~ 2/6 P( write | f. ) ~ 1/6 𝜹

  14. P( read | open ) ~ 2/3 P( write | open ) ~ 1/3 D 𝜹 f.open (“f2” | “r”); f.read(); f.open (“file” | “r”); f.open (“f2” | “w”); f. ? f.write (“c”); f.open (“f1” | “r”); f.read(); P( open | f. ) ~ 3/6 P( read | f. ) ~ 2/6 P( write | f. ) ~ 1/6 𝜹

  15. → 𝜹 key idea: synthesize a function f:

  16. f best = argmin cost( D , f ) f best ∊ D f ∊ ( ) f best f best 𝜹

  17. elem.notify({ CallExpression position: ‘top’, autoHide: false, MemberExpression ObjectExpression delay: 100 }); Identifier Property Property Property Property elem notify position autoHide delay String Boolean ‘ top’ false

  18. 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 𝜹 ← 𝜹 ∙

  19. f best f best = argmin cost( D , f ) f ∊

  20. f best f D TCond ::= 𝜁 | WriteOp TCond | MoveOp TCond MoveOp ::= Up, Left, Right, ... WriteOp ::= WriteValue, WriteType, ... ≈ 10 8 f best = argmin cost( D , f ) f ∊ P D f P(element | f ( )) cost( D , f) = ( P ) 𝑃( 𝐸 )

  21. f best to predict program f best 𝜹 Left {} elem.notify( ... , WriteValue {hide} ... , Up {hide} { WritePos {hide, 3} position: ‘top’, Up {hide, 3} hide: false, DownFirst {hide, 3} ? DownLast {hide, 3} } WriteValue {hide, 3, notify} );

  22. D : f best 22.2% 30.4% 66.6%

  23. D : f best Hutter Prize Wikipedia Dataset uses a char-level DSL with state : 1.94 1.67 1.62 1.60 51% 1.44 51% 1.40 51%

  24. • • •

  25. ∈ TCond ::= 𝜁 | WriteOp TCond | MoveOp TCond MoveOp ::= Up, Left, Right, DownFirst, DownLast, NextDFS, PrevDFS, NextLeaf, PrevLeaf, PrevNodeType, PrevNodeValue, WriteOp ::= WriteValue, WriteType, WritePos f best = argmin cost( D , f ) f best ∊ f ∊ f best ( ) f best 𝜹

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend