Data solteros

I need a little help with this

2020.05.25 06:22 Seb_lco I need a little help with this

Hi all
Right now I am finishing my final Visual Basic Program, but I have a very small problem. I have to build a tax calculator with an array reading from a file. I have everything up and running but when I hit calculate it only brings cero and does not calculate the rate amount it is supposed too. I have tried a couple of things but nothing happens and I don't know what else to try. If anybody knows what I can do, please help. Thanks
Here is the code:
Imports System.IO Public Class frmMain Public sPorcentaje(6) As sRates
Public Structure sRates Public intLowerLimit As Integer Public intUpperLimit As Integer Public dblSingleRate As Double Public dblMarriedRate As Double Private lower As Integer Private upper As Integer Private soltero As Integer Private casado As Integer Public Sub New(lower As Integer, upper As Integer, soltero As Integer, casado As Integer) Me.New() Me.lower = lower Me.upper = upper Me.soltero = soltero Me.casado = casado End Sub End Structure Public Function LeerArchivos(filename As String) As sRates() 'Asignar los archivos al arreglo Dim sRango(6) As sRates Dim Archivo = File.OpenText(filename) Dim Indice = 0 While Archivo.Peek() <> -1 Dim linia = Archivo.ReadLine() If linia <> "" Then 'Dividir los datos Dim Divisor = linia.Split(CType(",", Char())) Dim Lower = CType(Divisor(0).Trim(), Integer) Dim Upper = CType(Divisor(1).Trim(), Integer) Dim Soltero = CType(Divisor(2).Trim(), Integer) Dim Casado = CType(Divisor(3).Trim(), Integer) sRango(Indice) = New sRates(Lower, Upper, Soltero, Casado) Indice += 1 End If End While Return sRango End Function Public Function BuscarImpuestos(ByVal sRango As sRates(), ByVal valor As Double, ByVal Estatus As String) As Double 'Buscar los impuestos For Each record In sRango If record.intLowerLimit < valor And record.intUpperLimit >= valor Then If Estatus = "Soltero" Then Return record.dblSingleRate End If Estatus = "Casado" Return record.dblMarriedRate End If Next Return Nothing End Function Function CalcularImpuesto(ByVal sPorcentaje As sRates(), ByVal Ingreso As Double, ByVal Deducciones As Double, ByVal Estatus As String) As Double 'Formula para Calcular Impuesto Dim neto = Ingreso - Deducciones Dim rate = BuscarImpuestos(sPorcentaje, neto, Estatus) If rate = Nothing Then Return Nothing End If Return neto * rate End Function Private Sub mnuLimpiar_Click(sender As Object, e As EventArgs) Handles mnuLimpiar.Click 'Limpiar la información del usuario txtNombre.Clear() txtID.Clear() txtIngreso.Clear() txtDeducciones.Clear() lblResultados.Text = String.Empty radSingle.Checked = False radMarried.Checked = False End Sub Private Sub mnuCerrar_Click(sender As Object, e As EventArgs) Handles mnuCerrar.Click 'Cerrar el Programa Me.Close() End Sub Sub Calcular() 'Abrir el Archivo With ofdOpenFile .Filter = "Text files (*.txt)*.txtAll files (*.*)*.*" .InitialDirectory = "C:\Data" .Title = "Escoge un Archivo..." If .ShowDialog() = Windows.Forms.DialogResult.OK Then End If Dim Archivo = ofdOpenFile.FileName sPorcentaje = LeerArchivos(Archivo) End With Dim dblIngreso As Double Dim dblDeducciones As Double Dim sngImpuesto As String 'Igualar las variables dblIngreso = CDec(txtIngreso.Text) dblDeducciones = CDec(txtDeducciones.Text) Try Dim strStatus As String If radSingle.Checked = True Then strStatus = "Soltero" Else strStatus = "Casado" End If sngImpuesto = CalcularImpuesto(sPorcentaje, dblIngreso, dblDeducciones, strStatus).ToString("c") If sngImpuesto = Nothing Then lblResultados.Text = "No se pudo encontrar tarifa" Else lblResultados.Text = sngImpuesto End If Catch ex As Exception End Try End Sub Private Sub mnuCalcular_Click(sender As Object, e As EventArgs) Handles mnuCalcular.Click 'LLamar el procedimiento para Calcular Calcular() End Sub Private Sub btnCalcular_Click(sender As Object, e As EventArgs) Handles btnCalcular.Click 'Llamar el procedimiento para Calcular Calcular() End Sub 
End Class
submitted by Seb_lco to visualbasic [link] [comments]

