|
6732
|
Sistemas Operativos / Windows / Re: Procesos y subprocesos windows 8
|
en: 4 Octubre 2014, 22:17 pm
|
por cierto
¿te parece mucho que mi sistema coja un 30%-45% de memoria ram? Es que, sinceramente, haces una pregunta sobre tu PC sin dar información de tu PC. ¿como pretendes que te digamos si el consumo es mucho o poco si no especificas cuanta ram tienes instalada (eso, como mínimo)?, o el navegador que utilizas para ver videos de youtube, ya que por ejemplo el Firefox consume mucha, muchíiiiisima Ram cuando el plugincontainer entrá en acción, en fin, detalles que ayuden a diagnosticar un posible problema en tu PC, porque es absurdo decirte si lo considero mucho o poco consumo sin conocer esos y otros detalles, como los procesos que tienes en ejecución. De todas formas en el administrador de tareas puedes hacerte una idea de lo que consume cada proceso, y con cualquier buen profiler puedes realizar un análisis/diagnostico de cualquier proceso para averiguar la RAM (la real) que está consumiendo proceso por proceso en cada momento, para averiguar posibles fugas de memoria en las aplicaciones. Como profiler te recomendaría el de Telerik (JustTrace) pero creo que solo soporta aplicaciónes .NET, y el de JetBrains (dotMemory) también, así que no se decirte un profiler de uso general xD. Saludos!
|
|
|
6733
|
Programación / .NET (C#, VB.NET, ASP) / Re: ¿Alternativa al atributo RangeAttribute de ASP.NET?
|
en: 4 Octubre 2014, 20:31 pm
|
Vaya, me alegra verte por aqui de nuevo NovLucker, y muchas gracias por la documentación, aunque no he sacado practicamente nada en claro. Mi intención es transformar esto: Public Class MyType ''' <summary> ''' Gets or sets the value. ''' </summary> ''' <value>The value.</value> Public Property MyProperty As Integer Get Return Me._MyValue End Get Set(ByVal value As Integer) If value < Me._MyValueMin Then If Me._MyValueThrowRangeException Then Throw New ArgumentOutOfRangeException("MyValue", Me._MyValueExceptionMessage) End If Me._MyValue = Me._MyValueMin ElseIf value > Me._MyValueMax Then If Me._MyValueThrowRangeException Then Throw New ArgumentOutOfRangeException("MyValue", Me._MyValueExceptionMessage) End If Me._MyValue = Me._MyValueMax Else Me._MyValue = value End If End Set End Property Private _MyValue As Integer = 0I Private _MyValueMin As Integer = 0I Private _MyValueMax As Integer = 10I Private _MyValueThrowRangeException As Boolean = True Private _MyValueExceptionMessage As String = String.Format("The valid range is beetwen {0} and {1}", Me._MyValueMin, Me._MyValueMax) End Class
En algo más simplificado, y sobre todo rehusable, como esto: Public NotInheritable Class MyType ''' <summary> ''' Gets or sets the value. ''' Valid range is between 0 and 10. ''' </summary> ''' <value>The value.</value> <RangeAttribute(0, 10, ThrowRangeException:=False, ExceptionMessage:="")> Public Property MyProperty As Integer End Class
Pero no soy capaz de descubrir o entender como puedo hookear el getter/setter, apenas tengo información sobre ello, de todas formas intenté empezar a hacerlo y esto es lo que tengo, un código que no sirve para nada, porque no estoy evaluando nada, pero al menos sirve como idea inicial: <AttributeUsage(AttributeTargets.Property, AllowMultiple:=False)> Public Class RangeAttribute : Inherits Attribute ''' <summary> ''' Indicates the Minimum range value. ''' </summary> Public Minimum As Single ''' <summary> ''' Indicates the Maximum range value. ''' </summary> Public Maximum As Single ''' <summary> ''' Determines whether to throw an exception when the value is not in range. ''' </summary> Public ThrowRangeException As Boolean ''' <summary> ''' Indicates the exception message to show when the value is not in range. ''' </summary> Public ExceptionMessage As String ''' <summary> ''' Initializes a new instance of the <see cref="RangeAttribute"/> class. ''' </summary> ''' <param name="Minimum">The minimum range value.</param> ''' <param name="Maximum">The maximum range value.</param> Public Sub New(ByVal Minimum As Single, ByVal Maximum As Single) Me.New(Minimum, Maximum, ThrowRangeException:=False, ExceptionMessage:=String.Empty) End Sub ''' <summary> ''' Initializes a new instance of the <see cref="RangeAttribute"/> class. ''' </summary> ''' <param name="Minimum">The minimum range value.</param> ''' <param name="Maximum">The maximum range value.</param> ''' <param name="ThrowRangeException"> ''' Determines whether to throw an exception when the value is not in range. ''' </param> Public Sub New(ByVal Minimum As Single, ByVal Maximum As Single, ByVal ThrowRangeException As Boolean, Optional ByVal ExceptionMessage As String = "") Me.Minimum = Minimum Me.Maximum = Maximum Me.ThrowRangeException = ThrowRangeException If Not String.IsNullOrEmpty(ExceptionMessage) Then Me.ExceptionMessage = ExceptionMessage Else Me.ExceptionMessage = String.Format("The valid range is beetwen {0} and {1}", Minimum, Maximum) End If End Sub End Class
Cualquier información adicional se agradece. Un saludo!
|
|
|
6734
|
Sistemas Operativos / Windows / Re: Procesos y subprocesos windows 8
|
en: 4 Octubre 2014, 20:11 pm
|
Otra cosa, existe alguna forma de quitar las aplicaciones de Windows 8? es decir cuando inicias windows 8 sale un fondo azul con muchas aplicaciones, tiene el skype,el excel etc etc..
¿Alguna manera de quitar todo eso? Por supuesto, se puede  , ese es el tipo de limpieza que te dije que deberías hacer una vez instalado windows 8/8.1. ⇲Guía de personalización de imágenes de implementación de Windows (WIM) (Parte 5)Nota: El tutorial está orientado para eliminar características ANTES de instalar Windows, pero la manera de hacerlo después de la instalación es la misma, y también sirve para eliminar las WindowsApps. Saludos!
|
|
|
6736
|
Programación / .NET (C#, VB.NET, ASP) / Re: ayuda con visual basic URGENTE!!
|
en: 3 Octubre 2014, 22:59 pm
|
Además de lo comentado por el compañero @ El Benjo: 1) los códigos deben ir en dentro de su respectiva etiqueta, debes respetar las normas del foro. 2) Los títulos deben ser descriptivos, está pohibido los títulos de tipo " Ayuda urgente" 3) Las dudas de VisualBasic.Net se deben publicar en la sección de programación .Net En serio, ¿te parece correcto postear de la forma que lo has echo?, no suelo cerrar un post porque alguien se salte alguna norma, pero este post lo tiene todo, podrías haber editado un poco el formato de tu publicación para que se pueda leer y entender, como mínimo.
En los ejercicios te están explicando paso a paso lo que debes hacer, como hacerlo, y el código para hacerlo, literalmente te muestran las instrucciones que debes añadir al código, ¿que es lo que no entiendes?. Además, donde realmente podrías requerir ayuda de algún tipo has escrito las frases cortadas, y no se entiende nada: l. l.Mejore los siguientes aspectos:
iii. En las cajas de texto para notas sólo se deben permitir
vi. Implemente, en la clase alumno, un procedimiento que
ii.Todos los datos son obligatorios. No pueden haber datos en Te invito a que publiques un nuevo post con el formato correcto, y para formular una duda concreta y específica o también para pedir orientación, ya que como han dicho aquí no le hacemos el trabajo sucio a nadie, te ayudamos y te indicamos los pasos a seguir para que puedas hacerlo por ti mismo. Tema CerradoSaludos!
|
|
|
6737
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets)
|
en: 3 Octubre 2014, 03:11 am
|
Como implementar en menos de 5 segundos: un ComboBox para cambiar la prioridad del proceso actual. Nota: Se puede hacer de manera más directa sin asignar los nombres, pero entonces perderiamos el orden de prioridad de menor a mayor. Public Class PriorityList_TestForm ''' <summary> ''' Contains the process priority items. ''' </summary> Private ReadOnly PriorityList As String() = { ProcessPriorityClass.Idle.ToString, ProcessPriorityClass.BelowNormal.ToString, ProcessPriorityClass.Normal.ToString, ProcessPriorityClass.AboveNormal.ToString, ProcessPriorityClass.High.ToString, ProcessPriorityClass.RealTime.ToString } ''' <summary> ''' Handles the Load event of the PriorityList_TestForm Form. ''' </summary> Private Shadows Sub Load() Handles MyBase.Load ' Add the priority items to list. Me.ComboBox1.Items.AddRange(Me.PriorityList) End Sub ''' <summary> ''' Handles the SelectedIndexChanged event of the ComboBox1 control. ''' </summary> ''' <param name="sender">The source of the event.</param> ''' <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) _ Handles ComboBox1.SelectedIndexChanged ' Change thecurrent process priority. Process.GetCurrentProcess.PriorityClass = [Enum].Parse(GetType(ProcessPriorityClass), DirectCast(sender, ComboBox).Text, ignoreCase:=True) End Sub End Class
Lo mismo, pero usando Telerik: Imports Telerik.WinControls.UI Imports Telerik.WinControls.UI.Data Public Class PriorityList_RadTestForm ''' <summary> ''' Contains the process priority items. ''' </summary> Private ReadOnly PriorityList As New List(Of RadListDataItem) From { New RadListDataItem With { .Text = ProcessPriorityClass.Idle.ToString, .Value = ProcessPriorityClass.Idle }, New RadListDataItem With { .Text = ProcessPriorityClass.BelowNormal.ToString, .Value = ProcessPriorityClass.BelowNormal }, New RadListDataItem With { .Text = ProcessPriorityClass.Normal.ToString, .Value = ProcessPriorityClass.Normal }, New RadListDataItem With { .Text = ProcessPriorityClass.AboveNormal.ToString, .Value = ProcessPriorityClass.AboveNormal }, New RadListDataItem With { .Text = ProcessPriorityClass.High.ToString, .Value = ProcessPriorityClass.High }, New RadListDataItem With { .Text = ProcessPriorityClass.RealTime.ToString, .Value = ProcessPriorityClass.RealTime } } ''' <summary> ''' Handles the Initialized event of the RadDropDownList1 control. ''' </summary> ''' <param name="sender">The source of the event.</param> ''' <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> Private Sub RadDropDownList1_Initialized(ByVal sender As Object, ByVal e As EventArgs) _ Handles RadDropDownList1.Initialized ' Add the priority items to list. DirectCast(sender, RadDropDownList).Items.AddRange(PriorityList) End Sub ''' <summary> ''' Handles the SelectedIndexChanged event of the RadDropDownList1 control. ''' </summary> ''' <param name="sender">The source of the event.</param> ''' <param name="e">The <see cref="Telerik.WinControls.UI.Data.PositionChangedEventArgs"/> instance containing the event data.</param> Private Sub RadDropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As PositionChangedEventArgs) _ Handles RadDropDownList1.SelectedIndexChanged ' Change thecurrent process priority. Process.GetCurrentProcess.PriorityClass = DirectCast(DirectCast(sender, RadDropDownList).SelectedItem.Value, ProcessPriorityClass) End Sub End Class
|
|
|
6738
|
Sistemas Operativos / Windows / Re: CAMBIAR POSICION EN INICIO DEL PROGRAMA
|
en: 3 Octubre 2014, 01:58 am
|
1.- El codigo que dices que me has enviado ¿es en VB.NET o en VB6? Está escrito en el lenguaje VisualBasic.Net 2.- Y no he recibido nada. Mi direccion de correo es: Por "enviar" quisé decir "mostrar", en mi último comentario de arriba te puse un enlace actualizado a mediafire para que descargues el source y la aplicación xD (recuerda, carpeta bin\debug) Saludos y de nada!
|
|
|
6739
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets)
|
en: 3 Octubre 2014, 01:48 am
|
Como obtener la ruta completa de los directorios de la barra de dirección de cada instancia de Windows Explorer (explorer.exe) ' ( By Elektro ) ' ' Instructions: ' 1. Add a reference to 'Microsoft Shell Controls and Automation' ' ' Usage Examples: ' Dim paths As List(Of String) = GetWindowsExplorerPaths() ' ''' <summary> ''' Gets the full-path in the adressbar of each Windows Explorer instance. ''' MSDN Shell Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/bb776890%28v=vs.85%29.aspx ''' </summary> ''' <returns>A list containing the paths.</returns> Friend Shared Function GetWindowsExplorerPaths() As List(Of String) Dim exShell As New Shell32.Shell Dim path As String Dim pathList As New List(Of String) For Each Window As SHDocVw.ShellBrowserWindow In DirectCast(exShell.Windows, SHDocVw.IShellWindows) folder = DirectCast (Window. Document, Shell32. ShellFolderView). Folder path = DirectCast (folder, Shell32. Folder2). Self. Path pathList.Add(path) Next Window Return pathList End Function
PD: Lo mismo quizás se pueda llevar a cabo con la librería WindowsAPICodePack de Microsoft, le echaré un ojo...
|
|
|
6740
|
Foros Generales / Foro Libre / Re: ¿Vais a participar en el EHN-Dev 2014?
|
en: 3 Octubre 2014, 01:23 am
|
El plazo de entrega comenzará el día 20 de Septiembre de 2014 y terminará el día 20 de Octubre de 2014, horario Español. ¿A que estais esperando?, ¿lo estais dejando para el final?, ¡quiero veros participar! Recordad que en el concurso hay premios por gentileza de el-brujo, aunque la finalidad no es competir, pero el premio puede ser una buena motivación, ¿no?  . Saludos!
|
|
|
|
|
|
|