Newest Questions

Q&A for professional and enthusiast programmers

C# Database connection via a single method but using multiple query

Hi just a quick question for my own curiosity. I am trying to not repeat my code. Im still learning how to use parameters and arguments properly so i would imagine it will be through this route here ...

React JS - trigger event on certain state vlaue

How in react js i can trigger parent event at a certain child state val? For example: i have Parent component and Child. Parent component have state activeIndex. Child have state activeTask. I ...

How to extract multiple substring matches from string in C#?

I have a string contains tagged contents with similar patterns like below: This is a <ss type="">(example)</ss> string which <ss type="">(contains)</ss> tagged contents. ...

Adding class to Parent - Jquery

I'm trying to toggle class "Opacity" to its parent class "date-range" when i clicked on the filter link. I tried with closest method , but is not working. Please suggest me what went wrong ? //=...

Entity Framework Relationship

I have a model for Users and definition is public class User { public string UserID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public ...

Hyperledger Fabric Network with 5 peers, want to add 1 Auditor How?

After working a while with Fabric. I stuck in part of adding Auditor into the network. as my understanding Auditor is used mainly for detect if any illegal transaction happen within the network of ...

Differences in source code downloaded by R and source code in website

I am scraping a website extracting information about some product, buy I have problems with prices. Mi code is the following: > enlace<-"http://www.carulla.com/products/0000687608965009/Crema+...

Axiom Not Returning Depending On Contents of Json

I have an Python Flask api that is being called in a React app using Axiom. I'm using the following code in NameForm component to handle requests from my Flask api. import React from 'react'; ...

Full postback from UpdatePanel only if true

I am trying to do a login system whereby if the user keys in a default password, it will prompt for a update of password. The controls are all in an UpdatePanel, and i am able to force full postback ...

SQL: JOIN Syntax Variation

I am using PostgreSQL, but I think the question applies to other SQLs as well. I was editing a JOIN clause, and I ended up with the following syntax. tableA JOIN tableB JOIN tableC ON tableB.fk = ...

Avoid weak references by using function parameter types?

I have a function that accepts a block as a parameter. I can use trailing closures to pass in a block of code, but that closure must use a weak reference when retaining self. For example, see the ...

Javascript list filter code not working twice on single page

I'm trying to incorporate two filterable Javascript lists on the same page (in separate divs) using example code by W3. Link here: https://www.w3schools.com/howto/howto_js_filter_lists.asp The code ...

post deployment to google cloud the site seems down

I have a pretty basic website(having html/css/js codes) to be hosted at google cloud. I went into the server pulled in the code and tried to build it. cd /opt/my_project_name/src git pull && ...

Push notification without background service in android

In our android app, its background service has a socket connection to our node js server. The connection will keep alive as long as there is an internet connection. When socket receives message from ...

Compile a ATL program with cl.exe

I'm trying to compile a ATL program with cl.exe, what option should I use? For now I use cl /DUNICODE *.cpp And it complains about atlenc.h, so I need to add the ATL option, any ideas?

How to create a feature vector

I'm new to image processing. My final year project(automatic number plate detection) is to recognize characters in vehicle number plates.I need to create a feature vector for that. I only have a rough ...

How to handle MongoDb concurrency update

I am using spring boot & MongoRepository. I am facing issue with concurrent process trying to update & read from database . This is my usecase : I am running my service on multiple instances ...

Accessing a moved std::string in a new thread

Consider the case below The name string is moved as an argument to the thread. void start(std::string&& name) { t = std::thread{&ThreadRunner::run, this, std::forward<std::...

Merging in R Programming

I want to merge 2 dataframes where each have same column name Date_Time but different row counts. I want to merge these depend upon Date_Time and here I want all the rows should include if the column ...

Sql server 2016 polybase error using hadoop

I have a simple pipe delimited file (newfile.txt) on my hdfs and I have configured my polybase correctly. I am having a tough time to import this file onto my sqlserver using Polybase. Here are the ...

Google sheet script get filtered rows

I want to update my calculation result when I use filter view to filter rows. But I don't know how to use script to retrieve filtered rows form filter view. Any ideas to make this work? Thanks!

Appcelelerator titanium in past downgrade the “Team” plan to “Pro” and now removed from Pro account too

I had a pro account of appcelerator titanium with life time membership, but now they had remove from this plan ? Earlier I had a team plan that titanium few time back change to pro, that was also ...

Eclipse generate WSDL use Java Class minOccus=0 setting

I had defined a java class for web service data input import java.util.Date; public class MaterialDoc { public String workid; public String mblnr; public double mblpo; } And define a ...

How can I disable clicks but still allow scrolling in an iframe?

I have an iframe showing on my page in a panel of a fixed height but the page rendered in the iframe is much larger. I don't want the user to be able to click on anything in the iframe. I know that ...

axios couldn't pass data to server side

here is my code instance.post('cart/delItem', {test:'gg'}) .then(function (response) { console.log(response); }) .catch(function (...

All possible chunks of list in python

Given a list eg. [2,3,4,10,20,30,102] I need all possible chunks/sublists of length 3 as follows, [[2, 3, 4], [3, 4, 10], [4, 10, 20], [10, 20, 30], [20, 30, 102]]

Ansible: Select only part of the stdout

I have written a small playbook as below permissions.yaml --- - hosts: centos tasks: - name: Set permissions find: paths: "/home/portaladmin/cq/author/crx-quickstart/repository/...

What is a good Scripts workaround for Google Sheets recalculating random int equations?

What I'd Like to Do I'd like to make a button (image) that recalculates only specific cells when pressed, but I can't seem to pass an input into "Assign script." (I tried placing =generateRandomInt(...

Opensource cloud platform for Wordpress Installation

I'm looking for open source cloud platform to install and run WordPress blog, seems like Google, AWS are giving free tier but its for only one year - is there any open source cloud tools where we can ...

ModalPopupExtender won't reload iframe in updatepanel on second call

My page is loading a separate aspx page for user input into an iframe within an UpdatePanel contained within a ModalPopupExtender. This works fine but when I try to register the btnOK asp:button using ...

kubectl apply Vs. kubectl set image

To update a Deployment's image in a pipeline, I currently do, for example, kubectl set image ... 0.0.$BUILD_NUMBER, which works fine. However, the same Deployment's YAML also defines a ConfigMap and ...

how to prevent XSS attack with php function

i m using php htmlspecialchars function to prevent xss attack but i m not sure , Can i prevent xss attack 100% using php htmlspecialchars($input_value); function !? if no what is the simple way to do ...

Move button in another CSS file onto index.php?

Yeah I know my question is probably very confusing but just hear me out. Basically I have a test website with a login system that logs you in with the Steam API. My login button is styled on a ...

Get Boolean from Bus values in Vue Component

I have a vue component for a vue multiselect within a form. I want to disable/enable this until two other fields have been filled in. I have accessed that data via bus values inside my component but ...

twitter dont load meta tag card preview

i put in my doc html the meta data like twitter showed to me but when i check in twitter card validator, it show nothing my meta tags are it: <meta name="twitter:card" content="...

Json.NET Serializing my object gives me the missing output

I writring web api in webform but have some trouble I using entity framework with Db First . After i get list object i want send to client list object but i always only get first object . Other ...

unable to create application pool in wix installer

I am creating wix installation and I am trying to create application pool and add it to the application. The problem is that application pool is not created during installation. When I create ...

Using bash/sh/ksh in a shell script

I want to know what additional happens when I mention bash in the first line of shell script. Even if I don't mention it in the shell script, the script works fine. How this extra addition benefits ...

How to crawler top 10 news

I am using a node js to crawl news on website, so i had a little problem about "How to crawl news top 10", so everybody can help me ? i had a little problem about "How to crawl news top 10". So ...

HTTP Post request with Payload and metadata in Spring Rest

I am working on restful web services using spring4. Post request contains payloads and metadata which I want to validate it and then send it to back end.I would appreciate if anyone can provide some ...

How can I make dmg file for OSX from a IntelliJ-maven project?

I'm new in IntelliJ-maven-java programming, and I want to make dmg file for Mac OS as a result of my program. My development environment is Ubuntu-IntelliJ-Java-Maven. As I searched, there are some ...

App gets crash only in naugat version of android.While parsing its giving me null pointer exxception

The code goes like this JSONObject obj = new JSONObject(question_json); JSONArray quiz = obj.optJSONArray("Quiz"); for (int i = 0; i < quiz.length(); i++) { JSONObject ...

Is there a way to create a TabbedActivity with swipable tabs section

I try to create a TabbedActivity based app, but I'm stuck with some design problem. The tabs names are to big for the screen, resulting in a bad displaying of tabs name. So, is there a way to make ...

Line Messenger API - Resolve sticker

I'm writing a small chat tool integrating with Line. One issue I'm facing is to display stickers sent by users from Line. In Line's webhook documentation about sticker, only a package Id and sticker ...

Use Python to send keystrokes to Gameboy emulator in Windows?

This question was asked 3 years ago and the guy ended up with unsatisfying results. See: https://www.reddit.com/r/learnpython/comments/22tke1/use_python_to_send_keystrokes_to_games_in_windows/ Also ...

how to access the attention weights from the attention class

class AttLayer(Layer): def init(self, kwargs): self.init = initializations.get('normal') #self.input_spec = [InputSpec(ndim=3)] super(AttLayer, self).__init__( kwargs) def ...

problems with indexes in a searching code

I have made the following Java code for searching for the longest substring that is common between a pair of strings. The code is as follows: public static void main(String[] args) { // TODO ...

Generate PDF from JavaScript or .NET Core

I am developing an App in Angular for the frontend and .NET Core for the Api. I have been looking for a way to create a PDF file in either the browser or the server. I have looked at jsPDF for the ...

Extracting Subject line using python 2.7

I have many files of emails and I want to extract subject line using regex but I got no result. I used many regex codes but it didn't work. SBJECTRX = re.compile("(?m)^Subject: (.+)$") Subject = re....

How can i create character introduction [on hold]

http://www.lovelive-anime.jp/otonokizaka/worldwide/members.php i want to create something like this web site. I want to know how to create an area which have the character photo, When you click on ...
15 30 50 per page
Translating... 0%