2019년 4월 27일 토요일

South Africa Lotto SA Lotto #Lotto #South #Africa





https://play.google.com/store/apps/details?id=gotopark.com.SAlotto



SA Lotto

South Africa lottery(National Lottery)



✔ Daily Lotto

✔ Lotto

✔ Lotto plus 1

✔ Lotto plus 2

✔ Power Ball

✔ Power Ball plus

✔ Number generator and show results

✔ Check the winning numbers

✔ Check winning number of this week between your generated numbers.

✔ Save Generated Numbers Save List

✔ Share your numbers with Family and friends



Thank you for download

(^ㅡ^)(__ __)(^ㅡ^)

2019년 4월 26일 금요일

순차 어레이 잘라네기

순차 어레이 잘라네기
 import java.util.ArrayList;  
 import java.util.List;  
 public class parted1 {  
   public static <T> List<List<T>> chopped(List <T> list, final int L) {  
     List<List<T>> parts = new ArrayList<List<T>>();  
     final int N = list.size();  
     for (int i = 0; i < N; i += L) {  
       parts.add(new ArrayList<T>(  
           list.subList(i, Math.min(N, i + L)))  
       );  
     }  
     return parts;  
   }  
 }  

2019년 4월 23일 화요일

안드로이드 파일 저장 소스

안드로이드 파일 저장 소스
 package gotopark.buster.miniloto.Modules;  
 import android.annotation.SuppressLint;  
 import android.app.Activity;  
 import android.util.Log;  
 import java.io.BufferedReader;  
 import java.io.BufferedWriter;  
 import java.io.File;  
 import java.io.FileReader;  
 import java.io.FileWriter;  
 import java.text.SimpleDateFormat;  
 import java.util.AbstractList;  
 import java.util.Date;  
 import gotopark.buster.miniloto.MainActivity;  
 @SuppressLint("Registered")  
 public class Lotsave {  
   @SuppressLint("StaticFieldLeak")  
   private static MainActivity activity;  
   @SuppressLint("SimpleDateFormat")  
   private static String TimeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());  
   public Lotsave(Activity context) {  
     activity = (MainActivity) context;  
   }  
   public static void setFile(String input1, int input2) {  
     File file = new File(activity.getFilesDir(), "file.txt");  
     FileWriter fw = null;  
     BufferedWriter bufwr = null;  
 //    @SuppressLint("SimpleDateFormat")  
 //    String TimeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());  
     Log.e("================", "==========" + input1);  
 //    input1 = input1 + "," + TimeStamp;  
     if (input2 == 0) {  
       input1 = (String) dataPlus(input1);  
     }  
     try {  
       // open file.  
       fw = new FileWriter(file);  
       bufwr = new BufferedWriter(fw);  
       // write data to the file.  
       bufwr.write(input1);  
     } catch (Exception e) {  
       e.printStackTrace();  
     }  
     // close file.  
     try {  
       if (bufwr != null)  
         bufwr.close();  
       if (fw != null)  
         fw.close();  
     } catch (Exception e) {  
       e.printStackTrace();  
     }  
   }  
   private static String dataPlus(String string) {  
     String LoadData = setLoad();  
     Log.e("================", "=====LoadData=====" + LoadData);  
     LoadData = LoadData + ":" + string;  
     Log.e("================", "=====LoadData=====" + LoadData);  
     return LoadData;  
   }  
   @SuppressLint("Assert")  
   public static String setLoad() {  
     File file = new File(activity.getFilesDir(), "file.txt");  
     FileReader fr = null;  
     BufferedReader bufrd = null;  
     String str = null;  
     if (file.exists()) {  
       try {  
         // open file.  
         fr = new FileReader(file);  
         bufrd = new BufferedReader(fr);  
         while ((str = bufrd.readLine()) != null) {  
           AbstractList<String> items = null;  
           assert false;  
           items.add(str);  
         }  
         bufrd.close();  
         fr.close();  
       } catch (Exception e) {  
         e.printStackTrace();  
       }  
     }  
     return str;  
   }  
 }