back soft

مطالب مرتبط با «script» در back soft | نویسنده: استخدام کار

ReactJS / Javascript conditional statements

Vote count: 0 I am using arrow keys to move the circle object. Now I want to limit it to the height and witdth of the svg area. My conditional statements partially work as once the ball gets to any of the 'walls' it gets stuck and does not move anywhere. I understand why it does it but can't think of a way to prevent it from doing it. Thanks class App extends React.Component { constructor(props) { super(props) // Why you need to bind _handleKey: // https://facebook.github.io/react/docs/reusable-components.html#no-autobinding this._handleKey = this._handleKey.bind(this) this.state = { h: 200, w: 800, x: 50, y: 50, r: 20, stroke: "none", fill: "#6F90A2" } } _currentPosition() { // Display the ...

ادامه مطلب

Starting with Tizen App Development with Html,JavaScript,Css and Core java

Vote count: -1 I have made an Web Application through html and JavaScript with CSS i wanted to enhance it and make an application for samsung tizen Z1 thats working on tizen OS. How do i proceed For it. asked 4 mins agoGaurav Dubey Let's block ads! بخوانید...

ادامه مطلب

Retrieve value from open external API - visual studio - javascript - AJAX

Vote count: 0 I would really appreciate some advice, I'm trying to retrieve information from an open API for the first time. The API details are here, https://data.police.uk/docs/method/neighbourhood-locate/ I want to retrieve the 'force' and 'neighbourhood' values and save them into variables, I want to save them as variables as I'm then calling googlemaps to display the KML map. I managed to get quite far on other sections of my code, such as geocoding a user inputted address and retrieving the Long/Lat, but I am now struggling to send the long/lat to the exteal API and save the response. I've hardcoded the long/lat into the below URL for this advice request, I think I'm getting a response...

ادامه مطلب

parseFloat works in JavaScript not in TypeScript

Vote count: 0 The following works in JavaScript but not in TypeScript. How can we parse a float in TypeScript? var result = parseFloat("12234234234323.0"); var div = document.getElementById('result'); div.ierHTML = result; asked 1 min agoShaun Luttin Let's block ads! بخوانید...

ادامه مطلب

Support "styled text" in a scriptable Mac application (Cocoa Scripting)

Vote count: 0 My app supports being scripted with Applescript. I am trying to make styled text content from my app, stored in NSAttributedString objects, available to an Applescript user. I thought I could simply deliver styled text with the NSAttributedString class, just like I deliver plain text with the NSString class, but that does not work - Cocoa Scripting then reports that it caot convert or coerce the data. I wonder if I'm missing something or if this is just plain impossible with the standard classes supported by Cocoa Scripting? AppleScript does, after all, know of the "Styled Text" type, as seen in this example: set stxt to "Styled string" as styled text So, if AppleScript knows t...

ادامه مطلب

Receiving 302 status code on nodejs serve of javascript file

