Menu
  • HOME
  • TAGS

Protect video from video from capturing

java,security,web,filesystems,system

I think that it is not possible to prevent user from video capturing. You can make it harder but you will never prevent user from capture screen of his computer. Even if you will control process list of computer (which i guess impossible or impossible for most users) You still...

What damage can a website do?

security,web

The main risk is encountering a drive-by download. A drive-by download isn't necessarily a file download in the usual sense, it could be a browser exploit that allows executable code to download and execute on your system (known as the payload). One example is the Microsoft Internet Explorer colspan Element...

Is there any way to find out when an album got added to spotify with the web api?

javascript,api,web,timestamp,spotify

After getting an answer from spotify is seems it's currently not possible to get this information. "At the moment we are only exposing the release date of the album itself, not the date of addition to the Spotify index. We will take this into account as a feature request." https://developer.spotify.com/web-api/get-artists-albums/...

Am i right in suspecting that this generated PHP code is vulnerable?

php,security,web

There is actually one more issue you are missing: Problem: This code is using "==" to check for equality on the hashes. PHP can merrily decide to coerce the first parts of these strings to numbers and then compare the "valid" parts of these numbers. For example, PHP will decide...

Simulate the use of a website with a client [closed]

javascript,c#,web,simulation,imacros

If you want it for .net, then there is WatiN. Here is an example how to use it: public void SearchForWatiNOnGoogle() { using (var browser = new IE("http://www.google.com")) { browser.TextField(Find.ByName("q")).TypeText("WatiN"); browser.Button(Find.ByName("btnG")).Click(); bool contains = browser.ContainsText("WatiN"); } } p.s. You can also try Test Recorder for generating macros....

What does mean the @ (at) on unix access right?

php,unix,web,ls,access-rights

The @ symbol which you get from ll command (alias of ls -l) indicates which the file has extended attributes. Wikipedia: Extended file attributes are file system features that enables users to associate computer files with metadata not interpreted by the filesystem, whereas regular attributes have a purpose strictly defined...

how to differentiate between normal url and image url programmactically

python,http,url,web

You can make a head request to check the content type of the url. HEAD request will not download the body content. Example using python requests module: >>> import requests >>> url = "https://encrypted-tbn1.gstatic.com/images?q=tbn%3AANd9GcTwC6cNpAen5dgGgTmmH2SG75xhvTN-oRliaOgG-3meNQVm-GdpUu7SQX5wpA" >>> h = requests.head(url) >>> print h.headers.get('content-type') image/jpeg ...

Using front end frameworks with a Wordpress site?

wordpress,user-interface,web,wordpress-theming

Some of my favorite starter themes are: http://themble.com/bones/ and http://underscores.me/ You can also look at frameworks like: http://themeshaper.com/thematic/ or http://my.studiopress.com/themes/genesis/ I've used AngularJS with WordPress in the past, so I don't see why you wouldn't be able to use Handlebars (I haven't done it myself, but if you search, I'm...

Is it good idea to make separate CSS file for each HTML page?

html,css,html5,css3,web

Your example shows you using one design.css file for your entire website. Generally, it is better to have one single .css file containing data for all pages for 2 reasons: You will allow browsers to cache .css files thus resulting in faster loading times; It will ease the maintenance process....

Converting a ruby structure to a hash

ruby-on-rails,ruby,soap,web,savon

When trying to tackle problem like this in Ruby, it's useful to think of it in terms of transformations on your data. The Ruby Enumerable library is full of methods that help you manipulate regular data structures like Array and Hash. A Ruby solution to this problem looks like: def...

What is the best way to make two web pages communicate between each other back and forth? [closed]

javascript,asynchronous,web

If you just wanted two pages to communicate in the same browser session on the same domain, you could use localStorage -- it's basically a key-value store with some limits on size (rough estimate 5 MB but it varies). An event is fired when you write to localStorage so you...

How to avoid using 'this' pointer in javascript (ES5/ES6)?

javascript,ember.js,web

the best practice is NOT using this pointer due to security issues. Not exactly. His argument is that you cannot trust this in an unsafe environment, because it is determined by the caller. It's all about encapsulation, and the safety that your methods only do what you want them...

Add Facebook Share Button with Video to Website

facebook,web,facebook-social-plugins,facebook-share

