Search Results

Search found 1446 results on 58 pages for 'prototype stark'.

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

  • using JQuery and Prototype in the same page; more explanation needed!

    - by xenogen
    Hi everybody! I'm continuously having the problem when i use jquery lightbox (which runs prototype) and jquery news slider. I tried the "noconflict" method. The problem is I don't know the exact place to put the code. So, here, i'm putting my scripts within . So, please troubleshoot it and explain me where to put the patch. thank you very much. <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Jquery</title> <script type="text/javascript" src="lb/js/prototype.js"></script> <script type="text/javascript" src="lb/js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="lb/js/lightbox.js"></script> <link href="lb/css/lightbox.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="news/jquery-1.2.3.pack.js"></script> <script type="text/javascript" src="news/jquery.easynews.js"></script> <style> html { background-color: #FFA928; font: normal 76% "Arial", "Lucida Grande",Verdana, Sans-Serif; color:black; } a { text-decoration: none; font-weight: bold; } .news_style{ display:none; } .news_show { background-color: white; color:black; width:350px; height:150px; font: normal 100% "Arial", "Lucida Grande",Verdana, Sans-Serif; overflow: auto; } .news_border { background-color: white; width:350px; height:150px; font: normal 100% "Arial", "Lucida Grande",Verdana, Sans-Serif; border: 1px solid gray; padding: 5px 5px 5px 5px; overflow: auto; } .news_mark{ background-color:white ; font: normal 70% "Arial", "Lucida Grande",Verdana, Sans-Serif; border: 0px solid gray; width:361px; height:35px; color:black; text-align:center; } .news_title{ font: bold 120% "Arial", "Lucida Grande",Verdana, Sans-Serif; border: 0px solid gray; padding: 5px 0px 9px 5px; color:black; } .news_show img{ margin-left: 5px; margin-right: 5px; } .buttondiv { position: absolute; /*float: left;*/ /*top: 169px;*/ padding: 5px 5px 5px 5px; background-color:white ; border: 1px solid gray; /*border-top-color: white;*/ border-top:none; height:20px; } </style> <script> $(document).ready(function(){ var newsoption1 = { firstname: "mynews", secondname: "showhere", thirdname:"news_display", fourthname:"news_button", newsspeed:'6000' } $.init_news(newsoption1); var myoffset=$('#news_button').offset(); var mytop=myoffset.top-1; $('#news_button').css({top:mytop}); }); </script> </head>

    Read the article

  • Why use object.prototype.constructor in OOP javascript?

    - by Matt
    I've recently started reading up on OOP javascript and one thing that authors seem to skip over is when an object A has been declared and suddenly I see "A.prototype.constructor =A; For example, var A = function(){}; // This is the constructor of "A" A.prototype.constructor = A; A.prototype.value = 1; A.prototype.test = function() { alert(this.value); } var a = new A(); // create an instance of A alert(a.value); // => 1 So I run the command in firebug "var A = function(){};" and then "A.Constructor" Which reveals it's a function. I understand this. I run the code "A.prototype.constructor = A;" and I thought this changes the A constructor from Function to A. The constructor property of A has been changed right? Instead when I run "A.constructor" it gives me function () still. What's the point? I also see A.constructor.prototype.constructor.prototype.. what is going on?

    Read the article

  • How to retrieve the value from Select html element using JS prototype in php?

    - by user309381
    <script type="text/javascript" src="prototype.js"></script> <script> function reload(form){ var val = $("seltab");alert(val); }</script> echo "<form method = post name = f1 action = '' >"; echo "<select id = seltab onchange = 'reload(this.form)'>"; $querysel = "SELECT title_id,author FROM authors NATURAL JOIN books"; $result1 = mysql_query($querysel) ; while($rowID = mysql_fetch_assoc($result1)) { $TitleID = $rowID['title_id']; $author = $rowID['author']; print "<option value =$TitleID>$author\n"; print "</option>"; } print "</select>";

    Read the article

  • How do I dynamically load a js file using Prototype?

    - by domagoj412
    Hello, I am using prototype to load external js file (actually it is php file) dynamically. Like this: function UpdateJS(file) { var url = 'main_js.php?file='+file; var myAjax = new Ajax.Request( url, {method: 'get', onComplete: showResponseHeader} ); } function showResponseHeader (originalRequest) { $('jscode').innerHTML = originalRequest.responseText; } Container "jscode" is defined like this: <script type="text/javascript" id="jscode"></script> And it works! But if some different file is called, all the functions from previous one are preserved. And I don't want that. Anybody knows how to "unload" first js file when second one is called? (I also tried using Ajax.Updater function but the result is the same.) Update: It turns out that there is bigger problem: it only loads if function "UpdateJS" is in window.onload that is why it doesn't load anything else after that. So prototypes update it's maybe not such a good way for this...

    Read the article

  • Thumbs Up or Thumbs Down – Intel Debuts Prototype Palm-Reading Tech to Replace Passwords [Poll]

    - by Asian Angel
    This week Intel debuted prototype palm-reading tech that could serve as a replacement for our current password system. Our question for you today is do you think this is the right direction to go for better security or do you feel this is a mistake? Photo courtesy of Jane Rahman. Needless to say password security breaches have been a hot topic as of late, so perhaps a whole new security model is in order. It would definitely eliminate the need to remember a large volume of passwords along with circumventing the problem of poor password creation/selection. At the same time the new technology would still be in the ‘early stages’ of development and may not work as well as people would like. Long-term refinement would definitely improve its performance, but would it really be worth pursuing versus the actual benefits? From the blog post: Intel researcher Sridhar Iyendar demonstrated the technology at Intel’s Developer Forum this week. Waving a hand in front of a “palm vein” detector on a computer, one of Iyendar’s assistants was logged into Windows 7, was able to view his bank account, and then once he moved away the computer locked Windows and went into sleeping mode. How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using? HTG Explains: What The Windows Event Viewer Is and How You Can Use It

    Read the article

  • Windows Phone 7 Prototype 002: Animated Page Transitions + Writeable Bitmaps

    Motion is a key part of WP7 application development. Without motion, the WP7 UI is just a bunch of text. Not nearly as exciting. To delight users, you can add some transitions between pages.  The sample app includes some storyboards to animate between two pages. Other people have noted that you can just use the transitioning content control form the SIlverlight toolkit. Peter Torr also had a nice animating frame control in his mix demo code (his blog has some other great code samples for WP7 app dev). I took some of those concepts and the code from the TransitioningContentControl to make a new animating frame control. In this prototype, the frame takes a snapshot of the old content and the new content using writeable bitmaps and animates the snapshots and then replaces those with the actual page. The benefit is smoother animation on pages with lots of controls. Otherwise, if you have a large panorama, it might not animate that cleanly.  Like the other solutions based on the TransitioningContentControl, you can centralize all the animations in one place and not have to handle them on each individual page. Peters code also had a nice snippet for choosing the animation based on the navigation direction so you could just have a forward / backward animation and not have to do anything on each page. You could also probably add some more advanced transitions using pixel shaders or make an default no transition state if you wanted to have some specific animation on a page where individual  controls transitioned out differently like some of the WP7 shell apps. Sample Code 100% guaranteed to work on my emulatorDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Prototype or JQuery change the value of a hidden field?

    - by Nick Faraday
    I'm having some trouble with prototype changing the value of a hidden field. Function: function remove_fields (link) { $(link).next('input[type=hidden]').value = ''; $(link).up(".open_hours").hide(); } If I comment out the $(link).next('input[type=hidden]').value = ''; the hide function works. Trying to set the value gives me an error: $(link).next("input[type=hidden]") is undefined Here is my HTML around the function call: <div class="monday"> <div class ="open_hours"> <li><label for="location_monday">Monday</label> Open: 06:29PM - Close: 04:21PM <a href="#" onclick="remove_fields(this); return false;">remove</a></li> <li class="hidden optional" id="location_monday_open_input"><input id="location_monday_open" name="location[monday_open]" type="hidden" value="18:29:00" /></li> <li class="hidden optional" id="location_monday_close_input"><input class="close" id="location_monday_close" name="location[monday_close]" type="hidden" value="16:21:00" /></li> </div> </div> Not sure what I'm doing wrong here? Thanks Guys!

    Read the article

  • Prototype: Form.serialize missing some inputs (due to table?)

    - by Chris
    I'm using JavaScript Prototype (through Ruby on Rails) to handle some Ajax calls; but in one particular case I'm missing a field from the form. I have a layout like this: +---------+---------+ | Thing 1 | Thing 2 | +---------+---------+-----------+ | o Opt 1 | o Opt 1 | <Confirm> | | o Opt 2 | o Opt 2 | | +---------+---------+-----------+ Opt 1 and 2 are Radio buttons, Confirm is a button. The entire table is wrapped in a form, with code like: <form action="javascript:void(0)"> <input type="hidden" name="context" value="foo" /> <input type="hidden" name="subcontext" value="bar" /> <table> <tr><td>Thing 1</td><td>Thing2</td></tr> <tr><td> <input type="radio" name="choice" value="1.1" />Opt 1<br /> <input type="radio" name="choice" value="1.2" />Opt 2<br /> </td><td> <input type="radio" name="choice" value="2.1" />Opt 1<br /> <input type="radio" name="choice" value="2.2" />Opt 2<br /> </td><td> <input name="choice_btn" type="button" value="Confirm" onclick="new AJAX.Updater('my_form', '/process_form', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this.form)}); return false;" /> </td></tr> </table> </form> But I can see that the POST generated by clicking the Confirm button contains the foo and bar values for the hidden fields, but not the choice of the radio buttons. Is this because I've got a table inside my form? How can I get around this?

    Read the article

  • Does jQuery have an equivalent to Prototype's Element.identify?

    - by Alan Storm
    Is there a built in method or defacto default plugin that will let you automatically assign an unique ID to an element in jQuery, or do you need to implement something like this yourself? I'm looking for the jQuery equivalent to Prototype's identify method Here's an example. I have some HTML structure on a page that looks like this <span id="prefix_1">foo bar</span> ... <div id="foo"> <span></span> <span></span> <span></span> </div> I want to assign each of the spans an ID that will be unique to the page. So after calling something like this $('#foo span').identify('prefix'); //fake code, no such method The rendered DOM would look something like this <span id="prefix_1">foo bar</span> ... <div id="foo"> <span id="prefix_2"></span> <span id="prefix_3"></span> <span id="prefix_4"></span> </div> Is there anything official-ish/robust for jQuery, or is this something most jQuery developers roll on their own?

    Read the article

  • How to disable Rails submit buttons alongside Prototype helpers & RJS?

    - by Jesse
    I'm trying to follow this post http://stackoverflow.com/questions/576240/how-can-i-unobtrusively-disable-submit-buttons-with-javascript-and-prototype but I can't get it to work. The form triggers an RJS function, so I need to keep the helpers' onclick events intact. The RJS returns/reloads the same forms along with two new texts. I'm really confused. Here is my rails code for the forms: .span-20#comparison / new comparison . . . / voting forms (also reloaded) .span-4.prepend-3.append-6 - form_remote_tag :action => url_for(:controller => :comparisons), :method => :post do = hidden_field_tag :poem1_id, poems[:a].id = hidden_field_tag :poem2_id, poems[:b].id = hidden_field_tag :response, 1 = submit_tag "Vote for me", :disabled => false, :disable_with => 'Vote for me', :class => "compare" .span-4.append-3.last - form_remote_tag :action => url_for(:controller => :comparisons), :method => :post do = hidden_field_tag :poem1_id, poems[:a].id = hidden_field_tag :poem2_id, poems[:b].id = hidden_field_tag :response, 2 = submit_tag "Vote for me", :disable_with => 'Vote for me', :class => "compare" .span-4.prepend-8.append-8.prepend-top.last - form_remote_tag :action => url_for(:controller => :comparisons), :method => :post do = hidden_field_tag :poem1_id, poems[:a].id = hidden_field_tag :poem2_id, poems[:b].id = hidden_field_tag :response, 'draw' = submit_tag "Declare Draw", :disable_with => 'Declare Draw', :class => "compare" RJS page.replace_html :comparison, :partial => 'poems', :object => @poems page.insert_html :top, :previous, :partial => 'comparison', :object => @comparison page << "Effect.ScrollTo($('top'));"

    Read the article

  • How do disable Rails submit buttons alongside Prototype helpers & RJS?

    - by Jesse
    I'm trying to follow this post http://stackoverflow.com/questions/576240/how-can-i-unobtrusively-disable-submit-buttons-with-javascript-and-prototype but I can't get it to work. The form triggers an RJS function, so I need to keep the helpers' onclick events intact. The RJS returns/reloads the same forms along with two new texts. I'm really confused. Here is my rails code for the forms: .span-20#comparison / new comparison . . . / voting forms (also reloaded) .span-4.prepend-3.append-6 - form_remote_tag :action => url_for(:controller => :comparisons), :method => :post do = hidden_field_tag :poem1_id, poems[:a].id = hidden_field_tag :poem2_id, poems[:b].id = hidden_field_tag :response, 1 = submit_tag "Vote for me", :disabled => false, :disable_with => 'Vote for me', :class => "compare" .span-4.append-3.last - form_remote_tag :action => url_for(:controller => :comparisons), :method => :post do = hidden_field_tag :poem1_id, poems[:a].id = hidden_field_tag :poem2_id, poems[:b].id = hidden_field_tag :response, 2 = submit_tag "Vote for me", :disable_with => 'Vote for me', :class => "compare" .span-4.prepend-8.append-8.prepend-top.last - form_remote_tag :action => url_for(:controller => :comparisons), :method => :post do = hidden_field_tag :poem1_id, poems[:a].id = hidden_field_tag :poem2_id, poems[:b].id = hidden_field_tag :response, 'draw' = submit_tag "Declare Draw", :disable_with => 'Declare Draw', :class => "compare" RJS page.replace_html :comparison, :partial => 'poems', :object => @poems page.insert_html :top, :previous, :partial => 'comparison', :object => @comparison page << "Effect.ScrollTo($('top'));"

    Read the article

  • AS3: Adding get/set methods to a class via prototype

    - by LiraNuna
    I'm looking for a way to extend a class via prototype by adding a get and set functions. The following code will add a function to the class' prototype: MyClass.prototype.newMethod = function(... args) { }; However I want to add both a get and set functions. I tried: MyClass.prototype.fakeProperty = get function(... args) { }; MyClass.prototype.fakeProperty = set function(... args) { }; But that seem to throw compile errors. Is this even possible? Is there some 'internal' naming convention for get/set functions? I am not looking for answers such as 'create a new class and new get/set functions there'.

    Read the article

  • Inheritance of jQuery's prototype partially fails

    - by user1065745
    I want to use Coffeescript to create an UIObject class. This class should inherit from jQuery, so that instances of UIObject can be used as if they where created with jQuery. class UIObject isObject: (val) -> typeof val is "object" constructor: (tag, attributes) -> @merge jQuery(tag, attributes), this @UIObjectProperties = {} merge: (source, destination) -> for key of source if destination[key] is undefined destination[key] = source[key] else if @isObject(source[key]) @merge(source[key], destination[key]) return It partially works. Consider the Foobar class below: class Foobar extends UIObject constructor: -> super("<h1/>", html: "Foobar") $("body").append(new Foobar) works fine. BUT: (new Foobar).appendTo("body") places the tag, but also raises RangeError: Maximum call stack size exceeded. Was it just a bad idea to inherit from jQuery? Or is there a solurion? For those who don't know CoffeeScript, the JavaScript source is: var Foobar, UIObject; var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; UIObject = (function () { UIObject.prototype.isObject = function (val) { return typeof val === "object"; }; function UIObject(tag, attributes) { this.merge(jQuery(tag, attributes), this); this.UIObjectProperties = {}; } UIObject.prototype.merge = function (source, destination) { var key; for (key in source) { if (destination[key] === void 0) { destination[key] = source[key]; } else if (this.isObject(source[key])) { this.merge(source[key], destination[key]); } } }; return UIObject; })(); Foobar = (function () { __extends(Foobar, UIObject); function Foobar() { Foobar.__super__.constructor.call(this, "<h1/>", { html: "Foobar" }); } return Foobar; })();

    Read the article

  • Example from: "Javascript - The Good Parts"

    - by Matrym
    What "ugliness" does the following solve? There's something I'm not getting, and I'd appreciate help understanding what it is. For example, by augmenting Function.prototype, we can make a method available to all functions: Function.prototype.method = function (name, func) { this.prototype[name] = func; return this; }; By augmenting Function.prototype with a method method, we no longer have to type the name of the prototype property. That bit of ugliness can now be hidden.

    Read the article

  • Loading jQuery with Tapestry 5

    - by American Yak
    Okay, so I'm not a Java guy, but I work with loads of them. We generally load Prototype with Tapestry 5, as Tapestry was built on this javascript library. As a UI/front end developer/engineer, I know the awesomeness of jQuery and the lack of prototype therein. (Feel free to debate that elsewhere -- this ticket doesn't concern that question, ha.) I've been curious for some time if it's possible to port jQuery into Tapestry instead of Prototype -- as in completely removing Prototype and Scriptaculous -- I realize it kind of defeats the purpose of the already bundled Prototype, but I wanted other opinions on the matter. Thanks.

    Read the article

  • How to return id of a submitted form using Prototype?

    - by pstinnett
    I have a page that has several ajax submission forms. Each form has a dynamic id assigned to it when it's written to the page. Does anyone know if there is an easy way to return the id of the form that is being submitted? I'm basically looking to click "submit" and alert the id of the submitted form. From there I can use it in the ajax onSuccess function.

    Read the article

  • how to get the image id and use hiding the image using prototype js?

    - by patel
    DeCheBX = $('MyDiv').insert(new Element('input', { 'type': 'checkbox', 'id': "Img" + obj[i].Nam, 'value': obj[i].IM, 'onClick': 'SayHi(this)' })); document.body.appendChild(DeCheBX); DeImg = $('MyDiv').insert(new Element('img', { 'id': "Imgx" + obj[i].Nam, 'src': obj[i].IM })); document.body.appendChild(DeImg); } SayHi = function(x) { try { if ($(x).checked == true) {

    Read the article

  • Adding to the DOM via Prototype works in Chrome but not Firefox?

    - by zaczap
    I've been working on some Javascript code to add rows to a table dynamically (a small task management system) and it works perfectly in Chrome but not in Firefox. Code in question: var task = new Element('tr', {id:arg}); task.innerHTML = "<td class='notes'>asd</td><td class='check'>*</td>"; //task.innerHTML = "<td class='notes'>&nbsp;</td><td class='check'><input type='checkbox' onclick=\"javascript:complete('"+task.id+"')\" /></td><td class='description'>asd</td><td class='start'>&nbsp;</td><td class='due'></td>"; $('tasks').insert(task); // the commented line above is what the code was originally that does work in chrome When I look at the HTML model in the Firefox debugger, all that is added is: <tr id="arg"><td>asd*</td></tr> Figuring that Chrome might be better at interpreting innerHTML into DOM elements than Firefox, I changed the code to make td elements and add them to my tr element but that didn't improve the situation at all.

    Read the article

  • How can I unobtrusively disable submit buttons with Javascript and Prototype?

    - by Frew
    So I found this recommendation, but I can't quite seem to figure out how. This is the code I originally started with: function greySubmits(e) { var value = e.srcElement.defaultValue; // This doesn't work, but it needs to $(e).insert('<input type="hidden" name="commit" value="' + value + '" />'); // This causes IE to not submit at all $$("input[type='submit']").each(function(v) {v.disabled = true;}) } // This works fine Event.observe(window, 'load', function() { $$("input[type='submit']").each(function(e) { Event.observe(e, 'click', greySubmits); }); }); Anyway, I am pretty close, but I can't seem to get any further. Thanks for any help at all! Update: Sorry, I guess I wasn't entirely clear. I'd like to disable all of the submit buttons when someone clicks a submit button. But I do need to send along the value of the submit button so the server knows which button I clicked, hence the insert call. (Note: insert does not create a child of the element you call it on.) And then after disabling the submit buttons I need to call the containing form of the submit buttons submit call, as IE will not submit after you disable the button. Does that make sense?

    Read the article

  • Prototypal inheritance should save memory, right?

    - by Techpriester
    Hi Folks, I've been wondering: Using prototypes in JavaScript should be more memory efficient than attaching every member of an object directly to it for the following reasons: The prototype is just one single object. The instances hold only references to their prototype. Versus: Every instance holds a copy of all the members and methods that are defined by the constructor. I started a little experiment with this: var TestObjectFat = function() { this.number = 42; this.text = randomString(1000); } var TestObjectThin = function() { this.number = 42; } TestObjectThin.prototype.text = randomString(1000); randomString(x) just produces a, well, random String of length x. I then instantiated the objects in large quantities like this: var arr = new Array(); for (var i = 0; i < 1000; i++) { arr.push(new TestObjectFat()); // or new TestObjectThin() } ... and checked the memory usage of the browser process (Google Chrome). I know, that's not very exact... However, in both cases the memory usage went up significantly as expected (about 30MB for TestObjectFat), but the prototype variant used not much less memory (about 26MB for TestObjectThin). I also checked: The TestObjectThin instances contain the same string in their "text" property, so they are really using the property of the prototype. Now, I'm not so sure what to think about this. The prototyping doesn't seem to be the big memory saver at all. I know that prototyping is a great idea for many other reasons, but I'm specifically concerned with memory usage here. Any explanations why the prototype variant uses almost the same amount of memory? Am I missing something?

    Read the article

  • Javascript function using "this = " gives "Invalid left-hand side in assignment"

    - by Brian M. Hunt
    I am trying to get a Javascript object to use the "this" assignments of another objects' constructor, as well as assume all that objects' prototype functions. Here's an example of what I'm attempting to accomplish: /* The base - contains assignments to 'this', and prototype functions */ function ObjX(a,b) { this.$a = a, $b = b; } ObjX.prototype.getB() { return this.$b; } function ObjY(a,b,c) { // here's what I'm thinking should work: this = ObjX(a, b * 12); /* and by 'work' I mean ObjY should have the following properties: * ObjY.$a == a, ObjY.$b == b * 12, * and ObjY.getB() == ObjX.prototype.getB() * ... unfortunately I get the error: * Uncaught ReferenceError: Invalid left-hand side in assignment */ this.$c = c; // just to further distinguish ObjY from ObjX. } I'd be grateful for your thoughts on how to have ObjY subsume ObjX's assignments to 'this' (i.e. not have to repeat all the this.$* = * assignments in ObjY's constructor) and have ObjY assume ObjX.prototype. My first thought is to try the following: function ObjY(a,b,c) { this.prototype = new ObjX(a,b*12); } Ideally I'd like to learn how to do this in a prototypal way (i.e. not have to use any of those 'classic' OOP substitutes like Base2). It may be noteworthy that ObjY will be anonymous (e.g. factory['ObjX'] = function(a,b,c) { this = ObjX(a,b*12); ... }) -- if I've the terminology right. Thank you.

    Read the article

  • Are all of the default scripts loaded by Magento really needed?

    - by pxl
    Here's a listing of all the scripts loaded by Magento by default: ../js/prototype/prototype.js //prototype library ../js/prototype/validation.js //don't know what this does ../js/scriptaculous/builder.js //don't know what this does ../js/scriptaculous/effects.js //base scriptaculous effects library? ../js/scriptaculous/dragdrop.js //component of scriptaculous effects ../js/scriptaculous/controls.js //not sure? ../js/scriptaculous/slider.js //more scriptaculous effects ../js/varien/js.js //don't know what this is ../js/varien/form.js //form validation scripts? ../js/varien/menu.js //menu/drop down menu scripts ../js/mage/translate.js //don't know what this does ../js/mage/cookies.js //don't know what this does these scripts total 316.8K of javascript... all in various states of being minified (for example, prototype.js isn't minified). So my first question: 1) Aside from prototype.js, are all of the others really that needed? and 2) What is the "correct" way to remove these scripts? Layout updates? Or hardcoded in templates? I want to make the loading of my magento site as light weight as possible. thanks!

    Read the article

  • Windows Phone 7 Prototype 001: Speech Recognition on WP7

    At some point in the future it will be awesome when you can just tell your computer what to do and it does it - without typing to help those of us with a blistering 11 WPM hunk and peck technique. Siri, a mobile digital assistant using speech recognition was voted best tech at SXSW. I dont know about that one. Although, I'm sure it will get better when Apple rebuilds it and  bundles on iPhone 5. So how would you do that on WP7? There have been some videos floating around showing Bing with some voice control so obviously the phone has speech recognition. So what options are there: System.Speech? Not included in WP7/SL Nuance software like Siri? No WP7/SL version yet. Invoking the SAPI dlls on the phone? No automation factory in WP7 SL. Web services using System.Speech and mic on the phone? YES! The last one was my least favorite but that works for now. I built a quick sample app to show how to do text-to-speech and speech recognition on WP7.   @eklimczak will not be happy with the developer designed UI. In this sample there is web service with provides access to the system.speech APIs in .NET. Basically its just passing around byte arrays. On the phone its using the XNA audio frameworks to play the text-to-speech stream and to record using the microphone. The code is pretty simple and you can download from the link at the end of this post. The only things to note are adjusting the WCF config to handle larger byte uploads and the Microphone API is a little weird with that 1 second buffer. It would be nice if you could just to mic.start and mic.end which would return an array of bytes instead of managing your own stream inside the buffer ready callback. Couple of downsides to this approach: Recoding from the phone has some static. Could be my code or the my mic is bad / not calibrated right. Having to make web service calls instead of local access is not ideal (Microsoft, please add an API for the SAPI dlls) Although in the context of an app like Siri its not so bad since you need to do web service lookups to get data back Speech recognition quality really depends on either a) a limited grammar set like that pizza grammar in the sample or b) training the recognizer. For the latter it would be annoying to have users train the system. Using the System.Speech stuff youd have to have a profile for each user. So until Microsoft adds some speech client APIs on the phone or Nuance releases a wp7 product, this is a decent workaround. In the future Id like to build something similar to Siri. I shall call it Iris in homage. Im a big fan of mobile speech apps because frankly its just not safe to Google while driving. Since some of my designer co-workers have been posting UI sketches for WP7, Id like to start posting some code prototypes for things I try out on the phone. That will probably last 2 weeks, but for the moment I have like 10 posts in the queue. Sample Code 100% guaranteed to work on my emulatorDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Prototype Fanless Heatsink Is Silent and Dust-Immune

    - by Jason Fitzpatrick
    What does this chip cooler do that your’s doesn’t? Run 30 times more efficiently, nearly silently, and repel any dust that settles on it, for starters. Check out the video to see it in action. Although the video is a bit dry the heatsink in action is pretty impressive–nearly silent? repels dust? radically more efficient? Our only complaint is we can’t slap one on a test machine right this minute. [via Extreme Tech] How to Make Your Laptop Choose a Wired Connection Instead of Wireless HTG Explains: What Is Two-Factor Authentication and Should I Be Using It? HTG Explains: What Is Windows RT and What Does It Mean To Me?

    Read the article

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