mercredi 31 août 2016

What are the major scopes and limitations of a ONLINE RESERVATION? And What online reservation u preferred? [on hold]

A general answer at the first questions because i dont have idea yet on what online reservation should I do thanks

And please give some insights on what should i do




How to use two different designs for web and mobile

I would like to be able to have a certain design for my web page, and when resized to mobile, use a different design. I will include photos to better explain.

Here is the design that i would like to use for Web And here is the sketch for Mobile I am not completely sure how to use media queries at the moment Here is the code so far

HTML Infants Children 2+

    <div class="row">
        <div class="full-time col-sm-12 col-md-12 col-lg-2">Full Time</div>
        <div class="prices-left-box col-sm-12 col-md-12 col-lg-5">
            <div class="prices-left">$200 Per Week</div>
        </div>
        <div class="prices-right-box col-sm-12 col-md-12 col-lg-5">
            <div class="prices-right">$150 Per Week</div>
        </div>
    </div>
    <div class="row">
        <div class="full-time col-sm-12 col-md-12 col-lg-2">Up to 4 Hours</div>
        <div class="prices-left-box col-sm-12 col-md-12 col-lg-5">
            <div class="prices-left">$125 Per Week</div>
        </div>
        <div class="prices-right-box col-sm-12 col-md-12 col-lg-5">
            <div class="prices-right">$100 Per Week</div>
        </div>
    </div>
</div>

And CSS:

@media (max-width: 992px) {
    .infants{
        color: black;
        background-color: #7FC7AF;
        font-size: 36px;
        font-weight: bold;
        font-family: "open sans";
        height: 125px;
        width: 304.3px;
        text-align: center;
        margin: auto;
        display: inline-block;
    }

    .children{
        color: black;
        background-color: #FF9E9D;
        font-size: 36px;
        font-weight: bold;
        font-family: "open sans";
        height: 125px;
        width: 304.4px;
        text-align: center;
        padding: auto;
        display: inline-block;
    }
}

.infants{
    color: white;
    background-color: #7FC7AF;
    font-size: 36px;
    font-weight: bold;
    font-family: "open sans";
    height: 87px;
    width: 304.3px;
    text-align: center;
}

.infants-box{
    padding-left: 176px;
    padding-right: 80px;
}

.children{
    color: white;
    background-color: #FF9E9D;
    font-size: 36px;
    font-weight: bold;
    font-family: "open sans";
    height: 87px;
    width: 304.4px;
    text-align: center;
}

.payment-method{
    font-size: 24px;
    padding-bottom: 57px;
    padding-top: 57px;
    text-align: center;
    font-family: "Source Sans Pro";
    font-weight: 600;
    font-style: italic;
    font-size: 24px;
    line-height: 30px;
    color: #4B4B4B
}

.full-time{
    background-color: #454545;
    color: white;
    font-size: 24px;
    font-weight: bold;
    font-family: "open sans";
    height: 150px;
    margin: auto;
    width: 176px;
    text-align: center;
}
.prices-left-box{
    background-color: white;
    width: 304.4px;
    height: 150px;
}
.prices-left{
    font-family: "source sans pro";
    font-size: 24px;
    width: 304.3px;
    margin-right: 220px;
    text-align: center;
}

.prices-right-box{
    background-color: #ffffff;
    width: 304.4px;
    margin-left: 10%;
    height: 150px
}

.prices-right{
        font-family: "source sans pro";
    font-size: 24px;
    background color: white !important;
    text-align: center;
}
.background-pricing{
    background-color: #F0F0F0;
    padding-bottom: 84px;
}




Scrapy not executing in the correct order

I am currently working on a web-crawler that is supposed to visit a list of websites in a directory, visit the sites' CSS stylesheets, check for an @media tag (a basic way of checking for responsive design, I know there are other corner cases to consider), and print all websites that do not use responsive design to a file.

I am fairly certain that my method of actually checking the CSS for an @media tag works fine, but the spider is not visiting all the CSS files before deciding whether or not it has found one with an @media tag. I have a test file that logs debugging output as the program progresses, and it shows odd patterns such as finishing checking all CSS files and then printing out what it found in the files, which shouldn't happen.

I was hoping someone could look at my code and help me determine why this isn't happening in the order I want it to. For reference, the goal is:

  1. Visit a website from the list
  2. Visit every CSS file in the head element of that site's HTML
  3. If an @media tag is found, we're done and the site uses responsive design
  4. If not, continue checking more CSS files
  5. If no CSS file contains an @media tag, the site does not use responsive design and should be added to the list

Here's my code (not everything works perfectly - for example, the program times out because I haven't worked out using TimeOutError yet, but for the most part, I feel like this should do it's job of correctly evaluating websites, and it is not doing that):

import scrapy
import re
import os.path
from scrapy.linkextractors import LinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from twisted.internet.error import TimeoutError
import time

class LCCISpider(CrawlSpider):
    name = "lcci"
    start_urls = ["http://ift.tt/2c9E1lF"]
    #Calls parse_item for every category link on main page
    rules = (Rule(SgmlLinkExtractor(restrict_xpaths=('//div[@id="catListingResults"]/table/tr')), 
            callback = 'parse_item', follow = True),)
    website_list = []
    found_media = False

    #Called for each category
    def parse_item(self, response):
        #For each site on the page, calls parse_website


        sites = response.xpath('//div[@id="busListingResults"]/table/tr')
        for site in sites:
            urls = site.xpath('.//td/a[4]/@href').extract()
            for url in urls:
                if len(url) == 0:
                    continue
                else:
                    new_site = response.urljoin(url)
                    yield scrapy.Request(new_site, callback=self.parse_website,
                                                    errback=self.errback_website)




    def parse_website(self, response):

        f = open('output2.txt', 'a')
        f.write("NOW VISITING")
        f.flush()
        f.write(response.url)
        f.flush()
        f.write("\n")
        f.flush()
        f.close()
        #reset found_media to false for each website
        self.found_media = False
        #for every link in the header, check potential css for @media tag
        for href in response.css("head > link::attr('href')"):
            url = response.urljoin(href.extract())
            #if @media tag has not been found, continue checking css
            if self.found_media == False:
                #Call check_css for the url of the css file
                yield scrapy.Request(url, callback=self.check_css,
                                          errback=self.errback_website)

                f = open('output2.txt', 'a')
                f.write("step\n")
                f.flush()
                f.close()
            else:
                break

        #if no @media tag is found in any link in the header, add the url to the website_list

        if self.found_media == False:
            #self.website_list.append(response.url)
            f = open('output2.txt', 'a')
            f.write("No @media tag in")
            f.flush()
            f.write(response.url)
            f.flush()
            f.write("\n")
            f.flush()
            f.close()

            f = open('outputfalse2.txt', 'a')
            f.write(response.url)
            f.write("\n")
            f.close()

        else:
            f = open('outputtrue.txt', 'a')
            f.write(reponse.url)
            f.write("\n")
            f.close()

    def check_css(self, response):

        #Just a way of converting url into a string, the ".txt" is otherwise meaningless
        string = str(response.url)
        f = open('output2.txt', 'a')
        f.write("Checking CSS in ")
        f.write(response.url)
        f.write("\n")
        f.flush()
        f.close()
        #only perform regex search if it's a .css file
        if (string[-4:] == ".css"): 
            media_match = re.search(r'@media', response.body, flags=0)
            if media_match != None:
                f = open('output2.txt', 'a')
                f.write("found @media tag in " + response.url + "\n")
                f.flush()
                #If an @media tag is found, set found_media to True
                self.found_media = True
                f.close()
        else:
            f = open('output2.txt', 'a')
            f.write("not css")
            f.flush()
            f.close()

    def errback_website(self, failure):
        if failure.check(TimeoutError):
            request = failure.request
            self.logger.error = ('TimeoutError on %s', request.url)




Mixed Content error because of a request to adxk.net

I'm developing a small web app (bootstrap + jquery + nginx + api backend) and today I stumped upon a peculiar error in Chrome, on Ubuntu 16.04.

Mixed Content: The page at 'https://localhost/data/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://ift.tt/2crzZK4'. This request has been blocked; the content must be served over HTTPS.

My page serves all content via https and I'm not making this request.

What (the heck) is adxk.net?




website show only contents according web server dates

i have a question want to ask":

if my website has 5 tabs, each tab equals everyday's menu, i would like to do the things like when the user open my website, the browser will automatically change to today's menu according to web server's time?

So how do i do this? Any keywords i can find?

my website url is http://www.oyzgroup.com

in the menu "lunch buffet" i want the user see todays menu tab

Thanks everyone!




How to uncheck or refresh reCaptcha after sending an email?

I have a contact form with google reCaptcha. After sending contact, I want to uncheck the reCaptcha box. The check mark is still there. Can someone advise me?

Thanks in advance




authorize api calls only from my application

I want the api calls to be made from the application (not specific to any user). In a normal MVC, I have done the following

public class ValidateReferrerAttribute : AuthorizeAttribute
    {
        public override void OnAuthorization(AuthorizationContext filterContext)
        {
            if (filterContext.HttpContext == null)
            {
                throw new System.Web.HttpException("No Http context, request not allowed.");
            }
            else
            {
                if (filterContext.HttpContext.Request.UrlReferrer == null)
                {
                    throw new System.Web.HttpException("Referrer information missing, request not allowed.");
                }
                else if (filterContext.HttpContext.Request.UrlReferrer.Host != filterContext.HttpContext.Request.Url.Host)
                {
                    throw new System.Web.HttpException(string.Format("Possible cross site request forgery attack, request sent from another site: {0}", filterContext.HttpContext.Request.UrlReferrer.Host));
                }
            }
        }
    }

I want use the same logic for api calls and I have started as below. But I am unable to implement the same if else condition as above. What should be written for api calls to have same logic as above.

public class ValidateApiReferrerAttribute : AuthorizeAttribute
    {
        public override void OnAuthorization(HttpActionContext actionContext)
        {
            if(actionContext == null)
            {

            }
            else
            {

            }
        }
    }




How to integrate Web worker with GWT

I'm trying to integrate web worker with gwt, but i can't find a clear way to do that, is there any way to implement Web worker with gwt ?

Thanks.




Searching JSON with Jquery