Instead of using the FB feed method, I used share, and this drew from the metatags I included for my webpage. This ended up working! For reference, this is what it looked like: $('.fb-share-button').click(function(e){ e.preventDefault(); FB.ui({ method: 'share', href: '<%[email protected]_url%>', }, function(response){}); }); and my metatags: <!-- Facebook tags -->...

How to have two css animations in one tag

html,css,animation,web

You can comma-separate your animations, so you could do: -webkit-animation: squeez 2s 1s 1 forwards, fadeOut 10s 10s 1 forwards; -moz-animation: squeez 2s 1s 1 forwards, fadeOut 10s 10s 1 forwards; -o-animation: squeez 2s 1s 1 forwards, fadeOut 10s 10s 1 forwards; animation: squeez 2s 1s 1 forwards, fadeOut 10s...

Spring service and Spring web app in one

spring,web-services,rest,spring-mvc,web

yes that is possible to combine with web-app for example your controller package into your restful controller also work that is possible to crud operation via restful web service....

Webpage content doesn't match the page's source code

html,web,web-scraping,beautifulsoup

Yelp, like many responsive sites, uses AJAX to fetch more data and/or jQuery to perform filtering. Scraping can only pull the base HTML before any jQuery or AJAX updates are performed. Both of these URLs are most likely the same to server-side code: search?find_desc=&find_loc=Pittsburgh%2C+PA%2C+USA&ns=1 search?find_desc=&find_loc=Pittsburgh%2C+PA%2C+USA&ns=1#cflt=restaurants That is why you see...

Parse.com To Do web app deployment issue

javascript,backbone.js,web,parse.com,cloud

Did you follow deployment rule of parse? If your directory structure (from where you run command) is not as below you'll get the same error: -config/ global.json -cloud/ main.js -public/ index.html If the keys config/global.json do not matches to yours then also you'll error. ...

Woocommerce product dimensions not showing on first product

php,html,wordpress,web,woocommerce

add_action( 'woocommerce_after_shop_loop_item_title', 'cj_show_dimensions', 9 ); function cj_show_dimensions() { global $product; $dimensions = $product->get_dimensions(); if ( ! empty( $dimensions ) ) { echo '<span class="dimensions">' . $dimensions . '</span>'; } } The above code works well only under the following conditions: If dimensions are added to the product. This code should...

How to get key (index) value of a textbox in array textboxes

javascript,jquery,html,web

