Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/12/2019 in all areas

  1. 1 point
    Howdy. Your idea of setting each possible x-axis to 0 and then later updating it is a great idea. I took that and turned it into a JSON object where the key is "2017 Nov" and the value, to start is 0. My version of the script uses your basic look. I updated each value from 0 to the correct summary value, using your great method of the fast summaries (which I have just recently learned). I then had to create the $x and the $y by looping again through the possible dates and extracting the value from the key. Take a look. It's the "GatherData" script. Since charts need all possible axis points, I would usually recommend a summary table to run and add a record for 2018 Mar even if the amount is 0. But the JSON object is a good substitute, especially using the (amazing) fast summaries method. Inspections_JSON.fmp12
  2. 1 point
    Recursive calculations are done through custom functions. You could define a custom function as: SumRepetitions ( repeatingField ; maxRepetition ) = GetRepetition ( repeatingField ; maxRepetition ) + If ( maxRepetition > 1 ; SumRepetitions ( repeatingField ; maxRepetition - 1 ) ) and call it as = SumRepetitions ( LastYear ; Count ( ThisYear ) ) Although with only 12 repetitions, you could do just = Let ( [ n = Count ( ThisYear ) ] ; Sum ( If ( n ≥ 1 ; LastYear[1] ) ; If ( n ≥ 2 ; LastYear[2] ) ; If ( n ≥ 3 ; LastYear[3] ) ; If ( n ≥ 4 ; LastYear[4] ) ; If ( n ≥ 5 ; LastYear[5] ) ; If ( n ≥ 6 ; LastYear[6] ) ; If ( n ≥ 7 ; LastYear[7] ) ; If ( n ≥ 8 ; LastYear[8] ) ; If ( n ≥ 9 ; LastYear[9] ) ; If ( n ≥ 10 ; LastYear[10] ) ; If ( n ≥ 11 ; LastYear[11] ) ; If ( n ≥ 12 ; LastYear[12] ) ) )
  3. 1 point
    Here is a new function for rotation of PNG files, which should fix your issue, if you pass it a file with no transparency or alphait returns an error to you If you do SMGetVariable("cm") after running it you will see the color model Java thinks the file has // RotatePNG ( imgLocation ; degrees ) // v1.0 // 19_03_12 JR import javax.imageio.ImageIO import java.awt.image.BufferedImage import java.awt.Graphics2D import java.awt.geom.AffineTransform import java.awt.RenderingHints isTransparent = {image, x, y -> pixel = image.getRGB(x,y) return (pixel>>24) == 0x00 } containsTransparency = { image -> for (i in 0..<image.getHeight()) { for (j in 0..<image.getWidth()) { if (isTransparent(image, j, i)){ return true } //end if } //end for } //end for } //end containsTransparency containsAlphaChannel ={ image -> return image.getColorModel().hasAlpha() }//end containsAlphaChannel degrees = Double.parseDouble(degrees) radians = Math.toRadians(degrees) isRightAngle = degrees % 90 == 0 BufferedImage img if (imgLocation.indexOf("://") != -1) { img = ImageIO.read(new URL(imgLocation)) } else { img = ImageIO.read(new File(imgLocation)) } cm = img.getColorModel() //check for transparency try{ isAlpha = containsAlphaChannel(img) if ( !isAlpha) { isTransparent = containsTransparency(img) if ( !isTransparent){ return 'ERROR - no transparency' }//end if return 'ERROR - no transparency' } //end if } catch (e) { return 'ERROR - unspecified' } int newWidth = Math.abs(Math.cos(radians) * img.getWidth()) + Math.abs(Math.sin(radians) * img.getHeight()) int newHeight = Math.abs(Math.cos(radians) * img.getHeight()) + Math.abs(Math.sin(radians) * img.getWidth()) at = AffineTransform.getRotateInstance(radians, img.getWidth()/2, img.getHeight()/2) type = BufferedImage.TYPE_INT_ARGB dest = new BufferedImage(newWidth, newHeight, type) g2d = dest.createGraphics() if (!isRightAngle) { // enable antialiasing for odd angles g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } g2d.setTransform(AffineTransform.getTranslateInstance((newWidth - img.getWidth()) / 2, (newHeight - img.getHeight()) / 2)) g2d.drawImage(img, at, null) return dest So only two parameters as you don't care about background colour
  4. 1 point
    Hi Traci, The Companion plugin has a function called SCCopy that will copy files from one location on SuperContainer to another. However, if the destination location does not exist then the function will throw an error so I do not know if that will work for your use case. Other than that, there is no explicit "SuperContainer code" to do this. OceanWest's recommendation is how I would approach this.
  5. 1 point
    A Forward Look About FileMaker Platform Security Developers and users of the FileMaker Workplace Innovation Platform must be concerned about security of their deployed solutions. Likewise, they must have a forward-looking perspective about key issues in this arena. Security has its major purpose the preservation of Confidentiality, Integrity, Availability, and Resilience (CIAR) of their systems. Liabilities resulting from breaches can substantially affect continued business operations, continued business existence, imposition of civil or criminal sanctions, brand reputation, and customer or client confidence. I see at least ten security concerns that the FileMaker Developer Community must consider going forward for the next few years and development cycles: The Business of Security: What Is Security Supposed To Do? Zero Trust implementation for the FileMaker Platform [https://fmforums.com/blogs/entry/2047-federated-identity-management-zero-trust-and-the-filemaker-platform/] Federated Identity Management and the end of FileMaker Accounts in files Native Multi-Factor Authentication (not SMS) Further implementation of Secure by Default and Rule of Least Privileges for the FileMaker Platform Expansion of Roles-Based Construct in the FileMaker Platform SaaS Security Implementation for the FileMaker Platform Building a Culture of Security in the FileMaker Developer Community Building a Culture of Security among the FileMaker Customer Base The Coming Regulatory and Political Onslaught Against the Tech Sector So as we go through the just-started FileMaker, Inc. Fiscal Year running up to the next version release and the 2019 DevCon, we should keep these elements in mind. Steven H. Blackwell, Platinum Member Emeritus, FileMaker Business Alliance
This leaderboard is set to Los Angeles/GMT-07:00
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.