I keep getting Uncaught TypeError: Cannot read property 'search' of undefined

  $('.searchBar').keydown(function(){
  $.getJSON('js/data.json', function(data){
    var search = $('.searchBar').val();
    var regex = new RegExp(search, 'i');
    $.each(data, function(key,val){
      if((val.id.search(regex) != -1) || (val.title.search(regex) != -1)){
        var img = "<img src= " + val.imgUrl + "/>"
        var title = "<h1>" + val.title + "</h1>";
        var description = "<p>" + val.description + "</p>";
        var cta = "<button><a href= " + val.ctaUrl + ">" + "</a>Find out more about this product</button>";
        $(img).appendTo('#data');
        $(title).appendTo('#data');
        $(description).appendTo('#data');
        $(cta).appendTo('#data');
      }
    });
  });
})




File upload 302?

I've finally gotten my asynchronous file upload working, except it only seems to handle text files.

If I upload a text file, it works and saves the file. If I upload an image, it fails firebug reports the response has a 302 status, and I get sent to the root directory of my public_html

I thought it may be related to file size, but doesn't seem to be the case, as I made the text file larger than the image, and it worked out.

I'm not sure where to start troubleshooting, I'll place the PHP relevant snippet below.

PHP

$fn = (isset($_SERVER['HTTP_X_FILENAME']) ? $_SERVER['HTTP_X_FILENAME']:false);
echo $fn;

try{
    file_put_contents("upload/".$fn, file_get_contents("php://input"));
    //echo file_get_contents("upload/".$fn);
}catch(exception $e){
    echo $e->getMessage();
}

JS

function UploadFile(file){
    var xhr = new XMLHttpRequest();
    //on the below if
    //xhr.upload: returns a XMLHttpRequestUpload Object, I believe just to check if it's supported in broswer
    if (xhr.upload){
        xhr.open("POST","http://ift.tt/2bBkJsv",true);
        xhr.setRequestHeader("X-FILENAME",file.name);

        xhr.onreadystatechange = function(){
        if(xhr.status == 200 && xhr.readyState == 4){
            callback(xhr.responseText);
        }
    }
    xhr.send(file);
    }else{
        alert("Sorry, don't think this is supported in your browser.");
    }
}

Is there a request header I should be setting? Is it something in php.ini I need to change? My max post size is I think 32MB, not sure what else would effect this.




My site is throwing "connection insecure" in firefox

I've heard from someone that my site throws "connection is not secure" error in Mozilla Firefox. I checked it at my computer in firefox and it's working fully fine, so is it users problem that this error is thrown or can I do something about it on my site?




Pesky server error on Python web app

I've been having a problem with a website that I'm working on not attaching pictures to html emails. Thought I had it fixed but then every time someone tries to register on it I get a Server Error (500). I've only changed a couple of references so no idea what went wrong there, anyways error log is as follows:

2016-08-31 08:26:15,757 :Internal Server Error: /register/ Traceback (most recent call last): File "/home/asranet/.virtualenvs/testenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response response = self.process_exception_by_middleware(e, request) File "/home/asranet/.virtualenvs/testenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "./register/views.py", line 14, in index form.save(commit=True) File "/home/asranet/.virtualenvs/testenv/local/lib/python2.7/site-packages/django/forms/models.py", line 451, in save self.instance.save() File "./register/models.py", line 35, in save email_client(self, site_settings.site_name + "Conference Registration", "You are officially registered for AdWind 2017") File "./adWind/email_functionality.py", line 31, in email_client fp = open(os.path.join(os.path.dirname(file), f), 'rb') IOError: [Errno 2] No such file or directory: u'./adWind/static/Images/asranetLogo.jpg'

I checked and the file is there. No idea how to proceed, could really use some help. Thank you in advance!




Not able to access my web application through IPV6 IP

I have a web application running on Tomcat. I can access it through IPV4 IP but not through IPV6 IP.

netstat -anp | grep -i 8060

tcp 0 0 :::8060 :::* LISTEN 7216/java

The port 8060 listens to IPV6 protocol.

Also, through putty when i do a SSH to IPV6 IP, the error is

ssh: connect to host 2001:::*::43 port 22: Connection refused

I have tried providing -Djava.net.preferIPv6Addresses as an java opts, and enclosing the IPV6 IP into [] while opening it through IE11, but nothing works.

Please provide some info.




Developing an interface Page with dynamic content added by the user

I need to develop a program(interface Page ) to display the latest news of the company on an LCD , the news will be added dynamically and changed every day by the responsible user .

How can i do that ? is it like developing an ASP.net or HTML page ?if yes how i can run it on the LCD? and how can i make the content of the page dynamic "the content added by the User" ?

I need to know the Steps of doing that , any tutorials Since I am new in this field

any help would be appreciated.




mardi 30 août 2016

How to change design for mobile (Bootstrap)

I am currently working on building a website. I have designed a basic pricing chart for the site (using bootstrap) The problem I am having, is when I resize my window, the design gets mis-aligned.

Here is the code for the current design so far

<div class="background-pricing container-fluid">
    <div class="container">
        <div class="row">
            <div class="payment-method">We accept:  Cash and Checks with payment due on Fridays of each week.</div>
        </div>
<!--infants and children -->
        <div class="row">
            <div class="infants-box col-sm-6 col-md-6 col-lg-6">
                <div class="infants">Infants</div>
            </div>
            <div class="col-sm-6 col-md-6 col-lg-6">
                <div class="children">Children 2+</div>
            </div>
        </div>

        <div class="row">
            <div class="full-time col-sm-6 col-md-6 col-lg-2">Full Time</div>
            <div class="prices-left-box col-sm-5 col-md-3 col-lg-5">
                <div class="prices-left">$200 Per Week</div>
            </div>
            <div class="prices-right-box col-sm-5 col-md-3 col-lg-5">
                <div class="prices-right">$150 Per Week</div>
            </div>
        </div>
        <div class="row">
            <div class="full-time col-sm-2 col-md-2 col-lg-2">Up to 4 Hours</div>
            <div class="prices-left-box col-sm-5 col-md-5 col-lg-5">
                <div class="prices-left">$125 Per Week</div>
            </div>
            <div class="prices-right-box col-sm-5 col-md-5 col-lg-5">
                <div class="prices-right">$100 Per Week</div>
            </div>
        </div>
    </div>
</div>

As you can see, in full screen, the chart is legible, but when resized, the chart is unreadable with the "infants" and "children 2+" side by side.

How would I make it easier to read?




Anything wrong with using direct ASCII fonts on webpages?

Take this text as an example:

𝚃𝚘𝚝𝚊𝚕𝙿𝚛𝚘𝚝𝚎𝚌𝚝𝚒𝚘𝚗

If you make an HTML file copy and paste the above text directly in your text editor from StackOverflow, it will show up on the webpage with that font. Why isn't this the standard way for using fonts in HTML and instead most people just use font color when they could simply use ASCII?




Django Abstract User Error in Using Permission

I am making a custom user model using AbstractUser in django.contrib.auth.models.

everything was working fine. and when i wanted to make some changes in user_permissions of my SiteUser then django gave error that SiteUser has no attribute named 'user_permissions'

then I thought of extending PermissionMixin in django.contrib.auth.models to my SiteUser class to make changes in 'user_permissions' but now It is throwing error like -

project.SiteUser.user_permissions: (fields.E304) Reverse accessor for 'SiteUser.user_permissions' clashes with reverse accessor for 'SiteUser.user_permissions'. HINT: Add or change a related_name argument to the definition for 'SiteUser.user_permissions' or 'SiteUser.user_permissions'. project.SiteUser.user_permissions: (fields.E304) Reverse accessor for 'SiteUser.user_permissions' clashes with reverse accessor for 'SiteUser.user_permissions'. HINT: Add or change a related_name argument to the definition for 'SiteUser.user_permissions' or 'SiteUser.user_permissions'. project.SiteUser.user_permissions: (fields.E331) Field specifies a many-to-many relation through model 'project.SiteUser_user_permissions', which has not been installed.

P.S. - I have used AUTH_USER_MODEL='project.CustomUser'




What do we need to start working as a web developer?

I've been meaning to start working as a web developer for some time now. I studied programming at colege and I never finished my career, but I've continued to learn stuff and want to follow this path. Even though I've done some easy/quick jobs, I don't really know what's the point where I can go out to the market and say "Hey, if you want a website, I'm your guy". I'm really worried about clients asking for something I don't know, or something I think I know but I don't (That's even worse). So far I know programming's logic, html, css, I know some SEO, I'm learning javascript and I know how to use wordpress. I still plan to learn more and expand the tools I can use. But, in your opinion what is the minimun a web developer should know before starting to work with clients, or in a company? Please, if you may, make a little list of those things, I would really appreciate your opinions too.




Malihu jQuery custom content scroller pushing content to the side

I am using the Malihu jQuery custom content scroller plugin on a webpage. When I apply it to the <body> it pushes all of the content over to the left (about 30px). Is there a way to make the scrollbar go on top of the content instead? Thank you!

Here is the plugin: http://ift.tt/QGa3rv

Here is the code I use to apply it to the body (all inside a $(document).ready())

$("body").mCustomScrollbar({
       theme:"dark-3",
       scrollButtons:{
            enable:true
       }
});




Back button after redirecting to external page

