View gist:94fdcfb6ac66dd33123b7387c50a5d67
import networkx as nx
import matplotlib.pyplot as plt
G1=nx.DiGraph()
list_nodes = [0, 1, 2, 3, 4]
G1.add_nodes_from(list_nodes)
list_arcs = [(0,1,5.0) , (0,2,3.0) , (0,4,2.0) , (1,2,2.0) , (1,3,6.0) , (2,1,2.0) , (2,3,2.0) , (4,1,6.0) , (4,2,10.0), (4,3,4.0)]
G1.add_weighted_edges_from(list_arcs)
sp = nx.dijkstra_path(G1,source = 1, target = 6)
View gist:d9441ce581129f197b3ed24c3a83e401
{
"count":24,
"next":null,
"previous":null,
"results":[
{
"id":"3169196548159068994",
"full_name":"fame2_autotests",
"full_name_upper":"fame2_autotests",
"avatar":null,
View gist:9ae7c11e239a97f47b9630739cb7ef39
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
</head>
<body>
View activity_create_post.xml
<ImageView
android:id="@+id/videoImageView"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:scaleType="centerCrop"
android:src="@drawable/ic_video_filled"
android:background="@drawable/bg_round_rect_blue"/>
View CreatePostActivity.kt
private fun setVideoThumbnail(thumbnail: Bitmap) {
pictureImageView.visibility = View.GONE
videoImageView.setImageBitmap(thumbnail)
videoPlayImageView.visibility = View.VISIBLE
cancelImageView.visibility = View.VISIBLE
checkPostingEnabled()
}
View BaseActivity.kt
open protected fun chooseFromGallery(videoEnabled: Boolean = false) {
canChooseVideo = videoEnabled
getPermissionHelper().requestGalleryPermission(GALERY_REQUEST) {
with(Intent(
Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI)) {
type = "video/*"
putExtra(Intent.EXTRA_LOCAL_ONLY, true)
startActivityForResult(this, GALLERY)
}
View Utils.java
public static String getAbsolutePathForVideoFromURI(@NonNull Context context, @NonNull Uri videoUri) {
if (ContentResolver.SCHEME_FILE.equals(videoUri.getScheme())) {
return videoUri.getPath();
} else if ("com.google.android.apps.photos.contentprovider".equals(videoUri.getAuthority())) {
String pathUri = videoUri.getPath();
videoUri = Uri.parse(pathUri.substring(pathUri.indexOf("content"), pathUri.lastIndexOf("/ORIGINAL")));
}
String id = getUriId(videoUri);
View gist:47e32f2458dcbccdc9b8e60e673eef67
------------------------
COMMAND : ADDFRIEND ahmet zeki
Error: Please sign in and try again.
------------------------
COMMAND : ADDFRIEND ahmet selman
Error: Please sign in and try again.
------------------------
COMMAND : ADDFRIEND ahmet murat
Error: Please sign in and try again.
------------------------
View gist:f80fdda0c496d6efa0d26fd85efe417a
Public void addToCart(Item i){
if (SoppingCart == null)
ShoppingCart = new ArrayList<Item>();
ShoppingCart.add(i)
}
View gist:5d6a63fc75b887c6625931a3583d0eeb
InternationCustomer ic =new InternationCustomer(Integer.parseInt(st1.nextToken()), st1.nextToken(), st1.nextToken());
customer1[customerSay] = ic;