Tabnine Logo
PApplet.join
Code IndexAdd Tabnine to your IDE (free)

How to use
join
method
in
processing.core.PApplet

Best Java code snippets using processing.core.PApplet.join (Showing top 20 results out of 315)

origin: ajavamind/Processing-Cardboard

/**
 * Join an array of Strings together as a single String,
 * separated by the whatever's passed in for the separator.
 */
static public String join(String str[], char separator) {
  return join(str, String.valueOf(separator));
}
origin: org.processing/core

/**
 * ( begin auto-generated from join.xml )
 *
 * Combines an array of Strings into one String, each separated by the
 * character(s) used for the <b>separator</b> parameter. To join arrays of
 * ints or floats, it's necessary to first convert them to strings using
 * <b>nf()</b> or <b>nfs()</b>.
 *
 * ( end auto-generated )
 * @webref data:string_functions
 * @param list array of Strings
 * @param separator char or String to be placed between each item
 * @see PApplet#split(String, String)
 * @see PApplet#trim(String)
 * @see PApplet#nf(float, int, int)
 * @see PApplet#nfs(float, int, int)
 */
static public String join(String[] list, char separator) {
 return join(list, String.valueOf(separator));
}
origin: ajavamind/Processing-Cardboard

static public Process exec(String[] argv) {
  try {
    return Runtime.getRuntime().exec(argv);
  } catch (Exception e) {
    e.printStackTrace();
    throw new RuntimeException("Could not open " + join(argv, ' '));
  }
}
origin: org.processing/core

/**
 * Pass a set of arguments directly to the command line. Uses Java's
 * <A HREF="https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#exec-java.lang.String:A-">Runtime.exec()</A>
 * method. This is different from the <A HREF="https://processing.org/reference/launch_.html">launch()</A>
 * method, which uses the operating system's launcher to open the files.
 * It's always a good idea to use a full path to the executable here.
 * <pre>
 * exec("/usr/bin/say", "welcome to the command line");
 * </pre>
 * Or if you want to wait until it's completed, something like this:
 * <pre>
 * Process p = exec("/usr/bin/say", "waiting until done");
 * try {
 *   int result = p.waitFor();
 *   println("the process returned " + result);
 * } catch (InterruptedException e) { }
 * </pre>
 * You can also get the system output and error streams from the Process
 * object, but that's more that we'd like to cover here.
 * @return a <A HREF="https://docs.oracle.com/javase/8/docs/api/java/lang/Process.html">Process</A> object
 */
static public Process exec(String... args) {
 try {
  return Runtime.getRuntime().exec(args);
 } catch (Exception e) {
  throw new RuntimeException("Could not open " + join(args, ' '), e);
 }
}
origin: org.processing/core

