2018-10-22         Frank

PayPal payment standard returns GET instead of POST from mobile devices, hence not able to validate-record payment

I have integrated PayPal Payment Standard couple of years back to acquire payment.My application is in Asp.Net. It is in sandbox mode currently.I have a Pay Now button in my website having PostBackURL to PayPal site with all the required parameters. When user clicks on the button it redirects to PayPal their user can pay via his account or debit/credit card. And on successful transaction user is sent back to my application. When user comes back to my application I am getting various parameters like "payment_status" in Request.Form collection. I validate the response and sho...

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

ImportError: No module name xxx - How not to permanently set System variables

I'm running python 3.4.2 under Windows 7. I have some modules that I do NOT want to put (at least yet) into the python subdirectories. After much angst, I've gotten them to run, but only at the expense of adding PYTHONHOME and PYTHONPATH to my System variables. I tried creating a batch file, set these and then executed my script. I tried setx, but this just puts the variables in my User variables where python does not appear to recognize them. I find it hard to believe that I can't distribute some of these scripts to my co-workers without forcing them to change their Syst...

 python                     2 answers                     4 view
 2018-10-22         Frank

Spring Boot JWT token Object wise fetching

I am having division table with three row likedivsionId name1 divA2 divB3 divCand customertable likecustId Name divisionId1 cust01 12 cust02 13 cust03 24 cust04 15 cust05 26 cust06 37 cust07 38 cust08 1and user table likeuserId uname password roleId divisionId 1 john *** 1 1 2 ravi *** 2 1 3 bush *** 2 2 4 sam *** 2 3 5 jasd *** 1 ...

 jwt                     1 answers                     95 view
 2018-10-22         Frank

How to POST a data value using @api_view in django rest api?

I have two APIs. From one API, I am sending string data to the second API. In the second API doing some calculation, I save a JSON format data in the API and send back the data to the first API. It is working. But in the second API, if I try to POST string data from the content box it shows error. Here the media type is "application/json". So how do I POST data from the API view? I have added the screenshot of the second API:input dataError MessageSome portion of my views.py of the second API:@api_view(['GET', 'POST'])def sentenceList(request): if request.method == 'GET'...

 django                     1 answers                     31 view
 2018-10-22         Frank

ImportError: cannot import name getoutput

I am using future to port code from Python 2 to Python 3.Upon futurizing getoutput, the import changes from from commands import getoutput to from subprocess import getoutputAnd my code uses getoutput in testing a requirements file. However, when I run the test, I get the following error:from subprocess import getoutputImportError: cannot import name getoutputHow do I avoid this? Or is there any other alternative that could be used for futurizing getoutput from Python2 to Python3 You can get the major version of a Python installation using the sys.version_info object, wh...

 python-3.x                     2 answers                     76 view
 2018-10-22         Frank

How to keep Selenium Webdriver browser open in Python3 when driver is called in a function?

I have this weird issue where I can't keep the Chrome webdriver open if the code is inside a function or a class. Even if I don't call the quit() function on the driver. Here's the functiondef driver_open(): mobile_emulation = {"deviceName": "iPhone 6"} chrome_options = webdriver.ChromeOptions() chrome_options.add_experimental_option("mobileEmulation", mobile_emulation) driver = webdriver.Chrome(r"C:\Users\vaio\Dropbox\PyCharmProjects\Nagora\chromedriver.exe", desired_capabilities=chrome_options.to_capabilities()) driver.get("https://www.y...

 python-3.x                     1 answers                     84 view
 2018-10-22         Frank

Spring boot JWT cannot authorized rest api

I am trying to implement JWT on my Spring Boot 2 project. my reference link https://www.callicoder.com/spring-boot-spring-security-jwt-mysql-react-app-part-2/My Securityconfig file is@Configuration@EnableWebSecurity@EnableGlobalMethodSecurity( prePostEnabled=true, jsr250Enabled = true, securedEnabled = true)public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private Environment env; @Autowired private UserSecurityService userSecurityService; @Autowired private JwtAuthenticationEntryPoint unauthorizedHandler; ...

 java                     1 answers                     53 view
 2018-10-22         Frank

No view found for id 0x7f080035 (com.androidjetpackph:id/container) for fragment PostFragment

I want to create a contract for all the activites to have, for that reason I am creating a base activity, but for some reason the error regarding the R.id.container shows up. I am doing a Base Activity with the following code:abstract class BaseActivity : AppCompatActivity() { @LayoutRes abstract fun layoutToInflate(): Int abstract fun doOnCreated() open fun initialFragment(): Fragment? = null abstract fun defineInitialFragment() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) doOnCreated() }}This is...

 android                     1 answers                     81 view
 2018-10-22         Frank

