This file contains hidden or 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
<h1 class="text-center">新增討論版</h1> | |
<div class="col-md-4 col-md-offset-4"> | |
<hr> | |
<%= simple_form_for @group do |f| %> | |
<div class="form-group"> | |
<%= f.input :title, input_html: {class: "form_controll"} %> | |
<%= f.input :description, input_html: {class: "form_controll"} %> | |
</div> |
This file contains hidden or 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 com.example.myfunction; | |
import android.app.AlertDialog; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.LinearLayout; |
This file contains hidden or 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 void writeFile(String dir, String filename, String string) { | |
FileWriter fw; | |
try { | |
File f = new File(dir, filename); | |
if (!f.exists()) { | |
f.createNewFile(); | |
} | |
fw = new FileWriter(f, true); | |
fw.append(string); | |
fw.close(); |
This file contains hidden or 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
private void writeObject(File file, Object object) { | |
try { | |
FileOutputStream fos = new FileOutputStream(file); | |
ObjectOutputStream oos = new ObjectOutputStream(fos); | |
oos.writeObject(object); | |
oos.close(); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} |
NewerOlder