## Javascript – Provide a handmade file selection for PDF files

I'm working on a project in vuejs where I basically need to provide a file selector (created by myself) that only displays the PDF files that are in the project's parent directory. For example, if my project is located in the directory & # 39; / projects & # 39;, all PDF files in that directory (& # 39; / projects & # 39;) must be displayed in the file chooser
-There is a desktop application that will be implemented later in electron-.

Anyway, to solve this problem, I tried different things, only one of which worked:

1. (works): Access the directories and list the files with nodejs from the back and send the information to the front. The problem is, it's a bit tedious to do this, in addition to what it takes to do a back-to-back project for such a small application, and that does not require very complex databases or logical operations.

Therefore, I would like to know if this problem can be solved completely from scratch. To access a particular directory, you must list and read its files.

1. Use an input-type file and, in a sense, define a home directory, such as: For example, the directory whose files I need to display so that the files in that directory already appear loaded in the input as soon as the page has been rendered so they can be accessed from the beginning without displaying the file selection associated with the input. The problem is that, as I've already learned, an initial input directory can not be defined because it would be a security issue.

2. From javascript working in vuejs, access in any way the file chooser associated with the input type file. The problem is that I do not know if that's possible. I found it out in several places and did not find any information that had anything to do with it.

I know that the question I ask does not imply too much doubt with a clear code sample or a very simple answer to that question. But I would like to know if anyone can help me by explaining what I should do, in general. Someone who can tell me which of the options I have chosen is the best and how to solve it, or if there is a better option and what it is all about.

Many thanks 🙂

## does pointdns whois provide protection? [on hold]

As the title implies, I'd like to use pointdns to reference one of my domains to my Heroku application, and I want to know if pointdns offers whois protection, or do I have to buy it from my domain provider?

## oop – Can you provide detailed examples of abstract data types in Java?

I'm currently learning Java at school and I'm busy with abstract data types. I have a task where I create a Uno card game. This game is divided into smaller tasks. At the moment I have to create abstract data types for the game. I've read a lot about abstract data types and watched a lot of YouTube videos about abstract data types so I understand what the definition of an abstract data type is, and I think I understand them conceptually (maybe not), but I'm not able to to make my own or I do not know how to make my own for this game. To create an ADT, I only create classes with attributes (ie variables like `string color = "red";` and empty methods like `getColor(){}`). If so, where do I create the actual implementation for the methods? Do I create the implementation in an interface or is it the other way round? If possible, can you provide examples of ADTs and interfaces with details so that I can understand the concept? I study visually, so examples and videos really help me. I know that it may be annoying to answer some of you, but I really need your help. I start to realize how bad my school is and how I'm prepared to fail because my computer programming department and my teacher are bad. It's never available for any kind of tutoring or extra lessons, and there's no tutoring for Java at my school.

## c – I can not find any test cases where my code does not provide the correct answer

Recently I solved a problem with SPOJ: Problem link: SUM GCD
I have to calculate the value of the following equation:
$$sum_ {i = 1} ^ {n-1} sum_ {j = i + 1} ^ n gcd (a (i), a (j)) ; text {where} 1 leq n leq100$$

Wrote the following code with brute-force approach, since the restrictions are small enough to pass, but I get WA,

``````#include
#include
#include
#include

typedef unsigned long long _uint64;

bool _take_input(size_t*,size_t);
size_t _find_gcd(size_t,size_t);
_uint64 _find_gcd_sum(size_t*,size_t);

int main(void) {
uint16_t test;
size_t n,*seq;
fscanf(stdin,"%hu",&test);
assert(test>0);
while(test--) {
seq = NULL;
fscanf(stdin,"%ld",&n);
assert(n>1 && n<101);
seq = calloc(sizeof(size_t),n);
if(seq) {
if(!(_take_input(seq,n))) fprintf(stderr,"_take_input() not executed successfully!n");
fprintf(stdout,"%llun",_find_gcd_sum(seq,n));
free(seq);
} else fprintf(stderr,"Memory not allocated to seq integer pointer!n");
}
return 0;
}

bool _take_input(size_t*seq,size_t n) {
for(size_t i=0;i0 && seq(i)<1000001);
}
return true;
}

size_t _find_gcd(size_t a,size_t b) {
return (b ? _find_gcd(b,(a%b)) : a);
}

