Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

Programming Languages-Other

19K

Solutions

19K

Contributors

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.

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

Sign up to Post

Dear,
I do not know why event cannot be fired below, after having clicked the button.

<input type="submit" name="LoginButton" value="登录" id="LoginButton" class="LoginButton" onclick="LoginButton_Click" style="font-weight: bold; position:fixed; top:30%;left:50%; z-index:1000"/>

Open in new window

0
On Demand Webinar: Networking for the Cloud Era
LVL 10
On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Dear,
I want to have bigger height to overall div below. What to adjust?
            <li>
                <div class="imagesList-item-frame shadow"/>
                    <img src=<%=lb_pict5.Text %> onclick="pict_click5();" />
                    <div class="legend">
                        <input type="textbox" id="tb_p5_desc" style="height:20px; width:116px; border:inherit; background-color:#C5C4CC;" runat="server" /><label id="show5"></label>
                        <input type="text" id="tb_p5_desc2" style="height:20px; width:118px; border:inherit; background-color:#C5C4CC; display: none" value="TEST:" runat="server" />
                        <!---span>Some descriptions here</span><br /--->
                        <input type="button" id="butt_p5" onclick="openPopup5();" style="height:26px; width:97px" value="删除照片" runat="server" />
                    </div>
            </li>

Open in new window

0
Dear,
How to identify reason of StackTrace got below?
   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   at System.Data.OleDb.OleDbCommand.ExecuteScalar()
   at RegRec2._Default.remove_rec(Int32 rec_id)

Open in new window

0
Hi,
Within the page, I want to know what it does, further to such codes
function openPopup2() {
    var lblctrl = document.getElementById("lb_pict2");
    if (lblctrl.innerHTML != "") {
        $("#myPanel2").dialog("open");
    }
    return false;
}

Open in new window

