This file contains 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
@NonNull | |
private String getMemoryString() { | |
int memoryClass = ((ActivityManager) getSystemService(ACTIVITY_SERVICE)).getMemoryClass(); | |
int largeMemoryClass = ((ActivityManager) getSystemService(ACTIVITY_SERVICE)).getLargeMemoryClass(); | |
// メモリ情報を取得 | |
ActivityManager activityManager = (ActivityManager)getSystemService(ACTIVITY_SERVICE); | |
ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo(); | |
activityManager.getMemoryInfo(memoryInfo); |
This file contains 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 class MultiLineSwitchPreference extends SwitchPreference { | |
public MultiLineSwitchPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { | |
super(context, attrs, defStyleAttr, defStyleRes); | |
} | |
public MultiLineSwitchPreference(Context context, AttributeSet attrs, int defStyleAttr) { | |
super(context, attrs, defStyleAttr); | |
} |
This file contains 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
System.out.println("test"); |
This file contains 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 models; | |
import play.mvc.*; | |
import play.libs.*; | |
import play.libs.F.*; | |
import scala.concurrent.Await; | |
import scala.concurrent.duration.Duration; | |
import akka.actor.*; | |
import static akka.pattern.Patterns.ask; |
This file contains 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 static WebSocket<JsonNode> chat(final String username) { | |
return new WebSocket<JsonNode>() { | |
// Called when the Websocket Handshake is done. | |
public void onReady(WebSocket.In<JsonNode> in, WebSocket.Out<JsonNode> out){ | |
// Join the chat room. | |
try { | |
ChatRoom.join(username, in, out); | |
} catch (Exception ex) { |
This file contains 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 static WebSocket<JsonNode> chat(final String username) { | |
return new WebSocket<JsonNode>() { | |
// Called when the Websocket Handshake is done. | |
public void onReady(WebSocket.In<JsonNode> in, WebSocket.Out<JsonNode> out){ | |
// Join the chat room. | |
try { | |
ChatRoom.join(username, in, out); | |
} catch (Exception ex) { |
This file contains 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 static Result chatRoom(String username) { | |
if(username == null || username.trim().equals("")) { | |
flash("error", "Please choose a valid username."); | |
return redirect(routes.Application.index()); | |
} | |
return ok(chatRoom.render(username)); | |
} |
This file contains 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 references; | |
import java.lang.ref.*; | |
public class Main { | |
public static void main(String[] args) { | |
Sheryl strongRef = new Sheryl();//① | |
WeakReference<Sheryl> weakRef = new WeakReference<Sheryl>(strongRef);//② |
This file contains 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
export HEROKU_API_KEY=xxxxxxxxxxxxxx |
This file contains 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
NSLog(@"Hello World"); |