How to get write in spark and hive query for below case

My data is:User id product_id action1 apple incart1 apple purchased 1 banana incart2 banana incart2 banana purchased3 carrot incartI need output as user_id and product_id whose action only has incart and not purchased. val df1 = df.filter(col("action") === "purchased")val df2 = df.filter(col("action") === "incart")df2.join(df1,df2.col("User_id") === df1.col("User_id") && df2.col("product_id") === df1.col(...

 sql                     4 answers                     46 view
 2018-10-22         Frank

How to insert multiple values from one table to another?

Need a small help in creating an oracle query.I have a table in which I want to insert data from another table.I get the account numbers from this table by using query:select AccountNumbers from Company;It returns me,12342345345645675678Now I want to insert this data in another table.Insert into tempTable (id, group, accountNumber) values (seq_mytemp_sequence, 'A', (select AccountNumbers from Company) );I have created the sequence which works fine. But it fails saying that the sub query returns more than one row which is obvious.I want the data in temp table to be inserted ...

 sql                     3 answers                     65 view
 2018-10-22         Frank

known and "unknown" incompatibilities between sql 2005 and 2008?

as usual, we'd like to think that there won't be any trouble migrating our applications to the latest sql version...but...but...but...well, just to be prepared, has anybody stumbled into some nasty incompatibility issue?(for example, I remeber that after migrating from 2000 to 2005, one linked server we had to a sql 6.5 server stopped working) The msdn list of deprecated features is very comprehensive. [XXX]The MSDN article Backward Compatibility for SQL Server 2008 covers all of the major components. [XXX]

 sql-server-2005                     2 answers                     23 view
 2018-10-22         Frank

PyQt4 Drag & Drop

Qt4 has support for Drag & Drop actions and I've used them like in the tutorial. Now I want to be able to drag external elements (files) into the GUI form and perform actions based on that (like get the full path and copy it somewhere). I'm not sure whether this is a limitation like something Qt cannot do. Does someone know how you can do that with Qt? Simply drag a file into a GUI... Thanks,Marius Most file managers provide drag-and-drop data using the text/uri-list target.Regarding the linked tutorial, first you need to set the widget to accept dropping text/uri-...

 python                     1 answers                     51 view
 2018-10-22         Frank

BCP Utility - omit default values in import file

I have a table:CREATE TABLE [dbo].[EXTRACT]( ID int IDENTITY, CREATE_DTTM datetime default GETDATE() NOT NULL, CONTRACT_ID varchar(30) NOT NULL, ACCOUNT_NUMBER varchar(30) NOT NULL, EXCEPTION_REASON varchar(max), PRIMARY KEY(ID ASC));And a source file that only supplies columns 3, 4 and 5. Below is my XML format file:<?xml version="1.0"?><BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <RECORD> <FIELD ID="1" xsi:type="CharTerm" TERMINATOR="," MAX_LEN...

 sql-server                     1 answers                     30 view
 2018-10-22         Frank

Difference between Functions Bot, Web App Bot & Bot Channels Registration in Microsoft Azure?

What's the difference?I couldn't find specific information about all three services here or on Microsoft Azure or on Azure Bot Service... Function and Web App bots are essentially the same thing. The core difference is that most of the business logic for a functions bot is contained in one or more Azure functions which are c# scripts, while the business logic for a WebApp bot is contained in an WebAPI running as an App Service.Now, a Bot Channels Regstration is an entirely different beast. This resource is what you use when you want to use the Bot Service functionality i...

 azure                     1 answers                     39 view
 2018-10-22         Frank

"Provisioning VM failed. Require plan information" when creating an image from image

I was trying to create a GPU device from an image of another GPU device. But, Azure keeps showing me the same error:So, what exactly is the Plan information is Azure talking about?. Also, is there some way to bring up a generalized VM? Template which I'm using: [though I am trying directly from the portal]{ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "location": { "type": "String" }, "virtualMachineName": { "type": "String" ...

 azure                     1 answers                     42 view
 2018-10-22         Frank

How to remove 'index.php' from permalinks [WordPress on Composer]

I have local server, on which I'm running WordPress with Composer.After database migration from my local to AWS RDS, the permalinks changed it's behaviour: now there's 'index.php' in the beginning of tags, like: http://example.com/index.php/name-of-pageAlso, in the wp-admin->Settings->Permalinks the structure is custom now: /index.php/%year%/%monthnum%/%day%/%postname%/Details about my local server:Xubuntu 18Apache2AllowOverride All for both / and var/www/it's on Composer, with custom dir (wp-content is seperated from wp core).htaccess:# BEGIN WordPress<IfModule mod_re...

 wordpress                     1 answers                     40 view

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