Vote count: 0 I know my question is duplicated in Using jquery in google apps script, but as I caot comment, I ask again. I want to do the same but caot solve the problem. I tried all jquery versions, and the code proposed by Michelem, but nothing happens. JQUERY is not working at all. asked 1 min agoRodrigo E. Principe Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am using google maps api to point certain locations. These locations I get from my rest api server. so when I try to run the code in my webapp, it does not show on the browser. (it showed once or twice and later not showing) But the same code works when run in link here (http://www.w3schools.com/googleapi/tryit.asp?filename=tryhtml_map_overlays_marker) works fine (I provide the data hard coded here.) the data to be provider in the left hand side is here http://pastebin.com/t6DNUS80 The code I have in my angular application is, adminApp.controller('createController', function($scope, $http) { var routes = []; var myCenter; var index = 0; var map; var getRouteData = function(bi...
ادامه مطلبVote count: 0 I am trying to get up and ruing with Angular 2 and typescript. So far so good, but I am having some troubles to get a Facebook login message working. I found a project on github that demonstrated how this can be done. In this example, they have the following coector: fbcoector.ts export class FBCoector { constructor(appID: string) { if (!window.fbAsyncInit) { console.log('define'); window.fbAsyncInit = function() { FB.init({ appId: appID, xfbml: true, version: 'v2.5' }); }; } } initFB() { var js: any, id = 'facebook-jssdk', ref = document.getElementsByTagName('script')[0]; if (document.getElementById(id)) { retu; } js = document.createElement('script'); js.id = id; js.async = t...
ادامه مطلبVote count: 0 I don't "get" callback functions very well. I am trying to build a section of my web page which shows the nearest stores for a customer's address. There are fields on the page that will have the logged in customer's address. When the user goes to the page, I want my code to grab their address, get that latitude and longitude coordinates, and then center the map based on their address. However, there is a short delay while the geocoder retus their coordinates, by which point the call to create the map has already happened. I know there should by a callback for this async operation, but I can't figure out how to structure it. Here is the code: var geocoder; var map; var lat = 0; ...
ادامه مطلبVote count: 0 To lea javascript, I implement and test classic algorithms with it. Here is my attempt at implementing binary search and tests for it: var assert = require('assert') function binsearch (xs, v) { if (xs === undefined || xs.length === 0) { retu null } var lo = 0 var hi = xs.length - 1 while (lo xs[i]) { lo = i + 1 } } retu null } var check_bsearch = function (bsearch, xs, x, i) { it(bsearch.name + ' [' + xs + '] ' + x + ' ' + i, function () { assert.equal(bsearch(xs, x), i) }) } describe('Test binsearch', function () { describe('on a sorted array', function() { var xs = [] for (var i = 0; i < 2; ++i) { xs[i] = 2 * i for (var j = 0; j...
ادامه مطلبVote count: 0 I get this error from the 1.8.10 ts compiler in the context of a nodejs / express project: Error:(17, 23) TS2345: Argument of type 'typeof "/Users/ME/Documents/Apps_And_Sites/Js_Apps/site/apps/directory/directory_contr...' is not assignable to parameter of type 'Router'. Property 'param' is missing in type 'typeof "/Users/ME/Documents/Apps_And_Sites/Js_Apps/site/apps/directory/directory_contr...'. Here is the controller file: Import * as express from "express" import * as directory_models from "./directory_models" import * as forms from "formidable" let directory_router = express.Router() // HERE ///////// // GET directory_router.get("/list", function (req, res) { function call...
ادامه مطلبVote count: 0 So I've been searching for the better half of my work shift now, and I caot seem to find the answers I need. I'm writing a VBScript that searches the Active Directory for a computer object. If the object does not exist or exists and is in the correct OU, then it should run a separate script that creates/joins the computer to the AD. ObjExist_CorrectOU_7 = Null ObjExist_CorrectOU_10 = Null If compare = True Then Win7_OU = "OU=DisallowRDP,OU=64Bit,OU=Win8" Win10_OU = "OU=DisallowRDP,OU=64Bit,OU=Win10" For x = 16 to 46 If Asc(Mid(objRS.Fields("distinguishedName"), x, 1)) = Asc(Mid(Win7_OU, (x - 15), 1)) Then ObjExist_CorrectOU_7 = True Else ObjExist_CorrectOU_7 = False End If Next...
ادامه مطلبVote count: 0 I am using Parse (an exteal JS lib) inside Angular JS 2. However, when I try calling the function gotoMain() from inside a call back function of Parse, it looks like things are not loaded properly. For example, when routing to 'Main' as in the code below, Main is loaded, however, the variables in Main are not bound properly and ngOnInit in Main is not called. export class LoginComponent { useame: string; password: string; msg: string; constructor(private _router: Router) { console.log("in Login component constructor"); } onSubmit() { Parse.User.logIn(this.useame, this.password, { success: function(user) { this.gotoMain(); }.bind(this), error: function(user, error) { // The logi...
ادامه مطلبVote count: 0 I'm developing an application that requires some initial configuration when first deploying(initial params, server adress,...etc). This application is written in a different language than python, but I'm using python because it's the language that's the most commonly pre-installed on linux machines. I'm thinking of installing the prerequisites at the top of the script like so: import os os.system("python setup.py install ") from import But then I'm installing a package on a computer that belongs to a user, only to use it just once. Should I just uninstall it when my script ends? How do I go about this? asked 1 min agoJelle Criel Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have the following regex (? and my sample test messages. The trouble I am having is converting this to Javascript from PHP since Javascript does not support negative lookbehind. I would like to match for any hazcon 0 or hazcon0 but ignoring any instances of #hazcon0 and #hazcon 0. #hazcon0...
ادامه مطلبVote count: 0 I've build a topotrainer in Flash consisting of 50 states. For every state I made a frame. The code of these 50 frames should be the same for all, while the graphics defer. If I put the code on the first of the 50 frames it is only working there. If I put the code at every frame I get a lot of errors, because all the functions are doublated. Is there a way for all the 50 frames to run the same code? Thanks for your time, Justin asked 2 mins agoJust van Til Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have used Rscript ruer but its not working. public static string SetupPath(string Rversion = "R-3.2.3") { var oldPath = System.Environment.GetEnvironmentVariable("PATH"); var rPath = System.Environment.Is64BitProcess ? string.Format(@"C:Program FilesRR-3.2.3binx64", Rversion) : string.Format(@"C:Program FilesRR-3.2.3bini386", Rversion); if (!Directory.Exists(rPath)) throw new DirectoryNotFoundException( string.Format(" R.dll not found in : {0}", rPath)); var newPath = string.Format("{0}{1}{2}", rPath, System.IO.Path.PathSeparator, oldPath); System.Environment.SetEnvironmentVariable("PATH", newPath); retu newPath.ToString() ; } This button_clcick method calls the rscript ruer....
ادامه مطلبVote count: 0 I am creating an application in which i want to create a custom popup box by using javascript. Please help me for getting this. I am totally unknown about this. Any help will be appreciated. asked 1 min agoNeha Purwar Let's block ads! بخوانید...
ادامه مطلبVote count: 1 I have tried searching at many places but couldn't get a proper explanation. Whats the difference between these two kinds of function declaration in JavaScript.enter image description here asked 1 min agoankit biradar Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm trying to create a cesar cipher in Javascript and having trouble figuring out how to do the shift. It may be that my approach is complicating it, but I'm trying to understand how to set a max value for adding numbers, but have the addition continue starting from the minimum number. Here is the code I have: $(document).ready(function(){ var alpha = []; var encoded = []; alpha = { '1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e', '6': 'f', '7': 'g', '8': 'h', '9': 'i', '10': 'j', '11': 'k', '12': 'l', '13': 'm', '14': 'n', '15': 'o', '16': 'p', '17': 'q', '18': 'r', '19': 's', '20': 't', '21': 'u', '22': 'v', '23': 'w', '24': 'x', '25': 'y', '26': 'z' }; $('#cipher_form').sub...
ادامه مطلبVote count: 0 I am trying to lea ionic 2 using type script .could you please tell me how to display hello world text in ionic 2 using typescript ? I am able to display hello world text in angular 2.I want to use ionic 2 and display text . here is my code where is used angular 2 http://plnkr.co/edit/xd0TbWO5deHB7xTjXibR?p=preview could you please tell what are library of ionic 2 need to include to display text. here is ionic 2 documentation http://ionicframework.com/docs/v2/getting-started/tutorial/ // Code goes here import {bootstrap} from 'angular2/platform/browser'; import {Component} from 'angular2/core'; @Component({ selector:'app', template:'hello' }) class App{} bootstrap(App) please s...
ادامه مطلبVote count: 0 How can I make a loop that loops 20 times and adds 20 different things to an array and an object? Please help, I know this is basic stuff I just can't figure it out for some reason. asked 1 min agoMichael M Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm working on a website with ruby on rails where people can make posts and what not. The posts use Markdown for rendering the text just like Stack Overflow. Whenever a user is making a post, there is a live preview div right beneath the text area that show's the user what their post will look like, just like here on stack overflow. My problem is I don't know how to get the Markdown to render on the live preview. My javascript code for the live preview is window.onload = function(){ var idea = document.getElementById("idea-text"); try{ idea.onkeyup = idea.onkeypress = function(){ document.getElementById('live-preview').ierHTML = this.value.replace(/n/g, ''); } } catch(e){ } } T...
ادامه مطلبVote count: -1 Hi Everyone I am newbie to web development so can you help me to solve below questions Questions to be solved 1) suggest me best UI design to implement in web as above in image. 2) And From the database,I need to display data as above image in html by using any one of the scripting language JavaScript and Jquery. if there any other scripting language that can be used to optimize performance please suggest me with a code Thanks in advance. edited 1 min agojcubic asked 4 mins agoRaj.2498 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a script.js.php file that I need to load like this Becuase using getScript() is too buggy and load() doesn't fulfill the purpose. The .htaccess is instructed to ignore if .php is missing. But when I then try to use the script-Tag it gives me this: Refused to execute script from ... because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. I searched SO and Google and didn't find any solution (that fits my needs) yet. Thanks in advance. asked 30 secs agotimmyRS Let's block ads! بخوانید...
ادامه مطلب