Search Results

Search found 1429 results on 58 pages for 'el 2002'.

Page 9/58 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Force apt to remove all emacs*

    - by wishi
    Hi! I have a bug-problem with the apt-packages of emacs: >>Error occurred processing debian-ispell.el: File error (("Opening input file" "no such file or directory" "/usr/share/emacs23/site-lisp/dictionaries-common/debian-ispell.el")) >>Error occurred processing ispell.el: File error (("Opening input file" "no such file or directory" "/usr/share/emacs23/site-lisp/dictionaries-common/ispell.el")) >>Error occurred processing flyspell.el: File error (("Opening input file" "no such file or directory" "/usr/share/emacs23/site-lisp/dictionaries-common/flyspell.el")) emacs-install: /usr/lib/emacsen-common/packages/install/dictionaries-common emacs23 failed at /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 30. dpkg: error processing emacs23-lucid (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of emacs: emacs depends on emacs23 | emacs23-lucid | emacs23-nox; however: Package emacs23 is not installed. Package emacs23-lucid which provides emacs23 is not configured yet. Package emacs23-nox which provides emacs23 is not installed. Package emacs23-lucid is not configured yet. Package emacs23-nox is not installed. dpkg: error processing emacs (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: emacs23-lucid emacs E: Sub-process /usr/bin/dpkg returned an error code (1) In fact I would be satisfied with just emacs23-nox, a couple of plugins - from apt. But I can neither --purge nor --purge reinstall, nor remove the packages. It always processes until this certain bug. I did some google-searching, found some stuff on Launchpad suggesting: sudo apt-get install --reinstall --purge emacsen-common But this is the same... so I hope there a way to tell app to just remove everything releated to emacs, and to start from scratch again? Thanks, Marius

    Read the article

  • Google Top Geek E04

    Google Top Geek E04 In Spanish! Google Top Geek is a weekly show from Google Mexico. This week: 1. Esto es Google, el evento más grande e importante de Google en México, en su segunda edición, se llevó a cabo los días 13 y 14 de noviembre de 2012. Fue un gran evento dirigido a todo el ecosistema en México: desarrolladores, usuarios y negocios. Cerca de 3000 asistentes nos honraron con su presencia en Esto es Google a lo largo de dos intensos días, llenos de conferencias, paneles y espacios para conocer y acercarse a tecnología y startups. Mencionamos durante este segmento, ligas para aprender más de la importancia del mercado de móviles en México y el mundo: Go Mobile, para pasar tu sitio actual a una versión para móviles. The Mobile Playbook, con mucha información para tomar las mejores decisiones con respecto a móviles y tecnologías modernas. 2. De concursos de programación, de negocios hasta internships y trabajo de tiempo completo, Google ofrece una amplia gama de oportunidades en todo el mundo. por ejemplo, está por iniciar el concurso Google Code-in 2012, para chavos de preparatoria, con un formato similar al de Google summer of code, con 10 organizaciones de código abierto como mentoras. 3. Lanzamientos de la semana, el primero interesante para Gmail: búsquedas por tamaño, utilizando size:5m, larger: .., fechas flexibles, etc. En Google Drive ya puedes buscar por persona, no sólo los que han compartido contigo; sino los que involucran a una misma persona. Búsquedas de la semana Las <b>...</b> From: GoogleDevelopers Views: 15 2 ratings Time: 15:50 More in Science & Technology

    Read the article

  • Descubre en una mañana todo lo que Oracle puede hacer por ti

    - by Noelia Gomez
    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} En la actualidad, la tecnología está cambiando el mundo de una forma sin precedentes. La convergencia de novedades como la informática en la nube, los dispositivos móviles, las redes sociales, el Big Data y el «Internet de las cosas» está impulsando la innovación y revolucionando los antiguos modelos de negocio. ¿Cómo lograrán las empresas adaptarse a los cambios con rapidez sin poner en peligro el funcionamiento de la actividad comercial? Oracle siempre se ha puesto este reto y por ello queremos presentar en exclusiva para nuestros clientes las mayores novedades de nuestra gama de soluciones, el próximo 5 de Noviembre en el Oracle Day. En la parte de aplicaciones hablaremos de la oportunidad significativa de conseguir una posición de liderazgo en CX, ya que ofrecer una experiencia excelente está directamente vinculado con un aumento de las ventas. Cuanto más relevante y constante sea la experiencia de sus clientes, más probable es que compren. Disfrute de una experiencia única en este evento interactivo, donde podrá participar en debates con directivos de Oracle, ver vídeos y conocer experiencias de clientes, ampliar su red de contactos, asistir a demostraciones prácticas de productos, y un largo etcétera. Para más información acceda aquí. Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-family:"Calibri","sans-serif"; mso-ascii- mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi- mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    Read the article

  • ALPS touchpad stops working after reboot

    - by user58289
    I recently upgraded to 12.04 LTS. My Compaq Presario CQ-40 324la touchpad worked after first restarting after installation. But after restarting a second time, the touchpad is completely disabled, without having changed anything in the system. I've tried solutions but haven't had good results. The applications I've installed (fro "solutions" are: Pointing Devices Synaptiks Dconf-Tools I've also tried updating GRUB, adding this line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nomux") I tried these commands in a terminal. Neither has worked. sudo modprobe -r psmouse sudo modprobe psmouse proto=imps El Touchpad ALPS se desactiva al reiniciar Recién he actualizado a Ubuntu 12.04LTS y a mi parecer ha mejorado mucho con respecto a 11.10... Pero ese no es mi punto ahora. El Touchpad funcionó correctamente luego del primer reinicio después de la instalación. Pero luego de volver a reiniciar, el Touchpad queda totalmente deshabilitado sin haber hecho cambio alguno en el sistema. He probado las soluciones en su mayoría y no he tenido buenos resultados. Las aplicaciones que he instalado (de las "soluciones") son: -Dispositivos apuntadores. -Synaptiks -DConf-Tools Y he intentado también actualizando el grub (añadiéndole una linea así: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nomux") Intenté en la terminal con el comando: sudo modprobe -r psmouse sudo modprobe psmouse proto=imps Ninguno me ha resultado bien. La laptop es Compaq Presario CQ-40 324la

    Read the article

  • Why doesn't my implementation of El Gamal work for long text strings?

    - by angstrom91
    I'm playing with the El Gamal cryptosystem, and my goal is to be able to encipher and decipher long sequences of text. I have come up with a method that works for short sequences, but does not work for long sequences, and I cannot figure out why. El Gamal requires the plaintext to be an integer. I have turned my string into a byte[] using the .getBytes() method for Strings, and then created a BigInteger out of the byte[]. After encryption/decryption, I turn the BigInteger into a byte[] using the .toByteArray() method for BigIntegers, and then create a new String object from the byte[]. This works perfectly when i call ElGamalEncipher with strings up to 129 characters. With 130 or more characters, the output produced is garbled. Can someone suggest how to solve this issue? Is this an issue with my method of turning the string into a BigInteger? If so, is there a better way to turn my string of text into a BigInteger and back? Below is my encipher/decipher code with a program to demonstrate the problem. import java.math.BigInteger; public class Main { static BigInteger P = new BigInteger("15893293927989454301918026303382412" + "2586402937727056707057089173871237566896685250125642378268385842" + "6917261652781627945428519810052550093673226849059197769795219973" + "9423619267147615314847625134014485225178547696778149706043781174" + "2873134844164791938367765407368476144402513720666965545242487520" + "288928241768306844169"); static BigInteger G = new BigInteger("33234037774370419907086775226926852" + "1714093595439329931523707339920987838600777935381196897157489391" + "8360683761941170467795379762509619438720072694104701372808513985" + "2267495266642743136795903226571831274837537691982486936010899433" + "1742996138863988537349011363534657200181054004755211807985189183" + "22832092343085067869"); static BigInteger R = new BigInteger("72294619754760174015019300613282868" + "7219874058383991405961870844510501809885568825032608592198728334" + "7842806755320938980653857292210955880919036195738252708294945320" + "3969657021169134916999794791553544054426668823852291733234236693" + "4178738081619274342922698767296233937873073756955509269717272907" + "8566607940937442517"); static BigInteger A = new BigInteger("32189274574111378750865973746687106" + "3695160924347574569923113893643975328118502246784387874381928804" + "6865920942258286938666201264395694101012858796521485171319748255" + "4630425677084511454641229993833255506759834486100188932905136959" + "7287419551379203001848457730376230681693887924162381650252270090" + "28296990388507680954"); public static void main(String[] args) { FewChars(); System.out.println(); ManyChars(); } public static void FewChars() { //ElGamalEncipher(String plaintext, BigInteger p, BigInteger g, BigInteger r) BigInteger[] cipherText = ElGamal.ElGamalEncipher("This is a string " + "of 129 characters which works just fine . This is a string " + "of 129 characters which works just fine . This is a s", P, G, R); System.out.println("This is a string of 129 characters which works " + "just fine . This is a string of 129 characters which works " + "just fine . This is a s"); //ElGamalDecipher(BigInteger c, BigInteger d, BigInteger a, BigInteger p) String output = ElGamal.ElGamalDecipher(cipherText[0], cipherText[1], A, P); System.out.println("The decrypted text is: " + output); } public static void ManyChars() { //ElGamalEncipher(String plaintext, BigInteger p, BigInteger g, BigInteger r) BigInteger[] cipherText = ElGamal.ElGamalEncipher("This is a string " + "of 130 characters which doesn’t work! This is a string of " + "130 characters which doesn’t work! This is a string of ", P, G, R); System.out.println("This is a string of 130 characters which doesn’t " + "work! This is a string of 130 characters which doesn’t work!" + " This is a string of "); //ElGamalDecipher(BigInteger c, BigInteger d, BigInteger a, BigInteger p) String output = ElGamal.ElGamalDecipher(cipherText[0], cipherText[1], A, P); System.out.println("The decrypted text is: " + output); } } import java.math.BigInteger; import java.security.SecureRandom; public class ElGamal { public static BigInteger[] ElGamalEncipher(String plaintext, BigInteger p, BigInteger g, BigInteger r) { // returns a BigInteger[] cipherText // cipherText[0] is c // cipherText[1] is d SecureRandom sr = new SecureRandom(); BigInteger[] cipherText = new BigInteger[2]; BigInteger pText = new BigInteger(plaintext.getBytes()); // 1: select a random integer k such that 1 <= k <= p-2 BigInteger k = new BigInteger(p.bitLength() - 2, sr); // 2: Compute c = g^k(mod p) BigInteger c = g.modPow(k, p); // 3: Compute d= P*r^k = P(g^a)^k(mod p) BigInteger d = pText.multiply(r.modPow(k, p)).mod(p); // C =(c,d) is the ciphertext cipherText[0] = c; cipherText[1] = d; return cipherText; } public static String ElGamalDecipher(BigInteger c, BigInteger d, BigInteger a, BigInteger p) { //returns the plaintext enciphered as (c,d) // 1: use the private key a to compute the least non-negative residue // of an inverse of (c^a)' (mod p) BigInteger z = c.modPow(a, p).modInverse(p); BigInteger P = z.multiply(d).mod(p); byte[] plainTextArray = P.toByteArray(); return new String(plainTextArray); } }

    Read the article

  • elisp newbie question: Can't find 'filename' function definition in org.el?

    - by Dave Paroulek
    I really love org-mode in emacs and want to customize a few things. While reading thru org.el, I'm finding several references to filename but can't find filename using describe-function? I'm sure there's a simple answer, but I'm just learning elisp and it's not obvious. Any insight into where filename is defined? And/or if it's not a function, what is it? For example, filename on line 25502: (filename (if to-buffer (expand-file-name (concat (file-name-sans-extension (or (and subtree-p (org-entry-get (region-beginning) "EXPORT_FILE_NAME" t)) (file-name-nondirectory buffer-file-name))) "." html-extension) (file-name-as-directory (or pub-dir (org-export-directory :html opt-plist))))))

    Read the article

  • Slide Men&uacute; con Jquery &amp; Asp.net

    - by Jason Ulloa
    En este post, trabajaremos una parte que en ocasiones se nos hace un “mundo”, la creación de menús en nuestras aplicaciones web. Nuestro objetivo será evitar la utilización de elementos que puedan ocasionar que la página se vuelva un poco lenta, para ello utilizaremos jquery que viene siendo una herramienta muy semejante a ajax para crear nuestro menú. Para crear nuestro menús de ejemplo necesitaremos de tres elementos: 1. CSS, para aplicar los estilos. 2. Jquery para realizar las animaciones. 3. Imágenes para armar los menús. Nuestro primer Paso: Será agregar la referencias a nuestra página, para incluir los CSS y los Scripts. 1: <link rel="stylesheet" type="text/css" href="Styles/jquery.hrzAccordion.defaults.css" /> 2: <link rel="stylesheet" type="text/css" href="Styles/jquery.hrzAccordion.examples.css" /> 3: <script type="text/javascript" src="JS/jquery-1.3.2.js"></script> 1:  2: <script type="text/javascript" src="JS/jquery.easing.1.3.js"> 1: </script> 2: <script type="text/javascript" src="JS/jquery.hrzAccordion.js"> 1: </script> 2: <script type="text/javascript" src="JS/jquery.hrzAccordion.examples.js"> </script> Nuestro segundo paso: Será la definición del html que contendrá los elementos de tipo imagen y el texto. 1: <li> 2: <div class="handle"> 3: <img src="images/title1.png" /></div> 4: <img src="images/image_test.gif" align="left" /> 5: <h3> 6: Contenido 1</h3> 7: <p> 8: Contenido de Ejemplo 1.<br> 9: <br> 10: Agregue todo el contenido aquí</p> 11: </li> En el código anterior, hemos definido un elemento que contendrá una imagen que se mostrará dentro del menú una vez desplegado. Una etiqueta H3 de html que tendrá el Título y un elemento <p> para definir el parrado de texto. Como vemos es algo realmente sencillo. Si queremos agregar mas elementos, será nada mas copiar el div anterior y agregar nuevo contenido. Al final, nuestro menú debe lucir algo así: Por último, les dejo el ejemplo para descargar

    Read the article

  • setting min date in jquery datepicker

    - by user1184777
    Hi i want to set min date in my jquery datepicker to (1999-10-25) so i tried the below code its not working. $(function () { $('#datepicker').datepicker({ dateFormat: 'yy-mm-dd', showButtonPanel: true, changeMonth: true, changeYear: true, showOn: "button", buttonImage: "images/calendar.gif", buttonImageOnly: true, minDate: new Date(1999, 10 - 1, 25), maxDate: '+30Y', inline: true }); }); ** if i change the min year to above 2002 than it will work fine but if i specify min year less than 2002{like above eexample 1999} it will show only up to 2002.can someone help me. i am using jquery-1.7.1.min.js and jquery-ui-1.8.18.custom.min.js.

    Read the article

  • I've created a software RAID on SUSE EL 10 and now I need to monitor it.......

    - by Thomas B.
    I have created a Software Raid using the yast2 GUI on SUSE ES 10/11. The raid works great and it's a raid 5. I have 5 Drives they are cheap 2GB Cases that have 2 - 1TB Drives in each case (Serial ATA Drives) and I connect them in via Esata to the motherboard. The problem I have as this is "cheap" storage when of the the 5 drives goes out on the RAID I seem to have no logs of any issues and it get's harder and harder to write to it until it dies. I use SAMBA to mount the 4TB parition to my PC's in my home on a GIG network. My question is this, are there any good (Free) tools in Linux to monitor a raid or the drives on the raid to detect any problems??? I haven't found any yet and was just wondering if some exist.

    Read the article

  • I need help with Widget and PendingIntents

    - by YaW
    Hi, I've asked here a question about Task Killers and widgets stop working (SO Question) but now, I have reports of user that they don't use any Task Killer and the widgets didn't work after a while. I have a Nexus One and I don't have this problem. I don't know if this is a problem of memory or something. Based on the API: A PendingIntent itself is simply a reference to a token maintained by the system describing the original data used to retrieve it. This means that, even if its owning application's process is killed, the PendingIntent itself will remain usable from other processes that have been given it. So, I don't know why widget stop working, if Android doesn't kill the PendingIntent by itself, what's the problem? This is my manifest code: <receiver android:name=".widget.InstantWidget" android:label="@string/app_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_provider" /> </receiver> And the widget code: public class InstantWidget extends AppWidgetProvider { public static ArrayList<Integer> alWidgetsId = new ArrayList<Integer>(); private static final String PREFS_NAME = "com.cremagames.instant.InstantWidget"; private static final String PREF_PREFIX_NOM = "nom_"; private static final String PREF_PREFIX_RAW = "raw_"; /** * Esto se llama cuando se crea el widget. Metemos en las preferencias los valores de nombre y raw para tenerlos en proximos reboot. * @param context * @param appWidgetManager * @param appWidgetId * @param nombreSound * @param rawSound */ static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId, String nombreSound, int rawSound){ //Guardamos en las prefs los valores SharedPreferences.Editor prefs = context.getSharedPreferences(PREFS_NAME, 0).edit(); prefs.putString(PREF_PREFIX_NOM + appWidgetId, nombreSound); prefs.putInt(PREF_PREFIX_RAW + appWidgetId, rawSound); prefs.commit(); //Actualizamos la interfaz updateWidgetGrafico(context, appWidgetManager, appWidgetId, nombreSound, rawSound); } /** * Actualiza la interfaz gráfica del widget (pone el nombre y crea el intent con el raw) * @param context * @param appWidgetManager * @param appWidgetId * @param nombreSound * @param rawSound */ private static void updateWidgetGrafico(Context context, AppWidgetManager appWidgetManager, int appWidgetId, String nombreSound, int rawSound){ RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget); //Nombre del Button remoteViews.setTextViewText(R.id.tvWidget, nombreSound); //Creamos el PendingIntent para el onclik del boton Intent active = new Intent(context, InstantWidget.class); active.setAction(String.valueOf(appWidgetId)); active.putExtra("sonido", rawSound); PendingIntent actionPendingIntent = PendingIntent.getBroadcast(context, 0, active, 0); actionPendingIntent.cancel(); actionPendingIntent = PendingIntent.getBroadcast(context, 0, active, 0); remoteViews.setOnClickPendingIntent(R.id.btWidget, actionPendingIntent); appWidgetManager.updateAppWidget(appWidgetId, remoteViews); } public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); //Esto se usa en la 1.5 para que se borre bien el widget if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) { final int appWidgetId = intent.getExtras().getInt( AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { this.onDeleted(context, new int[] { appWidgetId }); } } else { //Listener de los botones for(int i=0; i<alWidgetsId.size(); i++){ if (intent.getAction().equals(String.valueOf(alWidgetsId.get(i)))) { int sonidoRaw = 0; try { sonidoRaw = intent.getIntExtra("sonido", 0); } catch (NullPointerException e) { } MediaPlayer mp = MediaPlayer.create(context, sonidoRaw); mp.start(); mp.setOnCompletionListener(completionListener); } } super.onReceive(context, intent); } } /** Al borrar el widget, borramos también las preferencias **/ public void onDeleted(Context context, int[] appWidgetIds) { for(int i=0; i<appWidgetIds.length; i++){ //Recogemos las preferencias SharedPreferences.Editor prefs = context.getSharedPreferences(PREFS_NAME, 0).edit(); prefs.remove(PREF_PREFIX_NOM + appWidgetIds[i]); prefs.remove(PREF_PREFIX_RAW + appWidgetIds[i]); prefs.commit(); } super.onDeleted(context, appWidgetIds); } /**Este método se llama cada vez que se refresca un widget. En nuestro caso, al crearse y al reboot del telefono. Al crearse lo único que hace es guardar el id en el arrayList Al reboot, vienen varios ID así que los recorremos y guardamos todos y también recuperamos de las preferencias el nombre y el sonido*/ public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { for(int i=0; i<appWidgetIds.length; i++){ //Metemos en el array los IDs de los widgets alWidgetsId.add(appWidgetIds[i]); //Recogemos las preferencias SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, 0); String nomSound = prefs.getString(PREF_PREFIX_NOM + appWidgetIds[i], null); int rawSound = prefs.getInt(PREF_PREFIX_RAW + appWidgetIds[i], 0); //Si están creadas, actualizamos la interfaz if(nomSound != null){ updateWidgetGrafico(context, appWidgetManager, appWidgetIds[i], nomSound, rawSound); } } } MediaPlayer.OnCompletionListener completionListener = new MediaPlayer.OnCompletionListener(){ public void onCompletion(MediaPlayer mp) { if(mp != null){ mp.stop(); mp.release(); mp = null; } } }; } Sorry for the comments in Spanish. I have the possibility to put differents widgets on the desktop, that's why I use the widgetId as the "unique id" for the PendingIntent. Any ideas please? The 70% of the functionality of my app is the widgets, and it isn't working for some users :( Thanks in advance and sorry for my English.

    Read the article

  • Remove All Nodes with (nodeName = "script") from a Document Fragment *before placing it in dom*

    - by Matrym
    My goal is to remove all <[script] nodes from a document fragment (leaving the rest of the fragment intact) before inserting the fragment into the dom. My fragment is created by and looks something like this: range = document.createRange(); range.selectNode(document.getElementsByTagName("body").item(0)); documentFragment = range.cloneContents(); sasDom.insertBefore(documentFragment, credit); document.body.appendChild(documentFragment); I got good range walker suggestions in a separate post, but realized I asked the wrong question. I got an answer about ranges, but what I meant to ask about was a document fragment (or perhaps there's a way to set a range of the fragment? hrmmm). The walker provided was: function actOnElementsInRange(range, func) { function isContainedInRange(el, range) { var elRange = range.cloneRange(); elRange.selectNode(el); return range.compareBoundaryPoints(Range.START_TO_START, elRange) <= 0 && range.compareBoundaryPoints(Range.END_TO_END, elRange) >= 0; } var rangeStartElement = range.startContainer; if (rangeStartElement.nodeType == 3) { rangeStartElement = rangeStartElement.parentNode; } var rangeEndElement = range.endContainer; if (rangeEndElement.nodeType == 3) { rangeEndElement = rangeEndElement.parentNode; } var isInRange = function(el) { return (el === rangeStartElement || el === rangeEndElement || isContainedInRange(el, range)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; }; var container = range.commonAncestorContainer; if (container.nodeType != 1) { container = container.parentNode; } var walker = document.createTreeWalker(document, NodeFilter.SHOW_ELEMENT, isInRange, false); while (walker.nextNode()) { func(walker.currentNode); } } actOnElementsInRange(range, function(el) { el.removeAttribute("id"); }); That walker code is lifted from: http://stackoverflow.com/questions/2690122/remove-all-id-attributes-from-nodes-in-a-range-of-fragment PLEASE No libraries (ie jQuery). I want to do this the raw way. Thanks in advance for your help

    Read the article

  • backbone.js removing template from DOM upon success

    - by timpone
    I'm writing a simple message board app to learn backbone. It's going ok (a lot of the use of this isn't making sense) but am a little stuck in terms of how I would remove a form / html from the dom. I have included most of the code but you can see about 4 lines up from the bottom, the part that isn't working. How would I remove this from the DOM? thx in advance var MbForm=Backbone.View.extend({ events: { 'click button.add-new-post': 'savePost' }, el: $('#detail'), template:_.template($('#post-add-edit-tmpl').html()), render: function(){ var compiled_template = this.template(); this.$el.html(compiled_template); return this; }, savePost: function(e){ //var self=this; //console.log("I want you to say Hello!"); data={ header: $('#post_header').val(), detail: $('#post_detail').val(), forum_id: $('#forum_id').val(), post_id: $('#post_id').val(), parent_id: $('#parent_id').val() }; this.model.save(data, { success: function(){ alert('this saved'); //$(this.el).html('this is what i want'); this.$el.remove();// <- this is the part that isn't working /* none of these worked - error Uncaught TypeError: Cannot call method 'unbind' of undefined this.$el.unbind(); this.$el.empty(); this.el.unbind(); this.el.empty(); */ //this.unbind(); //self.append('this is appended'); } });

    Read the article

  • Unable to logon to vpn

    - by nitin pande
    My openvpn client log file- The interesting bit: Tue Oct 26 12:32:49 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:32:49 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:32:49 2010 TCP/UDP: Closing socket The rest of the log just in case: Tue Oct 26 12:32:35 2010 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006 Tue Oct 26 12:32:48 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:32:48 2010 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file Tue Oct 26 12:32:48 2010 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication Tue Oct 26 12:32:48 2010 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication Tue Oct 26 12:32:48 2010 LZO compression initialized Tue Oct 26 12:32:48 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:32:48 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:32:48 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:32:48 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:32:48 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:32:48 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:32:48 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:32:48 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:32:49 2010 TLS: Initial packet from 67.228.223.12:3389, sid=bd5f79fe 8475497f Tue Oct 26 12:32:49 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:32:49 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:32:49 2010 TCP/UDP: Closing socket Tue Oct 26 12:32:49 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:32:49 2010 Restart pause, 5 second(s) Tue Oct 26 12:32:54 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:32:54 2010 Re-using SSL/TLS context Tue Oct 26 12:32:54 2010 LZO compression initialized Tue Oct 26 12:32:54 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:32:54 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:32:54 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:32:54 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:32:54 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:32:54 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:32:54 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:32:54 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:32:54 2010 TLS: Initial packet from 67.228.223.12:3389, sid=1643b931 ce240d5f Tue Oct 26 12:32:54 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:32:54 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:32:54 2010 TCP/UDP: Closing socket Tue Oct 26 12:32:54 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:32:54 2010 Restart pause, 5 second(s) Tue Oct 26 12:32:59 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:32:59 2010 Re-using SSL/TLS context Tue Oct 26 12:32:59 2010 LZO compression initialized Tue Oct 26 12:32:59 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:32:59 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:32:59 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:32:59 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:32:59 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:33:00 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:33:00 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:33:00 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:33:00 2010 TLS: Initial packet from 67.228.223.12:3389, sid=cd439fb2 d625ca0d Tue Oct 26 12:33:00 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:33:00 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:33:00 2010 TCP/UDP: Closing socket Tue Oct 26 12:33:00 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:33:00 2010 Restart pause, 5 second(s) Tue Oct 26 12:33:05 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:33:05 2010 Re-using SSL/TLS context Tue Oct 26 12:33:05 2010 LZO compression initialized Tue Oct 26 12:33:05 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:33:05 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:33:05 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:33:05 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:33:05 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:33:06 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:33:06 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:33:06 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:33:06 2010 TLS: Initial packet from 67.228.223.12:3389, sid=28f0cb87 69c90cde Tue Oct 26 12:33:06 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:33:06 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:33:06 2010 TCP/UDP: Closing socket Tue Oct 26 12:33:06 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:33:06 2010 Restart pause, 5 second(s) Tue Oct 26 12:33:11 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:33:11 2010 Re-using SSL/TLS context Tue Oct 26 12:33:11 2010 LZO compression initialized Tue Oct 26 12:33:11 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:33:11 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:33:11 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:33:11 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:33:11 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:33:11 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 12:33:11 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 12:33:11 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 12:33:12 2010 TLS: Initial packet from 67.228.223.12:3389, sid=128becf9 f62adf0c Tue Oct 26 12:33:12 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 12:33:12 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 12:33:12 2010 TCP/UDP: Closing socket Tue Oct 26 12:33:12 2010 SIGUSR1[soft,tls-error] received, process restarting Tue Oct 26 12:33:12 2010 Restart pause, 5 second(s) Tue Oct 26 12:33:17 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 12:33:17 2010 Re-using SSL/TLS context Tue Oct 26 12:33:17 2010 LZO compression initialized Tue Oct 26 12:33:17 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 12:33:17 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 12:33:17 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 12:33:17 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 12:33:17 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 12:33:20 2010 TCP/UDP: Closing socket Tue Oct 26 12:33:20 2010 SIGTERM[hard,init_instance] received, process exiting Guys I am extremely sorry for not presenting my error Log properly, please forgive me and give me your valuable advice. I am using windows 7 and I am using openvpn mainly to bypass censorship at UAE. I am using only client config file. Ca.crt file is in config folder Thanks and regards Nitin My error Log with Config1 file Tue Oct 26 21:24:34 2010 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006 Tue Oct 26 21:24:46 2010 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Tue Oct 26 21:24:46 2010 Control Channel Authentication: using 'ta.key' as a OpenVPN static key file Tue Oct 26 21:24:46 2010 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication Tue Oct 26 21:24:46 2010 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication Tue Oct 26 21:24:46 2010 LZO compression initialized Tue Oct 26 21:24:46 2010 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ] Tue Oct 26 21:24:46 2010 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Tue Oct 26 21:24:46 2010 Local Options hash (VER=V4): 'ee93268d' Tue Oct 26 21:24:46 2010 Expected Remote Options hash (VER=V4): 'bd577cd1' Tue Oct 26 21:24:46 2010 Attempting to establish TCP connection with 67.228.223.12:3389 Tue Oct 26 21:24:47 2010 TCP connection established with 67.228.223.12:3389 Tue Oct 26 21:24:47 2010 TCPv4_CLIENT link local: [undef] Tue Oct 26 21:24:47 2010 TCPv4_CLIENT link remote: 67.228.223.12:3389 Tue Oct 26 21:24:47 2010 TLS: Initial packet from 67.228.223.12:3389, sid=4244e662 e5a0572a Tue Oct 26 21:24:47 2010 TLS Error: cannot locate HMAC in incoming packet from 67.228.223.12:3389 Tue Oct 26 21:24:47 2010 Fatal TLS error (check_tls_errors_co), restarting Tue Oct 26 21:24:47 2010 TCP/UDP: Closing socket Tue Oct 26 21:24:47 2010 SIGUSR1[soft,tls-error] received, process restarting client config file: client dev tun proto tcp remote openvpn1.flashvpn.com 3389 float resolv-retry infinite nobind persist-key persist-tun ca ca.crt ns-cert-type server tls-auth ta.key 1 comp-lzo verb 3 mute 20 auth-user-pass route-method exe route-delay 2

    Read the article

  • Microsoft Visual Studio Release History/Timelines/Milestones

    1975 – Bill Gates and Paul Allen write a version of Basic for Altair 8080 1982 – IBM releases BASCOM 1.0 (developed by Microsoft) 1983 – Microsoft Basic Compiler System v5.35 for MS-DOS release 1984 - Microsoft Basic Compiler System v5.36 release 1985 – Microsoft QuickBASIC 1.0 1986 – Microsoft QuickBASIC 1.01, 1.02, 2.00 1987 – Microsoft QuickBASIC 2.01, 3.00, 4.00 1987 – Microsoft BASIC 6.0 1988 – Microsoft QuickBASIC 4.00, 4.00b, 4.50 1989 – Microsoft BASIC Professional Development System 7.0 1990 - Microsoft BASIC Professional Development System 7.1 1991 – Microsoft Visual Basic released May 20-Windows World Convention –Atlanta 1992 – Microsoft Visual Basic 2.0 1993 – Microsoft Visual Basic 3.0 in Standard and Professional versions 1995 – Microsoft Visual Basic 4.0 released, supported the new Windows 95 1997 – Microsoft Visual Basic 5.0 – introduction of IntelliSense 1998 – Microsoft Visual Studio 6.0 that included Visual Basic 6.0 released (first VS) 2002 – Microsoft Visual Basic .NET 7.0 2002 – Visual Studio .NET 2003 – Microsoft Visual Basic .NET 7.1 2003 – Microsoft Visual Studio w/Intellisense 2003 – Visual Studio .NET 2004 – Announce Visual Studios 2005 – Code name Whidbey 2005 – Visual Studio 2005 release w/Extensibility 2005 – Visual Studio Express released 2006 - Expression Tool Set released - devs and designers work together 2006 – Visual Studio Team release – November 30th 2007 – Visual Studio 2008 (code name Orcas) ships November = Video Studio Shell 2010 - Visual Studios (code name Rosario) span.fullpost {display:none;}

    Read the article

  • Extjs4: editable rowbody

    - by peter
    in my first ExtJs4 project i use a editable grid with the feature rowbody to have a big textfield displayed under each row. I want it to be editable on a dblclick. I succeeded in doing so by replacing the innerHTML of the rowbody by a textarea but the special keys don't do what they are supposed to do (move the cursor). If a use the textarea in a normal field i don't have this probem. Same problem in IE7 and FF4 gridInfo = Ext.create('Ext.ux.LiveSearchGridPanel', { id: 'gridInfo', height: '100%', width: '100%', store: storeInfo, columnLines: true, selType: 'cellmodel', columns: [ {text: "Titel", flex: 1, dataIndex: 'titel', field:{xtype:'textfield'}}, {text: "Tags", id: "tags", flex: 1, dataIndex: 'tags', field:{xtype:'textfield'}}, {text: "Hits", dataIndex: 'hits'}, {text: "Last Updated", renderer: Ext.util.Format.dateRenderer('d/m/Y'), dataIndex: 'lastChange'} ], plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ], features: [ { ftype: 'rowbody', getAdditionalData: function(data, idx, record, orig) { var headerCt = this.view.headerCt, colspan = headerCt.getColumnCount(); return { rowBody: data.desc, //the big textfieldvalue, can't use a textarea here 8< rowBodyCls: this.rowBodyCls, rowBodyColspan: colspan }; } }, {ftype: 'rowwrap'} ] }); me.on('rowbodydblclick', function(gridView, el, event, o) { ... rb = td.down('.x-grid-rowbody').dom; var value = rb.innerText?rb.innerText:rb.textContent; rb.innerHTML = ''; Ext.create('Ext.form.field.TextArea', { id: 'textarea1', value : value, renderTo: rb, border: false, enterIsSpecial: true, enableKeyEvents: true, disableKeyFilter: true, listeners: { 'blur': function(el, o) { rb.innerHTML = el.value; }, 'specialkey': function(field, e){ console.log(e.keyCode); //captured but nothing happens } } }).show(); damn, can't publish my own solution, looks like somebody else has to answer, anyway, here is the function that works function editDesc(me, gridView, el, event, o) { var width = Ext.fly(el).up('table').getWidth(); var rb = event.target; var value = rb.innerText?rb.innerText:rb.textContent; rb.innerHTML = '' var txt = Ext.create('Ext.form.field.TextArea', { value : value, renderTo: rb, border: false, width: width, height: 300, enterIsSpecial: true, disableKeyFilter: true, listeners: { 'blur': function(el, o) { var value = el.value.replace('\n','<br>') rb.innerHTML = value; }, 'specialkey': function(field, e){ e.stopPropagation(); } } }); var txtTextarea = Ext.fly(rb).down('textarea'); txtTextarea.dom.style.color = 'blue'; txtTextarea.dom.style.fontSize = '11px'; } Hi Molecule Man, as an alternative to the approach above i tried the Ext.Editor. It works but i want it inline but when i render it to the rowbody, the field blanks and i have no editor, any ideas ? gridInfo = Ext.create('Ext.grid.Panel', { id: 'gridInfo', height: '100%', width: '100%', store: storeInfo, columnLines: true, selType: 'cellmodel', viewConfig: {stripeRows: false, trackOver: true}, columns: [ {text: "Titel", flex: 1, dataIndex: 'titel', field:{xtype:'textfield'}}, ... {text: "Last Updated", renderer: Ext.util.Format.dateRenderer('d/m/Y'), dataIndex: 'lastChange'} ], plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ], features: [ { ftype: 'rowbody', getAdditionalData: function(data, idx, record, orig) { var headerCt = this.view.headerCt, colspan = headerCt.getColumnCount(); return { rowBody: data.desc, rowBodyCls: this.rowBodyCls, rowBodyColspan: colspan }; } } ], listeners:{ rowbodyclick: function(gridView, el, event) { //werkt editDesc(this, gridView, el, event); } } }); function editDesc(me, gridView, el, event, o) { var rb = event.target; me.txt = new Ext.Editor({ field: {xtype: 'textarea'}, updateEl: true, cancelOnEsc: true, floating: true, renderTo: rb //when i do this, the field becomes empty and i don't get the editor }); me.txt.startEdit(el); }

    Read the article

  • MVC Persist Collection ViewModel (Update, Delete, Insert)

    - by Riccardo Bassilichi
    In order to create a more elegant solution I'm curios to know your suggestion about a solution to persist a collection. I've a collection stored on DB. This collection go to a webpage in a viewmodel. When the go back from the webpage to the controller I need to persist the modified collection to the same DB. The simple solution is to delete the stored collection and recreate all rows. I need a more elegant solution to mix the collections and delete not present record, update similar records ad insert new rows. this is my Models and ViewModels. public class CustomerModel { public virtual string Id { get; set; } public virtual string Name { get; set; } public virtual IList<PreferredAirportModel> PreferedAirports { get; set; } } public class AirportModel { public virtual string Id { get; set; } public virtual string AirportName { get; set; } } public class PreferredAirportModel { public virtual AirportModel Airport { get; set; } public virtual int CheckInMinutes { get; set; } } // ViewModels public class CustomerViewModel { [Required] public virtual string Id { get; set; } public virtual string Name { get; set; } public virtual IList<PreferredAirporViewtModel> PreferedAirports { get; set; } } public class PreferredAirporViewtModel { [Required] public virtual string AirportId { get; set; } [Required] public virtual int CheckInMinutes { get; set; } } And this is the controller with not elegant solution. public class CustomerController { public ActionResult Save(string id, CustomerViewModel viewModel) { var session = SessionFactory.CurrentSession; var customer = session.Query<CustomerModel>().SingleOrDefault(el => el.Id == id); customer.Name = viewModel.Name; // How cai I Merge collections handling delete, update and inserts ? var modifiedPreferedAirports = new List<PreferredAirportModel>(); var modifiedPreferedAirportsVm = new List<PreferredAirporViewtModel>(); // Update every common Airport foreach (var airport in viewModel.PreferedAirports) { foreach (var custPa in customer.PreferedAirports) { if (custPa.Airport.Id == airport.AirportId) { modifiedPreferedAirports.Add(custPa); modifiedPreferedAirportsVm.Add(airport); custPa.CheckInMinutes = airport.CheckInMinutes; } } } // Remove common airports from ViewModel modifiedPreferedAirportsVm.ForEach(el => viewModel.PreferedAirports.Remove(el)); // Remove deleted airports from model var toDelete = customer.PreferedAirports.Except(modifiedPreferedAirports); toDelete.ForEach(el => customer.PreferedAirports.Remove(el)); // Add new Airports var toAdd = viewModel.PreferedAirports.Select(el => new PreferredAirportModel { Airport = session.Query<AirportModel>(). SingleOrDefault(a => a.Id == el.AirportId), CheckInMinutes = el.CheckInMinutes }); toAdd.ForEach(el => customer.PreferedAirports.Add(el)); session.Save(customer); return View(); } } My environment is ASP.NET MVC 4, nHibernate, Automapper, SQL Server. Thank You!!

    Read the article

  • Creating a grid overlay over image.

    - by neteus
    Hi everybody, I made a script (using mootools library) that is supposed to overlay an image with a table grid and when each grid cell is clicked/dragged over its background color changes 'highlighting' the cell. Current code creates a table and positions it over the element (el, image in this case). Table was used since I am planning to add rectangle select tool later on, and it seemed easiest way to do it. <html> <head> <title></title> <script type="text/javascript" src="mootools.js"></script> <script type="text/javascript"> var SetGrid = function(el, sz, nr, nc){ //get number of rows/columns according to the 'grid' size numcols = el.getSize().x/sz; numrows = el.getSize().y/sz; //create table element for injecting cols/rows var gridTable = new Element('table', { 'id' : 'gridTable', 'styles' : { 'width' : el.getSize().x, 'height' : el.getSize().y, 'top' : el.getCoordinates().top, 'left' : el.getCoordinates().left } }); //inject rows/cols into gridTable for (row = 1; row<=numrows; row++){ thisRow = new Element('tr', { 'id' : row, 'class' : 'gridRow' }); for(col = 1; col<=numcols; col++){ thisCol = new Element('td', { 'id' : col, 'class' : 'gridCol0' }); //each cell gets down/up over event... down starts dragging|up stops|over draws area if down was fired thisCol.addEvents({ 'mousedown' : function(){ dragFlag = true; startRow = this.getParent().get('id'); startCol = this.get('id'); }, 'mouseup' : function(){ dragFlag = false; }, 'mouseover' : function(){ if (dragFlag==true){ this.set('class', 'gridCol'+$$('#lvlSelect .on').get('value')); } }, 'click' : function(){ //this.set('class', 'gridCol'+$$('#lvlSelect .on').get('id').substr(3, 1) ); str = $$('#lvlSelect .on').get('id'); alert(str.substr(2, 3)); } }); thisCol.inject(thisRow, 'bottom'); }; thisRow.inject(gridTable, 'bottom'); }; gridTable.inject(el.getParent()); } //sens level selector func var SetSensitivitySelector = function(el, sz, nr, nc){ $$('#lvlSelect ul li').each(function(el){ el.addEvents({ 'click' : function(){ $$('#lvlSelect ul li').set('class', ''); this.set('class', 'on'); }, 'mouseover' : function(){ el.setStyle('cursor','pointer'); }, 'mouseout' : function(){ el.setStyle('cursor',''); } }); }); } //execute window.addEvent('load', function(){ SetGrid($('imagetomap'), 32); SetSensitivitySelector(); }); </script> <style> #imagetomapdiv { float:left; display: block; } #gridTable { border:1px solid red; border-collapse:collapse; position:absolute; z-index:5; } #gridTable td { opacity:0.2; filter:alpha(opacity=20); } #gridTable .gridCol0 { border:1px solid gray; background-color: none; } #gridTable .gridCol1 { border:1px solid gray; background-color: green; } #gridTable .gridCol2 { border:1px solid gray; background-color: blue; } #gridTable .gridCol3 { border:1px solid gray; background-color: yellow; } #gridTable .gridCol4 { border:1px solid gray; background-color: orange; } #gridTable .gridCol5 { border:1px solid gray; background-color: red; } #lvlSelect ul {float: left; display:block; position:relative; margin-left: 20px; padding: 10px; } #lvlSelect ul li { width:40px; text-align:center; display:block; border:1px solid black; position:relative; padding: 10px; list-style:none; opacity:0.2; filter:alpha(opacity=20); } #lvlSelect ul li.on { opacity:1; filter:alpha(opacity=100); } #lvlSelect ul #li0 { background-color: none; } #lvlSelect ul #li1 { background-color: green; } #lvlSelect ul #li2 { background-color: blue; } #lvlSelect ul #li3 { background-color: yellow; } #lvlSelect ul #li4 { background-color: orange; } #lvlSelect ul #li5 { background-color: red; } </style> </head> <body> <div id="imagetomapdiv"> <img id="imagetomap" src="1.png"> </div> <div id="lvlSelect"> <ul> <li value="0" id="li0">0</li> <li value="1" id="li1">1</li> <li value="2" id="li2">2</li> <li value="3" id="li3">3</li> <li value="4" id="li4">4</li> <li value="5" id="li5" class="on">5</li> </ul> </div> </body> </html> A 'working' example: http://72.14.186.218/~alex/motion.php There are two problems: while it works just fine in FF, IE and Chrome do not create the table if the page is refreshed. If you go back to directory root and click on the link to the file the grid table is displayed, if you hit 'refresh' button -- the script runs but the table is not injected. Secondly, although the table HTML is injected in IE, it does not display it. I tried adding nbsp's to make sure its not ignored -- to no avail. Any suggestions on improving code or help with the issues is appreciated. Thanks!

    Read the article

  • Using smartctl to get vendor specific Attributes from ssd drive behind a SmartArray P410 controller

    - by Lairsdragon
    Recently I have deployed some HP server with SSD's behind a SmartArray P410 controller. While not official supported from HP the server work well sofar. Now I like to get wear level info's, error statistics etc from the drive. While the SA P410 supports a passthru of the SMART Command to a single drive in the array the output I was not able to the the interesting things from the drive. In this case especially the value the Wear level indicator is from interest for me (Attr.ID 233), but this is ony present if the drive is directly attanched to a SATA Controller. smartctl on directly connected ssd: # smartctl -A /dev/sda smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF READ SMART DATA SECTION === SMART Attributes Data Structure revision number: 5 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 3 Spin_Up_Time 0x0000 100 000 000 Old_age Offline In_the_past 0 4 Start_Stop_Count 0x0000 100 000 000 Old_age Offline In_the_past 0 5 Reallocated_Sector_Ct 0x0002 100 100 000 Old_age Always - 0 9 Power_On_Hours 0x0002 100 100 000 Old_age Always - 8561 12 Power_Cycle_Count 0x0002 100 100 000 Old_age Always - 55 192 Power-Off_Retract_Count 0x0002 100 100 000 Old_age Always - 29 232 Unknown_Attribute 0x0003 100 100 010 Pre-fail Always - 0 233 Unknown_Attribute 0x0002 088 088 000 Old_age Always - 0 225 Load_Cycle_Count 0x0000 198 198 000 Old_age Offline - 508509 226 Load-in_Time 0x0002 255 000 000 Old_age Always In_the_past 0 227 Torq-amp_Count 0x0002 000 000 000 Old_age Always FAILING_NOW 0 228 Power-off_Retract_Count 0x0002 000 000 000 Old_age Always FAILING_NOW 0 smartctl on P410 connected ssd: # ./smartctl -A -d cciss,0 /dev/cciss/c1d0 smartctl 5.39.1 2010-01-28 r3054 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net (Right, it is complety empty) smartctl on P410 connected hdd: # ./smartctl -A -d cciss,0 /dev/cciss/c0d0 smartctl 5.39.1 2010-01-28 r3054 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net Current Drive Temperature: 27 C Drive Trip Temperature: 68 C Vendor (Seagate) cache information Blocks sent to initiator = 1871654030 Blocks received from initiator = 1360012929 Blocks read from cache and sent to initiator = 2178203797 Number of read and write commands whose size <= segment size = 46052239 Number of read and write commands whose size > segment size = 0 Vendor (Seagate/Hitachi) factory information number of hours powered up = 3363.25 number of minutes until next internal SMART test = 12 Do I hunt here a bug, or is this a limitation of the p410 SMART cmd Passthru?

    Read the article

  • Improve this snippet from a prototype class

    - by seengee
    This is a snippet from a prototype class i am putting together. The scoping workaround feels a little hacky to me, can it be improved or done differently? var myClass = Class.create({ initialize: function() { $('formid').getElements().each(function(el){ $(el).observe("blur", function(){ this.validateEl(el); }.bind(this,el)); },this); }, validateEl: function(el){ // validate $(el) in here... } }); Also, it seems to me that i could be doing something like this for the event observers: $('formid').getElements().invoke("observe","blur" ... Not sure how i would pass the element references in though?

    Read the article

  • How to use role-hierarchy in Spring Security 3 with Spring EL?

    - by Aleksey
    I want to use @PreAuthorize annotation on service methods with Spring Security. One of requirements is to use role-hierarchy. But by default it is not enabled. I found that in SecurityExpressionRoot class ("the base class for expression root objects") there is a property roleHierarchy. The class actually does use this property for methods like hasRole() and hasAnyRole(). I suppose that if I supply it with my own RoleHierarchy bean I will be able to use @PreAuthorize annotations with hierarchical roles. How can I inject my hierarchy bean into SecurityExpressionRoot?

    Read the article

  • Grid overlayed on image using javascript, need help getting grid coordinates.

    - by Alos
    Hi I am fairly new to javascript and could use some help, I am trying to overlay a grid on top of an image and then be able to have the user click on the grid and get the grid coordinate from the box that the user clicked. I have been working with the code from the following stackoverflow question: Creating a grid overlay over image. link text Here is the code that I have so far: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> </script> <script type="text/javascript"> var SetGrid = function(el, sz, nr, nc){ //get number of rows/columns according to the 'grid' size //numcols = el.getSize().x/sz; //numrows = el.getSize().y/sz; numcols = 48; numrows = 32; //create table element for injecting cols/rows var gridTable = new Element('table', { 'id' : 'gridTable', 'styles' : { 'width' : el.getSize().x, 'height' : el.getSize().y, 'top' : el.getCoordinates().top, 'left' : el.getCoordinates().left } }); //inject rows/cols into gridTable for (row = 1; row<=numrows; row++){ thisRow = new Element('tr', { 'id' : row, 'class' : 'gridRow' }); for(col = 1; col<=numcols; col++){ thisCol = new Element('td', { 'id' : col, 'class' : 'gridCol0' }); //each cell gets down/up over event... down starts dragging|up stops|over draws area if down was fired thisCol.addEvents({ 'mousedown' : function(){ dragFlag = true; startRow = this.getParent().get('id'); startCol = this.get('id'); }, 'mouseup' : function(){ dragFlag = false; }, 'mouseover' : function(){ if (dragFlag==true){ this.set('class', 'gridCol'+$$('#lvlSelect .on').get('value')); } }, 'click' : function(){ //this.set('class', 'gridCol'+$$('#lvlSelect .on').get('id').substr(3, 1) ); str = $$('#lvlSelect .on').get('id'); alert(str.substr(2, 3)); } }); thisCol.inject(thisRow, 'bottom'); }; thisRow.inject(gridTable, 'bottom'); }; gridTable.inject(el.getParent()); } //sens level selector func var SetSensitivitySelector = function(el, sz, nr, nc){ $$('#lvlSelect ul li').each(function(el){ el.addEvents({ 'click' : function(){ $$('#lvlSelect ul li').set('class', ''); this.set('class', 'on'); }, 'mouseover' : function(){ el.setStyle('cursor','pointer'); }, 'mouseout' : function(){ el.setStyle('cursor',''); } }); }); } //execute window.addEvent('load', function(){ SetGrid($('imagetomap'), 32); SetSensitivitySelector(); }); var gridSize = { x: 48, y: 32 }; var img = document.getElementById('imagetomap'); img.onclick = function(e) { if (!e) e = window.event; alert(Math.floor(e.offsetX/ gridSize.x) + ', ' + Math.floor(e.offsetY / gridSize.y)); } </script> <style> #imagetomapdiv { float:left; display: block; } #gridTable { border:1px solid red; border-collapse:collapse; position:absolute; z-index:5; } #gridTable td { opacity:0.2; filter:alpha(opacity=20); } #gridTable .gridCol0 { border:1px solid gray; background-color: none; } #gridTable .gridCol1 { border:1px solid gray; background-color: green; } #gridTable .gridCol2 { border:1px solid gray; background-color: blue; } #gridTable .gridCol3 { border:1px solid gray; background-color: yellow; } #gridTable .gridCol4 { border:1px solid gray; background-color: orange; } #gridTable .gridCol5 { border:1px solid gray; background-color: red; } #lvlSelect ul {float: left; display:block; position:relative; margin-left: 20px; padding: 10px; } #lvlSelect ul li { width:40px; text-align:center; display:block; border:1px solid black; position:relative; padding: 10px; list-style:none; opacity:0.2; filter:alpha(opacity=20); } #lvlSelect ul li.on { opacity:1; filter:alpha(opacity=100); } #lvlSelect ul #li0 { background-color: none; } #lvlSelect ul #li1 { background-color: green; } #lvlSelect ul #li2 { background-color: blue; } #lvlSelect ul #li3 { background-color: yellow; } #lvlSelect ul #li4 { background-color: orange; } #lvlSelect ul #li5 { background-color: red; } </style> </div> <div id="lvlSelect"> <ul> <li value="0" id="li0">0</li> <li value="1" id="li1">1</li> <li value="2" id="li2">2</li> <li value="3" id="li3">3</li> <li value="4" id="li4">4</li> <li value="5" id="li5" class="on">5</li> </ul> </div> In this example the grid box changes color when the image is grid box is clicked, but I would like to be able to have the coordinates of the box. Any help would be great. Thank you

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >