mercredi 31 décembre 2014

Better way of Auto packaging web application

Can any one suggest What is better way of autopackaging web application for linux env ? How it can be automatically installed to the production box through Jenkins ?





Screenshot of Full Screen in Visual Studio 2012

this is my Class Diagram and i want to take Screenshot of full screen from top to bottom is there any option in Visual studio 2012 to take full screen Screenshot


enter image description here





BeanDefinitionStoreException during runnig web aplication on server

Hi I have maven multi module spring project. Build is succssesful but when I'm trying to run this project I have next error:



SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/D:/Programming/SoftServe/SS_EE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/hostme-web/WEB-INF/lib/hostme-persistence-1.0.jar!/com/softserve/edu/dao/impl/AbstractGenericDao.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: URL [jar:file:/D:/Programming/SoftServe/SS_EE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/hostme-web/WEB-INF/lib/hostme-persistence-1.0.jar!/com/softserve/edu/dao/impl/AbstractGenericDao.class]; nested exception is java.lang.IllegalArgumentException
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:290)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:195)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4772)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: URL [jar:file:/D:/Programming/SoftServe/SS_EE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/hostme-web/WEB-INF/lib/hostme-persistence-1.0.jar!/com/softserve/edu/dao/impl/AbstractGenericDao.class]; nested exception is java.lang.IllegalArgumentException
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:56)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:266)
... 32 more
Caused by: java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:53)
... 35 more

січ. 01, 2015 1:39:56 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart


I found this question from other user, but there is onle one answwer and that answer didn't work. How to fix my Spring Dependencies in pom.xml





NodeJS server working locally but not on OpenShift

I have created a HTTP server on my local machine which serves up a XSS document to be interpreted by another application, and it works fine on my computer. When I push the application to my OpenShift server, however, it doesn't seem to work, as the server doesn't respond to requests on port 80. I had an error originally because I omitted authentication details using .gitignore, but I have solved that now. I just don't have any idea what could be the problem, and I can't debug it from the command line either because it is ran automatically. There may be a way for me to connect to the server through SSH and manually run it, but I'm not sure. Anyone got any idea?


EDIT: Ran it manually and got this:



throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1020:19)
at listen (net.js:1061:10)
at net.js:1143:9
at dns.js:72:18
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:902:3


Looks like a problem with listening on a port, should I set it up to print the error in the callback?





Flash video gets cropped on Safari and Firefox but works fine on Chrome. I have changed then flash parameters, but nothing seems to work.

I have an embedded flash video to record from the users webcam. In chrome the video gets recorded fine but in Safari and Firefox the video seems to be cropped. This is only happening when recording with new webcams. My older computer doesn't have this issue on any browser. These are the current params I have set on the video



var params = {
allowscriptaccess: "always",
bgcolor: "#ffffff",
quality: "high",
menu: true,
allowfullscreen : true
};


I have attached two images the of the proper way on chrome


This is what the video looks like on chrome


This is what I get when I try to record on firefox or Safari with a new webcam


This is what it looks like on firefox with a new webcam





Web Services Windows phone 8 C# [on hold]

Hi guys i need to a tutorials or videos For :




1.Create a Web Service to connect it with the windows phone 8. 2. Make a connection between the oracle Database and the Web Service. 3. Binding this data from the oracle database and the windows phone.


Thanks.





What is the best way to show animated statistics on a web application?

