Rahul Desai

1

votes
2

answer
11k

views

jQuery validate onfocusout

I am trying to validate this form located here: http://jsfiddle.net/PEmFH/8/ I want to validate on onfocusout (validate every time the user leaves the field). It is not working for some reason. Please find the updated fiddle here: http://jsfiddle.net/PEmFH/11/
Rahul Desai
1

votes
1

answer
436

views

Match horizontal size of dropdown with the textbox size

I would like to set the size of the dropdown same as the textbox above it to maintain consistency. Please refer to this fiddle.
Rahul Desai
1

votes
2

answer
189

views

Grooveshark.com like search results filter

In my webpage, I am having a table that is being pulled from the database. I would like this table to be filtered dynamically when the user types a keyword in the search box. Similar functionality is being implemented by Grooveshark.com What would be the best way to implement this feature?
Rahul Desai
1

votes
1

answer
197

views

perl code breaking while mounting ISO

I have build a form (using JavaScript, jQuery, PHP and HTML) that makes it easy for the non-technical people to compose and fire the command that creates an ISO image containing the CentOS Linux and a company application built along with it. Here is the actual command with sample variables. ./test.p...
Rahul Desai
1

votes
1

answer
66

views

Unable to restore volume after unmute

In my HTML5 video player, if the current volume is 0.5 and if I mute and unmute back, the volume restores to 0.5 which is correct. However, if the volume is other than 0.5, it is still restoring to 0.5 after muting and unmuting. I tried to create a backup of volume before muting and restored the bac...
Rahul Desai
1

votes
1

answer
68

views

Unable to get typeahead working in my fiddle

I am just working my way out with implementing the Twitter's typeahead plugin in my fiddle. However I am getting an error: Uncaught TypeError: undefined is not a function This error is on the line where I am mentioning ttAdapter(). But I see ttAdapter() is already mentioned in the plugin. jsFiddle W...
Rahul Desai
1

votes
1

answer
49

views

How to show complete scale/all datapoints on X-axis?

Not sure if scale is the right word here, I have plotted a chart here that actually has 52 datapoints. I would like to show all of those on X-axis. I tried: .ticks(52) but that didnt help. How do I show all dates on X-axis? jsFiddle
Rahul Desai
1

votes
1

answer
49

views

Unable to fetch dynamically added text

I am having an issue with my jQuery code. I am unable to access the dynamically added element. I can access it if I refresh the page. I am working on a jQuery/HTML5 todo list application. In my code here, if you add an item and hit 'mark as Done' (after hovering on the numbered button), the item is...
Rahul Desai
1

votes
1

answer
53

views

How do I synchronise the slider with the ticks so as to make it responsive?

In my code so far, I have appended the tick markers and labels to the jQuery UI slider. When I increase/decrease the size of the browser window, these ticks go out of sync with the slider. It is happening because of the following piece of code: $(' '+ date[i] +'') // line # 44 in JS .css('left', (sp...
Rahul Desai
1

votes
1

answer
669

views

How do I arrange all bubbles in circular manner in bubble chart with force layout?

I want to combine the best features of pack layout and force layout into my chart. I am looking forward to get the packing/wrapping of bubbles into a circular group using pack layout and getting the drag/drop/collision/gravity features from the force layout. The packing/wrapping circle's radius shou...
Rahul Desai
1

votes
1

answer
505

views

Google Maps API Places Search get number of search results

