Mostrando entradas con la etiqueta YouTube. Mostrar todas las entradas
Mostrando entradas con la etiqueta YouTube. Mostrar todas las entradas

martes, 14 de julio de 2015

JAVASCRIPT: Crear una Agenda de Direcciones con COOKIES

Colocar Entre el <HEAD> y </HEAD>

<SCRIPT LANGUAGE="JavaScript">
var arrRecords = new Array();
var arrCookie = new Array();
var recCount = 0;
var strRecord="";
expireDate = new Date;
expireDate.setDate(expireDate.getDate()+365);
function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i = 0; i < thisCookie.length; i++) {
if (cookieName == thisCookie[i].split("=")[0]) {
return thisCookie[i].split("=")[1];
}
}
return 0;
}
function loadCookie() {
if(document.cookie != "") {
if(cookieVal("Records") != ""){
arrRecords = cookieVal("Records").split(",");
}
currentRecord();
}
}
function setRec() {
strRecord = "";
for(i = 0; i < document.frm1.elements.length; i++) {
strRecord = strRecord + document.frm1.elements[i].value + ":";
}
arrRecords[recCount] = strRecord;
document.frm2.add.value = " NEW ";
document.cookie = "Records="+arrRecords+";expires=" + expireDate.toGMTString();
}
function newRec() {
switch (document.frm2.add.value) {
case " NEW " :
varTemp = recCount;
for(i = 0; i < document.frm1.elements.length; i++) {
document.frm1.elements[i].value = ""
}
recCount = arrRecords.length;

document.frm2.add.value = "CANCEL";
break;
case "CANCEL" :
recCount = varTemp;
document.frm2.add.value = " NEW ";
currentRecord();
break;
}
}
function countRecords() {
document.frm2.actual.value = "Record " + (recCount+1)+"; "+arrRecords.length+" saved records";
}
function delRec() {
arrRecords.splice(recCount,1);
navigate("previous");
setRec();
}
function currentRecord() {
if (arrRecords.length != "") {
strRecord = arrRecords[recCount];
currRecord = strRecord.split(":");
for(i = 0; i < document.frm1.elements.length; i++) {
document.frm1.elements[i].value = currRecord[i];
}
}
}
function navigate(control) {
switch (control) {
case "first" :
recCount = 0;
currentRecord();
document.frm2.add.value = " NEW ";
break;
case "last" :
recCount = arrRecords.length - 1;
currentRecord();
document.frm2.add.value = " NEW ";
break;
case "next" :
if (recCount < arrRecords.length - 1) {
recCount = recCount + 1;
currentRecord();
document.frm2.add.value = " NEW ";
}
break;
case "previous" :
if (recCount > 0) {
recCount = recCount - 1;
currentRecord();
}
document.frm2.add.value = " NEW ";
break;
default:
}
}
function pageLoad(){

if (!Array.prototype.splice) {

function array_splice(ind,cnt) {
if (arguments.length == 0) return ind;
if (typeof ind != "number") ind = 0;
if (ind < 0) ind = Math.max(0,this.length + ind);
if (ind > this.length) {
if (arguments.length > 2) ind = this.length;
else return [];
}
if (arguments.length < 2) cnt = this.length-ind;
cnt = (typeof cnt == "number") ? Math.max(0,cnt) : 0;
removeArray = this.slice(ind,ind+cnt);
endArray = this.slice(ind+cnt);
this.length = ind;
for (var i = 2; i < arguments.length; i++) {
this[this.length] = arguments[i];
}
for(var i = 0; i < endArray.length; i++) {
this[this.length] = endArray[i];
}
return removeArray;
}
Array.prototype.splice = array_splice;
}
recCount = 0;
loadCookie();
countRecords();
}
</script>


Colocar dentro del Tag <BODY> ejemplo <Body onLoad="pageLoad()">