I want to develop a nice looking web application which contains a little UI, communicate with a SQL Database and is able to show animated statistics. (Something like that: http://ift.tt/mca6wP).


Till now, I just developed webpages using HTML, CSS, JavaScript, PHP and have some experiences in C# and I do not know exactly how to get this fancy looking stuff on my application.


Is there maybe something existing which I can use/buy or maybe i should take into consideration further options than javascript...?


I appreciate every hint.





Html and CSS positioning social icons around a circle [on hold]

Does anyone know how to place images around a central image so if you had a circular image and had four social icons placed on the left side floating around the circle close maybe 4 or 5px spacing between the images as they wrap the central image.





Disable iframe autoplay



I'm inserting this HTML code into my document but the video keeps auto playing.

do you know how to fix this one ?



<iframe width="560" height="315" src="How do pain relievers work.mp4" frameborder="0" autoplay="false" controller="false" preload="none" allowfullscreen></iframe>


Thanks a lot.





The namespace 'MapPath' does not exist in the namespace

I am trying to use the code below to gather information from website and give the detail in HTML file. will I am trying to run the code I get error that



Error 41 The type or namespace name 'MapPath' does not exist in the namespace 'Microsoft.SqlServer.Server' (are you missing an assembly reference?)



the code is



WebRequest request = WebRequest.Create("http://www.google.com/");// url here
using (WebResponse response = request.GetResponse())
{
using (StreamReader responseReader = new StreamReader(response.GetResponseStream()))
{
string responseData = responseReader.ReadToEnd();
string path = Microsoft.SqlServer.Server.MapPath(".");
if (!File.Exists(path + "//Asptrick.html"))
File.Create(path + "//Asptrick.html");
using (StreamWriter writer = new StreamWriter(path + "//Asptrick.html")) //Where You Want to save Content
{
writer.Write(responseData);
}
}
}


i have tried with



Server.MapPath("~")
Server.MapPath(@"\")
Server.MapPath("/")


but can not get it to work


the following are in used as well



using System.Net;
using System.IO;




Need to get signature/certificate on web page

I haven't seen this any where but maybe I missed it, this seems like it should be simple but again maybe I am just missing something.


I have a web application (.Net C#) that requires a certificate to login/access. On a particular page I need to have the user "approve" the data. ie they click something to confirm/approve and I save that user's info to the database with a timestamp to indicate who approved it and when. What we want in the database it the name that goes with the digital certificate of the user that is logged in (FirstName.LastName.MiddleName.123456790). How do I access this information? Can I somehow ask them to select a certificate again or just access the information on the one they have already selected to log into the application?





is the time of computer and localhost same?

I have a xampp in my computer. When I try to echo in my php files like:



$time=strtotime("now");
echo $time;


It gets me diffrent time than my computer's time. The time echo gives me is about two hours earlier than my computer's time.


How can I fix the time of my local server. Thanks





Get web page's inspect element html using C#

I'm trying to get html from a website through code. I need the "inspect element" html so i can get the elements after the java script has executed. I'm trying to get the video player from a page like this...Anilinkz





Configure Page Firefox by SourceCode

I have a web application to print technical profiles and production labels. The fact is, to print labels, we need to configure page in Firefox, with specific width and height. We save those settings as a profile associated to the specific labels printer, and we do the same to print technical profiles. The problem is, if we don't configure page, if only we choose the printer with it's profile, the print is not correct. Is there any way, to set or control this kind of settings, using source code like Javascript, jQuery... We have set, the printing view sizes with CSS but it's not enough.


Thanks a lot, and happy new year.





Why does XML not display in browser but correctly does in XML Notepad 2007 (Microsoft)?

I am coding in XML with an XSL attached.


When I open this in browsers (IE + Google Chrome) it displays a white screen. However when I open the same files in XML Notepad 2007 it displays the XML data with the correct styling from the XSL.


Am I missing something about displaying it browsers?


I have the standard declarations at the top and I can't see anything odd about my code; it's a very simple file I'm testing on to try and get it working.





mardi 30 décembre 2014

WebSockets Chat Application,access the live single sessions

I am Developing Chatting website,apps using Web WebSockets



import javax.websocket.OnClose;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;


Used This Libary.
All Live Session store in this object
private static final Set<Session> sessions = Collections.synchronizedSet(new HashSet<Session>());
Now Question is
for (Session s : sessions)
{
}



  1. This way access all recode ,Now I am traying access single session s Sessions[2];

  2. This Way I am Not access Single socket Another Que is Websocket is Proper Way For Chatting,and They How Many Users Handle. I get code from Below link enter link description here





Must I use Django's template language in templates?

Am I required to use Django's template language i.e:(HTML tags and Template lang. tags), or can I just use HTML, and stick in my {% csrf_token %} in each post form template?





Updating and downloading database

I have an idea for an app that uses Database from internet , Then install it on the current device


When user later open the app, the app checks if there's new version of the current database


So my question is : how to implement this feature ?


Thank you





3rd Party Web Browser Plugins that has Flash and Websessions

I am making a web browser. Knowing that IE would have implications (being run in compatibility mode), I tried 3rd party alternatives such as Awesomium, WebKit.NET, GeckoFX. However, it is either they don't save cookies (Awesomium) or they don't support flash (GeckoFX and WebKit.NET).


Are there any other third party alternatives that can be integrated into Windows Forms that has those two features?


I'm programming in Visual Basic.





Looking a good host solution for a startup website with NodeJs support [on hold]

I am looking for a good hosting provider with lots of accessing privilages for better control and support for nodejs, mysql and php of course. Emails should be provided as well.


Small startup web application on it's way.





Javascript scraping [on hold]

I am scraping the site: http://www.fifacoinsale.com/


The url of the javascript output of 1 product I need is: http://www.fifacoinsale.com/default/quick/singlewithcategoryid?count=100&category_id=6 This product is 100K


So by any logic this would mean that all the other urls for the other products (200, 300, 400, 500, 600 and so on) would be: http://www.fifacoinsale.com/default/quick/singlewithcategoryid?count= (any product) &category_id=6


But this does not work and I cannot get the urls for the others as when I refresh the page under xhr on network, inspect element it just sets the javascript page back to orignal an only gives me the url for 100K


How do I find other product javascript urls so i can scrape them





Indent even rows of hexagons in CSS

I currently have a list of hexagons (images) that I have wrap to the next line when the as the browser width decreases. However, when this happens, they form even lines as seen in the first image, each starting at the same point on the x axis.


Current solution where each row starts at the same point on the x axis


What I would like to do is alternate the rows such that every other row starts at an offset of the hexagon size as seen in figure two. It should also be noted that this example also has a negative y position relative to the respective position as determined from the first image.hexagon rows interlocking, with an offset for even rows


Is there a way to do this with just CSS? I'd like to avoid using a library if at all possible.


This is similar to the question asked here, but I need the entire structure to be able to have an undetermined number of rows, so the solution where I specify which items are in which rows isn't feasible for my application.





Problems with returning String[] from Java Web Service to Swing client

I am just trying to return a String[] from a @webMethod to the ws swing client. The problem is that it is not returning anything. When I test the web service it shows



Method returned

net.java.dev.jaxb.array.StringArray : "net.java.dev.jaxb.array.StringArray@2f741802"
SOAP Request

<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:getEmployeeNames xmlns:ns2="http://employee.bank.com/"/>
</S:Body>
</S:Envelope>
SOAP Response

<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:getEmployeeNamesResponse xmlns:ns2="http://employee.bank.com/">
<return>
<item>73869</item>
</return>
</ns2:getEmployeeNamesResponse>
</S:Body>
</S:Envelope>


the web service method is



public String[] getEmployeeNames()
{
String[] nameList = ........;
return nameList;
}




This website template causes touchpad scroll to fast on Mac

I purchased a website template. The problem is that it scrolls too fast when you use touchpad on OS X. If I use an external mouse, it's ok.


http://51118.digitalpowr.com/


I don't know what caused the problem. Can anybody help me with this?


Thanks.


Sam





Call Contoller php function by View html

My question regarding codeigniter


I want to call a 'add' method in the 'calc.php' (controller class) by using calc_view (view class)


calc.php - controller class



<? php
function add(){

return ($user['askcount'] * 1)
+ ($user['anzcount'] * 10)
+ ($user['voteupcount'] * 5)
- ($user['votedowncount'] * 2));
}


want to get input of "localhost/index.php/calc/add" in calc_view



<div id = 'addresult'> ......... </div>




How can I add another title in meteor?

I want to add another title to the head bar, next to "sign up" and "sign in", like in this page:


http://meta.telesc.pe/


It should be a title with a link to a specific URL.


How can I do it?


Thank you





Boostrap css file overrode my css file

I included bootstrap to my site to use for some additions, but the bootstrap css file overrode some of my css styling in my css file. Is there a way to make it to where I can use bootstrap css without having it override stylings I have already done?


Thanks for your time, any help is much appreciated!





Web component to draw/edit diagrams

I need to include to my site diagrams (like UML), wchich free solution will be the best - i must be free, no need Internet connection and working on www. I'm looking for web based paint for diagrams - with drag and drop, like draw.io.





I am newbie in Python world. creating first web application using python, but getting following error


import web

urls = (
'/', 'index'
)

app = web.application(urls, globals())

class index:
def GET(self):
greeting = "Python welcomes you"
return greeting

if __name__ == "__main__":
app.run()


The error message is:



error: No module named 'utils'




Extending from diffrent layouts in laravel view

I have a laravel page which can be extended from admin layout or user layout. If the user logged as admin it should extend from admin, otherwise it should extend from user. Can I make this control with a simple if inside of my view like:



//in my view
@if(Auth::check())
@extends('layouts.admin')
@else
@extends('layouts.outside')


If I do this control in my controller I need to make two view for user and admin and I dont want to duplicate my views like:



//in my controller
if(Auth::check())
return View::make('bot/bwin_admin');
else
return View::make('bot/bwin_user');//the view is duplicated :(


So how can I use diffrent parent layout for a view without duplicating that view in laravel?





Relative Path with Java Web (Eclipse)

Hello I am trying to do a web application and have a problem: I don't know how to open a text file with Java that is saved in the resource folder:


text file saved in the resource folder



String relativeWebPath ="/src/main/resources/words.txt"; //Import der des Textdoumentes
String absoluteDiskPath = getServletContext().getRealPath(relativeWebPath);
File f = new File(absoluteDiskPath);


(The file words.txt)


As you can see on the image I am trying to access words.txt but it isn't working. Any ideas?





Hash web resource file names, and update JSP files

I like to hash my web resources (CSS, JS, Images) so it will be saved in the browser cache and change only when the version changed.


I found a few GRUNT modules that let you hash your files, and create JSON file for you. The JSON file looks like {"oldFileName1": "newFileName1", "oldFileName2": "newFileName2"} and so own.


Now the second part is to update my JSP files with the new file names. How do you think I should to do it? One way, because those files are JSP, I can use JSP EL and use something like and handle it on the server side.


Anyway, I wonder how this is done without JSP. I like to use javascript and grunt tasks only. I sow another solution which talks about injecting the tag with javascript. Are there other solutions?


Thanks





Integrating Javascript Libraries with Google App Engine

Just starting to learn web programming (taking class CS 253 on Udacity).


My question is how does integrating JS and google app engine work? I know this is may be a fundamental question about web programming, but I really need some guidance on how to understand this concept.


I am trying to incorporate the Twitch Javascript API into Google App Engine. Basically, I would like to have a small website where users can login via Twitch and it stores their info into a database. I really do not understand how this is possible, since Twitch only has a Javascript API.


Here is the script that I have that works perfectly for connecting to Twitch (from the examples on their git page):



<html>
<head>
<meta charset="utf-8">
<title>TwitchTV SDK Example App</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<script src="https://ttv-api.s3.amazonaws.com/twitch.min.js"></script>

<script>
window.CLIENT_ID = '';
$(function() {
// Initialize. If we are already logged in, there is no
// need for the connect button
Twitch.init({clientId: CLIENT_ID}, function(error, status) {
if (status.authenticated) {
// we're logged in :)
$('.status input').val('Logged in! Allowed scope: ' + status.scope);
// Show the data for logged-in users
$('.authenticated').removeClass('hidden');
} else {
$('.status input').val('Not Logged in! Better connect with Twitch!');
// Show the twitch connect button
$('.authenticate').removeClass('hidden');
}
});


$('.twitch-connect').click(function() {
Twitch.login({
scope: ['user_read', 'channel_read']
});
})

$('#logout button').click(function() {
Twitch.logout();

// Reload page and reset url hash. You shouldn't
// need to do this.
window.location = window.location.pathname
})

$('#get-name button').click(function() {
Twitch.api({method: 'user'}, function(error, user) {
$('#get-name input').val(user.display_name);
});
})

$('#get-stream-key button').click(function() {
Twitch.api({method: 'channel'}, function(error, channel) {
$('#get-stream-key input').val(channel.stream_key);
});
})

});
</script>

<style type="text/css">
.hidden {
display: none;
}
</style>
</head>
<body>
<h1>TwitchTV SDK Example App</h1>
<div class="status">
Status: <input readonly="readonly" size="60" val="Unknown"/>
</div>
<div class="authenticate hidden">
<img src="http://ttv-api.s3.amazonaws.com/assets/connect_dark.png" class="twitch-connect" href="#" />
</div>

<h2 class="authenticated hidden">Authenticated</h2>
<div class="authenticated hidden">
<div id="logout">
<button>Log Out</button>
</div>

<div id="get-name">
<button>Get TwitchTV Name</button>
<input readonly="readonly" size="50" value="Unknown"/>
</div>

<div id="get-stream-key">
<button>Get TwitchTV Stream Key</button>
<input readonly="readonly" size="50" value="Unknown"/>
</div>

</div>
</body>
</html>


How can I communicate data between this client side javascript and Google App Engine? Thanks!





Forbidden Web Pages ASP.Net

I have a web application of ASP.Net when the default login page is accessed from browser then it is not displayed and shows an error as 'HTTP Error 403- Forbidden'.





lundi 29 décembre 2014

How manay thing we can do with Youtube video id (youtube data api)?

Use Google Youtube data api (v3) and Youtube player api we can do many thing. But what can i do with video id or playlist id (Youtube data api) without use Youtube player?? suppose i want use video id to stream that video in another Video player (not Youtobe player)??





Background Image Design [duplicate]


This question is an exact duplicate of:




I'm trying to create a billboard like the links below. Inspecting the website I noticed the images are smaller then what is displayed on the screen in full. How can my billboard to be displayed this way?


http://inflection.com/about http://prezi.com/





how to encrypt video in web page?

I want to encrypt my video file and wants to give source url of that file in my web page and while before playing of that file on my web page I want enable password for authentication. How to do this? PS: I using PHP + HTML5 + JavaScript develop website.





Web development internship

I am looking for companies, where I could do "web development" internship in USA starting from Summer/Autumn of 2016. I am now a computer science student in UK. Internship has to be full-year (8-12 months), paid and full-time. Obviously, I am very motivated to get there and do my internship (that's why I am searching for these companies in advance), but maybe some people here know some companies which I could contact that fill my criteria or some other useful resources?


Thank you!!





How do know Chinese website comapny?

Shanghai Pohaa Information Technology Co., LTD. was founded in 2013 is a collection of software development, web design, graphic design, software outsourcing, content management systems, and visual effects in one of the computer technology field of information technology. The company adheres to independent innovation, quality service for the concept, combined with the application requirements of the computer industry, market demand at the starting point, the constant pursuit of the pace of innovation, in-depth understanding of customer needs and achieve customization and cooperative development, and extensive industry experience, expertise and equipment to high-quality customer service by the recognition and praise. Since its inception,





How do I make a web server accessable to my local area network?

StackOverflow. I'm trying to open a web server that's accessible to my local area network using Apache. I've installed Apache and copied all of the site content into the /var/www/html directory, connected to http://localhost/index.htm using Firefox and it gave me my website, however, I've tried connecting to a computer connected to the same network and it gave me a "Server Not Found". The IP address I used to connect to the server was http://10.0.0.2/index.htm. Do I have to open any sort of firewall for this? If so, how do I do so? Any information that you may need to answer the question will be supplied.


I am running Fedora 20 and using Apache 2.5 to host the server.





Web Page Click Through Heat Map using R

I am trying to figure out if there is a way to create heat map on the top of an screenshot image.


So, I have a web page screenshot JPEG image. I also have monthly click rates data for each UI elements in the page. Now I want to use R to create heatmap (translucent) so that it will be easier for people to know where end users are clicking more and vice-versa.


I can create simple heatmaps and graphs using R, but it seems to be far from where I want to be.


If you have done this or have ideas please do share.


Thanks





Edit word document that is forwarded by a servlet from a webdav server

I have a webdav server but and to edit and save directly to the server I am using this protocol: ms-word:ofe|u|http://url.com/test.docx. But instead of directly using the document url I want to have a servlet that forwards or redirects to the file. When doing this though I get an error message Unexpected error from Microsoft office. Anyone know how I can achieve what I want?





Show HTML5 video on full load on desktop but never load on a mobile device

I'm trying to acheive something like this https://thecleansekitchen.com.au/


The video should only be visible once it's completely loaded and no video should be loaded on mobile devices.


How can I do that?


Also, I have two more videos down on my webpage that should be counted in.





localhost:8080 being changed to localhost

I am stumped. I have a windows 7 maching that is running xampplite to provide a development web host on my local machine. I have been using it that way for a couple years.


The site I am working on is a wordpress site running wp4.0.1. My htdocs tree for the current app is G:\xampplite\htdocs\LitehausConsulting\IAP.


About a week ago something happened that now prevents me from using that directory. When I enter localhost:8080/.../IAP into a browser (Firefox and IE) the URL in the location block get changed to localhost/.../IAP and fails to find it.


I have absolutely NO clue where to look.


To get myself running again, I copied the IAP directory to IAP2 and it works there.


I have not made any changes to the Apache files.


I looked for hidden files but did not find any.


I renamed IAP to IAPOld then created a new IAP folder with only a minimal index.html in it. When I enter the above URL into a browser it gives me the same error.


I want to get back to the original name. I hope someone can give me some idea where to look.





Download files from authenticated web HTTP Connection Manager in SSIS

Problem: I am in process of automating the download of files from authenticated web .I tried different alternatives one with HTTP connection Manager and the other using Script task


HTTP Connection Manager

I have included URL, Username and password of the web, but when i try to test the connection, the following error occurs.



Unable to connect to the remote server



Questions:



  1. For URL , does it should point straight to the server or Login page? I tried either ways, but it didn't work

  2. Do I need to specify anything in Domain box and Client certificate?

  3. What is Client Certificate?


Script task


I have followed the link for downloading the files using script task


Download source file from website with SSIS


it throws unknown exception, not sure what it is?


Questions:


Is there a simple solution using Script task?




In either cases , Can you please help me in connecting to authenticated web and download the files and also check if files already exists. I dont have prior experience in using SSIS to download files from web. I have tried different solutions from here, none of them worked.





Google Plus Sign-In button rendered but not working

I'm trying to get comfortable with the Google APIs.


To study the sign-in process, I built a simple web page to get the sign-in button working according to https://developers.google.com/+/web/signin/add-button and the button is rendered properly. However, it is not active - it doesn't react to clicks, there's also no error in the browser console.


I do not run the page from a web server, I'm opening it directly from disk. I.e. the URL is something like file:///c:/projects/GooglePlusClientJS/google_plus_js.html.


The page code:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<script src="https://apis.google.com/js/client:platform.js" async defer></script>
<script type="text/javascript">
function signinCallback(authResult) {
if (authResult['status']['signed_in']) {
// Update the app to reflect a signed in user
// Hide the sign-in button now that the user is authorized, for example:
console.log("Signed in");
document.getElementById('signinButton').setAttribute('style', 'display: none');
} else {
// Update the app to reflect a signed out user
// Possible error values:
// "user_signed_out" - User is signed-out
// "access_denied" - User denied access to your app
// "immediate_failed" - Could not automatically log in the user
console.log('Sign-in state: ' + authResult['error']);
}
}
</script>
<title>GooglePlus Test</title>
</head>
<body>

<span id="signinButton">
<span
class="g-signin"
data-callback="signinCallback"
data-clientid="1014595779278-cp57erbq6libuesalb18reuqcmco37ab.apps.googleusercontent.com"
data-cookiepolicy="none"
data-requestvisibleactions="http://schema.org/AddAction"
data-scope="https://www.googleapis.com/auth/plus.login">
</span>
</span>

</body>
</html>


What am I doing wrong? Is it caused by opening it directly from disk? If so, why?


Thanks.





how to load page in Webview android

i've got an android webview app, that shows my website, i want to know if is there a way to control the loading state of the page, and put a "Loading..." script for every html page in the webview, and i also have 2 problem, when i start my app, it shows for about 4-5 seconds a black screen and the other one is that when my webview is loaded it doesn't load in correct way the webpage, but when i reload, it works correctly. Thank you guys


This is my website "home page"



<!doctype html>
<html>
<head>


<meta charset="utf-8">
<title>Eventi</title>
<link rel="stylesheet" type="text/css" href="CSS/stile.css">
<script src="JS/jquery-1.11.1.js.js"></script>
<script src="JS/func.js"></script>
<?php include ("PHP/phpfiles.php");?>


</head>

<body>

<div id="navigation">
<a href="eventi.php"> <div align="left" style="float:left;margin-left: 5%; margin-top:-1.5%;"><img src="IMG/reload.png" width="30" height="30" alt=""/></div> </a>
<a href="#" style="margin-left:-5.3%;"><img src="IMG/logo_navbar.png" width="300" height="30" alt="Logo" class="logonavig"/></a>
<div align="right" style="float:right;margin-right: 5%;"><img src="IMG/undo.png" width="10" height="11" alt=""/></div>
</div>

<!--
<? if ($_SESSION['FBID']): ?>
<p class="testobparty"><font color="#000000" > Benvenuto/a &nbsp; </font> <font color="#1D49A2" size="5px" style="font-weight:bold;"><? echo $_SESSION['FULLNAME']; ?></font></p>
<? else: ?>
<p class="testobparty"> <a href="LOGIN/1353/fbconfig.php" style="text-decoration:underline; color:#1D49A2; font-weight:bold; font-family:Impact, Haettenschweiler, 'Franklin Gothic Bold', 'Arial Black', sans-serif;"><img src="IMG/buttonfb3.png" height="40" width="300"> </a></p>
<? endif ?> --> <br> <br> <br>
</div>
</div>

<? inserisci_div(); ?>









<div id="footer"> © - 2014 <font color="#FFF">BParty by BParty Staff</font> All rights reserved | <a href="http://www.ask.fm/BPartyOfficial">ASK.FM</a> | <a href="https://www.facebook.com/people/BParty-Profilo/100007646898561">FACEBOOK</a> | <br> Icon made by <a href="http://www.icons8.com" title="Icons8"><font style="font-weight:200">Icons8</font></a> from <a href="http://www.flaticon.com" title="Flaticon"><font style="font-weight:200">http://www.flaticon.com</font></a> is licensed under <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0"><font style="font-weight:200">CC BY 3.0</font></a>
</div>




</body>
</html>


i think that the problem is my JS file



$(document).ready( function(){
if ($(window).width() > 1001 && $(window).width() < 10000 )
{
$("#menubar").css("font-size", ((($(window).height()*8)/100)));
$(".fotoevento").css("height", ((($(window).height()*45)/100)));
$(".fotoevento").css("width", ((($(window).height()*100)/100)));
$(".pub").css("margin-left", ((($(window).height()*13)/100)));
$(".testievento").css("font-size", ((($(window).width()*3)/100)));
$("#footer").css("font-size", ((($(window).width()*3)/100)));


//MOBILE
$(".logonavig").css("height", ((($(window).height()*3)/100)));
$(".logonavig").css("width", ((($(window).width()*19)/100)));

}



else if ($(window).width() < 1000)
{
$("#menubar").css("font-size", ((($(window).height()*3)/100)));
$(".fotoevento").css("height", ((($(window).height()*35)/100)));
$(".fotoevento").css("width", ((($(window).width()*90)/100)));
$(".pub").css("margin-left", ((($(window).height()*13)/100)));
$(".testievento").css("font-size", ((($(window).width()*5)/100)));
$(".imamgineeventocompleta").css("margin-top", ((($(window).height()*9)/100)));
$("#footer").css("font-size", ((($(window).width()*2.4)/100)));


//MOBILE
$(".logonavig").css("height", ((($(window).height()*3)/100)));
$(".logonavig").css("width", ((($(window).width()*47)/100)));


}

else {
$("#menubar").css("font-size", ((($(window).height()*3)/100)));
$(".fotoevento").css("height", ((($(window).height()*60)/100)));
$(".fotoevento").css("width", ((($(window).height()*110)/100)));
$(".pub").css("margin-left", ((($(window).height()*60)/100)));
$(".testievento").css("font-size", ((($(window).width()*5)/100)));

//MOBILE
$(".logonavig").css("height", ((($(window).height()*3)/100)));
$(".logonavig").css("width", ((($(window).width()*35)/100)));
}




JavaFX get favicon with web browser?

Hello everyone is it possible to get the favicon the website i'm on my webview? I'll prefer to not use any third party library so please give me a guide if it's possible without that.





Uri Scheme maximum length

I have a web application and an client application, my requirement is to load the application from the browser with a parameter string. Originally i was using ActiveX but have moves away for obvious reasons (other browser support). Currently I am using URI Scheme to launch my application. but found that it does not always work as

in one scenario the URI length was found to be 2781 characters. Is there a way to pass such big strings to an application from the web browser.


My client application is c#





How I can access json array in html?

I have a json file that contains the following data



["person","firstName","Clark","lastName","Kent","job","Reporter","roll"]


I am trying to access each element of array in HTML using javascript but having some problem, can someone tell me how to access its each element separately through javascript.





apache script (run-plot-make page)

I am trying to write a python script to do this things:



  1. take variable from page

  2. pass variable to gnuplot and plot something

  3. output some html code with plotted data (.png output)


I have this for now:



#!"C:\Python27\python.exe"
# -*- coding: UTF-8 -*-

# enable debugging
# Import modules for CGI handling
import cgi, cgitb

import subprocess
import os

#data = "steps" (this will be passed from web)
#output = "steps" (this will be passed from web)

proc = subprocess.Popen(['gnuplot'],
shell=True,
stdin=subprocess.PIPE,
)
proc.stdin.write('set output "%s+.png" %output \n')
proc.stdin.write('I DO NOT KNOW') # I do not know how to write it
proc.stdin.write('quit\n')


What sould I write in line (i do not know) to plot data this way:



plot \
\
'steps.txt' u 0:3 sm cs w l ls 1 t 'X-suradnice',\
'steps.txt' u 0:4 sm cs w l ls 2 t 'Y-suradnice',\
'steps.txt' u 0:5 sm cs w l ls 3 t 'Z-suradnice'


And then in the same script print them as html output something like this.



print "Content-type:text/html\r\n\r\n"
print "<html>"
print "<head>"
print "<title>this is my output</title>"
print "</head>"
print "<body>"
#print "<img src="output.png" alt="img">"
print "</body>"
print "</html>"


Thank you guys, i am hopeless with this... I hope u understand what I want :/





Linux audio control web alsamixer

Linux audio control are managed by a command line interface, it would be useful to access them from outside.


Would it be possible to access the control of alsamixer from a web app, like a django app? Can please someone put me in the right direction of how to do this?


any advice is really appreciated





dimanche 28 décembre 2014

Refreshing server side includes

I am currently using a STM32F4Discovery as a webserver and as I have little experience with web design I have run into a little problem...


I am wondering if it is possible to refresh my server side includes



!--#tag--


without refreshing the whole page using



meta http-equiv="refresh" content="x"


every x seconds? I tried using xmlhttp.open and xmlhttp.send which seems to work (my firmware responds and updates SSI values) but the values on the web page do not change.


Any help would be great, thanks!





Mobile Device Detection - Web Development

I have no idea how to even start doing this but how do I detect if a user is using a mobile device/browser and if so send them to a different URL?





Web app architecture for third party API calls

I'm building a simple search engine that takes a user submitted search query as input and outputs a list of appropriate search results. Search queries ultimately get sent to a third party API, which does the heavy lifting of generating search results.


There are 2 ways I can handle this workflow:




  1. My server takes user requests, queries the third party API, and returns results to the user


    or




  2. Shifting this responsibility to the client-side; the client queries the third party API directly.




What are some considerations when choosing between these 2 methods?





the w3c standardization of a wsdl file

Good evening, I am a beginner in the field of web service and development in java. My problem is: how can I show that a wsdl file is w3c standard in java. Is there a library that allows to check the w3c standardization of a wsdl file. thank you in advance





how to send request to sabre web server and received response in php

I am working on sabre web API, but i have no idea how to send request to and get response, I have already create Session in php and successfully connect with sabre server but i do not known how to send request to sabre and how to get response. please help me.





Url rewrite for my handmade blog

Can anyone here help me rewrite my url with .htcaccess?


My current url looks like: blog-indlaeg.php?id=3


and I want it to look like blog/3/ so I need to rewrite -indlaeg.php?id= to a / and add end slash.


Can anyone here help me out?





Auto Install after downloading exe

I have an .exe file, i want that when someone download this files it should automatically start installing. Any suggestions on how this can be acheived?? Any help will be very much appreciated.





Host Application Online, Only Download Newer Version

Excuse me if this is not technically a programming question but I've spent the last 2 weeks on this to no avail.


I want to host my application (vb.net, winform) on a web server, embed the application URL in a config opened by a program used by my client daily. What I want is:


First time the program opens, download and install my application. Every time the program opens after that, my URL is opened and if the application on the server is of a newer version then the one installed on the client's device, install it. If not do nothing.


I want this to be done without opening webpages to the user and asking him to keep clicking on "Next" and so on. It would be annoying if everyday he has to see a webpage telling him he has the latest version of the application installed.


I tried ClickOnce Deployment but couldn't get it to do what I want. It works the other way around, every time the application is opened manually it checks for updates on the server.


Any help would be much appreciated.


Thank you





How to return multiple mime-types to web-client in one Http Response

How can I respond to an Http Request with data in multiple mime types in the same Http Response e.g. static Bokeh html and plot metadata in json.





@font-face not working in polymer/web-components

I'm trying to get a web font into my polymer component, however the font is failing to render. Could someone shed some light on this? Google hasn't been giving me much love on this issue. If you need any more info then just let me know. Thanks!



@font-face {
font-family: 'open_sansextrabold';
src: url('fonts/OpenSans-ExtraBold-webfont.eot');
src: url('fonts/OpenSans-ExtraBold-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/OpenSans-ExtraBold-webfont.woff') format('woff'),
url('fonts/OpenSans-ExtraBold-webfont.ttf') format('truetype'),
url('fonts/OpenSans-ExtraBold-webfont.svg#open_sansextrabold') format('svg');
font-weight: normal;
font-style: normal;
}

header a {
font-family: "open_sansextrabold";
display: block;
height: 50px;
width: 150px;
color: #fff;
text-decoration: none;
text-align: center;
line-height: 50px;
transition: background-color 1s ease;
-webkit-transition: all 140ms cubic-bezier(0.420, 0.000, 0.580, 1.000);
-moz-transition: all 140ms cubic-bezier(0.420, 0.000, 0.580, 1.000);
-o-transition: all 140ms cubic-bezier(0.420, 0.000, 0.580, 1.000);
transition: all 140ms cubic-bezier(0.420, 0.000, 0.580, 1.000); /* ease-in-out */

-webkit-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
-moz-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
-o-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000); /* ease-in-out */
}




Developing Website with Expanding/Contracting sections/bars while scrolling to navigate?

I'm doing a website as a way to venture into web development. The developer I was doing the website with dropped the project after coding a little bit of it in ruby, leaving me at a loss for what to do. I know ruby, but I want to see if there's a way to do this without ruby and just html/css + javascript.


I am trying to make a website that is basically a bunch of rows of horizontal bars, each one being a section or a page. As you scroll, one bar expands to take up part of the window (not the entire window to leave room for the bars that haven't expanded). So you view one full section at a time with the other sections still visible at the top and bottom (as bars), and you scroll to navigate through each section. The idea is for each section to stretch to full proportions, and when the user moves to the next section, its content becomes squished into a little bar again.


Does anyone have any advice to help me move forward with this?





How to hide file extensio nusing .htaccess + Restricting access

Guys how to remove a file extension using .htaccess. example : file name was "/home.php"


of course after using .htaccess


it can now access using link "/home"


it is possibly to redirect using into 404 error if they visit "/home.php" instead of "/home"


Thanks!





samedi 27 décembre 2014

How download a image since QuickBox API?

i'm trying download a image file since Quickblox API. I can upload a file, but when i tried download NSData image doesn't show a image.



// Upload a user avatar, previously log in Quickblox API
NSData *avatar = UIImagePNGRepresentation([UIImage imageNamed:@"userWhite"]);
[QBRequest TUploadFile:avatar fileName:@"avatar.png" contentType:@"image/png" isPublic:YES successBlock:^(QBResponse *response, QBCBlob *blob) {
// Success
} statusBlock:^(QBRequest *request, QBRequestStatus *status) {

} errorBlock:^(QBResponse *response) {

}];


Image Upload: Image


Download avatar:



NSString* userProfilePictureID = [NSString stringWithFormat:@"%ld",(long)[[LocalStorageService shared] currentUser].blobID]; // user - an instance of QBUUser class
// download user profile picture
[QBRequest downloadFileWithUID:@"318547" successBlock:^(QBResponse *response, NSData *fileData) { UIImage* image = [UIImage imageWithData:fileData];

} statusBlock:^(QBRequest *request, QBRequestStatus *status) {

} errorBlock:^(QBResponse *response) {
}];


UIImage doesn't show any image. What do?, NSData isn't corrupted. Thanks.





Getting email feedback via PHP form in different file [duplicate]


This question already has an answer here:




I'm looking to implement a feedback form on a website I'm making and am running into problems when I try to separate the PHP mail script from the HTML where the form resides. Here is my PHP script:



<?php
$mail_to_send_to = "......@gmail.com";
$your_feedbackmail = "...@...coffee";

$sendflag = $_REQUEST['sendflag'];
if ( $sendflag == "send" )
{
$email = $_REQUEST['email'] ;
$name = $_REQUEST['name'] ;
$message = $_REQUEST['message'] ;
$subject = $_REQUEST['subject'] ;
$headers = "From: $your_feedbackmail" . "\r\n" . "Reply-To: $email" . "\r\n" ;
$a = mail( $mail_to_send_to, "Feedback Form Results", $message, $headers );
if ($a)
{
print("Congratulations, you've successfully entered!\r\n");
print("Be sure to 'Like' our Facebook page to complete your entry -> http://www.facebook.....\r\n");
print("We will contact you soon with more information :)");
} else {
print("Message not sent! Please contact brett@...com if you see this\r\n");
}
}
?>


If I have a simple form in index.html along with my PHP script, the mail sends and the success message prints. However, for structure reasons, I don't want the PHP to be in my large index file. Instead, put it in a file called "submit.php" and declared that as the action of my form:



<form id="contact-form" action="submit.php" method="post" enctype="text/plain">
<div class="row">
<div class="col-md-6">
// Fields ommitted
</div>
</form>


When I submit a message on the form, no email is sent, and the browser refreshes to a blank "myOriginalDomain/submit.php" site.


Where am I going wrong? Any advice as to what I'm missing is much appreciated.





Serve a request with post method in java

I'm developing a web server in java using ServerSocket.


But I have some issues I can't address them, I do not how, I've been stuck for a long time.


The first one is:


When I make a post petition using a form from Chrome. Im reading in the server something like:


POST /something.htm HTTP/1.1 List of headers CRLF ítem=value


When I finish of read all the header, comes 'CRLF', but happend 2 things.



1.chrome waits that I send a response with the page.

2.I wait to read the CRLF to start to read the 'mesage body' with the content "ítem=value"



Thus and as you can imagine my App stay there for a long time, waiting for a stream.


I mean I can not read the "messagge body". I can just if I send a response with a new page.


But this make me feel confused, because should I not read everythig? instead of read until the CRLF?


The protocol doest say that I have to read until the CRLF, send a response from the server and then read the message body.


This web server is a practice of school.


The profesor told us that we need provide GET and POST methods.


I've been reading and I found that when we use POST we need to use a CGI (commong gateway interface)


Here comes my second issue.


I need to use CGI? and probably this is why Im having troubles reading the message body? Or I can In some way use jsp?


Sorry if my my cuestion is dumb.


If there are some references you know, where you feel I need to accomplish my task I will be very grateful.





Show Data with nonrefreshing the Webpage

I would like to display data in the webpage without refreshing the whole webpage.


When I click one of the red button, the refreshed data from the database shall be displayed without updating the whole webpage.


I don't know how to do it.


Today, I'm using SQL server 2012 and VS 2012 with entity framework and ASP.net MVC.


enter image description here


enter image description here





C# How to set proxy for all https requstest

Is it possible to add to the entire application written in C # used a proxy. Mainly because of the class I pasted below. But I also use several times the usual WebRequest.


I would like the program to use the proxy for each connection that will perform. Is it possible?



using System;
using System.Diagnostics;
using System.Net;

namespace TestV.1.0
{




// To jest stworzenie klasy HttpHandler, dzieki której możemy pracować na http. Dziedziczy ona z klasy WebClient
internal class HttpHandler : WebClient
{
//Tworzenie obiektu który będzie przechochowywał cookiesy
public CookieContainer _container = new CookieContainer();

protected override WebRequest GetWebRequest(Uri address)
{
var request = base.GetWebRequest(address);

if (request is HttpWebRequest)
{
(request as HttpWebRequest).CookieContainer = _container;
}
return request;
}

protected override WebResponse GetWebResponse(WebRequest request)
{
var response = base.GetWebResponse(request);
if (response != null)
{
var uriBuilder = new UriBuilder(response.ResponseUri.Scheme, response.ResponseUri.Host);
_container.SetCookies(uriBuilder.Uri, _container.GetCookieHeader(request.RequestUri));
}
return response;
}

public void ClearCookies()
{
_container = new CookieContainer();
}
}

}




Server Side vs Javascript for dynamic HTML Rendering (2015)

Today I've been wondering about how many responsibilities should take either server side or client side rendering html, for example in the cases of user navigation, where you can have ui components rendered directly from the client.


I have found this post from 2011:


PHP vs JavaScript For Dynamic HTML Pages


Who asked exactly what I was wondering about, but as kakaxuna suggested these years client side have evolved a lot in the client side, having options like angular.js, backbone, or web components from google, giving javascript more power and making html rendering really simple.


Here quentin sugested to do almost everything you can do on the server side: http://stackoverflow.com/a/6106502/4154650


What I really would like to ask is? Have anything changed from that post? Is still "whatever server can do, do it on the server side" the best approach now?


I would appreciate any response, giving some tips,pros n cons, or recommendations, which could make me or other people with the same question to change and make more efficient the way to build their web architechture.





Online media player (like JWPlayer) with magnification ability

I'm looking for an online media player (like JWPlayer, Default YouTube Player) that can take my video from YouTube and in it's interface have an ability to zoom in on some parts of the screen (magnify some parts).


Does a player like that exist?





Why Are the Icons Not Displaying On Web

I have a web site http://serbay.net/demo/serbay4yasinda.com/ . And icons are displaying on local but are not displaying on web. What is the problem?





Edit data field of an application/shockwave-flash video in javascript

I'm searching for a javascript code that allow me to add this each time an application/shockwave-flash video (youtube embedded) is present on the page. Just take a look at the screen below :


http://goo.gl/HmaHGg (sorry for goo.gl link but I can't upload images)


So I want to add "?rel=0&autoplay=1" to the data field of the video so it can be played automaticly when the page is started.


I've tried to do "document.getElementbyId('myytplayer')" and "document.getElementById('ytplayer')" but the answer is null.


I hope that you know what I mean, thank you for trying to help me,


Have a good day ;)





what is the website for freelancer with webmoney?

i want to work as web developer freelancer. but first i need to find websites that have this option. i have already found websites line freelancer.com but they do not have option for my country which is Iran. can some one please tell me is there any website to help me that has my country is white list. my other problem is i can not get my money from sites , the way that is use in similar problem is web money. so i have two problem : 1- freelancer web sites which i can work from Iran ? 2 -freelancer web sites which has web money option or something like web money ?


thank you in advance.





Setting canvas.width automatically sets canvas.style.width

My webpage receives parameters about how big an canvas element on it needs to be and then creates it dynamically with JS. Note that I need to specify the canvas.width and canvas.height - that is not the same as specifying the canvas.style.width and canvas.style.height


The canvas is inserted in a div with id 'canvascontainer' - The required canvas width and height is held in variables canvasWidth and canvasHeight



var c = document.createElement("canvas");
c.width = canvasWidth;
c.height = canvasHeight;
document.getElementById('canvascontainer').appendChild(c);


On a desktop browser, this makes the element correctly, tested on an Android mobile, it does not. For example, with canvasWidth = 340 and canvasHeight = 494:



  • On desktop - canvas.width = 340 and canvas.height = 494, there is no mention of canvas.style.width and canvas.style.height in the css styling, and if inspected it's found to be 340 and 494.

  • On mobile - Somehow its gets set to canvas.width = 1020 and canvas.height = 1482, while the canvas.style.width and canvas.style.height is automatically set to 340 and 494


I set the following meta tag: <meta name="viewport" content="initial-scale=1">


If I, in the developer console, set my canvas on the mobile device to a specific size with canvas.width=340, the css width property is automatically set to a third of that value - I don't want that to happen!


I need to have the canvas.width on mobile to be 340 and canvas.height to be 494, and the css to have inherently the same values. Because at this stage, my canvas is larger that what is displayed so the full canvas isn't shown.


Any suggestions welcome, thanks.





Displaying A Product Catalogue In a C# .NET web application

this is my first post here. hello everybody. Just to check how do people display their products in a catalog page individually. I don't really know how to explain so thought i'd just screenshot an example here.


image link here: http://i.imgur.com/pmsBOWx.png


I am still brainstorming for ideas on how to create the "card" for the product, and i can only come up with the solution to dynamically generate the html and images for each product.


e.g.



<div id="MyDiv" runat="server" > </div>

foreach (product prod in productArrayList){
MyDiv.innerHTML = *generating the HTML for each product*
}


My question is, can i do it in a different manner that does not require the generating of HTML? sorry if this is an easy question, i am quite new in web development.


Thank you!





vendredi 26 décembre 2014

Python: Scrape Data from Web after Inputing Info

Could anyone help me revise this Python program to correctly submit information to the "Date Range" query, and then extract the "Close" return data. I am scraping data from the following url:



http://finance.yahoo.com/q/hp?s=%5EGSPC+Historical+Prices


And this is my current code, which returns "[ ]".



from lxml import html
import requests


def historic_quotes(symbol, stMonth, stDate, stYear, enMonth, enDate, enYear):
url = 'https://finance.yahoo.com/q/hp?s=%s+Historical+Prices' % (symbol)

form_data = {
'a': stMonth, #00 is January, 01 is Feb., etc.
'b': stDate,
'c': stYear,
'd': enMonth, #00 is January, 01 is Feb., etc.
'e': enDate,
'f': enYear,
'submit': 'submit',
}
response = requests.post(url, data=form_data)

tree = html.document_fromstring(response.content)
p = tree.xpath('//*[@id="yfncsumtab"]/tbody/tr[2]/td[1]/table[4]/tbody/tr/td/table/tbody/tr[2]/td[7]/text()')
print p

historic_quotes('baba',00,11,2010,00,11,2012)


I am an overall Python novice, and greatly appreciate any and all help. Thanks for reading!





Using top level domain on free host

I've a top level domain name. And I want to host it on a free web host like heliohost.org. I wonder is there still a web storage limit?!





Golang net/http request Body always empty

I'm trying to send JSON arguments to my server and parse them using json.Decoder. I've read that you should be able to get the query params from the request.Body property. The following is my server code:



func stepHandler(res http.ResponseWriter, req *http.Request) {
var v interface{}
err := json.NewDecoder(req.Body).Decode(&v)
if err != nil {
// handle error
}
log.Println(v)
}


Every time, I see 2014/12/26 22:49:23 <nil> (diff timestamps, of course). My client-side AJAX call is the following:



$.ajax({
url: "/step",
method: "get",
data: {
steps: $("#step-size").val(),
direction: $("#step-forward").prop("checked") ? 1 : -1,
cells: JSON.stringify(painted)
},
success: function (data) {
painted = data;
redraw();
},
error: function (xhr) {
console.log(xhr);
}
});


An example URL of what is sent:



http://localhost:5000/?steps=1&direction=1&cells=%5B%7B%22row%22%3A11%2C%22column%22%3A15%7D%2C%7B%22row%22%3A12%2C%22column%22%3A15%7D%5D


A nicer look at the params:



{
steps: "1",
direction: "1",
cells: "[{"row":11,"column":15},{"row":12,"column":15}]"
}


I have tried with both GET and POST requests.


Why does my req.Body never decode? If I try to print req.Body alone, I also see nil.





make hover underline without jquery only css3 and HTML5

Hello i need some advice or help make this button



[enter here is button][1]
[1]: http://ift.tt/1CZEBcy


but more specifically I need to hover at the bottom of the line to get to work without jquery using only css3 HTML5





Should ideally a DNS A record point to a machine located near the DNS itself?

I'm setting up a new domain that I recently bought. Consider a scenario where I have a registrar ("X"), and a VPS ("Y").


What I'm trying to understand is if it's better to:



  • Keep X as DNS, and point the A record to Y's IP address.

  • Use X only as a registrar, pointing the domain directly to Y's nameservers.


Is there any difference between the two choices?


Let me apology in advance for any confusion on this topic. I don't have much experience in the field. Thanks for helping out!





django-secure crashing my site

I was interested in imposing https on my entire python django project. I found this solution and it looks promising. I made these changes to the equivalent of my settings.py



SECURE_SSL_REDIRECT = True
SECURE_HSTS_SECONDS = 60
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_FRAME_DENY = True
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True


and



MIDDLEWARE_CLASSES = (
# This middleware is for ensuring that all pages use https
'djangosecure.middleware.SecurityMiddleware',
...


and



INSTALLED_APPS = (
# for https
'djangosecure',
...


When I run python manage.py checksecure, the message I get is 'All clear!`, however, when I deploy to google apps engine, I get this error:



File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/django- 1.5/django/core/handlers/base.py", line 51, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware django-secure- 1.0.1.djangosecure.middleware: "No module named django-secure- 1.0.1.djangosecure.middleware"


What am I doing wrong?





Web Development: unification of different tools

I've been using Php, MySQL, JS and HTML since quite a while now and I'm looking for a different tool to create websites.


I looked around the web to find a one-language or one-tool that unifies all of the server side, database and html, but couldn't find any.


I've thought there could be some language or framework that deals with all of those elements in ONE language.


Is it possible? Do you know of any?





URl resolution scheme of wordpress

what does the addresses like sssssssssssssssssssssssssssss.wordpress mean ?


Hey can anyone tell me what the above address mean? There are a lot of addresses on wordpress but I am not able to understand the addressing logic behind it.





How to get started of createing a web pages via Java (JavaFx)?

I want to start developing web pages. I'm familiar with Java (and JavaFx) and search for a way to use this knowledage to develop web pagaes. I googled but didnt found any good tutorial (most of the google results contained defenitions or basic hello world which was created by HTML). I didnt found any good comprehensive tutorial. (I looked at How can I get started creating a Java web service? but it was very basic)


When using Eclipse and SceneBuilder : 1. Is it possible to create a web page (with Labels, combox, ViewTree) which designed by SceneBuilder (I want to use SceneBuilder or any other tool to have quick design) ? 2. Can you please give links to good tutorials ?


I realy dont find where to start, please help :)


Thanks





Downloading an image from web using save as

I started doing programming (and other topics) challenges on the web, and in one of the challenges in cryptography i was given a picture and the only hint was 'Don't save the picture with "save picture as"'


So my question is what exactly does save as do, that can be somewhat different if i use a python code to download this picture.


im not sure about the tags, please suggest an edit.





jeudi 25 décembre 2014

how to send data from client side to server side

I'm new to web development, I'm trying to build a google app using java as server side, and javascript as client side. Is there any way that I can send an integer from client side to server side? thanks





Exposing relationships in REST APIs (how does the user refer to objects?)

In my models I have Events and Users. Each Event has a leader attribute that points to a User, however there isn't always a host necessarily, in which case host is null.


In my API:


GET /users/ returns a list of all users


GET /users/3/ returns user 3 info, {"name": "John", "href": "/users/3/"}


GET /events/ returns a list of all events


GET /events/2/host/ should return the user who is a host for event 2. (say this is user 3)


Should I return {"href": "/users/3/"}, simply a link to the User? Or the representation of the user itself, {"name": "John", "href": "/users/3/"}?


Lets say I go with the first option. How do I change the user?


PUT /events/2/host/ json={"href": "/users/2/"} - does this make sense? My server would then have to parse the endpoint to figure out which user id is the new host, and then assign that in the database. Seems a bit inelegant, but I think Flask should have a way to parse the endpoint (since it does the same thing for routing itself).


Finally, in the GET /events/2/ resource, I was thinking about having an attribute "host":{"href": "/events/2/host/"} in the representation. Does this make sense? And if there's no host, there would be no href attribute at all, just an empty dictionary assigned to host.





How can I make the animations be run one by one?

The HTML code:



<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
<li>e</li>
</ul>


The js code:



<script type="text/javascript">
$(document).ready(function() {
var lis = $("li");
for (var i = 0; i < lis.length; i++) {
$(lis[i]).animate({opacity: 0}, 1000);
}
});
</script>


I just find that the lis will disappear together. How can I do that they will disappear one by one?





How to wrap text around image in div?

I have problem with my composition of the webpage. Next div shows me my box with text and image, but text doesn't wrap the image. How can I solve that?


HTML:



<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Чехов</title>
<link rel="stylesheet" href="design.css" />
</head>
<body>
<h2 style="text-align: center">Антон Павлович Чехов</h2>
<div id="boxx">Антон Павлович Чехов (17 [29] Січень 1860 — 2 [15] липня 1904) — російський письменник, загальновизнаний класик світової літератури. За професією лікар.</div>

<img src="1.jpg" alt="Chehov">
</body>
</html>


CSS:



#boxx{
padding: 20px 20px 20px 20px;
position: fixed;
left: 30%;
border: 2px solid black;
fort: 2em Calibri;
width:500px;
height: 1000px;
}

img{
position: fixed;
left: 30%;
display: block;
margin: 7px 7px 7px 7px;
}




Search for .mp3 files in main folder and subfolders

im looking to make a web player from scratch so I can control my music from my phone. I've got a listing of all files within a folder done, but I need to get it to list the files within the subfolders of the main folder.


So sort of something like \Path\ - Shows all in \Path\ and \Path\subs\ shows the contents of all subfolders.


This is the code that I have written to allow me to search a folder for .mp3 files, but I cannot pin the way to search in subfolders as well.



$.ajax({
url: "music/",
success: function(data){
$(data).find("a:contains(.mp3)").each(function(){
var files = $(this).text().replace(/ /g, '');
files = $(this).text().replace(/.mp3/,'');
$('<p></p>').html(files).appendTo('#displayer');
$('#displayer > p:nth-child(odd)').css('background-color','#DDD');
});
}
});


Many thanks in advance





Unserializing complex POST data into objects

Suppose I have an HTML page with input data for the following relationship:


An User has the properties "given_name" and "family_name"


An User has N Phones (property "phones")


An User has 1 IdCard (property "idCard")


A Phone has the property "number"


An IdCard has the property "number"


Here's the HTML code:



<form method="POST">
<p>
<label>Given Name</label>
<input type="text" name="User[given_name]" value="My"/>
</p>

<p>
<label>Family Name</label>
<input type="text" name="User[family_name]" value="Name"/>
</p>

<fieldset>
<p>
<label>Phone 1</label>
<input type="text" name="User[Phone][][number]" value="7777-7777"/>
</p>

<p>
<label>Phone 2</label>
<input type="text" name="User[Phone][][number]" value="8888-8888"/>
</p>

<p>
<label>Phone 3</label>
<input type="text" name="User[Phone][][number]" value="9999-9999"/>
</p>
</fieldset>

<p>
<label>ID Card Number</label>
<input type="text" name="User[IdCard][number]" value="0000.0000.0000"/>
</p>

<input type="submit"/>
</form>


How would you handle the POST data on the server-side to automatically unserialize it into instances of the respective objects?


Example of desired result (pseudocode):



user = unserialize(new User, request.POST)

assert user instanceof User
assert user.given_name == "My"
assert user.family_name == "Name"

assert user.phones instanceof Array
assert user.phones.length == 3

assert user.phones[0] instanceof Phone
assert user.phones[1] instanceof Phone
assert user.phones[2] instanceof Phone

assert user.phones[0].number == "7777-7777"
assert user.phones[1].number == "8888-8888"
assert user.phones[2].number == "9999-9999"

assert user.idCard instanceof IdCard
assert user.idCard.number == "0000.0000.0000"


I'm asking this because while some web frameworks focus on shiny examples of saving a todo message into a todo list (simple and almost unstructured data), real life makes me deal with complex forms with complex relationships, and apparently there's no common solution for the problem that I described.


I come from a PHP/Yii background. Am I missing something?





Ideas for programming project outside of work

I've been working as a web and software developer for about a year now, but I find I've recently been contemplating starting a project outside of work. I created a couple of very amateur android apps during my undergrad, but now that I'm a "professional", I'm looking for something a bit more substantial. Also, since programmers are somewhat underpaid where I work, ideally I could monetize this project somehow to earn a little extra income on the side. Any ideas? :)


Thanks everyone!





How is navigation effect achieved in playgroundinc.com

If you'll go to playgroundinc.com you'll be greeted by a beautiful website. Then on top there is a navigation bar which is always there i.e. it seems that it is not reloading with each link click. Even if it is reloading again and again with each link click it just looks like that it is not.


Looking at the source code it just looks like regular navigation in header of the html page. I am just curious as to how one could achieve similar effect.





Mobile or Web Development?

I plan on starting Treehouse courses next month as well as utilizing other resources and I'm interested in web development as well as iOS development. I have a lot of free time so I will study for hours everyday and would like to know whats a better choice? Im interested in app development because I love apps and would eventually like to become a appreneur. I know if I study web development I will be able to get a job by the summer and create guaranteed income for me as well as experience.Basically what I'm asking is which path will have more opportunities for me? Thanks.. P.S. I have no background programming experience but I have dabbled in HTML and CSS.





Border bottom to link in menu on hover when having border bottom to the whole menu div

So I am making a menu, but I have encountered the problem of having a menu with a border bottom and links, which on hover have border bottom on the same line as the border of the menu. I have drawn a sample image to help you.


Since I don't have enough reputation click on the link to view the image. --> http://ctrlv.in/478501 <--


No need to add special effects like colors or movement, just the border. Please help





Bulb example with on off button in HTML

I got a code which is used for bulb on and off by touching the image. But


How to modify the code with two buttons On and Off. ? Pls help





Make a formatting box similar to Stack Overflow for web application

How to make a text formatting box similar to Stack Overflow. I have following questions which I have no idea.



  1. What is it called actually, the technical name?

  2. How the text end up at the back end? I mean if I had finished writing the text and formatting with bullets, bold, underline, how does this all formatting information picked and stored at the backend?

  3. Some ready-made format boxes avaiable (similar to what bootstrap is for css, readymade components, etc.)





Modern Web Languages [on hold]

I started by learning PHP, but I felt like I was missing the boat, so I started to research something "better" than PHP, and I came up with options like, Scala, Node, Python, RoR and etc.


But to run PHP, I must have a webserver, but those other languages don't need one, I can run them directly.


Most of the examples that I had were started in the terminal to run, but if there is some bug or crash the application stops. Must I implement a native webserver myself for those languages?


I'm too familiar with the LAMP/WAMP way to do things; write some code, throw it in some folder, and it runs like a charm. I can't use some webserver to run Node, for example, and the webserver take care of somethings for me, and when something goes wrong, the app just doesn't stop. Must I really to implement this by myself?





Result view as one page

In ebay, we all know that once we search an item, it will display for example 10 items per view, if there 100 items available in that search, we have to go to 10 pages to see by 10 items.


My problem is I need to display 100 item results at once. This is web scarping purpose. Please give your idea.





Why it doesn't set coockie?

I write code below but not set coockie!



setcookie("uname", $_POST['usname'], time()+36000);


I check $_POST['usname'] and set Session but coocki doesn't set.



$_SESSION['uname']=$_POST['usname'];


can any one help me?





Take data from a desktop app and display it into web

I have a real estate desktop app where I store a lot of info about apartments and pictures with them, is there any way to display the data witch is within the desktop app onto Web ?


Looking forward to receive some great tips from you guys Thank You





Is there any open-source ui library for web app and mobile (native) apps?

I'm googling for a cross patform ui library, but I can't find one.


I don't care about native ui, as I need to customize almost everything for same ux.


I think I can achieve this using two template files (web/native).. Then use opengl for native, and use html for web.


Does this make sense? Any idea to apply css to mobile apps or convert mobile ui to web ui?





mercredi 24 décembre 2014

Translate CSS IDs to all attributes

I am wondering if there is a simple way to look at a page which uses CSS IDs/Classes and be presented with all of the styles used in the ids/classes on each html element?


For instance:


If you saw is there a way - apart from manually going through each attached css document - to see


Thanks for any help!





webKitNotification in android browser

http://ift.tt/PTW0iM


this link have picture, told android browser 4.4+ can use web Notifications. it need prefix:webkit. How to ? thanks!





When should a website require e-mail validation for user registration?

I am developing a website where users register with their basic information including e-mail address. My question is, should I register users directly or send them an email with a link for verification to use their accounts?


I think it depends of the type of the website, if it is about some "serios" thing like e-commerce, it should require activation but if it's a simple thing (like a forum) then it might not be necessary. But I am not sure.


In the terms of security, if a user validates their email address, I can assume that he's not a bot and is a real person. But I can use a captcha on the registration screen to avoid this kind of check (actually I need to use captcha anyway).


So, not requiring email validation has the advantage of simplifying and quickening the registration process (which is related to the overall user experience), on the other hand, it has the disadvantage of not knowing if the e-mail belongs to the user or not. So it seems like a trade-off. How should I decide?





IIS 7 client certificate with user mapping + basic HTTP certificate and more

Environment:


IIS 7.0


Requirements: Within the same web application:




-Allow client certificate authentication for user1

-Map certificate to a domain user

-Domain user password must not be stored in plaintext. e.g. in any IIS configuration file

-Allow basic HTTP authentication for user2 (and OK if for user1 but not required)



Is this possible and if so how to configure?





Infer "Device Class" (Mobile, Touch, Desktop, etc) from User Agent String

Are there any tools which will infer "device class" information from User Agent strings?


This tool should have something like the following behavior:


For iPads:



getDeviceClass('Mozilla/5.0 ;iPad; CPU OS 8_1_1 like Mac OS X; AppleWebKit/600.1.4 ;KHTML, like Gecko; Version/8.0 Mobile/12B435 Safari/600.1.4')


Returns:



{ "deviceClass":"tablet",
"interface":"touch" }


Note that the behavior I'm describing is subtly different from 'normal' user agent parsing tools like BrowserScope's user agent parser). Which parse device specifics, e.g.,



{'device': {'family': 'iPhone'},
'os': {... 'family': u'iOS', },
'user_agent': {... 'family': u'Mobile Safari', }


The device class would be inferred from some combination of information about the device, os and user_agent.




Hopefully this is written in Python or JavaScript




More examples of desired behavior


For iPhones...



getDeviceType('Mozilla/5.0 ;iPhone; CPU iPhone OS 7_1_1 like Mac OS X; AppleWebKit/537.51.2 ;KHTML, like Gecko; Version/7.0 Mobile/11D201 Safari/9537.53')


Returns...



{ "deviceType":"phone",
"interface":"touch" }


Windows PC...



getDeviceType('Mozilla/5.0 ;Macintosh; Intel Mac OS X 10_10_1; AppleWebKit/537.36 ;KHTML, like Gecko; Chrome/39.0.2171.95 Safari/537.36')


Returns...



{ "deviceType":"pc",
"interface":"other" }