Vote count: 0 For a toshiba PostScript 3 printer with a unit for crimp/tack/stitch (whatever the correct translation is) I would like to know if there is a way to trigger the crimp by a PostScript command? As it looks this can be configured in the printer to be done after a complete document has been printed. But I need to print 3 single page documents and then crimp. asked 36 secs agodigipenKH Let's block ads! بخوانید...
ادامه مطلبVote count: 0 How would I retu quotes around an array, given an input array. I.e. retu '[2, "go"]' when the argument is [2, "go"]. This is what JSON.stringify does, but I'd like to implement it myself. Thanks. asked 51 secs agoD. Splice Let's block ads! بخوانید...
ادامه مطلبVote count: 0 This has been asked a lot but I think I'm a little more unique in situation. Simply, I have developed an extension for Google Chrome and just as a quick Anti-theft thing I decided to obfuscate my code. I knew it would probably be very easy to undo so it was just so keep people who have very little knowledge away from editing my extension (Since I was sharing it by file w/ developer mode as it was in beta still). Anyway, recently I have gotten a new computer and the extension - the public version - was sitting in a cloud so I decided to grab it. I had forgotten that it had been obfuscated and I attempted to undo the process but failed to. I've used a number of websites (And the ...
ادامه مطلبVote count: 0 I use URL to remove products outside a cart. For this I use the following HTML: When clicking on the button, the following script is triggered: {literal} function removeItem(type,num) { var response = confirm("{/literal}{$LANG.cartremoveitemconfirm}{literal}"); if (response) { window.location = 'cart.php?a=remove&r='+type+'&i='+num; } } {/literal} The problem is that it does work, but the results are not visable. This because the page need to be refreshed to see that the product is removed. Is there a way to change the script, so that the page is reloaded? Or better, that the product will be removed using AJAX, without refreshing the page? asked 1 min agoHenk Z Let's block ads!...
ادامه مطلبVote count: 0 I am working on getting an app set up using Angular 2 w/ typescript and I'm having issues getting my karma coverage to find the files I want it to inspect. I've set this up successfully on an angular 1.x application but there seems to be another layer I'm missing with typescript. Everything runs just fine, I see all of my unit tests being checked by karma as expected and coverage says everything was okay and that my code has 100% coverage, which threw up a red flag. After checking the html output for coverage I saw that I have 100% coverage because no files are being checked. Looking at the output in my terminal I see that all of the files I have selected with patte: './src/**/...
ادامه مطلبVote count: -1 I want to use JavaScript variable value in php file without sending by Ajax . asked 57 secs agoMamunur Rashid Let's block ads! بخوانید...
ادامه مطلبVote count: 0 how to check if ComputerHKEY_CURRENT_USERSoftwareClassestg exists or not by Javascript (Supported by All Browsers). asked 1 min agoBottledTurtles Let's block ads! بخوانید...
ادامه مطلبVote count: 7 I'm trying to obtain all possible matches from a string using regex with javascript. It appears that my method of doing this is not matching parts of the string that have already been matched. Variables: var string = 'A1B1Y:A1B2Y:A1B3Y:A1B4Z:A1B5Y:A1B6Y:A1B7Y:A1B8Z:A1B9Y:A1B10Y:A1B11Y'; var reg = /A[0-9]+B[0-9]+Y:A[0-9]+B[0-9]+Y/g; Code: var match = string.match(reg); All matched results I get: A1B1Y:A1B2Y A1B5Y:A1B6Y A1B9Y:A1B10Y Matched results I want: A1B1Y:A1B2Y A1B2Y:A1B3Y A1B5Y:A1B6Y A1B6Y:A1B7Y A1B9Y:A1B10Y A1B10Y:A1B11Y In my head, I want A1B1Y:A1B2Y to be a match along with A1B2Y:A1B3Y, even though A1B2Y in the string will need to be part of two matches. asked Feb 13 '...
ادامه مطلبVote count: 0 How to create image file in android from dataURL which is generated using JavaScript data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT.......== asked 3 mins agosaikumar Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to implement an auto download functionality in browser from s3. I am currently using an anchor tag(created on the fly using javascript) using the following code var link = document.createElement("a"); link.download = name; link.href = file; if(callback) callback(); link.click(function(){ document.body.removeChild(link); }); But this approach does not work in safari because instead of downloading the file, it opens it in the browser(pdf file) and hence prevents the actual html to be rendered. I researched and found that safari does not implement the download tag of html5. Is there another way to download files in the browser. Or any s3 SDK available to do the same? asked ...
ادامه مطلبVote count: 0 I got an array of strings with format: "XXXX YYYY ZZZZ WWWW" i need to sort by YYYY; but if i use the common "sort", will be sorted by XXXXX not by YYYY. I tried to put each element into a diccionary, using the YYYY as key; and using the key of diccionaries as array, then sort this array and take the elements. Anyone thinks another format, "more elegant"? asked 2 mins agodoberdog Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Long story short, I have a web application where i have a button which triggers 2 async ajax calls. The 2 ajax calls use a parameter which is actually a javascript variable set in the application. When the two ajax calls are done, a third ajax call is performed using the result from one of the initial ajax calls. This third ajax call, when done, adds a new div in the content. So far I used CodeCeption with WebDriver, where the above functionality was easily simulated by two simple actions: $I->click(button) $I->waitForElementVisible(newdiv) I am now trying to simulate the same using PhpBrowser but I'm not certain how to approach this: Since PhpBrowser doesn't use javascript, ho...
ادامه مطلبVote count: 0 I have this small form here: What I want to do is, when I click submit, the form should be hidden and only the input should appear: How can I achieve this with javascript ? edited 19 secs agoMatt asked 3 mins agolabas GamePage visogero Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have one button. His first action is to stop a video. Then it's icon change and data-status too. His second action is to reload the page. The problem is that I can't do the second even if I code some conditions. Sometimes it don't do anything, sometimes the second action comes at the same time of the first one. Here is my Jquery code: // STOP VIDEO (ACTION 1) $("#button").click(function(){ $('#button').attr({ src: 'img/film.png', 'data-status':'stop' )}; )}; // RELOAD (ACTION 2) $("#button[data-status='stop']").click(function() { location.reload(); }); // OTHER METHOD FOR RELOAD (ACTION 2) if ($("#button").data( "status", "stop" );) { $("#button").click(function() { location....
ادامه مطلبVote count: -1 For my homework, I just wrote a c++ program that should supply a command line argument(e.g. -l) when you run it. Now, I need to compile and run my program in Unix. So, I need a makefile and a bash script(the name is cddb) to invoke my program. My question is that the sequence of two files. The requirement is like I should enter cddb -l to run the program. So, is it like I should write a bash script which invokes the makefile and pass the argument to makefile. Then the makefile taken the argument and compile and run my cpp file? asked 9 mins agoRuingPig Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have multiple remote modals with auto calculation in them. They're the auto calculation form that a user must select the number from drop down. The first modal is working very well. But it's not on the later on. The javascript code is usually embed in the remote file separately. But when any modal was triggered. The rest of modal is not working in auto calculation. Javascript (embedded each remote file) //clear bs $('body').on('hidden.bs.modal', '.modal', function() { $(this).removeData('bs.modal'); }); //currency format function addCommas(nStr) { nStr += ''; x = nStr.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(d+)(d{3})/; while (rgx.test(x1)) { x1...
ادامه مطلبVote count: 0 I'm using stylus to render some code into CSS on the clientside. If I include the stylus.min.js file in my initial load everything works fine. However because stylus is quite large I would like to delay loading that file until it's needed and grab it with jquery's $.getScript(). Doing so gives me this error: RangeError: stylus:947:26 943| &[data-aaa="1"] 944| margin-top 2em 945| &[data-bbb="1"] 946| transition 1s 947| margin-top -2em ---------------------------------^ Maximum call stack size exceeded at f.visit (http://f264bc8tf77nkh.cloudfront.net/static/1akh96ita/ace/stylus-min.js?_=1465163994282:4:26233) at i.visit (http://f264bc8tf77nkh.cloudfront.net/static/1akh96ita/ace/s...
ادامه مطلبVote count: 0 I am currently developing an ember application. At the moment I am trying to access a property which was set in a route inside of a components js file. The overall is to fetch data from the Facebook Graph API inside the route (as some kind of model) and than accessing those data inside the component to draw points on a map. My template looks like this: // map.hbs {{map-widget posts=posts}} My route looks like this: // routes/world.js import Ember from 'ember'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; export default Ember.Route.extend(AuthenticatedRouteMixin, { fetchAllGeotaggedPosts() { retu new Promise((resolve, reject) => { let...
ادامه مطلبVote count: 0 I've created a simple SDL2 & Opengl ES2 demo. It works in Chrome and Firefox, but in Edge I get this error: exception thrown: TypeError: Object doesn't support property or method 'createVertexArray' The C++ code, where the exception is thrown: // Create Vertex Array Object GLuint vao; glGenVertexArraysOES(1, &vao); glBindVertexArrayOES(vao); Is it my fault, or a bug of the Edge browser or Emscripten? asked 1 min agoIter Ator Let's block ads! بخوانید...
ادامه مطلبVote count: 0 var name; console.log(name === undefined); // retus false Why is this? Isn't name supposed to be undefined since no value has been assigned to it? If I try the same for, let's say, var asd; it will assign it to be undefined. Is name a special keyword or something? Thank you. asked 1 min agoArthlete Let's block ads! بخوانید...
ادامه مطلب