I am working on a Ruby on Rails toy project. I have two main pages A and B. A has a form that takes input and does a post request. The result is being displayed at page B. Then there is the option to redirect to an external page (let's call it E) from B.

The problem is that if I click the back button from E, it doesn't go back to B but it fails as it doesn't find any parameters (form's text input from A).

Is this a common issue? How can I solve it?




htaccess - Redirect a url with multiple slashes (//) to single slash (/)

What is the .htaccess rule to redirect http://ift.tt/2cd4RMY to http://ift.tt/2cd4RMY, or http://ift.tt/2cd4JwM to https://domain.com/a/b/, and in general everything with more than one slash // to single slash /?




htaccess - Change RedirectPermanent Redirect to 404 With Minimum Redirects

The top section of the .htaccess file on our website look like below:

RewriteEngine On
RewriteBase /

RedirectPermanent ^/en-uk-ca/(.*)$ /
RedirectPermanent ^/en/uk-ca/(.*)$ /
RedirectPermanent ^/uk-ca/(.*)$ /
RedirectPermanent ^(.*)\.html$ /
RedirectPermanent ^/life/(.*)$ /
RedirectPermanent ^/life-graph/(.*)$ /


RewriteCond %{HTTP_HOST} ^111\.111\.111\.11
RewriteRule (.*) https://domain.com/$1 [R=301,L]

RewriteCond %{HTTP_USER_AGENT} libwww-perl.* 
RewriteRule .* ? [F,L]

RewriteCond %{HTTP_HOST} !^domain.com$ [NC]
RewriteRule ^(.*)$ https://domain.com/$1 [L,R=301]

RewriteCond %{HTTPS} !on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}  [R,L]

RewriteCond %{REQUEST_URI}  !\.(php|html?|svg|txt|xml|js|ico|png|jpeg|jpg|gif)$
RewriteRule ^(.*)([^/])$ https://%{HTTP_HOST}/$1$2/ [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* ./index.php

I want to put 404 instead of 302 for RedirectPermanent links such as ^/en-uk-ca/, /life-graph/, etc, and also redirect the www.domain.com to domain.com. Is the order of the redirects correct? Thanks.




Develop a web app on Controlled Documents traceability

I would like to develop a web application Controlled Document System using PHP & MySQL. It is an internal development project. 1. Password protected access to app and log-in history if modifications were made to it
2. Need to manage and keep Controlled Documents traceability visually by each revision 3. Categorize Controlled Documents such as SOP, WI, Forms, Operational text, memory joggers, official templates, Industry standards & specification, etc. 4. Group by Department and Customer specification requirements 5. User should able to tag the history or personalized favorites 6. Documents such as PDF, TEXT, MS Word, MS Excel, video, audio, Jpeg, etc.

Looked into few open application but did not meet my user requirements and we are in tight position & would like to save some $$$.

Any suggestion for web app development is appreciated.




Retrieve similarly named files from multiple directories using wget

I am trying to retrieve a file with the same name in multiple directories. The site I am trying to retrieve from has the following format:

http://ift.tt/2c9u8Vb

Where [folder1] and [folder2] vary. I have come up with the following command, which returns a set of empty directories:

wget -r -np "www.mywebsite.com" -A "/*/*/whatImLookingFor"

If I manually enter in a specific set of values for [folder1] and [folder2], I download the specific file without any problem. Ideally I want every file named "whatImLookingFor" in the a set level of the directory. Could anyone point out the source of my error? I'd greatly appreciate any help.




consolibyte quickbooks php to add simple xml

I'm using the awesome consolibyte framework for Quickbooks but I'm having trouble adding a simple request. I have the web connector set up and it successfully updates with no error, but nothing gets added to quickbooks. I'm testing with Keith's sample xml and I also tried my own xml that I know successfully inserts time through the Quickbooks SDK. It feels like I've tried a lot of the samples but nothing ever adds to quickbooks. Log files don't show errors. Any suggestions? Thanks.




Using Drupal for a large Website with several domains

I am designing a large website. The website is fairly large with many domains as: - downloads -Autos -Education -Lifestyle -Tutorials -and many more etc

There are many experienced programmers here I want to ask that should I design my website from scrach or use Drupal for it? please guide me




How to create perfect ring geometry in three.js?

I need to create perfect ring geometry in three.js. I am looking for something like this:

ring image

I spend more than a day to find how to do this, and I am stuck with code like this:

var scene = new THREE.Scene();
        var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 1000 );
        var renderer = new THREE.WebGLRenderer();
        var controls = new THREE.OrbitControls( camera, renderer.domElement );
        renderer.setSize( window.innerWidth, window.innerHeight );
        document.body.appendChild( renderer.domElement );
        ring = '';
        var loader = new THREE.TextureLoader();
        loader.load('img/water.jpg', function ( texture ) {
            var geometry = new THREE.TorusGeometry( 5, 1, 8, 1900 );
            ring = new THREE.Mesh(geometry, new THREE.MeshBasicMaterial({map: texture, wireframe: true}));
            scene.add(ring);
        });

        camera.position.z = 20;

        var render = function () {
            requestAnimationFrame( render );
            ring.rotation.y = 0.4;

            renderer.render(scene,camera);
        };

        render();




Has Anyone heard of a company called zone x productions?Is it true microsoft windows owns this company?

Hey guys i am interested in knowing if anyone heard of this digital marketing company called zone x productions owned by microsoft and i heard it provides web services,any one else heard of it?Give me some information on this company Zone X Productions Is A Digital Marketing Company Provinding Affordable Web Services To Small Business

Zone X Productions - Digital Marketing Company Official Website




Angularjs 1 - Show/update validation messages on submit click button only (does not change on user input)

In Angularjs 1 there are many examples of validation on submit OR on user input. In this project I need to update the validation messages on user clicks submit button only, i.e, the USER INPUT WILL NOT UPDATE THE VALIDATION MESSAGES (client spec).




What is Web Assembly? Why we need that?

Recently I came across a format called WebAssembly.

Definition on github: WebAssembly or wasm is a new portable, size- and load-time-efficient format suitable for compilation to the web.

I went thorough that page and google searches, still couldn't got it. Is there anyone who knows more about it.?




how to design a database for a forum web-app android

i need some tips!! i want to design an android app, basically the idea aim to design a big forum structured in category, in which users can post things(text, image, etc). as you can image, a forum-based application is made by topic, comments etc. I was wandering, what are the best practices to develop an app like that. is there a framework can help me? how i have to design the database?




Site access via www.abc.com v/s abc.com is causing problems with sessions

I have a site at godaddy. You may access it using a www prefix or not. It works fine either way UNLESS you happen to hit a link that uses/does not use the prefix. Then the session disappears. Is www.abc.com supposed to be the same as abc.com? If not, how do require the use of one or the other?




how to check whether there is a date in a given string using javascript

I want to search a date in a string ,like in string

"On 20/09/2016 , I really don't know what will happen"

I want to check whether there is a date in this string ? If yes ,show it on screen. I want to do it in javascript




"Uncaught SyntaxError: Unexpected token < " in first line

I know this question has been asked many times but I can't find a solution for my problem.

On my local machine everything is good, but when i upload files to the server (000webhost), i have six errors, and descripton of these errors is "Uncaught SyntaxError: Unexpected token <".

Thanks in advance.

The domain of my web site.




Video calling(webRTC?) with call routing for Europe?

i need your help!

I looking for a system with multiple agents where i can configure the routing myself. So like this:

Agent 1 (tablet with app that is only able to make calls by the press of a button) makes a call and based on the hour of the day the call goes to Agent 2 (Customer support) or Agent 3 (Manager).

The idea is to configure Agent 1 on a fixed tablet in a lobby, where they can call if they need help.

On top of this we need this to be installable (android?) apps, because we want the phone of Agent 2 or 3 to start ringing and auto opening a screen to answer the call.

So i have found onsip.com, but they don't offer their service in Europe and it's not exactly what I'm looking for i think.

Any help in the right direction is much appreciated! :)




Convert JavaFX desktop app to Web app

I have a Maven JavaFX based desktop App and I have to convert it to a dynamic web app in eclipse or any other IDE ( I am using Eclipse Neon-Java EE). I have tried with Project Facets (Right click on project name --> Properties --> Project Facets --> dynamic web app) I have generated Web Content files (Meta-INF and WEB-INF). In the project folder still appears the letter "M" and not the golobe icon. When I try to run it in Tomcat it shows a 404 error.

My project looks like this: Project Image

Can anybody help me to convert this JavaFX project to run on a browser?




Website is not working on mobile browsers

Can someone tell me why the following website works on a computer browser but NOT on a mobile browser? Anything in the html code that give a clue as to why?

http://ift.tt/2bCkaui




Google (And not TinEye) reverse image search API

Any news about an official API for the reverse image search functionality of Google? TinEye is good, but it is not as good as Google!

I am thinking of creating a workaround, something like this: Google reverse image search using POST request

Any other way?




How to create a google earth zoom in/out effect in jQuery?

I have been looking around for different ways to reproduce a google earth zoom in/out effect when someone clicks an area of my image map.

The only thing I have found was this discussion: Create Google Earth zoom in but the link which refers to a google API, which is no longer being supported...

Could someone explain how I can create such an effect?




Lodash - Chunks of an Array of objects using an object property as the "delimiter"

Given the following array:

var arr = [{id:1 , code:0},
           {id:1 , code:12},
           {id:1 , code:0},
           {id:1 , code:0},
           {id:1 , code:5}];

How can I use lodash, to split the array each time code is not equal to 0 and get the following results?

[
 [{id:1 , code:0},{id:1 , code:12}],
 [{id:1 , code:0},{id:1 , code:0},{id:1 , code:5}]
]




Assocative array working in Codeignator

I am learing Codignator. One question in my mind is teasing me how this is working internally.

I have a controller like TestController and I have passed and assocative array to my view named TestView. Assocative array is like.

$options = array(
          'small'  => 'Samsung',
          'med'    => 'Apple',
          'large'   => 'HTC',
          'xlarge' => 'Nokia');   

I am loading the view with above array.

$this->load->view('TestView', $options);

inside the view I can access these Assocative array Index as vairables. Like

echo $small;
echo $med;
echo $large;
echo $xlarge;

I am confused how this is working.




Extract html data after logging into website from android app

I recently started to learn to develop apps for android, but I'm stuck for quite a while on 1 problem: I want to log from my app to a website (http://ift.tt/1kewBwx) and download some data from it, so I can use it later in my app. I have red different articles and tried different things but in the end nothing worked. The closest thing that I got as a result was receiving the source code of the login page( tried this Android: How to programatically login to website and retrieve data from it?) Can someone tell my what I am doing wrong or give an advice how I should approach this ?




css - position img under h6 that will not be affected by h6 size

I have an img under a h6 in a template, and I have multiple appearances of this template.

The h6 size could be 1 line, two lines etc. As for now I have the img css like that:

ul.hourly li img {
    padding-top: 20px;
}

The problem is obviously that if the h6 size is 2 lines in one of the templates and on other ones its 1 line, the img's will not be on the same height.

How can I ahve the img with a fixed location, no matter what the h6 size is?




How to autoselect previously uploaded file in html file type element when the file selection window is cancelled?

I have following html and javascript codes.

<input type="file" id="file" onchange="run()">

function run() { alert(document.getElementById("file").value); }

Here, when user clicks the "browse" button and selects a file, the javascript alerts out the file selected by the user. The issue is, after selecting a file when the user again clicks the "browse" button but clicks the cancel now without making any selection, the javascript code alerts nothing. I mean even though user cancels the window the javascript should still be alerting out the previously selected file.

And I get this issue only on chrome, not in firefox or IE. The code is very basic so the code is not the problem i guess. I think it is a cross browser problem. Any idea ? Thanks in advance.




How to use Python Selenium to get the data

The link is here: http://ift.tt/2bycOfG I can already open this website using selenium webdriver in python. Now I'm trying to get the battery type from this website. enter image description here




lundi 29 août 2016

If that possible to record and repeat what have done by user at any website with selenium webdriver C#?

(Without using selenium IDE)

May I know is that possible if I want develop a software that will repeat back what was user done before this in a website?

For example: user had click a button and insert text into textbox in a website. May I know how can I repeat back what was user done just know with using c#.

My Logic: Can I get the ID of web element that was used/clicked by user in a website with using c# without view to the source code of that website so after that I can use back the ID to repeat the actions that had done by user just now?




How to centre class='wrap'

I'm currently working on my portfolio page and I've encountered some problems. How can I centre the portfolio part and still maintain its appearance (3 columns)?

HTML code:

<div class="wrap" style="background-color:#FAFAFA; height: 850px;">
      <div id="portfolio-container"class="portfolio" style="position: relative; height:850px; left:6%; right: 6%;">
        <div class="word" style="position: absolute; left:355px;">
          <h1> P O R T F O L I O </h1>
        </div>

        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="position: absolute; left: 7px; top:100px;">
          <div class="hovereffect">
            <a href="websitelink">
              <img class="img-responsive" width="300" height="250" src="http://ift.tt/2c6d56C" alt="">
              <div class="overlay">
                <h2>itemname</h2>
              </div>
          </div>
        </div>

        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="position: absolute; left: 325px; top:100px;">
          <div class="hovereffect">
             <a href="websitelink">
              <img class="img-responsive" width="300" src="http://ift.tt/2bNxLUC" alt="">
              <div class="overlay">
                <h2>itemname</h2>
              </div>
          </div>
        </div>

        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="position: absolute; left: 640px; top:100px;">
          <div class="hovereffect">
             <a href="websitelink">
              <img width="300" class="img-responsive" src="http://ift.tt/2c6dDJx" alt="">
              <div class="overlay">
                <h2>itemname</h2>
              </div>
          </div>
        </div>

        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="position: absolute; left: 7px; top:370px;">
          <div class="hovereffect">
             <a href="websitelink">
              <img width="300" class="img-responsive" src="http://ift.tt/2bNzMQi" alt="">
              <div class="overlay">
                <h2>itemname</h2>
              </div>
          </div>
        </div>

        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="position: absolute; left: 325px; top:520px;">
          <div class="hovereffect">
             <a href="websitelink">
              <img width="300" class="img-responsive" src="http://ift.tt/2c6d4zz" alt="">
              <div class="overlay">
                <h2>itemname</h2>
              </div>
          </div>
        </div>

        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12" style="position: absolute; left: 640px; top:350px;">
          <div class="hovereffect">
             <a href="websitelink">
              <img width="300" class="img-responsive" src="http://ift.tt/2bNytRr" alt="">
              <div class="overlay">
                <h2>itemname</h2>
              </div>
          </div>
        </div>

      </div>

