|
9361
|
Informática / Software / Re: Configuracion de Google Chrome
|
en: 19 Marzo 2013, 13:02 pm
|
@OmarHack
Son Bots, esos usuarios son registros con nombres aleatórios y los mensajes se postean automáticamente del mismo modo, con scripts o software dedicado.
PD: Te lo comento para que no malgastes el tiempo hablándole a una máquina!
PD2: El spam dudo que séa ilegal en ningún país, prohibido sí (y sólo a criterio del Administrador de "X" página, no al criterio de ninguna ley), ilegal no. En España tenemos algo que se llama "Libertad de expresión", spam virtual, spam visual, spam oral, y spam táctil, en fín los tiempos de Franco quedaron atrás...
Saludos!
|
|
|
9362
|
Programación / .NET (C#, VB.NET, ASP) / Re: Compatibilidad de fuentes TrueType personalizadas...
|
en: 19 Marzo 2013, 11:18 am
|
Bueno, ya he encontrado la manera de hacerlo: Public Class Main Dim MyFont As New CustomFont(My.Resources.kakakaka) Private Sub Main_Disposed(sender As Object, e As System.EventArgs) Handles Me.Disposed MyFont.Dispose() End Sub Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles Me.Load Me.Label1.Font = New Font(MyFont.Font, 12.0!) End Sub End Class
Saludos!
|
|
|
9363
|
Programación / .NET (C#, VB.NET, ASP) / [TUTORIAL] Instalar controles de terceros en VS2012 desde la consola de Windows.
|
en: 19 Marzo 2013, 10:33 am
|
Hola! Desde que empecé a aprender VisualStudio siempre tuve interés por poder instalar controles de una manera automatizada, ya que suelo hacer mis própios instaladores personalizados, y mis tests con la IDE de VS en máquinas virtuales, y allí tengo que instalar cada control que necesito manuálmente... Actualmente hay varias (pocas) aplicaciones que nos ayudan a instalar controles de forma automática, el gran problema es que todas están desactualizadas para poder instalar un control en la versión 11 de VisualStudio (VS2012), hasta ahora... Un usuario al que le estoy muy agradecido ha renovado el source de un antiguo proyecto (TCI), es una utilidad CommandLine para poder instalar controles en cualquier versión de VS, y la verdad es que es magnifica, se instalan en pocos segundos. Aquí tienen el source: http://www.imagingshop.com/download/toolbox-integration.zipY aquí la utilidad compilada: http://elektrostudios.tk/DTE.zipInstrucciones de uso: DteToolboxInstaller.exe [install|uninstall] [vs2005|vs2008|vs2010|vs2012] [tab name] [assembly path] Por ejemplo, si quieren instalar el control "SampleControl.dll" que va incluido en el zip, en la ToolBar de VS2012, hay que usarlo de esta manera: DteToolboxInstaller.exe install vs2012 "Nombre del TAB" "SampleControl.dll" Artículo completo: http://www.componentowl.com/articles/visual-studio-toolbox-control-integration#integration-dteEspero que a muchos les sirva... Un saludo!
|
|
|
9365
|
Programación / .NET (C#, VB.NET, ASP) / [SOLUCIONADO] Calcular el tiempo restante
|
en: 18 Marzo 2013, 18:34 pm
|
Lo del tiempo transcurrido lo tengo manejado ya, pero para mostrar el tiempo restante me estoy haciendo un lío... Dim time_out as integer = 60000 ' 'Milisegundos Dim StartTime As DateTime ' Tiempo inicio Dim EndTime As DateTime ' Tiempo final Dim ElapsedTime As TimeSpan ' Tiempo transcurrido Dim RemainingTime As TimeSpan ' Tiempo restante
He conseguido mostrar el tiempo restante pero de una manera extraña, el problema es que, aparte de que los valores se muestran negativos, el valor de la hora y el minutero deberían ser "00"... ya que sólo estoy intentando medir el tiempo restante de una operación de "10000" MS (10 segs) Output: Este es el code que uso, ¿Como lo arreglo? #Region " Elapsed Time Function " Public Function Print_Elapsed_Time() If StartTime.ToString = "01/01/0001 0:00:00" Then StartTime = Now StartTime = StartTime.AddSeconds(-1) End If ElapsedTime = Now().Subtract(StartTime) Return String.Format("{0:00}:{1:00}:{2:00}", CInt(Math.Floor(ElapsedTime.TotalHours)) Mod 60, CInt(Math.Floor(ElapsedTime.TotalMinutes)) Mod 60, CInt(Math.Floor(ElapsedTime.TotalSeconds)) Mod 60) End Function #End Region #Region " Remaining Time Function " Public Function Print_Remaining_Time() If EndTime.ToString = "01/01/0001 0:00:00" Then EndTime = Now EndTime = EndTime.AddMilliseconds(Time_Out - 1000) End If RemainingTime = Now().Subtract(EndTime) Return String.Format("{0:00}:{1:00}:{2:00}", CInt(Math.Floor(RemainingTime.TotalHours)) Mod 60, CInt(Math.Floor(RemainingTime.TotalMinutes)) Mod 60, CInt(Math.Floor(RemainingTime.TotalSeconds)) Mod 60) End Function #End Region
|
|
|
9368
|
Programación / .NET (C#, VB.NET, ASP) / [SOLUCIONADO] Ayuda con esta excepción! (my.settings)
|
en: 18 Marzo 2013, 14:00 pm
|
Tengo un problema con el namespace My.Settings cuando intento modificar un valor y guardar las settings (Me sucede con cualquier propiedad...): Private Sub Button1_Click(Sender As Object, e As MouseEventArgs) Handles Button1.Click My.Settings.Remember_Settings = True My.Settings.Save() End Sub
Me salta este error: Esta es la excepción: System.Configuration.ConfigurationErrorsException was unhandled BareMessage=Configuration system failed to initialize HResult=-2146232062 Line=0 Message=Configuration system failed to initialize Source=System.Configuration StackTrace: at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e) at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(String configPath, BaseConfigurationRecord configRecord) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at System.Configuration.ConfigurationManager.GetSection(String sectionName) at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped) at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties) at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider) at System.Configuration.SettingsBase.SetPropertyValueByName(String propertyName, Object propertyValue) at System.Configuration.SettingsBase.set_Item(String propertyName, Object value) at System.Configuration.ApplicationSettingsBase.set_Item(String propertyName, Object value) at Volium.My.MySettings.set_Remember_Settings(Boolean value) in C:\Projects\Volium\Volium\My Project\Settings.Designer.vb:line 137 at Volium.Form1.CheckBox_Remember_Settings_CheckedChanged(Object sender, EventArgs e) in C:\Projects\Volium\Volium\Form1.vb:line 96 at System.Windows.Forms.CheckBox.set_CheckState(CheckState value) at System.Windows.Forms.CheckBox.OnClick(EventArgs e) at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at Volium.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Configuration.ConfigurationErrorsException BareMessage=Unrecognized configuration section userSettings/WindowsApplication1.My.MySettings. Filename=C:\Users\Administrador\AppData\Local\Microsoft\Volium.vshost.exe_Url_irr03xswjdrhsokru05hku4eejmnb511\1.0.0.0\user.config HResult=-2146232062 Line=4 Message=Unrecognized configuration section userSettings/WindowsApplication1.My.MySettings. (C:\Users\Administrador\AppData\Local\Microsoft\Volium.vshost.exe_Url_irr03xswjdrhsokru05hku4eejmnb511\1.0.0.0\user.config line 4) Source=System.Configuration StackTrace: at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e) InnerException:
|
|
|
9369
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 18 Marzo 2013, 11:26 am
|
· String a hexadecimal: #Region " String To Hex Function " ' [ String To Hex Function ] ' ' Examples : ' Dim Hex_str As String = String_To_Hex("Elektro H@cker") Private Function String_To_Hex(ByVal Source_String As String) As String Dim Hex_StringBuilder As New System.Text.StringBuilder() For Each c As Char In Source_String : Hex_StringBuilder.Append(Asc(c).ToString("x2")) : Next c Return Hex_StringBuilder.ToString() End Function #End Region
· Hexadecimal a string: #Region " Hex To String Function " ' [ Hex To String Function ] ' ' Examples : ' Dim str As String = Hex_To_String("456c656b74726f204840636b6572")) Private Function Hex_To_String(ByVal Source_String As String) As String Dim Hex_StringBuilder As New System.Text.StringBuilder() For x As Integer = 0 To Source_String.Length - 1 Step 2 : Hex_StringBuilder.Append(Chr(Val("&H" & Source_String.Substring(x, 2)))) : Next x Return Hex_StringBuilder.ToString() End Function #End Region
· Effecto Matrix (Aplicación de consola) Module Module1 Sub Main() Console.Title = "Matrix Effect" Console.ForegroundColor = ConsoleColor.DarkGreen Console.WindowLeft = InlineAssignHelper(0, 0) Console.WindowHeight = InlineAssignHelper(Console.BufferHeight, Console.LargestWindowHeight) Console.WindowWidth = InlineAssignHelper(Console.BufferWidth, Console.LargestWindowWidth) Console.CursorVisible = False Dim width As Integer, height As Integer Dim y As Integer() Dim l As Integer() Initialize(width, height, y, l) Dim ms As Integer While True Dim t1 As DateTime = DateTime.Now MatrixStep(width, height, y, l) ms = 10 - CInt(Math.Truncate(CType(DateTime.Now - t1, TimeSpan).TotalMilliseconds)) If ms > 0 Then System.Threading.Thread.Sleep(ms) End If If Console.KeyAvailable Then If Console.ReadKey().Key = ConsoleKey.F5 Then Initialize(width, height, y, l) End If End If End While End Sub Dim thistime As Boolean = False Private Sub MatrixStep(ByVal width As Integer, ByVal height As Integer, ByVal y As Integer(), ByVal l As Integer()) Dim x As Integer thistime = Not thistime For x = 0 To width - 1 If x Mod 11 = 10 Then If Not thistime Then Continue For End If Console.ForegroundColor = ConsoleColor.White Else Console.ForegroundColor = ConsoleColor.DarkGreen Console.SetCursorPosition(x, inBoxY(y(x) - 2 - ((l(x) \ 40) * 2), height)) Console.Write(R) Console.ForegroundColor = ConsoleColor.Green End If Console.SetCursorPosition(x, y(x)) Console.Write(R) y(x) = inBoxY(y(x) + 1, height) Console.SetCursorPosition(x, inBoxY(y(x) - l(x), height)) Console.Write(" "c) Next End Sub Private Sub Initialize(ByRef width As Integer, ByRef height As Integer, ByRef y As Integer(), ByRef l As Integer()) Dim h1 As Integer Dim h2 As Integer = (InlineAssignHelper(h1, (InlineAssignHelper(height, Console.WindowHeight)) \ 2)) \ 2 width = Console.WindowWidth - 1 y = New Integer(width - 1) {} l = New Integer(width - 1) {} Dim x As Integer Console.Clear() For x = 0 To width - 1 y(x) = m_r.[Next](height) l(x) = m_r.[Next](h2 * (If((x Mod 11 <> 10), 2, 1)), h1 * (If((x Mod 11 <> 10), 2, 1))) Next End Sub Dim m_r As New Random() Private ReadOnly Property R() As Char Get Dim t As Integer = m_r.[Next](10) If t <= 2 Then Return ChrW(CInt(AscW("0"c)) + m_r.[Next](10)) ElseIf t <= 4 Then Return ChrW(CInt(AscW("a"c)) + m_r.[Next](27)) ElseIf t <= 6 Then Return ChrW(CInt(AscW("A"c) + m_r.[Next](27))) Else Return ChrW(m_r.[Next](32, 255)) End If End Get End Property Public Function inBoxY(ByVal n As Integer, ByVal height As Integer) As Integer n = n Mod height If n < 0 Then Return n + height Else Return n End If End Function Private Function InlineAssignHelper(Of T)(ByRef target As T, ByVal value As T) As T target = value Return value End Function End Module
|
|
|
|
|
|
|