Vote count: 0 I'm designing a GUI and want to find a library on the JVM or for javascript that I can use with Clojure or Clojurescript. The problem: I need to display 'zoomable' directed acyclic graphs (DAGs). A picture is worth 1000 words, so here is what the interface ought to look like, and how the screen changes under 'zooming': Specifically, every node can have its own inteal graph, with the restriction that each ier graph has the same number of inputs and outputs as the node itself. My experience with graphics is limited in Javascript and nonexistent in Java, but... My ideas: Naively draw the whole graph with all 'ier graphs' already inside the nodes, and fade the ier graphs out for te...
ادامه مطلبVote count: 0 Basically I want to trace the path for function call and assignment. I am thinking of using Antlr to generate the control flow path. Consider the following snippet: 1. function abc(myVar) { 2. console.out(myVar); 3. } 4. 5. x = getAttributes(); 6. abc(x); If I start from getAttributes() as the keyword, I would want to print out the following: 1. getAttributes is an assignment to x - line 5 2. x is the 1st argument to function call abc - line 6 3. myVar is the 1st parameter of function definition - line 1 4. myVar is the 1st argument to console.out - line 2 Is there a systematic way to achieve this using Antlr or any other way without using Antlr? asked 13 secs agoShakeeb Pasha ...
ادامه مطلبVote count: 0 I'm writing a large javascript app and it's a single page application. I'm using node.js with jade. And I have question about loading javascript files for the front end. Like you have these pages : - profile - dashboard - setting I should load profile.js when the user only come to the profile page correct? I have a layout.html for header and footer, and above pages are children of the layout. I don't want to load everything at the home at once because that will be too heavy. But my question is am I doing it right by putting my javascript at the bottom of every html file. asked 8 secs agoJamie Monica Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a single HTML file in which I load a bunch of script files, like so: index.html I was wondering maybe there is a way to "require" all these in one script file like so: bower_components.js require('bower_components/angular-ui-router/release/angular-ui-router.min.js'); require('bower_components/angular-local-storage/dist/angular-local-storage.min.js'); etc ... and later compile bower_components.js to contain the actual scripts so that I could simply just use this: thanks in advance. asked 1 min agouser3800799 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 So I currently have some HTML code for a button which is supposed to save data in local storage. here is a section of it Drinks Add more... The button has the id "btnsave" and it is later called upon by this piece of javascript: function store() { if (Modeizr.localstorage) { // window.localStorage is available! var drinksElement = document.getElementById("drinks"); for (var i = 0; i < drinksElement.length; i++) { console.log("box" + i + ", " + drinksElement[i].value); localStorage.setItem("box" + i, drinksElement[i].value); } } else { // no native support for HTML5 storage :( } } document.getElementById("btnsave").addEventListener("click", store); Except in my browser window, w...
ادامه مطلبVote count: 0 I have tried several solutions to run python script out of VBA. My current solution that still doesnt work Dim wsh As Object Set wsh = VBA.CreateObject("WScript.Shell") Dim windowStyle As Integer: windowStyle = 1 Dim waitOnRetu As Boolean: waitOnRetu = True wsh.Run "C:Python33python.exe C:Users***DocumentsPromo modelsget_sku_data.py", windowStyle, waitOnRetu Any ideas? asked 4 mins agopaveltr 1 Answer Vote count: 0 xlwings claims to make python from excel very easy: Sub RandomNumbers() RunPython ("import mymodule; mymodule.rand_numbers()") End Sub To make this run, just import the VBA module xlwings.bas in the VBA editor (Open the VBA editor with Alt-F11, then go to File > Impo...
ادامه مطلبVote count: 0 I have a file with the following format : dd/mm/yyyy name1 dd/mm/yyyy name2 dd/mm/yyyy name3 My goal is to have a new file with something like : name1 name3 The condition to be in this file is that the date before the name is older than 6 month. Thanks for helping asked 39 secs agomarouane Let's block ads! بخوانید...
ادامه مطلبVote count: -1 How with JavaScript to load content from other website into iframe on localhost by keeping dom-structure to get to it with getElementsByTagName? When loaded content in iframe is not to see by getElementsByTagName("*"), how to get to dom-elements of this content? asked 1 min agouser1939029 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am currently leaing Javascript and I am at the most basic level someone could be. I wrote a simple script for generating a referral link for envato market. Its a very simple function which gets the profile url and useame and a onclick is used to combine these variables and put the ?ref= in there. JS function refferalGen() { var userName = document.getElementById("useame").value; var profUrl = document.getElementById("profurl").value; var result = (profUrl) + "?ref=" + (userName); document.getElementById("resulttxt").value = result; } I want it to be so that I dont have to use the button to get the result Instead it is real-time. When i type in the useame textfield it automati...
ادامه مطلبVote count: 0 I would like to make line chart in my project. i was already make pie chart using datavisulazation dll but now want to make line chart with dynamic data so how can i make it? asked 1 min agoUrvish Patel Let's block ads! بخوانید...
ادامه مطلبVote count: 0 This is the code, it seems very simple and it's kind of a prototype of something I want to achieve. I simply want the top 10% or so of my screen to have a button or something along these lines that opens a random link in the iframe that takes up the rest of the screen below. But I'm having trouble getting this to open in the target iframe. So here's the code before I began messing with it too much. I don't know javascript at all, so I'm surprised I got this far at all. asked 31 secs agoresriel Let's block ads! بخوانید...
ادامه مطلبVote count: 0 As I understand, there are two ways to inject JS execution onto current page in Android webview. I'm wondering if there are pros/cons of one over the other except that webview.evaluateJavascript(...) provides a call back? Thanks. asked 3 mins agohixhix Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I would like create a javascript that automatically find and replace a text variables with another ones in multiple HTML files, for instance: text to search (located as is in HTML files): %%LNG_SyndicateNewProducts%% %%LNG_SyndicateNewProductsAtom%% %%LNG_SyndicateNewProductsIntro%% %%LNG_SyndicateNewProductsRSS%% %%LNG_SyndicateNews%% %%LNG_SyndicateNewsAtom%% etc. etc. text to replace (located all in a file): Produse noi Ultimele % Produse Noi (Atom) Ultimele produse încărcate conţin ultimele %s produse adăugate pe %. Ultimele %s Produse Noi (RSS) Noutăţi etc. Anyone can help me? Thanks, Coel asked 37 secs agouser3739437 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm looking for a code, which adds a transition after the picture changes. Here's my code: function displayNextImage() { x = (x === images.length - 1) ? 0 : x + 1; document.getElementById("img").src = images[x]; } function displayPreviousImage() { x = (x...
ادامه مطلبVote count: 0 TypeScript newbie question. In our project, we are using some exteal JavaScript libraries where we needed to add *.d.ts files. I understand this use case and the reason why we needed to do this. But, for our own interfaces that we are defining, one of my developers suggested that we define them in *.d.ts files so that we could have access to the interface type without importing it into the modules that need to use it. For example, we wanted to create an interface for an "error-first callback" function so that we could reuse it in many areas. So instead of this... export function helloWorldEventually(callback: (err: Error, result: any) => void) { callback(null, 'Hello World'); }...
ادامه مطلبVote count: 0 I'm doing a website project for college and I want to display three pictures on website. There are 10 pictures stored in my folder (all named "slika 1 to 10" and the script has three variables, all of them randomly generate a number between 1 and 10 and then shows a picture "slika"+randomNumber. How can I check if all three variables are different so that those three pictures are always different whenever I refresh the website. JS code: window.onload=odaberiSliku; var broj1=Math.floor(Math.random() * 10) +1; var broj2=Math.floor(Math.random() * 10) +1; var broj3=Math.floor(Math.random() * 10) +1; function odaberiSliku() { document.getElementById("slika1").src = "slike/randomsli...
ادامه مطلبVote count: 0 I am getting frustrated as I copied and pasted the code you use on http://ahlechandre.github.io/mdl-stepper/ and when I try and Step (press continue) it does not want to move, in-fact it does NOTHING. please help I am using Smarty-PHP and putting the javascript and CSS in the header area of the site - jQuery I am using I have that at the bottom {literal} @-webkit-keyframes FadeIn { 0% { opacity: 0; } 100% { opacity: 100; } } @-moz-keyframes FadeIn { 0% { opacity: 0; } 100% { opacity: 100; } } @-o-keyframes FadeIn { 0% { opacity: 0; } 100% { opacity: 100; } } @keyframes FadeIn { 0% { opacity: 0; } 100% { opacity: 100; } } @-webkit-keyframes FadeInFromBottom { 0% { height: 0; pad...
ادامه مطلبVote count: -1 i want to get a value from JavaScript prompt and pass it to input for finally submit it function createdir(){ var newdiame; newdiame = prompt('Please input the directory name:', ''); if (!newdiame) retu; $('createdir').newdiame.value = newdiame; $('createdirForm').submit(); } asked 4 mins agoFrank Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am trying to create an If Else Update Script. This is what I have put together so far: IF (SELECT [FileType1] FROM Document WHERE ([FileType1] like 'E-mail' or [FileType1] like 'outlook')) update Document set [FilePath]='' ELSE ((SELECT [FileType1] FROM Document WHERE ([FileType1] not like 'E-mail' or [FileType1] not like 'outlook')) update Document set [Path]='' What I am I doing wrong? asked 1 min agoJeff Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I've reading up on interfaces and type assertion. Been looking at pages like: I'm getting the hang of it, and it's pretty straightforward in understanding the basics. Though: Nowhere do I find how to type a JSON object to a object I use in my app, when HTTP is involved. For example, I have an Array of Teacher-objects. Each Teacher has an id, name and an Array of Students. I have another class Students that contain their attributes..... etc. Somewhere in those links I read that, unless you need to perform actions to an object, it's enough to have just an Interface. But unless you want to do actions to the Object you need a separate class? My actual Teacher class begins with... :...
ادامه مطلب