http://coldfusion.com logo
Join Slack
Powered by
# cfml-beginners
  • f

    Formiko

    04/24/2022, 9:03 PM
    hey cfers., I'm trying to ping in cf this way <cfset TargetHost ="204.79.197.200" /> <cfset PingAttempts = 4 /> <cfexecute name="C:\winnt\system32\ping.exe" arguments="#request.TargetHost#" variable="myPing" timeout="8"></cfexecute> <cfif find('Windows',Server.Os.Name)> <cfset Args = "-n #PingAttempts# #TargetHost#" /> <cfelse> <cfset Args = "-c #PingAttempts# #TargetHost#" /> </cfif> <cfexecute name="ping" arguments=#Args# variable="PingResult" timeout=10 /> <cfif PingResult CONTAINS "100% packet loss" OR PingResult CONTAINS "100% loss" > [send alert] </cfif> I'm receiving "key [TARGETHOST] doesn't exist in the request scope" 😫
    d
    • 2
    • 3
  • f

    Formiko

    04/26/2022, 10:52 PM
    Contentbox express problems I'm on a new laptop, I have commandbox and everything is working fine but I downloaded confentbox express, and I'm getting The JRE_HOME environment variable is not defined correctly This environment variable is needed to run this program. I'm on win11, express has worked before, my jdk is all fine I think. What can I do?
    g
    b
    e
    • 4
    • 7
  • e

    epipko

    04/27/2022, 6:17 PM
    I need help to be able to download API data using FROM / TO dates. I want to use +- 1 second as: from
    04/26/2022 00:00:01
    to
    04/26/2022 23:59:59
    . I can do it in sql (Oracle), but wonder if/how it can be done in CF. Oracle:
    select to_char( trunc(sysdate-1) + (1/(24*60*60)), 'MM/DD/YYYY HH24:MI:SS') from dual;
    select to_char( trunc(sysdate) - (1/(24*60*60)), 'MM/DD/YYYY HH24:MI:SS') from dual;
    d
    s
    +2
    • 5
    • 15
  • f

    Formiko

    05/01/2022, 8:14 PM
    I need help with <cfajaximport>
    a
    d
    s
    • 4
    • 26
  • g

    gsr

    05/01/2022, 10:59 PM
    hmm, anyone knows what is going on here with my 2021 I/O Exception: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    f
    • 2
    • 1
  • f

    Formiko

    05/02/2022, 11:01 PM
    Anyone know why I get a "Syntax Error, Invalid Construct" in this Application.cfc First 3 lines of my Application.cfc <cfset this.name = "CoolApp" /> <cfset this.SessionManagement=true /> <cfset this.loginStorage="Session" />
    a
    a
    g
    • 4
    • 9
  • f

    Formiko

    05/04/2022, 3:11 AM
    That Amount column is float in the database. Should I change it?
    p
    a
    a
    • 4
    • 5
  • j

    jumpmaster

    05/09/2022, 7:21 PM
    Can a changed property be inherited when extending a component? I know the default property values can be get/set using accessors, but let's say I have a component that takes in several arguments when initialized. Then based on these different inputs several sub components are then initialized that extend the first. So rather than adding several repeated lines of arguments when initializing these sub-components, can they essentially just extend a particular instance of the parent component? Hopefully that made sense
    b
    d
    a
    • 4
    • 27
  • f

    Fabio Barbalace

    05/10/2022, 8:27 AM
    Hi, i need to install two CF servers in the same machine connected to the same eclipse + plug-in CFBuilder. The two servers start smoothly: - CF 2018 WebServer Port : 8600 Debugger Port : 6006 - CF 2021 WebServer Port : 8500 Debugger Port : 5005 But the CF21 Debugger server doesn’t start regardless of whether CF18 is off, any suggestions? β€œFailed to start ColdFusion debugger at port 50894” it is the only log of the server.
    βœ… 1
    • 1
    • 1
  • b

    bdw429s

    05/13/2022, 2:55 PM
    https://twitter.com/bdw429s/status/1525126593001230336
    🎯 1
    πŸ‘ 6
    πŸ‘πŸΎ 1
    m
    g
    +2
    • 5
    • 4
  • e

    epipko

    05/27/2022, 4:28 PM
    CF2018 on Win2016 I wonder if this is a bug. I am getting "Element RETURN_ID is undefined in Q1." while running the following:
    Copy code
    <cfquery name="q1" datasource="#REQUEST.PROD#">
        select return_id 
        from ecomm_returnly_temp
        where return_id NOT IN (select return_id from ecomm_returnly)
        order by return_id        
    </cfquery>
    Copy code
    <cfif #q1.RecordCount# GT "0">
         <cfloop query="q1"> 
            <cfset return_id = #q1.return_id#>
            <cfinclude template="returnly_api_get_return_by_id.cfm">
        </cfloop>
    </cfif>
    If I convert query data into a list, it works just fine:
    Copy code
    <cfset returns_list = "">
    <cfquery name="q1" datasource="#REQUEST.PROD#">
        select return_id 
        from ecomm_returnly_temp
        where return_id NOT IN (select return_id from ecomm_returnly)
        order by return_id        
    </cfquery>
    Copy code
    <cfset returns_list = ValueList(q1.return_id,",")>
    
    <cfif ListLen(returns_list)>
    	<cfloop list="#ListSort(returns_list,"Numeric","asc",",")#" index="return_id">		 
    		<cfinclude template="returnly_api_get_return_by_id.cfm">         
    	</cfloop>
    </cfif>
    j
    a
    d
    • 4
    • 11
  • a

    Adam Cameron

    05/27/2022, 6:38 PM
    FAO @epipko, re:
    Thanks, I am always confused when to use/not use # signs.
    https://blog.adamcameron.me/2013/09/when-to-use-pound-signs.html
    s
    • 2
    • 7
  • s

    Simone

    05/31/2022, 3:11 PM
    I have a question is there a way, to have a function and recurse a directory outside of that function project and find all elements of SVG and add aria-label to it from the <SVG icon property
    a
    m
    +3
    • 6
    • 9
  • v

    Victor B Vieira

    06/04/2022, 4:38 PM
    Good afternoon, can someone give me a light with an error when trying to install: install commandbox-cfconfig Message: Unable to make public boolean java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.cancel(boolean) accessible: module java.base does not "opens java.util.concurrent" to unnamed module @18c5069b
    πŸ‘€ 1
    d
    s
    b
    • 4
    • 57
  • v

    Victor B Vieira

    06/04/2022, 11:16 PM
    Good night people, With a lot of sweat, blood, tears and help from friends and google translate, I managed to finish a script for configuring Lucee with Nginx on Amazon Linux, I used the ubuntu-nginx-lucee repository as a basis for the script Please feel free to comment and submit improvements, as it's my first linux script it definitely has improvements to be made πŸ˜‰ https://github.com/victorbvieira/amazon-linux-nginx-lucee
    πŸ™ŒπŸΎ 1
    πŸ™Œ 1
    πŸŽ‰ 3
  • m

    Mark Takata (Adobe)

    06/20/2022, 5:30 PM
    For folks in the Central European Time-zone, Adobe is presenting a free one day workshop in a couple days: https://adobe-cf-workshop.meetus.adobeevents.com/ June 22nd, 9:00am - 4:30pm CET
  • g

    gsr

    06/20/2022, 5:46 PM
    i have a question, where i need a suggestion, in my code i have this at lot of places
    Copy code
    <cfselect class="Select" style="width: 75%" name="Sales" query="qry" value="SaleID" display="Title" selected="#SelectedValue#" />
     
    <script>
      $('.Select').select2({
        placeholder: 'Select Sales',
        allowClear: true
      });
    </script>
    So my plan is to replace cfselect with normal select and use it, but should i convert this into a custom tag or cffunction so i can reuse it all the places i needed
    m
    s
    • 3
    • 8
  • g

    gsr

    06/23/2022, 3:39 PM
    i have a bunch of text and list1 which has 5 strings i want to check and a replacement list which is only 1, i tried replacelist but that does not seems to be working well https://trycf.com/gist/39e7ebb8ede48054c09ecad24b4bd8e6/lucee5?theme=monokai
    a
    v
    s
    • 4
    • 6
  • d

    dick

    06/23/2022, 4:20 PM
    How do you read a stack trace? Are there any resources that will educate me?
    f
    g
    • 3
    • 48
  • g

    gsr

    06/24/2022, 2:26 PM
    i wonder how cfselect bind and bindontrue have a replacement in jquery, any suggestions
    p
    m
    +2
    • 5
    • 9
  • e

    epipko

    06/29/2022, 7:50 PM
    I have a page that displays a graph:
    <td><cfinclude template="../EP/CurrentWeekEcommOrders.cfm"></td>
    Is there a way to make it refresh periodically?
    s
    p
    e
    • 4
    • 10
  • s

    Scott Steinbeck

    06/29/2022, 8:07 PM
    is there a vscode extension for generating auto documentation above components and methods that works for CF? (i thought about what channel to post this in for a bit and decided the thread would be most beneficial here)
    s
    p
    • 3
    • 14
  • g

    gsr

    06/29/2022, 9:46 PM
    i am trying something llike this https://trycf.com/gist/462c2ac14c5824f0ca606ca58c0e059c/lucee5?theme=monokai where i should be able to get if its morning, it should returning me morning and if afternoon and then that and if evening then evening
    b
    s
    • 3
    • 8
  • g

    gsr

    06/29/2022, 9:46 PM
    time i am trying to do is UTC based
  • o

    Ookma-Kyi

    06/30/2022, 2:11 AM
    πŸ‘‹ Hello, team!
    πŸ‘‹ 4
  • o

    Ookma-Kyi

    06/30/2022, 2:55 PM
    Copy code
    CommandBox:Ookma-Kyi> start
     √ | Starting Server
       | √ | Setting Server Profile to [development]
       | √ | Loading CFConfig into server
    
    CommandBox:Ookma-Kyi>
    Do i need to connect my Mysql Database to start a basic server? Not using any databases yet...
    m
    j
    b
    • 4
    • 54
  • o

    Ookma-Kyi

    07/05/2022, 4:32 PM
    Are there any CFML jobs out there? Compared to other languages like Python, Java etc. there doesn't seem to be many jobs which leads to to believe ColdFusion isn't a popular language. However I read many Fortune 100 companies use it. Is there any reason when compared to other language why they choose ColdFusion?
    a
    s
    +4
    • 7
    • 13
  • s

    Slackbot

    07/07/2022, 6:39 PM
    This message was deleted.
    p
    • 2
    • 2
  • a

    Adam Cameron

    07/07/2022, 10:25 PM
    @Ookma-Kyi please done post a sea of code inline asking ppl to help with it. If you have a lot of code, put it in a gist please (https://en.wikipedia.org/wiki/GitHub#Gist). You are also asking a CSS question (by the looks) and that is not on-topic here. This is a CFML channel. There is however a css subchannel, it one's questions pertains to an intersection of CFML and CSS (not sure what that might be, if I am to be honest, but - hey - it's there). Lastly, when planning a question to ask, give this lot some though: http://www.catb.org/~esr/faqs/smart-questions.html. This is good guidance of how to organise your questions before you ask them (here; anywhere).
    o
    • 2
    • 2
  • n

    Nick

    07/11/2022, 3:09 PM
    Hello. I'm querying SQL Server and need to specify that the value of bit field should be 1. Is it "better" to write the query with a cfqueryparam so that the conversion takes place before SQL Server (assuming CF is even doing that), or just pass 1 and let SQL Server do the conversion? e.g.: Option 1:
    WHERE SomeBitCol = <cfqueryparam cfsqltype="bit" value="true">
    or Option 2:
    WHERE SomeBitCol = 1
    (To be clear, this is not a variable. 1/true would be passed as a hard-coded value. If it was a variable, I'd definitely use
    <cfqueryparam>
    )
    s
    d
    +2
    • 5
    • 13
12345...8Latest