Vote count: 0 I have no idea why I am receiving a 302 status code on a javascript file added in my html code. The other javascript files in the same folder are being served fine with a status 200 code, so unsure what to even look for? Here is the html: $(document).ready(function(){ console.log("js is being called"); var submitButton = $('#loginSubmit'); submitButton.click(function (ev) { alert("clciked submit"); ev.preventDefault(); userVal = $('#user').val(); passwordVal = $('#password').val(); var dataVal = {user: userVal, password: passwordVal }; $.ajax({ type: "POST", url: "/login", data: dataVal, success: function (data) { if(data.failOrSuccess === 1) { alert("success"); window.location...

ادامه مطلب

Javascript change object to custom array

Vote count: 0 I want to convert this object: "age": [ { "Under 20": "14", "Above 40": "1" } ] to this: {c: [{v: Under 20}, {v: 14}], c: [{v: Above 40} {v: 1}]} I know how to use $.map and arr.push but I can't get the key Under 20 and take the element value 14. How can I achieve that? edited 40 secs ago asked 3 mins agoSSuhat Let's block ads! بخوانید...

ادامه مطلب

Has anyone seen this code? (Injected Script)

Vote count: 0 It seems to be obfuscated, It was injected on one of my clients sites. Does anyone recognize this? Is it harmful?...

ادامه مطلب

Javascript reverse array of numbers and subtract 2, then 1, then 0 then add 1, add 2 etc

Vote count: 0 Sorry for the awful title. I've crashed enough browsers and asking for help. Here's the specific problem I'm trying to solve. Create a function called 'reversedLooper' that when passed an array will loop through it backwards and subtract 2 from the last element, 1 from the second to last, 0 from to the third to last, add one to the fourth to last, add 2 to the fifth to last, etc. until it reaches the front of the array. Retu the list when you are done asked 50 secs agoadam.shaleen Let's block ads! بخوانید...

ادامه مطلب

change line color by recursion in postscript

Vote count: 0 I want to make my pate to be in many colors. I mean I want my DoLine to make each time line with simmilar but not the same colour. So I did /red 0.41 def /green 0.1 def /blue 0.21 def /incRed {/red red 0.01 add} def /incGreen {/green green 0.03 add} def /incBlue {/blue blue 0.05 add} def and my DoLine /DoLine { incRed incGreen incBlue red green blue setrgbcolor rotation rotate 0 linelen rlineto currentpoint stroke translate 0 0 moveto } def But it output my pate in only one colour which is set as /red 0.41 def /green 0.1 def /blue 0.21 def Is there something I missed? Here is my all code if u need it %! /Helvetica findfont 8 scalefont setfont /ang1 -141 def /ang2 {-2 ang1 mul} ...

ادامه مطلب

Javascript Change HTML Elements by input

Vote count: 0 So im trying to make it so in my input which is maximised at 1000 and minimised at 0.10 basically change an element to the given output of the input then times it by 0.98 Here is what i have so far: 0 1 - 6 Gems to bet: Profit: var input = document.getElementsByClassName("form-control") function myFunction() { x=document.getElementsByClassName("profit"); // Find the elements for(var i = 0; i < x.length; i++){ x[i].ierText=input * 0.98; // Change the content } } asked 46 secs agoNot Lui Let's block ads! بخوانید...

ادامه مطلب

ASP.NET Paypal Subscriptions Integration Example

Vote count: 0 I am coding a website in ASP.NET which will allow to subscribed users to access a section on my website, which should be very simple but i have no idea where to get started since i'm new to ASP.NET. I want a registered user to click the subscription button which will redirect him to paypal, once he subscribes/pay and it is a valid subscription, make his account subscribed -> give him access. Also, needs to know if the subscription has ended -> remove access to the user. First time doing this and i really need a good example which i can't seem to find and i am sure some of you have examples/good tips on this. asked 54 secs agoiamanoob Let's block ads! بخوانید...

ادامه مطلب

How do I add a $( document ).ready() function to this script?

Vote count: 0 I tried reading and inserting the document function in this code but I have no idea what im doing. Can someone tell where I should put the document initialization and why? this would be of great help. thanks. Here's a fiddle of what the jquery is for $('.quantity, .drink').change(calculateTotal); function calculateTotal() { var $form = $(this).closest('form'), total = 0; $form.find('.drink:checked').each(function() { total += $(this).data('price') * parseInt($(this).next('.quantity').val() || 0, 10); }); $('#totalDiv').text(total); } asked 37 secs agoKevinG Let's block ads! بخوانید...

ادامه مطلب

Eliminate render-blocking JavaScript and CSS in cache minify

Vote count: 0 How to solve Eliminate render-blocking JavaScript and CSS in above-the-fold content issue ... Installed W3 cache plugin in wordpress. Got below error in CSS and Javascript(js) How to solve this issue? http://website.com/cache/minify/000000/M9bPKixNLarUMYYydHMz04sSS1L1cjPzdAz0fTPzEnMTq1LjA4ry9XMyk_SLk4syC0qK9QtyStMz84r1yxMrC_Iz80qQWBRo1S0uyUzOriTWBIhqqMv1IDxi9JVlpqTmO7nDNEK5AA.js http://website.com/cache/minify/000000/fYxRCsJADEQv1CX1III3KOk2dmPXzZKkQj29BSn0Y_VrhuG96eHKBZ_4puGmAuZbJvtGsCTqUSayrm9gzfFw667eJbP8oDJusrqBJy7LWoPynDwYTzSi_n1WsirF-EXdBR7kFeMC0ezop3XgEmGmQspxV9r1Aw.css asked 2 mins agosoftwaresolution Let's block ads! بخوانید...

ادامه مطلب

How to display description of method parameter?

Vote count: 0 I have a method documented like this: /// /// Execute a call request to the endpoint specified /// /// Endpoint of API public string Call() { retu null; } but when I put the mouse over Call I can't see the URI param description, only the Call method description. I also try to press ctrl + shift + space but nothing happean, an image example: asked 2 mins agoSandokan Let's block ads! بخوانید...

ادامه مطلب

Enabling intellisense in webstorm for any Javascript library

Vote count: 0 Can anyone please guide me how to add intellisense in webstorm for Google maps or any other Javascript library that I plan to use such as AngularJS or Google Maps. Any sort of help will be helpful for me. Thanks in advance. asked 1 min agoSyed Danish Ali Let's block ads! بخوانید...

ادامه مطلب

Script to get all tweets liked by a user

Vote count: 0 I m looking for a way to get all the tweets liked by a given user on Twitter. For example I used Tweepy to get all the tweets but tweepy doesnt provide methods to get all the tweets liked by a user asked 37 secs agoAkil Adeshwar Let's block ads! بخوانید...

ادامه مطلب

Cannot subscript a value of type [T]

Vote count: 0 I just was writine simple, understood for me, chunk of code, but it seems not working. func sort(array: [T], ascending: Bool) -> [T] { if array.count...

ادامه مطلب

How can this vbscript work properly with run command?

Vote count: 0 I want to compress some folders with the batch/vbs solution like here: http://superuser.com/a/112094 This one works, but the original solution uses the "sleep"- function and my archives have different filesizes, so that this wouldn´t work properly. My idea was to use the Run command (wait parameter), but it fails. set FILETOZIP=C:usersxyzdocumentsfolderOrfile set TEMPDIR=C:usersxyzdocumentstemp rmdir %TEMPDIR% /s /q mkdir %TEMPDIR% xcopy /s %FILETOZIP% %TEMPDIR% echo Set objArgs = WScript.Arguments > _zipIt.vbs echo InputFolder = objArgs(0) >> _zipIt.vbs echo ZipFile = objArgs(1) >> _zipIt.vbs echo CreateObject("Scripting.FileSystemObject").CreateTextFile(ZipFile, True).Write "...

ادامه مطلب

my javascript jquery doesn't work in script but work in console

Vote count: 0 I have my javascript : $(".highcharts-container .highcharts-data-labels g text").each(function(){ console.log("au milieu"); $(this).on('click',function(){ console.log("test : "+$(this).html()); }); }); it is inside : $(document).ready(function() { Every other javascript function work fine but not this one. The JS file is charged by the page. Any ideas ? asked 2 mins agoDyM Let's block ads! بخوانید...

ادامه مطلب