|
POST
|
So I would have to use C++ or some other language....what would accomplish this?
... View more
03-06-2018
01:43 PM
|
0
|
1
|
1838
|
|
POST
|
Is there a way to hide the JS pages in a web app when it is written in something like Notepad++? I assume the only way would to use a proper coding environment such as visual studio and properly compiled into a web app? Any ideas?
... View more
03-06-2018
01:07 PM
|
0
|
7
|
1952
|
|
POST
|
Think I got it...under the msg['Subject'] line ..... simply added msg['To'] = "[email protected]" msg['From'] = "[email protected]" msg['Date'] = CurrentDate #=== BUILD EMAIL ===
def msgEmail():
msg = MIMEMultipart()
# Attach the records in the body of the email
part4 = MIMEText(htmlR1, 'html')
msg.attach(part4)
msg['To'] = "[email protected]"
msg['From'] = "[email protected]"
msg['Date'] = CurrentDate
attachment = MIMEText(f.read())
attachment.add_header('Content-Disposition', 'attachment', filename=filename)
msg.attach(attachment)
msg['Subject'] = "Region 1 Report " + CurrentDate
server = smtplib.SMTP('smtp1.xxxx.com',25)
server.set_debuglevel(1)
server.ehlo()
server.sendmail(FROMADDR, R1TOADDRS, msg.as_string())
server.quit()
... View more
03-02-2018
05:11 AM
|
1
|
0
|
1701
|
|
POST
|
I am trying to email via python. It did work at sometime but now its not working. It is being flagged as SPAM leaving my external servers. Below you see whats causing this. I was told to include the FROM and TO in the header and this should elevate the issue of beign flagged as SPAM I am unsure where to include this in my code below....ANYONE have any ideas on how to add that? See below Code snip Content analysis details: (6.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record 1.2 MISSING_HEADERS Missing To: header 0.0 HTML_MESSAGE BODY: HTML included in message 1.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts 0.1 MISSING_MID Missing Message-Id: header 1.0 MISSING_FROM Missing From: header 1.4 MISSING_DATE Missing Date: header 1.9 TO_NO_BRKTS_HTML_ONLY To: lacks brackets and HTML only import arcpy
import os, string
import smtplib, shutil
import email, time
import sys, csv
from email.MIMEMultipart import MIMEMultipart
from email.mime.text import MIMEText
FROMADDR = ["[email protected]"]
TOADDRS = ["[email protected]"]
# REGION 1 =======
with open('z_Region1.csv', 'rb') as f:
R1reader = csv.reader(f)
R1content = list(R1reader)
R1got = tuple(map(Thread_compile_string, R1content))
# print str(R1got).strip('[]')
# Analyze the Tuple to determine if there are any values
# If so add them to the email body, if not do not add them but add string with date
if len(R1got) != 0:
print('found!')
cols1 = ["<tr>{0}</tr>".format( "<tr></tr>".join(t)) for t in R1got]
rows1 = "<tr>{0}</tr>".format( "<tr></tr>".join(cols1))
htmlR1 = """<HTML>
<head></head>
<body>
<h4>Facilities Reported for Region 1 for {0}</h4>
<table>
{1}
</table>
</body>
</HTML>""".format(CurrentDate, rows1)
if flagR1 == True:
# What do you want the attached file to be named?
filename = "z_Region1.csv"
f = file(filename)
#=== BUILD EMAIL ===
def msgEmail():
msg = MIMEMultipart()
# Attach the records in the body of the email
part4 = MIMEText(htmlR1, 'html')
msg.attach(part4)
attachment = MIMEText(f.read())
attachment.add_header('Content-Disposition', 'attachment', filename=filename)
msg.attach(attachment)
msg['Subject'] = "Region 1 Report " + CurrentDate
server = smtplib.SMTP('smtp1.xxxx.com',25)
server.set_debuglevel(1)
server.ehlo()
server.sendmail(FROMADDR, TOADDRS, msg.as_string())
server.quit()
#=== PROCESS EMAIL ===
getMsgP = msgEmail()
print getMsgP
#=== CLOSE THE FILE BEING ATTACHED ===
f.close()
print ("Region 1 Email Sent")
elif flagR1 == False:
print "R1 None No Rows found"
def msgEmailR1():
msg = MIMEMultipart()
part5 = MIMEText(htmlConformation, 'html')
msg.attach(part5)
#msg.attach(attachment)
msg['Subject'] = "Region 1 Report - no Records processed " + CurrentDate
server = smtplib.SMTP('smtp1.xxxxx.com',25)
server.set_debuglevel(1)
server.ehlo()
server.sendmail(FROMADDR, TOADDRS, msg.as_string())
server.quit()
getMsgP = msgEmailR1()
print getMsgP
print ("Conformation Email Email Sent")
else:
print "R1 Something Else is going on"
#=======================================================
... View more
03-01-2018
11:44 AM
|
0
|
1
|
1818
|
|
POST
|
Nope that did not work.... tried coping favorites to the Favorites folder on other machine nothing shows up when I open the project....this is ridiculous a oversight Have to manually add them in favorites right click to add to the project and then right click to add to all new projects for each of them....absolutely anointing.....THANKS ESRI for once again making things more difficult.
... View more
02-15-2018
01:38 PM
|
0
|
0
|
1773
|
|
POST
|
That seems to work....but still idiotic that you cant copy and paste into a folder like before.
... View more
02-15-2018
12:55 PM
|
1
|
2
|
1773
|
|
POST
|
Good point...then just set the connection files to open for each additional project...gonna test that now.
... View more
02-15-2018
12:48 PM
|
0
|
3
|
1773
|
|
POST
|
Last question....it appears that I cannot copy these connection files to another computer I tried to copy the connection file to a different location (outside the Favorites folder) I then opened the project and it was gone. I then close ArcGIS Pro Added the connection files back to the Favorites folder reopened the project and they are not there... Does this mean I have to manually create the connection files on every computer that is running ArcGIS Pro? That seems crazy.....
... View more
02-15-2018
12:22 PM
|
0
|
5
|
1773
|
|
POST
|
I see where I can add database and server connections via INSERT > Connections in the toolbar But this seems to be project specific and are no longer there when I open a new project. What gives....how do I set this across the board where if I open a new project they are there ready to use?
... View more
02-15-2018
06:07 AM
|
0
|
7
|
1930
|
|
POST
|
OK I removed dojo/domReady and replaced with dojo/ready and it works...go figure... THANKS.. dojo/ready", "esri/map", "dojo/domReady!
... View more
01-31-2018
01:07 PM
|
0
|
0
|
4193
|
|
POST
|
I removed "dojo/_base/array" and array, I kept "dojo/_base/array" and arrayUtils, Still same error
... View more
01-31-2018
11:08 AM
|
0
|
0
|
879
|
|
POST
|
I moved to the top in my main js file var map;
var gp, mapClickEvt;
require([
"esri/map", "esri/geometry/webMercatorUtils", "dojo/dom", "esri/layers/FeatureLayer", "esri/dijit/Legend","esri/symbols/SimpleFillSymbol",
"esri/geometry/Extent", "esri/layers/ArcGISDynamicMapServiceLayer", 'esri/layers/WMSLayer', 'esri/layers/WMSLayerInfo', "esri/layers/ImageParameters",
"dojo/_base/array", "dojo/on", "esri/graphic","esri/graphicsUtils","esri/tasks/Geoprocessor","esri/tasks/FeatureSet","esri/tasks/LinearUnit","esri/symbols/SimpleLineSymbol",
"esri/renderers/SimpleRenderer", "esri/symbols/SimpleMarkerSymbol","esri/layers/LabelClass", "esri/dijit/BasemapToggle","esri/dijit/HomeButton", "esri/dijit/Search", "esri/dijit/LocateButton",
"esri/urlUtils", "esri/dijit/Directions",
"esri/toolbars/draw","esri/symbols/CartographicLineSymbol","esri/units","esri/dijit/ElevationProfile",
"esri/Color", "dojo/_base/array", "dojo/parser", "esri/InfoTemplate", "esri/renderers/ClassBreaksRenderer","dijit/form/CheckBox", "dojo/dom-construct",
"dojo/keys","esri/SnappingManager","esri/dijit/Measurement","esri/tasks/GeometryService","esri/config", "esri/sniff","esri/dijit/BasemapGallery",
"esri/layers/LabelLayer", "esri/symbols/TextSymbol", "esri/symbols/Font", "esri/symbols/SimpleLineSymbol",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionContainer","esri/dijit/Scalebar","dijit/TitlePane", "dojo/domReady!"
], function(
Map, webMercatorUtils, dom, FeatureLayer, Legend, SimpleFillSymbol,
Extent, ArcGISDynamicMapServiceLayer, WMSLayer, WMSLayerInfo, ImageParameters,
array, on, Graphic, graphicsUtils, Geoprocessor, FeatureSet, LinearUnit, SimpleLineSymbol,
SimpleRenderer, SimpleMarkerSymbol, LabelClass, BasemapToggle, HomeButton, Search, LocateButton,
urlUtils, Directions,
Draw, CartographicLineSymbol, Units, ElevationsProfileWidget,
Color, arrayUtils, parser, InfoTemplate, ClassBreaksRenderer, CheckBox, domConstruct,
keys,SnappingManager, Measurement, GeometryService,esriConfig, has,BasemapGallery,
LabelLayer, TextSymbol, Font, SimpleLineSymbol
) {
var dojoConfig = { parseOnLoad: true };
var legendLayers = [];
parser.parse();
map = new Map("map", {
basemap: "gray",
center: [-79.665, 37.629],
zoom: 8,
logo: false,
showLabels : true
}); I then have this in my 2nd js file require([
"esri/map","dojo/domReady!"
], function(
Map
) {
map.on("click", function(e){
alert("clicked");
});
}); I know get this error init.js:28 Uncaught TypeError: Cannot read property 'on' of undefined at elevationprofile.js:7 at ia (init.js:28) at init.js:28 at ja (init.js:28) at ga (init.js:28) at f (init.js:30) at HTMLScriptElement.<anonymous> (init.js:35)
... View more
01-31-2018
10:41 AM
|
0
|
2
|
4192
|
|
POST
|
Yea thats what I am doing....in the original js file require([
"esri/map", "esri/geometry/webMercatorUtils", "dojo/dom", "esri/layers/FeatureLayer", "esri/dijit/Legend","esri/symbols/SimpleFillSymbol",
"esri/geometry/Extent", "esri/layers/ArcGISDynamicMapServiceLayer", 'esri/layers/WMSLayer', 'esri/layers/WMSLayerInfo', "esri/layers/ImageParameters",
"dojo/_base/array", "dojo/on", "esri/graphic","esri/graphicsUtils","esri/tasks/Geoprocessor","esri/tasks/FeatureSet","esri/tasks/LinearUnit","esri/symbols/SimpleLineSymbol",
"esri/renderers/SimpleRenderer", "esri/symbols/SimpleMarkerSymbol","esri/layers/LabelClass", "esri/dijit/BasemapToggle","esri/dijit/HomeButton", "esri/dijit/Search", "esri/dijit/LocateButton",
"esri/urlUtils", "esri/dijit/Directions",
"esri/toolbars/draw","esri/symbols/CartographicLineSymbol","esri/units","esri/dijit/ElevationProfile",
"esri/Color", "dojo/_base/array", "dojo/parser", "esri/InfoTemplate", "esri/renderers/ClassBreaksRenderer","dijit/form/CheckBox", "dojo/dom-construct",
"dojo/keys","esri/SnappingManager","esri/dijit/Measurement","esri/tasks/GeometryService","esri/config", "esri/sniff","esri/dijit/BasemapGallery",
"esri/layers/LabelLayer", "esri/symbols/TextSymbol", "esri/symbols/Font", "esri/symbols/SimpleLineSymbol",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionContainer","esri/dijit/Scalebar","dijit/TitlePane", "dojo/domReady!"
], function(
Map, webMercatorUtils, dom, FeatureLayer, Legend, SimpleFillSymbol,
Extent, ArcGISDynamicMapServiceLayer, WMSLayer, WMSLayerInfo, ImageParameters,
array, on, Graphic, graphicsUtils, Geoprocessor, FeatureSet, LinearUnit, SimpleLineSymbol,
SimpleRenderer, SimpleMarkerSymbol, LabelClass, BasemapToggle, HomeButton, Search, LocateButton,
urlUtils, Directions,
Draw, CartographicLineSymbol, Units, ElevationsProfileWidget,
Color, arrayUtils, parser, InfoTemplate, ClassBreaksRenderer, CheckBox, domConstruct,
keys,SnappingManager, Measurement, GeometryService,esriConfig, has,BasemapGallery,
LabelLayer, TextSymbol, Font, SimpleLineSymbol
) {
var dojoConfig = { parseOnLoad: true };
var legendLayers = [];
parser.parse();
// VARIABLES FOR ELEVATION WIDGET
var tb, epWidget, lineSymbol;
var gp, mapClickEvt;
var map = new Map("map", {
basemap: "gray",
center: [-79.665, 37.629],
zoom: 8,
logo: false,
showLabels : true
});
// SNIP bunch of code for other stuff
});
... View more
01-31-2018
10:23 AM
|
0
|
6
|
4192
|
|
POST
|
I'm not in the 2nd js file...I was following this example towards the bottom. They dont set the reference in the 2nd js file as I can see. creating javascript external file for map function confused. I am doing so in the main js file var map = new Map("map", {
basemap: "gray",
center: [-79.665, 37.629],
zoom: 8,
logo: false,
showLabels : true
});
... View more
01-31-2018
09:43 AM
|
0
|
8
|
4193
|
|
POST
|
I tried this: Added this to HTML under my main js file <script src="js/index.js"></script>
<!-- New reference to js file -->
<script src="js/elevationprofile.js"></script>
<!-- SNIP -->
<div id="map" class="shadow" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'" style="height:100%">
<div id="LocateButton" data-dojo-props="region:'center'"></div>
<div id="HomeButton"></div>
<div id="search"></div>
<div id="profilecontainer" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'" >
<div id="profileChartNode"></div>
</div>
</div> Added this new js file require([
"esri/map","dojo/domReady!"
], function(
Map
) {
map.on("click", function(e){
alert("clicked");
});
}); I get this error: init.js:28 Uncaught TypeError: map.on is not a function
at elevationprofile.js:7
at ia (init.js:28)
at init.js:28
at ja (init.js:28)
at ga (init.js:28)
at f (init.js:30)
at HTMLScriptElement.<anonymous> (init.js:35)
... View more
01-31-2018
08:50 AM
|
0
|
10
|
4193
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|