I have a hosting and domain my android application data parse through with that and I just want hide the data from my domain but not from my applications. If I use the permissions with the hosting then data application is also off.I want to do this, Because someone is using my links for himself. Please help me get through this.
vendredi 30 novembre 2018
I searched for charCode event int sapui5, but I didn't find anything even in Demokit(Documentation). Can anyone give example of it
I need to get the charCode of the key when he presses it. I used oEvent.mParameters.value.charAt(0).charCode this code and I got "undefined" when I consoled it. Please help me.
I need a programmers perspective on what I should do
My business Mentor is a Forbes 30 under 30 and CEO, he has assigned me to find him leads for his paid 1 on 1 consulting call (1k) an hour. How should I go about and find people that would be interested? By the way, I get 40% of what I bring in.
Where to begin when hosting a largescale webapp?
I've been looking for resources on how to host a large, non-static webapp with a Laravel backend and using MySQL for a database.
I'm looking on how to host a web app with 10,000-300,000
users active daily, however cannot find any good resources online and I honestly have no idea where to start. I am looking for something that is scalable. Each page is around average 12.5 megabytes
and each entry in my database is on average 1500 bytes
.
Are their resources that exist for applications like this? Or would I have to use my own equipment to host my application
How to print and and interact over a socket on a website?
I have a python script that open a tcp socket.
If you connect to this socket you'll get an output and at some point you have to interact with the script over the Socket.
My problem is that I want to print the output on a web page. But I don't want to connect via PHP to the socket is there any other way?
If you need more information feel free to ask.
Drop-down menu, redirect dynamically to a link based on choice. When submit button is pressed
The change required in home page search form: For example, if I search for an investment advisor in Bengaluru,
right now its shows the URL: https://finvizer.com/?swoof=1&post_type=product&product_cat=investment-advisor-bengaluru
This need to change to: https://finvizer.com/investment-advisers-in-bengaluru/
Code: First one is in functions.php
<div class="header-search-form">
<form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" name="serchvalidformhome" id="serchvalidformhome" onsubmit="return serch_validate_home();">
<input type="hidden" name="swoof" id="swoofhm" value="1" />
<input type="hidden" name="post_type" id="post_typehm" value="product" />
<div class="i-would-lik-cls">
<?php $terms = get_terms( 'locationfilter',array('hide_empty' => 0, 'orderby' => 'ASC')); ?>
<span class="srch-frm-home-temp-one">I need a</span>
<select id="servicehm" style="width:100%">
<option value="">Choose a Service...</option>
<option value="financial-planner-">Financial Planner</option>
<option value="investment-advisor-">Investment Adviser</option>
<option value="wealth-advisor-">Wealth Adviser</option>
</select >
</div>
<span class="srch-frm-home-temp-two">in</span>
<div class="annual-incom-cls">
<select id="locationfilterhm" style="width:100%" ">
<option value="">Location</option>
<option value="ahmedabad">Ahmedabad</option>
<option value="bengaluru">Bengaluru</option>
<option value="chennai">Chennai</option>
<option value="delhi">Delhi</option>
<option value="gurgaon">Gurgaon</option>
<option value="hyderabad">Hyderabad</option>
<option value="indore">Indore</option>
<option value="kolkata">Kolkata</option>
<option value="kochi">Kochi</option>
<option value="mumbai">Mumbai</option>
<option value="pune">Pune</option>
<option value="surat">Surat</option>
</select >
</div>
<input name="product_cat" id="product_cathm" value="" type="hidden" />
<div class="prod-serh">
<button type="submit">search</button>
</div>
</form>
</div>
</div>
</div>
<div style="clear:both;"></div>
<?php
$ReturnString = ob_get_contents(); ob_end_clean(); return $ReturnString;
}
The second one is in footer.php
function serch_validate_home(){
var ser = jQuery("#servicehm").val();
var loct = jQuery("#locationfilterhm").val();
if( ser!='' && loct!=''){
var srch =ser+loct;
jQuery("#product_cathm").val(srch);
document.serchvalidformhome.submit();
}
return false;
}
AFrame / Three.js : why so many (JS)Strings in memory, when loading complex .obj files?
we have a pretty complex webscene where we dynamically load pretty complex .obj- and .mtl-files. After comparing the scene without any of these objects with the one that has multiple objects inside we noticed a weird behaviour:
firefox memory heap shows that most of the memory (>500MB) is used for JSStrings. the rest of the memory is used for Objects which is self-explaining when we have complex object files in there.
But how come the high amount of Strings and are we able to reduce it?
We thought about minimizing the .obj files itself and reducing vertices. Maybe someone of you made similar experiences and / or can give us suggestions how to solve this problem.
Thank you in advance :-)
Google PageSpeed: "Enable Text Compression" recommended when already applying compression?
I'm having a hard time optimizing my website. Before Google PageSpeed changed a few months ago I was getting scores in the 90s. Now I barely pass.
I host with DigitalOcean VPS using Apache and Wordpress. I'm using Cloudflare which uses brotli compression. Moreover, I ensured I'm using the DEFLATE mod, as well as the PageSpeed Mod on my VPS.
Checking my compression: https://checkgzipcompression.com/?url=http%3A%2F%2Fooiimages.com
Appears that my compression is "working" yet I'm taking a massive hit on speed from lack of compression according to Google:
Not sure what I could be missing here in terms of ensuring my (text) content is compressed?
Bootstrap adds inline code for my dropdown
I have a site with a navbar in Bootstrap. In this navbar I have a dropdown. The problem ? I have
style="display: block;"
who displays lonely but there isn't that in my site's code. Here's an example : Example1
(This image is when I loaded the page, I didn't click anywhere)
Now let's see Firefox's HTML inspector : Example2
Do you see the "style="display: block;"" ? This isn't in my initial code.
Now let me show you my code in VSCode :
I don't know how to and I don't know where does the problem comes from.. I don't know why this attribute is added in my tag...
P.S : there isn't CSS or JS who modifies the tag...
See by yourself the problem by checking my GitHub repository and my page :
https://github.com/discodefr/discodefr.github.io/
Thank you very very much for your help !
How do I make something purchasable in my html or javascript webpage?
How do I make something purchasable in my html or javascript webpage? For example, if I wanted to add a virtual object that can be purchased for real life money.How would I go about doing that? I'm still fairly new to javascript, so any input would help. Thanks!
Python and websites
What I'm trying to achieve is a web-gui where one can e.g. use a calculator. The data entered by using the calculator (-> buttons) should be processed by python (not javascript!). My problem is that I just don't know how to start or where to start. I already googled a lot but the more I googled the more confused I got. I'm simply trying to process data entered via a gui which is made up of html, css, etc.
IndexedDB duplicate only in Safari
Is PHP still relevant?
I've been doing web development for some time now, and I think I'm ready to learn something new. So, I was wondering, is PHP still relevant, or should I learn some other programming language (based on the web)? I still want to create things on the web, but PHP is something I have not heard so much of. What is its pros and cons? What can I do with PHP that I cannot do with JavaScript?
What research methods are needed to develop a multi-person drawing board online at the same time?
What research methods are needed to develop a multi-person drawing board online at the same time? There is a large canvas on the web page, which can be painted by multiple people online at the same time. What technologies or research methods do you need?
Is U have Anti phishing website Architecture and Code? [duplicate]
This question already has an answer here:
- PHP Hacking or Phishing tricks 1 answer
I'm doing Project on Anti phishing Website(to detect phishing websites).So if u have anyone plzz rpl me
404 Status for a connection to a Restful Tomcat java web server created in eclipse on a local host
I created a server starting from a dynamic web project. When I make a request to it by typing
http://localhost:8080/restserver/src/demo/demo
or
http://localhost:8080/restserver/demo/demo
into the search bar of my web browser I receive the response
HTTP Status 404 – Not Found
Type Status Report
Message /restserver/src/demo/demo
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.13
I don't know what I need to change with my server program. I've been following this tutorial to set my server up, and it doesn't look like they have much more than me.
My expected response to my request is
RestServer/pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>RestServer</groupId>
<artifactId>RestServer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-bundle</artifactId>
<version>1.19.4</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>1.19.4</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.19.4</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20170516</version>
<type>bundle</type>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.3.1</version>
</dependency>
</dependencies>
</project>
RestServer/WEB-INF/web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>RestServer</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Jersey Web Application</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey Web Application</servlet-name>
<url-pattern>/restserver/*</url-pattern>
</servlet-mapping>
</web-app>
RestServer/Java Resources/src/demo/demo.java
package demo;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
@Path("/ctofservice")
public class demo {
@GET
@Produces("application/xml")
public String convertCtoF() {
Double fahrenheit;
Double celsius = 36.8;
fahrenheit = ((celsius * 9) / 5) + 32;
String result = "@Produces(\"application/xml\") Output: \n\nC to F Converter Output: \n\n" + fahrenheit;
return "<ctofservice>" + "<celsius>" + celsius + "</celsius>" + "<ctofoutput>" + result + "</ctofoutput>" + "</ctofservice>";
}
@Path("{c}")
@GET
@Produces("application/xml")
public String convertCtoFfromInput(@PathParam("c") Double c) {
Double fahrenheit;
Double celsius = c;
fahrenheit = ((celsius * 9) / 5) + 32;
String result = "@Produces(\"application/xml\") Output: \n\nC to F Converter Output: \n\n" + fahrenheit;
return "<ctofservice>" + "<celsius>" + celsius + "</celsius>" + "<ctofoutput>" + result + "</ctofoutput>" + "</ctofservice>";
}
}
My current file directory
regexp for all indian phone numbers in 2018
I need a Bit of Help Here I need a Perfect satisfying regexp for all indian phone numbers at current a regexp which will validate every indian phone number. please help
jeudi 29 novembre 2018
Add like button
I want to make a like button to post on my webpage. I've searched for google but the only thing I get up is facebook like to your webpage. Completely clumsy. Does anyone know how to create a button like post to my webpage?
how this site interacts with server
this is an online poker site with money. I expect that when a player have actions like raise, fold, check, server must send some data for other players and i can see that in browser devtool on Network section.but i don't see any thing. I test devtool on twitter. i see request and responses that is caused by getting new tweets in timeline,notifications,... what's the matter?
Using chrome web scraper to scraper mars temperature data
I am using chrome web scraper to get the Mars temperature in the website below: http://cab.inta-csic.es/rems/en/weather-report-mars-year-33-month-11/#next-so
Total 2245 sols and I need the max and min temperature data each sol, however I can only get data from one sole each day.
programming language for building a geographic information system?
I want to build a GIS application (web or desktop) and I don't know where to start. The user in my case can upload an image, and then draw basing on that image all points, lines and polylines (depends on his needs) .. I will need to store all informations to calculate distance and superficie .. Please share with me tolls and language that can help me developing this app ? and it is better to make a Web-app or a desktop app
Making a simple Duolingo-like Web Application. Where to start?
I would like to build a site similar in functionality to the Duolingo web app. I.e. it must have challenges similar to Duolingo's, linked discussion threads, user profiles, forum and achievements system. I would like to keep it simple, robust, lightweight, neat and fast.
The thing is I am not any kind of developer and I have no goal to become one. I am just taking all this as a hobby. But if needed I never had any problems to go in depth and get technical. For example, I played with a few programming languages in the past.
Currently I already scratched the general theory a bit in addition to some basics of HTML, CSS and JavaScript. But the problem is I am not content with that kind of blind learning anymore. To say it again I have no goal to make a full-fledged developer out of myself.
So I would like to know what exactly I need to get familiar with and exactly how deep to be able to work on my project as soon as possible. Also I would really appreciate any general thoughts and advices on the subject (mind you, being a noob I had a problem installing IDE a while ago as I simply failed to remember or google out what this type of software is called).
Our QnA knowledge base is not connecting to our Azure Web bot
I am having issue with my Web bot in Azure. I have set up and trained my QnA KB and published. When I test the KB in QnA is works perfectly. I have set up a web bot in Azure by selecting SDK3 and C+ and then select Question and Answer. Once the application was live, I went in to the application settings and entered the QnA KB key, ID, and host name and save. When I go to test bot in the application panel, it is not answering questions based on our KB. It seems to be generically ask and answer questions like "what is your name" "nice to meet you" etc. It is not answered any of the questions we have programed in with answers
How to display pictures from Google Drive on a static HTML website?
I uploaded my designs to a drive link and had to add those images to my portfolio website.I want the images to update as I upload new images and make a gallery of 9 images per page. How should I approach this? Note: I haven't focused much on JS or JQuery,guiding me where to go would be much appreciated. :) Regards.
Pagination in KNIME
Do you know how to mark pagination in the XPath node in KNIME when having a button for "show more"? I dealt with pages so far, but can't figure it out with this "endless scrolling" type, really.
Proxy based application URL redirection using Web API
As per our requirement we required to implement proxy based application URL redirection using Web API,
Consider an example, By accessing the URL www.abc.com, application should redirect to www.xyz.com URL by validating the user credentials without doing URL refresh using WebAPI Proxy redirection method.
We have referred the below URL's to achieve the same, but we could not able to redirect to destination URL(www.xyz.com). Application has not redirecting to the destination URL after done the user credentials validation and application remain stand in the source URL (www.abc.com)
Can anyone suggest we are in the correct direction to implement the Proxy based application URL redirection using Web API,
Referred URL's,
How to create simple IIS site to redirect all calls to another service?
C# web application -> proxy all requests -> return content from another web application
Best way to have one Web API forward request to other
https://serverfault.com/questions/699695/nginx-proxy-pass-remove-url-substring
How to set up Web API Routing for a Proxy Controller?
https://www.strathweb.com/2012/05/implementing-message-handlers-to-track-your-asp-net-web-api-usage/
Criar formulário Web (simples) para imputar dados no MSSQL
Qual a maneira/tecnologia mais simples de desenvolver uma pequena interface web (formulário) para imputar dados em MSSQL(rede local)?
Load file and parse document
I have a code for displaying whole document in a HTML
<!DOCTYPE HTML>
<html>
<head>
<script>
let openFile = function(event) {
let input = event.target;
let reader = new FileReader();
reader.onload = function(){
let text = reader.result;
let node = document.getElementById('output');
node.innerText = text;
console.log(reader.result.substring(0, 200));
};
reader.readAsText(input.files[0]);
};
</script>
</head>
<body>
<input type='file' accept='text/plain' onchange='openFile(event)'><br>
<div id='output'>
</div>
</body>
</html>
I need to load a document then display only strings I need - names and url like:
Document example:
#NAME:Elis:
http://elis.com
#NAME: Emma
http://emma.com
Display:
<a href=http://elis.com>Elis</a>
<a href=http://emma.com>Emma</a>
Web API for hotel booking
I am working on an API for booking hotel rooms to implement a business logic to for adding guests for existing booking :
Add another guest to an existing booking. The required input is: ● Booking Id ● First name ● Last name If the booking is in a German hotel, the guest’s title (Herr/Frau/Dr) is also a required input field. It is also important that there are beds for all guests. The number of beds differ depending on the room type. The room type is identified by a room type code (a string). The following room type codes are currently in use: SINGLE 1 bed DOUBLE 2 beds TWIN 2 beds TRIPLE 3 beds
Need a help to find business logic to this requirement.
is it possible to have qr reader on landing page?
I'm trying to build this landing page (triggered on connecting to a router) that has a form and to finalize the login process user need to scan a qr code given by the receptionist.
I followed this tutorial and the web page version successfully opens the camera app on a phone, take picture of the qr, upload it to the html and decode it using the js attached to it.
However upon mounting it on an actual landing page, the js execution seem to get stuck, couldn't even open the camera app.
Is there any significant differences between opening the html using browser and landing page that caused the js to fail?
Thanks in advance for any pointers.
What is meant by microsite and how it is different from normal website
what is meant by microsite. how it is different from normal website. what are all the ways to crate microsite.
Please some help me on this.
Lookup inside first field of array of objects MONGO
I have a dataset in which i want to put lookup inside an id
that is inside an array of objects . now when i add lookup . it replaces the complete document with the lookup result . Now inside that object i have some other content which i want to access, but it gets replaced. Also i dont want to put lookup
in all elements of that array of objects just the first one. The main this is i want to access scale
after the lookup is done
Below is my data-set
"user_id" : ObjectId("5b17b992c440782b5a218cd2"),
"commission" : [
{
"commissson_id" : ObjectId("5bc05984b49e14243f2973ad"),
"scale" : "14"
},
{
"commissson_id" : ObjectId("5bc05992b49e14243f2973ae"),
"scale" : "14"
},
{
"commissson_id" : ObjectId("5bc05984b49e14243f2973ad"),
"scale" : "1"
},
{
"commissson_id" : ObjectId("5bc0596a414d30243f94b0de"),
"scale" : "1"
}
]
So far i have tried this
$pipe=[
[
'$match'=>
[
'_id'=> $user_id
],
],
[
'$lookup'=>
[
'from'=>'commission',
'localField'=>'commission.0.commissson_id',
'foreignField'=> '_id',
'as'=> 'commission'
]
],
];
How do I check if a mobile number is on WhatsApp or not with programming?
I wanted to build a web-based system using which you will come to know whether the mobile number is registered with WhatsApp or not? It's just to check whether the number entered in textbox have WhatsApp account or not? I tried finding resources regarding the same but unable to get any solution on it, please share some link for reference so, I can implement it and get to the final result.
What is the web-template used by many tech documentation web?
everyone.
I found that following websites have the similary style (or, theme or template):
keras: https://keras.io/
conda: https://conda.io/docs/index.html
thundersvm: https://thundersvm.readthedocs.io/en/latest/
chainer: http://docs.chainer.org/en/stable/index.html
and so on...
Many tech documentation websites use this style (or template). My question is what the template is and how I can use it in my tech blog.
Thank you!
Zoom in - Zoom out problem on the Javascript Background
I want to apply a javascript background on my website. I found a ready one, but I recognize a problem on it. When you scrool with mouse on browser, zoom in or zoom out, it starts to look so strange. You can try it on your own from that demo link;
Also the html and css code of this animational background is in this link;
Link of HTML-CSS-Javascript of this demo
Can you help me, how can I prevent it from being zoomed in or zoomed out on a browser ?
what are the best ways to increase productivity as a web developer/programmer?
What I personally believe as opinion, there are far most 2 aspects one needs to ponder to increase your productivity as a web developer/programmer: One is the practice, by way of how you must think to carve code fast, and other is the Mechanics that what you must do to write the coding fast.
These two aspects may help one to work fast in terms of productivity. What factors may cause to double up the coding speed?
Install Jetty on eclipse
I'm trying to create a new dynamic web project
with eclipse, which is not an option under File -> new ->
It looks like if I install Jetty, I'll be able to do that, but there is no dropdown selection for Eclipse -> Install new Software menu.
, which the instructions in the previous link say I should go to.
When I search install
in the help
search bar, the only option that comes up is Navigate -> Open Setup -> Installation
, and when I click this eclipse just opens the file installation.setup. At this point I don't know what more I can do with this file.
This question posted some type of an answer to installing jetty, but I don't really know what they're talking about or how to find out if I have the things they are talking about and other solutions post drop down instructions(e.g. Help -> Install New Software..) that don't actually seem to exist.
I'm using Version: Oxygen.2 Release (4.7.2)
of eclipse for MacOS
mercredi 28 novembre 2018
Eclipse - Content-Length header already present
I'm encountering a really weird problem while doing php development in Eclipse. I try to submit a very simple html form.
<form id="registerForm" action="login.php" method="post">
<div class="reg-container">
<h1 class="reg-label">Login</h1>
<label><b>Username</b></label> <input id="username" type="text"
placeholder="Enter Username" name="username">
<label><b>Password</b></label> <input id="password"
type="password" placeholder="Enter Password" name="password">
<button type="submit" class="registerbtn" name="login">Login</button>
</div>
<div class="reg-container">
<p>
Not a member? <a href="register.php">Login</a>
</p>
</div>
</form>
After I click Login
to submit the form. Chrome gives me this
In eclipse console there is no error message.
I have breakpoint at beginning of my login.php
, but it never reaches there.
Please help. Thank you.
How can I use Amazon s3 to host a cms based website
I need some information on How to host word-press website in Amazon s3 or which is better. How many sites can be hosted under 1 user in Amazon s3.
File read on linux server [duplicate]
This question already has an answer here:
- Java File Path Windows/Linux 4 answers
I have the java web app.That is run on window server .It is ok. Now I change my web app to Linux tomcat server.Now any file path can not read .In my java code is look like " filePath += "\assetAssignment\";" .But it is work when I change my code to "filePath += "/assetAssignment/" .I have to change a lot of code if I want to use Linux server.Please help me another way.I also try to change Linux's tomcat JVM version to 8 and also change my Eclipse compiler version 7 to 8.But It is not work.Please help me how to read the file on path Linux server with java.
FCM - multiple domains for the same web app
Does someone knows a way to control notifications from Firebase Messaging Cloud for different domains that act as the same web app? I already have firebase notifications working regardless of the domain, the only problem is that if a user allows notifications in both domains, it gets the same notification repeated. One time for each domain. Can someone help me please?
How do online quizzes avoid showing the solutions in the HTML code?
I am trying to create an online quiz. What I do is I store the solutions in the HTML code and checks the answers the users submit. Consequently, the users can view the source code or download the page to view the answers.
What is a good way to hide or encrypt these solutions?
Use Wordpress as CMS and access content via REST API
I have used Contentful before to host content and access it in my application via REST. It works great however it is not free.
I am trying to find out if I can host my app's content similarly on Wordpress and access it in my app using its REST apis.
Does anybody know if we can and how? It is not that straight forward to figure out on their website.
PS: I don't care about the security about the website content.
Some general ideas about cover letter generator
When I am looking for a job I found that it seems for every job posted I should write different cover letters based on that jobs sepcific requirements. Below is an example of a job posted on Indeed: enter image description here
As you go through the description, you may extarct their specific requirements as :
1.experience with microcontrollers and communication interfaces; C
2.language for microcontroller programming, with C/C++/C#/Java programming and in writing software documentation,
n.Have excellent oral and written communication skills.
So I wrote my cover letter as:
Dear Hiring Manager:
Through previous academic training and employment, I have developed rich experience in embedded software development for real applications, which I believe is the foundation needed for me to be successful as an Embedded Software Developer with xxx Ltd. Additionally, my strong team work abilities, written communication skills and project management skills are additional assists I would bring you to your organization.
The strong and emphasis parts are based on the job description, it can be clearly seen that I can use this opening paragraph as a template. Just by replacing those parts based on a new job positions from my own local library, I can create an entirely new cover letter.
My indea is to let the generator scan Indeed.com, extract the key points from job descriptions and automatically generate new cover letters.
So my quesions are: 1. Are there exsisting solutions? 2. Which programming language platform is the best for this applicaiton?
How can I keep my session in Powershell without losing it?
The follow code is to log into a website, save the session, then run a request against a page inside the site. However, everything I do keeps returning the original page.
$username = "user"; $password = "pw"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url = "https://testsite.com/loginpage.jsp"
$url2 = "https://testsite.com/id=1764017344"
$r = Invoke-WebRequest -Uri $url -SessionVariable Session
$form = $r.Forms[0]
$form.fields['login'] = $username
$form.fields['password'] = $password#the names of the login/password controls are login/password
$r = Invoke-WebRequest -Uri ($url + $form.Action) -WebSession $Session -Method POST -Body $form.Fields
$r2 = Invoke-WebRequest -Uri $url2 -WebSession $Session -Method Get
$r2.AllElements
The allelements is returning values for the login page, not the ID page.....
Google Apps Script write to HTML with Function
I am trying to write a Google Apps Script that when published as a Web App will have a button, which when pressed, will call a function from Code.gs that will reveal or hide a piece of html (in effect, change the style of the div with a specific ID).
This is a small case example I've set up:
My index.html file:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<button onclick="google.script.run.myFunction()">Click Me</button>
<div id="myDIV">
This is my DIV I want to Reveal/Hide.
</div>
</body>
</html>
My Code.gs file:
function doGet() {
var template = HtmlService.createTemplateFromFile("index.html");
var html = template.evaluate();
return HtmlService.createHtmlOutput(html);
}
function myFunction() {
var x = document.getElementById("myDIV");/*Where the Reference Error Shows Up*/
if (x.style.display === "none") {
x.style.display = "block";
}
else {
x.style.display = "none";
}
}
The error I keep getting when debugging is: ReferenceError: "document" is not defined. When published, the button appears with myDIV visible, and clicking the button does nothing.
I am assuming the problem is that I should not be using document.getElementByID(), but rather somethingelse.getElementByID(), but I don't know what that something else is. Most cases that I look for online are not specific to Google Web Apps. Any help would be appreciated.
opencart moving to domain
i moved my website from a subdomain which was made in opencart to a domain by moving the files and exporting and importing the database, and changing the config.php file but i got this errors:
Warning: require_once(/home/inti/public_html/system/startup.php): failed to open stream: Permission denied in /home/smartmobile/public_html/index.php on line 17
Fatal error: require_once(): Failed opening required '/home/inti/public_html/system/startup.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/smartmobile/public_html/index.php on line 17
Firebase providing an invalid Web API Key (API key not valid. Please pass a valid API key)
I've run into an ongoing issue with Firebase authentication.
TL;DR The firebase
CLI tool appears to generate a new API key each time a command to display one is run, invalidating any previous keys, even if they are in use.
There seems to be multiple ways to generate an API key for use with firebase:
- The most obvious is on their website, under Project Settings, where it displays a
Web API Key
- Another is via the
firebase-tools
CLI commandfirebase setup:web
- A third is also via
firebase-tools
, usingfirebase login:ci
- which provides a Token to be used for CI deploys
The Problem is, if/when you run the firebase setup:web
or firebase login:ci
commands, it seems to generate a NEW API key each time they are run, and invalidates all other keys at the same time -- including the Web API Key
shown on the website.
In particular, I ran into this problem trying to use firebase-authentication wherein I started receiving API key not valid. Please pass a valid API key.
on my production system without any code changes, apparently simply because I ran the firebase setup:web
command.
Additionally, the website DOES NOT UPDATE with the new key. So there appears to be no way to determine what the currently valid API key is if in the future you wish to add another app to an existing project. It still shows a, now invalid, API key.
Images will not load when deploying to github pages
I am using create-react-app to build a simple React app, however, the images will not load when I deployed the project to github pages, but they load just fine when I deploy the app using the command prompt.
I am getting this error for all images:
Failed to load resource: the server responded with a status of 404 ()
Any help would be greatly appreciated. Thank you!
how does the web browser/ios client/android client handle authentication with kbmmw server using REST?
kbmMW's TkbmMWAuthorizationManager will automatically create a token once a user has successfully logged in using user credentials.
The intent is that from that time forward the login info is cached server-side and the auto-generated token is used in subsequent requests for the lifetime of the session as a means of resource request authorization.
In the case of a web browser client using basic auth (over SSL), how is the web browser supposed to deal with the token? Does the token return to the web browser in the form of a cookie?
Is it impossible for the browser to know to use the token without some special form of client side web programming?
What special tasks does an iOS or Android native client need to perform to utilize the token after a successful authentication? In a REST-ish environment? Is manual token submission required? How does this change what is required on the server side?
Is the mwaoAutoLogin option for the TkbmMWAuthorizationManager valid for web, iOS & Android native clients in a REST scenario? Or should all be switched to manual?
Thanks.
Compiling and excexuting python code from user submitted web form
I'm currently developing a website in NodeJS where people can write functions to solve problems and compete against others to see who can solve it first.
The functions should be compiled and tested against some written tests.
Im wondering what the best strategies for this goal is. I have looked at some solutions with docker but i'm working with a windows so I don't really know how to start.
Angular App is taking a lot of time loading data from API call for the first time in a session
I am new to Angular and was building an application using Angular 6. The problem I am facing is that the application is taking a lot of time to load the data from my first API call. Although in subsequent request data displays very quickly. Is there any way to load the data quickly or even show the data in chunks as I it is getting loaded?
Thanks
Internal Server Error 500 with Web Api C#
I started developing an API in c# in order to access data on an online SQL server via Azure. When I run the web API in localhost, everythings is ok but when i publish it my api/employees doesn't work like in localhost. The error i get is "500 (Internal Server Error)" Please help me i searched on the internet, haven't found something that could help me.
There is my connectionString :
<add name="groupea07Entities1" connectionString="metadata=res://*/Models.Employee.csdl|res://*/Models.Employee.ssdl|res://*/Models.Employee.msl;provider=System.Data.SqlClient;provider connection string="Server=tcp:groupea07.database.windows.net,1433;Initial Catalog=groupea07;Persist Security Info=False;User ID=MyUser;Password=MyPwd;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"" providerName="System.Data.EntityClient" />
There is my EmployeesController :
public class EmployeesController : ApiController
{
private groupea07Entities1 db = new groupea07Entities1();
// GET: api/Employees
public IQueryable<Employee> GetEmployees()
{
return db.Employee;
}
// PUT: api/Employees/5
public HttpResponseMessage PutEmployee(Employee employee)
{
if (!ModelState.IsValid)
{
return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
}
db.Entry(employee).State = EntityState.Modified;
try
{
db.SaveChanges();
}
catch (DbUpdateConcurrencyException ex)
{
return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
}
return Request.CreateResponse(HttpStatusCode.OK);
}
// POST: api/Employees
public HttpResponseMessage PostEmployee(Employee employee)
{
if (!ModelState.IsValid)
{
db.Employee.Add(employee);
db.SaveChanges();
HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, employee);
response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = employee.EmployeeID }));
return response;
}
else
{
return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
}
}
// DELETE: api/Employees/5
public HttpResponseMessage DeleteEmployee(Employee employee)
{
Employee remove_employee = db.Employee.Find(employee.EmployeeID);
if (remove_employee == null)
{
return Request.CreateResponse(HttpStatusCode.NotFound);
}
db.Employee.Remove(remove_employee);
try
{
db.SaveChanges();
}
catch (DbUpdateConcurrencyException ex)
{
return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
}
return Request.CreateResponse(HttpStatusCode.OK);
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
db.Dispose();
}
base.Dispose(disposing);
}
private bool EmployeeExists(int id)
{
return db.Employee.Count(e => e.EmployeeID == id) > 0;
}
}
Thanks in advance ;)
Selenium Python program
I'm trying to make a program that can
- Load a proxylist .txt;
- Load a email:pass .txt;
- Run multiple threads;
- Login to a certain website.
but I'm having trouble since I never really used Selenium before. Can anyone help me?
Python and Beautiful soup || Regex with Varible before writting to file
I would love some assistance or help around an issue i'm currently having. I'm working on a little python scanner as a project. The libraries im current importing are:
requests
BeautifulSoup
re
tld
The exact issue is regarding 'scope' of the scanner. I'd like to pass a URL to the code and have the scanner grab all the anchor tags from the page, but only the ones relevant to the base URL, ignoring out of scope links and also subdomains.
Here is my current code, i'm by no means a programmer, so please excuse sloppy inefficient code.
import requests
from bs4 import BeautifulSoup
import re
from tld import get_tld, get_fld
#This Grabs the URL
print("Please type in a URL:")
URL = input()
#This strips out everthing leaving only the TLD (Future scope function)
def strip_domain(URL):
global domain_name
domain_name = get_fld(URL)
strip_domain(URL)
#This makes the request, and cleans up the source code
def connection(URL):
r = requests.get(URL)
status = r.status_code
sourcecode = r.text
soup = BeautifulSoup(sourcecode,features="html.parser")
cleanupcode = soup.prettify()
#This Strips the Anchor tags and adds them to the links array
links = []
for link in soup.findAll('a', attrs={'href': re.compile("^http://")}):
links.append(link.get('href'))
#This writes our clean anchor tags to a file
with open('source.txt', 'w') as f:
for item in links:
f.write("%s\n" % item)
connection(URL)
The exact code issue is around the "for link in soup.find" section. I have been trying to parse the array for anchor tags the only contain the base domain, which is the global var "domain_name" so that it only writes the relevant links to the source txt file.
google.com accepted
google.com/file accepted
maps.google.com not written
If someone could assist me or point me in the right direction i'd appreciate it. I was also thinking it would be possible to write every link to the source.txt file and then alter it after removing the 'out of scope' links, but really thought it more beneficial to do it without having to create additional code.
Additionally, i'm not the strongest with regex, but here is someone that my help. This is some regex code to catch all variations of http, www, https
(^http:\/\/+|www.|https:\/\/)
To this I was going to append
.*{}'.format(domain_name)
what's the advantage of using react+django rather than using only django?
I'm studying to develop a website. As I searched, Django can develop a whole website itself. What I wonder is why some people use React and Django together. What's the advantage of using those both programs, rather than just using one? And I also want to know the difference between Django and Django Rest. I want to make a website for selling something, then which do you recommend?
Finding a websites used colors
I'm currently doing a project about color combinations with machine learning. I had an idea of using some colors websites use as data for the machine to learn on.
Is there any library or way of scraping where i could find a specific websites all used colors. (Python, but if not python thats also fine)
Thank you!
Flask APP - ValueError: signal only works in main thread
I try to create a simple flask app:
from flask import Flask
app = Flask(__name__)
if __name__ == '__main__':
app.run()
but when I add the debug:
FLASK_APP = run.py
FLASK_ENV = development
FLASK_DEBUG = 1
I got the following error:
ValueError: signal only works in main thread
Can't set up port forwarding
So recently I started making a raspberry pi web server with apache and php, and so far I could change the html file in the default debian site and make my server go online, the only problem is that I don't how to make it public.I set up port forwarding but I'm not sure that which IP should my domain name point to (my local, or my public one) and also I'm not sure i set up port forwarding right, if possible please write down the port forwarding step by step (I'm using a D-Link router). Thanks a lot.
I'm having an issue with mob layout for my e-commerce WordPress website
Hye, I'm using wordpress for making an e-commerce website and having some issues for mobile view. I have used heading and button in one row with two columns, on laptop it looks perfect but on mobile it display up and down, I want them in straight line also on mobile display.
Theme that I'm using is "Nitro woocommerce theme" Page URL: https://www.bayrsh.com/home1/
1st one is the screenshot of my website how it look like. 2nd one is the screenshot for what I exactly want how it should display on mobile view.
This is how I want to display heading and button in one line or one row
Kindly help me out for this.
'Fatal error' in html website, call to a member function bind_param
I need help debugging my code, I want to be pushing variables into table that I have created. The error is enter image description here
Festivals_update:
<?php
include('config.php');
$stmt = $mysqli->prepare("INSERT INTO Festivals(name, location, weekend, day, date, month, genre, size) VALUES (?,?,?,?,?,?,?,?)");
$stmt->bind_param('ssddssss', $_POST['name'], $_POST['location'], $_POST['weekend'], $_POST['day'], $_POST['date'], $_POST['month'], $_POST['genre'], $_POST['size']);
$stmt->execute();
$stmt->close();
echo "The festival has been added";
?>
filter_script.js:
function upload2(){
alert("test");
var name = document.getElementById("name").value;
var location = document.getElementById("location").value;
var weekend = document.getElementById("weekend").value;
var day = document.getElementById("day").value;
var date = document.getElementById("date").value;
var month = document.getElementById("month").value;
var genre = document.getElementById("genre").value;
var size = document.getElementById("size").value;
$.ajax({
url: "Festivals_update.php",
cache: false,
type: 'post',
data: { name: name, location: location, weekend: weekend, day: day, date: date, month: month, genre: genre, size: size },
success: function(data) {
alert(data)
}
})
//alert("success")
}
Python login script returning with status code 419
I have the following python script running to login to a website, the script executes but returns a 419 and doesn't let me login. I think its something to do with the _token parameter or cookies. Is there a way I can get this _token key or generate it programatically.
import requests
import json
url = "https://labhotel.net/"
headers = {
"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"accept-encoding" : "gzip, deflate, br",
"Accept-Language" : "en-US,en;q=0.9",
"cache-control":"max-age=0",
"Content-Type" : "application/x-www-form-urlencoded",
"Origin": "https://labhotel.net",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5",
"Referer": "https://labhotel.net/",
}
data = {"_token" :"","username" :"", "password":""}
response = requests.post(url, data=data, headers=headers)
print(response.status_code)
print(response.text)
Test layout with a test ad to check if the div width is enough for the ad
I want to achieve a layout like this for a post details page, there is a title, below the title some text, then a image, and below the image the post text. At right I want to show a ad and below some popular posts.
The layout is working fine, my doubt is if there is some way to generate a example of a ad to put in the layout where is the text "How to put here a test ad just to check if the size is appropriate?" to check if the size of the div with the class .col-3 is enough to have the ad. Do you know how to test that?
Example with the layout: http://jsfiddle.net/t1cLb3uq/
HTML:
<div class="bg-white">
<div class="container py-4">
<div class="row">
<div class="col-9">
<div class="article_details_title mt-3">
<h1 class="font-weight-bold text-custom-blue-dark2">Example title test for test post</h1>
<p class="article_details_clue">Some text.</p>
</div>
<div class="article_details_img mt-3">
<img src="https://via.placeholder.com/768x350" alt="">
</div>
<div class="article_details_text">
<p class="article_details_text mt-3">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cum dolores eligendi esse et
eum expedita fugiat inventore ipsum, necessitatibus nihil
optio, repellat suscipit tenetur totam ullam? Fugit ipsum itaque qui.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cum dolores eligendi esse et
eum expedita fugiat inventore ipsum, necessitatibus nihil
optio, repellat suscipit tenetur totam ullam? Fugit ipsum itaque qui Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Cum dolores eligendi esse et
eum expedita fugiat inventore ipsum, necessitatibus nihil
optio, repellat suscipit tenetur totam ullam? Fugit ipsum itaque qui.</p>
</div>
</div>
<div class="col-3 ml-auto">
<div class="bg-custom-light2 p-0">
<h2 class="font-weight-bold populars h5 text-center py-3 m-0 rounded-0">
Popular</h2>
<ul class="list-group list-popular-category border-0">
<li class="list-group-item d-flex justify-content-between align-items-center rounded-0 border-top-0">
<div>
<h6 class="font-weight-bold popular_article_title text-custom-blue-dark">Title</h6>
<p class="popular_article_date">date</p>
</div>
<img class="ml-2" src="https://via.placeholder.com/50" alt="">
</li>
<li class="list-group-item d-flex justify-content-between align-items-center rounded-0 border-top-0">
<div>
<h6 class="font-weight-bold popular_article_title text-custom-blue-dark">Title</h6>
<p class="popular_article_date">date</p>
</div>
<img class="ml-2" src="https://via.placeholder.com/50" alt="">
</li>
<li class="list-group-item d-flex justify-content-between align-items-center rounded-0 border-top-0">
<div>
<h6 class="font-weight-bold popular_article_title text-custom-blue-dark">Title</h6>
<p class="popular_article_date">date</p>
</div>
<img class="ml-2" src="https://via.placeholder.com/50" alt="">
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
Javascript: Pull csv data from web and store in array
I am trying to develop a javascript that pulls csv data from an external website and store it in an array. The reason why I am need this to be in javascript is that I am using a chrome extension called Shortkeys that can execute javascript code. I want the script to get (csv) data from an API (url), look through the csv data and generate a string based on the csv data. So far I've been trying with the fetch function, but Im new to javascript. So far I've got, but I dont really know what Im doing:
const url = 'https://myAPIurl.com';
fetch(url)
.then(response => response.text())
.then(contents => console.log(contents))
Suggestions are greatly appreciated.
Thanks, Peter
Brightsign: change user agent
I have just got a new Brightsign model HD1023 player and need to display a webpage on it. I know that the webpage works perfectly on Chrome browser, but there are issues with Internet Explorer. I believe that the Brightsign player has similar to Internet Explorer User Agent string thus has similar issues.
Can someone explain to me how can I change the User Agent defined for my Brightsign player to one that would run -webkit well?
Why do i get different apearnace when I use different addresses using Python Flask?
I wrote a Web based app using Python Flask. When I run it using the localhost address, I get the results shown in the bottom of the attached image. When I change the address to my PC IP address (and still running it from the same PC using the same browser), I get bigger fonts and skewed tables (the bigger font issue is shown at the top of the attached image). results image
I am using Python 3.6.4, Flask 1.0.2, Browser: Goggle Chrome.
Web app - How do I connect two different pages with firebase?
I am in the process of creating a quiz web app for university. I've decided to use firebase as I've heard good things about it. I've managed to get hosting working, however I'm having trouble with a few other things.
First of all, I'm using HTML, CSS, JS and a little bit of JQUERY.
The idea of the quiz is to have a host view, which would be a teacher putting it on a projector and to then have student views which would be the student connecting on their phones.
The host view allows for the teacher to select the question on their computer, and then that question gets pushed towards the students phones. Once the student answers the question a boolean gets pushed back to the host view to tell them if they got it right or wrong.
At the moment I've only got the student view being hosted and I can't figure out the best way of doing this through firebase. My inital thought was to get a database set up between them both. However, I'm unsure on how to go about that. Would it be better if they were both hosted under one domain and once on that domain the user gets the option of selecting HOST/VIEW?
I'd appreciate any help given web development isn't my strong suit.
Thanks.
How to test page listing of products and "load more" using selenium
Verify when you go to product listing page i.e. Clothing etc. -> https://www.ounass.ae/clothing/After 72 items, “View More” should not automatically load more, but need to be clicked button at bottom which should load more items if there are more than 12 items in this page. Also when i filter results how do i verify number of products returned in the page ?
How load dynamic content using Selenium + Python
On a Quora user profile page, I want to show the entire text for each user's answer, by clicking on "more", but I couldn't get the 'more' elements list, instead I am getting an empty list, how to do?
Here is my code:
more_buttons= browser.find_elements_by_name('more')
for more_button in more_buttons:
more_button.click()
Here is an example of a user profile: https://www.quora.com/profile/Ashley-Isabella-3
c# script Sharepoint API giving 401 Error on remote server
' '
I am using below code for sharepoint authentication which works perfectly fine on local machine but when I deploy this package on server it is giving 401 error.
class Program {
static void Main(string[] args)
{
//Delcaring Required variable (Actual variable values have been changed to dummy one)
var webUri = new Uri("https://blahblah.sharepoint.com");
string proxy = "http://abc.abc.com:1234/";
const string userName = "abc@blahblah.com";
const string password = "123";
string SalesPOV_GUID = "6319bd1f-7f-4ffd-95dc-a992afc4da10";
string Clients_GUID = "ojfoeiawe-3abcc6-41cd-be23-cf6043671d53";
//Creating a secured sring for SharepointOnline Credentials
var securePassword = new SecureString();
foreach (var c in password)
{
securePassword.AppendChar(c);
}
//Setting up credentials for Sharepoint
var credentials = new SharePointOnlineCredentials(userName, securePassword);
//Makiing a Call
using (var client = new WebClient())
{
try
{
//setting up proxy
System.Net.WebProxy wp = new System.Net.WebProxy();
Uri newUri = new Uri(proxy);
wp.Address = newUri;
client.Proxy = wp;
}
catch (WebException e) //In package we need to fail the package on catching exception.
{
string pageContent = new StreamReader(e.Response.GetResponseStream()).ReadToEnd().ToString();
}
client.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f");
client.Credentials = credentials;
}
}
}
mardi 27 novembre 2018
A web -HTML's dropdown menu
I have learned to make a dropdown menu over the website.But some problems happened.I found the title move up by itself when i put my mouse on it.How to let it be normal such like when putting mouse on it ,it just stay where it is ? enter image description here
enter image description here enter image description here
Opening my own website with my own script
Hello I have recently wanted to make my own website but I wanted to make it on my own and not use tool like wix wordpass ECT. I have a python script that handle all the htpp request and response and it also handle my database I have also wrote all the HTML pages I need and in those pages I make the request to the server (biside the get request that the browser do they do some post request ) The point is I have a working website and a server but now I'm in a new territory and to be honest I have no idea what to do I will like some guidance of what is a DNS And where to buy a domain name what do I do now if I want to store my website but still run my python script as a server side and how to connect my server to my domain Thank to all the helpers
Understanding Chrom Devtools Performance Analyzing
I'm trying to debug an Angular (Ionic) app which is slow. I opened the Chrome Performance tab in DevTools, but I don't understand how to analyze what is the problem.
I see in the summary that the sripting takes the longest time, but I don't understand how to pinpoint where the problem is exactly in my code.
This is what I see:
What is Parse HTML? What is Evaluate Script?
Nginx redirect everything to www https
I want to redirect everything to https://www
This is my config block where I tried redirecting non www to https but does not work.
server {
listen 80;
server_name example.com
return 301 https://www.$server_name$request_uri;
}
server {
listen 80;
server_name www.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
location /auth {
...
}
location / {
...
}
ssl_certificate /root/certs/fullchain.pem;
ssl_certificate_key /root/certs/privkey.pem;
}
http://example.com gives 404 error
https://example.com does not redirect to https://www
http://www.example.com redirects to https://www
https://www.example works as is
Make a search bot on android
I am working on a school project, My app is a sort of a search bot which will take some items provided by the user and send a "query" to a particular website (this website doesn't provide any API) and retrieve the results and show them on my app. I am beginner on android, thus I want to know some ideas about that, and if that is possible and feasable. Thank you :)
is it good to use php+mysql for a large web site data base handling?
I am bit new to web development and I am a self-learner. I am developing a web site which is intended to be linked to a large data base where user inputs are stored and users can interact with data. At the moment I am using mySQL+PHP for handling the data base. For example I use PHP for pagination of data and displaying them. So, my question is if I use PHP, will it slow down the web site when the web site is accessed by many users and start fetching data from it? if so do I need to use javaScript to do the things like for example pagination? Please give me some advice and all your advices/comments/inputs are highly appreciated.
Authentication for Admin Pages on website? JS
This is for a project and I am very lost.
Basically, we have created a website, now we have to create admin pages with authentication so that the users visiting the site cannot access it. Basically, we have to give the user that gives the correct username and password, access to admin pages and URLs for updating the database, using sessions.
I would like some resources or tips on how to do this, without being given the answer.
Responsive nav bar crashing onClick
So I have recently built myself a personal website having graduated coding bootcamp (Flatiron School) and am having issues with my responsive navbar. Then UL renders fine, but when clicked it disappears and the page doesnt move to where necessary (about me, contact etc...) please see code below!
<nav>
<a id="menu-icon"></a>
<ul>
<li><a class="nav" href="#home">Home</a></li>
<li><a class="nav" href="#abt">About</a></li>
<li><a class="nav" href="#exp">Experience</a></li>
<li><a class="nav" href="#contact-form">Contact</a></li>
</ul>
</nav>
nav ul,
nav:active ul {
display: none;
z-index: 1000;
position: absolute;
padding: 20px;
background: #F5F5F5;
border: 1px solid #54A4A6;
right: 20px;
width: 50%;
border-radius: 5px;
}
Embedding web page into industrial pc
I’m looking for a way to embed a single page style web application into an industrial pc that’s running TwinCAT 3 plc to control an automation system. The hmi on this system is already written in c# using the beckhoff ads dll. What I’m having trouble with is how to embed the server that’s reading and writing data to my plc instance and the web page front end into one application. I’m looking to use c# or python as those are the languages that I have experience in. I would like to be able to log into this webpage by the up address of the Pc and get a page on a phone or laptop that allows elements on the screen to be interacted with like buttons and a joystick style control for creating motion on the machine.
What are the aspects of a good user interface?
I am new to frontend development environments, apart from high responsivity and clarity of user interface,
-
what other aspects do I need to consider to have a good user interface?
-
Here is what currently we are doing with colleagues, link to demo page
from the above demo page assume it's your website, what will you change - from UI and js(interaction) point of view?
Any suggestion will be appreciated.
Calling async web service using Xcode
I'm planning on using a web service call from Xcode and need it to be performant. Do I call the service from a background thread and then update the UI on another thread?
Why Marzipano is not showing the image on mobile devices (browsers)
I am using Marzipano to display 360-grade images of specific places on my website. It is working fine on desktop and laptop devices (browsers) but not on mobile. Below is the code:
// Create viewer
var viewer = new Marzipano.Viewer(document.getElementById('pano'));
// Create a source
var source = Marzipano.ImageUrlSource.fromString("");
// Create geometry.
var geometry = new Marzipano.EquirectGeometry([{ width: 4000 }]);
// Create view.
var limiter = Marzipano.RectilinearView.limit.traditional(1024, 100*Math.PI/180);
var view = new Marzipano.RectilinearView({ yaw: Math.PI }, limiter);
// Create scene.
var scene = viewer.createScene({
source: source,
geometry: geometry,
view: view,
pinFirstLevel: true
});
// Display scene.
scene.switchTo();
Is it any kind of image size restrictions on mobile browsers or what do you think the problem is?
Thank you!
What learning path should i follow to create a web application that contains intelligent components?
I need to develop a web application that contains some intelligent components i.e i'll be using some learning algorithms to predict some outputs that should be stored then displayed on the website when a user demands them. I know HTML,css,php,js, but i have no experience in back-end web development. What technology should I learn for this project? How to integrate the intelligent components? For instance, can i execute some Python code in the server side and then display it? What should i learn concerning databases ? MySql or NoSql ? Could you please specify a learning path that will allow me to reach my objectives?
jquery: check the current toggled class
So, this is my code
$(".heart.fa").click(function() {
$(this).toggleClass("fa-heart fa-heart-o");
//Wanna check here is its fa-heart or fa-heart-o
var row = $(this).closest("i");
var rowId = row.attr("id");
alert(rowId);
});
<div>
<i id= '".$i."' class='heart fa fa-heart-o'></i>
</div>
Want to check inside this function if it's currently fa-heart-o
or fa-heart
difference between address and port, how are they different
okay I'm little bit confused
so is it like
One per network interface vs one per socket
One per computer vs one per ship
Human readable vs numeric
MasterCard API - Store Project
I'm working on a project for a store website where you can buy products through an epay , mastercard has a lot of API's , and I'm confused about which API should I use to do that , All what I want is an API to buy an item and pay through mastercard.
Controlling a robot from the web
I am fairly new to Python and HTML but have programmed for most of my career (Clipper/Dbase/VB/SQL) and I have taken on a personal project and have hit a wall and am looking for guidance. I have scoured the forums (here and a few other sites) and people are doing what I am looking to do but I can't seem to get a good handle on the best way to do it.
I created a robot using a raspberry pi and 3 arduinos controlling DC motors and servos to make the bot move. The program is written in Python and is run from the command line. when run it:
- queries the active serial ports on the Raspberry
- opens each available port
- sends an integer to the receiving arduino
- the arduino responds with an identifying integer so the RPI can name the port
- then the script waits for user input like "Forward"
- the command is translated and sent to the correct port
- the robot moves
This all works perfect. Now I want to expand it. I want to keep this functionality intact and add in a web interface so I can control it from anywhere. I've tried a couple of different things with no success. I have installed apache and I am able to serve the pages with no problem, I can get the data on the page, but I can't figure out how to get the web page to send the data to the running arduino script. My issue stems from the fact that the bot control script needs to run independent of the web page. I want to still keep the same input now from the keyboard, but I also want it to accept the data from the web page. If I invoke the bot controller from the web page each time it will need to re-establish the port connections each time which takes up to 20 seconds...
I am thinking if I create a listening script I can have the website invoke the listener which will run only to receive the data from the web and pass it to the bot controller and back. But I am not sure how to do this or if this is even the best way.
I've looked at websockets, CGI/wsgi, Flask, writing a file, and JSON and I just can't seem to string it all together.
Thanks in advance and apologies if this is not in the right place or has been answered before. Also, I have not included any code as the only solid code is the bot controller. I am hoping someone with some real expertise can help me unravel this.
thanks in advance KenV
Writing "URI Pattern"
I did a lot of search on google regarding writing "URI Pattern" to read links/requests, but couldn't find anything good. Can anybody point me to some good materials on writing "URI Pattern".
FYI - This is to configure tRESTRequest component in Talend ESB
For example
The REST Endpoint is or URI location where REST-ful web service will be accessible for requests : "http://192.168.0.235:8088/user"
For reading this request: "http://192.168.0.235:8088/user/1" the "URI Pattern" is "/{id}/"
For reading this request: "http://192.168.0.235:8088/user/number?string=123" the "URI Pattern is "/number"
Heroku Go Webapp Crashing
I have a web app I've written in Go and I can get it to work perfectly on my localhost machine. The issue occurs after I upload it to Heroku. This is also my first Heroku app as well. I have no problem pushing it up to heroku but I get the following errors when I try to run it.
2018-11-27T18:00:45.614798+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=boiling-eyrie-61189.herokuapp.com request_id=7ff8feb8-bc03-4aff-a0ce-42474fcf35e9 fwd="65.183.104.130" dyno= connect= service= status=503 bytes= protocol=https
2018-11-27T18:00:45.811042+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=boiling-eyrie-61189.herokuapp.com request_id=5fe9555a-e8df-4f09-be37-be8bd4e66af6 fwd="65.183.104.130" dyno= connect= service= status=503 bytes= protocol=https
Here is my code that I have published to heroku. Thanks for any insights you could give!
package main
import (
"encoding/json"
"fmt"
"html/template"
"io/ioutil"
"log"
"net/http"
"os"
"strconv"
"time"
"github.com/julienschmidt/httprouter"
)
type Results struct {
Results []Result `json:"results"`
}
type Result struct {
Name string `json:"name"`
Rating float64 `json:"rating"`
Icon string `json:"icon"`
Address string `json:"vicinity"`
}
type Data struct {
Name string
Rating string
Icon string
Address string
}
type HP struct {
Title string
}
func Home(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
t, _ := template.ParseFiles("./public/templates/home.html")
p := HP{Title: "Eat The Shoals"}
t.Execute(w, p)
}
func Search(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
var url string
switch ps.ByName("name") {
//cases taken out due to privacy issues
}
resultClient := http.Client{
Timeout: time.Second * 2,
}
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("User-Agent", "eattheshoals")
res, getErr := resultClient.Do(req)
if getErr != nil {
log.Fatal(getErr)
}
byteValue, _ := ioutil.ReadAll(res.Body)
//if readErr != nil {
// log.Fatal(readErr)
//}
var results Results
jsonErr := json.Unmarshal(byteValue, &results)
if jsonErr != nil {
log.Fatal(jsonErr)
}
values := make([]Data, len(results.Results), len(results.Results))
for i := 0; i < len(results.Results); i++ {
values[i].Name = results.Results[i].Name
values[i].Rating = strconv.FormatFloat(results.Results[i].Rating, 'f', 1, 64)
values[i].Icon = results.Results[i].Icon
values[i].Address = results.Results[i].Address
//fmt.Println("Name: " + results.Results[i].Name)
//fmt.Println("Rating: " + strconv.FormatFloat(results.Results[i].Rating, 'f', 1, 64))
//fmt.Println("Icon: " + results.Results[i].Icon)
//fmt.Println("Address : " + results.Results[i].Address)
}
t, _ := template.ParseFiles("./public/templates/search.html")
t.Execute(w, values)
}
var homeTemplate *template.Template
func determineListenAddress() (string, error) {
port := os.Getenv("PORT")
if port == "" {
return "", fmt.Errorf("$PORT not set")
}
return ":" + port, nil
}
func main() {
//addr, err := determineListenAddress()
//if err != nil {
// log.Fatal(err)
//}
router := httprouter.New()
router.GET("/search/:name", Search)
router.GET("/", Home)
port := os.Getenv("PORT")
//log.Fatal(http.ListenAndServe(":8080", router))
//log.Printf("Listening on %s...\n", addr)
if err := http.ListenAndServe(":"+port, nil); err != nil {
panic(err)
}
}
My php document doesn't redirect to my link after uploading the website and database to the server
I hope you are having a fantastic day. I finished my website and decided to upload it to the hosting server and make it public. After loading the website to the hosting server my php documents are sending data to the database fine, but it doesn't redirect to the link that I redirected it, and it stays in the php document. I don't know why is this happening. Before uploading the website to the hosting server, in the local server it was redirecting to the link.
Here I attach my code:
<?php
$servername = "servername";
$username = "name";
$password = "password";
$dbname = "database";
//Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
//Check connection
if ($conn->connect_error) {
die ("Connection Failed: " . $conn->connect_error);
}
$sql ="INSERT INTO clientesdudas (user_id, nombreapellido, email, mensaje)
VALUES (NULL, '$_POST[nombre]', '$_POST[correoElectronico]', '$_POST[mensaje]')";
if ($conn->query($sql) === TRUE) {
header("Location: http://www.website.com/");
//echo "Tu mensaje se ha mandado correctamente, nos pondremos en contacto contigo lo más temprano posible. Gracias! <br> <a href='http://www.fisiodoctoresvalencia.com/'><i class='fas fa-home'></i>Volver a Inicio</a>";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>
Thank you very much.
Which is the best AWS plan for Magento Multi-Vendor website?
please suggest me best AWS plan for Magento-2 Multi-Vendor website, faster loading
CSS difference between tag and tag
I am using CSS reset you can find here : https://meyerweb.com/eric/tools/css/reset/
Here is the HTML code :
<input class="submitForm" type="submit" value="Confirm" />
<a class="cancelForm" href="">Cancel</a>
Here is the CSS code :
.submitForm {
text-decoration: none;
font-family: "Aero Matics", sans-serif;
color: #FFFFFF;
font-size: 20px;
padding: 20px;
background-color: #65BCF1;
border: 0px none;
font-weight:bold;
float:right;
cursor: pointer;
}
.cancelForm {
text-decoration: none;
font-family: "Aero Matics", sans-serif;
color: #FFFFFF;
font-size: 20px;
padding: 20px;
background-color: #ff9667;
border: 0px none;
font-weight:bold;
float:left;
}
Here is the issue :
On the image, you can see a blank line under the Cancel button.
My question is : Which CSS property should I use to make my "tag < a > based button" the exact same size than Confirm button ? (I wan buttons start from same height and fullfill to bottom of the page without blank line).
Angular 7 doesn't find pipes
I'm trying to build my Angular 7 project but every time I get an error saying
ERROR in : Template parse errors: The pipe 'currency' could not be found....
But when I try to run the ng serve
it does works as expected
I've tried to build it with the --prod
flag, and it doesn't work. If I remove the production flag, it build correctly.
DROPDOWN menu hiding behind the slider
Hello im making a website and the dropdown menu is hiding behind the slider is there any way to fix it ? thannks
Running ASP pages on window server 2016
I recently installed Microsoft window server 2016 upgrading from Microsoft window server 2003 but my iis6 pages Microsoft window server 2003 do not run on iis10 pages Microsoft window server 2016. Am stack and would really need some help.
register client on web server for push notifications
I have a web server that i want to use as a central contact point for IFTTT which will use PHP (maybe) to relay messages from IFTTT to a registered client.
What i mean by registered client is to have an arduino/esp32 etc that does something such as an HTTP request to the webserver to register its existance, eg 'hi im a light and my location is the kitchen' :)
My code on the server can then contact the registered client to give it the communication payload to, for example, turn on the light.
my question is: what is the process to achieve this ? How do i registered the client device onto my web server (i could store information in a mysql db but what information would i store) how does the server then use that information to push comms to the client device
any help is very much appreciated
Ubuntu 18.04: Firefox showing playback error
I'm facing a strange issue with Firefox Quantum (versions 63.0.x) in my ubuntu 18.04 64 Bit. When i try to open this site http://www.lalegultv.com.tr/canli-yayin
which plays video automatically, i'm getting
Your browser doesn't support playback of this video error.
I tried using this with chrome on ubuntu, it worked perfectly. I also tried with the same browser on my Windows 10 machine. It works perfectly without giving any errors. I don't know why firefox behaves strangely in my ubuntu machine. I have not added any extra plugins or any addons.
How to use more than two cameras (OpenCV)?
How to use more than two cameras (OpenCV)? I tried on with ++, on Java, result one. More than two cameras bug. I try to just save images from the camera to a folder. enter image description here
How do i click on a button in my Firefox browser using VBA?
I am able to go to the particular web page using VBA. Need to know how to click on the download button!! This is the code I am using -
Sub OpenInFireFoxNewTab() '(url As String) Dim pathFireFox As String Dim url As String url = "https://web page URL" pathFireFox = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" If Dir(pathFireFox) = "" Then pathFireFox = "C:\Program Files\Mozilla Firefox\firefox.exe" If Dir(pathFireFox) = "" Then MsgBox "FireFox Path Not Found", vbCritical, "Macro Ending" Exit Sub End If Shell """" & pathFireFox & """" & " -new-tab " & url End Sub
Issue in a custom layout?
I have created a news section in the website. Each row contains 4 news cards. Somehow it is not behaving as it should. So can you help me to solve this issue.
Website Link: http://www.shmgroup.com/news.php
I am not able to share the code. Please inspect it.
Restricting space at the beginning in sapui5
if(oEvent.mParameters.value.indexOf(' ')===0) {
sap.m.MessageToast.show("Space character is not allowed");
oEvent.preventDefault();
return false;
}
By using this code I have to restrict the whitespaces at the beginning in the input field. I tried a lot, I'm getting the message but it is taking the whitespace. How can I make an input field display only message and it should not take whitespaces.
how to hide vue js code when reload page?
selenium firefox, chrome, IE driver requirements in python [duplicate]
This question already has an answer here:
- Python : no module named selenium 1 answer
If I would like to use one of those drivers, what should I do before using it? I mean what should I install on a fresh installed Windows. On the pc is only python installed and selenium with "pip install -U selenium". Do I need install Chrome web browser to using chrome driver? Do I need download firefox driver for using it or it comes with "pip install -U selenium" command and built in? And the same question for firefox-> do I need download Firefox web browser to use Firefox driver? And finally the same questions for IE, except the download IE question, because IE comes with Windows os. Thank you.
PHP - I can't save content from input
I am struggling with the problem on my website. I should create an form to fill which will display new information/news. I have code like this:
<?php
include "0begin.php";
$title=$_POST["title"];
isset($title) or $title=$_GET["title"];
$msg=$_POST["msg"];
isset($msg) or $msg=$_GET["msg"];
?>
<h1>News</h1>
<form method="POST">
Title<br><input type=text input name="title" value=<?=$title?> ><br>
News<br>
<textarea input name="msg" cols=40 rows=5> </textarea><br>
<input type="submit">
<br><br>
</form>
<?php
$dateposted=date("YmdHis");
if (!empty($title) and !empty($msg)) {
$fp=fopen("/home/aqueen/public_html/news/".$dateposted."txt", "w");
fwrite($fp,$title,$msg);
fwirte($fp,$msg);
fclose($fp);
include "/home/aqueen/public_html/news/".$dateposted."txt"; }
?>
My questions: 1) How can I fix that code? It generates new file but without content inside. 2) It doesn't show the new file on the website /probably doesn't include it properly/ 3) When it starts working- how I can let someone delete news from website without opening the code? /online/
Thank you in advance :)
Is there any way to archive and recover entire page (with entire html, css, img, js, ...) using selenium chromedriver on ubuntu?
I'm looking for a way to archive the entire state of webpage, for the purpose of archiving the webpage.
Actually, what I want to somehow save all rendered results of the page (not as the form of screenshot, but the form of rendered result of DOM element) that we can see on browser, and recover them in local environment without network.
I really don't need to save all the functionalities of the page that interact with other computer. Only the view of the page is needed to be archived.
What I tried to archive youtube.com's home page were,
- Using beautiful soup to get immediate html sources
- Using python selenium and chromedriver to get dynamically loaded html sources
- 2 + downloading all referenced .css, .js, and images from links in html codes to local directory.
- Pressing ctrl+s on chrome, which downloads html sources and several files. (.js, .css, .jpg, ...)
But all of them did not work correctly.
At first, 4th method seems working, but soon I found out that it downloads initial html source, not a dynamically loaded one.
Is there any known ways to do this kind of stuffs? (archiving currently rendered state of the page)
Thanks in advance.
lundi 26 novembre 2018
Center div inside table call but align text left
I have a wrapper/list ul
and inside it list items li
. The ul
element has display: table-row;
and the li
element has display: table-cell;
. The problem I have now is that I want to center the li
element inside the list but align the text inside the li
element on the left.
The code looks like this
.list {
display: table-row;
width: 100%;
}
.list-item {
display: table-cell;
text-align: center;
}
.item-link {
text-align: left;
}
<ul class="list">
<li class="list-item">
<a class="item-link">
Here is some text. Align me left.
</a>
</li>
<li class="list-item">
<a class="item-link">
Here is some text. Align me left.
</a>
</li>
<li class="list-item">
<a class="item-link">
Here is some text. Align me left.
</a>
</li>
<li class="list-item">
<a class="item-link">
Here is some text. Align me left.
</a>
</li>
</ul>
Does anyone have an idea how I can solve this problem?
How to remove or hide this when resize the browser?
This is an shopping-cart icon with a "cart" paragraph. When browser is resized, I want to hide or remove the "cart" paragraph and only show the shopping-cart icon. I've tried a lot of different ways but still cannot do it. I've came out three ways: 1. Use the css selector. And use the media query to hide the p element.
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
2.Use JS to remove the p element when resize the browser.
3.Also use JS to add a new icon element to take place of the origin ones.
But I don't know how exactly they can work, help me please, Thanks a lot~
Here's what I'm working on :)
<p style="black:white;font-size:14px;font-family:Roboto; onclick="myFunction()"><i class
="fa fa-shopping-cart" style="color:black;"></i> Cart</p>
firebase data retrieval returns complex object
i want to retrieval data from firebase and display on website i tried most of the method but dosen't work for me.
Here is my firebase
"transactions" : {
"8527z732x5e5RZnaWlYnvXLQv1Z2" : {
"102" : {
"trans_amount" : "20",
"trans_date" : "23/11/2018"
},
"103" : {
"trans_amount" : 240,
"trans_date" : "23/12/2018"
}
},
"WfEQmVDBXeXFqrmzNslIPhD0UqQ2" : {
"102" : {
"trans_amount" : "20",
"trans_date" : "23/11/2018"
}
}
}
here is my code for retrieval
ref.on("child_added", function(snapshot) {
PrintData.innerText = ""; // We got a new value, so clear the existing
HTML
snapshot.forEach(function(childSnapshot) {
var childData = childSnapshot.val();
//showing single object value
console.log(childData);
PrintData.innerText += "trans_amount: " + childData.trans_amount + "
trans_date: " + childData.trans_date + " ";
});
});
here is my output 1
How can I make example.com/example/ show an html file, and stay the same link
I want to make it so a user can go to example.com/example/, and it will show a select html file, while keeping the link as example.com/example/.
Is this possible to do with Apache?
Thanks
custom search web server/stack in Python
I'm implementing a specialized, private web search application in Python that uses homomorphic methods to process encrypted queries. For this, I need a combination client/server where
- the client sends rich data structures to the server expressing the query (dict, lists, large integers)
- the server evaluates every document in its stores against the query, largely by performing a cryptographic operation using said data structures
- the server returns multiple return buffers every so-many records back to the client for further processing
Ideally, the server could grow to support application multi-threading, in the sense of being able to distribute the query to a pool of workers for mapping, and then aggregating the maps together in a reduce operation to provide one answer back to the client; however, performance is not a factor initially. This is a demonstration, so should be as simple as possible to code up. Also, the server should work with plaintext documents, or rather, the framework shouldn't impose how the documents are stored (each document will have metadata associated with it). Also, I don't need authentication or https. User data caching would be nice, but if the server gives me client information, I can probably manage my own cache data structure to handle client data.
The code I have is written in Python, both for the server and the client, but in a pinch, I could adapt. So far, I am leaning toward CherryPy for the server, because it has a tremendous set of documentation and I think I can get something running quickly in it, but then I can't seem to find reference to anyone using Brython or Skulpt with it.
Has anyone implemented a custom web server using some Python framework? Thanks for your help.
Imagenes en Web Api con C# como url
estoy aprendiendo con .net(Web Api) y c#, la pregunta es como creo una carpeta en .net(Web Api) para subir imagenes en esa carpeta, y poderla ver con la url por ejemplo "localhost:3546/api/img/castle.jpg"
How do you rewrite a URL with a query in a subdirectory using .htaccess
I'm building a website (no frameworks) and I have a .htaccess file in my root with working rewrite engine. I've been searching far and wide for a solution for my problem but nothing seems to work.
I'd like my site url to be displayed as: mysite.com/profile/profilename and for it to be rewritten to: mysite.com/profile.php?name=profilename so to give the illusion of there being another subdirectory when there isn't.
I've done a tonne of research and this seems to be the most logical to me but it doesn't seem to work:
DirectoryIndex index.php
RewriteEngine On
RewriteRule ^profile/(.*)$ profile.php?name=$1 [L]
(index.php is the home page to the site). When I try this, it doesn't come up with a 404, it comes up with the profile page, but without styling, it can't access the javascript I have in the root directory folder and the query didn't execute properly.
I have some simpler rewrites already active on the site so the rewrite engine is definitely on, but this more complicated style doesn't seem to work. Is it even possible to do this? And if so, what am I doing wrong?