protected void convertRow(DataOutputStream output, String[] pieces) throws IOException {
 if (pieces.length > getColumnCount()) {
  throw new IllegalArgumentException("Row with too many columns: " +
                    PApplet.join(pieces, ","));
origin: ajavamind/Processing-Cardboard

protected void convertRow(DataOutputStream output, String[] pieces) throws IOException {
 if (pieces.length > getColumnCount()) {
  throw new IllegalArgumentException("Row with too many columns: " +
                    PApplet.join(pieces, ","));
origin: ajavamind/Processing-Cardboard

String singleLine = PApplet.join(PApplet.trim(tempLines), "");
if (indent == -1) {
 return singleLine;
origin: org.processing/core

String singleLine = PApplet.join(PApplet.trim(tempLines), "");
if (indent == -1) {
 return singleLine;
origin: org.processing/core

/**
 * @param shaderSource a string containing the shader's code
 */
protected boolean compileFragmentShader() {
 pgl.shaderSource(glFragment, PApplet.join(fragmentShaderSource, "\n"));
 pgl.compileShader(glFragment);
 pgl.getShaderiv(glFragment, PGL.COMPILE_STATUS, intBuffer);
 boolean compiled = intBuffer.get(0) == 0 ? false : true;
 if (!compiled) {
  PGraphics.showException("Cannot compile fragment shader:\n" +
              pgl.getShaderInfoLog(glFragment));
  return false;
 } else {
  return true;
 }
}
origin: ajavamind/Processing-Cardboard

/**
 * @param shaderSource a string containing the shader's code
 */
protected boolean compileVertexShader() {
 pgl.shaderSource(glVertex, PApplet.join(vertexShaderSource, "\n"));
 pgl.compileShader(glVertex);
 pgl.getShaderiv(glVertex, PGL.COMPILE_STATUS, intBuffer);
 boolean compiled = intBuffer.get(0) == 0 ? false : true;
 if (!compiled) {
  PGraphics.showException("Cannot compile vertex shader:\n" +
              pgl.getShaderInfoLog(glVertex));
  return false;
 } else {
  return true;
 }
}
origin: org.processing/core

};
zos.putNextEntry(entry);
zos.write(PApplet.join(lines, "\n").getBytes());
zos.closeEntry();
 " xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" />"
};
byte[] dummyBytes = PApplet.join(lines, "\n").getBytes();
for (String filename : dummyFiles) {
 entry = new ZipEntry(filename);
origin: org.processing/core

/**
 * @param shaderSource a string containing the shader's code
 */
protected boolean compileVertexShader() {
 pgl.shaderSource(glVertex, PApplet.join(vertexShaderSource, "\n"));
 pgl.compileShader(glVertex);
 pgl.getShaderiv(glVertex, PGL.COMPILE_STATUS, intBuffer);
 boolean compiled = intBuffer.get(0) == 0 ? false : true;
 if (!compiled) {
  PGraphics.showException("Cannot compile vertex shader:\n" +
              pgl.getShaderInfoLog(glVertex));
  return false;
 } else {
  return true;
 }
}
origin: ajavamind/Processing-Cardboard

/**
 * @param shaderSource a string containing the shader's code
 */
protected boolean compileFragmentShader() {
 pgl.shaderSource(glFragment, PApplet.join(fragmentShaderSource, "\n"));
 pgl.compileShader(glFragment);
 pgl.getShaderiv(glFragment, PGL.COMPILE_STATUS, intBuffer);
 boolean compiled = intBuffer.get(0) == 0 ? false : true;
 if (!compiled) {
  PGraphics.showException("Cannot compile fragment shader:\n" +
              pgl.getShaderInfoLog(glFragment));
  return false;
 } else {
  return true;
 }
}
origin: org.processing/core

protected PGL initTexRectShader() {
 PGL ppgl = primaryPGL ? this : graphics.getPrimaryPGL();
 if (!ppgl.loadedTexRectShader || ppgl.texRectShaderContext != ppgl.glContext) {
  String[] preprocVertSrc = preprocessVertexSource(texVertShaderSource, getGLSLVersion());
  String vertSource = PApplet.join(preprocVertSrc, "\n");
  String[] preprocFragSrc = preprocessFragmentSource(texRectFragShaderSource, getGLSLVersion());
  String fragSource = PApplet.join(preprocFragSrc, "\n");
  ppgl.texRectVertShader = createShader(VERTEX_SHADER, vertSource);
  ppgl.texRectFragShader = createShader(FRAGMENT_SHADER, fragSource);
  if (0 < ppgl.texRectVertShader && 0 < ppgl.texRectFragShader) {
   ppgl.texRectShaderProgram = createProgram(ppgl.texRectVertShader,
                        ppgl.texRectFragShader);
  }
  if (0 < ppgl.texRectShaderProgram) {
   ppgl.texRectVertLoc = getAttribLocation(ppgl.texRectShaderProgram, "position");
   ppgl.texRectTCoordLoc = getAttribLocation(ppgl.texRectShaderProgram, "texCoord");
   ppgl.texRectSamplerLoc = getUniformLocation(ppgl.texRectShaderProgram, "texMap");
  }
  ppgl.loadedTexRectShader = true;
  ppgl.texRectShaderContext = ppgl.glContext;
  genBuffers(1, intBuffer);
  ppgl.texRectGeoVBO = intBuffer.get(0);
  bindBuffer(ARRAY_BUFFER, ppgl.texRectGeoVBO);
  bufferData(ARRAY_BUFFER, 16 * SIZEOF_FLOAT, null, STATIC_DRAW);
 }
 return ppgl;
}
origin: ajavamind/Processing-Cardboard

protected PGL initTexRectShader() {
 PGL ppgl = primaryPGL ? this : graphics.getPrimaryPGL();
 if (!ppgl.loadedTexRectShader || ppgl.texRectShaderContext != ppgl.glContext) {
  String[] preprocVertSrc = preprocessVertexSource(texVertShaderSource, getGLSLVersion());
  String vertSource = PApplet.join(preprocVertSrc, "\n");
  String[] preprocFragSrc = preprocessFragmentSource(texRectFragShaderSource, getGLSLVersion());
  String fragSource = PApplet.join(preprocFragSrc, "\n");
  ppgl.texRectVertShader = createShader(VERTEX_SHADER, vertSource);
  ppgl.texRectFragShader = createShader(FRAGMENT_SHADER, fragSource);
  if (0 < ppgl.texRectVertShader && 0 < ppgl.texRectFragShader) {
   ppgl.texRectShaderProgram = createProgram(ppgl.texRectVertShader,
                        ppgl.texRectFragShader);
  }
  if (0 < ppgl.texRectShaderProgram) {
   ppgl.texRectVertLoc = getAttribLocation(ppgl.texRectShaderProgram, "position");
   ppgl.texRectTCoordLoc = getAttribLocation(ppgl.texRectShaderProgram, "texCoord");
   ppgl.texRectSamplerLoc = getUniformLocation(ppgl.texRectShaderProgram, "texMap");
  }
  ppgl.loadedTexRectShader = true;
  ppgl.texRectShaderContext = ppgl.glContext;
  genBuffers(1, intBuffer);
  ppgl.texRectGeoVBO = intBuffer.get(0);
  bindBuffer(ARRAY_BUFFER, ppgl.texRectGeoVBO);
  bufferData(ARRAY_BUFFER, 16 * SIZEOF_FLOAT, null, STATIC_DRAW);
 }
 return ppgl;
}
origin: org.processing/core

protected PGL initTex2DShader() {
 PGL ppgl = primaryPGL ? this : graphics.getPrimaryPGL();
 if (!ppgl.loadedTex2DShader || ppgl.tex2DShaderContext != ppgl.glContext) {
  String[] preprocVertSrc = preprocessVertexSource(texVertShaderSource, getGLSLVersion());
  String vertSource = PApplet.join(preprocVertSrc, "\n");
  String[] preprocFragSrc = preprocessFragmentSource(tex2DFragShaderSource, getGLSLVersion());
  String fragSource = PApplet.join(preprocFragSrc, "\n");
  ppgl.tex2DVertShader = createShader(VERTEX_SHADER, vertSource);
  ppgl.tex2DFragShader = createShader(FRAGMENT_SHADER, fragSource);
  if (0 < ppgl.tex2DVertShader && 0 < ppgl.tex2DFragShader) {
   ppgl.tex2DShaderProgram = createProgram(ppgl.tex2DVertShader, ppgl.tex2DFragShader);
  }
  if (0 < ppgl.tex2DShaderProgram) {
   ppgl.tex2DVertLoc = getAttribLocation(ppgl.tex2DShaderProgram, "position");
   ppgl.tex2DTCoordLoc = getAttribLocation(ppgl.tex2DShaderProgram, "texCoord");
   ppgl.tex2DSamplerLoc = getUniformLocation(ppgl.tex2DShaderProgram, "texMap");
  }
  ppgl.loadedTex2DShader = true;
  ppgl.tex2DShaderContext = ppgl.glContext;
  genBuffers(1, intBuffer);
  ppgl.tex2DGeoVBO = intBuffer.get(0);
  bindBuffer(ARRAY_BUFFER, ppgl.tex2DGeoVBO);
  bufferData(ARRAY_BUFFER, 16 * SIZEOF_FLOAT, null, STATIC_DRAW);
 }
 if (texData == null) {
  texData = allocateDirectFloatBuffer(texCoords.length);
 }
 return ppgl;
}
origin: ajavamind/Processing-Cardboard

protected PGL initTex2DShader() {
 PGL ppgl = primaryPGL ? this : graphics.getPrimaryPGL();
 if (!ppgl.loadedTex2DShader || ppgl.tex2DShaderContext != ppgl.glContext) {
  String[] preprocVertSrc = preprocessVertexSource(texVertShaderSource, getGLSLVersion());
  String vertSource = PApplet.join(preprocVertSrc, "\n");
  String[] preprocFragSrc = preprocessFragmentSource(tex2DFragShaderSource, getGLSLVersion());
  String fragSource = PApplet.join(preprocFragSrc, "\n");
  ppgl.tex2DVertShader = createShader(VERTEX_SHADER, vertSource);
  ppgl.tex2DFragShader = createShader(FRAGMENT_SHADER, fragSource);
  if (0 < ppgl.tex2DVertShader && 0 < ppgl.tex2DFragShader) {
   ppgl.tex2DShaderProgram = createProgram(ppgl.tex2DVertShader, ppgl.tex2DFragShader);
  }
  if (0 < ppgl.tex2DShaderProgram) {
   ppgl.tex2DVertLoc = getAttribLocation(ppgl.tex2DShaderProgram, "position");
   ppgl.tex2DTCoordLoc = getAttribLocation(ppgl.tex2DShaderProgram, "texCoord");
   ppgl.tex2DSamplerLoc = getUniformLocation(ppgl.tex2DShaderProgram, "texMap");
  }
  ppgl.loadedTex2DShader = true;
  ppgl.tex2DShaderContext = ppgl.glContext;
  genBuffers(1, intBuffer);
  ppgl.tex2DGeoVBO = intBuffer.get(0);
  bindBuffer(ARRAY_BUFFER, ppgl.tex2DGeoVBO);
  bufferData(ARRAY_BUFFER, 16 * SIZEOF_FLOAT, null, STATIC_DRAW);
 }
 if (texData == null) {
  texData = allocateDirectFloatBuffer(texCoords.length);
 }
 return ppgl;
}
origin: ajavamind/Processing-Cardboard

 PApplet.join(PApplet.subset(pathTokens, 0, i), ",");
String unparsed =
 PApplet.join(PApplet.subset(pathTokens, i), ",");
System.err.println("parsed: " + parsed);
System.err.println("unparsed: " + unparsed);
origin: org.processing/core

 PApplet.join(PApplet.subset(pathTokens, 0, i), ",");
String unparsed =
 PApplet.join(PApplet.subset(pathTokens, i), ",");
System.err.println("parsed: " + parsed);
System.err.println("unparsed: " + unparsed);
origin: mirador/mirador

public void save() {
 removeMissingHistoryFiles();
 settings.set("data.session", PApplet.join(projectHistory, "::"));
 settings.set("data.folder", projectFolder);
 settings.set("missing.string", missingString);
 settings.set("missing.threshold", Project.missingToString(missingThreshold));    
 settings.set("binning.algorithm", BinOptimizer.algorithmToString(binAlgorithm));    
 settings.set("correlation.pvalue", Project.pvalueToString(pValue));
 settings.set("correlation.algorithm", DependencyTest.algorithmToString(depTest));
 settings.set("correlation.sorting", Project.sortingToString(sortMethod));    
 settings.setInteger("correlation.surrogates", surrCount);
 settings.setFloat("correlation.threshold", threshold);
 settings.setInteger("performance.samplesize", initSliceSize);
 settings.setInteger("performance.plottime", maxPlotTime);
 settings.set("dates.parse", dateParsePattern);
 settings.set("dates.print", datePrintPattern);
 settings.setBoolean("examples.copy", copyExamples);
 settings.setBoolean("sessions.save", saveSessions);
 settings.setBoolean("sessions.oscout", oscOutput);
 settings.set("sessions.hostname", hostName);
 settings.setInteger("sessions.port", portNumber);
 settings.setInteger("plot.width", plotWidth);
 settings.setInteger("plot.height", plotHeight);
 settings.setColor("plot.color", plotColor);
 settings.save();    
}
processing.corePAppletjoin

Javadoc

Join an array of Strings together as a single String, separated by the whatever's passed in for the separator.

Popular methods of PApplet

  • constrain
  • createGraphics
    Create an offscreen graphics surface for drawing, in this case for a renderer that writes to a file
  • loadStrings
    ( begin auto-generated from loadStrings.xml ) Reads the contents of a file or url and creates a Stri
  • saveStrings
    ( begin auto-generated from saveStrings.xml ) Writes an array of strings to a file, one line per str
  • abs
  • createImage
    ( begin auto-generated from createImage.xml ) Creates a new PImage (the datatype for storing images)
  • createShape
  • createWriter
    ( begin auto-generated from createWriter.xml ) Creates a new file in the sketch folder, and a PrintW
  • loadImage
  • main
    main() method for running this class from the command line. Usage: PApplet [options] [s
  • max
  • parseInt
  • max,
  • parseInt,
  • random,
  • round,
  • split,
  • sqrt,
  • unhex,
  • arrayCopy,
  • ceil,
  • checkExtension

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • BoxLayout (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now