Daily Archives

Articles indexed Thursday December 30 2010

Page 12/34 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • PHP Security checklist (injection, sessions etc)

    - by NoviceCoding
    So what kind of things should a person using PHP and MySql be focused on to maximize security. Things I have done: -mysql_real_escape_string all inputs -validate all inputs after escaping em -Placed random alpha numerics before my table names -50character salt + Ripemd passwords Heres where I think I am slacking: -I know know nothing about sessions and securing them. How unsafe/safe is it if all you are doing is: session_start(); $_SESSION['login']= $login; and checking it with: session_start(); if(isset($_SESSION['login'])){ -I heard something about other forms of injection like cross site injection and what not... -And probably many other things I dont know about. Is there a "checklist"/Quicktut on making php secure? I dont even know what I should be worried about.I kinda regret now not building off cakephp since I am not a pro.

    Read the article

  • How could I know if an object is derived from a specific generic class?

    - by Edison Chuang
    Suppose that I have an object then how could I know if the object is derived from a specific generic class. For example: public class GenericClass<T> { } public bool IsDeriveFrom(object o) { return o.GetType().IsSubclassOf(typeof(GenericClass)); //will throw exception here } please notice that the code above will throw an exception. The type of the generic class cannot be retrieved directly because there is no type for a generic class without a type parameter provided.

    Read the article

  • jQuery expanding menu

    - by Milen
    Hi everybody, i have this html code: <ul id="nav"> <li>Heading 1 <ul> <li>Sub page A</li> <li>Sub page B</li> <li>Sub page C</li> </ul> </li> <li>Heading 2 <ul> <li>Sub page D</li> <li>Sub page E</li> <li>Sub page F</li> </ul> </li> </ul> With this JS code: $(function(){ $('#nav>li>ul').hide(); $('#nav>li').mouseover(function(){ if ($('#nav ul:animated').size() == 0) { $heading = $(this); $expandedSiblings = $heading.siblings().find('ul:visible'); if ($expandedSiblings.size() > 0) { $expandedSiblings.slideUp(500, function(){ $heading.find('ul').slideDown(500); }); } else { $heading.find('ul').slideDown(1000); } } }); }) For now the code works this way: When click on Heading 1, menu is expanded. When click on Heading 2, heading2 submenu menu is expanded and heading 1 submenu is closed. I need to rework it to this: Submenus must be closed automatically on mouseout. Can somebody help me? Thanks in advance!

    Read the article

  • Sending the files (At least 11 files) from folder through web service to android app.

    - by Shashank_Itmaster
    Hello All, I stuck in middle of this situation,Please help me out. My question is that I want to send files (Total 11 PDF Files) to android app using web service. I tried it with below code.Main Class from which web service is created public class MultipleFilesImpl implements MultipleFiles { public FileData[] sendPDFs() { FileData fileData = null; // List<FileData> filesDetails = new ArrayList<FileData>(); File fileFolder = new File( "C:/eclipse/workspace/AIPWebService/src/pdfs/"); // File fileTwo = new File( // "C:/eclipse/workspace/AIPWebService/src/simple.pdf"); File sendFiles[] = fileFolder.listFiles(); // sendFiles[0] = fileOne; // sendFiles[1] = fileTwo; DataHandler handler = null; char[] readLine = null; byte[] data = null; int offset = 0; int numRead = 0; InputStream stream = null; FileOutputStream outputStream = null; FileData[] filesData = null; try { System.out.println("Web Service Called Successfully"); for (int i = 0; i < sendFiles.length; i++) { handler = new DataHandler(new FileDataSource(sendFiles[i])); fileData = new FileData(); data = new byte[(int) sendFiles[i].length()]; stream = handler.getInputStream(); while (offset < data.length && (numRead = stream.read(data, offset, data.length - offset)) >= 0) { offset += numRead; } readLine = Base64Coder.encode(data); offset = 0; numRead = 0; System.out.println("'Reading File............................"); System.out.println("\n"); System.out.println(readLine); System.out.println("Data Reading Successful"); fileData.setFileName(sendFiles[i].getName()); fileData.setFileData(String.valueOf(readLine)); readLine = null; System.out.println("Data from bean " + fileData.getFileData()); outputStream = new FileOutputStream("D:/" + sendFiles[i].getName()); outputStream.write(Base64Coder.decode(fileData.getFileData())); outputStream.flush(); outputStream.close(); stream.close(); // FileData fileDetails = new FileData(); // fileDetails = fileData; // filesDetails.add(fileData); filesData = new FileData[(int) sendFiles[i].length()]; } // return fileData; } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return filesData; } } Also The Interface MultipleFiles:- public interface MultipleFiles extends Remote { public FileData[] sendPDFs() throws FileNotFoundException, IOException, Exception; } Here I am sending an array of bean "File Data",having properties viz. FileData & FileName. FileData- contains file data in encoded. FileName- encoded file name. The Bean:- (FileData) public class FileData { private String fileName; private String fileData; public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getFileData() { return fileData; } public void setFileData(String string) { this.fileData = string; } } The android DDMS gives out of memory exception when tried below code & when i tried to send two files then only first file is created. public class PDFActivity extends Activity { private final String METHOD_NAME = "sendPDFs"; private final String NAMESPACE = "http://webservice.uks.com/"; private final String SOAP_ACTION = NAMESPACE + METHOD_NAME; private final String URL = "http://192.168.1.123:8080/AIPWebService/services/MultipleFilesImpl"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView textViewOne = (TextView) findViewById(R.id.textViewOne); try { SoapObject soapObject = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.setOutputSoapObject(soapObject); textViewOne.setText("Web Service Started"); AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL); httpTransport.call(SOAP_ACTION, envelope); // SoapObject result = (SoapObject) envelope.getResponse(); Object result = envelope.getResponse(); Log.i("Result", result.toString()); // String fileName = result.getProperty("fileName").toString(); // String fileData = result.getProperty("fileData").toString(); // Log.i("File Name", fileName); // Log.i("File Data", fileData); // File pdfFile = new File(fileName); // FileOutputStream outputStream = // openFileOutput(pdfFile.toString(), // MODE_PRIVATE); // outputStream.write(Base64Coder.decode(fileData)); Log.i("File", "File Created"); // textViewTwo.setText(result); // Object result = envelope.getResponse(); // FileOutputStream outputStream = openFileOutput(name, mode) } catch (Exception e) { e.printStackTrace(); } } } Please help with some explanation or changes in my code. Thanks in Advance.

    Read the article

  • What's wrong in this SELECT statement

    - by user522211
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim SQLData As New System.Data.SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True") Dim cmdSelect As New System.Data.SqlClient.SqlCommand("SELECT * FROM Table1 WHERE Seats ='" & TextBox1.Text & "'", SQLData) SQLData.Open() Using adapter As New SqlDataAdapter(cmdSelect) Using table As New Data.DataTable() adapter.Fill(table) TextBox1.Text = [String].Join(", ", table.AsEnumerable().[Select](Function(r) r.Field(Of Integer)("seat_select"))) End Using End Using SQLData.Close() End Sub This line will be highlighted with blue line: TextBox1.Text = [String].Join(", ", table.AsEnumerable().[Select](Function(r) r.Field(Of Integer)("seat_select")))

    Read the article

  • Tomcat myfaces dynamic source files

    - by Gerrie
    Hi, I'm going to try and make as much sense as possible here. We are working on a myfaces 2 app in tomcat. On our local dev machines, whenever we want to change one of our xhtml files, we have to stop the server, deploy and then start the server back up. This is cumbersome and makes making small changes to the view tedious. I tried changing the deployed xhtml file in tomcat, but the server only picks up the new change after a restart. Is there any type of config in myfaces or tomcat I can do to force the rebuilding of these source xhtml's every time?

    Read the article

  • how to let the parser print help message rather than error and exit

    - by fluter
    Hi, I am using argparse to handle cmd args, I wanna if there is no args specified, then print the help message, but now the parse will output a error, and then exit. my code is: def main(): print "in abing/start/main" parser = argparse.ArgumentParser(prog="abing")#, usage="%(prog)s <command> [args] [--help]") parser.add_argument("-v", "--verbose", action="store_true", default=False, help="show verbose output") subparsers = parser.add_subparsers(title="commands") bkr_subparser = subparsers.add_parser("beaker", help="beaker inspection") bkr_subparser.set_defaults(command=beaker_command) bkr_subparser.add_argument("-m", "--max", action="store", default=3, type=int, help="max resubmit count") bkr_subparser.add_argument("-g", "--grain", action="store", default="J", choices=["J", "RS", "R", "T", "job", "recipeset", "recipe", "task"], type=str, help="resubmit selection granularity") bkr_subparser.add_argument("job_ids", nargs=1, action="store", help="list of job id to be monitored") et_subparser = subparsers.add_parser("errata", help="errata inspection") et_subparser.set_defaults(command=errata_command) et_subparser.add_argument("-w", "--workflows", action="store_true", help="generate workflows for the erratum") et_subparser.add_argument("-r", "--run", action="store_true", help="generate workflows, and run for the erratum") et_subparser.add_argument("-s", "--start-monitor", action="store_true", help="start monitor the errata system") et_subparser.add_argument("-d", "--daemon", action="store_true", help="run monitor into daemon mode") et_subparser.add_argument("erratum", action="store", nargs=1, metavar="ERRATUM", help="erratum id") if len(sys.argv) == 1: parser.print_help() return args = parser.parse_args() args.command(args) return how can I do that? thanks.

    Read the article

  • E-mail verification in wordpress

    - by Sanjai Palliyil
    Hi All....I am using register-plus plugin for registration purpose in my wordpress site. I have enalbled E-mail verifiacation whereby user will be getting an activation link. What i want to do is when the user clicks the link, i want the user to be enabled automatically.......currently admin has to login to the system and verify the users for the new user to login.....how do i achieve my task ...ANy help is appreciated

    Read the article

  • How to manipulate a string, variable in shell

    - by user558134
    Hei everyone! I have this variable in shell containing paths separated by a space: LINE="/path/to/manipulate1 /path/to/manipulate2" I want to add additional path string in the beginning of the string and as well right after the space so that the variable will have the result something like this: LINE="/additional/path1/to/path/to/manipulate1 additional/path2/to/path/to/manipulate2" Any help appreciated Thanks in advance

    Read the article

  • RTTI Dynamic array TValue Delphi 2010

    - by user558126
    Hello I have a question. I am a newbie with Run Time Type Information from Delphi 2010. I need to set length to a dynamic array into a TValue. You can see the code. Type TMyArray = array of integer; TMyClass = class publihed function Do:TMyArray; end; function TMyClass.Do:TMyArray; begin SetLength(Result,5); for i:=0 to 4 Result[i]=3; end; ....... ....... ...... y:TValue; Param:array of TValue; ......... y=Methods[i].Invoke(Obj,Param);//delphi give me a DynArray type kind, is working, Param works to any functions. if Method[i].ReturnType.TypeKind = tkDynArray then//is working... begin I want to set length for y to 10000//i don't know how to write. end; I don't like Generics Collections.

    Read the article

  • How to use JAXB APIs to generate classes from xsd?

    - by Simran
    I need to generate bean classes from .xsd without using xjc command or ant. i have found the implementation in Apache Axis2 but i am unable to generate the artifacts. i have written the following code but i get NullPointerException : SchemaCompiler sc = XJC.createSchemaCompiler(); URL url = new URL("file://E:\\JAXB\\books.xsd"); sc.parseSchema(new InputSource(url.toExternalForm())); S2JJAXBModel model = sc.bind(); JCodeModel cm = model.generateCode(null, null); cm.build(new FileCodeWriter(new File("E:\\JAXBTest"))); Can anyone help me / provide some links???

    Read the article

  • package issue with ubuntu 10.10 and passenger requirements

    - by user368937
    I'm trying to get Passenger working with Ubuntu 10.10 and I'm running into a problem. It seems that the passenger installer is not recognizing the virtual package. I'm getting this error: Code: passenger-install-apache2-module ... * OpenSSL support for Ruby... not found ... And then it says, run this: * To install OpenSSL support for Ruby: Please run apt-get install libopenssl-ruby as root. When I run the above command, it refers to the libruby package: sudo apt-get install libopenssl-ruby Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libruby' instead of 'libopenssl-ruby' libruby is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded. When I look at the details for libruby, it says it provides libopenssl-ruby: Code: Provides: libbigdecimal-ruby, libcurses-ruby, libdbm-ruby, libdl-ruby, libdrb-ruby, liberb-ruby, libgdbm-ruby, libiconv-ruby, libopenssl-ruby, libpty-ruby, libracc-runtime-ruby, libreadline-ruby, librexml-ruby, libsdbm-ruby, libstrscan-ruby, libsyslog-ruby, libtest-unit-ruby, libwebrick-ruby, libxmlrpc-ruby, libyaml-ruby, libzlib-ruby And when I rerun the passenger installer, it gives the same error: Code: passenger-install-apache2-module ... * OpenSSL support for Ruby... not found ... Let me know if you need more info. How do I fix this?

    Read the article

  • Linux: Encryption of a physical LVM volume doesn't imply encryption of its logical subvolumes?

    - by java.is.for.desktop
    Hello, everyone! I installed OpenSuse one year ago on my notebook. I created all partitions except /boot inside an LVM partition. I enabled encryption for it during setup. The system asked me a password on each boot later. Everything seemed fine... But one day I wanted to cancel the boot process and did it with SysRq REISUB. During entering this combination, the system suddenly continued to boot without any password being entered. I had no /home and no swap, but / was mounted! I checked multiple times, it was inside an "encrypted" physical LVM volume. Later I found out that OpenSuse can't encrypt / at all. There is an option to enable encryption for each logical volume, and indeed it fails for /. Later I tried Fedora. The options during partitioning were misleading by same means. I could enable "encryption" of a physical volume and each logical subvolume. With the exception that Fedora actually allowed to encrypt /. Question: What's the point of setting up "encryption" for a physical LVM volume, when it doesn't imply (real) encryption of its logical subvolumes? Did I get something wrong in this whole concept?

    Read the article

  • Recommended setting for using Apache mod_mono with a different user

    - by Korrupzion
    Hello, I'm setting up an ASP.net script in my linux machine using mod_mono. The script spawn procceses of a bin that belongs to another user, but the proccess is spawned by www-data because apache runs with that user, and i need to spawn the proccess with the user that owns the file. I tried setuid bit but it doesn't make any effect. I discovered that if I kill mod-mono-server2.exe and I run it with the user that I need, everything works right, but I want to know the proper way to do this, because after a while apache runs mod-mono-server2.exe as www-data again. Mono-Project webpage says: How can I Run mod-mono-server as a different user? Due to apache's design, there is no straightforward way to start processes from inside of a apache child as a specific user. Apache's SuExec wrapper is targeting CGI and is useless for modules. Mod_mono provides the MonoStartXSP option. You can set it to "False" and start mod-mono-server manually as the specific user. Some tinkering with the Unix socket's permissions might be necessary, unless MonoListenPort is used, which turns on TCP between mod_mono and mod-mono-server. Another (very risky) way: use a setuid 'root' wrapper for the mono executable, inspired by the sources of Apache's SuExec. I want to know how to use the setuid wrapper, because I tried adding the setuid to 'mono' bin and changing the owner to the user that I want, but that made mono crash. Or maybe a way to keep running mono-mod-server2.exe separated from apache without being closed (anyone has a script?) My environment: Debian Lenny 2.6.26-2-amd64 Mono 1.9.1 mod_mono from debian repository Dedicated server (root access and stuff) Using apache vhosts -I use mono for only that script Thanks!

    Read the article

  • How to zip and rename a directory tree

    - by Kev
    I have a lot of music in a lot of directories: ./artist1/album1/*.mp3 ./artist1/album2/*.mp3 ./artist1/album3/*.mp3 ./artist2/album1/*.mp3 ./artist2/album2/*.mp3 ./artist3/album1/*.mp3 ./artist3/album2/*.mp3 ... ... How can I zip them to this: ./artist1/album1/*.mp3 => ./artist1-album1.tar.gz ./artist1/album2/*.mp3 => ./artist1-album2.tar.gz ./artist1/album3/*.mp3 => ./artist1-album3.tar.gz ./artist2/album1/*.mp3 => ./artist2-album1.tar.gz ./artist2/album2/*.mp3 => ./artist2-album2.tar.gz ./artist3/album1/*.mp3 => ./artist3-album1.tar.gz ./artist3/album2/*.mp3 => ./artist3-album2.tar.gz ... ... I'd like one-line-command or a simple script.

    Read the article

  • Install MatroskaProp on Windows 7 x64

    - by Neophytos
    To see more information in Windows Explorer property pages and menus about Matroska Video (.mkv) files, similar to what one can see when selecting native Windows media (.avi, .asf, .wmv or even just plain old mpg) files, Matroska links (from http://www.matroska.org/downloads/windows.html) to a download of the MatroskaProp shell extension (http://www.jory.info/serendipity/archives/14-MatroskaProp-2.8-Released.html). It used to work for me under Windows XP 32-bit. Now I have Windows 7 x64, and downloaded, installed and ran it. Configuration and settings page is fine. But it does not seem to actually register any shell extension. Nothing is added to Explorer windows, menus or property pages when selecting .mkv or .mks files). I tried calling the register hook manually using regsvr32.dll, that again invoked the configuration window and let me set all options, and when confirming even said the registration succeeded, but seems to have had no effect. In the registry I cannot find any traces of the shell extension being installed. Can this extension be made to work under Windows 7 or x64 systems? Are there known problems with installing this or other old shell extensions on x64, or on Windows 7?

    Read the article

  • Programmation concurrente en Java de Brian Goetz, critique par Eric Reboisson

    Je viens de lire "Programmation concurrente en Java" et je vous le recommande vivement.Une chose m'a particulièrement marqué : Trop peu de développeurs se soucient de la justesse de leur programme. Un peu comme pour la propreté du code (cf Clean Code), ils sont nombreux à s'arrêter dès que ça fonctionne ! Or en ce qui concerne la concurrence, les conditions limites vont s'exprimer le plus souvent en production et non en développement.Je ne dis pas qu'il faut faire systématiquement du code multithread...

    Read the article

  • Développer votre application Web mobile avec Wink le framework JavaScript adapté aux navigateurs WebKit. Par Jérôme GIRAUD

    Wink est un framework JavaScript mobile et un projet de la fondation Dojo. Il cible les navigateurs WebKit (que l'on retrouve sur la majorité des smartphones et tablettes du moment) et est compatible avec iOS, Android et BlackBerry. Ultra-léger (6ko), il est adapté aux contraintes et aux spécificités des environnements Web mobile et fournit toute une couche de gestion des événements "touch" et "gesture".

    Read the article

  • Qt Graphics et performance - la folie est de mettre en forme le même texte, un article de Eskil Abrahamsen Blomfeldt, traduit par Guillaume Belz

    Le 11 décembre 2009, la documentation de QPainter subissait un énorme ajout concernant l'optimisation de son utilisation. En effet, le bon usage de cet outil n'était pas accessible à tous, il n'était pas présenté dans la documentation. Ceci ne fut qu'un prétexte à une série d'articles sur l'optimisation de QPainter et de Qt Graphics en général. Voici donc le premier article de cette série, les autres sont en préparation : Qt Graphics et performances : ce qui est critique et ce qui ne l'est pas Pensez-vous que cet ajout à la documentation de QPainter sera utile ? Trouvez-vous les performances de vos applications trop faibles ?...

    Read the article

  • 5 tipologie di consumatori con cui confrontarsi per rendere vincenti le proprie strategie di CRM

    - by antonella.buonagurio(at)oracle.com
    Sono 5 le tipologie di consumatori che  rappresentano 5 differenti modalità di acquisto di cui le aziende devono tenere in considerazione nella pianificazione dei propri piani strategici del 2011. Oltre al "consumatore just-in-time", già citato in un precedente articolo apparso sul Wall Street Journal a Novembre ecco le altre tipologie evidenziate da Lioe Arussy (Strativity Group). Il consumatore alla ricerca degli sconti Il consumatore diffidente Il consumatore timoroso Il consumatore fai-da-te Il consumatore indulgente Per ognuno di queste categorie viene evidenziato il modello di comportamento e il conseguente modello di acquisto. Per saperne di più 

    Read the article

  • Why PHP Function Naming so Inconsistent?

    - by Shamim Hafiz
    I was going through some PHP functions and I could not help notice the following: <?php function foo(&$var) { } foo($a); // $a is "created" and assigned to null $b = array(); foo($b['b']); var_dump(array_key_exists('b', $b)); // bool(true) $c = new StdClass; foo($c->d); var_dump(property_exists($c, 'd')); // bool(true) ?> Notice the array_key_exists() and property_exists() function. In the first one, the property name(key for an array) is the first parameter while in the second one it is the second parameter. By intuition, one would expect them to have similar signature. This can lead to confusion and the development time may be wasted by making corrections of this type. Shouldn't PHP, or any language for that matter, consider making the signatures of related functions consistent?

    Read the article

  • CS subjects that an undergraduate must know.

    - by Karl
    In college, I was never interested in theory. I never read it. No matter how much I tried, I was unable to read stuff and not know what was actually happening practically. Like for example, in my course on automata theory, my professor told me everything possibly related to the mathematical aspect of it, but not even once did he mention where it would be used practically. This is just an example. I managed to pass my college and interned with a company also, where I did a project and thankfully they didn't bother about my grades, as they were above average. Now, I am interested in knowing what subjects should a CS student must absolutely and positively be aware of? Subjects that can have relevance in the industry. This is because I have some free time on my hands and it would help me better to have a good understanding of them. What are your suggestions? Like for one, algorithms is one subject.

    Read the article

  • unable to install anything on ubuntu 9.10 with aptitude

    - by Srisa
    Hello, Earlier i could install software by using the 'sudo aptitude install ' command. Today when i tried to install rkhunter i am getting errors. It is not just rkhunter, i am not able to install anything. Here is the text output: user@server:~$ sudo aptitude install rkhunter ................ ................ 20% [3 rkhunter 947/271kB 0%] Get:4 http://archive.ubuntu.com karmic/universe unhide 20080519-4 [832kB] 40% [4 unhide 2955/832kB 0%] 100% [Working] Fetched 1394kB in 1s (825kB/s) Preconfiguring packages ... Selecting previously deselected package lsof. (Reading database ... ................ (Reading database ... 95% (Reading database ... 100% (Reading database ... 20076 files and directories currently installed.) Unpacking lsof (from .../lsof_4.81.dfsg.1-1_amd64.deb) ... dpkg: error processing /var/cache/apt/archives/lsof_4.81.dfsg.1-1_amd64.deb (--unpack): unable to create `/usr/bin/lsof.dpkg-new' (while processing `./usr/bin/lsof'): Permission denied dpkg-deb: subprocess paste killed by signal (Broken pipe) Selecting previously deselected package libmd5-perl. Unpacking libmd5-perl (from .../libmd5-perl_2.03-1_all.deb) ... Selecting previously deselected package rkhunter. Unpacking rkhunter (from .../rkhunter_1.3.4-5_all.deb) ... dpkg: error processing /var/cache/apt/archives/rkhunter_1.3.4-5_all.deb (--unpack): unable to create `/usr/bin/rkhunter.dpkg-new' (while processing `./usr/bin/rkhunter'): Permission denied dpkg-deb: subprocess paste killed by signal (Broken pipe) Selecting previously deselected package unhide. Unpacking unhide (from .../unhide_20080519-4_amd64.deb) ... dpkg: error processing /var/cache/apt/archives/unhide_20080519-4_amd64.deb (--unpack): unable to create `/usr/sbin/unhide-posix.dpkg-new' (while processing `./usr/sbin/unhide-posix'): Permission denied dpkg-deb: subprocess paste killed by signal (Broken pipe) Processing triggers for man-db ... Errors were encountered while processing: /var/cache/apt/archives/lsof_4.81.dfsg.1-1_amd64.deb /var/cache/apt/archives/rkhunter_1.3.4-5_all.deb /var/cache/apt/archives/unhide_20080519-4_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up libmd5-perl (2.03-1) ... Building dependency tree... 0% Building dependency tree... 50% Building dependency tree... 50% Building dependency tree Reading state information... 0% ........... .................... I have removed some lines to reduce the text. All the error messages are in here though. My experience with linux is limited and i am not sure what the problem is or how it is to be resolved. Thanks.

    Read the article

  • unable to compile a servlet in ubuntu

    - by codeomnitrix
    I am newbie to j2ee. I have download and installed j2eesdk-1_4_03-linux.bin in my ubuntu 10.04 distribution. and then i tried to code my first servlet in it as: import java.io.*; import javax.servelet.*; import javax.servelet.http.*; public class HowdyServelet extends HttpServelet{ public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ PrintWriter out = response.getWriter(); response.setContentType("text/html"); out.println("<html>"); out.println("<head><title>howdy</title></head>"); out.println("<body>"); out.println("<center><h1>Howdy</h1></center>"); out.println("</body>"); out.println("</html>"); } } and here are the environment variables i set after installation: 1. J2EE_HOME=/home/vinit/SUNWappserver 2. JAVA_HOME=/home/vinit/SUNWappserver/jdk 3. CLASSPATH=/home/vinit/SUNWappserver/lib and now i tried to compile the servlet using javac HowdyServelet.java But i got following errors: HowdyServelet.java:2: package javax.servelet does not exist import javax.servelet.*; ^ HowdyServelet.java:3: package javax.servelet.http does not exist import javax.servelet.http.*; ^ HowdyServelet.java:5: cannot find symbol symbol: class HttpServelet public class HowdyServelet extends HttpServelet{ ^ HowdyServelet.java:6: cannot find symbol symbol : class HttpServeletRequest location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ HowdyServelet.java:6: cannot find symbol symbol : class HttpServeletResponse location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ HowdyServelet.java:6: cannot find symbol symbol : class ServeletException location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ 6 errors So how to compile this servlet. Thanks in advance.

    Read the article

  • Circular reference problem Singleton

    - by Ismail
    I'm trying to creating a Singleton class like below where MyRepository lies in separate DAL project. It's causing me a circular reference problem because GetMySingleTon() method returns MySingleTon class and needs its access. Same way I need MyRepository access in constructor of MySingleTon class. public class MySingleTon { static MySingleTon() { if (Instance == null) { MyRepository rep = new MyRepository(); Instance = rep.GetMySingleTon(); } } public static MySingleTon Instance { get; private set; } public string prop1 { get; set; } public string prop2 { get; set; } }

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >