2018-10-22         Lawrence

Pass Custom Variable to PayPal server via IPN Message and Response

I had successfully integrated Paypal with my iPhone application, but I got stuck over passing the Custom variable via SOAP to Pay pal using IPN Message. Has anyone pass the Custom Variable to Pay-pal Server????I am making an application for a restaurant,user can make payment using Pay-pal server.I need to pass the Custom variable (i.e Bucket Id) to Paypal. I get this Bucket Id via web service which I call before making request to pay pal server. Now I need to pass this Bucket Id as Custom Variable to Paypal Server so that it returns the Message Notification.Note: - I need t...

 iphone                     1 answers                     98 view
 2018-10-22         Lawrence

Batch file for replace characters in all CSV of a folder

I have a batch file which goes through a specific CSV file (line-by-ine) and at first replaces each comma by a semicolon and then each dot by a comma.How to optimize this batch file, so it cycles automatically through every CSV file within the folder, where also the batch file is located?@echo off setlocal enableextensions enabledelayedexpansion (for /f "tokens=*" %%f in (a.csv) do if not "%%f"=="" ( set "line=%%f" set "line=!line:,=;!" set "line=!line:.=,!" echo(!line! )) > b.csv endlocalMore over no new CSV shoul...

 csv                     1 answers                     13 view
 2018-10-22         Lawrence

Maven cannot find JAR

Recently I tried to develop an interface for my group. My service runs and works well on my local machine, but when trying to use Maven Compile in IDEA, the compilation fails and tells me it cannot find my JAR package. The JAR package I use is JAVE (Java Audio Video Encoder), which was manually added into my CLASSPATH. I know Maven cannot find JAR package without adding dependency to pom, but I can't find the Maven dependency for JAVE, it seems that they only provide a JAR package for users. JAVE HomePageSo in this case, what should I do if I want to successfully compile my...

 java                     2 answers                     58 view
 2018-10-22         Lawrence

One ListView blocks the otherone

I'm working on a app, and the app has two different ListViews, one of them for posts the other is for news.Here are the Views:class NewsListView(ListView):context_object_name = 'news'model = models.Newstemplate_name = 'posts/news_list.html'def get_queryset(self): return News.objects.all()class PostsListView(ListView):context_object_name = 'posts'model = models.Poststemplate_name = 'posts/posts_list.html'def get_queryset(self): return Posts.objects.all()Here is the apps urls.py:urlpatterns=[url(r'^$',views.NewsListView.as_view(),name='news'),url(r'^$',views.PostsListVi...

 django                     1 answers                     42 view
 2018-10-22         Lawrence

Disable Shockwave Flash plugin using Selenium with Python

In a crawling project, the Shockwave Flash plugin keeps crashing. Is there a simple way to disable it to begin with? Many thanks in advance! This worked for me pretty well.from selenium.webdriver.chrome.options import Optionsoptions= webdriver.ChromeOptions()profile = {"plugins.plugins_disabled": ["Shockwave Flash"]}options.add_experimental_option("prefs", profile)# Make sure to add chrome_options=options browser = webdriver.Chrome(executable_path=path,chrome_options = options) [XXX]

 python                     1 answers                     94 view
 2018-10-22         Lawrence

React-router-dom -Same route issue

I am new in the react js framework and I am current doing a navigation but I've encounter a problem regarding my routes. Here's my components from newly installed react js.Index.js import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import 'bootstrap/dist/css/bootstrap.min.css';ReactDOM.render(<App />, document.getElementById('root'));registerServiceWorker();App.jsimport React, { Component } from 'react';import './App.css';import Routes from './routes';class App extends Comp...

 reactjs                     2 answers                     58 view
 2018-10-22         Lawrence

Logging large string causes OutOfMemoryError

My Spring Boot web application connects to many external services and it has a requirement to write all requests and responses to and from the services to log files.I use Logback for the log engine. And following code is for printing the response message to log files.import org.slf4j.Logger;import org.slf4j.LoggerFactory;....private static final Logger LOG = LoggerFactory.getLogger(RequestLoggingClientRequestInterceptor.class);...ClientHttpResponse response = execution.execute(request, body);InputStream s = response.getBody();String loggingResponseBody = new String(ByteStre...

 java                     1 answers                     58 view
 2018-10-22         Lawrence

How to Bind ObervableCollection or IEnumerable to Flow Document Table

How Can I Bind an ObservableCollection or IEnumerable property in my ViewModel to a Table Defined by an Inline FlowDocument? I'm not sure whether it is the correct approach. I want to print an Invoice from my view model(I thought FlowDocument might be an easy method to print). Suppose I have a Property Items in my ViewModel private ObservableCollection<ItemViewModel> _Items; public ObservableCollection<ItemViewModel> Items { get { return _Items; } set { _Items = value; RaisePropertyChanged...

 c#                     1 answers                     91 view
 2018-10-22         Lawrence

Cannot find tables that would join using nested loops

I feel like I will get lots of downvotes here, but let's give it a go.I am trying to explain nested loops vs hash vs merge join to my students on real examples. However, I am struggling to find tables that would join with nested loops (I tried many different sizes, indexes setups, etc.). Postgres always uses hash join regardless of the table sizes, indexes, etc.Could someone give an example of tables (with data) that would join with nested loops without explicitly running set enable_hashjoin = true; beforehand? The following does a nested loop for me (without disabling h...

 postgresql                     2 answers                     57 view
 2018-10-22         Lawrence

How to only display a TreeView expand sign [+] if children exist

I've developed an application that populates a treeview from hierachical data in a database.I've designed it to use lazy-loading so it only gets the child nodes when a node is expanded.My problem is that obviously I don't know if a node has children unless I make a call to the database and look. Currently I have implemented a dummy child node, so that the [+] icon appears for all nodes, I then remove this dummy node and get the real child nodes in the BeforeExpand event.This means I get a [+] icon for nodes that don't have child nodes, so the user clicks the expand icon and...

 sql                     3 answers                     74 view
 2018-10-22         Lawrence

Couchdb view, finds with condition

I'm new to Couchdb, i don't know their design.I know we have to use emit() to make keys for searching.How to make a request on view with these conditions (Like SQL)?Where A = 'b' && Date >= 2010 && Date <= 2020 You need to emit a multi-variate key, something like# mapfunction(doc) { if (doc.A && doc.Date) { emit([doc.A, doc.Date], 1) }} # reduce_countYou can then query it likecurl 'https://host.com/DB/_design/DDOC/_view/VIEW?reduce=false&include_docs=true&inclusive_end=true&startkey=\["a",2010\]&endkey=\["a",2020...

 view                     2 answers                     16 view
 2018-10-22         Lawrence

Dynamically create columns in SQL select query and join tables

I have 2 tables. They are as followsTable : GradeGradeID | Grade ----------------- 1 | Chopsaw 2 | Classic3 | ChieveTable : Moulded QuantityBatch ID | Grade | Moulded | Date -------------------------------------1 | 1 | 150 | 21st May2 | 1 | 150 | 22nd May3 | 2 | 150 | 21st May4 | 2 | 150 | 21st May5 | 2 | 150 | 22nd MayI should get the Output like the followingDate | Moulded | Chopsaw | Classic | Cieve --------------------------------------------------21st May | 450 ...

 sql                     2 answers                     35 view
 2018-10-22         Lawrence

C# Keep Semicolon in URI

I need to keep the semicolon in the URI (DO not escape it). The final url will look something like this:http://dontclick.com?Product=CON&Properties=color;price;locationI've been messing around with UriBuilder but cannot seem to keep the semicolon. It keeps escaping ";" as "%3d"string url = "http://dontclick.com";string product = "CON";List<string> props = new List<string>{"color", "price", "location"};var uriBuilder = new UriBuilder(url);var paramValues = HttpUtility.ParseQueryString(uriBuilder.Query);paramValues.Add("Product", product);paramValues.Add("Prop...

 c#                     1 answers                     59 view
 2018-10-22         Lawrence

Azure Management API fails to authenticate using ADAL

I am looking for a way to stop our Cloud Services in the development environment being billed during out of office time.The resources I found indicate that for a Cloud service stopped being billed when the deployment is removed.We want to download the deployed cloud service configuration and package file to a blob location and remove the deployment to stop the billing. When we want to use them again, we want to deploy from the blob location. We want to use a Powershell script for stopping (downloading and removing) and for starting (re-deploying backup).I found some article...

 azure                     1 answers                     47 view
 2018-10-22         Lawrence

Atomic operations in azure table storage

I am looking to implement a page view counter in azure table storage. If say two users visit the page at the same time, and the current value on PageViews = 100, is it guaranteed that the PageViews = 102 after the update operation? The answer depends on how you implement your counter. :-)Table storage doesn't have an "increment" operator, so you'd need to read the current value (100) and update it to the new value (101). Table storage employs optimistic concurrency, so if you do what comes naturally when using the .NET storage client library, you'd likely see an except...

 azure                     4 answers                     52 view
 2018-10-22         Lawrence

php first week number every month

Don,t think I can find this answer in this forum.How to get the first week number in every month where month start by Monday. This month first week is 36 how to get that? Having this code. But don't work.//get first week number in month $month = 9;$year = 2018;$day = 1;$firstday = new DateTime("$year-$month-1");$dow = (int)$firstday->format('w');$firstday->add(new DateInterval('P' . ((8 - $dow) % 7) . 'D'));$weeknumber = $firstday->format('W');echo $weeknumber ; I think this code will do what you want. It first creates a DateTime object for the first o...

 php                     1 answers                     47 view

Page 1 of 146  |  Show More Pages:  Top Prev Next Last