var textboxes = $('input[name="textbox[]"]'); textboxes.on('blur', function() { var index = textboxes.index( this ); alert( this.value + ', ' + index ); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <input type="text" name="textbox[]" value="1" /> <input type="text" name="textbox[]" value="foo" /> <input type="text" name="textbox[]" value="banana" /> ...

AngularJS UI Router reload not working

javascript,angularjs,web,angular-ui-router

The problem is that you are using html5mode but it appears your server is not set to properly forward requests to your index for Angular to handle. The server is attempting to find a resource at this location and failing. The reason this did not happen previously, is because the...

How can I implement something like Play Store Description

javascript,jquery,html,web

If you go into inspect element mode in your developer tools, you'll notice that it's an absolutely positioned element, with a gradient background that transitions to transparent. By defining a set height for the description, and hiding your overflow, we can add the cool 'faded text' effect to the elements....

Facebook open graph- share a poem instead of an article

facebook,web,share,facebook-opengraph,opengraph

You can create your own custom OpenGraph obejects and actions. Have a look at the guidelines at https://developers.facebook.com/docs/sharing/opengraph/custom There are a few basic components to creating custom Open Graph stories: An app namespace for publishing and reading actions and objects A custom object A custom action An Open Graph story...

Three js, block textures are blured

javascript,web,three.js

First of all you are loading the same texture several times. So assign it to a variable and then make the textures resolution-independent and render without blurriness. var border_tex = new THREE.ImageUtils.loadTexture('img/texture/herbe/border.gif'); border_tex.magFilter = THREE.NearestFilter; border_tex.minFilter = THREE.LinearMipMapLinearFilter; var top_tex = new THREE.ImageUtils.loadTexture('img/texture/herbe/top.gif'); top_tex.magFilter = THREE.NearestFilter; top_tex.minFilter = THREE.LinearMipMapLinearFilter; var...

Unexplainable gap on bottom of web page [closed]

html,css,web,webpage,inspector

I should elaborate. The problem is caused by the code <iframe name="google_conversion_frame"... Because this iframe is in the flow and has layout, it is being added at the bottom of the page and adding the space. Your best bet would be to apply a style to it, giving it position:...

How to assign default user role in entrust?

php,authentication,web,laravel-5

I figured it out all by myself. Here is how I achieved: I copied postRegister() function from /vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesAndRegistersUsers.php and overridden in /app/Http/Controllers/Auth/AuthController.php with some modification. Here is the modified function in AuthController.php: public function postRegister(Request $request) { $validator = $this->registrar->validator($request->all()); if ($validator->fails()) { $this->throwValidationException( $request, $validator ); }...

setInterval not repeating

javascript,web,intervals

Try using else if var func = function () { 'use strict'; if (time === 1) { document.getElementById("top-background").style.backgroundColor = "#000"; time += 1; } else if (time === 2) { document.getElementById("top-background").style.backgroundColor = "#aaa"; time += 1; } else if (time === 3) { document.getElementById("top-background").style.backgroundColor = "#d5d5d5"; time -= 2; }...

Some sites do not allow requesting the same file twice (IDM)

c#,asp.net,pdf,web,httpresponse

i have fixed my problem . The problem was concerning Ajax : <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="rbtn_generate"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="GV_Shift_employees" /> </UpdatedControls> </telerik:AjaxSetting> </telerik:RadAjaxManager> ...

Android application using html

android,windows,web

does it mean we still get a .apk file or when we develop using html It can, if you are using tools like PhoneGap. or when we develop using html, is it then called as android web development, which means you won't get a .apk file An HTML5 Web...

Angular2 - Bootstrap v3 datetimepicker issue in FF and IE

web,bootstrap,bootstrap-datetimepicker,angular2

Apparently the issue here is that in FF and IE the JS inside the html script blocks is not executed, if these html script blocks appear inside the Angular2 application html template. I'm not sure if this is something Angular2 could fix, or if it is just caused by the...

Bad performance in chrome running this site

javascript,image,performance,google-chrome,web

So, conveniently enough there are developer tools built into Chrome (as well as every other major browser) that let you profile, debug, or inspect the performance or source code of a webpage. To open the console CTLR+SHIFT+I (Windows) or CMD+OPT+I (Mac). Now you'll see a console at the bottom of...

How to Edit files using web application

design,web,jython

A simple solution to the concurrency issue you talk about is to save a datetime stamp each time the file is edited from anywhere. Now, if a user tries to save his changes to a file, check the datetime stamp and make sure that the current edit's datetime stamp is...

Using same menu on multiple pages ASP.NET [closed]

c#,asp.net,web

I think you're looking for master pages: https://msdn.microsoft.com/en-us/library/wtxbf3hh%28v=vs.140%29.aspx

What is the advantage of using Maven for creating RESTful Web Services

java,web-services,rest,maven,web

Maven is automation tool that is designed for java projects.It will provide the structure for the java project you are building and will take care of jars. It creates a repository where it store all the jar that were downloaded automatically by your java program.If you want to see your...

Different webfont for Japanese special characters

html,css,web,fonts,webfonts

I wouldn't say this is a great option, but you could let CSS render the lenticular brackets instead. By doing so, you're removing the brackets from text entirely, so they're no longer selectable, indexable, etc., but it would solve the padding problem for these characters with a simple CSS class...

Compare strings without being case-sensitive

javascript,web,compare,case-sensitive

as @nicael stated just lowercase what they input. However, if you need to preserve the way it was input and only compare using the lowercase equivalent, use this: var grade = prompt("Please enter your class") ; switch ( grade.toLowerCase() ){ case "firstclass" : alert("It's $500"); break; case "economic" : alert("It's...

Pagerank: node pointing to itself

web,pagerank,web-search

The original Page Rank algorithm doesn't allow self-loops. However there are some variations that either explicitly add self-loops or consider those present in the link structure. So here we have the complete Web (or the web we crawled) containing just two nodes. A has a self loop and another link...

How I can find my root directory at the server?

php,web

echo $_SERVER['DOCUMENT_ROOT']; The above line will give you the root directory of your website You can directly define the path like a constant somewhere in your common includes file like define('PATH_TO_PROJECT_ROOT', '/path/to/projectroot/'); and use the constant wherever you want...

QBWC1012: Authentication failed due to following error message. Client found response content type of 'text/xml', but expected 'text/xml'

php,soap,web,quickbooks,connector

The error message says: The request failed with an empty response. As with troubleshooting any PHP script, the very first thing you should do is check your PHP error log. Did you check it? What did it say? Failing that -- post your code. Tough to help you if you...

emailjs not working [node js]

javascript,node.js,email,web,smtp

I tested with the code below (using gmail) and it is working: var email = require('emailjs'); var server = email.server.connect({ user: '[email protected]', password: 'stackoverflow', host: 'smtp.gmail.com', ssl: true }); server.send({ text: 'Hey howdy', from: 'NodeJS', to: 'Wilson <[email protected]>', cc: '', subject: 'Greetings' }, function (err, message) { console.log(err || message);...

Unity WebPlayer “Failed to initialize player's 3D settings”?

web,unity3d,3d,augmented-reality,unity-web-player

Try this. Furthermore, I would just uninstall everything and just reinstall with a stable version of Unity 5.

How to identify the class of an Object which is in a cell of webtable

object,table,web,qtp

The ChildItem function returns a test object of the requested type if it exists, otherwise it returns Nothing. So your code should look like this: Set aLink = Browser("Oracle PeopleSoft")_ .Page("Request Payment Predictor")_ .WebTable("Run Control ID").ChildItem(2, 1, "Link", 0) If Not aLink is Nothing Then aLink.Click End If The object...

Free PHP and MySQL Web hosting

php,mysql,web,odbc,web-hosting

These are some free hosting providers: https://byethost.com/free-web-hosting https://somee.com/ (Microsoft .Net supported) ...

Laravel 4.2 link to action links & as %27

php,laravel,web

There are two problems here, that fail to match your expectations about what is supposed to happen: 1. The first and most importat one, is that the link_to_action helper function uses the to method in the Illuminate\Routing\URLGenerator class to generate the URL, which in turn makes use of the rawurlencode...

How to make function work when the mouse not moving?

javascript,jquery,html,html5,web

You could set an interval that decreases the value if the mouse does not move, and clear it when it moves, and reset it, something like this: $(document).ready(function() { var score = 0, decreaseInterval, intervalTime = 1000; function decrease() { if (score > 0) score--; $("#result").val(score); }; decreaseInterval = setInterval(decrease,...

.JS refuses to enable menu

jquery,css,html5,web

There are a couple of basic things wrong with your code: Where is the body tag? Script tag outside of the html tag!!! Incorrect CSS styles (Extra trailing curly brace) ...

Password encryption algorithm

security,web,passwords

You'll want to store a hash and a salt in your database and use those for authentication. This article in particular was very helpful for me when I implemented this: http://www.codeproject.com/Articles/704865/Salted-Password-Hashing-Doing-it-Right

How to write denormalized data in Firebase

javascript,database,web,firebase

Great question. I know of three approaches to this, which I'll list below. I'll take a slightly different example for this, mostly because it allows me to use more concrete terms in the explanation. Say we have a chat application, where we store two entities: messages and users. In the...

Web API returning null JSON objects C#

json,api,web,large-data-volumes

Either mReader.GetString(i) is returning null or you have no data in the columns.

Restriction on number of opened tabs

javascript,jsp,web,struts2,browser-tab

You can't restrict the user from opening a new tab. (This reminds me the old pop-ups with no buttons, no address bar, but still responding to backspace and other events) You can however make your app recognize the attempt of opening a third tab, and load a different result like...

show Asp.net website to client without having domain or web hosting

asp.net,web,web-deployment

You can try azure free websites. Other than that, you can host the website on you own computer and give your client your ip address (you may have to play around with port forwarding and windows firewall)....

Change menu's height on scrolling

jquery,html,css,web,bootstrap

This is the simple jquery solution. $(window).scroll(function (event) { var y = $(this).scrollTop(); //set position from top when to change style in pixels if (y >= 300) { $('#header').addClass('resized'); } else { $('#header').removeClass('resized'); } }); CSS: .resized { height:50px !important; } JSFiddle...

What are the values that appear at the address bar?

php,web,hex,type-conversion,translate

What you are seeing is called URL Encoding. It allows characters that are not legal for a URL to be represented by only legal characters. You are right, they are hex numbers. For example, if you wanted to represent the # character in a URL parameter, you would use %23...

using css pixel calculating screen size, where is wrong?

css,web,retina-display,w3c

A CSS pixel is not always 0.26mm From CSS W3: The reference pixel is the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the reader of an arm's length. For a nominal arm's length of 28 inches, the visual angle...

Doc.Checkbox 'change' event does not occur in Websharper.UI.Next

web,f#,websharper

What happens is that Doc.AsPagelet adds a wrapper around the doc, so you are adding an event listener to that wrapper. And even if it did not, you would be adding an event listener to the Div0 you created instead of the CheckBox itself. That being said, there are two...

Why the names of some css, js files have random numbers in them?

html,web,filenames

This is normally to break caches stored by the browser so that the latest version of a file is loaded. Every time a file is changed this value will normally be changed also. This can be done manually by changing the filename and/or the paths in other files referencing this...

How to send MD5 hash of empty byte array?

c#,php,asp.net,web

You can do it in many way: $hash = md5(null, true); // or $hash = md5('', true); // or $hash = md5(false, true); ...

How I redirected according to PHP?

php,web

You should put an exit() after redirect. header() function only adds additional line in the http response header. It does not stop further script execution. Also, you should probably use mysql_fetch_assoc, instead of mysql_fetch_array: $tour1 = mysql_query("SELECT * FROM sqlusuarios_users WHERE id=".$hash ,$conexion); $tour2 = mysql_fetch_assoc($tour1); if($tour2['tour'] == "0") {...

Google Chrome Add Bookmark Image

html,html5,google-chrome,browser,web

It seems to be some datas included in the head part of the pages. You probably know that you can use meta tags to set some favicon, gps coordinates, and many other things. Some new tags, the Opengraph meta tags, are now used to define some informations to best describe...

Puzzling differences in behavior between console and web apps

c#,.net,web

Check to see if the return from Path.GetTempFileName is different from the console app and the web app. Windows could be playing tricks with you. I had similar issues attempting to write log files. I just gave up and put them int the same directory as my web service.

“DOMAttrModified” event not supported by modern browser?

javascript,jquery,html,events,web

From the docs of mutation events This feature has been removed from the Web. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time. Use...

Django authenticate method return None

python,django,authentication,web

This is the code in Tango with django user.set_password(user.password) user.save() And your's is user.set_password(user.set_password) user.save() Try to replace set_password with password....

How would I use an only for IE8 and not for any other browser

jquery,web

You can try to use HTML conditional statements. It is an oldschool way of doing this and little bit extreme ( but you are targeting IE8, anyways). More here. Even better here Here is what I have in mind: <!--[if IE8]><script src="jquery2.0.js" "><![endif]--> <!--[if IE9]>include something else [endif]--> ...

Multiple values in a single mysql field [closed]

php,mysql,sql,database,web

As you are aware of the problem when storing multiple values in one col you should not do it. Keep your database normalized and you will have much less problems retrieving and working with your data. Further information: http://en.wikipedia.org/wiki/Database_normalization For your example you should use three tables companies, persons, founder,...

Beautifulsoup: Getting a new line when I tried to access the soup.head.next_sibling value with Beautifulsoup4

python,python-2.7,web,web-scraping,beautifulsoup

There are 3 kinds of objects that BeautifulSoup "sees" in the HTML: Tag NavigableString Comment When you get .next_sibling it returns you the next object after the current which, in your case, is a text node (NavigableString). Explained in the documentation here. If you want to find the next Tag...

How can I send an input type email between 2 files php?

php,mysql,email,web

there are a lot of things wrong with your code. 1) dont use mysql, and use mysqli or PDO instead 2) Use session_start() and $_SESSION; session_start(); $_SESSION['user'] = mysql_fetch_assoc($result); $_SESSION['email'] = $user['Email']; header('Location: w/e'); then do session_start() <input name="email" value="<?php echo $_SESSION['email'];?>" required="" autofocus="" type="email"> ...

uploading and processing file progress

web,progress

wierd that nobody advised anything... I have done the following: save the uploaded file and find the maximum row redirect to another page with progress bar send the starting row and a chunk size from the frontend load the chunk into database (phpexcel allows to read a chunk from file);...

Routing in Sinatra

ruby,web,routing,sinatra

This works 100% (i use it): post '/search' do ... erb :"search/results" end Thats method do magic with render engine in Sinatra like erb or slim be careful :"some\thing and "some\thing" different things!...

How to create global session/application session to store application options using spring?

java,session,spring-mvc,web

You need to use application context; public class SomeSpringBean { @Autowired private WebApplicationContext appContext; public void storeAndRetrieveSomethingInAppScope() { appContext.getServletContext().setAttribute(String name, Object object); Object fromAppContext = appContext.getServletContext().getAttribute(String name); } } ...

Needs advice for buying Web Server [on hold]

web,server

Probably the most cost effective solution is looking for old servers on eBay. You can get very powerful hardware at a low price, often 16-32GB of RAM with 4-8 cores for under $300. Unfortunately these servers are meant to be ran in a data centre or enclosed room so be...

curved style for image

html,css3,web,styles

You can get this efect setting multiple divs with the same background image, and arranging them in a curved path along the Z axis. As an extra, you can get an hover animation .test { width: 800px; height: 600px; position: relative; transform-style: preserve-3d; perspective: 1200px; transition: perspective 2s, transform 2s;...

How to get a list of all installed applications in client's computer?

javascript,html,windows,ubuntu,web

JavaScript Run time Engine not have Permission to access System information.You must use java applet to run command in user client.

What property does soapui property window refer to? Is it the http request properties?

xml,web-services,soap,web,soapui

At the bottom of your SoapUI window, you should find an "http log". This will allow you to view EXACTLY what SoapUI is sending the your Web Service. Typically you will not include your username or password within the XML itself, but in the http headers that come before your...

Safe general config file for webapp

php,web,configuration-files

To prevent the file being downloaded, generally the way to go is to store it in a directory that is not served by the web server. I don't know what setup you're in, but assuming an Apache setup, if for example your .php files are served from a directory /home/user/htdocs,...

Viruses for android on web pages help please

web,virus

Yes, it is possible for a website to get information about you, such as your phone type, operating system, browser, browsing history, etc (see Mobile Device Detection). More than likely - I say this without knowledge of website visited - the website wants you to download their virus scanner without...

Scraping Javascript webpage (script error occurred)

javascript,html,vb.net,web,scrape

You can use WebBrowser.ScriptErrorsSuppressed = true; property. Details: https://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.scripterrorssuppressed%28v=vs.110%29.aspx...

Why scripts at the end of body tag

javascript,html,css,web,pageload

Scripts, historically, blocked additional resources from being downloaded more quickly. By placing them at the bottom, your style, content, and media could download more quickly giving the perception of improved performance. Further reading: The async and defer attributes....

Technical debt on custom web rule in sonarqube 5.1

web,annotations,sonarqube,sonar-runner,sonarqube-5.0

You can take a look at how this is implemented on the numerous SonarQube open-source plugins that are developed by SonarSource and the SonarQube community. For instance, on the Java plugin, you can look a some classes like AnonymousClassShouldBeLambdaCheck. You will see that the following annotations are used to declare...

Revoke User Creation, write to DB

php,mysql,sql,web

In the end I decided to take this approach: <?php $id=10001; $sql = "SELECT id FROM userAccounts ORDER BY id DESC"; $result = $conn->query($sql); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $id = $row["id"] + 1; } $username = $_REQUEST["emailInput"]; $password = $_REQUEST["passwordInput"]; //the following query is used to...

how to compare only date from a model's datetimefield with current date?

python,linux,django,web,frameworks

You can use the __range field lookup: start = datetime.date.today() end = start + datetime.timedelta(days=1) Model.objects.filter(datetime__range=(start, end)) ...

Extract data from a webpage

web,data,extraction

Well the most reliable way to do this would be to use an HTML (or XML) parser. However, if the HTML is always formatted the same way, i.e. like this: <tr> <td width="10%" valign="top"><p>City:</p></td> <td colspan="2"><p> ******* </p></td> </tr> with the city name appearing where the asterisks are, then the...

Google Maps not showing on webpage but shows on localhost

javascript,html,css,web-services,web

Move this portion of code to the footer page, Probably you has binding the map and div container is not property loaded, additionally, tray adding a heigth to the id map_canvas as default in your css. <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDo7nFkoUthlGms4De0miS4EPfupB5x0cY"></script> <script> function initialize() { var mapCanvas = document.getElementById('map-canvas'); var myLatlng =...

Java - Standalone SSL Web Service - JAX-WS, JRE, no web server

java,ssl,web,jks,wsgen

Try SSLContext ssl = SSLContext.getInstance("TLSv1.2"); SSLv3 is known to be vulnerable nowerdays and your browser probably won't accept a server configured like this. Another option try curl with -koption to connect to the server....

Simple Java Web validation Neither BindingResult nor plain target object for bean name 'number' available as request attribute

java,spring,http,web

In showHomePage method, change to @ModelAttribute("number") and: if(result.hasErrors()) { return "validation"; } return "success"; ...

Center input field in bootstrap

html,html5,twitter-bootstrap,css3,web

If I understand correctly what you want, then the following should center the input field: <div class="col-sm-8 col-md-7" style="min-width: 270px;"> <input type="text" name="address" class="form-control" value="<?php echo$data["address"]; ?>" style="margin: auto;"> </div> By default though, Bootstrap's .form-control fields are set to 100% width so you won't notice any difference. You could add...

AngularJS - Loading my directives suddenly not working?

javascript,angularjs,web

looks like you need are missing css for content-current class which is responsible for showing active tab. CSS .content-current{ display: block !important; } ...

React keyboard events not firing

javascript,web,reactjs,frontend

A <div> is a container element, not an input element. Keyboard events are only generated by <inputs>, <textarea> and anything with the contentEditable attribute. You could try render: function() { return ( <div id="keyboard" contentEditable={true} onKeyDown={this.playNote} onKeyUp={this.stopNote}> </div> ); } but this isn't a guaranteed solution.. just a starting point...

How can i make these tabs Responsive

javascript,html,css,web

Add display: inline-block; for ul.tabs li a this will help See fiddle : http://jsfiddle.net/sachinkk/1b2m3rsq/...

JQuery Animate() showing sticky behaviour with other elements in the same class

jquery,css,web

Try adding vertical-align: top to the .outer-card css class. This works because .outer-class is display:inline-block and the vertical-alignproperty applies to inline elements. Code Example...

How Do I store and display (automatically) stories that users can submit on my website [closed]

javascript,jquery,html,web

There is no quick and simple answer for this. You need to store user-submitted data somewhere - preferrably a database. You could try to start with an SQL database like SQLite or MySQL. These databases hold tables that can stores values - values your users submitted Example: Stories Table story_id...

Pass an id with mysql_insert_id() of a .php to another .php

php,html,mysql,web

You can't pass variable through more pages like this. You need to write it using $_GET, because it's in URL. echo $_GET['last_id']; If you want to work with it later, use SESSION or COOKIE....

rewrite get variables in url

.htaccess,web

Try: Options -Multiviews RewriteEngine On RewriteCond %{THE_REQUEST} \ /+massage\.php\?massage=([^&\ ]+) RewriteRule ^ /massage/%1? [L,R] RewriteRule ^massage/(.+)$ /massage.php?massage=$1 [L,QSA] Make sure to turn off Multiviews, which is a mod_negotiation feature that will pre-emptively affect the request before mod_rewrite can run. You need a rule to redirect the browser from the query...

How HTML FORM take only letters not numbers?

php,html,web

Rather then using PHP, try the HTML pattern Attribute in input, like this: <form action=""> Country code: <input type="text" name="country_code" pattern="[A-Za-z]{3}" title="Three letter country code"> <input type="submit"> </form> For more infos: W3School...

Ways to prevent user from reloading/refreshing page in quiz taking application

javascript,jquery,html,web

You are fighting an uphill, unwinnable battle if you are attempting to secure a web application using only client-side technology (javascript). There are always ways to get around the measures you're attempting. A workable solution would be track the quiz progress server-side after every user decision. This way, if the...

Difference between web service and website

web

Non Technical Answer: Website: Is a site, which is designed with proper User Interface and with User Experience. It is accessed with a URL (address) and viewed only with the help of client browser. eg. www.facebook.com opened in firefox browser Webservice is a service in which if its consumed, will...

Yii2 : Getting unknown property when using findBySql

mysql,sql,web,frameworks,yii2

By default the attributes that are extracted from the returned rows are only the columns that can be found in the table. I get the impression from your code that those fields are not. To fix this you should probably override the attributes()-function and declare those properties as valid: public...

How do i link domain from one.com to digitalOcean.com?

web,error-handling,dns,digital-ocean,domain-name

The A record is the one you should use. A RFC 1035 Address record Returns a 32-bit IPv4 address, most commonly used to map hostnames to an IP address of the host, but it is also used for DNSBLs, storing subnet masks in RFC 1101, etc.