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(); | |
} |
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
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
<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
class BrowseController < ApplicationController | |
def index | |
path = "public/apk_pool/"+ params[:folder] +"/*" | |
@apks = Dir.glob(path) | |
@apks.each do |apk| | |
puts apk | |
end | |
end | |
def show |
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
import xml.etree.ElementTree as ET | |
tree = ET.parse("arrays.xml") | |
ET.dump(tree) | |
tree.write("new_strins.xml") |
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
var request = [ | |
profileUtil.createUser('[email protected]', 'qwer1234', 'test', 'Company'), | |
profileUtil.createUser('[email protected]', 'qwer1234', 'test2', 'Company'), | |
]; | |
request[0].then(function(value) { | |
return request[1]; | |
}) | |
.then(function(value) { | |
return request[2]; |
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
var mo = require('./module')(); | |
console.log(mo); | |
var who = mo.A; | |
console.log(who); | |
who.name ='wal2er'; | |
console.log(who); | |
console.log(mo); |
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
version: "2" | |
services: | |
overworld: | |
image: dstacademy/dontstarvetogether | |
container_name: overworld | |
hostname: overworld | |
tty: true | |
stdin_open: true | |
command: dst-server start --update=all | |
env_file: ./overworld.env |
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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: telepresence-rammus | |
spec: | |
selector: | |
owner: rammus | |
type: LoadBalancer | |
ports: | |
- name: http |
OlderNewer