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
function getCallActivitiesInstanceVariables(targetActivityId, collectionElementVariableName, ignoreVariables) { | |
return execution.getProcessEngineServices() | |
.getHistoryService().createHistoricActivityInstanceQuery() | |
.processInstanceId(execution.getProcessInstanceId()) | |
.activityId(targetActivityId) | |
.list() | |
.stream() | |
.collect( | |
java.util.stream.Collectors.toMap( | |
function (i) { |
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 a taskQuery | |
TaskQuery myTasksQuery = taskService.createTaskQuery().taskAssignee("daniel.meyer").active(); | |
// save taskQuery as filter | |
Filter myTasksFilter = filterService.newTaskFilter("My Tasks"); | |
myTasksFilter.setOwner("daniel.meyer"); | |
myTasksFilter.setQuery(myTasksQuery); | |
String filterId = filterService.saveFilter(myTasksFilter); | |
// execute the filter |
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
[ | |
{"timestamp":"2018-01-15T00:10:38.795+0000","historyClass":"HistoricProcessInstanceEventEntity","historyEvent":{"id":"6","processInstanceId":"6","executionId":"6","processDefinitionId":"historyGeneration:1:3","processDefinitionKey":"historyGeneration","processDefinitionName":"-","processDefinitionVersion":"-","caseInstanceId":"-","caseExecutionId":"-","caseDefinitionId":"-","caseDefinitionKey":"-","caseDefinitionName":"-","eventType":"start","sequenceCounter":0,"durationInMillis":"-","startTime":"2018-01-15T00:10:38.783+0000","endTime":"-","businessKey":"-","startUserId":"-","superProcessInstanceId":"-","superCaseInstanceId":"-","deleteReason":"-","endActivityId":"-","startActivityId":"StartEvent_1","tenantId":"-","state":"ACTIVE","durationRaw":"-"}}, | |
{"timestamp":"2018-01-15T00:10:38.854+0000","historyClass":"HistoricActivityInstanceEventEntity","historyEvent":{"id":"StartEvent_1:20","processInstanceId":"6","executionId":"6","processDefinitionId":"historyGeneration:1:3","processDefinitionKey":"historyGener |
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
/** | |
* First create a form with the following fields. | |
* - Credit Card Number - Key = creditCardNumber | |
* - CVC - Key = cvc | |
* - Expiry Month - Key = expMonth | |
* - Expiry Year - Key = expYear | |
* - Token - Key = token | |
* - **** ANY OTHER FIELDS YOU WANT *** | |
*/ | |
angular.module('yourApp') |
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 request = require("request"); | |
// The api key is generated within the Form.io project settings. | |
var apiKey = '23kj2k3jhkj2h3'; | |
// Create a new user. | |
request({ | |
method: 'POST', | |
url: 'https://example.form.io/user', | |
headers: { |
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
Here is a way to deal with this issue: | |
def convertIssueDatesInMongo (issues) | |
issues.each do |y| | |
y["created_at"] = DateTime.strptime(y["created_at"], '%Y-%m-%dT%H:%M:%S%z').to_time.utc | |
y["updated_at"] = DateTime.strptime(y["updated_at"], '%Y-%m-%dT%H:%M:%S%z').to_time.utc | |
end | |
return issues | |
end |
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
require "redis" | |
redis = Redis.new | |
puts redis.zscan("ql:q:testing-scheduled", 5, {match: "7f81bbe64bcd4599b565c95c817cf363"}) |
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
require 'chronic' | |
require 'time_difference' | |
humanStatement1 = "this tuesday 1pm" | |
humanStatement2 = "this tuesday 3pm" | |
humanStatement1Parsed = Chronic.parse(humanStatement1) | |
humanStatement2Parsed = Chronic.parse(humanStatement2) |
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
a = [] | |
output.each do |x| | |
a << x["converted_date"] | |
end | |
b = (output.first["converted_date"]..output.last["converted_date"]).to_a | |
zeroValueDates = (b.map{ |date| date.strftime("%b %Y") } - a.map{ |date| date.strftime("%b %Y") }).uniq | |
zeroValueDates.each do |zvd| | |
zvd = DateTime.parse(zvd) | |
output << {"repo"=> repo , "state"=>"closed", "closed_year"=>zvd.strftime("%Y").to_i, "closed_month"=>zvd.strftime("%m").to_i, "count"=>0, "converted_date"=>zvd} |
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
require 'octokit' | |
require 'pp' | |
class GHSearchTest | |
def gh_authenticate(username, password) | |
@ghClient = Octokit::Client.new( | |
:login => username.to_s, | |
:password => password.to_s, |
NewerOlder