repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
uPhyca/robota
robota/src/main/java/com/uphyca/robota/service/PostTextService.java
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java // public abstract class InjectionUtils { // // private InjectionUtils() { // } // // public static ObjectGraph getObjectGraph(Context context) { // return RobotaApplication.class.cast(context.getApplicationContext()) // ...
import android.app.IntentService; import android.content.Context; import android.content.Intent; import android.net.Uri; import com.uphyca.idobata.Idobata; import com.uphyca.idobata.IdobataError; import com.uphyca.robota.InjectionUtils; import javax.inject.Inject;
/* * Copyright (C) 2014 uPhyca Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java // public abstract class InjectionUtils { // // private InjectionUtils() { // } // // public static ObjectGraph getObjectGraph(Context context) { // return RobotaApplication.class.cast(context.getApplicationContext()) // ...
InjectionUtils.getObjectGraph(this)
uPhyca/robota
robota/src/main/java/com/uphyca/robota/ui/InstalledEnginesActivity.java
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java // public abstract class InjectionUtils { // // private InjectionUtils() { // } // // public static ObjectGraph getObjectGraph(Context context) { // return RobotaApplication.class.cast(context.getApplicationContext()) // ...
import android.app.Activity; import android.app.ListFragment; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.Bundle; import android.view.View; import android.widget....
/* * Copyright (C) 2014 uPhyca Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java // public abstract class InjectionUtils { // // private InjectionUtils() { // } // // public static ObjectGraph getObjectGraph(Context context) { // return RobotaApplication.class.cast(context.getApplicationContext()) // ...
InjectionUtils.getObjectGraph(getActivity())
uPhyca/robota
robota/src/main/java/com/uphyca/robota/ui/InstalledEnginesActivity.java
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java // public abstract class InjectionUtils { // // private InjectionUtils() { // } // // public static ObjectGraph getObjectGraph(Context context) { // return RobotaApplication.class.cast(context.getApplicationContext()) // ...
import android.app.Activity; import android.app.ListFragment; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.Bundle; import android.view.View; import android.widget....
Executor mDispatcher; @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); InjectionUtils.getObjectGraph(getActivity()) .inject(this); mExecutor.execute(new Runnable() { ...
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java // public abstract class InjectionUtils { // // private InjectionUtils() { // } // // public static ObjectGraph getObjectGraph(Context context) { // return RobotaApplication.class.cast(context.getApplicationContext()) // ...
List<ResolveInfo> resolveInfos = pm.queryBroadcastReceivers(new Intent(Robota.ACTION_MESSAGE_CREATED), 0);
uPhyca/robota
robota/src/main/java/com/uphyca/robota/ui/OssLicensesActivity.java
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java // public abstract class InjectionUtils { // // private InjectionUtils() { // } // // public static ObjectGraph getObjectGraph(Context context) { // return RobotaApplication.class.cast(context.getApplicationContext()) // ...
import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.app.FragmentManager; import android.app.ListFragment; import android.content.res.Resources; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; im...
private static final String ARGS_TITLE = "title"; private static final String ARGS_FILE_NAME = "file_name"; public static LicenseDialogFragment newInstance(String title, String fileName) { LicenseDialogFragment f = new LicenseDialogFragment(); Bundle args = new Bundle()...
// Path: robota/src/main/java/com/uphyca/robota/InjectionUtils.java // public abstract class InjectionUtils { // // private InjectionUtils() { // } // // public static ObjectGraph getObjectGraph(Context context) { // return RobotaApplication.class.cast(context.getApplicationContext()) // ...
InjectionUtils.getObjectGraph(getActivity())
uPhyca/robota
robota/src/main/java/com/uphyca/robota/data/ExponentialBackoff.java
// Path: robota/src/main/java/com/uphyca/robota/data/api/BackoffPolicy.java // public interface BackoffPolicy { // // void backoff(); // // void reset(); // // long getNextBackOffMillis(); // // boolean isFailed(); // } // // Path: robota/src/main/java/com/uphyca/robota/data/api/Environment.java //...
import com.uphyca.robota.data.api.BackoffPolicy; import com.uphyca.robota.data.api.Environment;
/* * Copyright (C) 2014 uPhyca Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
// Path: robota/src/main/java/com/uphyca/robota/data/api/BackoffPolicy.java // public interface BackoffPolicy { // // void backoff(); // // void reset(); // // long getNextBackOffMillis(); // // boolean isFailed(); // } // // Path: robota/src/main/java/com/uphyca/robota/data/api/Environment.java //...
private final Environment mEnvironment;
cocolove2/LISDemo
library-lis/src/main/java/uk/co/senab/photoview/PhotoView.java
// Path: library-lis/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public static interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * //...
import uk.co.senab.photoview.PhotoViewAttacher.OnMatrixChangedListener; import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Matrix; import android.grap...
public void setMaximumScale(float maximumScale) { mAttacher.setMaximumScale(maximumScale); } @Override // setImageBitmap calls through to this method public void setImageDrawable(Drawable drawable) { super.setImageDrawable(drawable); if (null != mAttacher) { mAtt...
// Path: library-lis/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public static interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * //...
public void setOnMatrixChangeListener(OnMatrixChangedListener listener) {
cocolove2/LISDemo
library-lis/src/main/java/uk/co/senab/photoview/PhotoView.java
// Path: library-lis/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public static interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * //...
import uk.co.senab.photoview.PhotoViewAttacher.OnMatrixChangedListener; import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Matrix; import android.grap...
} } @Override public void setImageResource(int resId) { super.setImageResource(resId); if (null != mAttacher) { mAttacher.update(); } } @Override public void setImageURI(Uri uri) { super.setImageURI(uri); if (null != mAttacher) { ...
// Path: library-lis/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public static interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * //...
public void setOnPhotoTapListener(OnPhotoTapListener listener) {
cocolove2/LISDemo
library-lis/src/main/java/uk/co/senab/photoview/PhotoView.java
// Path: library-lis/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public static interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * //...
import uk.co.senab.photoview.PhotoViewAttacher.OnMatrixChangedListener; import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener; import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Matrix; import android.grap...
@Override public void setImageURI(Uri uri) { super.setImageURI(uri); if (null != mAttacher) { mAttacher.update(); } } @Override public void setOnMatrixChangeListener(OnMatrixChangedListener listener) { mAttacher.setOnMatrixChangeListener(listener); }...
// Path: library-lis/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public static interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * //...
public void setOnViewTapListener(OnViewTapListener listener) {
cocolove2/LISDemo
library-lis/src/main/java/com/cocolover2/lis/activity/LisSimpleListImgsActivity.java
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java // public class LISConstant { // // public static final String ALL_IMG_BUCKET = "所有图片"; // public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview"; // public static final String CATEGORY_SUFFIX = ".category.PREVIEW";...
import android.content.Intent; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.widget.Button; import android.widget.ImageView; import com.cocolover2.lis.LISConstant; import com.cocolover2.lis.interf.OnSelectResultListener; import com.cocolover2.lis.R;
initPreBtn(selectedCount); } private void initPreBtn(int selectedCount) { if (selectedCount > 0) { preBtn.setText("预览(" + selectedCount + ")"); preBtn.setEnabled(true); preBtn.setTextColor(getResources().getColor(android.R.color.white)); } else { ...
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java // public class LISConstant { // // public static final String ALL_IMG_BUCKET = "所有图片"; // public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview"; // public static final String CATEGORY_SUFFIX = ".category.PREVIEW";...
Intent intent = new Intent(LISConstant.ACTION_PRE);
cocolove2/LISDemo
library-lis/src/main/java/com/cocolover2/lis/activity/LisBasePreviewPagerActivity.java
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java // public class LISConstant { // // public static final String ALL_IMG_BUCKET = "所有图片"; // public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview"; // public static final String CATEGORY_SUFFIX = ".category.PREVIEW";...
import android.os.Bundle; import android.os.Parcelable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInf...
package com.cocolover2.lis.activity; public abstract class LisBasePreviewPagerActivity<T> extends AppCompatActivity { private FrameLayout topLayout, bottomLayout; private ImagePagerAdapter mAdapter; private int startPos; private ArrayList<T> mImgDatas;
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java // public class LISConstant { // // public static final String ALL_IMG_BUCKET = "所有图片"; // public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview"; // public static final String CATEGORY_SUFFIX = ".category.PREVIEW";...
private OnPagerUpdateListener pagerUpdateListener;
cocolove2/LISDemo
library-lis/src/main/java/com/cocolover2/lis/activity/LisBasePreviewPagerActivity.java
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java // public class LISConstant { // // public static final String ALL_IMG_BUCKET = "所有图片"; // public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview"; // public static final String CATEGORY_SUFFIX = ".category.PREVIEW";...
import android.os.Bundle; import android.os.Parcelable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInf...
package com.cocolover2.lis.activity; public abstract class LisBasePreviewPagerActivity<T> extends AppCompatActivity { private FrameLayout topLayout, bottomLayout; private ImagePagerAdapter mAdapter; private int startPos; private ArrayList<T> mImgDatas; private OnPagerUpdateListener pagerUpdat...
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java // public class LISConstant { // // public static final String ALL_IMG_BUCKET = "所有图片"; // public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview"; // public static final String CATEGORY_SUFFIX = ".category.PREVIEW";...
mImgDatas = (ArrayList<T>) getIntent().getParcelableArrayListExtra(LISConstant.PRE_IMG_DATAS);
cocolove2/LISDemo
library-lis/src/main/java/com/cocolover2/lis/activity/LisBasePreviewPagerActivity.java
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java // public class LISConstant { // // public static final String ALL_IMG_BUCKET = "所有图片"; // public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview"; // public static final String CATEGORY_SUFFIX = ".category.PREVIEW";...
import android.os.Bundle; import android.os.Parcelable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInf...
getSupportActionBar().hide(); } initView(); onMyCreate(savedInstanceState); } public T getItem(int position) { return mImgDatas.get(position); } protected void setOnPagerUpdateListener(OnPagerUpdateListener listener) { pagerUpdateListener = listener;...
// Path: library-lis/src/main/java/com/cocolover2/lis/LISConstant.java // public class LISConstant { // // public static final String ALL_IMG_BUCKET = "所有图片"; // public static final String ACTION_PRE = "com.cocolover2.lis.ACTION_preview"; // public static final String CATEGORY_SUFFIX = ".category.PREVIEW";...
final HackyViewPager mViewPager = (HackyViewPager) findViewById(R.id.previewpager_viewpager_pager);
cocolove2/LISDemo
app/src/main/java/com/lisdemo/MyPreActivity.java
// Path: library-lis/src/main/java/com/cocolover2/lis/interf/OnPagerUpdateListener.java // public interface OnPagerUpdateListener { // void onSelect(int position); // // void onDeleted(int position); // } // // Path: library-lis/src/main/java/com/cocolover2/lis/activity/LisSimplePreviewPagerActivity.java // p...
import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.cocolover2.lis.interf.OnPagerUpdateListener; import com.cocolover2.lis.activity.LisSimplePreviewPagerActivity; import com.cocolover2.lis.entity.ImageItem;
select.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mItem.isSelected) { removeSelectItem(mItem); sizeTv.setVisibility(View.INVISIBLE); select.setImageResource(R.draw...
// Path: library-lis/src/main/java/com/cocolover2/lis/interf/OnPagerUpdateListener.java // public interface OnPagerUpdateListener { // void onSelect(int position); // // void onDeleted(int position); // } // // Path: library-lis/src/main/java/com/cocolover2/lis/activity/LisSimplePreviewPagerActivity.java // p...
private OnPagerUpdateListener pagerSelectListener = new OnPagerUpdateListener() {
cocolove2/LISDemo
library-lis/src/main/java/com/cocolover2/lis/AlbumHelper.java
// Path: library-lis/src/main/java/com/cocolover2/lis/entity/ImageBucket.java // public class ImageBucket{ // public int count = 0; // public String bucketName;//文件夹名 // public ArrayList<ImageItem> imageList;//文件夹下所有文件的绝对路径 // public boolean isSelected = false;//文件夹是否被选中 // } // // Path: library-lis/sr...
import android.content.Context; import android.database.Cursor; import android.provider.MediaStore.Images.Media; import com.cocolover2.lis.entity.ImageBucket; import com.cocolover2.lis.entity.ImageItem; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.Map;
package com.cocolover2.lis; public final class AlbumHelper { //存储文件夹名,和文件夹内容 private HashMap<Integer, ImageBucket> bucketMap = new HashMap<>(); //所有的图片集合
// Path: library-lis/src/main/java/com/cocolover2/lis/entity/ImageBucket.java // public class ImageBucket{ // public int count = 0; // public String bucketName;//文件夹名 // public ArrayList<ImageItem> imageList;//文件夹下所有文件的绝对路径 // public boolean isSelected = false;//文件夹是否被选中 // } // // Path: library-lis/sr...
private ArrayList<ImageItem> imageList = new ArrayList<>();
cocolove2/LISDemo
library-lis/src/main/java/com/cocolover2/lis/LocalImageLoader.java
// Path: library-lis/src/main/java/com/cocolover2/lis/utils/ImageCache.java // public class ImageCache { // private static LruCache<String, Bitmap> mCache; // // private ImageCache() { // } // // public static LruCache<String, Bitmap> getInstance() { // if (mCache == null) // synch...
import android.graphics.Bitmap; import android.os.Handler; import android.os.HandlerThread; import android.os.Message; import android.widget.AbsListView; import android.widget.ImageView; import com.cocolover2.lis.utils.ImageCache; import com.cocolover2.lis.utils.ImageUtils; import java.util.LinkedList; import java.util...
* @param imageView */ public void loadImage(final String path, final ImageView imageView, int defaultImgId) { if (isScrolling) { if (defaultImgId != 0) imageView.setImageResource(defaultImgId); } if (isFling) { return; } // s...
// Path: library-lis/src/main/java/com/cocolover2/lis/utils/ImageCache.java // public class ImageCache { // private static LruCache<String, Bitmap> mCache; // // private ImageCache() { // } // // public static LruCache<String, Bitmap> getInstance() { // if (mCache == null) // synch...
Bitmap bm = ImageUtils.compressImgBySize(path, imgWidth,
cocolove2/LISDemo
library-lis/src/main/java/com/cocolover2/lis/LocalImageLoader.java
// Path: library-lis/src/main/java/com/cocolover2/lis/utils/ImageCache.java // public class ImageCache { // private static LruCache<String, Bitmap> mCache; // // private ImageCache() { // } // // public static LruCache<String, Bitmap> getInstance() { // if (mCache == null) // synch...
import android.graphics.Bitmap; import android.os.Handler; import android.os.HandlerThread; import android.os.Message; import android.widget.AbsListView; import android.widget.ImageView; import com.cocolover2.lis.utils.ImageCache; import com.cocolover2.lis.utils.ImageUtils; import java.util.LinkedList; import java.util...
if (mType == Type.FIFO) { return mTasks.removeFirst(); } else if (mType == Type.LIFO) { return mTasks.removeLast(); } return null; } /** * 单例获得该实例对象 * * @return */ public static LocalImageLoader getInstance(int threadCount, Type ty...
// Path: library-lis/src/main/java/com/cocolover2/lis/utils/ImageCache.java // public class ImageCache { // private static LruCache<String, Bitmap> mCache; // // private ImageCache() { // } // // public static LruCache<String, Bitmap> getInstance() { // if (mCache == null) // synch...
return ImageCache.getInstance().get(key_prefix + key);
ripreal/V8LogScannerWeb
src/main/java/org/v8LogScanner/dbLayer/scanProfilesPersistence/ScanProfileHibService.java
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.v8LogScanner.dbLayer.genericRepository.DataRepository; import org.v8LogScanner.dbLayer.genericRepository.QuerySpecification; import or...
package org.v8LogScanner.dbLayer.scanProfilesPersistence; @Service @Transactional
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
public class ScanProfileHibService implements ScanProfileService {
ripreal/V8LogScannerWeb
src/main/java/org/v8LogScanner/dbLayer/scanProfilesPersistence/ScanProfileHibService.java
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.v8LogScanner.dbLayer.genericRepository.DataRepository; import org.v8LogScanner.dbLayer.genericRepository.QuerySpecification; import or...
package org.v8LogScanner.dbLayer.scanProfilesPersistence; @Service @Transactional public class ScanProfileHibService implements ScanProfileService { @Autowired
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
private DataRepository<ScanProfileHib> repository;
ripreal/V8LogScannerWeb
src/main/java/org/v8LogScanner/dbLayer/scanProfilesPersistence/ScanProfileHibService.java
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.v8LogScanner.dbLayer.genericRepository.DataRepository; import org.v8LogScanner.dbLayer.genericRepository.QuerySpecification; import or...
package org.v8LogScanner.dbLayer.scanProfilesPersistence; @Service @Transactional public class ScanProfileHibService implements ScanProfileService { @Autowired private DataRepository<ScanProfileHib> repository; public ScanProfileHibService(DataRepository<ScanProfileHib> repository) { this.repos...
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
QuerySpecification<ScanProfileHib> spec = new ScanProfileHibSpecByName(profile.getName());
ripreal/V8LogScannerWeb
src/main/java/org/v8LogScanner/dbLayer/scanProfilesPersistence/ScanProfileHibService.java
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.v8LogScanner.dbLayer.genericRepository.DataRepository; import org.v8LogScanner.dbLayer.genericRepository.QuerySpecification; import or...
package org.v8LogScanner.dbLayer.scanProfilesPersistence; @Service @Transactional public class ScanProfileHibService implements ScanProfileService { @Autowired private DataRepository<ScanProfileHib> repository; public ScanProfileHibService(DataRepository<ScanProfileHib> repository) { this.repos...
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
QuerySpecification<ScanProfileHib> spec = new ScanProfileHibSpecByName(profile.getName());
ripreal/V8LogScannerWeb
src/main/java/org/v8LogScanner/dbLayer/scanProfilesPersistence/ScanProfileHibService.java
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.v8LogScanner.dbLayer.genericRepository.DataRepository; import org.v8LogScanner.dbLayer.genericRepository.QuerySpecification; import or...
@Override public int add(ScanProfile profile) { return (int) repository.add((ScanProfileHib) profile); } @Override public void remove(ScanProfile profile) { repository.remove((ScanProfileHib) profile); } @Override public void update(ScanProfile profile) { reposi...
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
QuerySpecification<ScanProfileHib> spec = new ScanProfileHibSpecByID(id);
ripreal/V8LogScannerWeb
src/main/java/org/v8LogScanner/dbLayer/scanProfilesPersistence/ScanProfileHibService.java
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.v8LogScanner.dbLayer.genericRepository.DataRepository; import org.v8LogScanner.dbLayer.genericRepository.QuerySpecification; import or...
} @Override public ScanProfile find(ScanProfile profile) { QuerySpecification<ScanProfileHib> spec = new ScanProfileHibSpecByName(profile.getName()); List<ScanProfileHib> profiles = repository.query(spec); if (profiles.size() > 0) { ScanProfile prof = profiles.get(0); ...
// Path: src/main/java/org/v8LogScanner/dbLayer/genericRepository/DataRepository.java // public interface DataRepository<T> { // // public Serializable add(T object); // // public void remove(T object); // // public void update(T object); // // public void resetCache(); // // public List<T> que...
QuerySpecification<ScanProfileHib> spec = new ScanProfileHibSpecIfPresent();
christ66/cobertura
cobertura/src/main/java/net/sourceforge/cobertura/instrument/CoberturaFile.java
// Path: cobertura/src/main/java/net/sourceforge/cobertura/util/ArchiveUtil.java // public abstract class ArchiveUtil { // // /** // * Return true if the given name ends with .jar, .zip, // * .war, .ear, or .sar (case insensitive). // * // * @param name The file name. // * // * @return true if the name is...
import net.sourceforge.cobertura.util.ArchiveUtil; import java.io.File;
/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/...
// Path: cobertura/src/main/java/net/sourceforge/cobertura/util/ArchiveUtil.java // public abstract class ArchiveUtil { // // /** // * Return true if the given name ends with .jar, .zip, // * .war, .ear, or .sar (case insensitive). // * // * @param name The file name. // * // * @return true if the name is...
return ArchiveUtil.isArchive(pathname);
christ66/cobertura
cobertura/src/main/java/net/sourceforge/cobertura/instrument/pass3/TestUnitCodeProvider.java
// Path: cobertura/src/main/java/net/sourceforge/cobertura/Cobertura.java // public class Cobertura { // public static String TestClassAndMethodNamesMerged = ""; // } // // Path: cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/TestUnitInformationHolder.java // public class TestUnitInformationHolder { /...
import net.sourceforge.cobertura.Cobertura; import net.sourceforge.cobertura.coveragedata.TestUnitInformationHolder; import org.objectweb.asm.*;
/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2013 Steven Christou * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it...
// Path: cobertura/src/main/java/net/sourceforge/cobertura/Cobertura.java // public class Cobertura { // public static String TestClassAndMethodNamesMerged = ""; // } // // Path: cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/TestUnitInformationHolder.java // public class TestUnitInformationHolder { /...
.getInternalName(Cobertura.class),
christ66/cobertura
cobertura/src/main/java/net/sourceforge/cobertura/instrument/pass3/TestUnitCodeProvider.java
// Path: cobertura/src/main/java/net/sourceforge/cobertura/Cobertura.java // public class Cobertura { // public static String TestClassAndMethodNamesMerged = ""; // } // // Path: cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/TestUnitInformationHolder.java // public class TestUnitInformationHolder { /...
import net.sourceforge.cobertura.Cobertura; import net.sourceforge.cobertura.coveragedata.TestUnitInformationHolder; import org.objectweb.asm.*;
/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2013 Steven Christou * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it...
// Path: cobertura/src/main/java/net/sourceforge/cobertura/Cobertura.java // public class Cobertura { // public static String TestClassAndMethodNamesMerged = ""; // } // // Path: cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/TestUnitInformationHolder.java // public class TestUnitInformationHolder { /...
.getInternalName(TestUnitInformationHolder.class),
christ66/cobertura
cobertura/src/main/java/net/sourceforge/cobertura/instrument/FindTouchPointsMethodAdapter.java
// Path: cobertura/src/main/java/net/sourceforge/cobertura/util/RegexUtil.java // public abstract class RegexUtil { // // private static final Logger logger = Logger.getLogger(RegexUtil.class); // // /** // * <p> // * Check to see if one of the regular expressions in a collection match // * an input string. /...
import org.objectweb.asm.tree.InsnNode; import org.objectweb.asm.tree.MethodInsnNode; import org.objectweb.asm.tree.VarInsnNode; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Pattern; import net.sourceforge.cobertura.util.RegexUtil; import org.objectweb.asm.Label; import o...
public void visitLabel(Label label) { int eventId = getEventId(); touchPointListener.beforeLabel(eventId, label, currentLine, mv); super.visitLabel(label); touchPointListener.afterLabel(eventId, label, currentLine, mv); } @Override public void visitJumpInsn(int opcode, Label label) { /* Ignore any jump i...
// Path: cobertura/src/main/java/net/sourceforge/cobertura/util/RegexUtil.java // public abstract class RegexUtil { // // private static final Logger logger = Logger.getLogger(RegexUtil.class); // // /** // * <p> // * Check to see if one of the regular expressions in a collection match // * an input string. /...
if (RegexUtil.matches(ignoreRegexp, owner)) {
christ66/cobertura
cobertura/src/main/java/net/sourceforge/cobertura/instrument/ClassPattern.java
// Path: cobertura/src/main/java/net/sourceforge/cobertura/util/RegexUtil.java // public abstract class RegexUtil { // // private static final Logger logger = Logger.getLogger(RegexUtil.class); // // /** // * <p> // * Check to see if one of the regular expressions in a collection match // * an input string. /...
import net.sourceforge.cobertura.util.RegexUtil; import java.util.HashSet; import java.util.Set;
/* * Cobertura - http://cobertura.sourceforge.net/ * * Copyright (C) 2006 John Lewis * * Note: This file is dual licensed under the GPL and the Apache * Source License (so that it can be used from both the main * Cobertura classes and the ant tasks). * * Cobertura is free software; you can redistribute it and/...
// Path: cobertura/src/main/java/net/sourceforge/cobertura/util/RegexUtil.java // public abstract class RegexUtil { // // private static final Logger logger = Logger.getLogger(RegexUtil.class); // // /** // * <p> // * Check to see if one of the regular expressions in a collection match // * an input string. /...
if (RegexUtil.matches(includeClassesRegexes, filename)) {
christ66/cobertura
cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/LineData.java
// Path: cobertura/src/main/java/net/sourceforge/cobertura/util/StringUtil.java // public abstract class StringUtil { // // /** // * <p> // * Replaces all instances of "replace" with "with" from the "original" // * string. // * </p> // * <p/> // * <p> // * NOTE: it is known that a similar function is in...
import net.sourceforge.cobertura.CoverageIgnore; import net.sourceforge.cobertura.util.StringUtil; import java.io.Serializable; import java.util.ArrayList; import java.util.List;
return this.lineNumber - ((LineData) o).lineNumber; } public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || !(obj.getClass().equals(this.getClass()))) return false; LineData lineData = (LineData) obj; return (this.hits == lineData.hits) && ((this.jumps == lineDat...
// Path: cobertura/src/main/java/net/sourceforge/cobertura/util/StringUtil.java // public abstract class StringUtil { // // /** // * <p> // * Replaces all instances of "replace" with "with" from the "original" // * string. // * </p> // * <p/> // * <p> // * NOTE: it is known that a similar function is in...
ret.append(StringUtil.getPercentValue(1.0));
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/contract/MainContact.java
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
import org.xdty.gallery.model.Media; import java.util.List;
package org.xdty.gallery.contract; public interface MainContact { interface View extends BaseView<Presenter> { void setTitle(String title); void scrollToPosition(int position);
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
void replaceData(List<Media> mediaList);
xdtianyu/Gallery
app/src/debug/java/org/xdty/gallery/application/DebugApplication.java
// Path: app/src/main/java/org/xdty/gallery/utils/OkHttp.java // public class OkHttp { // private OkHttpClient.Builder mOkHttpBuilder; // // private OkHttp() { // HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); // loggingInterceptor.setLevel(HttpLoggingInterceptor.Leve...
import android.os.StrictMode; import com.facebook.stetho.Stetho; import com.facebook.stetho.okhttp3.StethoInterceptor; import org.xdty.gallery.utils.OkHttp; import io.reactivex.Completable;
package org.xdty.gallery.application; public class DebugApplication extends Application { private final static String TAG = DebugApplication.class.getSimpleName(); @Override public void onCreate() { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectAll() ...
// Path: app/src/main/java/org/xdty/gallery/utils/OkHttp.java // public class OkHttp { // private OkHttpClient.Builder mOkHttpBuilder; // // private OkHttp() { // HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); // loggingInterceptor.setLevel(HttpLoggingInterceptor.Leve...
OkHttp.getInstance().addNetworkInterceptor(new StethoInterceptor());
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/model/database/DatabaseImpl.java
// Path: app/src/main/java/org/xdty/gallery/application/Application.java // public class Application extends android.app.Application { // // private static AppComponent sAppComponent; // // @Inject // protected Setting mSetting; // // public static AppComponent getAppComponent() { // return s...
import org.xdty.gallery.application.Application; import org.xdty.gallery.model.db.Server; import java.util.List; import javax.inject.Inject; import io.reactivex.Observable; import io.reactivex.ObservableOnSubscribe; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDispo...
package org.xdty.gallery.model.database; public class DatabaseImpl implements Database { @Inject EntityDataStore<Persistable> mDataStore; private CompositeDisposable mSubscriptions = new CompositeDisposable(); public DatabaseImpl() {
// Path: app/src/main/java/org/xdty/gallery/application/Application.java // public class Application extends android.app.Application { // // private static AppComponent sAppComponent; // // @Inject // protected Setting mSetting; // // public static AppComponent getAppComponent() { // return s...
Application.getAppComponent().inject(this);
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/glide/GlideSetup.java
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
import android.content.Context; import com.bumptech.glide.Glide; import com.bumptech.glide.GlideBuilder; import com.bumptech.glide.load.DecodeFormat; import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory; import com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor; import com.bumpt...
package org.xdty.gallery.glide; public class GlideSetup implements GlideModule { @Override public void applyOptions(Context context, GlideBuilder builder) { //builder.setMemoryCache(new LruResourceCache(64 * 1024 * 1024)); //builder.setBitmapPool(new LruBitmapPool(32 * 1024 * 1024)); ...
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
glide.register(Media.class, InputStream.class, new MediaLoader.Factory());
xdtianyu/Gallery
photoview/src/main/java/uk/co/senab/photoview/PhotoView.java
// Path: photoview/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * // * @...
import android.content.Context; import android.graphics.Bitmap; import android.graphics.Matrix; import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.net.Uri; import android.util.AttributeSet; import android.view.GestureDetector; import android.widget.ImageView; import uk.co.senab.pho...
mAttacher.update(); } } @Override public void setImageResource(int resId) { super.setImageResource(resId); if (null != mAttacher) { mAttacher.update(); } } @Override public void setImageURI(Uri uri) { super.setImageURI(uri); ...
// Path: photoview/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * // * @...
public void setOnMatrixChangeListener(OnMatrixChangedListener listener) {
xdtianyu/Gallery
photoview/src/main/java/uk/co/senab/photoview/PhotoView.java
// Path: photoview/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * // * @...
import android.content.Context; import android.graphics.Bitmap; import android.graphics.Matrix; import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.net.Uri; import android.util.AttributeSet; import android.view.GestureDetector; import android.widget.ImageView; import uk.co.senab.pho...
} @Override public void setImageURI(Uri uri) { super.setImageURI(uri); if (null != mAttacher) { mAttacher.update(); } } @Override protected boolean setFrame(int l, int t, int r, int b) { boolean changed = super.setFrame(l, t, r, b); if (null ...
// Path: photoview/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * // * @...
public void setOnPhotoTapListener(OnPhotoTapListener listener) {
xdtianyu/Gallery
photoview/src/main/java/uk/co/senab/photoview/PhotoView.java
// Path: photoview/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * // * @...
import android.content.Context; import android.graphics.Bitmap; import android.graphics.Matrix; import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.net.Uri; import android.util.AttributeSet; import android.view.GestureDetector; import android.widget.ImageView; import uk.co.senab.pho...
if (null != mAttacher) { mAttacher.update(); } } @Override protected boolean setFrame(int l, int t, int r, int b) { boolean changed = super.setFrame(l, t, r, b); if (null != mAttacher) { mAttacher.update(); } return changed; } ...
// Path: photoview/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java // public interface OnMatrixChangedListener { // /** // * Callback for when the Matrix displaying the Drawable has changed. This could be because // * the View's bounds have changed, or the user has zoomed. // * // * @...
public void setOnViewTapListener(OnViewTapListener listener) {
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/application/Application.java
// Path: app/src/main/java/org/xdty/gallery/di/AppComponent.java // @Singleton // @Component(modules = AppModule.class) // public interface AppComponent { // void inject(Application application); // // void inject(MainPresenter mainPresenter); // // void inject(ViewerPresenter viewerPresenter); // // ...
import org.xdty.gallery.BuildConfig; import org.xdty.gallery.di.AppComponent; import org.xdty.gallery.di.DaggerAppComponent; import org.xdty.gallery.di.modules.AppModule; import org.xdty.gallery.setting.Setting; import javax.inject.Inject; import cat.ereza.customactivityoncrash.CustomActivityOnCrash; import io.reactive...
package org.xdty.gallery.application; public class Application extends android.app.Application { private static AppComponent sAppComponent; @Inject
// Path: app/src/main/java/org/xdty/gallery/di/AppComponent.java // @Singleton // @Component(modules = AppModule.class) // public interface AppComponent { // void inject(Application application); // // void inject(MainPresenter mainPresenter); // // void inject(ViewerPresenter viewerPresenter); // // ...
protected Setting mSetting;
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/application/Application.java
// Path: app/src/main/java/org/xdty/gallery/di/AppComponent.java // @Singleton // @Component(modules = AppModule.class) // public interface AppComponent { // void inject(Application application); // // void inject(MainPresenter mainPresenter); // // void inject(ViewerPresenter viewerPresenter); // // ...
import org.xdty.gallery.BuildConfig; import org.xdty.gallery.di.AppComponent; import org.xdty.gallery.di.DaggerAppComponent; import org.xdty.gallery.di.modules.AppModule; import org.xdty.gallery.setting.Setting; import javax.inject.Inject; import cat.ereza.customactivityoncrash.CustomActivityOnCrash; import io.reactive...
package org.xdty.gallery.application; public class Application extends android.app.Application { private static AppComponent sAppComponent; @Inject protected Setting mSetting; public static AppComponent getAppComponent() { return sAppComponent; } @Override public void onCreat...
// Path: app/src/main/java/org/xdty/gallery/di/AppComponent.java // @Singleton // @Component(modules = AppModule.class) // public interface AppComponent { // void inject(Application application); // // void inject(MainPresenter mainPresenter); // // void inject(ViewerPresenter viewerPresenter); // // ...
sAppComponent = DaggerAppComponent.builder().appModule(new AppModule(this)).build();
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/glide/MediaDataFetcher.java
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
import android.content.Context; import android.util.Log; import com.bumptech.glide.Priority; import com.bumptech.glide.load.data.DataFetcher; import org.xdty.gallery.model.Media; import java.io.IOException; import java.io.InputStream; import java.util.List;
package org.xdty.gallery.glide; public class MediaDataFetcher implements DataFetcher<InputStream> { private static final String TAG = MediaDataFetcher.class.getSimpleName();
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
private final Media mediaFile;
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/contract/ViewerContact.java
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
import org.xdty.gallery.model.Media; import java.util.List;
package org.xdty.gallery.contract; public interface ViewerContact { interface View extends BaseView<Presenter> { void updateOrientation(int width, int height); void hideSystemUIDelayed(int timeout); void cancelHideSystemUIDelayed(); boolean isSystemUIVisible(); void s...
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
void replaceData(List<Media> medias, int position);
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/data/MediaRepository.java
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
import org.xdty.gallery.model.Media; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import io.reactivex.Observable; import io.reactivex.ObservableOnSubscribe; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers;
package org.xdty.gallery.data; public class MediaRepository implements MediaDataSource { private MediaCache mMediaCache;
// Path: app/src/main/java/org/xdty/gallery/model/Media.java // public interface Media<T extends Media> { // // String[] scheme(); // // String getName(); // // String getHost(); // // long getLastModified(); // // long length(); // // String getPath(); // // String getParent(); // /...
private ArrayList<Media> mRoots = new ArrayList<>();
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/utils/Utils.java
// Path: app/src/main/java/org/xdty/gallery/model/Config.java // public class Config { // // public final static String SAMBA_SERVER = "samba_server"; // public final static String SAMBA_FOLDER = "samba_folder"; // public final static String SAMBA_USERNAME = "samba_username"; // public final static Str...
import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.preference.PreferenceManager; import android.uti...
} public static Bitmap getResizedBitmap(Bitmap bm, int newWidth, int newHeight) { int width = bm.getWidth(); int height = bm.getHeight(); float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; Matrix matrix = new Matrix(); ...
// Path: app/src/main/java/org/xdty/gallery/model/Config.java // public class Config { // // public final static String SAMBA_SERVER = "samba_server"; // public final static String SAMBA_FOLDER = "samba_folder"; // public final static String SAMBA_USERNAME = "samba_username"; // public final static Str...
options.inPreferredConfig = Bitmap.Config.RGB_565;
ulisesbocchio/spring-boot-security-saml-samples
spring-security-saml-sample/src/main/java/com/ulisesbocchio/security/saml/spring/mvc/HomeController.java
// Path: spring-security-saml-sample/src/main/java/com/ulisesbocchio/security/saml/spring/security/SAMLUserDetails.java // public class SAMLUserDetails implements UserDetails { // // private SAMLCredential samlCredential; // // public SAMLUserDetails(SAMLCredential samlCredential) { // this.samlCredential = s...
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import com.ulisesbocchio.security.saml.spring.security.SAMLUserDetails; import org.springframework.stereotype.Controller;
package com.ulisesbocchio.security.saml.spring.mvc; /** * @author Ulises Bocchio */ @Controller public class HomeController { @RequestMapping("/home")
// Path: spring-security-saml-sample/src/main/java/com/ulisesbocchio/security/saml/spring/security/SAMLUserDetails.java // public class SAMLUserDetails implements UserDetails { // // private SAMLCredential samlCredential; // // public SAMLUserDetails(SAMLCredential samlCredential) { // this.samlCredential = s...
public ModelAndView home(@SAMLUser SAMLUserDetails user) {
Azanor/thaumcraft-api
research/ResearchEntry.java
// Path: research/ResearchStage.java // public static class Knowledge { // public EnumKnowledgeType type; // public ResearchCategory category; // public int amount = 0; // // public Knowledge(EnumKnowledgeType type, ResearchCategory category, int num) { // super(); // this.type = type; // this...
import java.util.Arrays; import net.minecraft.item.ItemStack; import net.minecraft.util.text.translation.I18n; import thaumcraft.api.research.ResearchStage.Knowledge;
package thaumcraft.api.research; public class ResearchEntry { /** * A short string used as a key for this research. Must be unique */ String key; /** * A short string used as a reference to the research category to which this must be added. */ String category; /** * A text name of the research...
// Path: research/ResearchStage.java // public static class Knowledge { // public EnumKnowledgeType type; // public ResearchCategory category; // public int amount = 0; // // public Knowledge(EnumKnowledgeType type, ResearchCategory category, int num) { // super(); // this.type = type; // this...
Knowledge[] rewardKnow;
Azanor/thaumcraft-api
research/ScanOreDictionary.java
// Path: internal/CommonInternals.java // public class CommonInternals { // // public static HashMap<String,ResourceLocation> jsonLocs = new HashMap<>(); // public static ArrayList<ThaumcraftApi.EntityTags> scanEntities = new ArrayList<>(); // public static HashMap<ResourceLocation,IThaumcraftRecipe> craftingRec...
import java.util.concurrent.ConcurrentHashMap; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraftforge.oredict.OreDictionary; import...
package thaumcraft.api.research; public class ScanOreDictionary implements IScanThing { String research; String[] entries; public ConcurrentHashMap<Integer,Boolean> cache = new ConcurrentHashMap<>(); public ScanOreDictionary(String research, String ... entries) { this.research = research; this.entries...
// Path: internal/CommonInternals.java // public class CommonInternals { // // public static HashMap<String,ResourceLocation> jsonLocs = new HashMap<>(); // public static ArrayList<ThaumcraftApi.EntityTags> scanEntities = new ArrayList<>(); // public static HashMap<ResourceLocation,IThaumcraftRecipe> craftingRec...
int hid = CommonInternals.generateUniqueItemstackId(stack);
Azanor/thaumcraft-api
research/theorycraft/CardExperimentation.java
// Path: research/ResearchCategories.java // public class ResearchCategories { // // //Research // public static LinkedHashMap <String, ResearchCategory> researchCategories = new LinkedHashMap <String,ResearchCategory>(); // // /** // * @param key // * @return the research item linked to this key // */ // ...
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.MathHelper; import net.minecraft.util.text.TextComponentTranslation; import thaumcraft.api.research.ResearchCategories;
package thaumcraft.api.research.theorycraft; public class CardExperimentation extends TheorycraftCard { @Override public int getInspirationCost() { return 2; } @Override public String getLocalizedName() { return new TextComponentTranslation("card.experimentation.name").getUnformattedText(); } @Overrid...
// Path: research/ResearchCategories.java // public class ResearchCategories { // // //Research // public static LinkedHashMap <String, ResearchCategory> researchCategories = new LinkedHashMap <String,ResearchCategory>(); // // /** // * @param key // * @return the research item linked to this key // */ // ...
String[] s = ResearchCategories.researchCategories.keySet().toArray(new String[] {});
ghedlund/jpraat
src/main/java/ca/hedlund/jpraat/binding/fon/LongSound.java
// Path: src/main/java/ca/hedlund/jpraat/binding/jna/NativeIntptr_t.java // public final class NativeIntptr_t extends IntegerType { // // private static final long serialVersionUID = 1L; // // public final static int SIZE = Native.LONG_SIZE; // // public NativeIntptr_t() { // this(0L); // } // // /** Crea...
import java.util.concurrent.atomic.*; import ca.hedlund.jpraat.binding.jna.NativeIntptr_t; import com.sun.jna.*; import ca.hedlund.jpraat.binding.*; import ca.hedlund.jpraat.binding.sys.*; import ca.hedlund.jpraat.exceptions.*;
} finally { Praat.wrapperLock.unlock(); } return retVal; } public boolean haveWindow (double tmin, double tmax) throws PraatException { boolean retVal = false; try { Praat.wrapperLock.lock(); retVal = Praat.INSTANCE.LongSound_haveWindow_wrapped(this, tmin, tmax); Praat.checkAndClearLas...
// Path: src/main/java/ca/hedlund/jpraat/binding/jna/NativeIntptr_t.java // public final class NativeIntptr_t extends IntegerType { // // private static final long serialVersionUID = 1L; // // public final static int SIZE = Native.LONG_SIZE; // // public NativeIntptr_t() { // this(0L); // } // // /** Crea...
new NativeIntptr_t(channel), pmin, pmax);
ghedlund/jpraat
src/main/java/ca/hedlund/jpraat/binding/fon/PointProcess.java
// Path: src/main/java/ca/hedlund/jpraat/binding/melder/MelderIntegerRange.java // public class MelderIntegerRange extends Structure { // // public int first, last = 0; // // public class ByValue extends MelderIntegerRange implements Structure.ByValue {}; // // public class ByReference extends MelderIntegerRange ...
import java.util.concurrent.atomic.*; import ca.hedlund.jpraat.binding.melder.MelderIntegerRange; import com.sun.jna.*; import ca.hedlund.jpraat.binding.*; import ca.hedlund.jpraat.binding.jna.*; import ca.hedlund.jpraat.exceptions.*;
finishingTime, density); Praat.checkAndClearLastError(); } catch (PraatException e) { throw e; } finally { Praat.wrapperLock.unlock(); } return retVal; } public void init (double startingTime, double finishingTime, long initialMaxnt) { Praat.INSTANCE.PointProcess_init(this, startingTime, f...
// Path: src/main/java/ca/hedlund/jpraat/binding/melder/MelderIntegerRange.java // public class MelderIntegerRange extends Structure { // // public int first, last = 0; // // public class ByValue extends MelderIntegerRange implements Structure.ByValue {}; // // public class ByReference extends MelderIntegerRange ...
public MelderIntegerRange getWindowPoints (double tmin, double tmax) {
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/cfg/Configuration.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import java.util.logging.Logger; import eu.stratuslab.marketplace.server.MarketplaceException; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.UnsupportedEncodingException; impo...
private static List<File> getConfigurationFileLocations() { ArrayList<File> locations = new ArrayList<File>(); // Possible locations for the configuration file are the current working // directory, the user's home directory, or the standard system // location, in that order. ...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
throw new MarketplaceException("cannot locate configuration file");
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/store/rdf/sesame/SesameRdfStore.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import static eu.stratuslab.marketplace.metadata.MetadataNamespaceContext.MARKETPLACE_URI; import static eu.stratuslab.marketplace.metadata.MetadataNamespaceContext.SLTERMS_NS_URI; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.Reader; import java.io.StringReader; import java....
} public boolean store(String identifier, String entry) { boolean success = false; String idURI = "/" + identifier; try { RepositoryConnection con = getMetadataStore().getConnection(); ValueFactory vf = con.getValueFactory(); Reader reader = new StringReader(entry); try { con.clear(vf.creat...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
public String getRdfEntry(String uri) throws MarketplaceException {
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/utils/MetadataFileUtils.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/cfg/Configuration.java // public final class Configuration { // // private static final Logger LOGGER = Logger.getLogger("org.restlet"); // // private static final String CONFIG_FILENAME = "marketplace.cfg"; // // private static final Prope...
import static eu.stratuslab.marketplace.server.cfg.Parameter.PENDING_DIR; import java.io.ByteArrayInputStream; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import...
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/cfg/Configuration.java // public final class Configuration { // // private static final Logger LOGGER = Logger.getLogger("org.restlet"); // // private static final String CONFIG_FILENAME = "marketplace.cfg"; // // private static final Prope...
File storeDirectory = Configuration
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/resources/QueryResource.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import static eu.stratuslab.marketplace.metadata.MetadataNamespaceContext.MARKETPLACE_URI; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.logging.Logger; import org.openrdf.query.MalformedQueryException; import org.openrdf.query.QueryLanguage; import org.openrdf.query.parser.Q...
SparqlQuery query = new SparqlQuery( getQueryFromRequest(), SparqlQuery.OUTPUT_JSON); String results = (String)executeQuery(query); if(results == null){ results = ""; } representation = new StringRepre...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
} catch (MarketplaceException e) {
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/resources/EndorsersResource.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import eu.emi.security.authn.x509.helpers.JavaAndBCStyle; import eu.emi.security.authn.x509.impl.X500NameUtils; import eu.stratuslab.marketplace.server.MarketplaceException; import java.util.List; import java.util.Map; import java.util.ArrayList; import org.restlet.data.MediaType; import org.restlet.data.Status; import...
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
} catch(MarketplaceException e){
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/query/SparqlBuilder.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/utils/MarketplaceUtils.java // public final class MarketplaceUtils { // // private static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; // // private MarketplaceUtils(){} // // public static String getCurrentDate() { // return getFo...
import java.util.Map; import eu.stratuslab.marketplace.PatternUtils; import eu.stratuslab.marketplace.server.utils.MarketplaceUtils;
//Build the paging query String searching = buildSearchingFilter(requestQueryValues); String where = WHERE + SparqlUtils.WHERE_BLOCK; StringBuilder wherePredicate = new StringBuilder( where); wherePredicate.append(filter); ...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/utils/MarketplaceUtils.java // public final class MarketplaceUtils { // // private static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; // // private MarketplaceUtils(){} // // public static String getCurrentDate() { // return getFo...
MarketplaceUtils.getCurrentDate()));
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/store/file/GitStore.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/utils/MetadataFileUtils.java // public final class MetadataFileUtils { // // private static final String ENCODING = "UTF-8"; // // private MetadataFileUtils(){} // // public static File writeContentsToDisk(Representation entity) { // // ...
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.logging.Logger; import org.apache.commons.io.FilenameUtils; import org.w3c.dom.Document; import eu.stratuslab.marketplace.server.utils.MetadataFileUtils;
package eu.stratuslab.marketplace.server.store.file; public class GitStore extends FileStore { private FileStore fileStore; private HashMap<String, Document> localUpdates = new HashMap<String, Document>(); private GitManager manager; private static final Logger LOGGER = Logger.getLogger("org.restlet"); ...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/utils/MetadataFileUtils.java // public final class MetadataFileUtils { // // private static final String ENCODING = "UTF-8"; // // private MetadataFileUtils(){} // // public static File writeContentsToDisk(Representation entity) { // // ...
MetadataFileUtils.createIfNotExists(gitDir);
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/store/rdf/RdfStoreUpdater.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/store/file/FileStore.java // public abstract class FileStore { // // public abstract void store(String key, Document metadata); // public abstract void remove(String key); // public abstract String read(String key); // public abstract List<String>...
import java.util.List; import java.util.logging.Logger; import eu.stratuslab.marketplace.server.store.file.FileStore;
package eu.stratuslab.marketplace.server.store.rdf; public class RdfStoreUpdater { private static final Logger LOGGER = Logger.getLogger("org.restlet"); private static final int DEFAULT_LIMIT = 1000; private int limit;
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/store/file/FileStore.java // public abstract class FileStore { // // public abstract void store(String key, Document metadata); // public abstract void remove(String key); // public abstract String read(String key); // public abstract List<String>...
private FileStore store;
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/utils/Notifier.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import static eu.stratuslab.marketplace.server.cfg.Parameter.ADMIN_EMAIL; import static eu.stratuslab.marketplace.server.cfg.Parameter.MAIL_DEBUG; import static eu.stratuslab.marketplace.server.cfg.Parameter.MAIL_HOST; import static eu.stratuslab.marketplace.server.cfg.Parameter.MAIL_PASSWORD; import static eu.stratusl...
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
throws MarketplaceException {
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/utils/Notifier.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import static eu.stratuslab.marketplace.server.cfg.Parameter.ADMIN_EMAIL; import static eu.stratuslab.marketplace.server.cfg.Parameter.MAIL_DEBUG; import static eu.stratuslab.marketplace.server.cfg.Parameter.MAIL_HOST; import static eu.stratuslab.marketplace.server.cfg.Parameter.MAIL_PASSWORD; import static eu.stratusl...
t.sendMessage(msg, msg.getAllRecipients()); logger.info("mail was successfully sent"); } catch (AuthenticationFailedException afe) { StringBuilder m = new StringBuilder(); m.append("authentication failure\n"); m.append(afe.getMe...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
String adminEmail = Configuration.getParameterValue(ADMIN_EMAIL);
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/routers/ActionRouter.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/resources/ActionResource.java // public class ActionResource extends BaseResource { // // private static final Logger LOGGER = Logger.getLogger("org.restlet"); // // private Document doc; // // private String uuid; // // private Stri...
import org.restlet.routing.Router; import org.restlet.routing.Template; import org.restlet.routing.TemplateRoute; import eu.stratuslab.marketplace.server.resources.ActionResource; import eu.stratuslab.marketplace.server.resources.InvalidActionResource;
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/resources/ActionResource.java // public class ActionResource extends BaseResource { // // private static final Logger LOGGER = Logger.getLogger("org.restlet"); // // private Document doc; // // private String uuid; // // private Stri...
route = attach("/{uuid}/{command}/", ActionResource.class);
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/routers/ActionRouter.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/resources/ActionResource.java // public class ActionResource extends BaseResource { // // private static final Logger LOGGER = Logger.getLogger("org.restlet"); // // private Document doc; // // private String uuid; // // private Stri...
import org.restlet.routing.Router; import org.restlet.routing.Template; import org.restlet.routing.TemplateRoute; import eu.stratuslab.marketplace.server.resources.ActionResource; import eu.stratuslab.marketplace.server.resources.InvalidActionResource;
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/resources/ActionResource.java // public class ActionResource extends BaseResource { // // private static final Logger LOGGER = Logger.getLogger("org.restlet"); // // private Document doc; // // private String uuid; // // private Stri...
attachDefault(InvalidActionResource.class);
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/store/rdf/RdfStore.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import eu.stratuslab.marketplace.server.MarketplaceException; import java.util.List; import java.util.Map;
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
public abstract List<Map<String, String>> getRdfEntriesAsMap(String query) throws MarketplaceException;
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/resources/EndorserResource.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import eu.stratuslab.marketplace.server.MarketplaceException; import eu.stratuslab.marketplace.server.utils.MarketplaceUtils; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Map; import java.util.ArrayList; import org.restlet.data.Form; import org.restlet.data.MediaType; import...
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
} catch(MarketplaceException e){
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/resources/EndorserResource.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import eu.stratuslab.marketplace.server.MarketplaceException; import eu.stratuslab.marketplace.server.utils.MarketplaceUtils; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Map; import java.util.ArrayList; import org.restlet.data.Form; import org.restlet.data.MediaType; import...
StringRepresentation representation = new StringRepresentation(results, MediaType.APPLICATION_XML); // Returns the XML representation of this document. return representation; } private String getRangeFromRequest(){ Form form = getRequest().getResourceRef().getQuer...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
return MarketplaceUtils.getFormattedDate(expiration);
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/resources/TagsResource.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.restlet.data.MediaType; import org.restlet.representation.Representation; import org.restlet.representation.StringRepresentation; import org.restlet.resource.Get; import eu.stratuslab.marketplace.server.MarketplaceException;
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/MarketplaceException.java // @SuppressWarnings("serial") // public class MarketplaceException extends RuntimeException { // // public MarketplaceException() { // } // // public MarketplaceException(String message) { // super(messag...
} catch(MarketplaceException e){
StratusLab/marketplace
server/war/src/main/java/eu/stratuslab/marketplace/server/store/file/FlatFileStore.java
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/utils/MetadataFileUtils.java // public final class MetadataFileUtils { // // private static final String ENCODING = "UTF-8"; // // private MetadataFileUtils(){} // // public static File writeContentsToDisk(Representation entity) { // // ...
import eu.stratuslab.marketplace.server.utils.MetadataFileUtils; import java.io.File; import java.io.IOException; import java.util.List; import java.util.logging.Logger; import org.restlet.data.Status; import org.restlet.resource.ResourceException; import org.w3c.dom.Document; import eu.stratuslab.marketplace.XMLUtils;...
/** * Created as part of the StratusLab project (http://stratuslab.eu), * co-funded by the European Commission under the Grant Agreement * INSFO-RI-261552. * * Copyright (c) 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
// Path: server/war/src/main/java/eu/stratuslab/marketplace/server/utils/MetadataFileUtils.java // public final class MetadataFileUtils { // // private static final String ENCODING = "UTF-8"; // // private MetadataFileUtils(){} // // public static File writeContentsToDisk(Representation entity) { // // ...
MetadataFileUtils.createIfNotExists(dataDir);
j8spec/j8spec
src/test/java/j8spec/J8SpecFlowRandomOrderTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeAll(UnsafeBlock block) { // isValidContext("beforeAll"); // contexts.get().current().addBeforeAll(block); // } // // Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeEach(UnsafeBlock block) { // ...
import j8spec.annotation.RandomOrder; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static j8spec.J8Spec.beforeAll; import static j8spec.J8Spec.beforeEach; import static j8spec.J8Spec.it; import static j8spec.J8Spec.read; import static java.util.Arrays.asList; import static java.util....
package j8spec; public class J8SpecFlowRandomOrderTest { static class RandomAsDefaultOrderSpec {{
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeAll(UnsafeBlock block) { // isValidContext("beforeAll"); // contexts.get().current().addBeforeAll(block); // } // // Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeEach(UnsafeBlock block) { // ...
it("block 1", () -> log.add("block 1"));
j8spec/j8spec
src/test/java/j8spec/J8SpecFlowRandomOrderTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeAll(UnsafeBlock block) { // isValidContext("beforeAll"); // contexts.get().current().addBeforeAll(block); // } // // Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeEach(UnsafeBlock block) { // ...
import j8spec.annotation.RandomOrder; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static j8spec.J8Spec.beforeAll; import static j8spec.J8Spec.beforeEach; import static j8spec.J8Spec.it; import static j8spec.J8Spec.read; import static java.util.Arrays.asList; import static java.util....
package j8spec; public class J8SpecFlowRandomOrderTest { static class RandomAsDefaultOrderSpec {{ it("block 1", () -> log.add("block 1")); it("block 2", () -> log.add("block 2")); it("block 3", () -> log.add("block 3")); it("block 4", () -> log.add("block 4")); it("block...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeAll(UnsafeBlock block) { // isValidContext("beforeAll"); // contexts.get().current().addBeforeAll(block); // } // // Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeEach(UnsafeBlock block) { // ...
beforeAll(() -> log.add("before all 1"));
j8spec/j8spec
src/test/java/j8spec/J8SpecFlowRandomOrderTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeAll(UnsafeBlock block) { // isValidContext("beforeAll"); // contexts.get().current().addBeforeAll(block); // } // // Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeEach(UnsafeBlock block) { // ...
import j8spec.annotation.RandomOrder; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static j8spec.J8Spec.beforeAll; import static j8spec.J8Spec.beforeEach; import static j8spec.J8Spec.it; import static j8spec.J8Spec.read; import static java.util.Arrays.asList; import static java.util....
package j8spec; public class J8SpecFlowRandomOrderTest { static class RandomAsDefaultOrderSpec {{ it("block 1", () -> log.add("block 1")); it("block 2", () -> log.add("block 2")); it("block 3", () -> log.add("block 3")); it("block 4", () -> log.add("block 4")); it("block...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeAll(UnsafeBlock block) { // isValidContext("beforeAll"); // contexts.get().current().addBeforeAll(block); // } // // Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeEach(UnsafeBlock block) { // ...
beforeEach(() -> log.add("before each 1"));
j8spec/j8spec
src/test/java/j8spec/J8SpecFlowRandomOrderTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeAll(UnsafeBlock block) { // isValidContext("beforeAll"); // contexts.get().current().addBeforeAll(block); // } // // Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeEach(UnsafeBlock block) { // ...
import j8spec.annotation.RandomOrder; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static j8spec.J8Spec.beforeAll; import static j8spec.J8Spec.beforeEach; import static j8spec.J8Spec.it; import static j8spec.J8Spec.read; import static java.util.Arrays.asList; import static java.util....
it("block 7", () -> log.add("block 7")); it("block 8", () -> log.add("block 8")); it("block 9", () -> log.add("block 9")); }} @RandomOrder(seed = 0) static class SingleExampleGroupWithRandomOrderSpec {{ beforeAll(() -> log.add("before all 1")); beforeEach(() -> log.a...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeAll(UnsafeBlock block) { // isValidContext("beforeAll"); // contexts.get().current().addBeforeAll(block); // } // // Path: src/main/java/j8spec/J8Spec.java // public static synchronized void beforeEach(UnsafeBlock block) { // ...
for (Example example : read(specClass)) {
j8spec/j8spec
src/main/java/j8spec/ExampleGroupDefinition.java
// Path: src/main/java/j8spec/BlockDefinition.java // static void visitAll(BlockDefinitionVisitor visitor, Collection<BlockDefinition> blockDefinitions) { // for (BlockDefinition blockDefinition : blockDefinitions) { // blockDefinition.accept(visitor); // } // }
import j8spec.annotation.DefinedOrder; import j8spec.annotation.RandomOrder; import java.util.LinkedList; import java.util.List; import static j8spec.BlockExecutionFlag.DEFAULT; import static j8spec.BlockDefinition.visitAll;
} <T> void addVarInitializer(Var<T> var, UnsafeFunction<T> initFunction) { varInitializers.add(new BlockDefinitions.VarInitializer<>(var, initFunction)); } void addBeforeAll(UnsafeBlock beforeAllBlock) { hooks.add(new BlockDefinitions.BeforeAll(beforeAllBlock)); } void addBefo...
// Path: src/main/java/j8spec/BlockDefinition.java // static void visitAll(BlockDefinitionVisitor visitor, Collection<BlockDefinition> blockDefinitions) { // for (BlockDefinition blockDefinition : blockDefinitions) { // blockDefinition.accept(visitor); // } // } // Path: src/main/java/j8spec/ExampleGr...
visitAll(visitor, varInitializers);
j8spec/j8spec
src/test/java/j8spec/J8SpecFocusTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void fcontext(String description, SafeBlock block) { // notAllowedWhenCIModeEnabled("fcontext"); // isValidContext("fcontext"); // ExampleGroupConfiguration config = new ExampleGroupConfiguration.Builder() // .description(descri...
import org.junit.Test; import static j8spec.J8Spec.fcontext; import static j8spec.J8Spec.fdescribe; import static j8spec.J8Spec.fit; import static j8spec.J8Spec.read;
package j8spec; public class J8SpecFocusTest { static class FocusedExampleBlockOverwrittenSpec {{
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void fcontext(String description, SafeBlock block) { // notAllowedWhenCIModeEnabled("fcontext"); // isValidContext("fcontext"); // ExampleGroupConfiguration config = new ExampleGroupConfiguration.Builder() // .description(descri...
fit("some text", UnsafeBlock.NOOP);
j8spec/j8spec
src/test/java/j8spec/J8SpecFocusTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void fcontext(String description, SafeBlock block) { // notAllowedWhenCIModeEnabled("fcontext"); // isValidContext("fcontext"); // ExampleGroupConfiguration config = new ExampleGroupConfiguration.Builder() // .description(descri...
import org.junit.Test; import static j8spec.J8Spec.fcontext; import static j8spec.J8Spec.fdescribe; import static j8spec.J8Spec.fit; import static j8spec.J8Spec.read;
package j8spec; public class J8SpecFocusTest { static class FocusedExampleBlockOverwrittenSpec {{ fit("some text", UnsafeBlock.NOOP); fit("some text", UnsafeBlock.NOOP); }} static class FocusedExampleWithCollectorOverwrittenSpec {{ fit("some text", c -> c, UnsafeBlock.NOOP); ...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void fcontext(String description, SafeBlock block) { // notAllowedWhenCIModeEnabled("fcontext"); // isValidContext("fcontext"); // ExampleGroupConfiguration config = new ExampleGroupConfiguration.Builder() // .description(descri...
fdescribe("some text", SafeBlock.NOOP);
j8spec/j8spec
src/test/java/j8spec/J8SpecFocusTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void fcontext(String description, SafeBlock block) { // notAllowedWhenCIModeEnabled("fcontext"); // isValidContext("fcontext"); // ExampleGroupConfiguration config = new ExampleGroupConfiguration.Builder() // .description(descri...
import org.junit.Test; import static j8spec.J8Spec.fcontext; import static j8spec.J8Spec.fdescribe; import static j8spec.J8Spec.fit; import static j8spec.J8Spec.read;
package j8spec; public class J8SpecFocusTest { static class FocusedExampleBlockOverwrittenSpec {{ fit("some text", UnsafeBlock.NOOP); fit("some text", UnsafeBlock.NOOP); }} static class FocusedExampleWithCollectorOverwrittenSpec {{ fit("some text", c -> c, UnsafeBlock.NOOP); ...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void fcontext(String description, SafeBlock block) { // notAllowedWhenCIModeEnabled("fcontext"); // isValidContext("fcontext"); // ExampleGroupConfiguration config = new ExampleGroupConfiguration.Builder() // .description(descri...
fcontext("some text", SafeBlock.NOOP);
j8spec/j8spec
src/test/java/j8spec/J8SpecFocusTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void fcontext(String description, SafeBlock block) { // notAllowedWhenCIModeEnabled("fcontext"); // isValidContext("fcontext"); // ExampleGroupConfiguration config = new ExampleGroupConfiguration.Builder() // .description(descri...
import org.junit.Test; import static j8spec.J8Spec.fcontext; import static j8spec.J8Spec.fdescribe; import static j8spec.J8Spec.fit; import static j8spec.J8Spec.read;
package j8spec; public class J8SpecFocusTest { static class FocusedExampleBlockOverwrittenSpec {{ fit("some text", UnsafeBlock.NOOP); fit("some text", UnsafeBlock.NOOP); }} static class FocusedExampleWithCollectorOverwrittenSpec {{ fit("some text", c -> c, UnsafeBlock.NOOP); ...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized void fcontext(String description, SafeBlock block) { // notAllowedWhenCIModeEnabled("fcontext"); // isValidContext("fcontext"); // ExampleGroupConfiguration config = new ExampleGroupConfiguration.Builder() // .description(descri...
read(FocusedExampleBlockOverwrittenSpec.class);
j8spec/j8spec
src/test/java/j8spec/VarTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static <T> Var<T> var() { // return new Var<>(); // }
import org.junit.Test; import static j8spec.J8Spec.var; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat;
package j8spec; public class VarTest { @Test public void stores_value_in_variable() {
// Path: src/main/java/j8spec/J8Spec.java // public static <T> Var<T> var() { // return new Var<>(); // } // Path: src/test/java/j8spec/VarTest.java import org.junit.Test; import static j8spec.J8Spec.var; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; package j8spec; pu...
final Var<String> s = var();
j8spec/j8spec
src/main/java/j8spec/J8Spec.java
// Path: src/main/java/j8spec/ExampleGroupDefinition.java // static ExampleGroupDefinition newExampleGroupDefinition( // Class<?> specClass, // ExampleGroupContext context // ) { // ExampleGroupConfiguration.Builder configBuilder = new ExampleGroupConfiguration.Builder() // .description(specClass.ge...
import java.util.List; import java.util.function.Function; import static j8spec.BlockExecutionFlag.DEFAULT; import static j8spec.BlockExecutionFlag.FOCUSED; import static j8spec.BlockExecutionFlag.IGNORED; import static j8spec.ExampleGroupDefinition.newExampleGroupDefinition; import static java.util.function.Function.i...
* @since 3.1.0 */ public static <T> T var(Var<T> var) { return var.value; } /** * Stores the given value in the provided variable object. * * @param var variable object * @param value value to be stored * @param <T> type of value the variable object can store ...
// Path: src/main/java/j8spec/ExampleGroupDefinition.java // static ExampleGroupDefinition newExampleGroupDefinition( // Class<?> specClass, // ExampleGroupContext context // ) { // ExampleGroupConfiguration.Builder configBuilder = new ExampleGroupConfiguration.Builder() // .description(specClass.ge...
ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get());
j8spec/j8spec
src/test/java/j8spec/J8SpecIgnoreTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized List<Example> read(Class<?> specClass) { // contexts.set(new ExampleGroupContext()); // try { // ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get()); // // exampleGroupDefini...
import org.junit.Test; import static j8spec.J8Spec.read; import static j8spec.J8Spec.xcontext; import static j8spec.J8Spec.xdescribe; import static j8spec.J8Spec.xit;
package j8spec; public class J8SpecIgnoreTest { static class IgnoredExampleOverwrittenSpec {{
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized List<Example> read(Class<?> specClass) { // contexts.set(new ExampleGroupContext()); // try { // ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get()); // // exampleGroupDefini...
xit("some text", UnsafeBlock.NOOP);
j8spec/j8spec
src/test/java/j8spec/J8SpecIgnoreTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized List<Example> read(Class<?> specClass) { // contexts.set(new ExampleGroupContext()); // try { // ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get()); // // exampleGroupDefini...
import org.junit.Test; import static j8spec.J8Spec.read; import static j8spec.J8Spec.xcontext; import static j8spec.J8Spec.xdescribe; import static j8spec.J8Spec.xit;
package j8spec; public class J8SpecIgnoreTest { static class IgnoredExampleOverwrittenSpec {{ xit("some text", UnsafeBlock.NOOP); xit("some text", UnsafeBlock.NOOP); }} static class IgnoredExampleWithCollectorOverwrittenSpec {{ xit("some text", c -> c, UnsafeBlock.NOOP); ...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized List<Example> read(Class<?> specClass) { // contexts.set(new ExampleGroupContext()); // try { // ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get()); // // exampleGroupDefini...
xdescribe("some text", SafeBlock.NOOP);
j8spec/j8spec
src/test/java/j8spec/J8SpecIgnoreTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized List<Example> read(Class<?> specClass) { // contexts.set(new ExampleGroupContext()); // try { // ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get()); // // exampleGroupDefini...
import org.junit.Test; import static j8spec.J8Spec.read; import static j8spec.J8Spec.xcontext; import static j8spec.J8Spec.xdescribe; import static j8spec.J8Spec.xit;
package j8spec; public class J8SpecIgnoreTest { static class IgnoredExampleOverwrittenSpec {{ xit("some text", UnsafeBlock.NOOP); xit("some text", UnsafeBlock.NOOP); }} static class IgnoredExampleWithCollectorOverwrittenSpec {{ xit("some text", c -> c, UnsafeBlock.NOOP); ...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized List<Example> read(Class<?> specClass) { // contexts.set(new ExampleGroupContext()); // try { // ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get()); // // exampleGroupDefini...
xcontext("some text", SafeBlock.NOOP);
j8spec/j8spec
src/test/java/j8spec/J8SpecIgnoreTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized List<Example> read(Class<?> specClass) { // contexts.set(new ExampleGroupContext()); // try { // ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get()); // // exampleGroupDefini...
import org.junit.Test; import static j8spec.J8Spec.read; import static j8spec.J8Spec.xcontext; import static j8spec.J8Spec.xdescribe; import static j8spec.J8Spec.xit;
package j8spec; public class J8SpecIgnoreTest { static class IgnoredExampleOverwrittenSpec {{ xit("some text", UnsafeBlock.NOOP); xit("some text", UnsafeBlock.NOOP); }} static class IgnoredExampleWithCollectorOverwrittenSpec {{ xit("some text", c -> c, UnsafeBlock.NOOP); ...
// Path: src/main/java/j8spec/J8Spec.java // public static synchronized List<Example> read(Class<?> specClass) { // contexts.set(new ExampleGroupContext()); // try { // ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get()); // // exampleGroupDefini...
read(IgnoredExampleOverwrittenSpec.class);
j8spec/j8spec
src/test/java/j8spec/ExampleBuilderTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static <T> Var<T> var() { // return new Var<>(); // }
import org.junit.Test; import java.util.LinkedList; import java.util.List; import static j8spec.BlockExecutionFlag.FOCUSED; import static j8spec.BlockExecutionFlag.IGNORED; import static j8spec.BlockExecutionStrategy.BLACK_LIST; import static j8spec.BlockExecutionStrategy.WHITE_LIST; import static j8spec.UnsafeBlock.NO...
.startGroup(groupConfig().description("describe A").executionFlag(FOCUSED).build()) .example(exampleConfig().description("block A1").build(), executed) .example(exampleConfig().description("block A2").build(), executed) .startGr...
// Path: src/main/java/j8spec/J8Spec.java // public static <T> Var<T> var() { // return new Var<>(); // } // Path: src/test/java/j8spec/ExampleBuilderTest.java import org.junit.Test; import java.util.LinkedList; import java.util.List; import static j8spec.BlockExecutionFlag.FOCUSED; import static j8spec.BlockExec...
final Var<String> v1 = var();
j8spec/j8spec
src/test/java/j8spec/DuplicatedBlockValidatorTest.java
// Path: src/main/java/j8spec/J8Spec.java // public static <T> Var<T> var() { // return new Var<>(); // }
import org.junit.Test; import static j8spec.UnsafeBlock.NOOP; import static j8spec.J8Spec.var;
} @Test(expected = Exceptions.BlockAlreadyDefined.class) public void indicates_if_a_example_group_has_been_defined_with_the_same_description() { validator .startGroup(groupConfig().description("spec").build()) .startGroup(groupConfig().description("group 1").build()) ...
// Path: src/main/java/j8spec/J8Spec.java // public static <T> Var<T> var() { // return new Var<>(); // } // Path: src/test/java/j8spec/DuplicatedBlockValidatorTest.java import org.junit.Test; import static j8spec.UnsafeBlock.NOOP; import static j8spec.J8Spec.var; } @Test(expected = Exceptions.BlockAlre...
Var<String> v1 = var();
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/vo/MethodTypeMap.java
// Path: ngscript-core/src/main/java/org/ngscript/runtime/utils/TypeCheck.java // public class TypeCheck { // // static final HashMap<Class, HashSet<Class>> typeHierarchy = new HashMap<Class, HashSet<Class>>(); // // static { // HashSet<Class> intSet // = new HashSet<Class>(Arrays.asLi...
import org.ngscript.runtime.utils.TypeCheck; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.List; import java.util.Map;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-core/src/main/java/org/ngscript/runtime/utils/TypeCheck.java // public class TypeCheck { // // static final HashMap<Class, HashSet<Class>> typeHierarchy = new HashMap<Class, HashSet<Class>>(); // // static { // HashSet<Class> intSet // = new HashSet<Class>(Arrays.asLi...
if (TypeCheck.typeAcceptable(types, m.getParameterTypes())) {
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/parser/lexer/Lexer.java
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/parser/Token.java // public class Token { // // public String type; // public String value; // public int line; // // public boolean isValidPos() { // return line != -1; // } // // public Token(String type) { // ...
import org.ngscript.parseroid.parser.Token; import java.util.*;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/parser/Token.java // public class Token { // // public String type; // public String value; // public int line; // // public boolean isValidPos() { // return line != -1; // } // // public Token(String type) { // ...
public static List<Token> scan(String string) throws LexerException {
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/compiler/Assembler.java
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/parser/AstNode.java // public class AstNode { // // public Token token; // public List<AstNode> contents; // // public AstNode(Token token) { // this.token = token; // this.contents = new ArrayList<>(); // } // // pu...
import org.ngscript.parseroid.parser.AstNode; import java.util.*;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/parser/AstNode.java // public class AstNode { // // public Token token; // public List<AstNode> contents; // // public AstNode(Token token) { // this.token = token; // this.contents = new ArrayList<>(); // } // // pu...
public String label(String name, AstNode ast) {
wssccc/ngscript
ngscript-examples/src/main/java/org/ngscript/examples/RoseRender.java
// Path: ngscript-core/src/main/java/org/ngscript/Ngscript.java // @Slf4j // public class Ngscript { // // Configuration configuration; // NgLalrParser parser; // Compiler compiler; // VirtualMachine vm = new VirtualMachine(new PrintWriter(System.out), new PrintWriter(System.err)); // // public Ng...
import org.apache.commons.io.IOUtils; import org.ngscript.Ngscript; import java.nio.charset.StandardCharsets;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-core/src/main/java/org/ngscript/Ngscript.java // @Slf4j // public class Ngscript { // // Configuration configuration; // NgLalrParser parser; // Compiler compiler; // VirtualMachine vm = new VirtualMachine(new PrintWriter(System.out), new PrintWriter(System.err)); // // public Ng...
new Ngscript().eval(IOUtils.toString(Thread.currentThread().getContextClassLoader().getResourceAsStream("RoseRender.ngs"), StandardCharsets.UTF_8));
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/Environment.java
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/JavaMemRef.java // @Slf4j // public class JavaMemRef extends VmMemRef { // // private Object obj; // private Field field; // // public JavaMemRef(Object obj, Field field) { // this.obj = obj; // this.field = field; // } // /...
import org.ngscript.runtime.vo.JavaMemRef; import org.ngscript.runtime.vo.JavaMethod; import org.ngscript.runtime.vo.VmMemRef; import org.ngscript.runtime.vo.undefined; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.HashMap; import java.util.Map;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/JavaMemRef.java // @Slf4j // public class JavaMemRef extends VmMemRef { // // private Object obj; // private Field field; // // public JavaMemRef(Object obj, Field field) { // this.obj = obj; // this.field = field; // } // /...
VmMemRef mem = new VmMemRef(undefined.value);
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/Environment.java
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/JavaMemRef.java // @Slf4j // public class JavaMemRef extends VmMemRef { // // private Object obj; // private Field field; // // public JavaMemRef(Object obj, Field field) { // this.obj = obj; // this.field = field; // } // /...
import org.ngscript.runtime.vo.JavaMemRef; import org.ngscript.runtime.vo.JavaMethod; import org.ngscript.runtime.vo.VmMemRef; import org.ngscript.runtime.vo.undefined; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.HashMap; import java.util.Map;
} //try java.lang try { Class cls = Class.forName("java.lang." + member); return new VmMemRef(cls); } catch (ClassNotFoundException ex) { } throw new VmRuntimeException(vm, member + " is not declared"); } ...
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/JavaMemRef.java // @Slf4j // public class JavaMemRef extends VmMemRef { // // private Object obj; // private Field field; // // public JavaMemRef(Object obj, Field field) { // this.obj = obj; // this.field = field; // } // /...
return new JavaMemRef(nativeObj, field);
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/Environment.java
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/JavaMemRef.java // @Slf4j // public class JavaMemRef extends VmMemRef { // // private Object obj; // private Field field; // // public JavaMemRef(Object obj, Field field) { // this.obj = obj; // this.field = field; // } // /...
import org.ngscript.runtime.vo.JavaMemRef; import org.ngscript.runtime.vo.JavaMethod; import org.ngscript.runtime.vo.VmMemRef; import org.ngscript.runtime.vo.undefined; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.HashMap; import java.util.Map;
if (nativeObj instanceof Class) { //try obj as a class ref Object obj = _lookupNative(nativeObj, (Class) nativeObj, member, vm); if (obj != null) { return obj; } } //regards obj as an Object return _lookupNative(nativeObj, n...
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/JavaMemRef.java // @Slf4j // public class JavaMemRef extends VmMemRef { // // private Object obj; // private Field field; // // public JavaMemRef(Object obj, Field field) { // this.obj = obj; // this.field = field; // } // /...
return new VmMemRef(new JavaMethod(nativeObj, ms));
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/utils/TypeOp.java
// Path: ngscript-core/src/main/java/org/ngscript/runtime/VmRuntimeException.java // public class VmRuntimeException extends RuntimeException { // // VirtualMachine vm; // // public VmRuntimeException(String message) { // super(message); // } // // public VmRuntimeException(Throwable cause) {...
import org.ngscript.runtime.VmRuntimeException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-core/src/main/java/org/ngscript/runtime/VmRuntimeException.java // public class VmRuntimeException extends RuntimeException { // // VirtualMachine vm; // // public VmRuntimeException(String message) { // super(message); // } // // public VmRuntimeException(Throwable cause) {...
public static Object eval(int op, Object o1, Object o2) throws VmRuntimeException {
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/Context.java
// Path: ngscript-core/src/main/java/org/ngscript/compiler/Instruction.java // public class Instruction { // // public String op; // public String param; // public String paramExtended; // // public Instruction(String op) { // this.op = op; // } // // public Instruction(String op, Str...
import org.ngscript.compiler.Instruction; import org.ngscript.utils.FastStack;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-core/src/main/java/org/ngscript/compiler/Instruction.java // public class Instruction { // // public String op; // public String param; // public String paramExtended; // // public Instruction(String op) { // this.op = op; // } // // public Instruction(String op, Str...
Instruction hint;
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/Context.java
// Path: ngscript-core/src/main/java/org/ngscript/compiler/Instruction.java // public class Instruction { // // public String op; // public String param; // public String paramExtended; // // public Instruction(String op) { // this.op = op; // } // // public Instruction(String op, Str...
import org.ngscript.compiler.Instruction; import org.ngscript.utils.FastStack;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-core/src/main/java/org/ngscript/compiler/Instruction.java // public class Instruction { // // public String op; // public String param; // public String paramExtended; // // public Instruction(String op) { // this.op = op; // } // // public Instruction(String op, Str...
FastStack<Object> stack;
wssccc/ngscript
ngscript-parseroid/src/main/java/org/ngscript/parseroid/table/Item.java
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/grammar/Production.java // public class Production implements Serializable { // // public Symbol sym; // public Symbol[] produces; // public int id; // // public Production(Symbol sym, Symbol[] produces, int id) { // this.sym = s...
import org.ngscript.parseroid.grammar.Production; import org.ngscript.parseroid.grammar.Symbol; import java.util.HashMap; import java.util.Map;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-parseroid/src/main/java/org/ngscript/parseroid/grammar/Production.java // public class Production implements Serializable { // // public Symbol sym; // public Symbol[] produces; // public int id; // // public Production(Symbol sym, Symbol[] produces, int id) { // this.sym = s...
Map<String, Symbol> lookahead = new HashMap<>();
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/compiler/Compiler.java
// Path: ngscript-core/src/main/java/org/ngscript/Configuration.java // @Data // public class Configuration { // // public static final Configuration DEFAULT = new Configuration(); // // boolean generateDebugInfo = false; // boolean interactive = false; // // } // // Path: ngscript-parseroid/src/main/ja...
import org.ngscript.Configuration; import org.ngscript.parseroid.parser.AstNode; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.*;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-core/src/main/java/org/ngscript/Configuration.java // @Data // public class Configuration { // // public static final Configuration DEFAULT = new Configuration(); // // boolean generateDebugInfo = false; // boolean interactive = false; // // } // // Path: ngscript-parseroid/src/main/ja...
Configuration configuration;
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/compiler/Compiler.java
// Path: ngscript-core/src/main/java/org/ngscript/Configuration.java // @Data // public class Configuration { // // public static final Configuration DEFAULT = new Configuration(); // // boolean generateDebugInfo = false; // boolean interactive = false; // // } // // Path: ngscript-parseroid/src/main/ja...
import org.ngscript.Configuration; import org.ngscript.parseroid.parser.AstNode; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.*;
/* * Copyright 2021 wssccc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// Path: ngscript-core/src/main/java/org/ngscript/Configuration.java // @Data // public class Configuration { // // public static final Configuration DEFAULT = new Configuration(); // // boolean generateDebugInfo = false; // boolean interactive = false; // // } // // Path: ngscript-parseroid/src/main/ja...
public List<Instruction> compileCode(AstNode ast, String sourceCode) throws CompilerException {
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/OpUtils.java
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/VmMemRef.java // public class VmMemRef { // // private Object value; // @Getter // private final boolean immutable; // // public VmMemRef() { // this(null, false); // } // // public VmMemRef(Object obj_v) { // this(o...
import org.ngscript.runtime.vo.VmMemRef; import org.ngscript.runtime.vo.undefined;
if (obj instanceof Double) { return ((Double) obj).intValue(); } if (obj instanceof Long) { Long l = (Long) obj; return l.intValue(); } throw new VmRuntimeException(vm, "invalid type"); } static boolean testEq(Object obj1, Object obj2)...
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/VmMemRef.java // public class VmMemRef { // // private Object value; // @Getter // private final boolean immutable; // // public VmMemRef() { // this(null, false); // } // // public VmMemRef(Object obj_v) { // this(o...
} else if (testObj instanceof undefined) {
wssccc/ngscript
ngscript-core/src/main/java/org/ngscript/runtime/OpUtils.java
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/VmMemRef.java // public class VmMemRef { // // private Object value; // @Getter // private final boolean immutable; // // public VmMemRef() { // this(null, false); // } // // public VmMemRef(Object obj_v) { // this(o...
import org.ngscript.runtime.vo.VmMemRef; import org.ngscript.runtime.vo.undefined;
static boolean testEq(Object obj1, Object obj2) { if (obj1 == obj2) { return true; } if (obj1 == null || obj2 == null) { return false; } return obj1.toString().equals(obj2.toString()); } static boolean testValue(Object testObj) { boole...
// Path: ngscript-core/src/main/java/org/ngscript/runtime/vo/VmMemRef.java // public class VmMemRef { // // private Object value; // @Getter // private final boolean immutable; // // public VmMemRef() { // this(null, false); // } // // public VmMemRef(Object obj_v) { // this(o...
VmMemRef addr = (VmMemRef) vm.eax.read();
psidnell/ofexport2
src/test/java/org/psidnell/omnifocus/model/ProjectTest.java
// Path: src/main/java/org/psidnell/omnifocus/ApplicationContextFactory.java // public class ApplicationContextFactory { // // public static final String CONFIG_XML = "/config.xml"; // private static final String CONFIG_PROPERTIES = "/config.properties"; // // public static ApplicationContext getContext()...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import org.psidnell.omnifocus.ApplicationContextFactory; import org.springframework.context.Appli...
/* * Copyright 2015 Paul Sidnell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
// Path: src/main/java/org/psidnell/omnifocus/ApplicationContextFactory.java // public class ApplicationContextFactory { // // public static final String CONFIG_XML = "/config.xml"; // private static final String CONFIG_PROPERTIES = "/config.properties"; // // public static ApplicationContext getContext()...
ApplicationContext appContext = ApplicationContextFactory.getContext();
psidnell/ofexport2
src/main/java/org/psidnell/omnifocus/format/FreeMarkerFormatter.java
// Path: src/main/java/org/psidnell/omnifocus/ApplicationContextFactory.java // public class ApplicationContextFactory { // // public static final String CONFIG_XML = "/config.xml"; // private static final String CONFIG_PROPERTIES = "/config.properties"; // // public static ApplicationContext getContext()...
import freemarker.template.TemplateExceptionHandler; import java.io.IOException; import java.io.InputStream; import java.io.Writer; import java.util.HashMap; import org.psidnell.omnifocus.ApplicationContextFactory; import org.psidnell.omnifocus.model.Node; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import...
/* * Copyright 2015 Paul Sidnell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
// Path: src/main/java/org/psidnell/omnifocus/ApplicationContextFactory.java // public class ApplicationContextFactory { // // public static final String CONFIG_XML = "/config.xml"; // private static final String CONFIG_PROPERTIES = "/config.properties"; // // public static ApplicationContext getContext()...
public void format(Node root, Writer out) throws IOException, TemplateException {
psidnell/ofexport2
src/main/java/org/psidnell/omnifocus/format/FreeMarkerFormatter.java
// Path: src/main/java/org/psidnell/omnifocus/ApplicationContextFactory.java // public class ApplicationContextFactory { // // public static final String CONFIG_XML = "/config.xml"; // private static final String CONFIG_PROPERTIES = "/config.properties"; // // public static ApplicationContext getContext()...
import freemarker.template.TemplateExceptionHandler; import java.io.IOException; import java.io.InputStream; import java.io.Writer; import java.util.HashMap; import org.psidnell.omnifocus.ApplicationContextFactory; import org.psidnell.omnifocus.model.Node; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import...
/* * Copyright 2015 Paul Sidnell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
// Path: src/main/java/org/psidnell/omnifocus/ApplicationContextFactory.java // public class ApplicationContextFactory { // // public static final String CONFIG_XML = "/config.xml"; // private static final String CONFIG_PROPERTIES = "/config.properties"; // // public static ApplicationContext getContext()...
fmRoot.put("config", ApplicationContextFactory.getConfigProperties());
psidnell/ofexport2
src/main/java/org/psidnell/omnifocus/visitor/VisitorDescriptor.java
// Path: src/main/java/org/psidnell/omnifocus/model/NodeImpl.java // public abstract class NodeImpl extends ExpressionFunctions implements Node { // // protected String name; // // private String id = UUID.randomUUID().toString(); // // private int rank; // // private boolean marked = false; // // ...
import org.psidnell.omnifocus.model.NodeImpl;
/* * Copyright 2015 Paul Sidnell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
// Path: src/main/java/org/psidnell/omnifocus/model/NodeImpl.java // public abstract class NodeImpl extends ExpressionFunctions implements Node { // // protected String name; // // private String id = UUID.randomUUID().toString(); // // private int rank; // // private boolean marked = false; // // ...
public final VisitorDescriptor visit(Class<? extends NodeImpl>... classes) {