CSS Code (Didn't include the hover image part)

.portfolio {
  list-style: none;
  font-size: 0px;
  width: 96%;
  margin-left: 15.5%;
}

Thank you very much for your help.




Call ReactDOM.render in parent component `componentDidMount` lifecycle

I am just curious about this. I write a demo below:

class ChildComponent extends React.Component{
    componentWillMount() {
        console.log('ChildComponent will mount');
    }
    componentDidMount() {
        console.log('ChildComponent did mount');
    }
    render() {
        console.count('ChildComponent render');
        return <div>
            ChildComponent
        </div>
    }
}

class ParentComponent extends React.Component{
    componentWillMount() {
        console.log('ParentComponent will mount');
    }
    componentDidMount() {
        console.log('ParentComponent did mount')
        ReactDOM.render(
            <ChildComponent/>,
            document.getElementById('content')
        )
    }
    render() {
        console.count('ParentComponent render');
        return <div id='parent'>
            ParentComponent
            <div id='content'></div>
        </div>
    }
}

ReactDOM.render(
  <ParentComponent />,
  document.body
)
<script src="http://ift.tt/290WjWg"></script>
<script src="http://ift.tt/28SLhWn"></script>
//normal way:
//ParentComponent will mount
//ParentComponent render: 1
//ChildComponent will mount
//ChildComponent render: 1
//ChildComponent did mount
//ParentComponent did mount

//ReactDOM.render way:
//ParentComponent will mount
//ParentComponent render: 1
//ParentComponent did mount
//ChildComponent will mount
//ChildComponent render: 1
//ChildComponent did mount

It seems works! But I found the difference between the two ways. The lifecycle execute order is different. But, is there any other difference? I mean, maybe there is a case that the ReactDOM.render way will cause a trouble or error.

I also found that if you inspect the element in browser use develop tools, you will find that the data-reactroot property both in ParentComponent and ChildComponent root node. And the normal render way, it just disappear in ParentComponent root node.




Load URL without graphical interface

In Python3, I need to load a URL every set interval of time, but without a graphical interface / browser window. There is no JavaScript, all it needs to do is load the page, and then quit it. This needs to run as a console application.

Is there any way to do this?




Is there any tool that presents system dependancy visually?

Let’s say a company has 5 internal systems that are tightly coupled (CRM, external API services, CMS, etc..) Is there any tool that can represents how these system are linked together? Which system is depended on what?




Using steamlytics api to echo price of item

Hello I am trying to echo the "avrage_price" price of a item but i don't know why my code isnt working, Help would be great. here is my code,

($name is a valid variable that when i echo works)

(i put myKey where i would normally put my key to hide my key)

    $apiUrl = "http://ift.tt/2bvYK7s";
    $jsonApi = json_decode(file_get_contents($apiUrl));

    echo $jsonApi['avrage_price'];




Swift: Load NSData from URL after webpage finished loading

I have an NSData instance from a URL. The point is I have a class that takes NSData as a parameter and displays the HTML code of the webpage.

When you view the webpage in the browser, it first loads. After that a progress bar appears within the webpage. After the progress bar completes, the webpage displays additional content.

What I want is for NSData to wait for the progress bar to finish in order to load the additional content. Sort of delaying the initialization of NSData.

Any idea how could I achieve that?




Cannot navigate to my webpage without "www." what am I missing?

I made my first deployment with RoR, Heroku and GoDaddy hosting. I am able to navigate with "www.mypage.com" but I cant just go to "mypage.com". The page doesn't even load and there is no error message. Did I make a mistake in my deployment or is it something with the connection of GoDaddy and Heroku?




Making a search box that can find a color in an uploaded image

I HAVE TRIED EVERYTHING!!! so what I have so far is to make the user upload an image, but I still can't figure out how I could make the search box find the color on the image and put a yellow dot on it.

so here is an example that I found online: file:///C:/Users/denni_000/Desktop/Project/onlinesoftware/ki/html-color-codes.info/index.html

now here is what I have so far:

<label>Image File:</label><br/>
<input type="file" id="imageLoader" name="imageLoader"/>
<canvas id="imageCanvas"></canvas>

<script>
var imageLoader = document.getElementById('imageLoader');
imageLoader.addEventListener('change', handleImage, false);
var canvas = document.getElementById('imageCanvas');
var ctx = canvas.getContext('2d');


function handleImage(e){
var reader = new FileReader();
reader.onload = function(event){
    var img = new Image();
    img.onload = function(){
        canvas.width = img.width;
        canvas.height = img.height;
        ctx.drawImage(img,0,0);
    }
    img.src = event.target.result;
}
reader.readAsDataURL(e.target.files[0]);     
}
</script>




Grunt livereloading need extra line?

I was using Grunt for my projects, just today something happened and it stopped working, after few hours I found out that I have to add this to every page

<script src="//localhost:35729/livereload.js"></script>

Everything is working now but I can't figure out what happened, if I go to use my previous projects it is working fine without any extra lines of code.

Does someone might know what could happened and why I need to add that script line?

My grunt file is

module.exports = function(grunt){
grunt.initConfig({
pkg:grunt.file.readJSON('package.json'),

watch:{
  options:{livereload:true},
  files:['public/**','server/**'],
  tasks:[]
},
  express:{
    all:{
      options:{
        port:8000,
        hostname:'localhost',
        bases:['./public'],
        livereload:true 
      }
    }
  }
});
grunt.loadNpmTasks('grunt-contrib-imagemin')
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-express');  
grunt.registerTask('server',['express','watch']);

};




Web-run bug in visual studio2015

I opened Web a project in visual studio -my code is based on angular,html and css.

sometimes when I run the code on my Chrome browser I cant see my recent changes of my code,and I see only the old code.

I think the problem is the caching on my browser,but I don't sure about that.

Hope that someone has a answer to my problem...

Thanks.




c# webbrowser website has script errors appears blank

i am trying to visit a website (miksike.ee) in a visual studio c# web browser, but when i test it, a lot of script errors appear and the wabsite looks like this: enter image description here i have done some research and meybe this has something to do with visual studio using an old version of internet explorer, i tried to find some anwsers but couldn't (the website works fine in chrome)




Database not being updated because of session, update query gives no error.

I'm currently working on a php user admin system for work. I'm able to create new users. I'm able to update the user account that I'm logged into--first name, last name, email, and password. I created a page that generates users information in a table. It shows user id, username, first name, last name, email address with an delete and edit link. The delete script works. The edit link goes to a form so I can update user info. The problem I'm having is: when I update the users information it's not updating it in the database. I can only update users information if I'm logged as that user. I'm using sessions, and I think it has something to do with my issues. Here's the code. This script is run after I press submit to update user information. Any help would be appreciated. Thanks.

<?php


require("connect.php");

if(empty($_SESSION['user']))
{

    header("Location: ../hound/login.php");


    die("Redirecting to ../hound/login.php");
}


 $array_value = array(
        ':email' => $_POST['email'],
        ':first_name' => $_POST['first_name'],
        ':last_name' => $_POST['last_name'],
        ':id' => $_POST['id']
  );



     $query = "UPDATE users 
        SET 
        email = :email,
        first_name = :first_name, 
        last_name = :last_name

        WHERE
          id = :id
    ";


       try
    {

        $stmt = $db->prepare($query);
        $result = $stmt->execute($array_value);
    }
    catch(PDOException $ex)
    {

        die("Failed to run query: " . $ex->getMessage());
    }



    header("Location: users.php");


    die("Redirecting to users.php");

   ?>




developping with web technologies for mobile platform and MIDI protocol

I would like to develop mobile application with unique technology for delivery in iOS, Android and .NET like cordova or Ionic or others.

BUT

I want to work with MIDI protocol (musical technology protocol). Is this possible to use just one unique technology for working with MIDI protocol on 3 differents platform ?

Obviously, already MIDI protocol work with each of this platform like iOS, Android and .NET but with their respectively official low level langage brand (iOS, .NET and Java).

Anyone work with web technologies and MIDI protocol ?




c# - Cant get a website output

I'm trying to get a output from http://ift.tt/2cmtpnZ i will get all items with regex but my request is empty. I'm trying to get outpput with fetchrequest method

Fetch Request:

    private string FetchRequest(string inpUrl, string inpMethod, string inpReferer, string inpHost, string inpAccept, NameValueCollection inpNvc, bool xml, bool autoRedirect)
    {
        using (var response = Request(inpUrl, inpMethod, inpReferer, inpHost, inpAccept, inpNvc, xml, autoRedirect))
        {
            _cookies.Add(response.Cookies);
            using (var responseStream = response.GetResponseStream())
            {
                if (responseStream == null) return null;
                using (var reader = new StreamReader(responseStream))
                {
                    return reader.ReadToEnd();
                }
            }
        }
    }

Request method

    private HttpWebResponse Request(string inpUrl, string inpMethod, string inpReferer, string inpHost, string inpAccept, NameValueCollection inpNvc, bool inpXml, bool autoRedirect)
    {
        var request = (HttpWebRequest)WebRequest.Create(inpUrl);
        request.Accept = inpAccept;
        request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
        request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36";
        request.Timeout = 20000;
        request.Headers.Add("Accept-Language", "de,en-US;q=0.7,en;q=0.3");
        request.AllowAutoRedirect = autoRedirect;
        request.CookieContainer = _cookies;
        request.Method = inpMethod;
        //Volatile variables

        if (inpHost != "")
        {
            request.Host = inpHost;
        }

        if (inpReferer != "")
        {
            request.Referer = inpReferer;
        }
        if (inpXml)
        {
            request.Headers.Add("X-Requested-With", "XMLHttpRequest");
            request.Headers.Add("X-Prototype-Version", "1.7");
            request.Headers.Add("Cache-Control", "no-cache");
            request.Headers.Add("Pragma", "no-cache");
        }

        if (inpMethod != "POST") return request.GetResponse() as HttpWebResponse;
        var dataString = (inpNvc == null ? null : string.Join("&", Array.ConvertAll(inpNvc.AllKeys, key =>
            HttpUtility.UrlEncode(key) +"=" + HttpUtility.UrlEncode(inpNvc[key])
            )));
        if (dataString == null) return request.GetResponse() as HttpWebResponse;
        var dataBytes = Encoding.UTF8.GetBytes(dataString);
        request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
        request.ContentLength = dataBytes.Length;
        using (var requestStream = request.GetRequestStream())
        {
            requestStream.Write(dataBytes, 0, dataBytes.Length);
        }
        return request.GetResponse() as HttpWebResponse;
    }

My variables

    public List<Item> AllListedItems(TradeType SellOrder)
    {
        List<Item> orders = new List<Item>();
        var containsItems = true;
        var baseUrl = "http://ift.tt/2bMuYXd" + _stackUser + "&page=";
        var page = 1;
        const string accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
        const string host = "backpack.tf";
        while (containsItems)
        {
                var url = baseUrl + page;
                var responseBody = FetchRequest(url, "GET", "", host, accept, null, false, false);
                        .
                        .
                        .

Fetchrequest returns empty string.




How do you run python scripts on a webpage? [on hold]

I have a python script that pulls data from some databases and displays a graph. The script already has a user interface to customize the graph as they please. I want to be able to run the script on a webpage and have the graph show up. Is there a way to easily do this? I don't care about how nice it looks right now.




I need to know if vwo(visual website optimizer) is known to be a drawback with regard to slowing down website load time in any manner?

Visual website optimizer is a A/B testing tool which can help one site owner to analyze his site with a modified of that. It puts a simple code in your website and make a new version of your web page.Then it show one version of your webpage to 50% of your visitors and another ver to rest of the 50%. This way the owner can analyze which ver of the site is generating more revenue & dump the other one.

So my question is can vwo reduce the site loading time somehow?Or what is the drawbacks of using vwo in a website?




Do all servers need to use the HTTPS protocol or just public facing servers?

I have a front end web server running over HTTPS - this is public facing - i.e. port is open.

I also have a backend API server that my webserver makes API requests to - this is public facing and requires authentication - port is open.

These 2 servers run over HTTPS.

Behind the API server, there are lots of other servers. The API server reverse proxies to these servers. Ports for these other servers are not open to incoming traffic. They can only be talked to via the API server.

My Question ... Do the "lots of other servers" need to run over HTTPS or, given that they cannot be accessed externally, can they run over HTTP safely instead?

I thought this would be a common question but I could not find an answer to it. Thanks. If this is a dupe please point me to the right answer.




Converting to Roman Numerals in Javascript - Weird bug

function convertToRoman(num) {

  var thisMap = {

  1:[1],
  2:[1, 1],
  3:[1, 1, 1],
  4:[1, 5],
  5:[5],
  6:[5, 1],
  7:[5, 1, 1],
  8:[5, 1, 1, 1],
  9:[1, 10],
  0:[0]

  };

  var numMap = {

  1000:"M",
  500:"D",
  100:"C",
  50:"L",
  10:"X",
  5:"V",
  1:"I"

  };

  numArr = num.toString().split("");

  var thisIndex = 1;

  var tallyArr = [];

  for (var i = numArr.length - 1; i >= 0; i--) {

   tallyArr.unshift(thisMap[numArr[i]]);

  }

  thisIndex = Math.pow(10, tallyArr.length - 1);

  checkArr = [];

  <<<BUG HERE>>> 

  for (var x = 0; x < tallyArr.length; x++) {

    for (var y = 0; y < tallyArr[x].length; y++) {

      tallyArr[x][y] *= thisIndex;

    }

    thisIndex = thisIndex / 10;

  }

  <<</BUG HERE>>>

  var finalArr = [];

  for (var a = 0; a < tallyArr.length; a++) {

    for (var b = 0; b < tallyArr[a].length; b++) {

      finalArr.push(numMap[tallyArr[a][b]]);

    }

  }

  finalAnswer = finalArr.join("");

  return finalAnswer;

}

convertToRoman(88);

So this is my function for converting a number into a Roman Numeral in Javascript. It basically formats every number into the right format using thisMap, then uses thisIndex to multiply by either 1000, 100 or 10, and then compares to numMap to get the correct Roman Numeral.

It seems to work in most of the test cases, except with 44, 99, or 3999.

In these cases, it seems to multiply the numbers by the wrong amount, so 44 becomes XLXL, when it should be XLIV.

I think the bug is between the <<>> tags I've inserted, because that is where the numbers seem to be multiplied wrong.

However, I can't spot the problem.

Thanks.




I have a html file(which is my cv) in my disk and i need a web link for it to give it to a recruiter

I tried uploading to some file hosting sites, but all I get is a download link. I need a web page, which when opened will display my html page. Locally, my Url is file:///C:/Users/Srinath/Downloads/My%20CV%20updated.html




Any way to prevent bot attacks

I have a site and hosting it on apache. I store IPs of every user who visits my page and sometime when I check last visited users I find that one particular IP visited more than 50 pages in a minute, some time I check IP info and ISP for it is normally Amazon, google , facebook, digital ocean etc. How can I prevent these bots to visit my site?




calendar start on saturday php

i'm creating a calendar in php, but i can't start it on the saturday, i mean i would like a table who begin the saturday and finish the friday. i'm stuck :(

echo "<table class='table tableDisplay".$currentMonthNumber." table-bordered '>";
echo "<tr>
    <td>Saturday</td>
    <td>Sunday</td>
    <td>Monday</td>
    <td>Tuesday</td>
    <td>Wednesday</td>
    <td>Thursday</td>
    <td>Friday</td>
</tr><tr>";
for ($i=1; $i <= $nbOfDaysInCurrentMonth ; $i++) {
    $p = date('w', mktime(0,0,0, $calendrier_date_mois, $i, $calendrier_date_annee));

    if($p == 5){
        echo "</tr><tr>";
    }
    echo "<td>".$i."</td>";
}
echo "</table>";




need to add dashed padding in the side of paragraph

 <div class="search">
        <p>SEARCH</p>
    </div>

enter image description here

I am trying to add a dashed lateral padding like in the image.Only in the sides of the text.Is there any way I can do that ?




stackowerflow.com Account Suspended

I try to access: http://ift.tt/2bx9yww.

It will redirect to: http://ift.tt/2buDQ66

This Account has been suspended. Contact your hosting provider for more information.

From other links I can log in, hence the account is not suspended. What is here, how to solve it?




ios9 cannot open the page when launch the local ios app by browser

  if (isIos) {
        if (isIos9) {
                window.location = 'bdwm://';
                iosGo();
            } else {
                createIframe();
                iosGo();
         }
    }
  function createIframe() {
        var iframe = document.createElement('iframe');
        iframe.style.cssText = 'display:none;width:0;height:0';
        document.body.appendChild(iframe);
        iframe.src = 'bdwm://';
    }
  function iosGo() {
        var t = Date.now();
        setTimeout(function () {
            if (Date.now() - t < 600) {
                location.href = "http://ift.tt/RFSNFS....."//the iOS app url
            }
        }, 500);
    }

==============================================

I want to solve this question "when exists your app on your iPhone ,you can first launch the local your app,but when not exists,you must go to download the iOS app".

The above is my code. When in iOS 9.3,the app will alert the dialog"cannot open the page because the address is invalid", how can i solve it?Thanks!

enter image description here




Can we execute automated scripts from TFS Web Portal?

Can we execute automated scripts from TFS Web Portal? Option only available for Manual test runs. Currently VSTS 2012 in use.




How to get innerHTML including data attributes

I'm using document.body.innerHTML to get a text version of the HTML so I can store it and reload it later using jQuery's append. It works fine but it isn't saving the data-* attributes that I'm storing in the HTML nodes. Is there a method that can get me a string of all the innerHTML including this data attributes?




Format 18001234567 as 1800-123-4567 using a CSS

HTML:
<p class="mystyle">18001234567</p>

CSS:
.mystyle{
     /* What should I put here */
}

So that it displays it like this 1800-123-4567




Application is logging out frequently in Spring flow

we are facing one issue in which IE(10 and 11) is aborting request intermittently. Once request is aborted by IE after that, user is getting kicked out from application. User need to re login the application for continuing their work.

As we are using Spring webflow in our application, for each of user action(request) Spring generates a unique Snapshot ID(pattern: e#s#, example: e1s16). We observed all those requests which got aborted have same snapshot ID which is in in previous request. we are not sure whether because of this redundant snapshot id we are getting this problem or not. Any lead will be helpful.

I am attaching screenshot of the developer tool when we got user kicked out issue.enter image description here




Get Date, Month and Year separately in HTML

I'm new to html. I'm asking about input type of date month and year as the title. I want to get date, month and year separately from each other like this: Date: (a drop down list for date) Month: (a drop down list for month) Year: (a drop down list for year). Thank you!




Should i choose Dart soon for my futur web developement?

You probably know that Google is work on new OS fushia. I read that a good part of it will be made with Dart langage. Is it a good choice to start new projects with it instead of javascript, typescript ... What do you think about it's future, because I'm sure Dart is very popular ?




android ksoap2 invalid stream or encoding exception

I am having a difficulty to find a solution to my problem. I will not able to figure out or find the real cause of the problem. Basically when I call a java web service I am having an error saying "invalid stream or encoding exception: java.net.SocketTimeoutException caused by : java.net.SocketTimeoutException"

Here is how I call the service:

try
{
    final String METHOD_NAME = "METHOD_NAME";
    final String SOAP_ACTION = "NAMESPACE" + METHOD_NAME;
    final String URL = HTTPURL;
    SoapObject request = new SoapObject("NAMESPACE", METHOD_NAME);
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request);
    HttpTransportSE httpTransport = new HttpTransportSE(URL, (int) 10000);
    httpTransport.call(SOAP_ACTION, envelope);
    resultsObject = (SoapObject) envelope.bodyIn;
    httpTransport.getServiceConnection().disconnect();

    if (resultsObject != null) 
    {
        ServiceResult serviceResult = new ServiceResult();
        int propertyCount = resultsObject.getPropertyCount();
        if (propertyCount > 0) 
        {
            //PROCESS 
        }
    }
}
catch(Exception e)
{
    String mess = e.getMessage();
}

I appreciate any help.




dimanche 28 août 2016

High Performance Website [on hold]

I need your help to chose technologies for fast performing website where I am looking to develop 1. A single Page Website which will have a moderately Complex UI i.e. Lists, a Google Map and 2-3 grids to show data with timelines 2. will display the current state of Records in DB and also have forms to modify the rows. i.e It will has Orders from Customer and Customer list as List on UI so one can double click to open customer form and update contact info and same for order also to put in some comments etc. 3.I wish website to receive real time update of these orders and update the UI List on website since the order data can be updated via integration also and there could be filters user has applied on order. I am looking to use SQL server as DB. Please suggest best architecture for such application.

My home work: I was initially planning to have a Blank asp.net page with JQuery or Java script based controls where on submit or time refresh we can post JSON data or read JSON data from another component -- A .NET Web service which will connect to DB and JSON Serialize data for UI.

I am new to Angular however I can still go ahead and learn if that is better approach in long term. I also heard of Server side javascript with Node.js

TIME is NOT the constraint here so i wish to have a rock solid design to start with (at least as of today since new better techs will evolve in future)

Any ideas to make it better and faster will be appreciated

Cheers




Should we check CSRF token for read only actions

I have heard many people suggest that CSRF handling is mandatory for actions performing write operations but its optional for action performing read only operations?

If yes please share an example how action which only performs read only operations can be exploited using CSRF.




How to implement an advance web search with php

It is a common thing with search engines and also on stack overflow, to bring results from a search that are based on what a user types. Now what is searched for must not be exactly the same as the result it would bring and even when the user searches with a wrong spellimg it corrects and finds it, its like an advanced search or so, i would like to find out if it can be implmented with php or probably javascript and how




How could I make a corner detector for an image with a square for my website?

so what I want to be able to do is for the user to upload an image and the website will have to put a dot on the top left corner.

Thank you




What are the licenses of Firebase web and Android SDK-s

What are the licenses of Firebase web android SDK-s ?

I was looking in places like http://ift.tt/2bZW0uV but haven't found it so far...




float does not work when parent have flex display

here is a sample html:

<body>
<footer style="display: flex;">
    <span style="text-align: right;float: right;">
        <a>foo link</a>
    </span>
</footer>
</body>

i want to set/move text(foo link) position in right of the footer element. and i need footer display remain flex. but when i set it to flex, float:right for span don't work anymore.
http://ift.tt/2bJpHCm




Python web application

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.




JavaFX WebView - get document(content) height

I am actually developing a java chat application, to display the messages i use a Panel which has a Label, a Separator and a WebView as children. To properly size the WebView and make it fit its content i am using JavaScript

private void sizeWebViewProperly()
{
    String heightText = messageContainer.getEngine().executeScript("document.height").toString();
    messageContainer.setPrefHeight(Double.valueOf(heightText.replace("px", "")));
}

However , for every letter that is inside of the webview it adds a lineheight to the website height.

enter image description here

That is the css i am using:

body
{
    word-wrap: break-word;
}

Does anyone know why this happens? Instead of document.height i have already tried document.clientHeight, document.offsetHeight and document.scrollHeight.




Open the web between hours

actually the code appears every 4 hours but appears 1 code to every people to enter to the site, i want just appear 1 random code every 4 hours for who takes it win it

A friend told me is because the sesión_start(); but really no idea about php so, im here asking for your help :D

<?php

ini_set("session.use_cookies","1");  
ini_set("session.use_only_cookies","1");  
ini_set("session.use_trans_sid","0"); 
session_start();

$codetime = 240; // Cada cuantos minutos se puede usar la pag.
$szBuffer = "amx codes";
$gCanUse = 1;

if( isset($_SESSION["amxxcodes"])) 
{
if( ($_SESSION["amxxcodes"]+($codetime*60)) > time() )
{
    $szBuffer = "Aún no puedes revelar el código, intenta más tarde";
    $gCanUse = 0;
}
else
{
    unset($_SESSION["amxxcodes"]);
}
}

if( $gCanUse ) 
{
$db_host = "localhost"; // SQL HOST
$db_user = "test"; // SQL USER
$db_pass = "test"; // SQL PASS
$db_name = "Codes"; // SQL Database Name
$db_table = "data"; // SQL Table name

$APS_MIN = 1; // Monto minimo de aps que se pueden otorgar
$APS_MAX = 3; // Monto maximo de aps que se pueden otorgar

$conexion = mysqli_connect($db_host, $db_user, $db_pass, $db_name);

if (!$conexion) 
{
    die("Connection failed: " . mysqli_connect_error());
}

$code = generateRandomString( rand(12,25) );
$aps = rand( $APS_MIN , $APS_MAX );
$query = 'INSERT INTO `'.$db_table.'` (Code, Aps, Used) VALUES ("'.$code.'", '.$aps.', 0)';

if (mysqli_query($conexion, $query) ) 
{
    $szBuffer = "amx_code ". $code;
    $_SESSION["amxxcodes"] = time();
} 
else 
{
    echo "Error en consulta: " . mysqli_error($conexion);
}

mysqli_close($conexion);
}

function generateRandomString($length = 10) {
    return substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length/strlen($x)) )),1,$length);
}
?>