Colocar entre el <BODY> y </BODY>
<center>
<form name="frm1">
<table align="center" resize="none" border="0">
<tr>
<td align="right">Name:</td>
<td colspan="5"><input type="box" name="name" size="49"></td>
</tr>
<tr>
<td align="right">Address:</td><td colspan="5"><input type="box" name="address" size="49"></td></tr>
<td align="right">Address 2:</td><td colspan="5" align="left"><input type="box" name="address2" size="49"></td>
</tr>
<tr>
<td align="right">City:</td>
<td><input type="box" name="city" size="15"></td>
<td>State:</td><td><input type="box" name="state" size="15"></td>
<td>Zip:</td><td><input type="box" size="6" name="zip"></td>
</tr>
<tr>
<td align="right">Phone:</td>
<td align="left"><input type="box" name="phone" size="15"></td>
<td align="right">Fax:</td><td align="left"><input type="box" name="fax" size="15"></td>
</tr>
<tr>
<td align="right">Web Page:<td colspan="5" align="left"><input type="box" name="address" size="49"></td>
</tr>
<tr>
<td align="right">E-Mail:<td colspan="5" align="left"><input type="box" name="email" size="49"></td>
</tr>
<tr>
<td align="right" valign="top">Comments:</td>
<td colspan="5" align="left"><input type="box" name="comment1" size="49"><br>
<input type="box" name="comment2" size="49"><br>
<input type="box" name="comment3" size="49"><br>
<input type="box" name="comment4" size="49"><br>
<input type="box" name="comment5" size="49">
</td>
</tr>
</table>
</form>
<form name="frm2">
<table align="center" border="1" resize="none">
<tr>
<td align="center">
<input type="button" name="first" value="|<< " onClick="navigate('first');countRecords()">
<input type="button" name="previous" value=" < " onClick="navigate('previous');countRecords()">
<input type="button" name="next" value=" > " onClick="navigate('next');countRecords()">
<input type="button" name="last" value=" >>|" onClick="navigate('last');countRecords()">
<input type="box" name="actual" size=30>
</td>
</tr>
<tr>
<td align="center">
<input type="button" name="add" value=" NEW " onClick="newRec();countRecords()">
<input type="button" name="set" value="SAVE RECORD" onClick="setRec();countRecords()">
<input type="button" name="del" value="Delete" onClick="delRec();countRecords()">
</td>
</tr>
</table>
</form>
</center>

JAVASCRIPT: Mostrar la Última Visita de una Persona en tu Web

En el <HEAD> Y </HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin

var expDays = 30;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function Who(info){
var VisitorName = GetCookie('VisitorName')
if (VisitorName == null) {
VisitorName = prompt("Quién eres tú ?");
SetCookie ('VisitorName', VisitorName, exp);
}
return VisitorName;
}
function When(info){
var rightNow = new Date()
var WWHTime = 0;
WWHTime = GetCookie('WWhenH')
WWHTime = WWHTime * 1
var lastHereFormatting = new Date(WWHTime);
var intLastVisit = (lastHereFormatting.getYear() * 10000)+(lastHereFormatting.getMonth() * 100) + lastHereFormatting.getDate()
var lastHereInDateFormat = "" + lastHereFormatting;
var dayOfWeek = lastHereInDateFormat.substring(0,3)
var dateMonth = lastHereInDateFormat.substring(4,11)
var timeOfDay = lastHereInDateFormat.substring(11,16)
var year = lastHereInDateFormat.substring(23,25)
var WWHText = dayOfWeek + ", " + dateMonth + " at " + timeOfDay
SetCookie ("WWhenH", rightNow.getTime(), exp)
return WWHText
}
function Count(info){
var WWHCount = GetCookie('WWHCount')
if (WWHCount == null) {
WWHCount = 0;
}
else{
WWHCount++;
}
SetCookie ('WWHCount', WWHCount, exp);
return WWHCount;
}
function set(){
VisitorName = prompt("Quién eres tú ?");
SetCookie ('VisitorName', VisitorName, exp);
SetCookie ('WWHCount', 0, exp);
SetCookie ('WWhenH', 0, exp);
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
// End -->
</SCRIPT>


ENTRE EL <BODY> Y </BODY>


<SCRIPT LANGUAGE="JavaScript">
document.write("Hola " + Who() + ". Tú estuviste aquí " + Count() + " veces. La última vez fué: " + When() +".");
</SCRIPT>

miércoles, 21 de abril de 2010

¿QUE PASARÍA SI WINDOWS, APPLE Y BURGER KING LOS HUBIERA CREADO UN HISPANO?


La marca es algo más que un nombre corporativo. Representa toda la percepción que un cliente tiene de una empresa. La construcción de la marca es esencial para el posicionamiento de producto o servicio en el mercado. El logotipo, el nombre, son algunos de los factores que determinan la popularidad y hacen que la compañía sea identificada por el consumidor.

Youtube, Windows, Apple, Twitter, son algunas de las marcas cuyos nombres, junto con sus logotipos, ya se consolidaron en nuestras mentes y pese a su sencillez, sus títulos no nos parecen convencionales.

¿Pero que pasaría si tradujeramos literalmente estos grandes nombres al español o a cualquier otro idioma? ¿Tendrían el mismo impacto?

La idea de adecuar las identidades de las empresas reconocidas para el mundo hispano surgió en el sitio web alvago.com.ar RT continúa la lista de las marcas. Los resultados, sin duda, son muy divertidos.



Microsoft – Microsuave

La empresa estadounidense fundada por Bill Gates en 1975, creadora del sistema operativo Microsoft Windows y de la suite Microsoft Office, en español se llamaría 'Microsuave'.



Imágen: RT

Apple

Durante tres meses el equipo de socios de Steve Jobbs intentó, sin ningún éxito, inventar un nombre ingenioso para su nuevo negocio. Al final, Jobbs, cansado de rechazar sus ideas, les presentó un ultimátum: “Si hasta las 5 de la tarde no inventan nada bueno, la compañía se llamará 'Manzana'”.



Imágen: RT

Photoshop

La creación más famosa de la marca Adobe, el software de diseño y edición de imágenes, literalmente significa “Tienda de fotografías”.


Imágen: alvago.com.ar

YouTube

El reconocido canal, fundado en 2005 en California, permite alojar vídeos personales de manera sencilla. En español sería 'Tu tubo'.


Imágen: alvago.com.ar

Twitter

El servicio de 'microblogging', que fue puesto en marcha en 2006 en San Francisco, permite a sus usuarios enviar micro mensajes de texto, llamados 'tweet' o 'gorjeos'.

VÍDEOS HECHOS CON LETRAS... SÓLO EN YOUTUBE


El 1 de abril Youtube sorprendió a sus usuarios con una nueva opción para ver los vídeos, llamada TEXTp. A partir de ahora, los usuarios pueden elegir entre una imagen común y una hecha de centenares de letras y cifras. Esta teconología, según YouTube, ahorrará un dólar por minuto. Los creadores afirman que cada día se suben más vídeos a la página y la cantidad de grabaciones aumentó aún más con la introducción de los modos 1080p y HD. Esto significa considerables costos para la empresa. "Por eso, para controlar los gastos, decidimos que el 1 de abril será un día perfecto para dar un paso importante y ofrecer una nueva experiencia: opción sólo texto o tEXTp”, informa el blog oficial de la página.


"TEXTp es el resultado de meses de esfuerzos de nuestro ingenieros. Cambiando imágenes por una serie de letras y números, bajamos las tarifas para los vídeos… y ni hablar de que con esta manera ayudamos a subir el nivel de alfabetismo".

Para disfrutar de la nueva opción y ahorrar unos dólares para la página web, basta con tener la última versión del reproductor Flash. Nada más tiene que eligir "TEXTp" en el menú que aparece debajo de la imagen.

Los creadores señalan que mirando los vídeos en texto, todos los usuarios juntos podrían recaudar miles de millones de dólares para YouTube. "Así que si Youtube le importa, use TEXTp", afirman.