2018.03.24 15:05 rafa10pj Nuevo censo de r/Uruguay - llamado a preguntas

Me es muy grato anunciar que Uruguay va a tener un nuevo censo! El último fue en julio del año pasado y los overlords moderadores me permitieron hacerme cargo del siguiente. Hay más o menos 1000 users más desde aquel entonces y el sub está bastante más activo así que creo que vale la pena.
Este post es para que ustedes puedan sugerir preguntas o temas para incluir en el censo. No puedo garantizar que todas queden incluidas porque la idea no es atomizar a preguntas y que nadie lo termine, pero sí voy a tratar de que las más upvoteadas o populares lleguen.
Así que sugieran! Tengan en cuenta que el censo es anónimo aunque se va a hacer por Google Forms para evitar repetidos, por lo que una cuenta de Google va a ser necesaria.
Edit: la presentación de los resultados va a ser más bien visual, a diferencia del censo anterior, y pretendo hacer algunos cruces interesantes.
Edit 2: Ya que bajó el caudal de sugerencias, dejo el censo como va a salir: link
Está prellenado con cualquier cosa. Cuando lo hice prolijamente me llevó 3 minutos y 40 segundos.
Cualquier faltante grave de opciones me pueden avisar pero ya queda cerrada la etapa de sugerencia de preguntas.
submitted by rafa10pj to uruguay [link] [comments]

2017.06.20 23:05 Samperaj Need inputs:Pandas for comparing files

Hi All, I am new to python and have a requirement to compare files from two sources.
I should be able to compare two files and find any differences between two files.The files might be .csv, .dat and .xlsx
ie) 1.Records in file1 and not in file 2 2. Records in file2 and not in file1 3. Changed records between two files.
In most of the files there would not be any keys which i can use for my comparison. So I would like to do record by record comparison
I have come up with a basic version of the script and would like to get reviewed.This script is working for my sample files with 3000 rows in each.
Experts, do you see any problem with my approach? Or do you have a better way of doing this? Any improvements/suggestions is much appreciated.
I am using python 3.6(64 bit)
#script to compare two csv files import pandas as pd #read file from source1 src1_df = pd.read_csv(r'C:\Users\Samp\compare\Source1.csv', header=None) #add a indicator field 'Source'as first field in the dataframe src1_df.insert(0, 'Source', "SRC1") #remove duplicaates uniq_src1=src1_df.drop_duplicates(keep='first') #read file from source2 src2_df = pd.read_csv(r'C:\Users\Samp\compare\Source2.csv', header=None) #add a indicator field 'Source' as first field in the dataframe src2_df.insert(0, 'Source', "SRC2") #remove duplicaates uniq_src2=src2_df.drop_duplicates(keep='first') #append the two dataframes horizontally full_set = pd.concat([uniq_src1,uniq_src2],ignore_index=True) #drop duplicates based on the entire row but for the first field 'Source' diff_df=full_set.drop_duplicates(full_set.columns.difference(['Source']),keep=False) #write the output to a csv diff_df.to_csv(r''C:\Users\Samp\compare\compare_results.csv',index=False,encoding='utf-8') #end of script 
The expected output :
Somehow I need to capture all the changes without any keys.The change can be on any field.That is why i am trying to find a way to treat the entire row as a key.
Edit: Changed the format and added sample data and expected results.
Thank you for your time and Help!
submitted by Samperaj to learnpython [link] [comments]