0
Hi,
Is there any tool to be able to open attached pdb file?
B.PDB
0
Hi,
It seems event below, cannot be fired, after the change of the value of TextBox.
                <asp:TextBox ID="tb_construct_area_size"
                    width="170px"
                    Font-Names="Times New Roman" 
                    Font-Size="11pt" 
                    Font-Bold="true"
                    ForeColor="Black"
                    OnTextChanged="area_changed"
                    runat="server" />
                    ...
        protected void area_changed(object sender, EventArgs e)
        {
            if (Convert.ToInt32(tb_construct_area_size.Text) < Convert.ToInt32(tb_area.Text))
            {

Open in new window

0
I have never used classmethod in my code, appreciate if I can get some example on how to use and which condition it will be beneficial? Thanks!
0
Hi,

As per this link last step
https://blog.codecentric.de/en/2013/04/again-10-tips-on-java-debugging-with-eclipse/
i tried detail formatter
I am getting below error

Detail formatter error:
            Unable to resolve type binding for: clientID

please advise on how to fix it.
how to use ToStringBuilder multi line style as well to see deep into Person etc object?
0
Hi,
I use
	<asp:panel id="myPanel6" runat="server" CssClass="dia">
		确定要删除相片吗?
		<br /><br />
        <div style="text-align:center;">
		    <asp:Button id="YesButt6" OnClick="clickMe6" runat="server" Text="是"/>
		    &nbsp;&nbsp;
		    <asp:Button id="Button8" OnClick="clickNo6" runat="server" Text="否"/>
        </div>
	</asp:panel>

Open in new window


to have one confirmation to further delete record but I get
17k.png
What to adjust?
0
Hi,
I want to change visibility of relevant button (like to hide it), per given relevant values on the page. How?

<input type="button" id="butt_p4" onclick="openPopup4();" style="height:23px; width:97px; visibility:visible" value="删除照片" runat="server" />

Open in new window

0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

hi,

In my eclipse i have 2 projects say project1, project2......., project20

I want to get latest code for each project then do maven update then maven clean then maven install for each individually and separately.
Is there is a way or short cut where i can do all together in one step.
what is maven update? is that supposed to run after maven clean and maven install or before.

please advise
0
While hitting a get request on rest wadl using advanced rest client getting 401 error.

How to resolve it.

how to change to basic authentication where i can ignore the username and password part as that wadl do not need any creadentials

please advise
0
while doing maven clean and then maven insall i am getting below error while doing maven install





COMPILATION ERROR :
[INFO] -------------------------------------------------------------
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------






[INFO] BUILD FAILURE



how to fix this error.

what is root cause of this.
why not eclipse always remember my jdk?
do i ned to set up separately and tell eclipse about my jdk1.8??

please advise
0
while importing unzipped code as import as maven project to eclipse getting below error



Project testproject already exists


 Add a version or custom suffix using "Name template" in "Advanced" settings



how to fix this error. pLEase advise
0
Hi, I hope I can explain this well enough.

My folder structure looks like the attached. In each folder, I have src/pages, results, dev/gulp.

pages contains the nunjucks files, results are the resulting html files from running gulp nunjucks, and dev/gulp is where the gulpfile.js is.

When I want to make a change across the board, say to the navigation, I have to use the command line to go into each folder, gulp nunjucks, upload, then back out by changing directories, navigate to the next one, gulp nunjucks, and on through all 13. So my command line looks like the attached.

Can you help me find a way to speed that up?
Capture.JPG
cmd.txt
0
Below line gives error as below as        device.getInternetConnection() return enum not String.            
callableStatement.setString("InternetConnection", device.getInternetConnection());


Multiple markers at this line
      - The method getInternetConnection() is undefined for the type Device
      - The method setString(String, String) in the type CallableStatement is not applicable for the arguments (String,
       Device.getInternetConnection)


Here  device.getInternetConnection()); returns the enum  InternetConnection

      public enum InternetConnection{
            
            WIFI("08"),
            CELLULAR("06");
            
            InternetConnection(String ip){
                  this.ip = ip;
            }
            
            private final String ip;
            
            public static InternetConnection getFromIP(String ip) {
                  for(InternetConnection pc : InternetConnection.values()) {
                  if(pc.getIP().equals(ip))...
                       ......
                  }
                  throw new IllegalArgumentException("This iP: " + iP + " does not exist");
            }
            
            public String getIP() {
                  return ip;
            }
      }

How to change my callable statement setter to accommodate enum instead of string?
please advise
0
Hi,

while creating client from wsdl using web servicesw getting below error




public class CustomerOrdersWS {

      public static void main(String[] args) {
            // TODO Auto-generated method stub
            CustomerOrdersService service=new CustomerOrdersService(new URL{"http://localhost:8080/wsdlfirstws/services/customerOrders?wsdl"});
            

      }

}




Multiple markers at this line
      - Type mismatch: cannot convert from String[] to
       CustomerOrdersService
      - Syntax error on token(s), misplaced construct(s)
      - Syntax error on token ")", delete this token

i wonder what it mean by above error and how to resolve it please advise
0
Hi,

I have  abc.zip which i unzipped and imported to eclipse as maven project.

Later i got updated version of abc2.zip. I extracted to differnt folder called new_folder. Now when i try to import abc2.zip i am getting error as

 Project wsdlfirstws already exists
 Add a version or custom suffix using "Name template" in "Advanced" settings



how to fix this error and import updated abc2 project
0
http://codingbat.com/prob/p168493
public Map<String, String> firstChar(String[] strings) {
  Map<String, String> map=new HashMap<String, String>();
  
  for(String str:strings){
  int len=str.length();
    map.put(""+str.substring(0,1), ""+str(0,len));
  }
  return map;
}

Open in new window


Compile problems:


cannot find symbol str(int,int) line:6

see Example Code to help with compile problems

I am getting above error. What is int, int here. How to fix this error and improve my code. please advise
0
Free Tool: SSL Checker
LVL 10
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

http://codingbat.com/prob/p126332

public Map<String, String> pairs(String[] strings) {
  Map map=new HashMap();
  for(String str:strings){
    int len=str.length();
    map.put(str.substring(0,1), str.substring(len-1,len));
  }
  return map;
}

Open in new window

xpected      Run            
pairs(["code", "bug"]) → {"b": "g", "c": "e"}      {"b": "g", "c": "e"}      OK      
pairs(["man", "moon", "main"]) → {"m": "n"}      {"m": "n"}      OK      
pairs(["man", "moon", "good", "night"]) → {"g": "d", "m": "n", "n": "t"}      {"g": "d", "m": "n", "n": "t"}      OK      
pairs([]) → {}      {}      OK      
pairs(["a", "b"]) → {"a": "a", "b": "b"}      {"a": "a", "b": "b"}      OK      
pairs(["are", "codes", "and", "cods"]) → {"a": "d", "c": "s"}      {"a": "d", "c": "s"}      OK      
pairs(["apple", "banana", "tea", "coffee"]) → {"a": "e", "b": "a", "c": "e", "t": "a"}      {"a": "e", "b": "a", "c": "e", "t": "a"}      OK      
other tests
OK      

I wrote as above and passing all steps. Any improvements to my code. please advise
0
http://codingbat.com/prob/p152303
For above challenge i wrote my code like below and passing all tests
public Map<String, Integer> word0(String[] strings) {
 
Map<String, Integer> map=new HashMap<String, Integer>();

for(String string : strings){
  map.put(string,0);
    map.put(string,0);
}
return map;
}

Open in new window

Expected      Run            
word0(["a", "b", "a", "b"]) → {"a": 0, "b": 0}      {"a": 0, "b": 0}      OK      
word0(["a", "b", "a", "c", "b"]) → {"a": 0, "b": 0, "c": 0}      {"a": 0, "b": 0, "c": 0}      OK      
word0(["c", "b", "a"]) → {"a": 0, "b": 0, "c": 0}      {"a": 0, "b": 0, "c": 0}      OK      
word0(["c", "c", "c", "c"]) → {"c": 0}      {"c": 0}      OK      
word0([]) → {}      {}      OK      
other tests
OK      
any improvements to my code. please advise
0
Are there any instructors like
simon allardice
from lynda.com, plursight.com
who explain computer science concepts without using a scripting language.

Just verbally.

Please add (or subtract) zones
0
http://codingbat.com/prob/p152303
I am looking at above challenge description

Given an array of strings, return a Map<String, Integer> containing a key for every different string in the array, always with the value 0. For example the string "hello" makes the pair "hello":0. We'll do more complicated counting later, but for this problem the value is simply 0.

word0(["a", "b", "a", "b"]) → {"a": 0, "b": 0}
word0(["a", "b", "a", "c", "b"]) → {"a": 0, "b": 0, "c": 0}
word0(["c", "b", "a"]) → {"a": 0, "b": 0, "c": 0}

not clear on what hello has to do with unique string. please advise
public Map<String, Integer> word0(String[] strings) {
 
Map map=new HashMap(<String, Integer>);

for(String : strings){
  map.put(strings[i],0);
}
return map;
}

Open in new window


above gives below error


Compile problems:


missing '}' or illegal start of expression

see Example Code to help with compile problems


how to improve and fix my code . please advise
0
while trying below challenge
http://codingbat.com/prob/p136950

i wrote my code as below

public Map<String, String> mapAB4(Map<String, String> map) {
   if( map.get("a")!=null && map.get("b")!=null && map.get("a").length()> map.get("b").length() ){
    map.put("c",map.get("a"));
    
  }
    if( map.get("a")!=null && map.get("b")!=null && map.get("b").length()> map.get("a").length() ){
    map.put("c",map.get("b"));
    
  }
   if( map.get("a")!=null && map.get("b")!=null && map.get("a").equals(map.get("b")) ){
    map.put("a","");
    map.put("b","");
  }
  
  if( map.get("a")!=null && map.get("b")!=null && map.get("a").equals(map.get("b")) ){
    map.put("a","");
    map.put("b","");
  }
  return map;
}

Open in new window


i am failing below tests
Expected      Run            
mapAB4({"a": "aaa", "b": "bb", "c": "cake"}) → {"a": "aaa", "b": "bb", "c": "aaa"}      {"a": "aaa", "b": "bb", "c": "aaa"}      OK      
mapAB4({"a": "aa", "b": "bbb", "c": "cake"}) → {"a": "aa", "b": "bbb", "c": "bbb"}      {"a": "aa", "b": "bbb", "c": "bbb"}      OK      
mapAB4({"a": "aa", "b": "bbb"}) → {"a": "aa", "b": "bbb", "c": "bbb"}      {"a": "aa", "b": "bbb", "c": "bbb"}      OK      
mapAB4({"a": "aaa"}) → {"a": "aaa"}      {"a": "aaa"}      OK      
mapAB4({"b": "bbb"}) → {"b": "bbb"}      {"b": "bbb"}      OK      
mapAB4({"a": "aaa", "b": "bbb", "c": "cake"}) → {"a": "", "b": "", "c": "cake"}      {"a": "aaa", "b": "bbb", "c": "cake"}      X      
mapAB4({"a": "a", "b": "b", "c": "cake"}) → {"a": "", "b": "", "c": "cake"}      {"a": "a", "b": "b", "c": "cake"}      X      
0
http://codingbat.com/prob/p115011

For above challenge i wrote as below
public Map<String, String> mapAB2(Map<String, String> map) {
  if( map.get("a").equals(map.get("b")) ){
    map.remove("a");
    map.remove("b");
  }
  return map;
}

Open in new window


Expected      Run            
mapAB2({"a": "aaa", "b": "aaa", "c": "cake"}) → {"c": "cake"}      {"c": "cake"}      OK      
mapAB2({"a": "aaa", "b": "bbb"}) → {"a": "aaa", "b": "bbb"}      {"a": "aaa", "b": "bbb"}      OK      
mapAB2({"a": "aaa", "b": "bbb", "c": "aaa"}) → {"a": "aaa", "b": "bbb", "c": "aaa"}      {"a": "aaa", "b": "bbb", "c": "aaa"}      OK      
mapAB2({"a": "aaa"}) → {"a": "aaa"}      {"a": "aaa"}      OK      
mapAB2({"b": "bbb"}) → {"b": "bbb"}      NullPointerException (line:2)      X      
mapAB2({"a": "", "b": "", "c": "ccc"}) → {"c": "ccc"}      {"c": "ccc"}      OK      
mapAB2({}) → {}      NullPointerException (line:2)      X      
mapAB2({"a": "a", "b": "b", "z": "zebra"}) → {"a": "a", "b": "b", "z": "zebra"}      {"a": "a", "b": "b", "z": "zebra"}      OK      
other tests
X      
i am failing one edge case. how to fix it?
please advise on any modifications, improvement to the code

public Map<String, String> mapAB2(Map<String, String> map) {
  if( map.get("a")!=null && map.get("b")!=null && map.get("a").equals(map.get("b")) ){
    map.remove("a");
    map.remove("b");
  }
  return map;
}

Open in new window


above passes all tests but challenge description did not mention a and b values cannot be null or can be null etc?
Modify and return the given map as follows: if the keys "a" and "b" are both in the map and have equal values, remove them both.

mapAB2({"a": "aaa", "b": "aaa", "c": "cake"}) → {"c": "cake"}
mapAB2({"a": "aaa", "b": "bbb"}) → {"a": "aaa", "b": "bbb"}
mapAB2({"a": "aaa", "b": "bbb", "c": "aaa"}) → {"a": "aaa", "b": "bbb", "c": "aaa"}
0

Programming Languages-Other

19K

Solutions

19K

Contributors

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.