This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Emarsys API Samples - Node.js | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Create each job with the same name so we can control concurrency (the number of parallel jobs that can be run). | |
| // Each job will have the same name, but different configs. Use the 'unique' method to prevent duplicates. | |
| agenda.define('MyJob', {concurrency: 3}, loadData); | |
| _.each(myJobs, function(job){ | |
| agenda.create('MyJob', job) | |
| .unique({'job.name': job.name}, { insertOnly: true }) | |
| .repeatEvery('1 hour') | |
| .save(); | |
| }); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Get the total number of objects of one type. | |
| // This accounts for the query limits in Alfresco (which is 1000 results by default) | |
| var query = 'TYPE:"myco:document"'; | |
| var totalNumOfDocs = 0; | |
| do { | |
| var page = { | |
| maxItems: 1000, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var nodes = search.luceneSearch('@hpi\\:trac:"HR"'); | |
| logger.log("Document Count: " + nodes.length); | |
| for each(var node in nodes) { | |
| node.setPermission("Read", "GROUP_HR"); | |
| node.setPermission("Read", "GROUP_HPI_CONSUMERS"); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | _ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ffmpeg -i 00002.MTS -vcodec copy 00002.mp4 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| $custom_fields = get_post_custom(); | |
| foreach ( $custom_fields as $field_key => $field_values ) { | |
| foreach ( $field_values as $key => $value ) | |
| echo $field_key . ' - ' . $value . '<br />'; | |
| } | |
| ?> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var numMinorVersions = 15; | |
| var numMajorVersions = 2; | |
| for (var i = 0; i < numMinorVersions; i++) { | |
| document.createVersion("automated minor version", false); | |
| } | |
| for (var i = 0; i < numMajorVersions; i++) { | |
| document.createVersion("automated major version", true); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | call sc.exe delete MyServiceName | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | call sc.exe create MyNewServiceName binPath= "\"C:\path\to\bin\mybin.exe\" --service --config | |
| = \"C:\path\to\config\myconfig.cfg\"" DisplayName= "My New Service" start= "auto" | 
NewerOlder