Search Results

Search found 28881 results on 1156 pages for 'javascript is future'.

Page 12/1156 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Replace Javascript click event with timed event?

    - by Rik
    Hi, I've found some javascript code that layers photos on top of each other when you click on them. Rather than having to click I'd like the function to automatically run every 5 seconds. How can I change this event to a timed one: $('a#nextImage, #image img').click(function(event){ Full code below. Thanks <script type="text/javascript"> $(document).ready(function(){ $('#description').css({'display':'block'}); $('#image img').hover(function() { $(this).addClass('hover'); }, function() { $(this).removeClass('hover'); }); $('a#nextImage, #image img').click(function(event){ event.preventDefault(); $('#description p:first-child').css({'visibility':'hidden'}); if($('#image img.current').next().length){ $('#image img.current').removeClass('current').next().fadeIn('normal').addClass('current').css({'position':'absolute'}); }else{ $('#image img').removeClass('current').css({'display':'none'}); $('#image img:first-child').fadeIn('normal').addClass('current').css({'position':'absolute'}); } if($('#image img.current').width()>=($('#page').width()-100)){ xPos=170; }else{ do{ xPos = 120 + (Math.floor(Math.random()*($('#page').width()-100))); }while(xPos+$('#image img.current').width()>$('#page').width()); } if($('#image img.current').height()>=300){ yPos=0; }else{ do{ yPos = Math.floor(Math.random()*300); }while(yPos+$('#image img.current').height()>300); } $('#image img.current').css({'left':xPos,'top':yPos}); }); });

    Read the article

  • Entity Framework Batch Update and Future Queries

    - by pwelter34
    Entity Framework Extended Library A library the extends the functionality of Entity Framework. Features Batch Update and Delete Future Queries Audit Log Project Package and Source NuGet Package PM> Install-Package EntityFramework.Extended NuGet: http://nuget.org/List/Packages/EntityFramework.Extended Source: http://github.com/loresoft/EntityFramework.Extended Batch Update and Delete A current limitations of the Entity Framework is that in order to update or delete an entity you have to first retrieve it into memory. Now in most scenarios this is just fine. There are however some senerios where performance would suffer. Also, for single deletes, the object must be retrieved before it can be deleted requiring two calls to the database. Batch update and delete eliminates the need to retrieve and load an entity before modifying it. Deleting //delete all users where FirstName matches context.Users.Delete(u => u.FirstName == "firstname"); Update //update all tasks with status of 1 to status of 2 context.Tasks.Update( t => t.StatusId == 1, t => new Task {StatusId = 2}); //example of using an IQueryable as the filter for the update var users = context.Users .Where(u => u.FirstName == "firstname"); context.Users.Update( users, u => new User {FirstName = "newfirstname"}); Future Queries Build up a list of queries for the data that you need and the first time any of the results are accessed, all the data will retrieved in one round trip to the database server. Reducing the number of trips to the database is a great. Using this feature is as simple as appending .Future() to the end of your queries. To use the Future Queries, make sure to import the EntityFramework.Extensions namespace. Future queries are created with the following extension methods... Future() FutureFirstOrDefault() FutureCount() Sample // build up queries var q1 = db.Users .Where(t => t.EmailAddress == "[email protected]") .Future(); var q2 = db.Tasks .Where(t => t.Summary == "Test") .Future(); // this triggers the loading of all the future queries var users = q1.ToList(); In the example above, there are 2 queries built up, as soon as one of the queries is enumerated, it triggers the batch load of both queries. // base query var q = db.Tasks.Where(t => t.Priority == 2); // get total count var q1 = q.FutureCount(); // get page var q2 = q.Skip(pageIndex).Take(pageSize).Future(); // triggers execute as a batch int total = q1.Value; var tasks = q2.ToList(); In this example, we have a common senerio where you want to page a list of tasks. In order for the GUI to setup the paging control, you need a total count. With Future, we can batch together the queries to get all the data in one database call. Future queries work by creating the appropriate IFutureQuery object that keeps the IQuerable. The IFutureQuery object is then stored in IFutureContext.FutureQueries list. Then, when one of the IFutureQuery objects is enumerated, it calls back to IFutureContext.ExecuteFutureQueries() via the LoadAction delegate. ExecuteFutureQueries builds a batch query from all the stored IFutureQuery objects. Finally, all the IFutureQuery objects are updated with the results from the query. Audit Log The Audit Log feature will capture the changes to entities anytime they are submitted to the database. The Audit Log captures only the entities that are changed and only the properties on those entities that were changed. The before and after values are recorded. AuditLogger.LastAudit is where this information is held and there is a ToXml() method that makes it easy to turn the AuditLog into xml for easy storage. The AuditLog can be customized via attributes on the entities or via a Fluent Configuration API. Fluent Configuration // config audit when your application is starting up... var auditConfiguration = AuditConfiguration.Default; auditConfiguration.IncludeRelationships = true; auditConfiguration.LoadRelationships = true; auditConfiguration.DefaultAuditable = true; // customize the audit for Task entity auditConfiguration.IsAuditable<Task>() .NotAudited(t => t.TaskExtended) .FormatWith(t => t.Status, v => FormatStatus(v)); // set the display member when status is a foreign key auditConfiguration.IsAuditable<Status>() .DisplayMember(t => t.Name); Create an Audit Log var db = new TrackerContext(); var audit = db.BeginAudit(); // make some updates ... db.SaveChanges(); var log = audit.LastLog;

    Read the article

  • Misunderstanding Scope in JavaScript?

    - by Jeff
    I've seen a few other developers talk about binding scope in JavaScript but it has always seemed to me like this is an inaccurate phrase. The Function.prototype.call and Function.prototype.apply don't pass scope around between two methods; they change the caller of the function - two very different things. For example: function outer() { var item = { foo: 'foo' }; var bar = 'bar'; inner.apply(item, null); } function inner() { console.log(this.foo); //foo console.log(bar); //ReferenceError: bar is not defined } If the scope of outer was really passed into inner, I would expect that inner would be able to access bar, but it can't. bar was in scope in outer and it is out of scope in inner. Hence, the scope wasn't passed. Even the Mozilla docs don't mention anything about passing scope: Calls a function with a given this value and arguments provided as an array. Am I misunderstanding scope or specifically scope as it applies to JavaScript? Or is it these other developers that are misunderstanding it?

    Read the article

  • Fixed JavaScript Warning - Pin to Top of Page Using CSS Position [migrated]

    - by nicorellius
    I am new to this site, but it seems like the right place to ask this question. I am working on a noscript chunk of code whereby I do some stuff that includes a <p> at the top of the page that alerts the users that he/she has JavaScript disabled. The end result should look like the Stack Exchange sites when JavaScript is disabled (here is a screenshot of mine - SE looks similar except it is at the very top of the page): I have it working OK, but I would love it if the red bar stayed fixed along the top, upon scrolling. I tried using the position: fixed; method, but it ends up moving the p element and I can't get it to look exactly the same as it does without the position: fixed; modification. I tried fiddling with CSS top and left and other positioning but it doesn't ever look like I want it to. Here is a CSS snippett: <noscript> <style type="text/css"> p. noscript_warning { position: fixed; } </noscript>

    Read the article

  • Web Application: Combining View Layer Between PHP and Javascript-AJAX

    - by wlz
    I'm developing web application using PHP with CodeIgniter MVC framework with a huge real time client-side functionality needs. This is my first time to build large scale of client-side app. So I combine the PHP with a large scale of Javascript modules in one project. As you already know, MVC framework seperate application modules into Model-View-Controller. My concern is about View layer. I could be display the data on the DOM by PHP built-in script tag by load some data on the Controller. Otherwise I could use AJAX to pulled the data -- treat the Controller like a service only -- and display the them by Javascript. Here is some visualization I could put the data directly from Controller: <label>Username</label> <input type="text" id="username" value="<?=$userData['username'];?>"><br /> <label>Date of birth</label> <input type="text" id="dob" value="<?=$userData['dob'];?>"><br /> <label>Address</label> <input type="text" id="address" value="<?=$userData['address'];?>"> Or pull them using AJAX: $.ajax({ type: "POST", url: config.indexURL + "user", dataType: "json", success: function(data) { $('#username').val(data.username); $('#dateOfBirth').val(data.dob); $('#address').val(data.address); } }); So, which approach is better regarding my application has a complex client-side functionality? In the other hand, PHP-CI has a default mechanism to put the data directly from Controller, so why using AJAX?

    Read the article

  • Find an element in a JavaScript array

    - by Aligned
    Originally posted on: http://geekswithblogs.net/Aligned/archive/2014/08/22/find-an-element-in-a-javascript-array.aspxI needed a C# Dictionary like data structure in JavaScript and then a way to find that object by a key. I had forgotten how to do this, so did some searching and talked to a colleague and came up with this JsFiddle. See the code in my jsFiddle or below: var processingProgressTimeoutIds = []; var file = { name: 'test', timeId: 1 }; var file2 = { name: 'test2', timeId: 2 }; var file3 = { name: 'test3', timeId: 3 }; processingProgressTimeoutIds.push({ name: file.name, timerId: file.id }); processingProgressTimeoutIds.push({ name: file2.name, timerId: file2.id }); processingProgressTimeoutIds.push({ name: file3.name, timerId: file3.id }); console.log(JSON.stringify(processingProgressTimeoutIds)); var keyName = 'test'; var match = processingProgressTimeoutIds.filter(function (item) { return item.name === keyName; })[0]; console.log(JSON.stringify(match)); // optimization var match2 = processingProgressTimeoutIds.some(function (element, index, array) { return element.name === keyName; }); console.log(JSON.stringify(match2)); // if you have the full object var match3 = processingProgressTimeoutIds.indexOf(file); console.log(JSON.stringify(match3)); // http://jsperf.com/array-find-equal – from Dave // indexOf is faster, but I need to find it by the key, so I can’t use it here //ES6 will rock though, array comprehension! – also from Dave // var ys = [x of xs if x == 3]; // var y = ys[0]; Here’s a good blog post on Array comprehension.

    Read the article

  • Javascript form validation - what's lacking?

    - by box9
    I've tried out two javascript form validation frameworks - jQuery validation, and jQuery Tools validator - and I've found both of them lacking. jQuery validation lacks the clear separation between the concepts of "validating" and "displaying validation errors", and is highly inflexible when it comes to displaying dynamic error messages. jQuery Tools on the other hand lacks decent remote validation support (to check if a username exists for example). Even though jQuery validation supports remote validation, the built-in method requires the server to respond in a particular format. In both cases, any sort of asynchronous validation is a pain, as is defining rules for dependencies between multiple inputs. I'm thinking of rolling my own framework to address these shortcomings, but first I want to ask... have others experienced similar annoyances with javascript validation? What did you end up doing? What are some common validation requirements you've had which really should be catered for? And are there other, much better frameworks out there which I've missed? I'm looking primarily at jQuery-based frameworks, though well-implemented frameworks built on other libraries can still provide some useful ideas.

    Read the article

  • The Future According to Films [Infographic]

    - by Jason Fitzpatrick
    Curious what the future will look like? According to movie directors, casting their lens towards the future of humanity, it’s quite a mixed bag. Check out this infographic timeline to check out the next 300,000 years of human evolution. A quick glance over the timeline shows a series of future where things can quickly go from the fun times to the end-of-the-world times. We’d like to, for example, live it up in the Futurama future of 3000 AD and not the Earth-gets-destroyed future of Titan A.E’s 3028. Hit up the link below for a high-res copy of the infographic. The Future According to Films [Tremulant Design via Geeks Are Sexy] HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS Use Your Android Phone to Comparison Shop: 4 Scanner Apps Reviewed How to Run Android Apps on Your Desktop the Easy Way

    Read the article

  • Dividing up spritesheet in Javascript

    - by hustlerinc
    I would like to implement an object for my spritesheets in Javascript. I'm very new to this language and game-developement so I dont really know how to do it. My guess is I set spritesize to 16, use that to divide as many times as it fits on the spritesheet and store this value as "spritesheet". Then a for(i=0;i<spritesheet.length;i++) loop running over the coordinates. Then tile = new Image(); and tile.src = spritesheet[i] to store the individual sprites based on their coordinates on the spritesheet. My problem is how could I loop trough the spritesheet and make an array of that? The result should be similar to: var tile = Array( "img/ground.png", "img/crate.png" ); If possible this would be done with one single object that i only access once, and the tile array would be stored for later reference. I couldn't find anything similar searching for "javascript spritesheet". Edit: I made a small prototype of what I'm after: function Sprite(){ this.size = 16; this.spritesheet = new Image(); this.spritesheet.src = 'img/spritesheet.png'; this.countX = this.spritesheet.width / 16; this.countY = this.spritesheet.height / 16; this.spriteCount = this.countX * this.countY; this.divide = function(){ for(i=0;i<this.spriteCount;i++){ // define spritesheet coordinates and store as tile[i] } } } Am I on the right track?

    Read the article

  • JavaScript loaded external content SEO

    - by user005569871
    I wonder what is the best way to have Javascript loaded content indexed by search engines. I know that search engines don't execute Javascript, but I am thinking more of an progressive enchantment. I am creating a responsive website, and on the home page I will have some sections about most visited products and recommended product that I plan to load depending on the device detected. These products will be in sliders with thumbnail images and names of the products. If mobile is detected slider content will not load, ant the link to the external page will be shown. I know that external content will be indexed via link to those resources. Where will the users be directed from search in this case? To the external page or home page? Will it be bad for SEO if I show only product names on front page so they can be indexed and hide them with CSS? What is the best way to index that content and possibly direct users from search to home page? Also, i've seen the Ajax crawling but iI would like not to use that if there is any better way.

    Read the article

  • How to SEO Optimize Javascript Image Loader?

    - by skibulk
    I am building an image-centric catalog website. It catalogs collectible gaming cards numbering 100,000+ pages. Competitor sites recieve millions of hits each month, so with the possibility of excessive traffic, I need to moderate image bandwidth while also optimizing for image SEO. I'm looking for some tips on doing so. Each page on the site features one card with appropriate tags and descriptions. There are however four images for each card - one on matte cardstock, one on foil cardstock, one digital, and one digital foil. In a world with unlimited bandwidth and no-wait page loads, I'd simply embed all four images on the main product page with titles, alt tags, and captions to rank them according to their version keyword. In reality a javascript gallery image loader seems appropriate. Here is a simplified example of my current code. Would this affect SEO in any way? Should I be doing anything differently? Note that I don't want to create a page for each image as I'd have to duplicate the card tags and descriptions on each one, diluting PR for the main page. Thanks for any insight! <script type="text/javascript"> document.write(' <img src="thumbnail1.jpg" data-src="version1.jpg"> <img src="thumbnail2.jpg" data-src="version2.jpg"> <img src="thumbnail3.jpg" data-src="version3.jpg"> <img src="thumbnail4.jpg" data-src="version4.jpg"> '); </script> <noscript> <img src="version1.jpg"> <img src="version2.jpg"> <img src="version3.jpg"> <img src="version4.jpg"> </noscript>

    Read the article

  • Prevent Click Fraud in Advertisement system with PHP and Javascript

    - by CodeDevelopr
    I would like to build an Advertising project with PHP, MySQL, and Javascript. I am talking about something like... Google Adsense BuySellAds.com Any other advertising platform My question is mainly, what do I need to look out for to prevent people cheating the system and any other issues I may encounter? My design concept. An Advertisement is a record in the Database, when a page is loaded, using Javascript, it calls my server which in turn will use a PHP script to query the Database and get a random Advertisement. (It may do kore like get an ad based on demographics or other criteria as well) The PHP script will then return the Advertisement to the server/website that is calling it and show it on the page as an Image that will have a special tracking link. I will need to... Count all impressions (when the Advertisement is shown on the page) Count all clicks on the Advertisement link Count all Unique clicks on the Advertisement link My question is purely on the query and displaying of the Advertisement and nothing to do with the administration side. If there is ever money involved with my Advertisement buying/selling of adspace, then the stats need to be accurate and make sure people can't easily cheat the system. Is tracking IP address really the only way to try to prevent click fraud? I am hoping someone with some experience can clarify I am on the right track? As well as give me any advice, tips, or anything else I should know about doing something like this?

    Read the article

  • soft question - Which of these topics is likely to be relevant in the future?

    - by Fool
    I hear some topics in computer science, such as object-oriented programming, are relevant today but may become obsolete in the future. I'm picking courses for a minor in computer science, and I need one more elective. Could someone help me choose topic(s) from the following list that would grant timeless knowledge, relevant and applicable in the future? Why are such topics relevant? Artificial Intelligence Human-Computer Interaction Object-Oriented Programming Operating Systems Compilers Networking Databases Graphics Automata and Complexity Theory Logic and Automated Reasoning Algorithms If some of these titles are too vague, I'll provide more info.

    Read the article

  • JavaScript 3D space ship rotation

    - by user36202
    I am working with a fairly low-level JavaScript 3D API (not Three.js) which uses euler angles for rotation. In most cases, euler angles work quite well for doing things like aligning buildings, operating a hovercraft, or looking around in the first-person. However, in space there is no up or down. I want to control the ship's roll, pitch, and yaw. To do that, some people would use a local coordinate system or a permenant matrix or quaternion or whatever to represent the ship's angle. However, since I am not most people and am using a library that deals exclusively in euler angles, I will be using relative angles to represent how to rotate the ship in space and getting the resulting non-relative euler angles. For you math nerds, that means I need to convert 3 euler angles (with Y being the vertical axis, X representing the pitch, and Z representing a roll which is unaffected by the other angles, left-handed system) into a 3x3 orientation matrix, do something fancy with the matrix, and convert it back into the 3 euler angles. Euler to matrix to euler. Somebody has posted something similar to this on SO (http://stackoverflow.com/questions/1217775/rotating-a-spaceship-model-for-a-space-simulator-game) but he ended up just working with a matrix. This will not do for me. Also, I am using JavaScript, not C++. What I want essentially are the functions do_roll, do_pitch, and do_yaw which only take in and put out euler angles. Many thanks.

    Read the article

  • How to retrieve the value of querystring from url using Javascript

    - by ybbest
    The following is a Javascript function I found on the internet , I keep here just in case I need to use it again. function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.search); if(results == null) return ""; else return decodeURIComponent(results[1].replace(/\+/g, " ")); } You can also add this method to jquery as below. $.getParameterByName = function (name) { name = name.replace( /[\[]/ , "\\\[").replace( /[\]]/ , "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.search); if (results == null) return ""; else return decodeURIComponent(results[1].replace( /\+/g , " ")); }; $(document).ready(function () { alert($.getParameterByName("id")); }); References: http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript http://blog.jeremymartin.name/2008/02/building-your-first-jquery-plugin-that.html http://stackoverflow.com/questions/7541218/writing-jquery-static-util-methods http://api.jquery.com/category/utilities/

    Read the article

  • Will learning programming be as fundamental as learning reading/writing to the kids of the future?

    - by pythagras
    It seems I encounter more and more economists, scientists, and miscellaneous other professionals that have jobs that involve programming on some level. More and more, the jobs that my peers have in many many technical professions involve at least some simple scripting if not something more involved. It seems it used to be that "software engineer" was a distinct profession, now its becoming just another skill like writing -- something that any serious technical professional should be able to use for their job. I see a future where programming is essential to getting any kind of technical/mathematical job. Extrapolating on my anecdotal view of my colleagues... Will the kids of the future become literate in programming in the same way they become readers/writers? Will it become so fundamental to our economy and society that it will be taught at an early age? Will interacting with computers be as important as interacting with other people?

    Read the article

  • Moving away from PHP and running towards server-side JavaScript [on hold]

    - by Sosukodo
    I've decided to start moving away from PHP and server-side JavaScript looks like an attractive replacement. However, I'm having a hard time wrapping my head around how others are using Node.js for web applications. I'm currently using Lighttpd with FastCGI PHP. The one thing I like about PHP is that I can "inline" my scripts in the document like so: <?php echo 'Hello, World!'; ?> My question is: Is there any server-side JavaScript solution that I can use in this manor? For instance, I'd love to be able to do this: <?js print('Hello, World!'); ?> Is there such a thing? I'm not looking for opinions about "which is better". I just want to know what's out there and I'll explore each of them on my own. The important thing is that I'd like to use it like I demonstrated above. Links to the software along with implementation examples will be considered above other answers.

    Read the article

  • Solving the puzzle in javascript [on hold]

    - by Gandalf StormCrow
    I've recently try to brush up my javascript skills, so I have a friend who gives me puzzles from time to time to solve. Yesterday I got this : function testFun() { f = {}; for( var i=0 ; i<3 : i++ ) { f[i] = function() { alert("sum='+i+f.length); } } return f; } Expected Results: testFun()[0]() should alert “sum=0” testFun()[1]() should alert “sum=2” testFun()[2]() should alert “sum=4” I did this which does like requested above: function testFun() { var i, f = {}; for (i = 0; i < 3; i++) { f[i] = (function(number) { return function() { alert("sum=" + (number * 2)); } }(i)); } return f; } Today I got new puzzle : Name everything wrong with this javascript code, then tell how you would re-write it. function testFun(fInput) { f = fInput || {}; // append three functions for( var i=0 ; i<3 : i++ ) { f[i] = function() { alert("sum='+i+f.length); } } return f; } // Sample Expected Results (do not change) myvar = testFun(); myvar[0](); // should alert “sum=0” myvar[1](); // should alert “sum=2” testFun(['a'])[2](); // should alert “sum=5”`enter code here How do I accomplish the third case testFun(['a'])[2]()? Also could my answer from yesterday be written better and what can be improved if so?

    Read the article

  • Javascript - find swfobject on included page and call javascript function

    - by Rob
    I’m using the following script on my website to play an mp3 in flash. To instantiate the flash object I use the swfobject framework in a javascript function. When the function is called the player is created and added to the page. The rest of the website is in php and the page calling this script is being included with the php include function. All the other used scripts are in the php 'master'-page var playerMp3 = new SWFObject("scripts/player.swf","myplayer1","0","0","0"); playerMp3.addVariable("file","track.mp3"); playerMp3.addVariable("icons","false"); playerMp3.write("player1"); var player1 = document.getElementById("myplayer1"); var status1 = $("#status1"); $("#play1").click(function(){ player1.sendEvent("play","true"); $("#status1").fadeIn(400); player4.sendEvent("stop","false"); $("#status4").fadeOut(400); player3.sendEvent("stop","false"); $("#status3").fadeOut(400); player2.sendEvent("stop","false"); $("#status2").fadeOut(400); }); $("#stop1").click(function(){ player1.sendEvent("stop","false"); $("#status1").fadeOut(400); }); $(".closeOver").click(function(){ player1.sendEvent("stop","false"); $("#status1").fadeOut(400); }); $(".accordionButton2").click(function(){ player1.sendEvent("stop","false"); $("#status1").fadeOut(400); }); $(".accordionButton3").click(function(){ player1.sendEvent("stop","false"); $("#status1").fadeOut(400); }); $(".turnOffMusic").click(function(){ player1.sendEvent("stop","false"); $("#status1").fadeOut(400); }); }); I have a play-button with the id ‘#play1’ and a stop-button with the id ‘#stop1’ on my page. A div on the same page has the id ‘#status1’ and a little image of a speaker is in the div. When you push the playbutton, the div with the speaker is fading in and when you push the stopbutton, the div with the speaker is fading out, very simple. And it works as I want it to do. But the problem is, when a song is finished, the speaker doesn’t fade out. Is there a simple solution for this? I already tried using the swfobject framework to get the flash player from the page and call the ‘IsPlaying’ on it, but I’m getting the error that ‘swfobject’ can’t be found. All I need is a little push in the right direction or an example showing me how I can correctly get the currently playing audio player (in flash), check if it’s playing and if finished, call a javascript function to led the speaker-image fade-out again. Hope someone here can help me

    Read the article

  • Unity 3D coding language, C# or JavaScript [on hold]

    - by hemantchhabra
    Hello to the gaming community. I am a budding game designer, learning to code for the first time in my life. I did learned c++ in school, 8 years back, so I sort of understand the logic when people are doing coding and I can suggest them the right route also, but to an extent I can't code. I am beginning to learn coding for Unity 3D. Which one do you suggest is more versatile and easier to work on for future, because I am a game designer not a coder, I would do coding until I don't have anyone else to code for me. It should be easy and fast to learn, functional and universal to apply, and innovative at the same time. C# or JavaScript ? Thank you for your time Ps- if you could suggest me steps to learn and tutorials to look for, that would be just awesome.

    Read the article

  • Adapting Javascript game for mobile

    - by Cardin
    I'm currently developing a Javascript web game for desktop users. It is a sort of tower-defense game that relies on mouse input only, developed on canvas using EaselJS. In the future, or perhaps simultaneously, I would like to adapt the game for mobile devices. I can see at least 3 potential areas in shifting from desktop to mobile: 1. resolution size and UI rearrangement, 2. converting mouse events to touch events, 3. distribution as native app wrapper or mobile Web. What would be the best strategy to facilitate this desktop to mobile conversion? For example, should I try to code the game for both platforms, or port the game UI over to mobile by branching the code base. Should I just publish on the mobile Web or wrap the game in a native app framework? And if I were to code for both platforms using the same codebase, should I register both click and touch events, or remap click events to touch using dispatchEvent?

    Read the article

  • JavaScript filter PHP results

    - by Nick Maddren
    Hey guys for a while now I have been trying to come up with a method that can filter PHP results for listing items using JS. Look at these examples: http://www.autotrader.co.uk/search/used/cars/ http://www.vcars.co.uk/used-cars/ You will notice that the actual filter uses JavaScript however my question is how does it query the database to bring back the results? It obviously using PHP however how does the JS control what the PHP drags from the DB? Thanks

    Read the article

  • In JavaScript, curly brace placement matters: An example by David

    I used to follow Kernighan and Ritchie style of code formatting, but lost that habit. Not sure how may hours spent on fixing JS issues due to Allman format. Every time I feel bad whilst Visual Studio gives K&R style. Just realized the impotence of K&R style for JS. My Big thanks to David for pointing the curly brace placement issue with JS and posting such a nice article. In JavaScript, curly brace placement matters: An example span.fullpost {display:none;}

    Read the article

  • StackUnderflow.js: A JavaScript Library and Mashup Tool for StackExchange

    - by InfinitiesLoop
    StackUnderflow.js is a JavaScript library that lets you retrieve – and render – questions from the StackExchange API directly on your website just by including a simple, lightweight .js script. The library is fully documented, so for technical details please check out the StackApps entry for it , and follow the links to the GitHub repository. The rest of this post is about my motivation for the library, how I am using it on the blog, and some other thoughts about the API. StackExchange (e.g. StackOverflow...(read more)

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >