constructor: (@user) -> console.addHistory("DetailsLayout","INIT") super() @bindTo(Hub.vent, "notes:selected",(note) => @showNote(note)) @bindTo(Hub.vent, "notes:show", => @showNotes()) @bindTo(Hub.vent, "notes:save", (note) => @saveNote(note)) @bindTo(Hub.vent, "notes:delete", (note) => @deleteNote(note)) @bindTo(Hub.vent, "notes:new", => @showNote(new Note()))
Note container = new Note(); container.setBody("Don't forget me this weekend!"); container.setFrom("Jeni"); container.setHeading("Reminder"); container.setTo("Tony");
Note note1 = new Note(); note1.setContent("my first note"); Note note2 = new Note(); note2.setContent("my second note"); User user = new User(); user.setName("Andrei"); user.addNote(note1); user.addNote(note2); session.save(user);
Note note = new Note(); note.setTitle("Android test note"); note.addToResources(resource); EvernoteUtil.NOTE_SUFFIX; note.setContent(content);
public static void saveData() { Noteendpoint.Builder endpointBuilder = new Noteendpoint.Builder( AndroidHttp.newCompatibleTransport(), new JacksonFactory(), new HttpRequestInitializer() { public void initialize(HttpRequest httpRequest) { } }); Noteendpoint endpoint = CloudEndpointUtils.updateBuilder( endpointBuilder).build(); try { Note note = new Note().setDescription("Note Description"); String noteID = new Date().toString(); note.setId(noteID); note.setEmailAddress("E-Mail Address"); Note result = endpoint.insertNote(note).execute(); } catch (IOException e) { e.printStackTrace(); } }
Scanner in = new Scanner(System.in); int t = in.nextInt(); in.nextLine(); for (int c = 0; c < t; c++) { String word = in.nextLine(); Note note = new Note(word); System.out.println("Note " + c + " says: " + note.getContent()); }
import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; public class XStreamJunitTest { @Before public void setUp() throws Exception { } @After public void tearDown() throws Exception { } @Test public void test() { Note note = new Note("TestTo", "TestFrom", "TestHeading", "TestBody"); TestXStream testXStream = new TestXStream(); note = testXStream.getNoteFromXML(testXStream.getXMLFromObject(note)); assertNotNull(note.getBody()); }
@Configurable public class NoteStorageUtil{ @Named("NoteDAO") @Inject private NoteDAO noteDAO; public StorageState takeNote(String note) { try { l.info(format("Service received message: '%s'", note)); Note n = new Note(); n.setContent(note); noteDAO.store(n); } catch (Exception e) { l.error(e); return StorageState.FAILURE; } return StorageState.SUCCESS; } } @WebService(name = "NoteStorage", serviceName = "NoteStorageWS") public class NoteStorageWS implements NoteStore { public StorageState takeNote(String note) { return new NoteStorageUtil().takeNote(note) } }
package com.x.y; public class NoteDAO extends GenericDAO<Note> { public void persist(){ save(new Note()); } }
constructor: (@user) -> console.addHistory("DetailsLayout","INIT") super() Hub.vent.on("notes:selected",(note) => @showNote(note)) Hub.vent.on("notes:show", => @showNotes()) Hub.vent.on("notes:save", (note) => @saveNote(note)) Hub.vent.on("notes:delete", (note) => @deleteNote(note)) Hub.vent.on("notes:new", => @showNote(new Note()))
new Note(); // this one create 1-frame.. ... // Note mainWindow = new Note(); this one also create another frame so need to comment it // mainWindow.createContent(); does not required because already this method called by constructor...
var note = new Note() note.toJSON(); //=> {title: "Untitled", message: "Lorem ipsum dolor..."}
var note = new Note("a", "c"); note.displayNote();// it will automatically alert. Otherwise you'll have two alerts. The second one being undefined.
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_receive); titleTextView = (TextView) findViewById(R.id.receiving_title); descTextView = (TextView) findViewById(R.id.receiving_desc); Bundle bundle = getIntent().getExtras(); UUID mId = (UUID) bundle.getSerializableExtra("ID"); Log.d("Test", "From Receive" + mId); mNote = new Note(mId); Log.d("Test", "ID " + mNote.getId()); Log.d("Test", "TITLE " + mNote.getTitle()); titleTextView.setText(mNote.getTitle()); descTextView.setText(mNote.getDesc()); }
database = new Database(getBaseContext(),"notes", 1); database.add (Note.class, new Table<Note> (database, Note.class)); database.table(Note.class).save (new Note("first note")); database.table(Note.class).save (new Note("second note")); database.table(Note.class).save (new Note("best note")); items.addAll(database.table(Note.class).load());
self.notes.push(new Note()); self.strings = this.strings++; }.bind(self);
})(); var note = new Note();