back soft

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

Filtering tables with Javascript [PHP/SQL]

Vote count: 0 So I have an SQL query which pulls all data from a mysql table, called example: function get_example($co){ $statement = "SELECT * FROM `example`"; if ($result = $co->query($statement)) { $rows = array(); while($row = $result->fetch_array()){ $rows[] = $row; } retu $rows; } else { retu 0; } } I call this function in PHP and store the value in $example. I can then use a foreach to create a table of everything: ID Name Description This is all simple enough and I can use a form with method POST to choose a value and filter the table accordingly (for eg, only show entires where the description field is a certain value). My question is, how do I filter this table using JS? I would wa...

ادامه مطلب

I have learned most of the syntax of php and have created some simple scripts? now what is the next step?

Vote count: 0 I want to lea to create and modify php applications. I leaed most of the common syntax by now and understand basic concepts like coecting to mysql and post and get http methods, but still not sure how to go about creating something complex like a full application with libraries and how it all coects together. I tried analyzing already existing apps and get really confused just by looking at codes that call on other files with many custom functions which are unreadable to my eyes. I hear about frameworks and about libraries, but I am pretty confused in this step of the way. What would be the concept I am missing to lea to make the leap towards creating complex applications. Any ...

ادامه مطلب

How to show list items got selected in javascript

Vote count: 0 I have a number of list items like sports, music, dance etc. I also have images related to them. What I want to do is, when I click on the image of sports, the list item 'sports' seen selected. I am a begier in java script and do not understand how to make this possible. asked 1 min agomohana choudhuri Let's block ads! بخوانید...

ادامه مطلب

Typescript, NodeJS, ES6 - findIndex on array

Vote count: 0 So i have an issue with using findIndex ES6 function on an array in typescript and NodeJS. The error message i'm getting is: requestType.findIndex is not a function this is my code: let weatherStates:Array = ['current', 'forecast']; let requestType:string = 'current'; requestType.findIndex(weatherStates); and then the error gets thrown, i'm able to use all sorts of other ES6 functionalities though, like the arrow functions etc. it looks like that the polyfill is available in the lib.core.d.ts typing though. Here is mytsconfig.json setup: { "compilerOptions": { "module": "commonjs", "target": "es6", "sourceMap": true }, "exclude": [ "node_modules", "typings" ] } i'm fairly new w...

ادامه مطلب

Javascript + Twitter-boostrap - Why is autoclose not working on this javascript?

Vote count: 0 $().ready(function () { $('#datepicker0').datepicker({ autoclose: true, language: "pt-BR", format: 'dd-mm-yyyy' }); }); On a page I got this datepicker javascript function. But when selecting a date, the autoclose isn't working. What's wrong here? asked 1 min agogtludwig Let's block ads! بخوانید...

ادامه مطلب

JavaScript-Get Page Title in iframe of window

Vote count: -1 My Problem is that i have my HTML codeMy HTML code is loaded in iframe of browser that isA website name abc.com in which there is iframe in which my html code is loaded from xyz.com I only want that the title of abc.com should be show in xyz.comif possible i also want the image in id="icImg" the code of html is given below Men's Fashion Slim Fit Biker Motorcycle Pure Leather Zipper Jacket Coat Λ39 | eBay This is my iframe code Hope some JavaScript is there to help me asked 4 mins agoArshad Ansari Let's block ads! بخوانید...

ادامه مطلب

Syntax of member properties and constructors in angular 2 typescript

Vote count: 0 So I'm looking at an ionic 2 project which is using Angular 2 and Typescript and am a bit confused about how member properties are set. Looking at the example below, Angular automatically injects the dependencies in the constructor arguments. In the case of nav, we are explicitly setting the instance member nav to what's being passed in by the constructor. In the case of Firebase auth, we don't explicitly set it to a member variable, but we can still access it via this.auth, how come? if we try the same thing with this.nav it won't work unless we explicitly set the instance variable. What does using the private keyword do in the constructor parameters do - is it redundant to de...

