Vote count: 0 I have following code to show a loading panel after e.g. clicking a button and making an Ajax call: $(document).on("click", function (e) { window.LoadingPanel.Show(); }); After the Ajax call following code makes sure the loading panel disappears again: $(document).ajaxComplete(function() { if (window.LoadingPanel != null) { window.LoadingPanel.Hide(); } }); But in some cases I redirect to another page depending on the result of the Ajax call by setting the window.location.href. In this case I want the ajaxComplete function NOT to hide the loading panel until the redirect has been succeeded. How can I check in the ajaxComplete function if the window.location.href has been change...
ادامه مطلبVote count: 0 I have been assigned a task to fetch the tableset and dataset from the web services using the stored procedure in SQL SERVER 2014. Can someone help me with this case. I just wanted to know the syntax if the stored procedure. I am not able to understand how would I fetch data from the web services as it is not a database and they are going to call the procedure name only in their web service. Thanks in Advance asked 48 secs agopaemmi Let's block ads! بخوانید...
ادامه مطلبVote count: 0 In this question I did not see suggestions to use constructor. So instead of typeof callback == "function" I would use f && f.constructor==Function. To me it seems obvious that comparison to memory pointers is always better than comparison to strings in terms of both runtime performance and coding safety. Why not use constructor to detect all types and forget about ugly typeof ? It works for all primitive types, functions and arrays: undefined === undefined null === null [1,2,3].constructor == Array (1).constructor == Number (true).constructor == Boolean (()=>null).constructor == Function 'abc'.constructor == String (new Date()).constructor == Date else object, so use instanceo...
ادامه مطلبVote count: 0 On Installing VueJS while ruing Gulp in Laravel Project, I get following: Me-MBP:simpleb2b AdnanAhmad$ gulp build /Applications/MAMP/htdocs//myProject//node_modules/laravel-elixir-vue/main.js:4 Elixir.webpack.mergeConfig({ ^ TypeError: Caot read property 'mergeConfig' of undefined at /Applications/MAMP/htdocs//myProject/node_modules/laravel-elixir-vue/main.js:4:19 at /Applications/MAMP/htdocs//myProject//node_modules/laravel-elixir/dist/index.js:29:16 at Array.forEach (native) at global.Elixir (/Applications/MAMP/htdocs//myProject//node_modules/laravel-elixir/dist/index.js:28:24) at Object. (/Applications/MAMP/htdocs//myProject//gulpfile.js:16:1) at Module._compile (module.js:5...
ادامه مطلبVote count: 0 I have an application where I show Fedex labels in my browser as PDF. I have used send_data to render each label as follows and it works perfectly: @label_image = Base64.decode64(image_hex).html_safe #image_hex is a text field where I store the label in db send_data @label_image, :type => 'application/pdf', :disposition => 'inline', :filename => 'test.pdf' But, I want to render multiple labels in the similar way i.e I can have an array of labels say @labels_images and render them to the browser in one request. Each page of the PDF should have one label. How can I do this either using send_data or any other library available for this ? Thanks asked 48 secs agodkp Let's block ads...
ادامه مطلبVote count: 0 There is a program that I am currently trying to write a batch uninstaller for. In this case I would normally uninstall using WMIC, however the program is not listed under "wmic product get name | sort". I can tell that it is making registry entries, so I know if the program is on the machine and was considering an if statement to check for those entries. Any ideas on how to uninstall the program "psiphon" through batch or powershell? asked 37 secs agoTtech Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I receive a JSON string retued from a remote Webservice. Something like this: [{ "id": "001", "link": "Google" }, { "id": "002", "link": "Yahoo!" }] But then when i try to parse it in my Javascript, i have problem parsing it. I tried: var response_string = '[{"id":"001","link":"Google"},{"id":"002","link":"Yahoo!"}]'; console.log("Output (1) --> ", response_string); var response_object = JSON.parse(response_string); console.log("Output (2) --> ", response_object); Then the outputs are like: Output (1) --> [{"id":"001","link":"Google"},{"id":"002","link":"Yahoo!"}] Uncaught SyntaxError: Unexpected token h in JSON at position 30 I guess...
ادامه مطلبVote count: 0 Is it possible to add a custom HTTP header to SignalR Hub from JS client when the coection starts? My SignalR hub is shared both by my mobile and web client. I can pass a header from the mobile client but I'm not sure if this is possible to do this from the web client. This is what I'm trying to do var name = Context.Request.Headers["useame"]; how do I differentiate between the web and mobile client? asked 1 min agoAhmed Mujtaba Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm a newbie in JS and have a little to no knowledge about asynchronous program and promise. I have a problem in getting result from post PHP as written in this code: showModalLink = function(d, i) { $('#myModalLabel').text(d.source.name + ' - ' + d.target.name); $('#modalJum').text(d.jumlahlelangsama); var lelang = d.daftarlelangsama.split(", "); var lelangmodal = []; var promises = []; for (var i = 0; i < lelang.length; i++) { querystring = "select pemenang from lelang where id = " + lelang[i]; console.log(querystring); var queryobj = { query: querystring }; promises.push($.post('indikasi3modal.php', queryobj)); } Promise.all(promises).then(function(results) { if (results[i] ...
ادامه مطلبVote count: 0 Using Angular 2.0 (final), how can I obtain the ViewContainerRef of a DOM element created by an exteal, non-Angular library, after app/Component bootstrapping/rendering has occurred? I had previously used DynamicComponentLoader.loadNextToLocation(), but that was deprecated as of RC5. The Problem (TL;DR) I'm attempting to use Angular 2.0 to insert a dynamically-created Component inside of a popup window that is generated at runtime by an exteal, non-Angular library (specifically, an InfoWindow/Popup for an ESRI ArcGIS JavaScript API 3.x Map). Since the popup window is generated entirely by the exteal library after app bootstrap and the parent Component's ngAfterViewInit()/ngAfte...
ادامه مطلبVote count: 0 I need to retu Min and Max Values of two Integers in most situations in my Pascal Script. But every time I need to create a TStringList and convert it to an Array Of String and then get its Min and Max Values. I like to have two functions like Min and Max to make this easier like Unit Math in Delphi. For Example, Log(IntToStr(Min(1000, 26))) Output should be 26. Log(IntToStr(Max(45, 1989))) Output should be 1989. Thanks in Advance. asked 1 min agoBlueeyes789 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I would like to find the ierWidth and ierHeight of the screen via Javascript, and then place the values into the width and height variables of the body class in the style area (css) of html. For example:stylebody { background-image: url("images/hello.jpg"); background-repeat: no-repeat; background-color: brown; width: valueW; height: valueH;}stylewhere valueW is the retued value of the pixels of the ierWidth of the screen, and valueH for ierHeight. The "px" pixels value would need to follow the retued number of course.Is this possible?Thanks for any input. asked 40 secs agoRich007 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Pretty much the title. I want to use google app script to gather some info from the web, and put it in the document. I'd assume it is possible to google things from google script, but I caot find an answer. Can anyone help me with this? asked 1 min agouser1932868 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am trying to pass a class variable as an optional parameter to a function. But it requires a default value. What could I set the default value for the optional class variable. Private Function SaveFruit(Optional byval tempBanana As BananaClass) asked 25 secs agoGowtama Krishna Let's block ads! بخوانید...
ادامه مطلبVote count: 0 lookupAllForSQL is a database method. and i want to store value in FavTitle,table name and identifier are dynamic. for (int i=0; i...
ادامه مطلبVote count: 0 I have file with Json format: {"uid": 2, "user": 1} {"uid": 2, "user": 1} {"uid": 2, "user": 1} When i use following code, it show an error: raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 22) with open('E:/list.txt','r') as target: my_list = json.load(target) How to convert content of my file into list of dictionary ? Thank you asked 28 secs agoNGuyen Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm having trouble passing data from a custom cell by a user tapping a button in that custom cell. I sometimes get the wrong cells data since the cell is being reused. I was wondering if there was a full proof way to always get the right cell data to its button in each cell no matter which cell is currently on the screen. Below is my code. Any help is greatly appreciated. My Custom Cell: protocol CustomCellDelegate { func segueWithCellData() } class CustomTableViewCell : UITableViewCell { var delegate = CustomCellDelegate? @IBAction func buttonTapped() { if let delegate = self.delegate { delegate.segueWithCellData() } } } MyTableViewController: class MyTableViewController : UIT...
ادامه مطلبVote count: 0 I am trying to create a new document wherein some of the field values would come from the current document. Note that current document is not in edit mode. There are three buttons in the current document: Edit Document //Validate inputs myForm = window.document.forms[0] myForm.Refresh.click() myForm.Edit.click() Add Guest //Validate inputs myForm = window.document.forms[0] myForm.AddGuest.click() Close myForm = window.document.forms[0] myForm.Close.click() Once the Add Guest button is clicked, it must be able to access the lotusscript agent which can be found in another hidden button, "AddGuest". @Command([ToolsRunMacro]; "AddGuests") Once the Add Guest button's clicked, there ...
ادامه مطلبVote count: 0 to enhance my project, how can I refer exteal shared library(.dll) and .h files in visual studio 2010. asked 10 secs agoAman Datta Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm using Google Apps Script, whose Drive library has the following function: setSharing(accessType, permissionType) accessType: Access (enum) permissionType: Permission (enum) To allow for a good user experience, I have the following objects to match enum values to nice Strings, and vice-verca (I only show here the objects for the Access, but I have the same for the Permission): /*** Method 1 ***/ var ACCESS_STR = {}; var ACCESS_ID = {}; ACCESS_STR[ DriveApp.Access.ANYONE ] = "Any."; ACCESS_STR[ DriveApp.Access.ANYONE_WITH_LINK ] = "Any. w/link"; ACCESS_STR[ DriveApp.Access.DOMAIN ] = "Domain"; ... ACCESS_ID[ "Any." ] = DriveApp.Access.ANYONE; ACCESS_ID[ "Any. w/link" ] = Driv...
ادامه مطلب