I have implemented a sample using Places Search of Google Maps API. I would like to fetch the number of results I am fetching. New to Google Maps API. How do I achieve this? jsFiddle JS: var map; var infowindow; function initialize() { var pyrmont = new google.maps.LatLng(19.107567, 72.8335); map =...
Rahul Desai
1

votes
3

answer
849

views

Wrap text for container of undefined width

In my fiddle here, I would like to split the text into 2 lines. The splitting needs to be like in the image below: The splitting needs to be according to the width of the image. I tried playing with word-break but it seems that it needs width of the container to be defined. Is there a way to fix thi...
Rahul Desai
1

votes
1

answer
192

views

Google Maps InfoWindow not displaying complete text in Firefox

I am using the code available here in my fiddle here. The problem is that the text in the info window is appearing like this: It should say: You are here. (in a single line) Using Firebug, I changed the text's parent style to have width 75px but then a horizontal scrollbar appeared on the text in th...
Rahul Desai
1

votes
1

answer
242

views

Need a specific URL RewriteRule in .htaccess

I am new to setting up the .htaccess and I would appreciate some help in my problem. If the user hits the following URL (original URL): http://www.example.com/somepage/something I want it to redirect to: http://www.example.com/somepage AND keep the original URL in the browser. So far, I have the fol...
Rahul Desai
1

votes
1

answer
35

views

Unable to add trailing /

I am new to setting up .htaccess file and I would appreciate your help in this problem. I am unable to add trailing / to all URLs of my website. I have tried most of the answers on StackOverflow and also this article, but it just didnt work for me, either the styles broke and no / was added or just...
Rahul Desai
1

votes
1

answer
36

views

How to set caret to newly added element in contentEditable element?

I am working on a WYSIWYG editor in which I want to add 's when hit Enter / Return key and then the user will write to this new . Right now I am having issue setting the caret to this new . $('#content').on('keypress', function(e){ if(e.which === 13){ console.log('enter pressed'); e.preventDefaul...
Rahul Desai
1

votes
2

answer
84

views

unable to show AJAX loader while image is being loaded completely

I am working on a image slider and here is my code so far: angular .module('myApp', []) .controller('imageController', ['$scope', function ($scope) { var imageArray = [ // dynamic array 'http://s3.amazonaws.com/theoatmeal-img/thumbnails/random_comics.png', 'http://images5.fanpop.com/image/phot...
Rahul Desai
1

votes
4

answer
1.3k

views

Replace text across multiple files in a directory with sed

I need to hide the IP addresses in the log files for security reasons. The IP addresses are of version 4 and 6. How do I hide the addresses in a way that, IPv4 example 123.4.32.16 is replaced by x.x.x.x and IPv6 example 232e:23o5:te43:5423:5433:0000:ef09:23ff is replaced by x:x:x:x:x:x:x:x? Is it po...
Rahul Desai
1

votes
1

answer
300

views

Mongo record not updating, no error either

Here is the record that I want to update: { '_id' : ObjectId('519177384e2e9fee10000000'), 'fb_id' : { '0' : '2000' }, 'name' : { '0' : 'Aaa Bbb' }, 'email' : { '0' : '[email protected]' } } I would like to fb_id to be changed to '2000', instead of { '0' : '2000' }. I tried.. PRIMARY> db.users.update({fb_i...
Rahul Desai
1

votes
3

answer
1.5k

views

HTML textbox not working

This is some simple problem, but I am not able to resolve it. I am unable to click on the textbox and get it working.Please refer to my fiddle here: http://jsfiddle.net/5JeaQ/ HTML: Phone Directory CSS: #container{ width: 30%; margin: 0 auto; /*text-align: center;*/ } #name{...
Rahul Desai
1

votes
1

answer
115

views

Unable to add grid lines to bar chart

I am new to D3 and I have constructed this bar chart. I would like to add grid lines parallel to x-axis only. I saw this tutorial and added the code at line # 76. function make_x_axis() { return d3.svg.axis() .scale(x) .orient('bottom') .ticks(5) } svg.append('g') .attr('class', 'gr...
Rahul Desai
1

votes
1

answer
145

views

How to show keyboard programmatically in Firefox OS?

I am working on a ToDo list app wherein I keep the focus on the textbox input after the user adds a ToDo item. Now, the problem is, when the user adds some text input and hits the add button, the focus on the textbox is lost so the keyboard disappears and then the focus gets back to the textbox. So,...
Rahul Desai
1

votes
1

answer
135

views

How to switch languages in Firefox OS apps?

I need to support my app for multiple languages and I want to provide the user a feature to select a language from a dropdown. For now, I am working on the Firefox OS Boilerplate app and I have added a in the homescreen as follows: Language: English French Spanish I have also setup a simple event...
Rahul Desai
1

votes
4

answer
38

views

3 border-bottoms for a single div?

Is there a way to create 3 border-bottoms to a single div? Here is what it needs to look like:
Rahul Desai
1

votes
1

answer
733

views

How to tune meSpeak.js for better sound?

I am new to meSpeak.js. I cant go with the default voice they have in their demo. I tried playing around with the options that they have, but it didnt make much difference. I would like to know how do I tune it so as to get the voice close to the level of Siri, not that robotic as in their demo. I a...
Rahul Desai
1

votes
1

answer
58

views

Unable to insert node at base level while pasting in contentEditable element

I am trying to make my WYSIWYG editor same as Medium's. When someone pastes a paragraph of text, it should get into a element right below the contentEditable element and at the position where the caret is. It shouldn't get nested inside the element where we pasted. As of now, it is getting nested....
Rahul Desai
1

votes
1

answer
150

views

Remove specific images from browser cache

My application kind of looks like a carousal where in the user marks the image accordingly by clicking on the relevant button and then the next image is loaded. To make this application work faster, I am caching 10 images at a time. When the user is at 8th image, I cache another 10 images ahead of...
Rahul Desai
1

votes
1

answer
38

views

async NPM module not executing setTimeout for each item in the array

I am using the async NPM module and have written the following program: var async = require('async'); var arr = [1,2,3,4]; async.each(arr, function (item) { setTimeout(function () { console.log('item: ', item); }, 1000); }, function (error) { console.log('error', error); }); I expected the console l...
Rahul Desai
1

votes
2

answer
4.5k

views

jQuery IP address validation failed

Below is the code snippet where I have written the code to have the IP address masked and validate it using jQuery. But, I am getting error message for valid IP addresses (like 222.222.222.222). Can someone please help? //Validate the form $('#form').validate({ rules: { ip: { required: true, IP4Chec...
Rahul Desai
1

votes
2

answer
1.1k

views

append elements into an array element

In my Perl program, I am reading an email by decoding it, splitting it into an array. In the snippet below, I am reading the elements and appending it until I find 'Email' or 'Phone' or 'GoToAssist'. 75 while(!($plain[$j] =~ /[Email|Phone|GoToAssist]/)){ 76 $plain[$x] .= ' ' . $plain[$j]...
Rahul Desai
1

votes
6

answer
2.5k

views

unable to connect using SSH2

I am using phpseclib in my project. I have installed it and am testing it using the following piece of code which is similar to the example here. Updated Code: 1 require('Net/SSH2.php'); 2 3 if (!class_exists('Net_SSH2')) die('Class Net_SSH2 doesn't exist!'); 4 5...
Rahul Desai
0

votes
0

answer
6

views

Gitlab merge from a specific source branch

I have a branch in gitlab called devops and i want to merge my master branch with devops branch. However, i do not want any other branch to issue a merge request with devops branch. Is it possible? Basically, for devops as the target branch while merging, only master can be the source branch. Can so...
Rahul Desai
1

votes
1

answer
249

views

<legend> not centering in Firefox

In my CSS, I did: legend{ text-align: center; } Still the legend is left aligned in Firefox. It works properly in Chrome. The solution mentioned here does not work for Firefox. My Fiddle: http://jsfiddle.net/5JeaQ/14/ UPDATE: I do not want to do width: 100% as it looks ugly with that. I am using Fir...
Rahul Desai
1

votes
1

answer
1.2k

views

NVD3 chart partly missing grid lines

In my chart here, if you can notice, it is missing grid lines for the first 4 and last 4 dates. I tried doing: .ticks(data[0].length) but it didnt help. What am I missing? jsFiddle
Rahul Desai
1

votes
5

answer
2.5k

views

Cant detect if responsiveVoice isPlaying()

There isnt much information on http://responsivevoice.org about isPlaying(). Here is what I tried which isnt working. I do not get the console.log(). setInterval(function(){ // continuously check if the audio is being played if(responsiveVoice.isPlaying()){ console.log('playing..'); }, 100 );...
Rahul Desai
1

votes
2

answer
769

views

orderBy not working properly with key,value pair [duplicate]

This question already has an answer here: Order by Object key in ng-repeat 3 answers I am pulling a JSON of US states with their key codes, wherein the key is their state code, like NY, and value is the name of the state, like New York. In the dropdown, I am having trouble ordering it alphabetical...
Rahul Desai
1

votes
4

answer
332

views

Milliseconds out of sync

I am developing a stopwatch application using Javascript/jQuery. The problem is that the milliseconds value is out of sync with REAL milliseconds. I am using function setInterval() with the interval of 1 millisecond, still it is causing this problem. jsFiddle: http://jsfiddle.net/FLv3s/ Please help!
Rahul Desai
3

votes
3

answer
7.2k

views

CSS transform and transition not working in Safari

I am working on a for a mobile site. It is working file in Firefox and Chrome but not in Safari. I am running it on Windows 8.1 and I observed the same issue on Safari in iPad mini. In the snippet below, if you check out the mobile view (max-width: 768px) and click on the menu icon in the top right...
Rahul Desai
5

votes
5

answer
11.5k

views

toFixed(2) function not working

This one is weird, because I got it running in this fiddle but it is not working in the main fiddle. I believe the code is the same. Here is the main function: window.setInterval(function(){ for(var i=0; i < companies.length; i++) { var randomVal = (Math.random()*(10 - (-10) + 1)) + (-10); randomVal...
Rahul Desai
1

votes
1

answer
2.1k

views

D3 Bar chart - Remove labels with zero value

In the fiddle below, you can notice that the first bar has the label no even though its value is zero. How do I remove the labels with zero values in my stacked bar chart? jsFiddle CODE: var data = [ { 'episode': 'Ep. 01', 'yes': '100', 'no': '0' }, { 'episode': 'Ep. 02', 'yes': '70', 'no': '30' },...
Rahul Desai

View additional