<!DOCTYPE html>
<html lang="en-us">
<head>
<style>
.text {
color: rgb(255, 225, 0);
text-shadow: 0px 0px 4px rgb(255, 108, 0);
}
</style>
</head>
<body bgcolor="#212121">

<center>
<table border="0" cellpadding="5" cellspacing="0" style="box-shadow: 0px 0px 8px white; border-radius: 5px; width: 50%;min-width: 50%;">
<tbody style="text-align:center;color:white;">
    <tr style="font-weight: bold;background-color: black;">
       <td> 
            <?php 
            if($gCanUse)
            {
                echo "AMXX Code escrito por Kikizon
                    <br><br>
                    Usa el siguiente código en consola del servidor y obten puntos napalm
                    <br><br><br><br><br><br><br><br><br>
                    <div class='text'>
                    ".$szBuffer."
                    </div>
                    <br><br><br><br><br>";
            }
            else 
                echo $szBuffer;
            ?>
       </td>
    </tr>
 </tbody>
</table>
</center>

</body>
</html>




Google Rich Snippet not show in search result but showed in local search

I'm added Google rich snippet to my product page with no Error.

The rich snippet appear in local Search:

Look at the first result

But the problem is the rich snippet disappear in Search Result:

Sample Search Result

So is there any solution to fix that problem?

Thanks




Create a currency converter api in c#

Create an API that provide currency conversion functionality through some pre-configured sources like XE, Yahoo, Oanda. Each of these source expect FromCurrency, ToCurrency, Amount, Date parameters. Consider following points in the final solution.

a.) A request to the API will include the source and other parameters that are required by the source to process the request successfully.

b.) You can configure to disable any source at any time, without having to deploy the application again.




samedi 27 août 2016

403 Error on an image I can view in browser

So when I try to use the image in an img tag it doesn't show and I get a 403 '' But when I open the image in a browser(even incognito so I'm signed out of everything) I can view it fine, any idea why? Thanks.




How to make image gallery website easy to load?

I have a art relating website in which paintings of artist is shown..as there could be many images on website it is making my website loading procedure slow although i have compressed imaged its quality has been compromised for better access of website but this is of no use any suggestions.

    1) I have compressed images.
    2) Each page size is in Kb that some are even 15kb
    3) maximum uploaded image size is 312Kb




sending data throw session without using html FORMS, GETS or POSTS

hi everyone is there some way to send some PHP data using session or cookies without using forms ?? I have a login form with a welcome message that shows the name of the client linked to a page where I wanna show some information about the client using his email, so ... I will be glad if someone can help finding a form to sent the login info to the page where I wanna show that information without using other forms !!!




HttpServletResponse write is very slow when response size is large

HttpServletResponse write is very slow when response size is large. It is taking 3 minutes to write the response when the response size is around 40 MB.

PrintWriter writer = response.getWriter(); response.setContentLength(xmlResponse.getBytes().length); writer.write(xmlResponse);




How to use sqlite in web?

