This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.Shape; | |
import java.awt.event.MouseAdapter; | |
import java.awt.event.MouseEvent; | |
import java.awt.event.MouseMotionAdapter; | |
import java.awt.geom.Line2D; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String signo(int dia, int mes) { | |
String signo = ""; | |
switch (mes) { | |
case 1: | |
if (dia > 21) { | |
signo = "ACUARIO"; | |
} else { | |
signo = "CAPRICORNIO"; | |
} | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String convertir(String numero, int baseOrigen, int baseDestino) { | |
int numeroBase10 = Integer.parseInt(numero, baseOrigen); // convierte a base 10 cualquier numero en otra base | |
String numeroBaseB = Integer.toString(numeroBase10, baseDestino); // convierte numeroBase10 a otra base | |
return numeroBaseB; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
import javax.swing.JOptionPane; | |
import javax.swing.JTextField; | |
/** | |
* Clase Ventana |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int numeroAnios(int dia, int mes, int anio) { | |
GregorianCalendar fecha = new GregorianCalendar(anio, mes - 1, dia); | |
int cont = 0; | |
GregorianCalendar fechaActual = new GregorianCalendar(); | |
while ((fecha.get(Calendar.YEAR) != fechaActual.get(Calendar.YEAR))) { | |
fecha.add(Calendar.YEAR, 1); | |
cont++; | |
} | |
return cont; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From android 4.1 / 4.2, the following Roboto font families are available: | |
android:fontFamily="sans-serif" // roboto regular | |
android:fontFamily="sans-serif-light" // roboto light | |
android:fontFamily="sans-serif-condensed" // roboto condensed | |
android:fontFamily="sans-serif-thin" // roboto thin (android 4.2) | |
in combination with | |
android:textStyle="normal|bold|italic" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(NSString *)getImgUrl:(NSString *)inputString{ | |
NSString *url = nil; | |
NSScanner *theScanner = [NSScanner scannerWithString:inputString]; | |
// find start of IMG tag | |
[theScanner scanUpToString:@"<img " intoString:nil]; | |
if (![theScanner isAtEnd]) { | |
[theScanner scanUpToString:@"src" intoString:nil]; | |
NSCharacterSet *charset = [NSCharacterSet characterSetWithCharactersInString:@"\"'"]; | |
[theScanner scanUpToCharactersFromSet:charset intoString:nil]; | |
[theScanner scanCharactersFromSet:charset intoString:nil]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// VistaPrincipalViewController.m | |
// Proyecto2 | |
// | |
// Created by Fabiola Ramirez on 29/06/14. | |
// Copyright (c) 2014 Fabiola Ramirez. All rights reserved. | |
// | |
#import "VistaPrincipalViewController.h" | |
#import "Annotation.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// VistaPrincipalViewController.m | |
// Proyecto2 | |
// | |
// Created by Fabiola Ramirez on 29/06/14. | |
// Copyright (c) 2014 Fabiola Ramirez. All rights reserved. | |
// | |
#import "VistaPrincipalViewController.h" | |
#import "Annotation.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
private SectionsPagerAdapter mSectionsPagerAdapter; | |
private ViewPager mViewPager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |