When answering the question Check if scheduled local agents can run in Notes client I found a forum post by Javed Khan indicating that this can be checked by checking if a bit in the Preferences environment value is set.
Const LOCAL_AGENTS = &H8000000
Call Session.SetEnvironmentVar("Preferences", Cstr( Clng( Session.GetEnvironmentValue( "Preferences", True )) Or LOCAL_AGENTS ), True )
The "Scheduled local agents" settings is apparently the 28:th bit.
My question is: Is there any online documentation for the meaning of the other bits?
Here is the list, taken from http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/e870840587eed796852568f6006facde?OpenDocument
0 <0> = Keep workspace in back when maximized (Enabled=1)
1 <2> = Scan for unread
2 <4> =
3 <8> = Large fonts
4 <16> =
5 <32> = Make Internet URLs (http//:) into hotspots
6 <64> =
7 <128> = Typewriter fonts only
8 <256> = Monochrome display
9 <512> = Scandinavian collation
10 <1024> =
11 <2048> =
12 <4096> = Sign sent mail (Enabled(1))
13 <8192> = Encrypt sent mail
14 <16384> = Metric(1)/Imperial(0) measurements
15 <32768> = Numbers last collation
16 <65536> = French casing
17 <131072> = empty trash folder (prompt during db close=0/always during db close=1/manual=1
18 <262144> = Check for new mail every x minutes (Enabled=0)
19 <524288> = Enable local background indexing
20 <1048576> = Encrypt saved mail
21 <2097152> =
22 <4194304> =
23 <8388608> = Right double-click closes window
24 <16777216> = Prompt for location
25 <33554432> =
26 <67108864> = Mark documents read when opened in the preview pane
27 <134217728> = Enable local scheduled agents
28 <268435456> = Save sent mail (Always prompt=10/Don't keep a copy=00/Always keep a copy=01)
29 <536870912> =
30 <1073741824> = New mail notification (None=10/Audible=00/Visible=01)
31 <2147483648> =
Related
I am currently writing a lager script to ease my life.
Right now I am reading raw values from cells from an excel.
So far so good.
These numbers need to be interpreted as seconds and then converted into minutes.
I tried my best with datetime but no luck.
Any suggestions?
elif auswahl == '2':
print("Some user friendly-text:")
excel_download = openpyxl.load_workbook(r'/Path/to/excel.xlsx')
sheet = excel_download.active
Grund_1 = sheet['B2'].value
Grund_2 = sheet['B3'].value
Grund_3 = sheet['B4'].value
Grund_4 = sheet['B5'].value
Grund_5 = sheet['B6'].value
Grund_6 = sheet['B7'].value
Zeit_in_Sekunden_1 = sheet['C2'].value
Zeit_in_Sekunden_2 = sheet['C3'].value
Zeit_in_Sekunden_3 = sheet['C4'].value
Zeit_in_Sekunden_4 = sheet['C5'].value
Zeit_in_Sekunden_5 = sheet['C6'].value
Zeit_in_Sekunden_6 = sheet['C7'].value
print("Du warst heute für", Zeit_in_Sekunden_1, Grund_1, "!")
break
My idea:
raw_seconds_from_C2 = sheet['C2'].value
Then somehow convert to minutes from raw_seconds_from_C2
I am really out of ideas as I then need to put the converted minutes into a print().
Divide the value by 60 to obtain minutes from seconds:
c2_minutes = sheet['C2'].value / 60
Thanks to #Alonso's comment on the question.
I would like to test some functions of my Märklin Digital model railway system. Basically it consists of a (Märklin) Central Unit and an (Märklin) Interface. This is the minimum configuration to send system commands from PC via ComPort to the Interface to set solenoids or control trains. Also information can be sent back from track detection modules via Interface ComPort to the PC. In this case two bytes are sent back. For this case an example in Basic is given in the instructions and I tried to translate it to Win Power Shell.
Basic example:
10 OPEN "COM1:2400,N,8,2"FOR OUTPUT AS #1
20 OPEN "COM1:2400,N,8,2"FOR INPUT AS #2
10 OPEN "COM1:2400,N,8,2"FOR OUTPUT AS #1
20 OPEN "COM1:2400,N,8,2"FOR INPUT AS #2
30 PRINT #1,CHR$(193);:a$=INPUT$(2,#2)
30 PRINT #1,CHR$(193);:a$=INPUT$(2,#2)
40 contact=ASC(LEFT$(a$,1)):PRINT contact
50 contact2=ASC(RIGHT$(a$,1)):PRINT contact2
My "translation":
$connectionproxy = new-object System.IO.Ports.SerialPort com1
$connectionproxy.BaudRate = 2400
$connectionproxy.stopbits = "two"
$connectionproxy.DataBits = 8
$connectionproxy.Parity = "None"
$connectionproxy.open()
do { $connectionproxy.write([char]([int]193)) $ShowBytes = $connectionproxy.ReadLine() Write-Host $ShowBytes } while($connectionproxy.IsOpen)
Problem: I am not able to safe in a file / show data which has been requested from the detection modules.
What is wrong / missing in my translation?
With some serious support (brother and a good friend) I can now deliver the requested functions. All functions have been tested with Märklin 6020/ 6023/6050/6088.
1.) "Windows 7 Power Shell", but without functionality of the Rückmeldemodul S88 (6088):
#---init command sets---
$commandset = #()
#---init connection---
$connectionproxy = new-object System.IO.Ports.SerialPort com1
$connectionproxy.BaudRate = 2400
$connectionproxy.stopbits = "two"
$connectionproxy.DataBits = 8
$connectionproxy.Parity = "None"
do {
$userimput = Read-Host -Prompt "Numbers seperated by space"
$currentcommand = $userimput.split(" ")
$connectionproxy.open()
for ($i=0;$i -lt $currentcommand.length;$i++) {
$connectionproxy.write([char]([int]$currentcommand[$i]))
start-sleep -milliseconds 10
}
$connectionproxy.close()
}while($true)
2.) "Ruby On Rails" for usage of Rückmeldemodul S88 (6088). This program reads the bytes sent back by S88 and shows its pin assignment:
require 'rubyserial'
class Integer
def to_bin(width)
'%0*b' % [width, self]
end
end
puts "open serial port..."
serialport = Serial.new "COM1", 2400, 8, :none, 2
puts serialport.inspect
puts "Reset command for S88:"
bytes_written = serialport.write 192.chr
puts bytes_written.to_s + " bytes written"
sleep(0.1)
puts "Read first S88:"
bytes_written = serialport.write 193.chr
puts bytes_written.to_s + " bytes written"
sleep(0.1)
b1 = serialport.getbyte.inspect
puts "Byte 1: " + b1 + " (" + b1.to_i.to_bin(8) + ")"
b2 = serialport.getbyte.inspect
puts "Byte 2: " + b2 + " (" + b2.to_i.to_bin(8) + ")"
Issue 1: Windows Power Shell is not able to recover any bytes upon request. If anyone knows a good solution, you are welcome to share it.
Issue 2: The Rückmeldemodul 6088 and its cable to the central station or interface have to be placed away from the rails, because of inteferences with the signals. (Shielding of the sixcore cable is absolutely miserable.)
i have migrated one of our jumpservers from openldap/nscd to sssd client.
Server is running Ubuntu 14.04 x64.
Everything works fine except one very important feature: Pasword reset dialog does not pop-up when user authenticates with expired password. We have Policy of 90 days retention set on our ldap server (OpenLdap 2.4). Playing with different flags on /etc/sssd/sssd.conf did not bring desired result
Here is sssd.conf
# LDAP sssd config
[sssd]
debug_level = 8
domains = mydomain.local
config_file_version = 2
reconnection_retries = 3
services = nss, pam, ssh, sudo
[domain/mydomain.local]
debug_level = 8
cache_credentials = true
entry_cache_timeout = 600
ldap_search_base = dc=mydomain,dc=local
ldap_sudo_search_base = ou=SUDOers,dc=mydomain,dc=local
id_provider = ldap
auth_provider = ldap
chpass_provider = ldap
sudo_provider = ldap
subdomain_homedir = /home/%d/%u
ldap_uri = ldaps://10.10.10.10
ldap_tls_reqcert = allow
account_cache_expiration = 7
ldap_schema = rfc2307
ldap_pwd_policy = shadow
ldap_chpass_update_last_change = true
pwd_expiration_warning = 0
reconnection_retries = 3
access_provider = simple
simple_allow_groups = Access_Jumpserver
[nss]
debug_level = 8
filter_groups = root
filter_users = backup,bin,daemon,Debian-exim,games,gnats,irc,list,lp,mail,man,messagebus,news,root,smmsp,smmta,sshd,sync,sys,syslog,uucp,uuidd
reconnection_retries = 3
enum_cache_timeout = 300
entry_cache_nowait_percentage = 75
[pam]
debug_level = 8
pam_verbosity = 8
reconnection_retries = 3
offline_credentials_expiration = 7
offline_failed_login_attempts = 5
offline_failed_login_delay = 15
[sudo]
debug_level = 8
I would be happy for any direction here
As a temporary solution i am using the following function in login script that is invoked from /etc/bash.bashrc
calculate_pwd_age() {
local MAX_AGE=90
let "shdw_epoch = $(ldapsearch -x -LLL -H ldaps://10.0.0.1 "uid=${USER}" shadowLastChange | awk 'NR==2{print $2}')"
let "today = $(date +'%s') / 86400"
let "shdw_diff = ${today} - ${shdw_epoch}"
if [[ ${shdw_diff} -ge ${MAX_AGE} ]]; then
echo -e "\nYour password has expired. Please change it right now:\n"
sleep 2
passwd
fi
}
I have this file which came form a cellphone company's call center. It's supposed to be a recording of a conversation I had with them. I tried to open it using Windows Media Player, VLC Media Player, and Audacity. But it didn't work.
Do you have any idea how to fix this?
Here's all the text that came in the email with the file:
If you are having difficulty playing the attached multimedia file(s) using Windows Media Player, contact your technical support representative
------------ Segment-related information -------------
Contact ID = 9120617573350001032
Start Time = 14/07/2014 10:02:13
Local Start Time = 14/07/2014 10:02:13
End Time = 14/07/2014 10:16:11
Local End Time = 14/07/2014 10:16:11
Extension = 11134
Agent = שלו, מלי
PBX ID = 11134
Duration = 00:13:58
Dialed From (ANI) = 11134
Dialed To (DNIS) = 0545920155
Remarked On =
Remarked By =
Remark =
Acquisition Module = 17
Channel = 286
Screen Acquisition Module = 14
With Screens = 1
Direction = 2
Switch Call Id = 2144221398988751
WrapUp Time = 00:00:34
Switch Name = Cosmocom2
Custom Data 1 = 1
Custom Data 2 = 10.91.12.53
Custom Data 3 = 11134:10.19.221.155:6815 Custom Data 4 = 2144221398988751000 Custom Data 5 = שירות חול Custom Data 6 = 0545920155 Custom Data 7 = XEN16113 Custom Data 8 = Custom Data 9 = חול חבילות Custom Data 10 = 4806591 Custom Data 11 = Custom Data 12 = Custom Data 13 = Custom Data 14 = Custom Data 15 = Custom Data 16 = Custom Data 17 = Custom Data 18 = Custom Data 19 = Custom Data 20 = Custom Data 21 = Custom Data 22 = Custom Data 23 = Custom Data 24 = Custom Data 25 = Custom Data 26 = Custom Data 27 = Custom Data 28 = Custom Data 29 = Custom Data 30 = Custom Data 31 = Custom Data 32 = Custom Data 33 = Custom Data 34 = Custom Data 35 = Custom Data 36 = Custom Data 37 = Custom Data 38 = Custom Data 39 = Custom Data 40 = Custom Data 41 = Custom Data 42 = Custom Data 43 = Custom Data 44 = Custom Data 45 = Custom Data 46 = Custom Data 47 = Custom Data 48 = Custom Data 49 = Custom Data 50 = Custom Data 51 = Custom Data 52 = Custom Data 53 = Custom Data 54 = Custom Data 55 = Custom Data 56 = Custom Data 57 = Custom Data 58 = Custom Data 59 = Custom Data 60 = Custom Data 61 = Custom Data 62 = Custom Data 63 = Custom Data 64 = Custom Data 65 = Custom Data 66 = Custom Data 67 = Custom Data 68 = Custom Data 69 = Custom Data 70 = Custom Data 71 = Custom Data 72 = Custom Data 73 = Custom Data 74 = Attached file name: AudioOnly_Site_01_AudioModule_17_AudioChannel_286_14-Jul-2014_07.02.13.500.WAV
===
And here's a link to the file itself: https://drive.google.com/file/d/0B1r5xyHzGXL9Rl8td2dQdXFlU3puVWZ5aXFCcUZ4V3h2UmE4/view?usp=sharing
According to the fmt chunk in the WAV header, the audio data is encoded using a format named WAVE_FORMAT_VOICEAGE_AMR_WB from VoiceAge Corporation. That is not a commonly used format on desktops, but is more commonly used in mobile devices. You need to install an audio codec that supports that format, or else you should ask the call center to convert their WAV file into a more common desktop format, like PCM or GSM 6.10.
I have the next method in my page object:
def open_random_report(count)
opened_reports = 0
rows = self.how_many_reports_present
cells = self.browser.divs(:class=>/x-grid-cell-inner./)
type_position = self.calculate_report_type_position
row_length = 0
self.browser.divs(:class=>"x-column-header-inner").each do |d|
if d.visible?
row_length += 1
end
end
while opened_reports < count.to_i do
$start=Time.now
r = Random.new
row = r.rand(rows - 2)
cell_position = type_position + (row * row_length) - 1
cells[cell_position].a.click
opened_reports += 1
sleep 1
self.close_report
$finish=Time.now
p "#{$finish} Report# #{opened_reports} - #{$finish - $start}"
f = File.new('log.txt', 'a')
f.puts "#{$finish} Report# #{opened_reports} - #{$finish - $start}"
f.close
end
end
This code clicks on random cell in the table(table is represented by the extjs-grid) and it works ok except for one thing: from time to time driver hangs for 1-2 minutes. There is no pattern for hanging, it can happens one time during a run or may happen 10 times during the run.
One more detail: When driver click on cell the app generates pdf report that will be shown to the user in preview window. I don't care about the report my goal is just to open reports so I'm closing preview window despite that fact that pdf has already completely loaded or not.
Any ideas why such hanging may happen? Maybe there is some problem with code?