System Programming

40K

Solutions

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi Experts,

We have the following function that used to work for years, now suddenly its starting to cause problems.

Public Sub SendEmail(Optional sTo As String = "", Optional sFrom As String = "", Optional sSubject As String = "", Optional sBody As String = "")
    Dim imsg As Object
    Dim iconf As Object
    Dim flds As Object
    Dim schema As String

    Set imsg = CreateObject("CDO.Message")
    Set iconf = CreateObject("CDO.Configuration")
    Set flds = iconf.Fields

    ' send one copy with SMTP server (with autentication)
    schema = "http://schemas.microsoft.com/cdo/configuration/"
    flds.Item(schema & "sendusing") = cdoSendUsingPort
    flds.Item(schema & "smtpserver") = "smtpout.secureserver.net."
    flds.Item(schema & "smtpserverport") = 3535
    flds.Item(schema & "smtpauthenticate") = cdoBasic

    flds.Item(schema & "sendusername") = "MyEmail@MyDomain.net"
    flds.Item(schema & "sendpassword") = "MyPWD"
    flds.Item(schema & "smtpusessl") = False
    flds.Update

    With imsg
        .To = sTo
        .From = sFrom
        .Subject = sSubject
        .HTMLBody = sBody
       '.Sender = "Sender"
        '.Organization = "My Company"
        '.ReplyTo = "address@mycompany.com"
        Set .Configuration = iconf
        .send
    End With

    Set iconf = Nothing
    Set imsg = Nothing
    Set flds = Nothing
End Sub

Open in new window


See attached error message.
Untitled.png
0
How to view the contents of a VMCORE file?
Similar to what Author Comment by:apunkabollywood did on ticket ID: 39512494 2013-09-21
0
I have a couple of VBScripts that were generated a couple of years ago as one of the options in CuteFTP Pro. The scripts connect by FTP, go to my website, then upload or delete certain files. They've worked fine with no problems every month until recently.   Now, I'm getting this error message:

Error Message That Appears When Trying to Run the Program
With a little help from an expert here on EE, I think I've narrowed down what the problem really is. I don't think the problem is with CuteFTP.  I think it is connected with some type of Microsoft system operations, and I have a feeling that an expert versed in Visual Basic can help me get the scripts running again. It looks like the problem is connected with the "Library Not Registered" notation, but that's as far as I can go on my own technically.

Here's part of one of the scripts in question:
--------------------------------------------
' VBS Script Generated by CuteFTP (TM) macro recorder.
' Generated at: 4/8/2015 4:51:49 PM.
' Revised 9/1/2015
' MASTER Upload Spots Script - Oldies - Six Spots

' Create TEConnection object
Set MySite = CreateObject("CuteFTPPro.TEConnection")

' Initialize remote server host name, protocol, port, etc.
MySite.Host = "ftp.[mywebiste].com"
MySite.Protocol = "FTP"
MySite.Port = 21
MySite.Retries = 30
MySite.Delay = 30
MySite.MaxConnections = 4
MySite.TransferType = "AUTO"
MySite.DataChannel = "DEFAULT"
MySite.AutoRename = "OFF"
' WARNING!!! SENSITIVE DATA: user name and password.
MySite.Login = …
0
Eclipse has tabs File,Edit,Navigate,Search, Project etc at top

Under project there is Clean and 'Build All' options to clean and build 10 different projects(project_1, project_2....project_10) i have at one stroke

but after doing that i get error as below for project_10
Error:Counld not fine or load main class com.xyz.zbc.drivertesting.Sample.java


if i do maven install on project _10 then above error is resolved but later stage i get

javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]


how maven install or maven build is different from Eclipse-->Project--->Build All
0
Hello Experts,
we have a HTML code like :-
[root@200]# cat SHBODLogs.sh
#!/bin/bash

echo "</pre><br/><br/><u>MRComponents</u><br/><br/>"
echo "<table border=1 style='font-family:Calibri;font-size:11px'><tr><td><b>PID</b></td><td>" | awk '{print $0"<b>Application</b></td><td><b>Socket</b></td></tr>"}';
ps ax | awk '($3 ~ /[RS]/) && ($5 !~ /gnome-terminal/) && ($5 ~ /active/||/BroadCast/||/TServer/||/Broadcast/||/GOCONNECTION/||/POS/||/CM/||/CC/||/SMM/||/DoubleAgent/) && ($5 !~ /awk/) && ($5 !~ /sh/) {print "<tr><td>"$1"</td><td>"$5"</td><td>"$6"&nbsp;&nbsp;"$7"</td></tr>"}'
echo "</table><br/>";

HTML Output :-

HTML OutputHTML Output</pre><br/><br/><u>MRComponents</u><br/><br/>
<table border=1 style='font-family:Calibri;font-size:11px'><tr><td><b>PID</b></td><td><b>Application</b></td><td><b>Socket</b></td></tr>
<tr><td>27359</td><td>./CM</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27380</td><td>./SMM</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27392</td><td>./CC</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27484</td><td>./POS</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27525</td><td>./CONNECTION</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27550</td><td>./ACTIVE</td><td>1&nbsp;&nbsp;</td></tr>
<tr><td>27579</td><td>./ACTIVE</td><td>2&nbsp;&nbsp;</td></tr>
<tr><td>27659</td><td>./BroadCast</td><td>1&nbsp;&nbsp;</td></tr>
<tr><td>27696</td><td>./BroadCast</td><td>2&nbsp;&nbsp;</td></tr>
0
Robocopy

Can someone please give me a script that allows me to robocopy a lot of directories from a source to a destination while referencing the directory names listed in a text file
The list will be in c:\scripts
0
checked exception



public class ThrowEx {

      public static void main(String[] args) {
            
            try{
            throw new Exception("file not there");
            }
            catch(Exception e){
                  
            }

      }

}



why i ned to have try catch for above example.

If i skip i am getting compilation error


https://www.google.com/search?q=java+exception+checked&safe=active&rlz=1C1GGRV_enUS765US765&source=lnms&tbm=isch&sa=X&ved=0ahUKEwi_7qLdjLjaAhWDylMKHfzxDigQ_AUICigB&biw=1280&bih=615#imgdii=dKyeLgDJI-TIrM:&imgrc=Xm7qPed58fGj2M:

Exception could be Run time(unchecked which does not need explicit try catch like indexoutofbound, arthematic) , unchecked(which needs explicit try catch like IOException)
as well right?

please advise
0
Class Parent{
start(){}
}
Class Child extends Parent{
start(){
//override in child
}
processChildMethod(){//not overriden by parent method
}

}

Parent p= new Child();


Child c=(Child)p// why we do like this

c.processChildMethod();

my quwstion is  why we downcase like this

Child c=(Child)p


Child ch=new Child();
ch.processChildMethod()
above is enough right?
please advisse
0
How to find the usage of RAM by a particular process??
0
Hi Experts,
How do I check which program is consuming the most memory?
See attached many columns I have to choose from..
Thanks
Untitled.png
0
Hi Experts,
Anyone knows of an easy way to determine the .net version running on my pc?
Would prefer a vba function..
Thanks
0
Necesito compilar masivamente programas cobol de mi as400 versión 7.1  a versión 6.1. Existe alguna forma de compilar en forma masiva y no uno por uno?

I need to compile a lot of cobol programs from my as400 version 7.1 to version 6.1. Is there a way to compile a huge amount of cobol programs at once instead of one by one?
0
which approach is better as given below and why. please advise


Convert with Plain Java
Let’s start with a simple example using Java to do the conversion – using an intermediary byte array:


@Test
public void givenUsingPlainJava_whenConvertingStringToInputStream_thenCorrect()
  throws IOException {
    String initialString = "text";
    InputStream targetStream = new ByteArrayInputStream(initialString.getBytes());
}
Note that the getBytes() method encodes this String using the platform’s default charset so to avoid undesirable behavior you can use getBytes(Charset charset) and control the encoding process.


 Convert with Commons IO
Finally, the Apache Commons IO library provides an excellent direct solution:


@Test
public void givenUsingCommonsIO_whenConvertingStringToInputStream_thenCorrect()
  throws IOException {
    String initialString = "text";
    InputStream targetStream = IOUtils.toInputStream(initialString);
}
0
How to send a command /dev/ttyXX.

