Search Results

Search found 50 results on 2 pages for 'din'.

Page 1/2 | 1 2  | Next Page >

  • Jocuri friv pentru toti

    - by haioase
    Jocurile online sunt o modalitate foarte simpla de a te relaxa in timpul liber si spun acest lucru deoarece nu ai altceva de facut decat sa te asezi in fata calculatorului, sa cauti pe internet ceea ce iti place si sa te joci cat vrei - sau cat de mult timp ai la dispozitie.Poate si din cauza ca sunt atat de cautate, industria jocurilor de pe internet a devenit tot mai infloritoare in ultima decada.Un site unde poti sa gasesti o multitudine de jocuri flash este si friv.me.uk games - Play your favorite online game, site dedicat in exclusivitate jocurilor friv de tot felul. Dupa cum se vede din titlu este in limba engleza, dar acest lucru nu cred ca reprezinta un impediment pentru vizitatorii din lumea intreaga care viziteaza www.friv.me.uk , deoarece astazi pana si copiii de gradinita stiu semnificatia cuvintelor play this game sau click here to play.Daca va intrebati ce sa alegeti din multele jocuri de acolo, v-as sugera sa incercati noile jocuri friv de strategie, deoarece sunt atat haioase, cat si interesante si educative pentru cei mici. Nu iti trebuie dexteritate in apasarea tastelor, ci o minte organizata, deoarece trebuie sa iti faci un plan de aparare foarte bun pentru a putea castiga un joc de genul lui Bloons tower defense, de exemplu.Fetelor care vor sa se joace pe friv.me.uk as vrea sa le sugerez cateva jocuri speciale pentru ele, cum ar fi cele de gatit impreuna cu Dora. Se vor distra copios, preparand cea mai gustoasa pizza in bucataria virtuala a Dorei si, in acelasi timp, vor invata fractiile, deoarece trebuie sa imparta pizza in felii egale pentru toti cei aflati la masa.Acestea au fost doar cateva idei despre ce jocuri friv puteti sa va jucati in fiecare zi pe friv.me.uk. Voi alegeti orice va place si stati oricat vreti acolo, pentru ca este un site unde va puteti amuza foarte tare impreuna cu prietenii sau familia. Distractie placuta tuturor!

    Read the article

  • XML Reading org.xml.sax.SAXParseException: Expecting end of file.

    - by vivekbirdi
    Hi, I am getting problem while parsing XML File using JDE 4.6. FileConnection fconn = (FileConnection)Connector.open ("file:///SDCard/Dictionary.xml",Connector.READ_WRITE); InputStream din= fconn.openInputStream(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(din); here I am getting Exception at Document document = builder.parse(din); org.xml.sax.SAXParseException: Expecting end of file. please give me some solution. Thanks

    Read the article

  • print integer and array from file android

    - by vik
    i want to open a file and then calculate the integer and array value from file and print on the screen. i tried this but not working @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView av = new TextView(this); setContentView(av); try { String i = "abc.xyz"; InputStream in = assets.open(i); try { DataInputStream din = new DataInputStream(in); int value = din.readInt(); // print value on screen int[] arry = new int[1]; // print arry on screen how to do it int arry[1] = din.readInt(); } } finally { in.close(); } } catch (IOException e) { throw new PuzzleIOException(e); } av.setText(size); }

    Read the article

  • Cannot start MySQL

    - by Mohamed Nour El-Din
    I used this command from shell to repair all Databases mysqlcheck -u root -p --auto-repair --check --optimize --all-databases and after that I restarted the server when it came back alive again I tried to open my vBulletin forum but I recived Database error message. and also tried to open phpMyAdmin but I received this error : #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured). I checked the services list and found that the MySQL Service is not listed, so I tried to start it from shell I receive this error : Starting MySQL.Manager of pid-file quit without updating fi[FAILED] could anyone help me in that ? thanks in advance. update I found these lines in the log file 101101 01:36:01 mysqld started 101101 1:36:01 [Warning] Asked for 196608 thread stack, but got 126976 101101 1:36:01 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and last (automatic?) repair failed 101101 1:36:01 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and last (automatic?) repair failed 101101 1:36:01 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/user' is marked as crashed and last (automatic?) repair failed 101101 01:36:01 mysqld ended What should I do then ?

    Read the article

  • Outgoing only SMTP server

    - by Din
    I want to setup on my Debian outgoing only SMTP server, so my Web-applications will be able to send mail via it. I don't want to use other hosts because of security and customizability of my own setup. I want to setup Postfix and configure it only in outgoing mode (I don't want it to be a relay). So I want to ask an advice how to do it in the best way. There's no need in users, virtual users, endpoints and other options that Postfix provides. I suppose that I should only attach Postfix to some hostname so my IP address can resolve to it. I also think that Postfix maybe a bit complicated solution for this task. If you know much simpler tool for it, let me know. Thanks.

    Read the article

  • Glume amuzante cu copii

    - by interesante
    Tatal chel; o fetita o intreaba pe mama sa: - Mama, de ce tata e asa de chel? - Deoarece are multa minte si i-a cazut parul. - Dar tu de ce ai asa de mult par in cap? - Mananca si taci!Era odata un tanar care cand era mic vroia sa se faca un "mare" scriitor. Cand i s-a cerut sa defineasca "mare" a spus: "Vreau sa scriu chestii pe care sa le citeasca toata lumea, chestii la care lumea sa reactioneze emotional, lucruri care sa-i faca sa strige, sa planga, sa urle, sa se zbata de durere, disperare si manie!" Acum lucreaza pentru Microsoft si scrie mesaje de eroare...Mai multa distractie pe un website cu jocuri flash care sa te captiveze.Un barbat zbura cu un balon cu aer cald si la un moment dat si-a dat seama ca s-a ratacit. A coborat pana aproape de pamant si a zarit o femeie pe o pajiste. Apropiindu-se de ea, el i-a strigat: -Fii amabila, poti sa ma ajuti? Am promis unui prieten ca ma intalnesc cu el, dar nu mai stiu unde ma aflu. Femeia i-a raspuns: -Te afli intr-un balon cu aer cald, la vreo 10 metri inaltime. Te gasesti intre 40 si 41 grade latitudine nord, si intre 59 si 60 de grade logitudine vest. -Ei, probabil esti inginera de profesie! spuse omul din balon. -Asa este, raspunse femeia, dar de unde stii? -Pai tot ce mi-ai spus este corect din punct de vedere tehnic, dar tot n-am idee ce-as putea face cu informatiile de la tine si sunt tot in ceata. Sa fiu sincer, nu m-ai ajutat deloc. Ba chiar pot spune ca m-ai tinut pe loc degeaba. Atunci femeia i-a raspuns: -Dar tu trebuie sa fii director! -Asa este, raspunse barbatul, dar de unde stii? -Pai nu stii unde te afli si nici incotro te indrepti. Te-ai ridicat la inaltime profitand de o flama care a incins situatia. Ai facut o promisiune pe care nu stii cum ai sa ti-o tii si te astepti ca oamenii de sub tine sa-ti rezolve problema. Adevarul este ca te afli exact in locul unde te aflai cand am inceput discutia, acum 1 minut, dar brusc constati acum ca asta este din vina mea.

    Read the article

  • Glume cu chelneri

    - by interesante
    La un mic restaurant, in luna decembrie:- Chelner, ce ai rece in acest moment?- Picioarele, domnule.Distreaza-te si cu alte lucruri amuzante de pe jurnalul meu haios.La un restaurant de lux, vine controlul de la Sanepid.Fac ei controlul si constata ca totul era o.k.Multumiti,din partea patronului de local,primesc si un pranz.Vine chelnerul,ii intreaba ce vin doresc sa serveasca,le aduce vinul,scoate dopul de pluta,le toarna in pahare si, ca la un local care se respecta,acesta scoase o lingurita de la pieptul sacoului si curata cu grija bucatelele de pluta din paharele mesenilor. Dupa ce inspectorii servira masa, il chemara pe chelner sa-i multumeasca si-l intrebara: - Nu va suparati! De ce purtati snur la slit? - Igiena inainte de toate! Cand ne ducem la buda, ca sa nu mai punem mana, tragem de snur si gata! - Aha! Si cum o bagati la loc? - Cu lingurita!

    Read the article

  • WebCenter Customer Spotlight: Indecopi

    - by me
    Author: Peter Reiser - Social Business Evangelist, Oracle WebCenter  Solution SummaryIndecopi Optimizes Patent Approval Management and Accelerates Customer Service Times by 40% Indecopi is a decentralized public agency that promotes the country’s markets and protects consumer rights. It promotes fair and honest competition and safeguards all forms of intellectual property through three directorates: Author’s Rights, Inventions and New Technologies, and Trademarks. The business challenge was to unify the agency’s technology infrastructure to create a business process management strategy, consolidate the organization’s Web platform and improve and automate information services for citizens and businesses, and streamline patent procedures by digitizing documentation. Indecopi optimized patent information services , organized information, provided around-the-clock online access to users, and developed a Web site that provides internal and external users access to DIN information, such as patent documentation, through a user-friendly interface. Indecopi achieved impressive business result by reducing use of paper files by 50%, accelerating transaction approvals,  reduce nonvalue-added activities by 85% and  accelerated customer service times by 40%. Company OverviewPeru’s Instituto Nacional de Defensa de la Competencia y de la Protección de la Propiedad Intelectual (Indecopi), the National Institute for the Defense of Competition and Protection of Intellectual Property, is a decentralized public agency that promotes the country’s markets and protects consumer rights. It promotes fair and honest competition and safeguards all forms of intellectual property through three directorates: Author’s Rights, Inventions and New Technologies, and Trademarks. Business ChallengesIndecopi's challenge was to unify the agency’s technology infrastructure to create a business process management strategy, starting with the Directorate of Inventions and New Technologies (DIN), consolidate the organization’s Web platform to meet new demands for software and process development, such as for patent applications, and improve and automate information services for citizens and businesses and streamline patent procedures by digitizing documentation. Solution DeployedIndecopi optimized patent information services with Oracle Business Process Management, automating processes to deliver expedient searches, and to create new services, such as alerts to users. They organized information and provided around-the-clock online access to users with Oracle WebCenter Content. In addition they used Oracle WebLogic Server to develop a Web site that provides internal and external users access to DIN information, such as patent documentation, through a user-friendly interface. Business Results Indecopi achieved impressive business results Reduced use of paper files by 50% Accelerated transaction approvals  reduce nonvalue-added activities, such as manual document copying to obtain patents, by 85% Accelerated customer service times by 40% by optimizing procedures, such as searches and online information related to granting patents “Oracle Business Process Manager has been a paradigm shift in process management. By digitalizing and automating our patents information services, we can now manage everything in the simplest way possible, expanding our options for the creation of new services.” Sergio Rodríguez, Assistant Director, Inventions and New Technologies Directorate, Instituto Nacional de Defensa de la Competencia y la Propiedad Intelectual Additional Information Indecopi Customer Snapshot Oracle WebCenter Content

    Read the article

  • wireless profile saving problem please help me out

    - by Jayjitraj
    DATA_BLOB in; DATA_BLOB out; BYTE pin=(BYTE)"FIPL2"; DWORD din=strlen((char*)pin)+1; in.pbData = pin; in.cbData = din; if(CryptProtectData(&in,L"what is it",NULL,NULL,NULL,0,&out)) { BYTE *b=out.pbData; Now I want to convert it into hexadecimal to save as my wifi password so what should i do }

    Read the article

  • gwt maven war plugin configuration problem

    - by Din
    I am developing a gwt application in maven. In this I am using maven war plugin. Everything works fine. When I give mvn install command it builds abc.war file in target folder. But it is not copying compiled javascript files ("module1" and "module2" directories present in target) to war directory. I want to get newly compiled javascript files in war directory. How to achieve this? pom.xml file <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>example</groupId> <artifactId>example</artifactId> <packaging>war</packaging> <version>12</version> <name>gwt-maven-archetype-project</name> <properties> <!-- convenience to define GWT version in one place --> <gwt.version>2.1.0</gwt.version> <noServer>false</noServer> <skipTest>true</skipTest> <gwt.localWorkers>1</gwt.localWorkers> <JAVA_HOME>C:\Program Files\Java\jdk1.6.0_22</JAVA_HOME> <!-- convenience to define Spring version in one place --> </properties> <dependencies> <!-- Required dependencies--> </dependencies> <build> <finalName>abc</finalName> <outputDirectory>war/WEB-INF/classes</outputDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <verbose>true</verbose> <executable>${JAVA_HOME}\bin\java.exe</executable> <compilerVersion>1.6</compilerVersion> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.1.0</version> <executions> <execution> <goals> <goal>compile</goal> <goal>generateAsync</goal> <goal>mergewebxml</goal> <goal>test</goal> </goals> </execution> </executions> <configuration> <servicePattern>**/client/**/*Service.java</servicePattern> <noServer>${noServer}</noServer> <noserver>${noServer}</noserver> <modules> <module>com.abc.example.Module1</module> <module>com.abc.example.Module2</module> </modules> <runTarget>com.abc.example.Module1/module1.jsp</runTarget> <port>8080</port> <extraJvmArgs>-Xmx1024m -Xms1024m -Xss1024k -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs> <hostedWebapp>war</hostedWebapp> <warSourceDirectory>${basedir}/war</warSourceDirectory> <webXml>${basedir}/war/WEB-INF/web.xml</webXml> </configuration> </plugin> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>process-classes</phase> <configuration> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1-beta-1</version> <configuration> <warSourceDirectory>${basedir}/war</warSourceDirectory> <webXml>${basedir}/war/WEB-INF/web.xml</webXml> <!--<webXml>src/main/webapp/WEB-INF/web.xml</webXml>--> <containerConfigXML>war/WEB-INF/classes/context/context.xml</containerConfigXML> <warSourceExcludes>.gwt-tmp/**</warSourceExcludes> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <executions> <execution> <goals> <goal>clean</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.4.2</version> <configuration> <argLine>-Xmx1024m</argLine> <skipTests>${skipTest}</skipTests> </configuration> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>2.2</version> <configuration> <filesets> <fileset> <directory>war/module1</directory> </fileset> <fileset> <directory>war/module2</directory> </fileset> <fileset> <directory>war/WEB-INF/lib</directory> </fileset> </filesets> </configuration> </plugin> </plugins> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>**/public/resources/**</exclude> <exclude>**/public/images/**</exclude> </excludes> <filtering>true</filtering> </resource> </resources> <filters> <filter>src/main/resources/build/build-${env}.properties</filter> </filters> </build> <profiles> <profile> <activation> <activeByDefault>true</activeByDefault> </activation> <id>dev</id> <properties> <env>dev</env> </properties> </profile> </profiles> <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> </plugin> </plugins> </reporting>

    Read the article

  • Py_INCREF/DECREF: When

    - by Izz ad-Din Ruhulessin
    Is one correct in stating the following: If a Python object is created in a C function, but the function doesn't return it, no INCREF is needed, but a DECREF is. [false]If the function does return it, you do need to INCREF, in the function that receives the return value.[/false] When assigning C typed variables as attributes, like double, int etc., to the Python object, no INCREF or DECREF is needed. Assigning Python objects as attributes to your other Python objects goes like this: PyObject *foo; foo = bar // A Python object tmp = self->foo; Py_INCREF(foo); self->foo = foo; Py_XDECREF(tmp); //taken from the manual, but it is unclear if this works in every situation EDIT: -- can I safely use this in every situation? (haven't run into one where it caused me problems) dealloc of a Python object needs to DECREF for every other Python object that it has as an attribute, but not for attributes that are C types. Edit With 'C type as an attribute I mean bar and baz: typedef struct { PyObject_HEAD PyObject *foo; int bar; double baz; } FooBarBaz;

    Read the article

  • question regarding pointer in c language

    - by din
    char *sample = "String Value"; &sample is a pointer to the pointer of "String Value" is the above statement right? If the above statement right, what is the equivalent of &sample if my declaration is char sample[] = "String Value"

    Read the article

  • How to change internal buffer size of DataInputStream

    - by Gaks
    I'm using this kind of code for my TCP/IP connection: sock = new Socket(host, port); sock.setKeepAlive(true); din = new DataInputStream(sock.getInputStream()); dout = new DataOutputStream(sock.getOutputStream()); Then, in separate thread I'm checking din.available() bytes to see if there are some incoming packets to read. The problem is, that if a packet bigger than 2048 bytes arrives, the din.available() returns 2048 anyway. Just like there was a 2048 internal buffer. I can't read those 2048 bytes when I know it's not the full packet my application is waiting for. If I don't read it however - it'll all stuck at 2048 bytes and never receive more. Can I enlarge the buffer size of DataInputStream somehow? Socket receive buffer is 16384 as returned by sock.getReceiveBufferSize() so it's not the socket limiting me to 2048 bytes. If there is no way to increase the DataInputStream buffer size - I guess the only way is to declare my own buffer and read everything from DataInputStream to that buffer? Regards

    Read the article

  • problem in Latex

    - by qwerty
    Hellom I have a problem in Latex: if i have: \begin{enumerate} \item Alert - Mesaje de avertizare, erori, etc. \item Form - Permite crearea de ecrane compuse din alte componente, cum ar fi imagini (Image) sau articole derivate din Item (ChoiceGroup, CustomItem, DateField, Gauge, ImageItem, Spacer, StringItem, TextField). \item List - Ecran pentru selectarea unei op\c tiuni dintr-o mul\c time prestabilit\u a. \item TextBox - Ecran pentru introducerea unui text. \end{enumerate} \bf BIBLIOGRAFIE \linebreak \linebreak 1.suport\hspace{0.2cm}curs then, i wanna display that BIBLIOGRAFIE after the last item, but with two lines between them. So i have "TextBox - Ecran pentru introducerea unui text.", then two lines, then BIBLIOGRAFIE. how can i write that? with this code, the space between List and TextBox items are very large, and BIBLIOGRAFIE is displayed at the buttom... why? if i use \linebreak after \end{enumerate} i got a compile error Please help Thankls!

    Read the article

  • encryption problem for wlan profile

    - by Jassi
    i am trying to encrypt keyMaterial element from wireless profile. so I want to convert byte array into OLECHAR but it is giving me wrong output not key sea the below code you may know the solution... DATA_BLOB in; DATA_BLOB out; BYTE pin=(BYTE)"FIPL2"; DWORD din=strlen((char*)pin)+1; in.pbData = pin; in.cbData = din; if(CryptProtectData(&in,L"what is it",NULL,NULL,NULL,0,&out)) { BYTE *b=out.pbData; USES_CONVERSION; bstr=SysAllocString(W2BSTR((const WCHAR *)b)); HRCALL(peSubS222->put_text(bstr), ""); SysFreeString(bstr); bstr=NULL; } else { cout<<"NOOOOOOOOOOOOOOOO :("; } what is missing please help me out

    Read the article

  • How do I use a Minitel terminal as a linux dumb terminal

    - by Pawz
    I recently purchased a US version of the Alcatel Minitel terminal. I think it's a 1B version. Pictures of it here: I tried connecting a null modem to the 25 pin port on the back and plugging it into a linux box running agetty but I couldn't get it to show any signs of being connected. I used Google Translate to translate this document into English: http://mirabellug.org/wikini/upload/Documentations_minitel.pdf As far as I can tell, you take it out of videotex mode by typing Fcnt-T A, then turn off local echo with Fcnt-T E, then set it to 4800 baud with Fcnt-P 4. I presume Fcnt refers to the "CTRL" key on my terminal. But I think I'm doing something wrong, because it doesn't look like it's recognising the keystrokes, because "Fcnt-T A" just prints the letter A to the screen, which is not what you'd expect a function key combo to do. Has anyone used these minitel terminals as a linux terminal, and if so, please can you share how to configure the minitel to run as a terminal ? Is the 25 pin plug even the correct port to use ? I read something online that indicated you're supposed to use the 5 pin DIN plug instead, is that right ? If so, what's the 25 pin plug for ? If I am supposed to use the DIN plug, does anyone know the pinouts so I can make a cable ?

    Read the article

  • Help with chat server

    - by mithun1538
    I am designing a chat server in java. The communication is Http based and not socket based. In the client side I have an applet. In the server side I have a servlet. Applet: I create a new thread to listen for incoming messages(GET method). The main thread is used to send messages(POST messages). The partial code is : public void start() { System.out.println("Creating new thread"); Thread thread = new Thread(this); thread.start(); } private String getNewMessage() { System.out.println("Inside getNewMessage"); String msg = null; try { while(msg == null) { System.out.println("Trying to listen to servlet"); URL servlet = new URL(getCodeBase(), "NewServlet?mode=msg"); URLConnection con = servlet.openConnection(); con.setUseCaches(false); DataInputStream din = new DataInputStream(new BufferedInputStream(con.getInputStream())); msg = din.readUTF(); System.out.println("message read :" + msg); } } catch (Exception e) { e.printStackTrace(); } return msg + "\n"; } public void run() { System.out.println("Inside new thread"); while(true) { System.out.println("inside first while"); String newMsg = getNewMessage(); chatOutput.append(newMsg); System.out.println("Appended!!"); } } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { String message = chatInput.getText(); chatInput.setText(""); chatOutput.append(message + "\n"); try { System.out.println("Trying to send msg :" + message); URL url = new URL(getCodeBase(), "NewServlet"); URLConnection servletConnection = url.openConnection(); servletConnection.setDoInput(true); servletConnection.setDoOutput(true); servletConnection.setUseCaches(false); servletConnection.setRequestProperty("Content-Type", "application/octet-stream"); ObjectOutputStream out = new ObjectOutputStream(servletConnection.getOutputStream()); out.writeObject(message); out.flush(); out.close(); System.out.println("Message sent!"); } catch (Exception e) { e.printStackTrace(); } } This next code is from the servlet side. it uses the Observable interface to identify and send messages to clients. public class NewServlet extends HttpServlet { // getNextMessage() returns the next new message. // It blocks until there is one. public String getNextMessage() { // Create a message sink to wait for a new message from the // message source. System.out.println("inside getNextMessage"); return new MessageSink().getNextMessage(source);} @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("Inside Doget"); response.setContentType("text/plain"); PrintWriter out = response.getWriter(); out.println(getNextMessage()); } // broadcastMessage() informs all currently listening clients that there // is a new message. Causes all calls to getNextMessage() to unblock. public void broadcastMessage(String message) { // Send the message to all the HTTP-connected clients by giving the // message to the message source source.sendMessage(message); } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("Inside DoPost"); try { ObjectInputStream din= new ObjectInputStream(request.getInputStream()); String message = (String)din.readObject(); System.out.println("received msg"); if (message != null) broadcastMessage(message); System.out.println("Called broadcast"); // Set the status code to indicate there will be no response response.setStatus(response.SC_NO_CONTENT); } catch (Exception e) { e.printStackTrace(); } } /** * Returns a short description of the servlet. * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; } MessageSource source = new MessageSource();} class MessageSource extends Observable { public void sendMessage(String message) { System.out.println("inside sendMsg"); setChanged(); notifyObservers(message); } } class MessageSink implements Observer { String message = null; // set by update() and read by getNextMessage() // Called by the message source when it gets a new message synchronized public void update(Observable o, Object arg) { // Get the new message message = (String)arg; // Wake up our waiting thread notify(); } // Gets the next message sent out from the message source synchronized public String getNextMessage(MessageSource source) { // Tell source we want to be told about new messages source.addObserver(this); System.out.println("AddedObserver"); // Wait until our update() method receives a message while (message == null) { try { wait(); } catch (Exception ignored) { } } // Tell source to stop telling us about new messages source.deleteObserver(this); // Now return the message we received // But first set the message instance variable to null // so update() and getNextMessage() can be called again. String messageCopy = message; message = null; System.out.println("Returning msg"); return messageCopy; } } As you can see I have included System.out.println("Some message"); in some places. this was just for debugging purposes. In java console, i get the following output: Creating new thread Inside new thread. inside first while. Inside getNewMessage. Trying to listen to servlet. In the servlet side, i get the following output in the tomcat logs: Inside Doget. inside getNextMessage. AddedObserver. After i type a message in the applet, and send it, I get the foll output in java console: Trying to send msg :you deR?? Message sent! But in servlet side, I dont get anything in the logs. I used the O'Reily Java Servlet Programming as reference(The observer interface comes from there). But I am not getting any chat communication between two clients. As can be understood from the logs, the POST method is not called. Any reason for this?

    Read the article

  • Reading a user input (character or string of letters) into ggplot command inside a switch statement or a nested ifelse (with functions in it)

    - by statisticalbeginner
    I have code like AA <- as.integer(readline("Select any number")) switch(AA, 1={ num <-as.integer(readline("Select any one of the options \n")) print('You have selected option 1') #reading user data var <- readline("enter the variable name \n") #aggregating the data based on required condition gg1 <- aggregate(cbind(get(var))~Mi+hours,a, FUN=mean) #Ploting ggplot(gg1, aes(x = hours, y = get(var), group = Mi, fill = Mi, color = Mi)) + geom_point() + geom_smooth(stat="smooth", alpha = I(0.01)) }, 2={ print('bar') }, { print('default') } ) The dataset is [dataset][1] I have loaded the dataset into object list a <- read.table(file.choose(), header=FALSE,col.names= c("Ei","Mi","hours","Nphy","Cphy","CHLphy","Nhet","Chet","Ndet","Cdet","DON","DOC","DIN","DIC","AT","dCCHO","TEPC","Ncocco","Ccocco","CHLcocco","PICcocco","par","Temp","Sal","co2atm","u10","dicfl","co2ppm","co2mol","pH")) I am getting error like source ("switch_statement_check.R") Select any one of the options 1 [1] "You have selected option 1" enter the variable name Nphy Error in eval(expr, envir, enclos) : (list) object cannot be coerced to type 'double' > gg1 is getting data that is fine. I dont know what to do to make the variable entered by user to work in that ggplot command. Please suggest any solution for this. The dput output structure(list(Ei = c(1L, 1L, 1L, 1L, 1L, 1L), Mi = c(1L, 1L, 1L, 1L, 1L, 1L), hours = 1:6, Nphy = c(0.1023488, 0.104524, 0.1064772, 0.1081702, 0.1095905, 0.110759), Cphy = c(0.6534707, 0.6448216, 0.6369597, 0.6299084, 0.6239005, 0.6191941), CHLphy = c(0.1053458, 0.110325, 0.1148174, 0.1187672, 0.122146, 0.1249877), Nhet = c(0.04994161, 0.04988347, 0.04982555, 0.04976784, 0.04971029, 0.04965285), Chet = c(0.3308593, 0.3304699, 0.3300819, 0.3296952, 0.3293089, 0.3289243), Ndet = c(0.04991916, 0.04984045, 0.04976363, 0.0496884, 0.04961446, 0.04954156), Cdet = c(0.3307085, 0.3301691, 0.3296314, 0.3290949, 0.3285598, 0.3280252), DON = c(0.05042275, 0.05085697, 0.05130091, 0.05175249, 0.05220978, 0.05267118 ), DOC = c(49.76304, 49.52745, 49.29323, 49.06034, 48.82878, 48.59851), DIN = c(14.9933, 14.98729, 14.98221, 14.9781, 14.97485, 14.97225), DIC = c(2050.132, 2050.264, 2050.396, 2050.524, 2050.641, 2050.758), AT = c(2150.007, 2150.007, 2150.007, 2150.007, 2150.007, 2150.007), dCCHO = c(0.964222, 0.930869, 0.8997098, 0.870544, 0.843196, 0.8175117), TEPC = c(0.1339044, 0.1652179, 0.1941872, 0.2210289, 0.2459341, 0.2690721), Ncocco = c(0.1040715, 0.1076058, 0.1104229, 0.1125141, 0.1140222, 0.1151228), Ccocco = c(0.6500288, 0.6386706, 0.6291149, 0.6213265, 0.6152447, 0.6108502), CHLcocco = c(0.1087667, 0.1164099, 0.1225822, 0.1273103, 0.1308843, 0.1336465), PICcocco = c(0.1000664, 0.1001396, 0.1007908, 0.101836, 0.1034179, 0.1055634), par = c(0, 0, 0.8695131, 1.551317, 2.777707, 4.814341), Temp = c(9.9, 9.9, 9.9, 9.9, 9.9, 9.9), Sal = c(31.31, 31.31, 31.31, 31.31, 31.31, 31.31), co2atm = c(370, 370, 370, 370, 370, 370), u10 = c(0.01, 0.01, 0.01, 0.01, 0.01, 0.01), dicfl = c(-2.963256, -2.971632, -2.980446, -2.989259, -2.997877, -3.005702), co2ppm = c(565.1855, 565.7373, 566.3179, 566.8983, 567.466, 567.9814), co2mol = c(0.02562326, 0.02564828, 0.0256746, 0.02570091, 0.02572665, 0.02575002 ), pH = c(7.879427, 7.879042, 7.878636, 7.878231, 7.877835, 7.877475)), .Names = c("Ei", "Mi", "hours", "Nphy", "Cphy", "CHLphy", "Nhet", "Chet", "Ndet", "Cdet", "DON", "DOC", "DIN", "DIC", "AT", "dCCHO", "TEPC", "Ncocco", "Ccocco", "CHLcocco", "PICcocco", "par", "Temp", "Sal", "co2atm", "u10", "dicfl", "co2ppm", "co2mol", "pH"), row.names = c(NA, 6L), class = "data.frame") As per the below suggestions I have tried a lot but it is not working. Summarizing I will say: var <- readline("enter a variable name") I cant use get(var) inside any command but not inside ggplot, it wont work. gg1$var it also doesnt work, even after changing the column names. Does it have a solution or should I just choose to import from an excel sheet, thats better? Tried with if else and functions fun1 <- function() { print('You have selected option 1') my <- as.character((readline("enter the variable name \n"))) gg1 <- aggregate(cbind(get(my))~Mi+hours,a, FUN=mean) names(gg1)[3] <- my #print(names(gg1)) ggplot (gg1,aes_string(x="hours",y=(my),group="Mi",color="Mi")) + geom_point() } my <- as.integer(readline("enter a number")) ifelse(my == 1,fun1(),"") ifelse(my == 2,print ("its 2"),"") ifelse(my == 3,print ("its 3"),"") ifelse(my != (1 || 2|| 3) ,print("wrong number"),"") Not working either...:(

    Read the article

  • My java.util.Scanner won't work

    - by Kevin Steen Hansen
    Hello Stackoverflow my code is getting this error: Skriv din alder herunder og tryk enter: Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Scanner.java:907) at java.util.Scanner.next(Scanner.java:1530) at java.util.Scanner.nextInt(Scanner.java:2160) at java.util.Scanner.nextInt(Scanner.java:2119) at Tasteturindtastning.main(Tasteturindtastning.java:20) [Finished in 1.7s with exit code 1] Adn my code is: // Starter java som man plejer, læs i HejVerden.java public class Tasteturindtastning { public static void main(String[] arg) { /* Jeg skal nu angive en variable, men jeg kan ikke bestemme denne variable * Da jeg ønsker at indtastningen fra dette tastetur skal være variablen. * I stedet for int og double bruger jeg så java.util.Scanner, som aflæser * brugerens indtastninger. */ java.util.Scanner tastetur = new java.util.Scanner(System.in); // Printer en opgave/spørgsmål til brugeren System.out.println("Skriv din alder herunder og tryk enter:"); int alder; // Angiver et variablenavn alder = tastetur.nextInt(); // Angiver variablen med værdien fra indtastningen /* Herunder gør jeg brug af et if statement der tjekker værdien for * variablen alder, og ser om den er lig med eller højere end 18, og hvis * dette er tilfældet, så udprinter den en sætning */ if (alder >= 18) System.out.println("Du er myndig, da du er " + alder + " år gammel"); // Printes hvis han er 18 eller ældre } } Can snyone tell me what is wrong?

    Read the article

  • Translating PHP language file

    - by Cudos
    Hello. I have a language file like this: <?php $lng_imagepath = "images/"; $lng_imageext = "gif"; $lng_characset = "iso-8859-1"; $lng_prefix = "en_"; $lng_tabhome = "Home"; $lng_tabmyavenue = "My Profile"; $lng_tabregister = "Register"; $lng_tabhelp = "Help"; $lng_tabbuybids = "Buy Bids"; ?> When I convert into a .html file and run Google translate it looks like this: Glemt brugernavn eller adgangskode? "; $ lng_invaliddata =" Ugyldig brugernavn og password. "$ lng_accountsuspend =" Din konto er suspenderet af vindetbud.dk. "$ lng_accountdelete =" Din konto er blevet slettet af vindetbud.dk. "$ lng_enterdata = "Angiv brugernavn og adgangskode." $ lng_enterpassword = "Angiv adgangskoden." / / slut login side variabel / / Language variabler for registrering side $ lng_frregistration = "Gratis registrering"; $ lng_vouchermessage = "voucher, indløses mod første auktion du vinder "; $ lng_amazingproducts =" Chancen for at vinde fantastiske produkter til fantastiske priser "; $ lng_registrationdata =" Du kan tilmelde med vindetbud.dk, bedes du udfylde følgende "; $ lng_personalinfo =" Personlige oplysninger "; $ lng_firstname =" Første Name "; $ lng_lastname =" Efternavn "; $ lng_birthdate =" Fødselsdato "; Do you have any clever ideas how to translate the file? P.S. I know that grammar won't be perfect, but it would help alot to use google translate.

    Read the article

  • Multiple HTTP requests using sockets in java

    - by codeomnitrix
    How could i send multiple http requests from my java program using sockets. actually i have tried as: import java.net.*; import java.io.*; class htmlPageFetch{ public static void main(String[] args){ try{ Socket s = new Socket("127.0.0.1", 80); DataInputStream dIn = new DataInputStream(s.getInputStream()); PrintWriter dOut = new PrintWriter(s.getOutputStream(), true); dOut.println("GET /mytesting/justCheck.html HTTP/1.1\r\nHost:localhost\r\n\r\n"); boolean more_data = true; String str; int i = 0; while(more_data){ str = dIn.readLine(); if(str==null){ //Now server has stopped sending data //So now write again the inputs dOut.println("GET /mytesting/justCheck1.html HTTP/1.1\r\nHost:localhost\r\n\r\n"); continue; } System.out.println(str); } }catch(IOException e){ } } } But when I send the request again it was not processed? Thank in advance.

    Read the article

  • Luxottica Delivers an Elevated Customer Experience

    - by user801960
    Luxottica Group is a global leader in premium, luxury and sports eyewear with nearly 6,250 stores worldwide. The Group’s strong brand portfolio comprises ten house brands including Oakley, Ray-Ban, Percol and Arnette, and 20 licensed brands such as Bulgari, Chanel and Versace. In January at the Oracle Retail Exchange in New York, Luca Del Din, Luxottica Group’s IT Manager – Global Retail Demand and Integration and Irven Cassio, Digital Experience Director for Luxottica Retail introduced our REx delegates to their flagship Sunglass Hut store on Fifth Avenue. This store showcase provided the opportunity to explore this fantastic retail space incorporating the store’s interactive retail concept, the Sunglass Hut Social Sun station. I invite you to hear from Luca and Irven as we explore some of the innovative technologies and concepts that Luxottica deployed in this store and how these deliver an elevated customer experience.

    Read the article

  • Secretara si seful

    - by interesante
    Un bancher discuta cu prietenul sau:- Iti inchipui, m-am indragostit de secretara mea!Ea are 20 de ani, eu 65! Ce crezi, sansele mele vor creste daca ii voi spune ca am 50?- Sansele tale vor creste daca ii vei spune ca ai 80!Vezi si alte chestii haioase pe profilul meu de pe acest siteProprietarul unu hotel era nelamurit la calcularea unei facturi. Se decide sa-si intrebe secretara.- Asa-i ca ai terminat Politehnica?- Da, ii raspunde secretara.- Bun, atunci spune-mi, daca ai avea 20.000 de dolari din care ai scadea 14%, cu ce ai mai ramane?- Cu nimic in afara de cercei!

    Read the article

  • Glume super amuzante

    - by haioase
    Un ardelean si un lepros stau in inchisoare. La un moment dat, leprosului ii cade o ureche... o ia si o arunca pe geam. Dupa un timp, leprosului ii cade nasul... il ia si il arunca pe geam. Dupa un timp, leprosului ii cade un deget... il ia si il arunca pe geam... Ardeleanul nu mai suporta: -No, dupa cum bag de sama, 'mneata vrei sa evadezi!– Nu va suparati, ce se da aici? - Nu stiu, domnule, stai sa întrebam. Întrebarea circula pâna la primul din rând. - Nu stiu. Mi s-a facut rau si m-am sprijinit de zid. Când mi-am revenit, era deja coada în spatele meu. - De ce nu pleci atunci? - Pai, acum ca sunt primu...

    Read the article

  • Super haioase

    - by haioase
    - Cum se face ca barbatii de treizeci de ani arata mai bine decat femeile de aceeasi varsta ? - Foarte simplu. Pentru ca femeile de treizeci de ani au, in realitate, patruzeci !Un scotian si sotia se afla pe mare. Vine o furtuna si vasul se scufunda. Scotianul e salvat dar sotia nu poate fi gasita. Dupa o luna scotianul primeste de la politie o telegrama: "Sotia acoperita cu scoici, moluste si stridii gasita. Ce sa facem ?" Scotianul telegrafiaza inapoi: "Vindeti scoicile si stridiile. Trimiteti-mi banii. Aruncati din nou momeala." Un canibal calatorea cu avionul. Stewardesa il intreaba: - Ce ati dori sa serviti de mancare ? La care canibalul: - Imi aduceti va rog lista pasagerilor ...

    Read the article

1 2  | Next Page >