RectRound Redondeando tus rectángulos con javascript.


Ojeando por StackOverFlow voy a rescatar una función muy resultona para redondear las esquinas de los rectángulos.

/**
 * Draws a rounded rectangle using the current state of the canvas.
 * If you omit the last three params, it will draw a rectangle
 * outline with a 5 pixel border radius
 * @param {Number} x The top left x coordinate
 * @param {Number} y The top left y coordinate
 * @param {Number} width The width of the rectangle
 * @param {Number} height The height of the rectangle
 * @param {Object} radius All corner radii. Defaults to 0,0,0,0;
 * @param {Boolean} fill Whether to fill the rectangle. Defaults to false.
 * @param {Boolean} stroke Whether to stroke the rectangle. Defaults to true.
 */
CanvasRenderingContext2D.prototype.roundRect = function (x, y, width, height, radius, fill, stroke) {
    var cornerRadius = { upperLeft: 0, upperRight: 0, lowerLeft: 0, lowerRight: 0 };
    if (typeof stroke == "undefined") {
        stroke = true;
    }
    if (typeof radius === "object") {
        for (var side in radius) {
            cornerRadius[side] = radius[side];
        }
    }

    this.beginPath();
    this.moveTo(x + cornerRadius.upperLeft, y);
    this.lineTo(x + width - cornerRadius.upperRight, y);
    this.quadraticCurveTo(x + width, y, x + width, y + cornerRadius.upperRight);
    this.lineTo(x + width, y + height - cornerRadius.lowerRight);
    this.quadraticCurveTo(x + width, y + height, x + width - cornerRadius.lowerRight, y + height);
    this.lineTo(x + cornerRadius.lowerLeft, y + height);
    this.quadraticCurveTo(x, y + height, x, y + height - cornerRadius.lowerLeft);
    this.lineTo(x, y + cornerRadius.upperLeft);
    this.quadraticCurveTo(x, y, x + cornerRadius.upperLeft, y);
    this.closePath();
    if (stroke) {
        this.stroke();
    }
    if (fill) {
        this.fill();
    }
}

Y se usa con:

var canvas = document.getElementById("canvas");
var c = canvas.getContext("2d");
c.fillStyle = "blue";
c.roundRect(50, 100, 50, 100, {upperLeft:10,upperRight:10}, true, true);

También se pueden usar lowers .

Un ejemplo de como funciona, sobre las cuatro esquinas, y admite distintos niveles de redondeo independientes.

solo Rect:

antes

Con RoundRect:

despues

Podeis ampliar información en :

http://stackoverflow.com/questions/1255512/how-to-draw-a-rounded-rectangle-on-html-canvas

Como cargar y guardar archivos RichText con WPF y VB


Es bastante sencillo.

Puedes crear un formulario por ejemplo que tenga un RichTextBox y dos botones, btnCarga y btnGuarda. Añades además un control RichTextBox.

Este control, maravilloso, contiene dos métodos Save y Load, que permitirán volcar o cargar el contenido del RichTextBox en formato Stream.

Pero para acceder al disco utilizaremos un objeto StreamReader o StreamWriter, que en principio no nos cuadrará con el objeto Stream del RichTextBox.

El método por ejemplo para el salvado, es RichTextBox1.Save (objetoStream, dataFormat) y no podemos asignarle directamente un objeto del tipo StreamWriter, pero si, el objeto que contiene el Stream de base que está contenido en el StreamWriter y StreamReader, que es el que realmente necesita, de modo, que pasándole este último funcionará.