I've tried these and none seem to worK;
1. echo "stop" > ttyS1
2. echo -ne "stop\n" > ttyS1
0
WhoisRIR.java
public enum WhoisRIR {
    ARIN("whois.arin.net"),
    RIPE("whois.ripe.net"),
    APNIC("whois.apnic.net"),
    AFRINIC("whois.afrinic.net"),
    LACNIC("whois.lacnic.net"),
    JPNIC("whois.nic.ad.jp"),
    KRNIC("whois.nic.or.kr"),
    CNNIC("ipwhois.cnnic.cn"),
    UNKNOWN("");

    private String url;

    WhoisRIR(String url) {
        this.url = url;
    }

    public String url() {
        return url;
    }
}
Copy
Test.java
public class Test {

    public static void main(String[] args) {

		//whois.arin.net
        System.out.println(WhoisRIR.ARIN.url());

    }

}

Open in new window


going through above code from below link

https://www.mkyong.com/java/java-enum-example/

i was not clear how i got output as below

whois.arin.net


is enum like a class?
how enum different from java class?

when we use enum

not clear on below as well
Enum + Method + Some logic
Operation.java
public enum Operation {
    PLUS,
    MINUS,
    TIMES,
    DIVIDE;

    double calculate(double x, double y) {
        switch (this) {
            case PLUS:
                return x + y;
            case MINUS:
                return x - y;
            case TIMES:
                return x * y;
            case DIVIDE:
                return x / y;
            default:
                throw new AssertionError("Unknown operations " + this);
        }
    }

}
Copy
Test.java
public class Test {

    public static void main(String[] args) {

        double result = Operation.PLUS.calculate(1, 2);
        System.out.println(result); //3.0

    }

}
Copy
4. How to use Enum
4.1 To loop a Enum object.

public class Test {

    public static void main(String[] args) {

        for (UserStatus status : UserStatus.values()) {
            System.out.println(status);
        }

    }

}
Copy
Output

PENDING
ACTIVE
INACTIVE
DELETED

Open in new window

please advise
0
Hello,

The prolema that I encounter is related to classical programming.
I want to upload an image (jpeg, gif etc) into the sql server. We did not succeed with all our efforts. If you can help me, I will remain eternally grateful
All right,
Al.Buzoianu
0
how to open .mbz files
0
Hi Experts,

We have a third party system that generates a file in a FTP server every 15 min.
Now we would like to import this file into Caspio bridge.
Caspio bridge has the capability to add under scheduled tasks to import files from a FTP server.

However I'm facing the following issue.
Caspio bridge expects a fixed name file, while the system which generates files to the FTP server is set to add time stamp into the names of the files created.

Wondering what is the solution?
Perhaps you can help me put together some code that will rename files under that FTP site?
0
i have a existing junit file which basicaly using power mock and validating incoming messages to existings system say XYZ.  I see big XML there with bunch of tags as below

String message = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>>"
                              + "<Msg><uap>2013-09-2
++ "<id><udd>12

now i need to modify above xml with new xml generated using new xsd.

how to do that?

why xml represented as above with concatenation of + in between
any good ends to end example on this

please advise
0
any free tools like xpmspy which is free for generating sample xmls from XSDs and to work with XSLT etc.

I head XMLEdit but i did not see any direct link to download though?

Please advise
0
What happens if a thread acquires a lock (SemaphoreSlim), and then that thread gets terminated before it releases the lock?

e.g.
private SemaphoreSlim semaphoreSlim = new SemaphoreSlim(1, 1);
public async Task DoStuff()
{
    using (semaphoreSlim.WaitAsync(1000))
    {
    	...//Do something
    }
}

Open in new window

What happens if the thread gets terminated while it's in "Do Something"?
0
sms vs mms

what is differnce between above two?

please advise
0
when i deployed war to the webapps location of tomcat getting errors
http://localhost:8080/security-form-based/protected/index.jsp

HTTP Status 404 – Not Found
Type Status Report

Message /security-form-based/protected/index.jsp

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

please advise



tried below link

https://www.concretepage.com/java-ee/jsp-servlet/form-based-authentication-in-jsp-using-tomcat

i am getting below error

ud_mdb_activemq\JSPLoginDemo>gradle clean build
'gradle' is not recognized as an internal or external command,
operable program or batch file.

please advise
0
How to convert executable binary to shell script
0
Hi Experts,

I would like to copy all links displayed on a specific page, including sub-links.
For example the following
https://howto.caspio.com/tech-tips-and-articles/
How can I accomplish that?
0

System Programming

40K

Solutions

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

Top Experts In
System Programming
<
Monthly
>