2016.12.23 05:55 LordBlakeTheGreat Help with CV

Hey guys, i'm trying to make a decent CV out of a template i found on overleaf, i learnt how to edit most parts of it to fill it out with my info but 2 or 3 things i can't figure and are driving me nuts. First i wanna make some letters a little bigger, the ones i "highlighted", also i'd to know how to change the colours of the orange letters on the right, i'd like them on dark blue i think. And lastly and more importantly i wanna get rid of these obnoxious thingies on the bottom whose name i can't figure.
Here's a pic.
Any help will be much appreciated. Thanks in advance!
%-----------------------------------------------------------------------------------------------------------------------------------------------% % The MIT License (MIT) % % Copyright (c) 2015 Jan Küster % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the "Software"), to deal % in the Software without restriction, including without limitation the rights % to use, copy, modify, merge, publish, distribute, sublicense, and/or sell % copies of the Software, and to permit persons to whom the Software is % furnished to do so, subject to the following conditions: % % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR % IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, % FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE % AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER % LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN % THE SOFTWARE. % % %-----------------------------------------------------------------------------------------------------------------------------------------------%
%============================================================================% % % DOCUMENT DEFINITION % %============================================================================%
%we use article class because we want to fully customize the page and dont use a cv template \documentclass[10pt,a4paper]{article}
%---------------------------------------------------------------------------------------- % ENCODING %----------------------------------------------------------------------------------------
%we use utf8 since we want to build from any machine \usepackage[utf8]{inputenc}
%---------------------------------------------------------------------------------------- % LOGIC %----------------------------------------------------------------------------------------
% provides \isempty test \usepackage{xifthen}
%---------------------------------------------------------------------------------------- % FONT %----------------------------------------------------------------------------------------
% some tex-live fonts - choose your own
%\usepackage[defaultsans]{droidsans} %\usepackage[default]{comfortaa} %\usepackage{cmbright} \usepackage[default]{raleway} %\usepackage{fetamont} %\usepackage[default]{gillius} %\usepackage[light,math]{iwona} %\usepackage[thin]{roboto}
% set font default \renewcommand*\familydefault{\sfdefault} \usepackage[T1]{fontenc}
% more font size definitions \usepackage{moresize}
%---------------------------------------------------------------------------------------- % PAGE LAYOUT DEFINITIONS %----------------------------------------------------------------------------------------
%debug page outer frames %\usepackage{showframe}
%define page styles using geometry \usepackage[a4paper]{geometry}
% for example, change the margins to 2 inches all round \geometry{top=1.75cm, bottom=-.6cm, left=1.5cm, right=1.5cm}
%use customized header \usepackage{fancyhdr} \pagestyle{fancy}
%less space between header and content \setlength{\headheight}{11pt}
%customize entries left, center and right \lhead{} \chead{ \small{Name $\cdot$ Community Manager $\cdot$ Chacarita, Buenos Aires $\cdot$ \textcolor{sectcol}{\textbf{[email protected]}} $\cdot$ +54 11 000000}} \rhead{}
%indentation is zero \setlength{\parindent}{0mm}
%---------------------------------------------------------------------------------------- % TABLE /ARRAY DEFINITIONS %----------------------------------------------------------------------------------------
%for layouting tables \usepackage{multicol} \usepackage{multirow}
%extended aligning of tabular cells \usepackage{array}
%---------------------------------------------------------------------------------------- % GRAPHICS DEFINITIONS %----------------------------------------------------------------------------------------
%for header image \usepackage{graphicx}
%for floating figures \usepackage{wrapfig} \usepackage{float} %\floatstyle{boxed} %\restylefloat{figure}
%for drawing graphics \usepackage{tikz} \usetikzlibrary{shapes, backgrounds,mindmap, trees}
%---------------------------------------------------------------------------------------- % Color DEFINITIONS %----------------------------------------------------------------------------------------
%accent color \definecolor{sectcol}{RGB}{255,150,0}
%dark background color \definecolor{bgcol}{RGB}{110,110,110}
%light background / accent color \definecolor{softcol}{RGB}{225,225,225}
%============================================================================% % % % DEFINITIONS % % %============================================================================%
%---------------------------------------------------------------------------------------- % HEADER %----------------------------------------------------------------------------------------
% remove top header line \renewcommand{\headrulewidth}{0pt}
%remove botttom header line \renewcommand{\footrulewidth}{0pt}
%remove pagenum \renewcommand{\thepage}{}
%remove section num \renewcommand{\thesection}{}
%---------------------------------------------------------------------------------------- % ARROW GRAPHICS in Tikz %----------------------------------------------------------------------------------------
% a six pointed arrow poiting to the left \newcommand{\tzlarrow}{(0,0) -- (0.2,0) -- (0.3,0.2) -- (0.2,0.4) -- (0,0.4) -- (0.1,0.2) -- cycle;}
% include the left arrow into a tikz picture % param1: fill color % \newcommand{\larrow}[1] {\begin{tikzpicture}[scale=0.58] \filldraw[fill=#1!100,draw=#1!100!black] \tzlarrow \end{tikzpicture} }
% a six pointed arrow poiting to the right \newcommand{\tzrarrow}{ (0,0.2) -- (0.1,0) -- (0.3,0) -- (0.2,0.2) -- (0.3,0.4) -- (0.1,0.4) -- cycle;}
% include the right arrow into a tikz picture % param1: fill color % \newcommand{\rarrow} {\begin{tikzpicture}[scale=0.7] \filldraw[fill=sectcol!100,draw=sectcol!100!black] \tzrarrow \end{tikzpicture} }
%---------------------------------------------------------------------------------------- % custom sections %----------------------------------------------------------------------------------------
% create a coloured box with arrow and title as cv section headline % param 1: section title % \newcommand{\cvsection}[1] { \colorbox{sectcol}{\mystrut \makebox[1\linewidth][l]{ \larrow{bgcol} \hspace{-8pt} \larrow{bgcol} \hspace{-8pt} \larrow{bgcol} \textcolor{white}{\textbf{#1}}\hspace{4pt} }}\ }
%create a coloured arrow with title as cv meta section section % param 1: meta section title % \newcommand{\metasection}[2] { \begin{tabular}{1\textwidth}{p{2.4cm} p{11cm}} \larrow{bgcol} \normalsize{\textcolor{sectcol}{#1}}\[12pt] \end{tabular} }
%---------------------------------------------------------------------------------------- % CV EVENT %----------------------------------------------------------------------------------------
% creates a stretched box as cv entry headline followed by two paragraphs about % the work you did % param 1: event time i.e. 2014 or 2011-2014 etc. % param 2: event name (what did you do?) % param 3: institution (where did you work / study) % param 4: what was your position % param 5: some words about your contributions % \newcommand{\cvevent}[5] { \vspace{8pt} \begin{tabular*}{1\textwidth}{p{2.3cm} p{10.8cm} x{3.9cm}} \textcolor{bgcol}{#1}& \textbf{#2} & \vspace{2.5pt}\textcolor{sectcol}{#3}
\vspace{-12pt} \textcolor{softcol}{\hrule} \vspace{6pt} \begin{tabular}{1\textwidth}{p{2.3cm} p{14.4cm}} & \larrow{bgcol} #4\[3pt] & \larrow{bgcol} #5\[6pt] \end{tabular}
% creates a stretched box as \newcommand{\cveventmeta}[2] { \mbox{\mystrut \hspace{87pt}\textit{#1}}\ #2 }
%---------------------------------------------------------------------------------------- % CUSTOM STRUT FOR EMPTY BOXES %----------------------------------------- ----------------------------------------------- \newcommand{\mystrut}{\rule[-.3\baselineskip]{0pt}{\baselineskip}}
%---------------------------------------------------------------------------------------- % CUSTOM LOREM IPSUM %---------------------------------------------------------------------------------------- \newcommand{\lorem} {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.}
%============================================================================% % % % % DOCUMENT CONTENT % % % %============================================================================% \begin{document}
%use our custom fancy header definitions \pagestyle{fancy}
%--------------------------------------------------------------------------------------- % TITLE HEADLINE %---------------------------------------------------------------------------------------- \vspace{-20.55pt}
% use this for multiple words like working titles etc. %\hspace{-0.25\linewidth}\colorbox{bgcol}{\makebox[1.5\linewidth][c]{\hspace{46pt}\HUGE{\textcolor{white}{\textsc{Jan Küster}} } \textcolor{sectcol}{\rule[-1mm]{1mm}{0.9cm}} \parbox[b]{5cm}{ \large{ \textcolor{white}{{IT Consultant}}}\ % \large{ \textcolor{white}{{Resume}}}} %}}
% use this for single words, e.g. CV or RESUME etc. \hspace{-0.25\linewidth}\colorbox{bgcol}{\makebox[1.5\linewidth][c]{\HUGE{\textcolor{white}{\textsc{name}} } \textcolor{sectcol}{\rule[-1mm]{1mm}{0.9cm}} \HUGE{\textcolor{white}{\textsc{Currilucum}} } }}
%---------------------------------------------------------------------------------------- % HEADER IMAGE %----------------------------------------------------------------------------------------
\begin{figure}[H] \begin{flushright} \includegraphics{trabajoleaf.jpg} %trimming relative to image size! \end{flushright} \end{figure}
%--------------------------------------------------------------------------------------- % QR CODE (optional) %---------------------------------------------------------------------------------------- %\vspace{-136pt} %\hspace{0.75\linewidth} %\includegraphics[width=103pt]{qrcode} %\normalsize %\vspace{88pt}
%--------------------------------------------------------------------------------------- % META SECTION %---------------------------------------------------------------------------------------- \vspace{-114pt}
\metasection{Telefono:}{1111} \metasection{Fields:}{Chacarita Buenos Aires} \metasection{Prefers:}{Soltero} \metasection{Activities:}{00 00 000}
%--------------------------------------------------------------------------------------- % SUMMARAY (optional) %----------------------------------------------------------------------------------------
%\cvsection{Summary}\ %Digital media graduate with four years project experience in the field of technology based assessment. Specialized in development of test-scenario engines and innovative, rich media item formats. Master studies focused on teams from different disciplines and cultural backgrounds on solutions for complex problems. Prior knowledge has been collected in he field of usability / accessibility during bachelor studies.\
%============================================================================% % % CV SECTIONS AND EVENTS (MAIN CONTENT) % %============================================================================%
%--------------------------------------------------------------------------------------- % EXPERIENCE %---------------------------------------------------------------------------------------- \cvsection{Experiencia}
% \cvevent{2013 / 011} {Community Manager}{Consol S.A}{Realize projects in XPages and We4IT Aveedo, monitor project status, conduct reports}{Implement the frontend for a BPMN compatible engine within We4IT Aveedo}
% \cvevent{2012 / 2013}{Poster Presentation}{Consol S.A}{Co-published poster with paper on usability guidelines for tests with functional illiterates}{Presented results to conference audience at conference event}
%--------------------------------------------------------------------------------------- % EDUCATION SECTION %-------------------------------------------------------------------------------------- \cvsection{Educacion}
\cvevent{2015 / 07}{ESCUELA DE EDUCACION MEDIA H ARIAS DE SAAVEDRA}{Bachiller}{Master Thesis: Semi Automated Scoring in Technology Based Assessment}{Developed and evaluated an algorithm for semi automated scoring of spreadsheet data}
% \cvevent{2012 - 2013}{Primaria}{Colegio de La Salle}{Co-Invented a touch table application for medical support, co-developed software (Java) }{Formed a scrum team, mainted project dev server (Debian), surveyed target audience}
%--------------------------------------------------------------------------------------- % EDUCATION SECTION %-------------------------------------------------------------------------------------- \cvsection{Idiomas}
\cvevent{2012 - 2015}{Ingles}{Avanzado}{Inter-cultural classes in English, covering special topics in computer science and design}{Professionalized in research methods, software development and e-assessment}
% \cvevent{2009 - 2010}{Portugues}{Basico}
%------------------------------------------------------------------------------------------------- % ARTIFICIAL FOOTER (fancy footer cannot exceed linewidth) %--------------------------------------------------------------------------------------------------
\null \vspace*{\fill} \hspace{-0.25\linewidth}\colorbox{bgcol}{\makebox[1.5\linewidth][c]{\mystrut \small \textcolor{white}{} $\cdot$ \textcolor{white}{}}}
%============================================================================% % % % % DOCUMENT END % % % %============================================================================% \end{document}
submitted by LordBlakeTheGreat to LaTeX [link] [comments]

2013.07.22 22:51 MariotteBoyle Gabriela Michetti en acción: si los matrimonios gays quieren adoptar, que sean los niños más hechos pelota y que no quiere nadie, viejo

Esto pasó hace no mucho, noviembre de 2012, y como vi sus fotos de campaña me acordé.
-¿Y si viene Alex Freyre, y te dice: "Gabriela, con mi pareja queremos adoptar"?
-Es un tema que me inquieta no lo tengo definido. Si me ponés en la situación de un niño que esté en condiciones de abandono y en situación de una vida que va a ser muy dolorosa y muy triste y nadie lo quiere adoptar, pero hay una pareja de homosexuales que lo quiere adoptar... Y bueno, que lo adopte. Hay que pensar en la discriminación que puede sufrir un chico. Yo pido que las miremos y con data después decidamos.
Dónde aprendió esta forma de pensamiento político, mirando Disney, producciones de Cris Morena, no sé.
Después se disculpó. "Rezó mucho", que Dios le abrió el corazón (como siempre! según ella, siempre se lo abre). Tal vez tendría que haberse puesto a hacer algo más provechoso que rezar.
La verdad es que esto muestra lo mamarracho que es y la pinta de cuerpo entero como alguien que realmente tiene una bochornosa formación política, que no entiende los temas que hacen a la construcción de una sociedad más madura y justa.
Quiero decir, la solución a la que llega parece la de alguien que nunca se planteó seriamente la cuestión. Parece la respuesta que puede dar una persona muy joven sobre el tema luego de haber sido bombardeada con comentarios discriminatorios con respecto a los homosexuales. No puede ser la respuesta de una ex-funcionaria y candidata a legisladora.
EDIT: más aún
Alex Freyre consideró que “Michetti con estos dichos no hace más que discriminar a nuestros hijos porque nosotros ya podíamos adoptar siendo solteros y el matrimonio vino a ampliar esos derechos para que nuestros hijos tuvieran una obra social o para que pudieran heredar en caso de perder a uno de los papás”.
Entonces no solo plantea un pensamiento reaccionario sino que también demuestra una gran ignorancia sobre la cuestión.
A su vez es también perverso cómo estos dichos Pro siempre le hablan muy directamente a esa parte de la población que todavía tiene enraigadados en sí pensamientos antidemocráticos de derecha. Lo hacen apropósito, dicen alguna barbaridad, después se disculpan o se desdicen o lo niegan o lo dejan picando, pero no les importa, porque total "el mensaje llegó".
submitted by MariotteBoyle to argentina [link] [comments]