Private Sub btnCarga(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click

Dim archivoCarga As New StreamReader("prueba.rtf")
 With RichTextBox1
 .Selection.Select(.Document.ContentStart, RichTextBox1.Document.ContentEnd)
 .Selection.Load(archivoCarga.BaseStream, System.Windows.DataFormats.Rtf)
 End With

End Sub

Private Sub btnGuarda(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button2.Click

Dim archivoSalida As New StreamWriter("prueba.rtf")
 Dim bs As Stream = archivoSalida.BaseStream
 With RichTextBox1
 .Selection.Select(RichTextBox1.Document.ContentStart, RichTextBox1.Document.ContentEnd)
 .Selection.Save(bs, System.Windows.DataFormats.Rtf)
 End With

End Sub

Los métodos Load y Save están en el objeto Selection, de modo que para guardar todo el contenido, forzamos a seleccionarlo todo previamente, o si no, solo guardaría lo seleccionado por el usuario.

Esto requiere además,  controles de comprobación de fichero, los try catch correspondientes para detectar errores, etc, cierre de ficheros, etc, pero para empezar es suficiente.

Problemas al convertir de String a Int en Actionscript


Solamente sucede en la versión 2.0
En la 3.0 al parecer ya solucionaron la marranada.

Estuve volviendome loco un par de horas intentando descubrir el motivo por el cual parseInt(«0120») me devolvía 80 y no 120. Primero pensé que estaba dandome algún tipo de conversión hexadecimal sin sentido, pero tras un rato jugando con la calculadora vi que realmente lo que estaba haciendo era devolvermelo en octal.

Tras echar un ojo a la ayuda de Flash, encontré que por defecto, interpreta que todo número que comience por cero, es un octal. Menuda gracia. No se en que momento pensaron que esto sería útil dejarlo asi por defecto.

Asi que para solucionarlo, al convertir, usad el otro argumento de parseInt, que es el que te da la base del sistema que quieras usar. En mi caso, lo quería en el sistema decimal, por tanto

parseInt("0120",10) = 120

Quien use Number para convertir Strings en numérico, va a sufrir mucho, pero que muy mucho en la vida.

Serialización en VB.NET


Hoy he tenido un problema al intentar duplicar un vector que contenía objetos de clase.
Hiciera lo que hiciera, todas las llamadas a parametros o intentos de crear un duplicado de un elemento de un vector, de tipo clase, me encontraba el mismo problema. Me devolvía siempre un objeto por referencia y nunca por valor.

Esto me estaba dando muchos problemas, por ejemplo, si quería crear un duplicado de un único elemento, por ejemplo extraer un equipo del vector de equipos, y que fuese independiente, no me dejaba, ya que al pasarse por referencia, todos los cambios que yo hacía en el duplicado que había extraido, se estaban cambiando automáticamente en el equipo original en el vector. Lo cual era un desastre.

De modo que la forma que he encontrado, es crear un documento serializandolo, descomponiendolo en pedazos de forma automática en memoria para disponer de dicho duplicado real, y no como hasta ahora, un simple punto de referencia en memoria.

Todas las clases que se deseen serializar, deben incluir esta sentencia delante de la declaración de la clase:

<Serializable()>
 Public Class clsEquipos

También hace falta en los Structures.
Se puede crear una función que realice el trabajo de serialización.


Imports System
 Imports System.Collections.Generic
 Imports System.Text
 Imports System.Runtime.Serialization
 Imports System.IO
 Imports System.Runtime.Serialization.Formatters.Binary
 Namespace Utilidades

 '''
''' Realiza una clonación de un objeto de estructura compleja
 '''
Public Class clsCopiador

 Public Shared Function Duplicar(ByVal fuente)

 'Creamos un stream en memoria
 Dim formatter As IFormatter = New BinaryFormatter()
 Dim stream As Stream = New MemoryStream()

 formatter.Serialize(stream, fuente)
 stream.Seek(0, SeekOrigin.Begin)

 'Deserializamos la porción de memoria en el nuevo objeto
 Return formatter.Deserialize(stream)

 End Function
 End Class
 End Namespace

Otras opciones son mediante clones basicos y complejos.

Dejo aqui dos ejemplos, para desarrollar otro día.

Public Function ShallowCopy() As Person
       Return DirectCast(Me.MemberwiseClone(), Person)
    End Function

    Public Function DeepCopy() As Person
       Dim other As Person = DirectCast(Me.MemberwiseClone(), Person)
       other.IdInfo = New IdInfo(Me.IdInfo.IdNumber)
       Return other
    End Function

MemberwiseClone crea un clon superficial, donde solo copia el primer nivel de objetos, el resto queda por referencia. El efecto me parece desastroso.

Para hacerlo en profundidad hay que reenvíar todos los métodos, propiedades, etc, uno por uno, como se ve en DeepCopy, pero para lo que necesitaba yo, que era una copia completa y total y que no me implique tener que estar pendiente de cada mantenimiento en las propiedades, prefiero la serialización.

Nota: Tened cuidado si vais a volcar este tipo de información para hacer salvados a disco, ya que un salvado en 32 bits no lo podreis recuperar bien en uno de 64 bits y viceversa.

Dejo unas referencias para ampliar información:

Memberwise en MSDN
Memberwise en Java
Ejemplo completo en C#
Lección magistral de Guille

Como resolver miles de errores de ASP según su código de error


El contenido de este post ha sido copiado de la web

 http://classicasp.aspfaq.com

Tiene mas contenidos y una amplia serie de artículos resolviendo errores diversos.
Anexo aquí lo que me pareció mas ímportante, que es la referencia ordenada por código de error.
Cuando pueda lo traduciré. 

 

Here is a verbose collection of information surrounding 80004005 errors that have nothing to do with a database. If your 80004005 error involves a database, please see Article #2009

Luckily, most 80004005 errors that are not database-related are trivial to fix, though a few are a but more tricky than that…


If there is no message associated with the error, there is at least one possible culprit: you tried to assign a negative value to Server.ScriptTimeout. Make sure you pass Server.ScriptTimeout a value between 1 and 2^32-1 (see Article #2066).


Active Server Pages, ASP 0100 (0x8000405)
Unable to allocate required memory

This is not usually about physical memory — Article #2196 has some information about this error. In addition, if you are getting this error when trying to connect to Project 2000 Server, make sure you are connecting to the root (e.g. http://srvName/ProjectServer/) as opposed to trying to connect directly to a file in one of the sub-folders.


Request object error ‘ASP 0101 : 80004005’
Unexpected error

This error message is covered quite extensively in Article #2383.


0x80004005
Unspecified error

If this is coming from use of MSXML.ServerXMLHTTP, see Article #2391.


Request object error ‘ASP 0102 : 80004005’
Expecting string inputor

Request object, ASP 0102 (0x80004005)
The function expects a string as input.

This can be caused by passing an undeclared variable into Request.Form or Request.Querystring, e.g.

<%
Dim str
Response.Write(Request.QueryString(str))
‘ or
Response.Write(Request.Form(str))
%>

To correct, make sure your str variable is defined and populated with a valid incoming form variable (and make sure you use the correct collection).


Active Server Pages, ASP 0103 (0x80004005)
Expecting numeric input

This can happen if you have a function in a VB or C++ DLL that is expecting an INT or LONG value, and you accidentally pass a string. Check your argument(s) and make sure they match the datatypes that the component is expecting. If you debug using response.write, you may see a value that *looks* numeric but you should always be sure by using CInt(), CLng() or CDbl().


Request object, ASP 0104
Operation not allowed

If you are running your own file upload handler in Windows Server 2003, this error probably occurs on this line:

something = Request.BinaryRead(Request.Totalbytes)

If so, you need to increase the setting for AspMaxRequestEntityAllowed to allow larger files to be handled by the Request object. Look for this setting in metabase.xml; the default is 204,800 (200 kb), but you can change it to reflect your expected usage. You will need to restart IIS for this change to take place, unless «enable direct metabase edit» is enabled.

This can also happen in certain scenarios when using code like the following:

variable = Request(«Variable»)

Always specify explicitly which collection you are retrieving data from. See Article #2111 for more information.

If you are running COntent Management Server on Windows Server 2003, see CMS SP1 Documentation.


Request object, ASP 0105 (0x80004005)
An array index is out of range.

This is often caused by using a numeric argument in Request.QueryString or Request.Form, without checking that such an index exists. For example:

<%
‘ …
sql = «SELECT id FROM table»
set rs = conn.execute(sql)
do while not rs.eof
response.write Request.Form(rs(«id»))
rs.movenext
loop
%>

At the line where this error is happening, response.write the index you are passing to the array or structure. It should be clear that this number is either null or outside the dimensions of the array. For more information on iterating through a form collection by numeric index, see Article #2036.


Request object, ASP 0107 (0x80004005)
The data being processed is over the allowed limit.or

Request object error ‘ASP 0107 : 80004005’
Stack Overflow
/<file>.asp, line <line>
The data being processed is over the allowed limit.

Each form field is limited to 102kb (according to KB #273482)… for a verbose workaround, see Post large form data to ASP – Request.Fo…. Or, use client-side validation to prevent submission of more than 102,399 characters in a single textarea.


Active Server Pages error ‘ASP 0113 : 0x80004005’
Script timed out
<file>.asp, line <line>
The maximum amount of time for a script to execute was exceeded. You
can change this limit by specifying a new value for the property
Server.ScriptTimeOut or by changing the value in the IIS
administration tools.

See Article #2366 for a discussion of this error message.


Active Server Pages error ‘ASP 0116 : 0x80004005’
Missing close of script delimiter
/<file>.asp, line <line>
The Script block lacks the close of script tag (%>).or

Active Server Pages, ASP 0116 (0x80004005)
The Script block lacks the close of script tag (%>)

You have somehow embedded an opening script tag (<%) without closing it. A simple method to reproduce is as follows:

<%table width=100>

If your code is really complex and you can’t find the offending tag, start at line 2 and move a response.end statement down one line at a time until you find it.


Active Server Pages, ASP 0117 (0x80004005)
The Script block lacks the close of script tag (</SCRIPT>) or close of tag symbol (>).Active Server Pages, ASP 0117 (0x80004005)
The Script block lacks the close of script tag (%>).

You probably did this:

<script language=javascript runat=server>or

<%

Without ever closing the tag. You may even have done this:

<script language=javascript runat=server>
</script

Notice the missing close brace (>)… it might have been accidentally carriage-returned to the next line.


Active Server Pages, ASP 0118 (0x80004005)
The Object block lacks the close of object tag (</OBJECT>) or close of tag symbol (>).

Similar to the above case, you either forgot to close your object tag at all, or left off the trailing close brace (>), e.g.:

<object runat=server … >
</object

Active Server Pages, ASP 0119 (0x80004005)
The object instance ‘<id>’ requires a valid Classid or Progid in the object tag.

This error is self-explanatory. You have some variation of the following:

Of course, you need to tell ASP the ProgID or ClassID of the object you want to use, otherwise it will have no idea which object to create.


Active Server Pages, ASP 0120 (0x80004005)
The Runat attribute of the Script tag or Object tag can only have the value ‘Server’.

You probably have one of these:

<SCRIPT LANGUAGE=»VBScript» RUNAT=CLIENT>or

<OBJECT RUNAT=CLIENT>

If you are mixing server- and client-side scripts and/or objects, keep in mind that you only have to specify the RUNAT property for those you wish to be interpreted server-side. Since client-side is the default, just leave the RUNAT attribute out altogether.


Active Server Pages, ASP 0123 (0x80004005)
The required Id attribute of the Object tag is missing.

Again, this error is self-explanatory. Such elements need to have an ID associated with them, so that you can actually refer to it later to call methods and properties (I prefer set foo = CreateObject(«Prog.ID»), personally). So your existing code probably looks like this:

Just give it an ID, as follows:


Active Server Pages, ASP 0124 (0x80004005)
The required Language attribute of the Script tag is missing.or

Active Server Pages error ‘ASP 0124’
Missing Language attribute
/<file>, line <line>
The required Language attribute of the Script tag is missing.

You have a block of code that looks like this:

<script runat=server>
‘ …
</script>

You need to specify the language. If you mean to use the default language, use <%%> delimiters instead. See Article #2045 for information on how switching languages, and even delimiter style, can affect the way your script executes.


Active Server Pages, ASP 0125 (0x80004005)
The value of the ‘<attribute>’ attribute has no closing delimiter.

This is another helpful error message. Check the line the error points to, and see if there are any attribute values that have a missing trailing double-quote, e.g.:

<object id=foo runat=server progID=»Prog.ID>

To fix, either remove the leading double-quote, or add a trailing double-quote.


Active Server Pages, ASP 0126 (0x80004005)
The include file ‘/<file>’ was not found.

This is usually a simple error to fix… either you spelled the filename incorrectly, pointed to the wrong folder, or used #include virtual instead of #include file (or vice-versa).


Active Server Pages, ASP 0127 (0x80004005)
The HTML comment or server-side include lacks the close tag (–>).

Look for code like this in your ASP script:

<!–#include file=foo.asp
<% ‘ stuff %>or

<!– this is a comment
<% ‘ stuff %>

Make sure your comments and include directives are closed correctly, using –>.


Active Server Pages, ASP 0128 (0x80004005)
Missing File or Virtual attribute
The Include file name must be specified using either the File or Virtual attribute.

This can happen if you use code like this:

<!–#include=whatever.asp–>

It should either be:

<!–#include file=whatever.asp–>
or
<!–#include virtual=/whatever.asp–>

Active Server Pages, ASP 0129 (0x80004005)
The scripting language ‘<script language>’ is not found on the server.

You are attempting to use a language that is not installed, e.g. PerlScript. Make sure that you have installed all dependencies for running a specific host language in your ASP scripts.


Active Server Pages, ASP 0130 (0x80004005)
Invalid File attribute
/<file>.asp, line <line>
File attribute ‘/<file>.asp’ cannot start with forward
slash or back slash.or

Active Server Pages, ASP 0131 (0x80004005)
Disallowed Parent Path
/<file>.asp, line <line>
The Include file ‘../<file>.asp’ cannot contain ‘..’ to
indicate the parent directory.

See Article #2412 for a decription and resolution of these error messages.


Active Server Pages, ASP 0133 (0x80004005)
Invalid ClassID attribute
/<file>.asp, line <line>
The object has an invalid ClassID of ‘<classID>’or

Active Server Pages, ASP 0134 (0x80004005)
Invalid ProgID attribute
/<file>.asp, line <line>
The object has an invalid ProgID of ‘<prog.id>’

Usually, this is due to using a ProgID or ClassID that isn’t properly registered on the system. For more information about this error, see Article #2134.

Active Server Pages, ASP 0134 (0x80004005)
The object has an invalid ProgID of ‘MSWC.MyInfo’

This can happen if you try to use the default global.asa that ships with IIS 5.1 on Windows XP. XP doesn’t ship with the MSWC.MyInfo object by default, so the best solution is to rename the global.asa so it stops causing problems. In the default web root, you really don’t need a global.asa anyway… and if you do, it should be a lot more barebones than that one.


Active Server Pages, ASP 0135 (0x80004005)
The file ‘<file.asp>’ is included by itself (perhaps indirectly). Please
check include files for other Include statements.

Like the error suggests, an #include file is being included by itself somehow. While it may not contain an #include reference to itself, it may include a file that does. This may take a while to find; if so, it may be a hint that you need to simplify your include structure.


Active Server Pages, ASP 0136 (0x80004005)
The object instance ‘<id>’ is attempting to use a reserved name.
This name is used by Active Server Pages intrinsic objects.

You are using an <OBJECT> tag and gave it an ID=Response or ID=Application. Make sure you avoid using intrinsic names (others are Server, Session, and Request). You should also avoid using VBScript keywords like for, e.g. the following code will error in two places, depending on which is first:

<%
for.deleteFile(«c:\foo.txt»)
set foo = for.openTextFile(«c:\foo.txt»)
%>

The first line will result in this error:

Microsoft VBScript compilation (0x800A03F2)
Expected identifier

The second line will result in this error:

Microsoft VBScript compilation (0x800A03EA)
Syntax error

Active Server Pages, ASP 0137 (0x80004005)
Script blocks must be one of the allowed Global.asa procedures. Script
directives within <% … %> are not allowed within the Global.asa file. The
allowed procedure names are Application_OnStart, Application_OnEnd,
Session_OnStart, or Session_OnEnd.

You cannot place <% ‘ code %> within global.asa. Any code that executes within global.asa must do so within one of the four functions mentioned in the error message.


Active Server Pages, ASP 0138 (0x80004005)
A script block cannot be placed inside another script block.

This is a problem with the preprocessor, and can happen with the following code — which uses ASP to generate client-side script:

<script language=vbscript runat=server>
response.write «<script></script>»
</script>

To work around this, you can either (a) use <%%> delimiters for the server-side script, or (b) break up the client-side tag as follows:

<script language=vbscript runat=server>
response.write «<scr» & «ipt></scr» & «ipt>»
</script>

For more information, see Article #2294.


Active Server Pages, ASP 0139 (0x80004005)
An object tag cannot be placed inside another object tag.

Again, a self-explanatory error message. Make sure you haven’t done this:


Active Server Pages, ASP 0140 (0x80004005)
The @ command must be the first command within the Active Server Page.

Like the error states, you can’t place an @ directive tag after any other content in an ASP page.


Active Server Pages, ASP 0141 (0x80004005)
The @ command can only be used once within the Active Server Page.

This error means just what it sounds like; you should only have one @ directive in any ASP page. You should check any includes, if you only see one @ symbol in the base page. This is probably due to including two files that both use @language or other @ directives, but it is possible that you have two directives in the same page. It is also possible that you «need» two @ directives, for example if you need to specify a language and a codepage. You can work around this by using <script runat=server> and/or session.LCID syntax. See KB #307190 for more info.


Active Server Pages, ASP 0145 (0x80004005)
HTTP/1.1 New Application Failedor

Active Server Pages, ASP 0146 (0x80004005)
HTTP/1.1 New Session Failed

This can have something to do with the permissions of the anonymous user account (IUSR) — see KB #210842. You can also try unloading the application and reloading it, changing the memory settings (e.g. isolated vs. shared) or application pool, and finally rebooting the box.


Response object error ‘ASP 0156 : 80004005’
Header Error
/<file>.asp, line <line>
The HTTP headers are already written to the client browser. Any HTTP header
modifications must be made before writing page content.

You can’t use response.redirect or response.cookies after sending any HTML content to the browser, unless you have enabled response.buffer = true. For more information, seeArticle #2011 and Article #2217. This error can also happen if you write HTML content to the browser before setting a response. property, e.g.:

<html><% response.buffer = true %>

Response object error ‘ASP 0157 : 80004005’
Buffering On
/<file>.asp, line <line>
Buffering cannot be turned off once it is already turned on.

If you have enabled buffering at the site/application level, you can not disable it at page scope. See Article #2262 for more information.


Response object error ‘ASP 0158 : 80004005’
Missing URL
/<file>.asp, line <line>
A URL is required.

See Article #2375 for more information on this specific error message.


Response object error ‘ASP 0159 : 80004005’
Buffering Off
/<file>.asp, line <line>
Buffering must be on.

This can happen if you have disabled buffering and try to use buffer-dependent methods such as response.clear() or response.flush(). See Article #2262 for information about enabling buffering at the site / application level.


SessionID error ‘ASP 0164 : 80004005’
Invalid TimeOut Value
/<file>.asp, line <line>
An invalid TimeOut value was specified.

Session.timeout has a maximum of 1440 minutes (24 hours); if you specify a greater timeout value that this, you will receive the above error (see KB #233477). Why would you want such a long timeout anyway? Do you really expect people to be idle for 23 hours, and then pick up where they left off?


Session object, ASP 0168 (0x80004005)
An intrinsic object cannot be stored within the Session object.

This often happens when using JavaScript to retrieve Request.Form or Request.QueryString values, and assigning them to session variables. For example:

<script language=JavaScript runat=server>
Session(«variable») = Request.QueryString(«foo»);
</script>

Keeping in mind that Request.QueryString objects are objects, make sure to get the value of the object instead:

<script language=JavaScript runat=server>
Session(«variable») = Request.QueryString(«foo»).value;
</script>

Server.MapPath() error ‘ASP 0171 : 80004005’
Missing Path
/<file>.asp, line <line>
The Path parameter must be specified for the MapPath method.

This error message is pretty self-explanatory. You have used server.mappath() but you have either not passed it a value or the variable you passed did not contain the value you expected. Debug the line that is causing the error by changing this:

lPath = Server.MapPath(vPath)

To this:

Response.Write(vPath)
Response.End
‘lPath = Server.MapPath(vPath)

Server.MapPath() error ‘ASP 0172 : 80004005’
Invalid Path
/<file>.asp, line <line>
The Path parameter for the MapPath method must be a virtual path. A physical
path was used.

Like the error says, you can only use relative paths with Server.MapPath, since the purpose of the function is to generate a local/physical path from a web structure. So, if you have the physical path already, don’t bother calling Server.MapPath().


Server.MapPath(), ASP 0173 (0x80004005)
An invalid character was specified in the Path parameter for the MapPath method.or

Server.MapPath() error ‘ASP 0174 : 80004005’
Invalid Path Character(s)
<file>.asp, line <line>
An invalid ‘/’ or ‘\’ was found in the Path parameter for the MapPath method.

This error message is discussed at length in Article #2302.


Server.MapPath(), ASP 0175 (0x80004005)
The ‘..’ characters are not allowed in the Path parameter for the MapPath
method.

If you are trying to give a reference to a file in a parent folder, you might have to work around this problem by using a path relative from the root, rather than relative to the current folder.


Server.MapPath(), ASP 0176 (0x80004005)
The path parameter for the MapPath method did not correspond to a known
path.

Check that the path you are passing into the MapPath method makes sense. Try to use a path relative to the root.


Server object error ‘ASP 0177 : 80004005’
Server.CreateObject Failed

See KB #179406 for information about this error.


Active Server Pages, ASP 0194 (0x80004005)
An error occurred in the OnEndPage method of an external object.

This error message is discussed in Article #2171.


Application object, ASP 0197 (0x80004005)
Cannot add object with apartment model behavior to the application intrinsic object.or

Application object error ‘ASP 0197 : 80004005’
Disallowed object use /LM/W3SVC/1/Root/<site>/global.asa, line 7
Cannot add object with apartment model behavior to the application intrinsic object.

See Article #2053 for several links on the limitations of components written using the apartment model, and see KB #822828. If you are using MSWC.BrowserType, see KB #194397 — however, I do not agree with the workaround recommended in the article. Create and destroy objects per page, as you need them.


Active Server Pages error ‘ASP 0203’
Invalid Code Pageor

SessionID error ‘ASP 0204 : 80004005’
Invalid CodePage Value

or

Session object, ASP 0204 (0x80004005)
Invalid CodePage Value

or

Response object error ‘ASP 0219 : 80004005’
Invalid LCID
/<file>.asp, line <line>
The specified LCID is not available.

or

Response object error ‘ASP 0246 : 80004005’
Invalid Default Code Page

This can happen if you try to specify an LCID / CodePage that your system isn’t set up to handle, e.g. on a default install:

<%
ShowLocaleDate 1041, «Japan»Sub ShowLocaleDate(lcid, Locale)
Response.LCID = lcid
Response.Write «<B>» & Locale & «</B><BR>»
Response.Write FormatDateTime(Date, 1)
End Sub
%>

or

<% @LANGUAGE=VBScript CODEPAGE=1041 %>

To fix, either use a different LCID, or you will need to install support for far east languages (in the case of Japan) or whatever codepage you need to use (e.g. support for right-to-left languages, if you need to support Arabic or Indian), through the «regional settings» applet in the control panel. Here is where these options live in Windows Server 2003:

You can also download additional language support if you need to use a language that your system doesn’t currently support. For more information, see KB #261247.


Request object, ASP 0206 (0x80004005)
Cannot call BinaryRead after using Request.Form collectionRequest object, ASP 0207 (0x80004005)
Cannot use Request.Form collection after calling BinaryRead.

Request object, ASP 0208 (0x80004005)
Cannot use the generic Request collection after calling BinaryRead.

When you are uploading files, you need to use a different mechanism to get the text from any ‘regular’ form controls. See Article #2166 for more information.


Response object, ASP 0211 (0x80004005)
A built-in ASP object has been referenced, which is no longer valid.

This can happen if you reference an application- or session-level object in application_onEnd or session_onEnd, and the object no longer exists. You should peruse the links inArticle #2053 to see why you should rarely be using any type of object in application or session scope.


Active Server Pages, ASP 0217 (0x80004005)
Object scope must be Page, Session or Application.

You might have something along these lines:

<object id=foo runat=server progID=»Prog.ID» scope=foo>

As the error states, the only valid scope values are Page, Session and Application. However, it is very rare that you would be creating an object for application or session scope (seeArticle #2053), and since the default is page, you won’t normally need to include the scope attribute in your object tags at all.


Active Server Pages, ASP 0221 (0x80004005)
The specified ‘<text>’ option is unknown or invalid.

If <text> is:

SCRIPT LANGUAGE=»VBSCRIPT» 

It is likely that you attempted this:

<%@ SCRIPT LANGUAGE=»VBScript» %>

The SCRIPT keyword is redundant here. Your tag should look like this:

<%@ LANGUAGE=»VBScript» %>

runat=server

It is likely that you attempted this:

<%@ LANGUAGE=»VBScript» RUNAT=SERVER %>

The runat option is unnecessary in an <%@ %> directive, because the tag is already interpreted only in server-side script. The runat=server option only belongs in a server-side script defined with the following syntax:

<Script Language=VBScript Runat=Server>

Page Language=»vb»

You are attempting to use VB.Net in an ASP page. You should be using an ASP.NET page, with an ASPX extension.


Active Server Pages, ASP 0223 (0x80004005)
METADATA tag contains a Type Library specification that does not match any
Registry entry.or

Active Server Pages, ASP 0224 (0x80004005)
Cannot load Type Library specified in the METADATA tag.

Double-check your METADATA tags in global.asa — one of them points to an invalid file or ProgID. For valid METADATA tags to load TypeLibs for various MDAC versions, see Article #2112.


Server object, ASP 0228 (0x80004005)
The call to Server.Execute failed while loading the page.or

Server object, ASP 0230 (0x80004005)
The call to Server.Transfer failed while loading the page.

Check the URL that you are passing to the transfer or execute method. Make sure it is a relative URL, and that you can hit it with a browser. Response.Write a Server.MapPath on the value you are passing, and make sure it produces a valid local path.


Server object, ASP 0231 (0x80004005)
Invalid URL form or fully-qualified absolute URL was used. Use relative
URLs.or

Server object, ASP 0235 (0x80004005)
Invalid URL form or fully-qualified absolute URL was used. Use relative
URLs.

With Server.Transfer and Server.Execute, you cannot pass absolute (e.g. http://url/ or c:\file\) URLs, nor can you pass querystrings. The target page will have access to values from the Request collections, and there are workarounds described in Article #2030. If you are meaning to execute a page on a different server, see Article #2173 for a small tutorial on using the XMLHTTP object.


Active Server Pages, ASP 0234 (0x80004005)
Server side include directives may not be present in
script blocks. Please use the SRC= attribute of the
<SCRIPT> tag.

This can happen when you try and implement the following code:

<script language=vbscript runat=server>
<!–#include file=’rw.asp’–>
</script>

The following syntax doesn’t choke, but the #include file does not execute.

<%
<!–#include file=’rw.asp’–>
%>

There is no reason to put the #include directive inside an existing ASP code block.


Active Server Pages, ASP 0238 (0x80004005)
No value was specified for the ‘version’ attribute.

You are probably including a METADATA tag for XML in the following format:

<!–METADATA TYPE=»TypeLib» NAME=»Microsoft XML, version 2.0″
UUID=»{D63E0CE2-A0A2-11D0-9C02-00C04FC99C8E}» VERSION=»2.0″–>

Note the following change, which should alleviate the error:

<!–METADATA TYPE=»TypeLib» NAME=»Microsoft XML, v2.0»
UUID=»{D63E0CE2-A0A2-11D0-9C02-00C04FC99C8E}» VERSION=»2.0″–>

However a more appropriate fix would be to install / use a more recent version of the XML SDK.

Active Server Pages, ASP 0238 (0x80004005)
No value was specified for the ‘PROGID’ attribute.

Check your METADATA tag, it is either missing the PROGID attribute entirely, or it is empty.


Active Server Pages, ASP 0239 (0x80004005)
UNICODE ASP files are not supported.

Make sure you have installed language support for the language you want to use, and that you have correctly set the Session.LCID or Session.Codepage to the appropriate value. See KB #245000 for more information.


Active Server Pages, ASP 0240 (0x80004005)
A ScriptEngine threw expection ‘C0000005’ in
‘IActiveScript::GetScriptState()’ from ‘CActiveScriptEngine::ReuseEngine()’.or

Active Server Pages, ASP 0241 (0x80004005)
The CreateObject of ‘(null)’ caused exception E06D7363.

For a lengthy discussion of these error messages, see Article #2355.


Active Server Pages, ASP 0243 (0x80004005)
Only METADATA TYPE=»TypeLib» may be used in Global.asa.

Sounds like another case of a malformed METADATA tag. Check your syntax and double-check it against the source.


Response object error ‘ASP 0251 : 80004005’
Response Buffer Limit Exceeded
Execution of the ASP page caused the Response Buffer to exceed its configured limit.

This means you tried to build a very, very, very large string or tried to write a whole lot of data using Response.Write. If you are returning data to the screen in a loop, make sure you put Response.Clear() somewhere in your iteration. And don’t try to build an entire web page of data and store it in a single variable.

Convertidor online de texto plano a HTML


Realmente convierte ambos formatos. Plano a HTML o viceversa.
Es muy sencillo de usar y puedes pegar el texto al editor.
Va muy bien para formatear rápidamente contenidos de distintas fuentes.

Convertidor

Tiene opciones para añadir Flash, formularios, etc.
Y un muy util botón de quitar formato
Un gran trabajo con la máxima sencillez.

Puede que os interese un articulo reciente para crear tu propio editor. Aqui

En breve publicaré articulos para crear tu propio formulario a medida, solo con las opciones que necesitas.

Escribir código HTML dentro de documentos HTML


 

 

 

 

He encontrado esta herramienta online que es muy útil.

http://simplebits.com/cgi-bin/simplecode.pl?mode=process

Si quieres mostrar como se resuelve un problema exponiendo un código de ejemplo, te encontrarás con el problema siguiente, y es que HTML interpretará ese código como propio, por tanto si quieres poner un ejemplo de como se usa el tag A con HREF, no te lo mostrará, sino que directamente te lo traducirá al enlace correspondiente.

Con este pequeño convertidor se superará ese problema si estás escribiendo directamente en HTML.

No quita que si lo haces por ejemplo con el asistente de WordPress , pues haga una nueva traducción por su parte, por lo tanto no sirve de mucho. Y si no, prueba a poner un ejemplo de iframe y verás que risa.

 

 

 

Ocultar URL de tu página


Salvo que te quieras liar con .htaccess, puedes hacerlo con un iframe.

Creas un iframe dentro de tu página, que contenga la URL en cuestión.


iframe src="https://danielcatala.wordpress.com"></iframe>

El problema es que si lo dejas así, solo te mostrará un cuadrito pequeñito con dos barras de desplazamiento.
Puedes evitar esto, dandole al iframe el mismo tamaño de la página.
Esto se haría con esto:


<style type="text/css">

html, body, div, iframe { margin:0; padding:0; height:100%; }

iframe { display:block; width:100%; border:none; }

</style>