No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
The code: print [c[i] for c in ['as','df'] for i in range(len(c))] outputs: ['a','s','d','f'] while, print [c[0] for c in ['as','df']] outputs: ['a','d'] - The first letter of each word. shouldn't the output be ['a','d','s','f'] - Why is this different? |
|
While trying to connect to MSSQL Server 2012 using pymssql,I get the following error. My server name in Windows Authentication is SARATH,User Name is Sarath\SarathShanker and I did not set a password. >>> mssql_conn=pymssql.connect(host='SARATH',user='Sarath\SarathShanker',password='',database='matrix') Error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pymssql.pyx", line 556, … |
|
In MySQL I wan't to alter a table to insert the new column before the first existing coloumn. Can someone tell me the command,as I only saw the AFTER keyword in ALTER.Also is it possible to do so in the first place? |
|
I want to use this- insert into sales(year1) values('344'); query to insert the value '344' into the column where the month column values in January. However I cannot do so by using the WHERE CLAUSE like this: insert into sales(year1) values('344') where Month='January'; This is the existing Table data: 'January', … |
|
I have about 16 tables in a database schema that are empty and wish to populate them with junk row values of the same type which I have defined,is there a way to do it? |
|
//ArrayListEx(main class) import java.io.*; import man.Phone; import man.Person; import java.util.*; public class ArrayListEx{ public static void main(String[] args){ Person p= new Person(); p.setName("yo"); ArrayList<Phone> pList = new ArrayList<Phone>(); Phone ph = new Phone(); ph.setOne("dasd"); pList.add(ph); System.out.println("sgs "+pList); } } My Program has a Person,Phone and ArrayListEx(main class) classes,Person contains an … |
|
Hello,I need to read a file containing 161 commands and store it in a vector of strings using vector_pushback and then print the 161 commands.Which is the best way to proceed with this ? |
|
says the R.java cannot be resolved but the reason seems to be not solved by refreshing or clean building the code..it has something to do with the different build target paths |
|
[CODE]public final class SavingsAccount implements Serializable { /** * This constructor requires all fields to be passed as parameters. * * @param aFirstName contains only letters, spaces, and apostrophes. * @param aLastName contains only letters, spaces, and apostrophes. * @param aAccountNumber is non-negative. * @param aDateOpened has a non-negative number … |
|
Re:
Hi all, I want to activate an OSGI bundle and interact with it on android environment. But I am not sure of the design pattern that I need to use. Can you provide me the design perspective ( etc.. you need an interface, and eventhandler.... ). I don't need the … |
|
Caused by: org.apache.maven.artifact.installer.ArtifactInstallationException: Fa iled to install artifact com.jarus:AndroidAgentApp:apk:0.0.1-SNAPSHOT: C:\Users\ Sarath\mavendependencies (Access is denied) at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(Default... what does this mean? i am trying to install a new dependency for my android project. |
|
public class thermostst{ private float currenttemp(); } I thought in java only abstract classes can contain abstract methods like this! I got this from a algorithms and data structures book and im guessing its a printing mistake and currenttemp should not contain the () . Thank You |
|
hi, im new to MVCin netbeans and,i intend to create a frame set such as this [code]<FRAME name="left" src="menu.html" frameborder="0" border="1" marginheight="0" marginwidth="0" scrolling="auto" noresize> <FRAME name="right" src="right.html" frameborder="0" border="0" borderColor="#525252" scrolling="auto">[/code] in the index.jsp, after creating the main and right html files i ran the application and it worked,the … |
|
hi i am not able to get this particular JSP to work [CODE]<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Hello</title> </head> <body> <h1>${helloMessage}</h1> </body> </html>[/CODE] the helloMessage function is always null in this page! this is the previous page of the JSP: [CODE]<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!doctype html> … |
|
org.apache.jasper.JasperException: /carsar.jsp(1,1) The value for the useBean class attribute com.sarath.cars.CarBean is invalid. thanks! |
|
what is the meaning of org.apache.jasper.JasperException: /carsar.jsp(1,1) The value for the useBean class attribute com.sarath.cars.CarBean is invalid. error? |
|
String<ArrayList> selitems; String<ArrayList> cartitems; what are the possible mistakes? |
|
[code]import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletException; import javax.servlet.http.HttpSession; import java.util.ArrayList; import java.util.StringTokenizer; import java.io.PrintWriter; import java.io.IOException; import java.text.DecimalFormat; public class ShoppingServ extends HttpServlet { String link; String[] books; String[] music; String[] computers; String<ArrayList> selitems; // JAVA.STRING.LANG doesnot take parameters error String<ArrayList> cartitems ;// JAVA.STRING.LANG doesnot take parameters error … |
|
im not able to figure out the meaning of this piece of code: [code] public int void countTokens(String s) { StringTokenizer st= new StringTokenizer(); return st.countTokens(); } [/code] |