elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


  Mostrar Mensajes
Páginas: 1 ... 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 [24] 25 26 27 28 29 30 31 32 33
231  Programación / Java / Re: GridBagLayout en: 21 Mayo 2016, 17:50 pm
Citar
Hombre pues creo que si solucionaría el problema, pero no es una forma muy correcta de hacerlo, no? xD
232  Programación / Java / Re: como trabajar con string que contenga "" en: 20 Mayo 2016, 04:31 am
muchas gracias por la ayuda me sirvio de mucho
233  Programación / Java / proyecto duda en: 20 Mayo 2016, 04:31 am
hola comunidad gracias por la ayuda que siempre me ayuda

ahora vengo con una duda muy importante para mi

quiero hacer una aplicacion de geolocalizacion y me encuentro que se puede hacer desde la web y desde android, entonces me surge la idea cual seria mas factible? si hago para la web desde los celulares se podra usar bien ya que tienen gps y si hago para android solo funcionara para los celulares ?

estoy confundido



porque hacer geolocalizacion en web y porque hacer en android?




Mod: No hacer doble post
234  Programación / Java / Re: como trabajar con string que contenga "" en: 20 Mayo 2016, 02:26 am
Citar
``aquí inicia, pero aquí termina´´
``aquí inicia y esto es algo diferente''

te refieres al input y output???
235  Programación / Java / Re: como trabajar con string que contenga "" en: 20 Mayo 2016, 01:55 am
bueno este es el problema que quiero resolver

TeX Quotes

TeX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Beautiful documents use `` and " to delimit quotations, rather than the mundane " which is what is provided by most keyboards. Keyboards typically do not have an oriented double-quote, but they do have a left-single-quote ` and a right-single-quote '. Check your keyboard now to locate the left-single-quote key ` (sometimes called the ``backquote key") and the right-single-quote key ' (sometimes called the ``apostrophe" or just ``quote"). Be careful not to confuse the left-single-quote ` with the ``backslash" key \. TeX lets the user type two left-single-quotes `` to create a left-double-quote `` and two right-single-quotes '' to create a right-double-quote ''. Most typists, however, are accustomed to delimiting their quotations with the un-oriented double-quote ".

If the source contained

"To be or not to be," quoth the bard, "that is the question."

then the typeset document produced by TeX would not contain the desired form:

``To be or not to be," quoth the bard, ``that is the question."

In order to produce the desired form, the source file must contain the sequence:

``To be or not to be,'' quoth the bard, ``that is the question.''

You are to write a program which converts text containing double-quote (") characters into text that is identical except that double-quotes have been replaced by the two-character sequences required by TeX for delimiting quotations with oriented double-quotes. The double-quote (") characters should be replaced appropriately by either `` if the " opens a quotation and by '' if the " closes a quotation. Notice that the question of nested quotations does not arise: The first " must be replaced by ``, the next by '', the next by ``, the next by '', the next by ``, the next by '', and so on.

Input and Output

Input will consist of several lines of text containing an even number of double-quote (") characters. Input is ended with an end-of-file character. The text must be output exactly as it was input except that:

    the first " in each pair is replaced by two ` characters: `` and
    the second " in each pair is replaced by two ' characters: ''.

Sample Input

"To be or not to be," quoth the Bard, "that
is the question".
The programming contestant replied: "I must disagree.
To `C' or not to `C', that is The Question!"

Sample Output

``To be or not to be,'' quoth the Bard, ``that
is the question''.
The programming contestant replied: ``I must disagree.
To `C' or not to `C', that is The Question!''




mi codigo es el siguiente aunque no esta bien creo

Código
  1. public class TexQuotes {
  2. public String tes(String textoMain){
  3.    char caracter=' ';
  4.    int contador=0;
  5.    String answer="";
  6.    for (int i = 0; i < textoMain.length(); i++) {
  7.        caracter=textoMain.charAt(i);
  8.  
  9.        if(caracter==34){
  10.            contador=1;
  11.            if(contador==1){
  12.            answer=answer+96;
  13.            }else{
  14.            answer=answer+caracter;
  15.            contador=0;
  16.            }
  17.        }else{
  18.        answer=answer+caracter;
  19.        }
  20.    }
  21.    System.out.println(answer);
  22.    return answer;
  23. }    
  24. public static void main(String args[]){
  25.    TexQuotes t=new TexQuotes();
  26.    t.tes("To be or not to be," quoth the Bard, "that is the question".);
  27. }
  28. }
  29.  
236  Programación / Java / Re: como trabajar con string que contenga "" en: 20 Mayo 2016, 01:49 am
tengo que trabajar sobre las comillas:

Sample Input

"To be or not to be," quoth the Bard, "that
is the question".
The programming contestant replied: "I must disagree.
To `C' or not to `C', that is The Question!"

Sample Output

``To be or not to be,'' quoth the Bard, ``that
is the question''.
The programming contestant replied: ``I must disagree.
To `C' or not to `C', that is The Question!''

237  Programación / Java / como trabajar con string que contenga "" en: 20 Mayo 2016, 01:39 am
me explico tengo esta cadena

"To be or not to be," quoth the Bard, "that
is the question".

ahora tengo que trabajar sobre esa cadena y al pasarlo como parametro me sale error, bueno es obvio ya que

quoth the Bard      no se encuentra entre comillas


como se soluciona ?
238  Programación / Java / Re: ejecutar aplicacion javafx con jar externos en web hosting remoto en: 19 Mayo 2016, 02:00 am
con un try catch podes obtener el error y mostrarlo
239  Programación / Programación C/C++ / Re: ayuda con problema c++ relocation truncated en: 19 Mayo 2016, 01:44 am
muchas gracias... amigo

yo soy nob en c++, vengo de mi lenguaje nativo "JAVA" y es bastante diferente
240  Programación / Programación C/C++ / Re: ayuda con problema c++ relocation truncated en: 19 Mayo 2016, 00:40 am
entonces tengo que declarar asi las funciones en el punto .cpp?
Páginas: 1 ... 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 [24] 25 26 27 28 29 30 31 32 33
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines