Development by Davis

Headlines

jueves, 29 de marzo de 2012

Development by Davis: “A billion thanks to the open source community from Red Hat” plus 7 more

Development by Davis: “A billion thanks to the open source community from Red Hat” plus 7 more


A billion thanks to the open source community from Red Hat

Posted: 29 Mar 2012 06:15 AM PDT

A billion thanks to the open source community from Red Hat

Sixteen years ago, few imagined that a handful of people at a Linux start-up in North Carolina were laying the groundwork for an open source business with more than a billion dollars in annual revenue. Yet as we stand at that milestone, and as we take the opportunity to reflect, we believe our success speaks volumes about the power of community.

This billion dollar milestone is not only a win for Red Hat—it is a victory for open source advocates everywhere. Our fight has always been about

read more


Visual Basic .NET – Carga de Nodos en TreeView a Demanda

Posted: 29 Mar 2012 05:24 AM PDT

Comentarios

En este proyecto voy a mostrar la forma, desde mi punto de vista, más elegante de realizar cargas de TreeView utilizando un modelo Maestro / Controlador que tomo como ejemplo Familia de Materiales y Materiales.

La aplicación está desarrollada en VS 2005 Framework 2.0 y accede a un Libro de Excel 8.0

Código

'''
''' Aplicación desarrollada por Antonio López Atienza (http://www.lopezatienza.es) Marzo 2012
''' El código contenido en este proyecto está tal cual sin garantías de ninguna clase.
''' Usted asume cualquier riesgo al poner en práctica, utilizar o ejecutar dicho Proyecto.
'''
'''
Public Class frmPrincipal

#Region "Variables Globales"

Dim vConn As New OleDb.OleDbConnection
Dim vCmd As New OleDb.OleDbCommand
Dim vDa As New OleDb.OleDbDataAdapter
Dim vDs As New DataSet

Dim vCargaMaestro As Boolean = True
Dim vNodoSeleccionado As New TreeNode
Dim cuenta As Integer = 100

#End Region

#Region "Manejadores de evenos del Formulario"

Private Sub frmPrincipal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Me.picCargando.Visible = True
Me.tvMain.Enabled = False
BackgroundWorker1.RunWorkerAsync()
Catch ex As Exception
MessageBox.Show("Excepción controlada: " & ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Private Sub tvMain_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvMain.AfterSelect
Try
vNodoSeleccionado = e.Node

''Comprobamos que no esté seleccionando un hijo
If vNodoSeleccionado.Parent Is Nothing Then
''Comprobamos que no se hayan cargado ya los hijos
If vNodoSeleccionado.Nodes.Count = 0 Then
' Abrir la conexión, y leer [Hoja 1] del archivo Excel
vCargaMaestro = False
Me.picCargando.Visible = True
Me.tvMain.Enabled = False
BackgroundWorker1.RunWorkerAsync()
End If
End If

Catch ex As Exception
'Aqui va el código que controle la excepción
Finally
vConn.Close()
End Try
End Sub

#End Region

#Region "Funciones del BackgroundWorker"

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Try
Dim i As Integer
If vCargaMaestro Then
CargarDatosMaestro()

cuenta = vDs.Tables("FamiliaMateriales").Rows.Count
For Each vFamilia As DataRow In vDs.Tables("FamiliaMateriales").Rows
Dim vNodoMain As New TreeNode
vNodoMain.Name = vFamilia.Item("IDFamilia")
vNodoMain.Text = vFamilia.Item("Nombre")
AddNode(vNodoMain)

Threading.Thread.Sleep(250)
BackgroundWorker1.ReportProgress(100 * i / cuenta, "Procesando (" & i & "/" & cuenta & ") elementos...")
i += 1
'Me.tvMain.Nodes.Add(vFamilia.Item("IDFamilia"), vFamilia.Item("Nombre"))
Next
Else
CargarDatosDetalle()

cuenta = vDs.Tables("Materiales").Rows.Count
For Each vFilaMaterial As DataRow In vDs.Tables("Materiales").Rows
Dim vNodoMain As New TreeNode
vNodoMain.Name = vFilaMaterial.Item("IDMaterial")
vNodoMain.Text = vFilaMaterial.Item("Nombre")
AddNode(vNodoMain)

Threading.Thread.Sleep(250)
BackgroundWorker1.ReportProgress(100 * i / cuenta, "Procesando (" & i & "/" & cuenta & ") elementos...")
i += 1
'vNodoSeleccionado.Nodes.Add(vFilaMaterial.Item("IDMaterial"), vFilaMaterial.Item("Nombre"))
Next
End If

BackgroundWorker1.ReportProgress(100, "Completado!")
e.Result = True
Catch ex As Exception
e.Result = False
End Try
End Sub

Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
Try
Me.picCargando.Visible = False
Me.tvMain.Enabled = True
Catch ex As Exception
'Me.btnIniciar.Enabled = True
MessageBox.Show("Excepción controlada: " & ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As System.Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged
Try
BarraDeProgreso.Value = e.ProgressPercentage
lblProgreso.Text = e.UserState
Catch ex As Exception
MessageBox.Show("Excepción controlada: " & ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

#End Region

#Region "Cargas de datos"

Function CargarDatosMaestro() As Boolean
Try
''Comprobar si el archivo existe
If System.IO.File.Exists(Application.StartupPath & "\Datos.xls") Then

vConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Datos.xls; Extended Properties= Excel 8.0;"

''Conectamos con el Libro Excel y accedemos a la Hoja [FamiliaMateriales$]
vConn.Open()
vCmd.CommandText = "SELECT * FROM [FamiliaMateriales$]"
vCmd.Connection = vConn
vDa.SelectCommand = vCmd

'Llenar el DataSet
vDa.Fill(vDs, "FamiliaMateriales")
Return True
Else
Return False
End If
Catch ex As Exception
'Aqui va el código que controle la excepción
Finally
vConn.Close()
End Try
End Function

Function CargarDatosDetalle() As Boolean
Try
''Comprobar si el archivo existe
If System.IO.File.Exists(Application.StartupPath & "\Datos.xls") Then
'Dimensionar los elementos necesarios para leer y cargar los datos

vConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Datos.xls; Extended Properties= Excel 8.0;"

''Conectamos con el Libro Excel y accedemos a la Hoja [FamiliaMateriales$]
vConn.Open()
vCmd.CommandText = "SELECT * FROM [Materiales$] WHERE IDFamiliaMaterial = '" & vNodoSeleccionado.Name & "'"
vCmd.Connection = vConn
vDa.SelectCommand = vCmd

If Not vDs.Tables("Materiales") Is Nothing Then
vDs.Tables("Materiales").Reset()
End If

'Llenar el DataSet
vDa.Fill(vDs, "Materiales")

Return True
Else
Return False
End If
Catch ex As Exception
'Aqui va el código que controle la excepción
Finally
vConn.Close()
End Try
End Function

#End Region

#Region "Sección Delegate"

Delegate Function AddNodeMainDelegate(ByVal pNodo As TreeNode) As Boolean

Private Function AddNode(ByVal pNodo As TreeNode) As Boolean
If Me.tvMain.InvokeRequired Then
tvMain.Invoke(New AddNodeMainDelegate(AddressOf AddNode), pNodo)
Else
Dim retVal As Boolean = True
Try
If vCargaMaestro Then
Me.tvMain.Nodes.Add(pNodo)
Else
vNodoSeleccionado.Nodes.Add(pNodo)
End If
Catch ex As Exception

End Try
Return retVal
End If
End Function

#End Region

End Class

Framework compatibles

Framework 2.0

Namespaces

System.IO
OleDb

Referencias de interés

---


SQL Server – Error 233

Posted: 03 Jan 2012 12:15 AM PST

Comentarios

En este artículo voy a tratar el típico error 233 de SQL Server cuando tratamos de conectarnos a un equipo en remoto.

La solución al  problema que abordo, que se trata de configurar la instancia SQL Server para aceptar conexiones remotas ocurre en un 95% de los casos, por lo que puede ser posible que aplicando estos cambios no se resuelva.

Consultar el error siguiente:

"El cliente no pudo establecer una conexión debido a un error durante el proceso de inicialización de la conexión previo al inicio de sesión. Entre las causas posibles se incluyen: el cliente intentó conectar con una versión no compatible de SQL Server; el servidor estaba demasiado ocupado apra aceptar nuevas conexiones; o bien, había una limitación de recuersos (memoria insuficiente o número máximo de conexiones permitidas) en el servidor. (provider: Proveedor de canalizaciones con nombre, error: 0 - No hay ningún proceso en el otro extremo de la canalización.) (Microsoft SQL Server, Error: 233)"

SQLServerError233%5B01%5D.png

Solución

Vamos a Inicio \ Todos los programas \ Microsoft SQL Server 2005 \ Configuration Tools \ SQL Server Surface Area Configuration.

SQLServerError233%5B02%5D.png

A continuación en la ventana que nos aparece vamos a Configuración de superficie para servicios y conexiones.

SQLServerError233%5B03%5D.PNG

Navegamos en el árbol de la izquierda a MSSQLSERVER \ Motor de base de datos \ Conexiones remotas

Marcamos la opción Conexiones locales y remotas y Usar sólo TCP/IP.

SQLServerError233%5B04%5D.png

Una vez Aceptemos este cambio, necesitamos reiniciar el servicio de SQL Server (MSSQLSERVER) accediendo en Incio \ Ejecutar \ services.msc

SQLServerError233%5B05%5D.png

Ya podremos conectarnos instancias de SQL Server en remoto.

Espero os sirva de ayuda.

Un saludo.


Infographic: The higher education bubble, Part one

Posted: 29 Mar 2012 04:30 AM PDT

The higher education bubble

We often talk about the higher education bubble and it being on the verge of bursting but what does that really look like? How does a "bubble" form and what causes it to burst? The following two part infographic does a great job explaining just that by showing where higher education has been, where we are, and without change where we will be. To me, it further highlights why open source technology and open source principles have such an important role in education reform from lowering costs to demonstrating a better way for educating our youth in the 21st century and beyond.

read more


AMD Named Components Vendor of the Year at PCR Awards 2012

Posted: 29 Mar 2012 12:00 AM PDT

AMD (NYSE: AMD) has been named UK Components Vendor of the year at the PCR Awards 2012. AMD won this honour, presented by PCR Magazine, for its channel strategy, channel partner engagement and overall channel partner programmes, including the AMD Fusion Partner programme.

The PCR Awards recognise the very best of the UK consumer channel,...


AMD Embedded G-Series APU Platform Adds Real-Time Operating System Support with INTEGRITY from Green Hills Software

Posted: 29 Mar 2012 12:00 AM PDT

AMD (NYSE: AMD) today announced a collaboration with Green Hills Software, the largest independent vendor of embedded software, that brings its industry-leading INTEGRITY real-time operatin...


Document Freedom Day: Promoting document freedom

Posted: 28 Mar 2012 07:46 AM PDT

Document Freedom Day

Today is Document Freedom Day. It's not the easiest subject to explain.

read more


Blackboard buys into open source

Posted: 28 Mar 2012 06:41 AM PDT

Blackboard Buys into Open Source

To be honest, I wasn't completely shocked that Blackboard stepped into the Moodle ring in a major way on Monday. If you've been following the developments in the learning management system market it makes perfect sense: there's a growing number of players, open source players are positioning themselves as the "zero cost to entry" providers, and now large publishers are joining the mix to better protect their content and maximize their ROI in textbooks and digital materials.

read more


No hay comentarios:

Publicar un comentario