2018-10-22         Sylvia

Making and receiving payments?

I am looking at building a Website that needs to receive payments from clients and make payments to service providers. Payments will most likely come in as Credit Card purchases and then monthly I will most likely have to pay the service providers after taking a fee. I know there are a lot of options for accepting money via a payment gateway but I also would like to make payments to the bank accounts of the service providers as there could be a 1000+ service providers and I don't want to have to cut all those checks or have to manually send them the money. What options...

 .net                     2 answers                     88 view
 2018-10-22         Sylvia

Find Specific *.exe files in directories and run the app with parameters

I'm trying to find recursively all "MyApp.exe" apps in "C:\Builds" folder and run the apps with "createdatabase closeimmediately" arguments/parameters.What I search so far:ForFiles Microsoft docsHere is the forfiles pattern:forfiles [/p <Path>] [/m <SearchMask>] [/s] [/c "<Command>"] [/d [{+|-}][{|}]]Here is what I have:forfiles /p c:\Builds /s /m MyApp.exe /c "cmd /c start @path" "createdatabase closeimmediately"If I run above script, it is showing error:ERROR: Invalid argument/option - 'createdatabase closeimmediately'.Type "FORFILES /?" for usage.If I r...

 batch-file                     2 answers                     0 view
 2018-10-22         Sylvia

Magento 1 modify product attribute related to stock update

The issue concerns a Magento ver. 1.14.0.1 installation with some marketplace (mirakl) and feeds (datafeedmanager) features. SituationI have to add a product attribute named marketplace_exclusive that will be set to true if the product is sold by the sellers of the marketplace and not by the operator ( the hosting magento shop ).This attribute is relevant when it comes to data feeds as some ERP will not accept products which would have an empty Operator Stock even though they'd have a valid Marketplace Stock. Where your help's neededI can't compute it by chance and need to...

 magento                     1 answers                     54 view
 2018-10-22         Sylvia

How to refresh the JWT in net core?

I have a method to auth the user and create a token with expiration time, but if the token expired, the user cannot use the data. How to handle this?This is my method:[AllowAnonymous][HttpPost][Route("api/token")]public IActionResult Post([FromBody]Personal personal){ string funcionID = ""; if (ModelState.IsValid) { var userId = GetUser(personal); if (!userId.HasValue) { return Unauthorized(); } else if (userId.Equals(2)) { return StatusCode(404, "Vuelve a ingresar tu contraseña"); } List<Claim> claims = new List<Claim>(); fo...

 c#                     2 answers                     93 view
 2018-10-22         Sylvia

Django Rest Framework: Just get certain values of a ManyToMany relationship

I'm using Django Rest Framework to write my API. I want to write different values than the the id (specifically the uuid) into my serializer.Let me give you the basic setup first. I have a model called House which has amongst other values a pk and a uuid. And I have a second model called Citizen which also has a pk and a uuid. House and Citizen have a ManyToMany relationship with each other.I would like to have a serializer that just gives back an array of it's citizen.Here is the not working pseudo code that I tried (and failed):class HouseSerializer(serializers.ModelSeria...

 django                     2 answers                     28 view
 2018-10-22         Sylvia

How do I launch a subprocess in C# with an argv? (Or convert agrv to a legal arg string)

I have a C# command-line application that I need to run in windows and under mono in unix. At some point I want to launch a subprocess given a set of arbitrary paramaters passed in via the command line. For instance:Usage: mycommandline [-args] -- [arbitrary program]Unfortunately, System.Diagnostics.ProcessStartInfo only takes a string for args. This is a problem for commands such as:./my_commandline myarg1 myarg2 -- grep "a b c" foo.txtIn this case argv looks like :argv = {"my_commandline", "myarg1", "myarg2", "--", "grep", "a b c", "foo.txt"}Note that the quotes around ...

 c#                     5 answers                     72 view
 2018-10-22         Sylvia

Program ended without completing the task

When I run my script, it is ended before completing the task that is in while loop.driver = webdriver.Chrome()driver.get('http://example.com')#input("Press any key to continue1")s_b_c_status = "False"while s_b_c_status == "True": try: if(driver.find_element_by_xpath("//div[@role='button' and @title='Status']")): s_b_c_status = "True" except NoSuchElementException: s_b_c_status = "False"if(s_b_c_status == "True"): print("Scanning Done!")else:print("Error")As my site is not having the element it should always print Error, but when I run my co...

 python-3.x                     1 answers                     80 view
 2018-10-22         Sylvia

react-router-dom link works in app.js(parent component) but doesn't work in child component

I have 'Nav' component in 'app.js' ( parent component ) and 'home.js' conditionally to have white space responsively on the bottom of the header only in Homepage by setting header { height: 90vh }. In order to do that, I included < Nav > in header tag in 'Home.js'. And Here the problem came up, Nav Link works well in app.js, but it's not even clickable in home.js.Homepage Header Imageindex.jsimport React from 'react';import { render } from 'react-dom';import { Provider } from 'react-redux';import { ConnectedRouter as Router } from 'react-router-redux';import createHistor...

 reactjs                     2 answers                     47 view
 2018-10-22         Sylvia

Displaying One or Multiple Photos in post like Instagram

I am creating a photo blog app using firebase. I am able to allow user to post one or multiple photos on the firebase database and I am also able to retrieve them successfully.Above image is the bottom view of an instagram post.Just like that I want some type of View or Layout. I already have a working layout which can show only one image with like, comment and share options.If the user wants post one photo, the layout should show just one slide and if user wants to post multiple photos, it should create a so called Sliding View to display all images side by side.How do I d...

 android                     1 answers                     78 view
 2018-10-22         Sylvia

How to find least non-null column in one particular row in SQL?

I am trying to find the lowest number in two columns of a row in the same table, with the caveat that one of the columns may be null in a particular row. If one of the columns is null, I want the value in the other column returned for that row, as that is the lowest non-null column in this case. If I use the least() function in MySQL 5.1:select least(1,null)This returns null, which is not what I want. I need the query to return 1 in this case.I've been able to get the result I want in general with this query:select least(coalesce(col1, col2)) , coalesce(col2,col1))As long a...

 sql                     6 answers                     42 view
 2018-10-22         Sylvia

How to sort rows in a table and fetch row positions?

Consider the following table structure:id name rank position-------------------------------1 Steve 5 02 David 3 0 3 Helen 9 0 4 Mark 15 0I need a fast algorithm to rate these rows by rank column and store the "position" of each row in position field in realtime.Now I have a brutal solution:SELECT * FROM table ORDER BY rank DESCAnd then fetch the result in a loop and update every row filling the position column. But what If I'd have thousands of entries? How can I optimize it? I answered a very similar ques...

 php                     2 answers                     62 view
 2018-10-22         Sylvia

SQL Server 2008 takes up a lot of memory?

I am conducting stress tests on my database, which is hosted on SQL Server 2008 64-bit running on a 64-bit machine with 10 GB of RAM.I have 400 threads. Each thread queries the database every second, but the query time does not take time, as the SQL profiler says that, but after 18 hours SQL Server uses up 7.2 GB of RAM and 7.2 GB of virtual memory.Is this normal behavior? How can I adjust SQL Server to clean up unused memory? SQL Server is designed to use as much memory as it can get its hands on, to improve performance by caching loads of stuff in memory. The recommend...

 sql-server                     4 answers                     19 view
 2018-10-22         Sylvia

PyQt post installation question

I successfully installed PyQt in both mac and PC. To do so I had to install mingw (on PC), Xcode (on MAC) and Qt4.6 library. Now that I have PyQt working perfectly, I would like to uninstall mingw, Xcode and Qt Library from both mac and PC. I know I can remove Xcode and mingw, but what care should I take before removing Qt library. I know PyQt is still using it but it is not using whole 1.5Gig of files installed by Qt installer. So which files should I copy before removing Qt and where should I copy it to. You can remove the demos and examples directories inside your qt ...

 python                     1 answers                     47 view
 2018-10-22         Sylvia

Error magic number - Linux generated file R

I am receiving the error of Error in load("~/Desktop/file") : bad restore file magic number (file may be corrupted) -- no data loadedIn addition: Warning message:file ‘file’ has magic number 'column1'Use of save versions prior to 2 is deprecated I have tried loading it via source(), load(), and readRDS() - I tried this based off another help topic but it didn't aid my situation. It is a Unix generated file and I am aware Rstudio is not friendly towards unix.My file contains tab-delimited data. Three columns. For whatever reason the following read worked.read.delim() [...

 r                     1 answers                     26 view
 2018-10-22         Sylvia

is it possible to run KVM on Azure

Azure Fabric runs on a customized version of Hyper-V, it appears. Is it possible to run a KVM virtualized instance on Azure (using nested virtualization)?I have a custom VHD which is based on Debian (say). Based on this document https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic, it seems that it might be possible, if the Hyper-V drivers are built into the kernel.Has anyone run successfully run a KVM instance on Azure? If so, could you please share your experience. This is possible, but you need select Dv3 and Ev3 series VM. Also, based o...

 azure                     1 answers                     38 view
 2018-10-22         Sylvia

SVG path point at lat and long rather than side of SVG

This question already has an answer here: How to use SVG markers in Google Maps API v3 8 answers Figured out an answer,I set the anchor to the point M for the SVG and this works great, (M is the Move to the absolute coordinates x,y )anchor: new window.google.maps.Point(172.268, 501.67), [XXX]Looks like the anchor needs to be:anchor: new google.maps.Point(195, 510)Making the definition of the icon:let icon = { path: 'M 172.268,501.67 C 26.97,291.031 0,269.413 0,192 0,85.961 85.961,0 ...

 javascript                     2 answers                     4 view

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