Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

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

Tell  me some LOgic for thats..  i develop  one small console application to get remote system derive info it getting also but problem is getting only single remote machine data we have to want get mutiple remote machine data in single console application..
hepl!!!
Thanq
0
Get expert help—faster!
LVL 11
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

I have a batch script Change.bat as below  which changes value of attribute httpPort in server.xml file to a hardcoded value. But my script works only if the xml file is in the same folder where the batch script exists. BUT      
The server.xml location is %~dp0\wlp\usr\servers\defaultServer\server.xml and the batch script is in the same folder where 'wlp' folder resides. What changes do I need to do in the batch ?

server.xml contents-
<!-- Enable features -->
<featureManager>
    <feature>webProfile-7.0</feature>
    <!-- <feature>localConnector-1.0</feature> -->
</featureManager>

<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint host="*" httpPort="7680" httpsPort="9443" id="defaultHttpEndpoint"/>

<!-- Automatically expand WAR files and EAR files -->
<applicationManager autoExpand="true"/>


<applicationMonitor updateTrigger="mbean"/>

Open in new window

Change.bat contents-
@echo off
setlocal EnableExtensions DisableDelayedExpansion

rem First check if the file to modify exists in directory of batch file.
set "XmlFile=%~dp0\wlp\usr\server.xml"
if not exist "%XmlFile%" goto EndBatch

rem Define some environment variables which are needed later.
set "NewPort=47682"
set "LineNumber="
set "LineCount=0"
set "TmpFile=%TEMP%\%~n0.tmp"

rem Search for the line containing attribute httpPort and get its
rem line number and the line itself loaded into environment 

Open in new window

0
Hi, I had a new phone system installed and when I lift the handrest line 2 picks up and not line 1. I need CO1 to pickup by default since thats the line has unlimited calls rather then the 2nd line has pay per call. Can anyone help how to program the phone from picking up line 2 and pick up line 1.
0
int y=10;
float x=y/100;
System.out.println(x)

Open in new window

i expected above result 0.1 but getting 0.0 wonder why?


int y=10;
int x=y/100;
System.out.println(x)

Open in new window

why above is 0?
please advise
0
hi,

what are differences between
@PathParam,@QueryParam,@FormParam and @Provider,@Consumes,@Produces

when we use which one.

any end to end examples on these rest web service concepts
please advise
0
hi,

I was reading below link to convert json to java back and forth using gson

https://www.mkyong.com/java/how-do-convert-java-object-to-from-json-format-gson-api/

is there is any alternative way to do this?
please advise
0
hi,

I was reading as below

No sensitive data in URL − Never use username, password or session token in URL , these values should be passed to Web Service via POST method.

how POST protect data?
i was not clear.

please advise
0
hi,

i am trying below example
https://www.tutorialspoint.com/restful/restful_first_application.htm

when i added project to tomcat 8.5 in eclipse and trying to start tomcat i am getting below error

Server Tomcat v8.5 Server at localhost failed to start.
are these below 3 same jar or different jars?

\jaxrs-ri-2.17\jaxrs-ri\api
\jaxrs-ri-2.17\jaxrs-ri\ext
\jaxrs-ri-2.17\jaxrs-ri\lib
jaxrs-ri seems jar right which has api and ext and lib within that?

i downloaded that and added from below site
http://www.java2s.com/Code/Jar/j/Downloadjaxrsapijar.htm
it seems to have 2.0 version not 2.17 as mentioned in site?
where i can get exact version jar?
where i can see exact error trace of tomcat?

please advise
tomcatStartErr.png
0
i was reading below link
http://gopaldas.org/webservices/soap/webservice-is-stateful-or-stateless-rest-soap/

what it mean  by

rest web services stateless and allow caching
how stateless allows to cache webservice responses?
how caching is related to statelessness of http?
please advise
0
I am trying to do a cryptography, but to no avail .... the code does not compile. How do I convert const char * buf to BYTE? Or is there another way?


#include <cstdio>
 
typedef unsigned char BYTE;
 
