Programación

Preguntas y respuestas para programadores profesionales y entusiastas.





15
Python mysqldb: Biblioteca no cargada: libmysqlclient.18.dylib
Acabo de compilar e instalar mysqldb para python 2.7 en mi mac os 10.6. Creé un archivo de prueba simple que importa import MySQLdb as mysql En primer lugar, este comando está subrayado en rojo y la información me dice "Importación no resuelta". Luego intenté ejecutar el siguiente código simple …





11
No se puede instalar la gema - No se pudo construir la extensión nativa de la gema - no se puede cargar dicho archivo - mkmf (LoadError)
Ruby 1.9.3 La parte de Gemfile #............... gem "pony" gem "bcrypt-ruby", :require => "bcrypt" gem "nokogiri" #.................. Cuando intento instalar gemas, aparece un error alex@ubuntu:~/$ bundle Fetching gem metadata from http://rubygems.org/......... Fetching gem metadata from http://rubygems.org/.. Enter your password to install the bundled RubyGems to your system: #####............................................................ Installing bcrypt-ruby …

6
VIM: borrando de la posición actual hasta un espacio
A menudo, al desarrollar, me enfrento a un objeto anidado que me gustaría eliminar del código en el medio de una línea como esta: htmlDoc.WriteLine("<b><h3>" + this.cbAllSyncs.SelectedItem.ToString() + "</h3></b>"); La parte que me gustaría eliminar es: this.cbAllSyncs.SelectedItem.ToString() Sé que puedo contar la cantidad de palabras y puntos e ingresar 7dwpara …
172 vim 

15
AppSettings obtiene valor del archivo .config
No puedo acceder a los valores en el archivo de configuración. Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); var clientsFilePath = config.AppSettings.Settings["ClientsFilePath"].Value; // the second line gets a NullReferenceException archivo .config : <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <!-- ... --> <add key="ClientsFilePath" value="filepath"/> <!-- ... --> </appSettings> </configuration> ¿Tienes alguna sugerencia de …

14
cómo obtener una entrada de hashmap sin iterar
¿Existe una manera elegante de obtener solo uno Entry<K,V>de HashMap, sin iterar, si no se conoce la clave? Como el orden de entrada no es importante, ¿podemos decir algo como hashMapObject.get(zeroth_index); Aunque soy consciente de que no existe tal método get by index. Si intenté el enfoque mencionado a continuación, …
172 java  collections 


26
ASP.NET MVC: no hay un constructor sin parámetros definido para este objeto
Server Error in '/' Application. -------------------------------------------------------------------------------- No parameterless constructor defined for this object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: No parameterless constructor …

Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.