ادامه مطلب

How to convert UTC date format provided by SalesForce Api and convert it to local Date and Time format using Google Apps Script

Vote count: 0 I have looked at various solutions posted i.e. parsing, substrings and splitting and none of them either produce a value or the required value. The format received via Salesforce API is "2014-08-19T02:26:00.000+0000" Essentially I would like a custom function that can be used within Google Sheets to convert this date/time format and take daylight saving into consideration Thank you beforehand asked 2 mins agoGadget Let's block ads! بخوانید...

ادامه مطلب

Javascript packing object to hash string

Vote count: 0 I have an object that is updating with every mouse click and it could be loaded with the page. I am trying to compress it into a hash ( so users can link their variations Ex:/page#HsaWiSAU, but I am having trouble making it into a readable link. So far I've tried couple compressing libs but nothing. I was close with the lz-string one, but when it compresses it, there are those huge strings. { "FX": { "row1": { "sp6111": { "ranks": 5, "curr": 1 }, "sp6114": { "ranks": 5, "curr": 0 } }, "row2": { "sp6121": { "ranks": 1, "curr": 0 }, "sp6122": { "ranks": 1, "curr": 0 }, "sp6123": { "ranks": 1, "curr": 0 } }... }, "CX": {}, "RX": {} } Can you suggest me a lib I should look at or ho...

ادامه مطلب

How do I find the .data() (jQuery) equivalent in JavaScript?

Vote count: 0 I have this code var info = $($(r).find(".BuyPriceBox")).find(".PurchaseButton").data(); which I am trying to change into the JavaScript equivalent I can't find anything that would resemble ".data()" in JavaScript? Could anyone help me with this, and if kind enough help me translate it to JavaScript? asked 1 min agojoseph michael Let's block ads! بخوانید...

ادامه مطلب

How to make javascript function external which is having PHP code inside?

Vote count: 0 I want to make my all javascript functions exteal. But problem is most of them are having PHP code inside. For Example- function resend_otp_registration() { var a = 'sample'; $.ajax({ type:'POST', url:'admin/customer/resend_otp_registration', data: { a:a, }, success:function(data) { if(data==1) { alertify.alert("OTP resent on your mobile number."); } }, }); } How can I put this type of JS function in exteal JS file? edited 14 secs agoFast Snail asked 1 min agoThe developer Let's block ads! بخوانید...

ادامه مطلب

NodeJS Addon calling Javascript callback from inside NAN AsyncWorker::Execute

Vote count: 0 I would like to call a nodejs callback from within my asynchronous addon function. I have seen the synchronous example (here) and I am using a wonderful asynchronous example (here) as a starting base. However, when I try to execute a callback that was given to the c++ AsyncWorker child class, I get a Segmentation fault. Here is my code: #include #include #include #include using namespace Nan; using namespace v8; using namespace std; class ScriptWorker : public AsyncWorker { public: ScriptWorker(Callback *callback, const std::map) : AsyncWorker(callback), script(script), cbs(cbs) {} ~ScriptWorker() {} void Execute () { Local argv[] = { New(id) }; // Segmentation fault here cbs["...

ادامه مطلب

Apps Script Utilities.parseCsv assumes new row on line breaks

Vote count: 0 When using Utilities.parseCsv() linebreaks are assumed to be new rows entirely. The output array from this function will have several incorrect rows. How can I fix this, or work around it? asked 1 min agodouglasg14b Let's block ads! بخوانید...

ادامه مطلب

Data is automatically sorted when return from Java to Javascript

Vote count: 0 I use DWR to load data into a drop-down when another drop-down is changing. This is the Javascript. ClassX.loadData(StudentId function(data){ console.log(data); } ); I pass Map from Java to above JavaScript. This Map is sorted in the server side with it's value.But when check the Map in the console above, they are sorted automatically with it's key values. Is there anyway to stop this automatically sorting and retrieve the original values sent from server?What is the reason for this? asked 1 min agoshamika Dharmasiri Let's block ads! بخوانید...

ادامه مطلب

blender python script on headless master/slave nodes for a rendering farm setup

Vote count: 0 Does any one ever tried to write a functional error free python script for firing up a master or slave headless blender rendering node? I use { import bpy import os import time import netrender from netrender.utils import * /* for master / bpy.scenes["Scene"].network_render.mode = " bpy.data.scenes["Scene"].network_render.mode = "RENDER_MASTER" bpy.data.scenes["Scene"].network_render.server_address = "10.11.12.13" / for slave */ py.data.scenes["Scene"].network_render.mode = "RENDER_SLAVE" bpy.data.scenes["Scene"].network_render.server_address = "10.11.12.13" /* then */ bpy.ops.render.netclientstart() } DOESN'T WORK :( it renders the default sceene's frames localy and exits HELP...

ادامه مطلب

Deploy SSAS Cube script across multiple cube instances

Vote count: 0 I have an SSAS cube in UAT with multiple changes. I need to now deploy these changes to each cube in live (10+ cubes all with the exact same schema). Then process each cube. What is the best way of doing this? Currently we do this manually by opening up the changed UAT cube in BIDS, changing the Deployment destination (to point to each live cube), and click Deploy. Can an SSIS package with a for loop calling an AS Processing Task handle this, for example? Are there XMLA (I don't know much about it) scripts that may be able to? Thanks! asked 43 secs agotheroyale Let's block ads! بخوانید...

ادامه مطلب

AS3 script not being called on gotoAndStop

Vote count: 0 I am designing an app in Animate CC, and have a setup like this: Each page is a separate 20 frame section of the timeline. The NavigationScript layer contains a script that handles the main navigation, and the ImageControlScript layer contains code to set up event listeners that are specific to each page: import flash.events.MouseEvent; image1.addEventListener(MouseEvent.CLICK, openImage(144)); image2.addEventListener(MouseEvent.CLICK, openImage(145)); trace ("Events added"); When the app starts, everything goes fine: the Event Listeners are added, and the trace is called. However, when I navigate to another page, the script on the ImageControlScript layer are not called, not e...

ادامه مطلب

How to convert this Game Jolt API call from C# to JavaScript?

Vote count: 0 In the Gamejolt API Documentation The trophy.Unlocked in C# var trophyID = 26534; GameJolt.API.Trophies.Get(trophyID, (GameJolt.API.Objects.Trophy trophy) => { if (trophy != null) { Debug.Log(string.Format("> {0} - {1} - {2} - {3}Unlocked", trophy.Title, trophy.ID, trophy.Difficulty, trophy.Unlocked ? "" : "Not ")); } }); ...works fine. But that was C#. I'm using Javascript and my trophy.Unlocked: JAVASCRIPT var trophyID = 26534; GameJolt.API.Trophies.Get(trophyID, function(trophy) { if (trophy.Unlocked != null) { GameJolt.API.Trophies.Unlock(trophyID, null); StopBeen = false; } }); ..caot be recognised. I know I haven't translated from C# to Javascript properly. So can someone...

ادامه مطلب

How to split a JavaScript String by comma's and dots?

Vote count: -1 I want to split amounts with the split function in JavaScript. Possible inputs are: 10,256,326.26 10.269,69 100 What I want to achieve is by doing the split is getting the numeric values in an array, like: [10,256,326,26] [10,269,69] [100] Which regex can I use for this? asked 39 secs agoJonas Let's block ads! بخوانید...

ادامه مطلب

get the list of functions used in a R script

Vote count: 0 I am looking for a nice way to get the list of functions used in a R script. Either using a dictionary or simply using R parser? Thank you asked 1 min agoRockScience Let's block ads! بخوانید...

ادامه مطلب