BYTE server_keys[2][256] = {
	{
		0xFC, 0x77, 0xA1, 0x85, 0x1F, 0x30, 0x51, 0x20, 0x93, 0x4A, 0xE3, 0x10, 0x0E, 0x32, 0x58,
		0x64, 0x36, 0x8C, 0x19, 0xF0, 0x61, 0xE0, 0xDF, 0x9E, 0x9F, 0x90, 0xD0, 0x05, 0xFA, 0xEB,
		0x3D, 0x4B, 0xA5, 0xF1, 0x72, 0x73, 0xD4, 0xB5, 0x70, 0xD7, 0xCD, 0x9A, 0x95, 0x2B, 0xC9,
		0x00, 0x8E, 0xAC, 0x35, 0x1B, 0xE7, 0x7B, 0xC3, 0x15, 0x11, 0xF6, 0xAD, 0x5B, 0x87, 0x86,
		0xB4, 0x9B, 0x26, 0xDB, 0xDE, 0x1C, 0x66, 0x24, 0xD8, 0x27, 0x6A, 0xBD, 0x5D, 0x8D, 0x7D,
		0x0D, 0xAE, 0x8B, 0xA9, 0x62, 0x6B, 0x0B, 0xE2, 0x5C, 0x6C, 0xBE, 0x54, 0x55, 0x6E, 0xBF,
		0x3F, 0x88, 0x99, 0xB0, 0x48, 0x16, 0x5A, 0x34, 0xA6, 0xE8, 0xFD, 0xD3, 0xE4, 0x82, 0xD6,
		0x8A, 0x3B, 0xFE, 0xA4, 0x94, 0xF8, 0x06, 0x97, 0xCB, 0xF5, 0x33, 0x79, 0xD9, 0x83, 0x4F,
		0xB1, 0xAB, 0xA2, 0x69, 0x91, 0xFF, 0xC6, 0x2C, 0x68, 0xC1, 0xAA, 0xC4, 0x1D, 0x18, 0x3A,
		0xBC, 0x04, 0x2F, 0xA3, 0xFB, 0x17, 0x89, 0x25, 0x02, 0xCF, 0xDD, 0x2D, 0x6D, 0xC5, 0xC2,
		0x46, 0x01, 0xE5, 0xED, 0x2E, 0xDA, 0x31, 0x37, 0x40, 0xC8, 0xB6, 0xE9, 0x7C, 0x45, 0xF3,
		0x47, 0x22, 0xF9, 0x63, 0xB9, 0x13, 0x38, 0x78, 0x2A, 0xC0, 0xEC, 0xEF, 0x28, 0x12, 0x6F,
		0x75, 0xEA, 0x29, 0x84, 0x9C, 0x44, 0x96, 0x0A, 0x59, 0x76, 0x92, 0x41, 0xF2, 0x67, 0x08,
		0xB8, 0x43, 0xCA, 0x1E, 0xE1, 0x52, 0x3C, 0x42, 0xEE, 0xA8,

Open in new window

0
Free Tool: Site Down Detector
LVL 11
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

like.. if we to start our Personal computer then it start all the services on startup it cause the delay in turn on the computer  , so that is why we need to overcome from this give proper idea for this problem.
0
hi,

how to import ant project in eclipse. please advise

maven project is simple just say import as existing maven project under file but for Ant shows import build file but if i select that build.xml is missing and putting some weird name to project as well.

please advise
0
debugging HashMap in eclipse shows as below in variables tab for HashMap

{a=3, x=1, y=1}

instead of showing as below
{a:3, x:1, y:1}

which is right convention why eclipse shows in different convention. Does not matter as long as i see key then value separated by some special character like : or = or $ etc?
please advise
0
what is difference between below threee HashMap declarations

1.HashMap<String,Integer> map=new HashMap<String,Integer>();
2.Map<String,Integer> map=new HashMap<String,Integer>();
3.HashMap<String,int> map=new HashMap<String,int>();

why i cannot pass primitive to generics?
please advise
0
hi,

while doing maven install i got below error
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

while doing maven clean it is success though
i follwed below steps to resolve
http://javarevisited.blogspot.com/2016/06/maven-eclipse-error-no-compiler-is-no-JRE-JDK-installed.html

how
 maven clean
maven install
maven update
are different?
why maven clean is success and no issues in doing maven update as well where as maven install complained above jre?
0
Few days back any mail related command ( mailx, mail ,mpack  ) stopped working from one sudo id .
in the logs i get error as dsn=5.6.0, stat=Data format error
but this happens with only one sudo ID-sudo1@my_hostname
another id -sudo2 works fine with any of the mail command

sudo su sudo1
mailx -s "Test mail" someone@example < /tmp/test.file
/home/sudo1/dead.letter... Saved message in /home/sudo1/dead.letter
where from=sudo1@my_hostname
message fails to sent


sudo su sudo2
mailx -s "Test mail" someone@example < /tmp/test.file
where from=sudo2@my_hostname
message successfully sent and received.

Not getting why with one prefix it is sent and other fails ... ?
0
hi,

eclipse java perspective kind of messed up as i tried to expand console which went to top right corner from bottom. I further tried to move which moved outline some where else etc. How bringing back to default view of java perspective so that i can see everything as origninal? if i restart the eclipse this problem resolved or there is any trick or command to fix this java perspective(even any other perspective for that matter like J2ee etc)
i tried restarting eclipse did not help though
please advise
0
In the html world what is difference between
<th> vs <td>

when we use each under <tr> of <table>
please advise
can i use one another interchangeably?
0
I have used Octopus Deploy but never Jenkins.

What are some big differences?

Thanks
0
[Webinar On Demand] Database Backup and Recovery
LVL 11
[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

A program calls some open source programs.  Can the calling program and all the open source programs be installed in the server?  The reason I ask this is because If all the programs are single threaded and a user can call the open source programs independently of the call made by the main program that runs in the server, there may be collisions.  Is there any issue I should be aware of for a situation like that?
0
Hello. I have a <asp:CheckBoxList> with 4 ListItems.  I would like to know how I can tell which if any of those checkboxes are checked.  To be more specific I would like to know if the other box is checked and if so a panel should stay visible.  So far this is what I have:

<asp:CheckBoxList ID="cblEduAssistPlans" runat="server" SelectedIndexChanged="cblEduAssistPlans_SelectedIndexChanged" AutoPostBack="true">
                       <asp:ListItem>Individualized education program (IEP)</asp:ListItem>
                       <asp:ListItem>Individualized Family Service Plan (IFSP)</asp:ListItem>
                       <asp:ListItem>504 Plan</asp:ListItem>
                       <asp:ListItem>Other</asp:ListItem>
                   </asp:CheckBoxList>

right now, when the other box is checked the panel displays (which is what I want).  But if I check on anything else it disappears.  The user should be able to check multiple boxes. But if Other is one of the checked boxes a panel should be visible. If Other is not checked or unchecked the the panel should disappear.  Here is the code that is supposed to run when other is checked.

Protected Sub cblEduAssistPlans_SelectedIndexChanged(sender As Object, e As EventArgs)
        If (cblEduAssistPlans.SelectedValue = "Other") Then
            pnlEduAssistPlans.Visible = True
        End If
    End Sub
0
Hi

Delphi 10.1 Berlin
I have written an app to monitor a folder (new files, delete files) and it does not work in some cases.
- locally it works
- if i start the application on PC1, monitor a folder on the server, add a file in that folder on PC1 it works
- if I add a file to that folder but on the server (not PC1) it does not work (but on some networks this also works!). If I have open the file explorer on PC1 I can see the added file some ms later - but my app doesn't show it.
My code
procedure TForm31.FormCreate(Sender: TObject);
var
    isf : IShellFolder;
    Eaten, attr : DWord;
    pidl : pItemIDList;
begin
  snh := TShellNotifyHandler.Create(self);
  snh.OnShellNotify := ShellNotifyHandler1;
  snh.ShellMsg := WM_User+100;
  snh.Events := [seDelete, seRenameItem, seCreate];
  snh.Recursive := true;
  SHGetDesktopFolder(isf);
  isf.ParseDisplayName(self.Handle, nil, PWideChar(ExtractFilePath(ParamStr(0))), Eaten, pidl, attr);
  label1.Caption := ExtractFilePath(ParamStr(0));
  snhHandle := snh.RegisterPIDL(self.Handle,pidl);
end;

procedure TForm31.ShellNotifyHandler1(Sender: TObject; LEvent: TShellEvent;
  pidl1, pidl2: PItemIDList);
var
    SRec: TSearchRec;
    Res : integer;
begin
  ListBox1.Clear;
  Res := FindFirst(IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)))+'*.*', faAnyFile, SRec);
  while Res = 0 do
  begin
    if (SRec.Name <> '.') and (SRec.Name <> '..') then
      ListBox1.Items.Add(SRec.Name);
    Res := FindNext(SRec);
  end;
  

Open in new window

0
Hi,

I imported one project as existing maven project. I am seeing below error while adding tomcat 8 as runtime

An internal error occurred during: "Updating workspace".
assertion failed: Mismatched begin/endOperation


While resolving below errror by going to properties
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

please advise
0
hi,
how to see options in advanced rest client options missing in latest version.
latest AvancedRestClient Launched From StartMenu looks quite different as attached.
i am not able to see actual response as well but just able to see response header alone

please advise
AdvanceRestClientOptions.png
latestAvancedRestClientLaunchedFromS.png
latestAvancedRestClientLaunchedFromS.png
0
hi,

when i  try to missing junit to build path showing 2 options. i wonder why it shows same option 2 times. please advise
JUNitBuildPAth.png
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.