_uint64 _find_gcd_sum(size_t*seq,size_t n) {
_uint64 gcd_sum,no_of_pairs,loop_cnt;
gcd_sum = loop_cnt = 0;
no_of_pairs = (n*(n-1))>>1;
for(size_t i=0;i<(n-1);++i) {
for(size_t j=i+1;j``````
``` Than the number of different pairs for any set of sizes $$n$$ can be calculated with: $$frac {n * (n-1)} {2}$$, So the statement assert(loop_cnt == no_of_pairs); Check whether I consider all couples or not. I can not determine the test cases where my code fails.I wonder where my code gives the wrong answer because the logic to calculate the equation is correct. ```
``` ```
``` Author AdminPosted on August 18, 2019Categories ArticlesTags answer, cases, code, correct, Find, provide, Test ```
``` An entity belongs to another entity. Should a REST API provide only the ID of the parent or endpoint? Say a dictionary belongs to a language, For the endpoint dictionary/{id}which is preferred from: {..., 'language_id': {id}, ...} and: {..., 'language': '/language/{id}', ...} ? Author AdminPosted on August 18, 2019Categories ArticlesTags API, belongs, endpoint, entity, parent, provide, Rest Reseller provider does not provide logs Recently, our IP was reset to zero by a well-known reseller hosting company. The company did not provide any data on it and I was completely charged. Is that fair? Need your reviews. Please check the help desk conversation: Me: server not available. Problem loading page, please help. Dealer company: Please explain. All server services are running normally … Me: No, please check the websites on the server Reseller Company: Your dedicated IP address was not routed due to a massive DDoS attack on various domain names hosted on the IP. We have removed the null route and the websites should be online in the next 10-15 minutes. Me: I did not receive any information about this. Please help. Let me know what to do. Reseller companies: Using Cloudflare for all your domain names is a good place to start, as the actual server IP is hidden in this way. Me: Immediate relocation of cloudfare to all domains is not possible. Also domains are not registered with me. Customers scream, I find in the last 4 months no complaints on these server domains. Please help. Reseller Company: How exactly do you help? You notice that your domains are attacked from the outside, right? This is our company policy. We will not forward the IP address until the attack is over. Otherwise, the entire server, including your domains, will fail. Of course, if the attack stops, we will remove the blockade. Me: Is it a ddos ​​attack on your network? Can you please tell me the cause of the problem? When will it be solved? Almost 5 hours down. I can not handle calls! Reseller Company: I did not say that … Do not play shy with me … I told you ONLY YOUR IP IS TAKEN !!! The blockade has been eliminated. When the attack restarts, your IP address will be reset to zero. Me: What's that answer? How do I know that my ip is being attacked and what can I do without clues? Websites are inactive. I try to help my customers. Reseller Company: How do I know it's your IP? Do you have a laugh? We have server logs that show that all DDoS attacks attack ONLY your IP address. This is one of the reasons why we provide you with a dedicated IP address so that we know who is attacking whom in such cases. To help your customers, you need a CDN. That's why I suggested Cloudflare! This is a response to someone trying to blame our network for the fact that your client's sites are being attacked! And that is the ONLY answer you will receive! Me: Please specify the protocol. Reseller Company: The functions of WHM have been activated. If you have further questions, please do not hesitate to contact us. Me: All my clients' websites are still inactive. I am dissatisfied with the kind of help. Please help. Reseller Company: I'm not happy that some of your customers are compromising the stability and security of the entire server, which also has about 1500 accounts! I can guarantee that your IP address will be zeroed the next time without removal. The attack seems to have stopped. The IP has been restored and the websites including myclientwebsite.com are now operational. Me: You have not yet deployed logs. How should I act? Can you understand ? At least tell me what I have to do! Reseller Company: I've told you at least twice that you need to use Cloudflare for your domain name so that does not happen! I can only say it that way if you do not understand it. I'm so sorry. We will not provide you with logs because we deleted them because the attack has inflated the Apache protocol in gigabytes … Author AdminPosted on August 14, 2019Categories ArticlesTags logs, provide, provider, Reseller Account Security – Why does CORS still provide an open API, with all requests provided with a placeholder (*)? In the case of an open API, the only possible value for Access-Control-Allow-Origin is a wildcard (*) because you can not have a list of allowed domains. However, this does not seem to cause developers to make mistakes and keep the system secure. How is that possible? Do not all domains allow you to make every request the same as if you had no SOP or CORS policy? I may not really get the security provided by CORS, but I understand that it avoids an unwanted domain using session cookies from a user without their permission. I still do not understand why it protects the user when his account is used for unwanted purposes when a route to change data about that domain opens. Author AdminPosted on August 10, 2019Categories ArticlesTags account, API, CORS, Open, Placeholder, provide, requests, security We create a Btc Doubler investment website and can provide the btc Doubler website within 24 hours at a very reasonable price. – HYIPs We offer a complete website with free domain and lifelong free hosting(i) BTC Doubler Investment Script(ii) Domain and Hosting(iii) logo(iv) designFor more information, visit our website customwebmaker.comSkype: live: customwebmaker.comE-mail: customwebmaker.com@gmail.com Author AdminPosted on August 10, 2019Categories ArticlesTags BTC, create, Doubler, hours, HYIPs, investment, price, provide, reasonable, Website Reseller host that will later provide the migration service Hello white members, I know that each host offers a migration service for hosting new resellers for specific time and accounts. But here I am looking for a reseller host who will later offer a migration service. I mean anytime. I do not care that it is asking for little reasonable price. The reason I am looking for this reseller is because. I want a brand new reseller hosting and I do not want to transfer existing accounts anymore. But I would like to offer a free migration service to my customers who come to me from another provider. To attract more customers, I have to offer a migration service to attract more customers, as most hosts do now. But as a reseller, I can not do that myself because of restrictions in Reseller WHM. So I'm looking for a reseller who always offers a migration service at a very reasonable cost. please suggest I prefer 100-200 GB + Store and Overselling enabled. Author AdminPosted on August 6, 2019Categories ArticlesTags host, Migration, provide, Reseller, Service Provide 30 high-quality and secure backlinks for Germany for 60 US dollars Offer 30 high quality and secure backlinks for Germany What you get with this offer If you are looking for organic and nature, follow the German backlinks, then I am here to help you. German social bookmarking for bookmarking sites hosted in Germany to attract universal visitors. Now your website can receive targeted traffic from Germany with our new and unique linkbuilding service. I will do it manually all submission. Increase your ranking. increase sales Increase your audience 100% unique work Penguin and Panda safe Permanent backlinks They are all powerful and powerful, safe from penguin and panda. Author AdminPosted on July 29, 2019Categories ArticlesTags backlinks, dollars, Germany, highquality, provide, Secure Posts navigation Page 1 Page 2 … Page 27 Next page ```