server-side

Load random CSS on page refresh

和自甴很熟 提交于 2019-12-21 09:09:14
问题 I was wondering whats the best way to call a random css file on page refresh with Javascript? Many thanks 回答1: var link = []; link[0] = "http://site.com/css/style1.css"; link[1] = "http://site.com/css/style2.css"; link[2] = "http://site.com/css/style3.css"; $(function() { var style = link[Math.floor(Math.random() * link.length )]; $('<link />',{ rel :'stylesheet', type:'text/css', href: style }).appendTo('head'); }); Edit : Thank you Basil Siddiqui! var link = []; link[0] = "http://site.com

What is the best, most efficient, Client pool technique with Erlang

好久不见. 提交于 2019-12-21 04:42:23
问题 I'm a real Erlang newbie (started 1 week ago), and I'm trying to learn this language by creating a small but efficient chat server. (When I say efficient I mean I have 5 servers used to stress test this with hundreds of thousands connected client - A million would be great !) I have find some tutorials doing so, the only thing is, that every tutorial i found, are IRC like. If one user send a message, all user except sender will receive it. I would like to change that a bit, and use one-to-one

Server side javascript on Google app engine

China☆狼群 提交于 2019-12-21 03:34:28
问题 Is there any way to run a Javascript engine, like Spidermonkey, on Google App Engine? Spidermonkey is a C module, so obviously that wont work (GAE doesn't allow those types of modules)... is there something else available? 回答1: Google is now supporting custom language on Google App Engine. So we can do Node.js https://www.youtube.com/watch?v=Q8jZHc0NS6A https://developers.google.com/cloud/managed-vms 回答2: Here is an article about running Rhino on AppEngine/Java. That should get you a long way

Server-side clustering for google maps api v3

做~自己de王妃 提交于 2019-12-20 12:36:34
问题 I am currently developing a kind of google maps overview widget that displays locations as markers on the map. The amount of markers varies from several hundreds up to thousands of markers (10000 up). Right now I am using MarkerClusterer for google maps v3 1.0 and the google maps javascript api v3 (premier) and it works pretty decent for lets say a hundred markers. Due to the fact that the number of markers will increase I need a new way of clustering the markers. From what I read the only

API for server-side 3D rendering [closed]

*爱你&永不变心* 提交于 2019-12-20 10:08:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I'm working on an application that needs to quickly render simple 3D scenes on the server, and then return them as a JPEG via HTTP. Basically, I want to be able to simply include a dynamic 3D scene in an HTML page, by doing something like: <img src="http://www.myserver.com/renderimage?scene=1&x=123&y=123&z=123">

node.js running alongside Apache PHP?

吃可爱长大的小学妹 提交于 2019-12-20 08:02:33
问题 I am trying to get my head round node.js... I am very happy with my LAMP set up as it currently fulfils my requirements. Although I want to add some real-time features into my PHP app. Such as showing all users currently logged into my site and possible chat features. I don't want to replace my PHP backend, but I do want scalable real-time solutions. 1. Can I throw node.js into the mix to serve my needs without rebuilding the whole application server-side script? 2. How best could node.js

my server side PHP still got hacked after reCaptcha (hundreds-spam-emails)

血红的双手。 提交于 2019-12-20 06:01:16
问题 My previous question on StackOverflow was about that someone was sending me hundreds of spam emails every few hours. Now, I fixed the script on the server side but the next morning I still got 30 emails or something and my hosting company gave me a new password to my FTP and moved my index files to a backup map(website offline), they said it was hacked because of the suspicious script below. They said "This often happens via a leaked script in your website, a script that is "out of date".

link between private key and signed certificate in keystore

荒凉一梦 提交于 2019-12-20 04:21:08
问题 I am doing the jetty SSL configuration . I have created CSR using keytool which has added a private key to the keystore, Received the certificate based on the CSR, converted the certificate to DER format and imported the certificate into the keystore as trustcacerts The signed certificate has the root/intermediate certificates in the certificate path I also installed the root and intermediate certificate in the IE under the trusted root certificate after converting it into DER format. while

Show Number of Live Page Viewers [duplicate]

徘徊边缘 提交于 2019-12-19 10:26:20
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: how to count the site current visitors using java script or php I have an embedded stream on my website, but I want to pull the number of live viewers on the page. Is there a way to do this with PHP / AJAX, show the number of people currently viewing one of my webpages? 回答1: DISCLAIMER: I did something like this a LONG time ago, so here is the ugly old code (That I'm not going to put effort into making look

What is the Meteor server-side path to /public?

回眸只為那壹抹淺笑 提交于 2019-12-19 06:55:48
问题 On the Meteor client-side, I know that files in the project's public directory are referenced at '/'. How are they referenced on the server-side? I am trying to get a directory listing with fs.readdir, but I don't know how to construct the path to get to the server side equivalent of the client side '/images/gallery'. Any advice? 回答1: When I use the fs-module I just use './public' for my public folder, works fine on my local install. And then I set it to whatever's correct at the production