How do I use sqlite with php?
I googled about it but everything I found is limited in command line :(
PHP isn't the problem. Problem is how to export the database to use with php?
Thanks




Byte-Serving Implementation - HEAD verb

How would/should the various meta response headers (Content-MD5, Content-Length, ...) behave in regards to byte serving on an HTTP HEAD request?

W3 describes the HEAD verb as follows :

The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself.

Therefore if I were to send the following request on a byte-serving enabled server :

HEAD /test.txt HTTP/1.1
Host: 127.0.0.1:8000
Range: Bytes=1
Connection: close

... I would expect the byte serving to be applied on the implied GET request and an appropriate HEAD response would be generated with a Content-Length : 1.

My question is : How does/should a server respond to a request like the one above?




Website appears 180 degrees rotated on iPhone

I have a pretty confusing problem. I have developed a website, which can be accessed on shooja.com . It is using zepto instead of jQuery, and GSAP for animations (Although I don't think these are related to the problem). The code is not compressed so it can be checked completely via web inspector. It appears perfectly on Firefox, Chrome, Safari on desktop and even IE. It is also OK on android browser. But on iPhone ( I have checked it on a 5 and a 5s ), it appears 180 degrees rotated and not scaled down. I can imagine the reason of scaling to be the meta tags, but the rotation doesn't make any sense. Any help is appreciated.




Edit Js and Html Files Through Browser - Client Side

I am trying to understand which files everybody can edit through the browser to understand what the risks of running some code in the client-side.
For example I saw in one site(In Chrome):


enter image description here


The gray file is read only file and the yellow one can be edited.
My questions are:

1.What's the difference between the yellow and the gray? why the gray is read only?
2. Is it still possible to edit the yellow one in other ways? Maybe not through the browser? Whats the options to edit files in the client side?
3.Which files can be edited and which not?(js,css,html,aspx... What's all the options)
4.Is there a way to know if someone change the html or js files and look at the changes he did? save logs of the changes or something like that?




JavaFX App Runtime Error on webpage but not on IDE

Basically my javafx application works fine on the IDE and on locally executed jar file but on the automatically generated .html page from netbeans it doesn't. I also get absolutely no indication as to what is wrong. This is the only message that I get when I click on "Click for details."

    Java Plug-in 11.101.2.13
Using JRE version 1.8.0_101-b13 Java HotSpot(TM) 64-Bit Server VM
User home directory = /home/jean
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------




Should I get into Android or Web development?

I'm trying to decide which path to choose. for the past week I've been trying to get a hold of web development, and honestly - i'm feeling overwhelmed. i used to think i'll be able to learn android and front-end development simultaneously, but it's too much. html, css, javascript, jquery, ajax, sass, less and not to mention design skills which i absolutely SUCK at. i love to program, and android feels like it has less design and more program elements to it. i wouldn't say i'm a newbie programmer, I've had experience with a lot of programming languages, Linux programming etc, but it was all for hobby. now i'm thinking about programming as a career and i'll be glad to hear your advice. which path is easier to find a job with? what about freelancing? thanks.




Three.js Loaders

I got the package file, 'three.js-dev' from threejs.org.

All loaders examples shown well.

I coded it to embody 'json loader' referred from 'examples' folder.

This is my 'main.html' codes to embody 'json loader', which places at 'three.js-dev' folder.

<script type="text/javascript" src="./build/three.js"></script>

<script type="text/javascript" src="./src/loaders/JSONLoader.js"></script>

<script src="./examples/js/controls/TrackballControls.js"></script>
<script src="./examples/js/Detector.js"></script>


<!-- _ BASE STYLE -->
<style>
    body {
        /* set margin to 0 and overflow to hidden, to go fullscreen */
        margin: 0;
        overflow: hidden;
    }
</style>

Upper code shows js source locations.

// World Variable
//////
//  //
//////

// DOCUMENT VARIABLE
var SCREEN_WIDTH = window.innerWidth;
var SCREEN_HEIGHT = window.innerHeight;
var windowHalfX = window.innerWidth / 2;
var windowHalfY = window.innerHeight / 2;

var mouseX = 0, mouseY = 0;

var container;

// THREE VARIABLE
var camera;
var scene;
var renderer;

var model;



// Initiate
//////
//  //
//////

init();
animate();



// init function
//////
//  //
/////////
////// //
/////////
function init() {



    container = document.getElementById( 'WebGL-output' );

    camera = new THREE.PerspectiveCamera( 75, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 100000 );
    camera.position.z = 500;

    scene = new THREE.Scene();


    // LIGHTS

    var ambient = new THREE.AmbientLight( 0x221100 );
    scene.add( ambient );



    // LOADER
    //////
    //  //
    //////
    // var loader = new THREE.JSONLoader();

    // loader.load( './models/teapot-claraio.json', museumCallback );


    // BEGIN Clara.io JSON loader code
    var objectLoader = new THREE.ObjectLoader();
    objectLoader.load("models/teapot-claraio.json", function ( obj ) {
        scene.add( obj );
    } );
    // END Clara.io JSON loader code



    // RENDERER
    //////
    //  //
    //////
    renderer = new THREE.WebGLRenderer();
    renderer.setClearColor( 0xffffff );
    renderer.setPixelRatio( window.devicePixelRatio );
    renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
    renderer.domElement.style.position = "relative";

    container.appendChild( renderer.domElement );







    // MOUSE MOVE
    document.addEventListener( 'mousemove', onDocumentMouseMove, false );

    // RESIZE
    window.addEventListener( 'resize', onWindowResize, false );

}



function museumCallback( geometry,  materials ){
    var material = new THREE.MeshFaceMaterial( materials );
    model = new THREE.Mesh( geometry, material );
    model.scale.set (1,1,1);
    model.position.set (0,0,0);
    scene.add( model );            
}

function onWindowResize() {

    windowHalfX = window.innerWidth / 2;
    windowHalfY = window.innerHeight / 2;

    camera.aspect = window.innerWidth / window.innerHeight;
    camera.updateProjectionMatrix();

    renderer.setSize( window.innerWidth, window.innerHeight );
    // if ( canvasRenderer ) canvasRenderer.setSize( window.innerWidth, window.innerHeight );

}

function onDocumentMouseMove(event) {

    mouseX = ( event.clientX - windowHalfX );
    mouseY = ( event.clientY - windowHalfY );

}

function animate() {

    requestAnimationFrame( animate );
    render();

}

function render() {

    camera.position.x += ( mouseX - camera.position.x ) * .05;
    camera.position.y += ( - mouseY - camera.position.y ) * .05;

    camera.lookAt( scene.position );

    renderer.render( scene, camera );

}

`

And browser resulted the error at console tab.

JSONLoader.js:1 Uncaught SyntaxError: Unexpected token import

other error at source tab.

Uncaught SyntaxError: Unexpected token import

I thought, is there issues about 'javascript import'?

So I searched it, and found this. https!!://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/import

and I replaced './Loader' by "./Loader".

But the error remains.

Is anyone who have wonder wisdom about this issue? Help!




What is a Web Framework?

can somebody explain me, what a Web Framework is? In a tutorial I am supposed to use express (node.js), which is a web framework. But before I was just using PHP in order to responde to HTTP-GET/-POST requests. So why do I need express for?




How can i make hovering on one div change the other?

    <div class="button-div">
                    <div class="button">

                </div>
                </div>

        <div class="logo-section"></div>
    </div>
    <div class="header-search-section">
        <input type="text" placeholder="Search" class="header-search-bar">
        <input type="submit" value="Search" class="header-search-button">
    </div>
    <div class="right-side">
        <div class="circle-button">
        </div>
    </div>
</div>

How can I make hovering over .button-div affect .circle-button? Please help I have tried >, ~ and just a space




About windows cache extension failure

While trying to download wordpress from The microsoft web platform installer,I get the errors which is shown in the image.

My current window OS is 10.Error was "Window cache Extension 1.3 for php 5.5".How can solve this problem?

Could someone help me? Any help must be appreciated. see Image I posted here




How to Know if user Click Button in Firefox page or Default Browser Using c# or Vb.net

i have a button in a form1 called button1 i want to make button1.enabled=false if the user click on the button "Skip Add" in the Page of Firefox or any default Browser is there any way or idea to do that Using c# or Vb.net




Json.NET - format an array of objects with names

I have an array like this

{
"214460106": {
    "HALTESTELLEN_ID": "214460106",
    "TYP": "stop",
    "DIVA": "60200001",
    "NAME": "Absberggasse",
    "GEMEINDE": "Wien",
    "GEMEINDE_ID": "90000",
    "WGS84_LAT": "48.1738010728644",
    "WGS84_LON": "16.3898072745249",
    "STAND": "",
    "PLATFORMS": [{
        "LINIE": "6",
        "ECHTZEIT": "1",
        "VERKEHRSMITTEL": "ptTram",
        "RBL_NUMMER": "406",
        "BEREICH": "0",
        "RICHTUNG": "H",
        "REIHENFOLGE": "16",
        "STEIG": "6-H",
        "STEIG_WGS84_LAT": "48.173825035357",
        "STEIG_WGS84_LON": "16.3894569315641"
    },
    {
        "LINIE": "6",
        "ECHTZEIT": "1",
        "VERKEHRSMITTEL": "ptTram",
        "RBL_NUMMER": "420",
        "BEREICH": "0",
        "RICHTUNG": "R",
        "REIHENFOLGE": "19",
        "STEIG": "6-R",
        "STEIG_WGS84_LAT": "48.1739867818893",
        "STEIG_WGS84_LON": "16.3898162576777"
    },
    {
        "LINIE": "N6",
        "ECHTZEIT": "1",
        "VERKEHRSMITTEL": "ptBusNight",
        "RBL_NUMMER": "406",
        "BEREICH": "0",
        "RICHTUNG": "H",
        "REIHENFOLGE": "13",
        "STEIG": "N6-H",
        "STEIG_WGS84_LAT": "48.1738010728644",
        "STEIG_WGS84_LON": "16.3892682853544"
    },
    {
        "LINIE": "N6",
        "ECHTZEIT": "1",
        "VERKEHRSMITTEL": "ptBusNight",
        "RBL_NUMMER": "420",
        "BEREICH": "0",
        "RICHTUNG": "R",
        "REIHENFOLGE": "6",
        "STEIG": "N6-R",
        "STEIG_WGS84_LAT": "48.1740406972867",
        "STEIG_WGS84_LON": "16.3896994766908"
    }],
    "LINES": ["6",
    "N6"]
},
"214460107": {
    "HALTESTELLEN_ID": "214460107",
    "TYP": "stop",
    "DIVA": "60200002",
    "NAME": "Achengasse",
    "GEMEINDE": "Wien",
    "GEMEINDE_ID": "90000",
    "WGS84_LAT": "48.2845258075837",
    "WGS84_LON": "16.4488984539143",
    "STAND": "",
    "PLATFORMS": [{
        "LINIE": "32A",
        "ECHTZEIT": "1",
        "VERKEHRSMITTEL": "ptBusCity",
        "RBL_NUMMER": "1168",
        "BEREICH": "0",
        "RICHTUNG": "H",
        "REIHENFOLGE": "7",
        "STEIG": "32A-H",
        "STEIG_WGS84_LAT": "48.284334521556",
        "STEIG_WGS84_LON": "16.4489523528313"
    },
    {
        "LINIE": "32A",
        "ECHTZEIT": "1",
        "VERKEHRSMITTEL": "ptBusCity",
        "RBL_NUMMER": "1159",
        "BEREICH": "0",
        "RICHTUNG": "R",
        "REIHENFOLGE": "35",
        "STEIG": "32A-R",
        "STEIG_WGS84_LAT": "48.2844540754073",
        "STEIG_WGS84_LON": "16.4509825453734"
    }],
    "LINES": ["32A"]
},
... and so on

Is there any way to format something like this in a List? I tried to do it but he always stops at the 21460106 number. Also tried json2csharp but that only makes 5000 classes where every class has the number as its name.




which words are used in web article title to represent list ?

I got " best | top | list | finest | greatest | top| foremost | leading| premier| prime| ultimate| perfect | highest | alternative " anything missing except this? Please comment it.




Access docker image through web server

I am using a docker image and I can successfully access it and run it through a python script from my host machine. I am using sidomo for that purpose. The script works fine locally but doesn't give any output when I run it on server. Even the docker images command doesn't give correct output on server. The output is:

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

What permissions do I need to change in order to access my docker image from server? I only need the output from the docker program in my web application.




vendredi 26 août 2016

ValueError: source code string cannot contain null bytes

I'm trying to start web crawing via Scrapy. after just place the reference codes in the below directory, when I run the the command "scrapy crawl APT2U".. and then below error logs was shown. How to resolve this problem?

[Environmnet]

Anaconda 3
OS: Windowns 10 32bit

[Installed Packages]

_nb_ext_conf              0.2.0                    py35_0
alabaster                 0.7.8                    py35_0
anaconda                  4.1.1               np111py35_0
anaconda-client           1.4.0                    py35_0
anaconda-navigator        1.2.1                    py35_0
argcomplete               1.0.0                    py35_1
astropy                   1.2.1               np111py35_0
attrs                     15.2.0                   py35_0
babel                     2.3.3                    py35_0
backports                 1.0                      py35_0
beautifulsoup4            4.4.1                    py35_0
bitarray                  0.8.1                    py35_1
blaze                     0.10.1                   py35_0
bokeh                     0.12.0                   py35_0
boto                      2.40.0                   py35_0
bottleneck                1.1.0               np111py35_0
bzip2                     1.0.6                    vc14_3  [vc14]
cffi                      1.6.0                    py35_0
chest                     0.2.3                    py35_0
click                     6.6                      py35_0
cloudpickle               0.2.1                    py35_0
clyent                    1.2.2                    py35_0
colorama                  0.3.7                    py35_0
comtypes                  1.1.2                    py35_0
conda                     4.1.11                   py35_0
conda-build               1.21.3                   py35_0
conda-env                 2.5.2                    py35_0
configobj                 5.0.6                    py35_0
console_shortcut          0.1.1                    py35_1
contextlib2               0.5.3                    py35_0
cryptography              1.4                      py35_0
cssselect                 0.9.2                    py35_0
curl                      7.49.0                   vc14_0  [vc14]
cycler                    0.10.0                   py35_0
cython                    0.24                     py35_0
cytoolz                   0.8.0                    py35_0
dask                      0.10.0                   py35_0
datashape                 0.5.2                    py35_0
decorator                 4.0.10                   py35_0
dill                      0.2.5                    py35_0
Django                    1.10                      <pip>
docutils                  0.12                     py35_2
dynd-python               0.7.2                    py35_0
entrypoints               0.2.2                    py35_0
et_xmlfile                1.0.1                    py35_0
fastcache                 1.0.2                    py35_1
flask                     0.11.1                   py35_0
flask-cors                2.1.2                    py35_0
freetype                  2.5.5                    vc14_1  [vc14]
get_terminal_size         1.0.0                    py35_0
gevent                    1.1.1                    py35_0
greenlet                  0.4.10                   py35_0
h5py                      2.6.0               np111py35_0
hdf5                      1.8.15.1                 vc14_4  [vc14]
heapdict                  1.0.0                    py35_1
httplib2                  0.9.2                     <pip>
idna                      2.1                      py35_0
imagesize                 0.7.1                    py35_0
ipykernel                 4.3.1                    py35_0
ipython                   4.2.0                    py35_0
ipython_genutils          0.1.0                    py35_0
ipywidgets                4.1.1                    py35_0
itsdangerous              0.24                     py35_0
jdcal                     1.2                      py35_1
jedi                      0.9.0                    py35_1
jinja2                    2.8                      py35_1
jpeg                      8d                       vc14_0  [vc14]
jsonschema                2.5.1                    py35_0
jupyter                   1.0.0                    py35_3
jupyter_client            4.3.0                    py35_0
jupyter_console           4.1.1                    py35_0
jupyter_core              4.1.0                    py35_0
libdynd                   0.7.2                         0
libpng                    1.6.22                   vc14_0  [vc14]
libtiff                   4.0.6                    vc14_2  [vc14]
llvmlite                  0.11.0                   py35_0
locket                    0.2.0                    py35_1
lxml                      3.6.4                    py35_0
markupsafe                0.23                     py35_2
matplotlib                1.5.1               np111py35_0
menuinst                  1.4.1                    py35_0
mistune                   0.7.2                    py35_0
mkl                       11.3.3                        1
mkl-service               1.1.2                    py35_2
mpmath                    0.19                     py35_1
multipledispatch          0.4.8                    py35_0
nb_anacondacloud          1.1.0                    py35_0
nb_conda                  1.1.0                    py35_0
nb_conda_kernels          1.0.3                    py35_0
nbconvert                 4.2.0                    py35_0
nbformat                  4.0.1                    py35_0
nbpresent                 3.0.2                    py35_0
networkx                  1.11                     py35_0
nltk                      3.2.1                    py35_0
nose                      1.3.7                    py35_1
notebook                  4.2.1                    py35_0
numba                     0.26.0              np111py35_0
numexpr                   2.6.0               np111py35_0
numpy                     1.11.1                   py35_0
odo                       0.5.0                    py35_1
openpyxl                  2.3.2                    py35_0
openssl                   1.0.2h                   vc14_0  [vc14]
pandas                    0.18.1                    <pip>
pandas                    0.18.1              np111py35_0
pandas-datareader         0.2.1                    py35_0
parsel                    1.0.2                    py35_0
partd                     0.3.4                    py35_0
path.py                   8.2.1                    py35_0
pathlib2                  2.1.0                    py35_0
patsy                     0.4.1                    py35_0
pep8                      1.7.0                    py35_0
pickleshare               0.7.2                    py35_0
pillow                    3.2.0                    py35_1
pip                       8.1.2                    py35_0
ply                       3.8                      py35_0
psutil                    4.3.0                    py35_0
py                        1.4.31                   py35_0
pyasn1                    0.1.9                    py35_0
pyasn1-modules            0.0.8                    py35_0
pycosat                   0.6.1                    py35_1
pycparser                 2.14                     py35_1
pycrypto                  2.6.1                    py35_4
pycurl                    7.43.0                   py35_0
pydispatcher              2.0.5                    py35_0
pyflakes                  1.2.3                    py35_0
pygments                  2.1.3                    py35_0
pyopenssl                 16.0.0                   py35_0
pyparsing                 2.1.4                    py35_0
pyqt                      4.11.4                   py35_6
pyreadline                2.1                      py35_0
pytables                  3.2.2               np111py35_4
pytest                    2.9.2                    py35_0
python                    3.5.2                         0
python-dateutil           2.5.3                    py35_0
pytz                      2016.4                   py35_0
pywin32                   220                      py35_1
pyyaml                    3.11                     py35_4
pyzmq                     15.2.0                   py35_0
qt                        4.8.7                    vc14_8  [vc14]
qtconsole                 4.2.1                    py35_0
qtpy                      1.0.2                    py35_0
queuelib                  1.4.2                    py35_0
requests                  2.10.0                   py35_0
requests-file             1.4                      py35_0
rope                      0.9.4                    py35_1
ruamel_yaml               0.11.7                   py35_0
scikit-image              0.12.3              np111py35_1
scikit-learn              0.17.1              np111py35_1
scipy                     0.17.1              np111py35_1
scrapy                    1.1.1                    py35_0
selenium                  2.53.6                    <pip>
service_identity          16.0.0                   py35_0
setuptools                23.0.0                   py35_0
simplegeneric             0.8.1                    py35_1
singledispatch            3.4.0.3                  py35_0
sip                       4.16.9                   py35_2
six                       1.10.0                   py35_0
snowballstemmer           1.2.1                    py35_0
sockjs-tornado            1.0.3                    py35_0
sphinx                    1.4.1                    py35_0
sphinx_rtd_theme          0.1.9                    py35_0
spyder                    2.3.9                    py35_0
sqlalchemy                1.0.13                   py35_0
statsmodels               0.6.1               np111py35_1
sympy                     1.0                      py35_0
tk                        8.5.18                   vc14_0  [vc14]
toolz                     0.8.0                    py35_0
tornado                   4.3                      py35_1
traitlets                 4.2.1                    py35_0
twisted                   16.3.2                   py35_0
unicodecsv                0.14.1                   py35_0
vs2015_runtime            14.0.25123                    0
w3lib                     1.15.0                   py35_0
werkzeug                  0.11.10                  py35_0
wheel                     0.29.0                   py35_0
xlrd                      1.0.0                    py35_0
xlsxwriter                0.9.2                    py35_0
xlwings                   0.7.2                    py35_0
xlwt                      1.1.2                    py35_0
zlib                      1.2.8                    vc14_3  [vc14]
zope                      1.0                      py35_0
zope.interface            4.2.0                    py35_1

(C:\Anaconda3) C:\Users\kwizm>

[error]

C:\dir\APT2U\APT2U>scrapy crawl APT2U
Traceback (most recent call last):
  File "C:\Anaconda3\Scripts\scrapy-script.py", line 5, in <module>
    sys.exit(scrapy.cmdline.execute())
  File "C:\Anaconda3\lib\site-packages\scrapy\cmdline.py", line 108, in execute
    settings = get_project_settings()
  File "C:\Anaconda3\lib\site-packages\scrapy\utils\project.py", line 60, in get_project_settings
    settings.setmodule(settings_module_path, priority='project')
  File "C:\Anaconda3\lib\site-packages\scrapy\settings\__init__.py", line 282, in setmodule
    module = import_module(module)
  File "C:\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 661, in exec_module
  File "<frozen importlib._bootstrap_external>", line 767, in get_code
  File "<frozen importlib._bootstrap_external>", line 727, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ValueError: source code string cannot contain null bytes