text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```css
/**/
/**/
.button{
-fx-border-width: 0;
-fx-background-color: null;
}
.button:focused:hover{
-fx-background-color: #eee5;
}
.ui{
//-fx-min-width, -fx-pref-width, -fx-max-width
-fx-pref-width:960;
-fx-pref-height:300;
-fx-background-color:null;
}
/**/
.button_menu_1 {
-fx-pref-w... | /content/code_sandbox/app/src/css/main.css | css | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,248 |
```css
/*debug*/
.bg{
-fx-background-color:#424242;
-fx-background-radius: 5;
}
.button_item{
-fx-background-color:#424242;
-fx-background-radius: 5;
-fx-border-width: 0;
-fx-font-family: "Microsoft YaHei";
-fx-font-size: 16px;
-fx-text-fill: #80CBC4;
}
.button_item:hover{
-fx-backg... | /content/code_sandbox/app/src/css/debug.css | css | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 607 |
```css
.bg{
-fx-background-color:#424242;
-fx-background-radius: 5;
}
.btn_open{
-fx-background-color:#424242;
-fx-background-radius: 5;
-fx-border-width: 0;
-fx-font-family: "Microsoft YaHei";
-fx-font-size: 18px;
-fx-text-fill: #80CBC4;
}
.btn_open:hover{
-fx-background-color:#ee... | /content/code_sandbox/app/src/css/apkInfoPrinter.css | css | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 605 |
```css
.progress-bar .bar {
-fx-padding: 1px;
-fx-background-insets: 0;
-fx-background-color:
-fx-box-border,
linear-gradient(to bottom, derive(#009AF7,30%) 5%, derive(#009AF7,-17%));
}
.progress-bar > .track {
-fx-text-box-border: #fff;
-fx-control-inner-background: #fff;
}
.... | /content/code_sandbox/app/src/css/jiagu.css | css | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 320 |
```css
/**/
.setting_view{
-fx-background-color: #fff;
//-fx-background-image:url('../res/bg/bg_gradient3.png');
-fx-background-position: center center;
-fx-background-repeat:no-repeat;
}
/**/
.button_close{
-fx-background-radius: 0;
-fx-border-style: null;
-fx-background-color: null;
-... | /content/code_sandbox/app/src/css/settings.css | css | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 610 |
```css
.bg_black_transparent {
-fx-background-color: #00000022;
}
.bg_white {
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.4), 10, 0.5, 0.0, 0.0);
-fx-background-radius: 5;
-fx-background-color: null;
-fx-border-radius: 5;
-fx-border-width: 2;
-fx-border-color : white;
-fx-padding: ... | /content/code_sandbox/app/src/css/ui.css | css | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 526 |
```java
package com.linchaolong.apktoolplus;
import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Background;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
imp... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/Main.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 487 |
```java
package com.linchaolong.apktoolplus.ui;
import com.linchaolong.apktoolplus.utils.LogUtils;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Pos;
import javafx.scene.Parent;
import javafx.scene.control.Button;
import javafx.scene.layout.*;
import javafx.scene.text.Text;
... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/ui/Popup.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,113 |
```java
package com.linchaolong.apktoolplus;
import com.linchaolong.apktoolplus.core.AppManager;
import com.linchaolong.apktoolplus.utils.*;
import com.linchaolong.apktoolplus.core.debug.LogManager;
import java.io.*;
import java.net.URL;
import java.util.Properties;
import java.util.jar.Manifest;
/**
* Created by l... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/Config.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,641 |
```java
package com.linchaolong.apktoolplus.ui;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.StackPane;
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
/**
*
... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/ui/UIStack.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 452 |
```java
package com.linchaolong.apktoolplus.ui;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Prio... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/ui/DialogPlus.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 979 |
```java
package com.linchaolong.apktoolplus.ui;
import com.linchaolong.apktoolplus.utils.LogUtils;
import javafx.application.Platform;
import javafx.geometry.Pos;
import javafx.scene.Parent;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.la... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/ui/Loading.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 839 |
```java
package com.linchaolong.apktoolplus.ui;
import javafx.stage.DirectoryChooser;
import javafx.stage.Window;
import java.io.File;
/**
*
*
* Created by linchaolong on 2015/9/7.
*/
public class DirectorySelecter {
private DirectoryChooser dirChooser;
private Window window;
private DirectorySele... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/ui/DirectorySelecter.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 174 |
```java
package com.linchaolong.apktoolplus.ui;
/**
* Created by linchaolong on 2015/9/6.
*/
interface DialogCallback {
public static final int CODE_CONFIRM = 1;
public static final int CODE_CONCEL = 1;
/**
*
*
* @param code DialogCallback.CODE_xxx
* @param msg
*/
void... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/ui/DialogCallback.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 95 |
```java
package com.linchaolong.apktoolplus.ui;
import javafx.animation.TranslateTransition;
import javafx.application.Platform;
import javafx.geometry.Pos;
import javafx.scene.Parent;
import javafx.scene.control.Label;
import javafx.scene.effect.BlurType;
import javafx.scene.effect.DropShadow;
import javafx.scene.lay... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/ui/Toast.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 527 |
```java
package com.linchaolong.apktoolplus.ui;
import javafx.stage.FileChooser;
import javafx.stage.Window;
import com.linchaolong.apktoolplus.Config;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* Created by linchaolong on 2015/8/28.
*/
public class FileSelecter {
private File... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/ui/FileSelecter.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 617 |
```java
package com.linchaolong.apktoolplus.core;
import com.linchaolong.apktoolplus.utils.ClassUtils;
import com.linchaolong.apktoolplus.utils.CmdUtils;
import com.linchaolong.apktoolplus.utils.LogUtils;
import com.linchaolong.apktoolplus.utils.ZipUtils;
import java.io.File;
/**
* Created by linchaolong on 2015/11... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/Proguard.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 569 |
```java
package com.linchaolong.apktoolplus.core;
import javafx.application.Platform;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import com.linchaolong.apktoolplus.Config;
import com.linchaolong.apktoolplus.ui.Loading;
import com.linchaolong.apktoolplus.ui.Popup;
import com.linchaolong.apktoolpl... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/Global.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 517 |
```java
package com.linchaolong.apktoolplus.core;
import com.linchaolong.apktoolplus.Config;
import com.linchaolong.apktoolplus.utils.Base64Utils;
import com.linchaolong.apktoolplus.utils.StringUtils;
import java.io.File;
/**
*
*
* Created by linchaolong on 2015/11/28.
*/
public class SettingHelper {
publi... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/SettingHelper.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 372 |
```java
package com.linchaolong.apktoolplus.core;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class ApkToolYml {
private File file;
private List<String> lines;
private int targetSdkVersionIndex;
public ApkToolYml(File file) ... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/ApkToolYml.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 241 |
```java
package com.linchaolong.apktoolplus.core;
import com.linchaolong.apktoolplus.utils.*;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
/**
* Jadjava
*
* Created by linchaolong on 2015/11/15.
*/
public class Jad {
public static final String TAG = Jad.class.getS... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/Jad.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 986 |
```java
package com.linchaolong.apktoolplus.core;
import javafx.animation.FadeTransition;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Pos;
import javafx.scene.Parent;
import javafx.scene.layout.StackPane;
import java.io.IOException;
import java.net.URL;
/**
* Created by linchaolong on 2016/3/28.
*/
publi... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/ActivityManager.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 275 |
```java
package com.linchaolong.apktoolplus.core;
public abstract class Callback<T>{
public abstract void callback(T t);
}
``` | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/Callback.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 28 |
```java
package com.linchaolong.apktoolplus.core;
import com.linchaolong.apktoolplus.utils.*;
import com.sun.javafx.application.PlatformImpl;
import javafx.application.Platform;
import com.linchaolong.apktoolplus.Config;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxEx... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/AppManager.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,731 |
```java
package com.linchaolong.apktoolplus.core;
/**
* keystore
*
* Created by Administrator on 2015/8/30.
*/
public class KeystoreConfig {
public static final String TAG = KeystoreConfig.class.getSimpleName();
/** keystore **/
public String keystorePath;
/** keystore **/
public String keyst... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/KeystoreConfig.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 96 |
```java
package com.linchaolong.apktoolplus.core.jiagu;
import com.linchaolong.apktoolplus.core.ApkToolPlus;
import com.linchaolong.apktoolplus.core.AppManager;
import com.linchaolong.apktoolplus.core.Callback;
import com.linchaolong.apktoolplus.core.KeystoreConfig;
import com.linchaolong.apktoolplus.utils.*;
import c... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/jiagu/JiaGu.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 2,313 |
```java
package com.linchaolong.apktoolplus.core.packagetool;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class SmaliTool {
public File file;
private List<String> lines;
private int superIndex;
public SmaliTool(File file) {
... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/packagetool/SmaliTool.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 225 |
```java
package com.linchaolong.apktoolplus.core;
import brut.androlib.AndrolibException;
import brut.androlib.src.SmaliBuilder;
import brut.apktool.Main;
import brut.common.BrutException;
import brut.directory.ExtFile;
import com.googlecode.dex2jar.tools.Dex2jarCmd;
import com.googlecode.dex2jar.tools.Jar2Dex;
import... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/ApkToolPlus.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 3,823 |
```java
package com.linchaolong.apktoolplus.core.packagetool;
import com.linchaolong.apktoolplus.core.ApkToolPlus;
import com.linchaolong.apktoolplus.core.ApkToolYml;
import com.linchaolong.apktoolplus.core.KeystoreConfig;
import com.linchaolong.apktoolplus.utils.FileHelper;
import com.linchaolong.apktoolplus.utils.Lo... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/packagetool/PackageTool.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 2,258 |
```java
package com.linchaolong.apktoolplus.core.packagetool;
import com.android.manifmerger.*;
import com.android.utils.StdLogger;
import com.google.common.base.Optional;
import com.linchaolong.apktoolplus.utils.FileHelper;
import com.linchaolong.apktoolplus.utils.Logger;
import com.linchaolong.apktoolplus.utils.Stri... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/packagetool/ManifestCombiner.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 3,202 |
```java
package com.linchaolong.apktoolplus.core.packagetool;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.LinkedHashMap;
import java.util.Map;
public class FileConfigTool {
private File file;
private Map<String, String> params = new LinkedHashMap<>();
public FileConfigT... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/packagetool/FileConfigTool.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 211 |
```java
package com.linchaolong.apktoolplus.core.packagetool;
import com.linchaolong.apktoolplus.utils.*;
import org.apache.commons.io.FileUtils;
import org.dom4j.*;
import java.io.File;
import java.io.FileWriter;
import java.util.Map;
public class ResMerger {
public static void copySo(File soDir, File destDir) ... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/packagetool/ResMerger.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 970 |
```java
package com.linchaolong.apktoolplus.core.debug;
import com.linchaolong.apktoolplus.core.AppManager;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
*
*
* Created by linchaolong on 2015/9/7.
*/
public class LogManager {
public static final String TAG = LogManager.clas... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/debug/LogManager.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 751 |
```java
package com.linchaolong.apktoolplus.core.debug;
/**
*
*
* Created by linchaolong on 2015/9/7.
*/
public interface OutputListener {
void write(int b);
void write(byte[] buf, int off, int len);
}
``` | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/debug/OutputListener.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 60 |
```java
package com.linchaolong.apktoolplus.core.debug;
import java.io.OutputStream;
import java.io.PrintStream;
/**
*
*/
class OutputDelegate extends PrintStream {
private OutputListener outputListener;
public OutputDelegate(OutputStream out) {
super(out);
}
@Override
public void wr... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/core/debug/OutputDelegate.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 179 |
```java
package com.linchaolong.apktoolplus.animation;
import javafx.animation.Interpolator;
import javafx.animation.ParallelTransition;
import javafx.animation.PauseTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.SequentialTransition;
import javafx.animation.TranslateTransition;
import ja... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/animation/FlipTransition.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,004 |
```java
package com.linchaolong.apktoolplus.utils;
import java.io.File;
public abstract class FileWalker {
public void walk(String path) {
File root = new File(path);
File[] list = root.listFiles();
if (list == null) return;
for (File f : list) {
if (f.isDirectory())... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/utils/FileWalker.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 105 |
```java
package com.linchaolong.apktoolplus.utils;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class EncryptUtils {
private static final int BUFF_SIZE = 1024*1024*5; // 10MB
public static byte[] encryptXXTEA(byte[] data){
ret... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/utils/EncryptUtils.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 439 |
```java
package com.linchaolong.apktoolplus.utils;
/**
* Created by linchaolong on 2020/10/29.
*/
public class Logger {
public static final String TAG = "ApkToolPlus";
public static void print(String msg){
System.out.println(msg);
}
public static void print(String format, String... msg){
... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/utils/Logger.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 135 |
```java
package com.linchaolong.apktoolplus.base;
import javafx.application.Platform;
import javafx.scene.Node;
import com.linchaolong.apktoolplus.core.Global;
/**
* Created by linchaolong on 2016/3/25.
*/
public class Activity {
private Node mRootView;
protected void initRootView(Node node){
Node... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/base/Activity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 192 |
```java
package com.linchaolong.apktoolplus.utils;
import javafx.application.Platform;
import javafx.embed.swing.SwingFXUtils;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.geometry.Insets;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.s... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/utils/ViewUtils.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 2,703 |
```java
package com.linchaolong.apktoolplus.module.jiagu;
import com.linchaolong.apktoolplus.utils.LogUtils;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.Timeline;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.sc... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/jiagu/JiaGuActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,576 |
```java
package com.linchaolong.apktoolplus.module.jiagu;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.scene.Parent;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.Tooltip;
import javafx.scene.tex... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/jiagu/ApkItemView.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 687 |
```java
package com.linchaolong.apktoolplus.module.apktool;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleButton;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
impo... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/apktool/ApkToolView.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 720 |
```java
package com.linchaolong.apktoolplus.module.settings;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import com.linchaolong.apktoolplus.base.Activity;
import com.linchaolong.apktoolplus.Config;
import com.linchaolong.apktoolp... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/settings/CommonSettingsActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 554 |
```java
package com.linchaolong.apktoolplus.module.apktool;
import com.linchaolong.apktoolplus.core.*;
import com.linchaolong.apktoolplus.utils.*;
import javafx.fxml.FXML;
import com.linchaolong.apktoolplus.Config;
import com.linchaolong.apktoolplus.ui.DirectorySelecter;
import com.linchaolong.apktoolplus.ui.FileSelec... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/apktool/ApkToolActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 2,224 |
```java
package com.linchaolong.apktoolplus.module.settings;
import com.linchaolong.apktoolplus.core.ApkToolPlus;
import com.linchaolong.apktoolplus.core.AppManager;
import com.linchaolong.apktoolplus.core.Global;
import com.linchaolong.apktoolplus.utils.*;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
im... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/settings/ApkToolSettingsActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,380 |
```java
package com.linchaolong.apktoolplus.module.settings;
import javafx.animation.FadeTransition;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.control.Butt... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/settings/SettingsActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 776 |
```java
package com.linchaolong.apktoolplus.module.settings;
import javafx.fxml.Initializable;
import com.linchaolong.apktoolplus.base.Activity;
import com.linchaolong.apktoolplus.core.AppManager;
import com.linchaolong.apktoolplus.Config;
import java.net.URL;
import java.util.ResourceBundle;
/**
* Created by linch... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/settings/AboutSettingsActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 203 |
```java
package com.linchaolong.apktoolplus.module.main;
import com.linchaolong.apktoolplus.utils.FileHelper;
import com.linchaolong.apktoolplus.utils.ZipUtils;
import net.lingala.zip4j.core.ZipFile;
import net.lingala.zip4j.exception.ZipException;
import net.lingala.zip4j.model.FileHeader;
import java.io.File;
impor... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/main/MultDexSupport.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 379 |
```java
package com.linchaolong.apktoolplus.module.main;
import com.linchaolong.apktoolplus.core.ApkToolPlus;
import com.linchaolong.apktoolplus.core.AppManager;
import com.linchaolong.apktoolplus.utils.FileHelper;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* dex2jar multi-dex suppo... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/main/Dex2JarMultDexSupport.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 544 |
```java
package com.linchaolong.apktoolplus.module.main;
import com.linchaolong.apktoolplus.utils.LogUtils;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.scene.Group;
import javafx.scene.control.Button;
import javafx.scene.control.Pagination;
import javafx.scene.layout.AnchorPane;
import j... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/main/MainView.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,469 |
```java
package com.linchaolong.apktoolplus.module.main;
import com.linchaolong.apktoolplus.core.ApkToolPlus;
import com.linchaolong.apktoolplus.core.AppManager;
import com.linchaolong.apktoolplus.utils.FileHelper;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* dex2jar multi-dex suppo... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/main/Dex2SmaliMultDexSupport.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 587 |
```java
package com.linchaolong.apktoolplus.module.main;
import com.linchaolong.apktoolplus.utils.*;
import com.linchaolong.apktoolplus.utils.javafx.AnimationHelper;
import com.linchaolong.apktoolplus.utils.javafx.ResizeHelper;
import ee.ioc.cs.jbe.browser.BrowserApplication;
import javafx.application.Platform;
import... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/main/MainActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 4,462 |
```java
package com.linchaolong.apktoolplus.module.apkinfoprinter;
import axmlprinter.AXMLPrinter;
import com.linchaolong.apktoolplus.utils.*;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.input.DragEvent;
impor... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/apkinfoprinter/ApkInfoPrinterActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,137 |
```java
package com.linchaolong.apktoolplus.module.debug;
import javafx.application.Platform;
import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import com.linchaolong.apktoolplus.base.Activity;
import com.linchaolong.apktoolplus.core.debug.LogManager;
import com.linchaolo... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/debug/DebugActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 559 |
```java
package com.linchaolong.apktoolplus.module.debug;
import com.linchaolong.apktoolplus.utils.ClassUtils;
import javafx.scene.Parent;
import javafx.stage.Stage;
import com.linchaolong.apktoolplus.utils.javafx.ResizeHelper;
import com.linchaolong.apktoolplus.utils.ViewUtils;
/**
*
*
* Created by linchaolong o... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/debug/DebugView.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 345 |
```java
package com.linchaolong.apktoolplus.module.icon;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Slider;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import com.linchao... | /content/code_sandbox/app/src/com/linchaolong/apktoolplus/module/icon/IconToolActivity.java | java | 2016-04-18T17:52:39 | 2024-08-16T07:10:35 | ApkToolPlus | CYRUS-STUDIO/ApkToolPlus | 1,196 | 1,538 |
```javascript
'use strict'
import engineFactory from '../src/index'
import sinon from 'sinon'
describe('Engine: failure', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
const event = { type: 'generic' }
const conditions ... | /content/code_sandbox/test/engine-failure.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 280 |
```javascript
'use strict'
import sinon from 'sinon'
import engineFactory from '../src/index'
describe('Engine: "not" conditions', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
describe('supports a single "not" condition'... | /content/code_sandbox/test/engine-not.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 301 |
```javascript
'use strict'
import engineFactory, { Fact } from '../src/index'
import sinon from 'sinon'
describe('Engine: custom cache keys', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
const event = { type: 'early-twent... | /content/code_sandbox/test/engine-facts-calling-facts.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 605 |
```javascript
'use strict'
import sinon from 'sinon'
import engineFactory from '../src/index'
describe('Engine: cache', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
const event = { type: 'setDrinkingFlag' }
const colle... | /content/code_sandbox/test/engine-cache.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 409 |
```javascript
'use strict'
import sinon from 'sinon'
import engineFactory from '../src/index'
async function dictionary (params, engine) {
const words = ['coffee', 'Aardvark', 'moose', 'ladder', 'antelope']
return words[params.wordIndex]
}
describe('Engine: operator', () => {
let sandbox
before(() => {
s... | /content/code_sandbox/test/engine-operator.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 479 |
```javascript
'use strict'
import engineFactory from '../src/index'
import sinon from 'sinon'
describe('Engine: recursive rules', () => {
let engine
const event = { type: 'middle-income-adult' }
const nestedAnyCondition = {
all: [
{
fact: 'age',
operator: 'lessThan',
value: 65
... | /content/code_sandbox/test/engine-recusive-rules.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 1,333 |
```javascript
'use strict'
import engineFactory from '../src/index'
import Almanac from '../src/almanac'
import sinon from 'sinon'
describe('Engine: run', () => {
let engine, rule, rule2
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
const c... | /content/code_sandbox/test/engine-run.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 1,053 |
```javascript
'use strict'
import engineFactory from '../src/index'
describe('Engine: failure', () => {
let engine
const event = { type: 'generic' }
const conditions = {
any: [{
fact: 'age',
operator: 'greaterThanInclusive',
value: 21
}]
}
beforeEach(() => {
engine = engineFac... | /content/code_sandbox/test/engine-error-handling.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 162 |
```javascript
'use strict'
import engineFactory, { Fact, Rule } from '../src/index'
describe('Engine: custom properties', () => {
let engine
const event = { type: 'generic' }
describe('all conditions', () => {
it('preserves custom properties set on fact', () => {
engine = engineFactory()
const ... | /content/code_sandbox/test/engine-custom-properties.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 470 |
```javascript
'use strict'
import engineFactory from '../src/index'
import perfy from 'perfy'
import deepClone from 'clone'
describe('Performance', () => {
const baseConditions = {
any: [{
fact: 'age',
operator: 'lessThan',
value: 50
},
{
fact: 'segment',
operator: 'equal',... | /content/code_sandbox/test/performance.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 416 |
```javascript
'use strict'
import Condition from '../src/condition'
import defaultOperators from '../src/engine-default-operators'
import Almanac from '../src/almanac'
import Fact from '../src/fact'
const operators = new Map()
defaultOperators.forEach(o => operators.set(o.name, o))
function condition () {
return {... | /content/code_sandbox/test/condition.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 3,403 |
```javascript
'use strict'
import sinon from 'sinon'
import engineFactory from '../src/index'
describe('Engine: condition', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
describe('setCondition()', () => {
describe('va... | /content/code_sandbox/test/engine-condition.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 1,889 |
```javascript
'use strict'
import engineFactory from '../src/index'
import sinon from 'sinon'
describe('Engine', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
const event = { type: 'early-twenties' }
const conditions = {... | /content/code_sandbox/test/engine-parallel-condition-cache.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 493 |
```javascript
'use strict'
import sinon from 'sinon'
import engineFactory from '../src/index'
describe('Engine: "any" conditions', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
describe('supports a single "any" condition'... | /content/code_sandbox/test/engine-any.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 635 |
```javascript
'use strict'
import sinon from 'sinon'
import { get } from 'lodash'
import engineFactory from '../src/index'
const CHILD = 14
const ADULT = 75
async function eligibilityField (params, engine) {
if (params.field === 'age') {
if (params.eligibilityId === 1) {
return CHILD
}
return ADU... | /content/code_sandbox/test/engine-fact.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 2,375 |
```javascript
'use strict'
import { Fact } from '../src/index'
describe('Fact', () => {
function subject (id, definition, options) {
return new Fact(id, definition, options)
}
describe('Fact::constructor', () => {
it('works for constant facts', () => {
const fact = subject('factId', 10)
expe... | /content/code_sandbox/test/fact.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 361 |
```javascript
'use strict'
import engineFactory from '../src/index'
import sinon from 'sinon'
describe('Engine: fact priority', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
const event = { type: 'adult-human-admins' }
... | /content/code_sandbox/test/engine-fact-priority.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 1,281 |
```javascript
'use strict'
import engineFactory from '../src/index'
import sinon from 'sinon'
describe('Engine: rule priorities', () => {
let engine
const highPriorityEvent = { type: 'highPriorityEvent' }
const midPriorityEvent = { type: 'midPriorityEvent' }
const lowestPriorityEvent = { type: 'lowestPriorit... | /content/code_sandbox/test/engine-rule-priority.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 667 |
```javascript
'use strict'
import engineFactory, { Fact } from '../src/index'
import Almanac from '../src/almanac'
import sinon from 'sinon'
describe('Engine: event', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
const ev... | /content/code_sandbox/test/engine-event.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 4,970 |
```javascript
'use strict'
import sinon from 'sinon'
import engineFactory, { Fact, Rule, Operator } from '../src/index'
import defaultOperators from '../src/engine-default-operators'
describe('Engine', () => {
const operatorCount = defaultOperators.length
let engine
let sandbox
before(() => {
sandbox = s... | /content/code_sandbox/test/engine.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 2,545 |
```javascript
'use strict'
import engineFactory from '../src/index'
import sinon from 'sinon'
describe('Engine: fact to fact comparison', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
let eventSpy
function setup (condit... | /content/code_sandbox/test/engine-fact-comparison.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 780 |
```javascript
'use strict'
import engineFactory from '../src/index'
import sinon from 'sinon'
describe('Engine: fact priority', () => {
let engine
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
afterEach(() => {
sandbox.restore()
})
const event = { type: 'adult-human-admins' }
... | /content/code_sandbox/test/engine-controls.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 362 |
```javascript
'use strict'
import { Operator } from '../src/index'
describe('Operator', () => {
describe('constructor()', () => {
function subject (...args) {
return new Operator(...args)
}
it('adds the operator', () => {
const operator = subject('startsWithLetter', (factValue, jsonValue) =... | /content/code_sandbox/test/operator.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 171 |
```javascript
import { Fact } from '../src/index'
import Almanac from '../src/almanac'
import sinon from 'sinon'
describe('Almanac', () => {
let almanac
let factSpy
let sandbox
before(() => {
sandbox = sinon.createSandbox()
})
beforeEach(() => {
factSpy = sandbox.spy()
})
afterEach(() => {
... | /content/code_sandbox/test/almanac.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 1,653 |
```javascript
'use strict'
import Engine from '../src/index'
import Rule from '../src/rule'
import sinon from 'sinon'
describe('Rule', () => {
const rule = new Rule()
const conditionBase = factories.condition({
fact: 'age',
value: 50
})
describe('constructor()', () => {
it('can be initialized wit... | /content/code_sandbox/test/rule.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 2,398 |
```javascript
'use strict'
import subject from '../src/index'
describe('json-business-subject', () => {
it('treats each rule engine independently', () => {
const engine1 = subject()
const engine2 = subject()
engine1.addRule(factories.rule())
engine2.addRule(factories.rule())
expect(engine1.rules... | /content/code_sandbox/test/index.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 94 |
```javascript
'use strict'
import sinon from 'sinon'
import engineFactory from '../src/index'
async function factSenior (params, engine) {
return 65
}
async function factChild (params, engine) {
return 10
}
async function factAdult (params, engine) {
return 30
}
describe('Engine: "all" conditions', () => {
... | /content/code_sandbox/test/engine-all.test.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 628 |
```shell
#!/bin/bash
#
# npm links the examples directory to the local copy of json-rules-engine
# and runs all examples. This can be used to test a release candidate version
# against the examples as an extra compatiblity test
#
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $THIS_DI... | /content/code_sandbox/test/support/example_runner.sh | shell | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 125 |
```javascript
'use strict'
module.exports = function (options) {
return {
fact: options.fact || null,
value: options.value || null,
operator: options.operator || 'equal'
}
}
``` | /content/code_sandbox/test/support/condition-factory.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 44 |
```javascript
'use strict'
const chai = require('chai')
const sinonChai = require('sinon-chai')
const chaiAsPromised = require('chai-as-promised')
const dirtyChai = require('dirty-chai')
chai.use(chaiAsPromised)
chai.use(sinonChai)
chai.use(dirtyChai)
global.expect = chai.expect
global.factories = {
rule: require('.... | /content/code_sandbox/test/support/bootstrap.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 99 |
```javascript
'use strict'
import sinon from 'sinon'
import { expect } from 'chai'
import { Engine } from '../../src/index'
/**
* acceptance tests are intended to use features that, when used in combination,
* could cause integration bugs not caught by the rest of the test suite
*/
describe('Acceptance', () => {
... | /content/code_sandbox/test/acceptance/acceptance.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 1,648 |
```javascript
'use strict'
module.exports = (options) => {
options = options || {}
return {
name: options.name,
priority: options.priority || 1,
conditions: options.conditions || {
all: [{
fact: 'age',
operator: 'lessThan',
value: 45
},
{
fact: 'pointBa... | /content/code_sandbox/test/support/rule-factory.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 137 |
```javascript
'use strict'
/*
* This is an advanced example demonstrating an event that emits the value
* of a fact in it's parameters.
*
* Usage:
* node ./examples/11-using-facts-in-events.js
*
* For detailed output:
* DEBUG=json-rules-engine node ./examples/11-using-facts-in-events.js
*/
require('colors... | /content/code_sandbox/examples/11-using-facts-in-events.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 742 |
```javascript
'use strict'
/*
* This example demonstrates computing fact values at runtime, and leveraging the 'path' feature
* to select object properties returned by facts
*
* Usage:
* node ./examples/03-dynamic-facts.js
*
* For detailed output:
* DEBUG=json-rules-engine node ./examples/03-dynamic-facts.j... | /content/code_sandbox/examples/03-dynamic-facts.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 683 |
```javascript
'use strict'
/*
* This is an advanced example that demonstrates facts with dependencies
* on other facts. In addition, it demonstrates facts that load data asynchronously
* from outside sources (api's, databases, etc)
*
* Usage:
* node ./examples/04-fact-dependency.js
*
* For detailed output:
... | /content/code_sandbox/examples/04-fact-dependency.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 1,011 |
```javascript
'use strict'
/*
* This is an advanced example demonstrating rules that re-use a condition defined
* in the engine.
*
* Usage:
* node ./examples/10-condition-sharing.js
*
* For detailed output:
* DEBUG=json-rules-engine node ./examples/10-condition-sharing.js
*/
require('colors')
const { Engi... | /content/code_sandbox/examples/10-condition-sharing.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 804 |
```javascript
'use strict'
/*
* This is an advanced example that demonstrates using fact priorities to optimize the rules engine.
*
* Usage:
* node ./examples/05-optimizing-runtime-with-fact-priorities.js
*
* For detailed output:
* DEBUG=json-rules-engine node ./examples/05-optimizing-runtime-with-fact-prior... | /content/code_sandbox/examples/05-optimizing-runtime-with-fact-priorities.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 753 |
```javascript
'use strict'
/*
* This is an advanced example demonstrating rules that passed based off the
* results of other rules by adding runtime facts. It also demonstrates
* accessing the runtime facts after engine execution.
*
* Usage:
* node ./examples/07-rule-chaining.js
*
* For detailed output:
* ... | /content/code_sandbox/examples/07-rule-chaining.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 1,124 |
```javascript
'use strict'
/*
* This is a basic example demonstrating a condition that compares two facts
*
* Usage:
* node ./examples/08-fact-comparison.js
*
* For detailed output:
* DEBUG=json-rules-engine node ./examples/08-fact-comparison.js
*/
require('colors')
const { Engine } = require('json-rules-e... | /content/code_sandbox/examples/08-fact-comparison.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 897 |
```javascript
'use strict'
/*
* This is the hello-world example from the README.
*
* Usage:
* node ./examples/01-hello-world.js
*
* For detailed output:
* DEBUG=json-rules-engine node ./examples/01-hello-world.js
*/
require('colors')
const { Engine } = require('json-rules-engine')
async function start () ... | /content/code_sandbox/examples/01-hello-world.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 314 |
```javascript
'use strict'
/*
* This example demonstates nested boolean logic - e.g. (x OR y) AND (a OR b).
*
* Usage:
* node ./examples/02-nested-boolean-logic.js
*
* For detailed output:
* DEBUG=json-rules-engine node ./examples/02-nested-boolean-logic.js
*/
require('colors')
const { Engine } = require('... | /content/code_sandbox/examples/02-nested-boolean-logic.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 447 |
```javascript
'use strict'
require('colors')
const { Almanac, Engine } = require('json-rules-engine')
/**
* Almanac that support piping values through named functions
*/
class PipedAlmanac extends Almanac {
constructor (options) {
super(options)
this.pipes = new Map()
}
addPipe (name, pipe) {
thi... | /content/code_sandbox/examples/12-using-custom-almanac.js | javascript | 2016-01-26T00:55:41 | 2024-08-16T15:48:12 | json-rules-engine | CacheControl/json-rules-engine | 2,561 | 667 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.