server-side

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

帅比萌擦擦* 提交于 2019-12-19 06:55:21
问题 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

OpenSSL Client-side Certificate-based Authentication Fails

北城余情 提交于 2019-12-19 03:37:30
问题 I am trying to run the following command: [root@localhost certs]# openssl s_client -connect localhost:7043 -cert /opt/openssl-1.0.0a/ssl/certwork_client/client.crt -key /opt/openssl-1.0.0a/ssl/certwork_client/client.key -CAfile /opt/openssl-1.0.0a/ssl/certwork/ca.crt -showcerts -state -verify 2 verify depth is 2 CONNECTED(00000003) SSL_connect:before/connect initialization SSL_connect:SSLv2/v3 write client hello A SSL_connect:SSLv3 read server hello A depth=1 C = US, ST = Florida, L = Orlando

Server Side File Browsing

荒凉一梦 提交于 2019-12-18 12:43:55
问题 I'm working on a web app that reads data from a set of text files and maps it to a MySQL database. Currently, the form requires manual input of the file path, but I would like to add a file chooser to this field to make that part of the setup a little less tedious. The solutions I've found all allow selection of a single file, but I'm looking for one that will allow the use of input patterns, as most of our jobs require us to pull multiple files off the server in one go. Any help in this

Using jquery to get per row totals and grand total of table

ぐ巨炮叔叔 提交于 2019-12-18 12:34:18
问题 So the short version of this is: Can I traverse only the elements within the matched element of the selectors before the each() ? Or is there a simpler way of getting what I want without an each() loop? I thought this would be much easier, which makes me think I'm just missing some fundamental principle of element traversing with jquery. So here's the scenario: I have a table (and it is appropriate in this case), where each cell has a text input . The last input is read-only and is supposed

Serverside and clientside javascript

前提是你 提交于 2019-12-18 09:24:33
问题 Does serverside javascript exist, if yes, is it possible to clientside javascript to interact with serverside javascript? For example, is it possible for clientside javascript to request from the serverside javascript to return part of a json file which is stored on the server without downloading the whole json file? I understand that I can do this with other serverside languages like aspx, php etc etc, but wanted to know if serverside javascript exists and if it can do something similar with

PHP server side timer

大憨熊 提交于 2019-12-18 07:24:26
问题 I need to make a page that has a timer counting down. I want the timer to be server side, meaning that when ever a user opens the page the counter will always be at the same time for all users. When the timer hits zero I need to be able to run another script, that does some stuff along with resetting the timer. How would I be able to make something like this with php? 回答1: Judging from "when ever a user opens the page" there should not be an auto-update mechanism of the page? If this is not

Server-side jquery

喜你入骨 提交于 2019-12-18 06:57:26
问题 Say I have a script written in perl or python. What's the easiest way to write a function that would use jquery selectors on strings as part of it? i.e. to be able to do: jquery_selector('table.new#element', text) where jquery_selector is a function that runs a jquery selector on the html string stored in text . Even if it was just limited to returning strings (not full jquery objects), it would still be really useful. i.e. if you were required to give a javascript function as a callback

Best way to create nested array from tables: multiple queries/loops VS single query/loop style

守給你的承諾、 提交于 2019-12-18 05:03:48
问题 Say I have 2 tables, which I can "merge" and represent in a single nested array. I'm wandering what would be the best way to do that, considering: efficiency best-practice DB/server-side usage trade-off what you should do in real life same case for 3, 4 or more tables that can be "merged" that way The question is about ANY server-side/relational-db. 2 simple ways I was thinking about (if you have others, please suggest! notice I'm asking for a simple SERVER-SIDE and RELATIONAL-DB , so please

Taking website screenshot, server-side, on a Linux rented server, free

雨燕双飞 提交于 2019-12-17 22:44:16
问题 Ok so, right now I can't really afford to pay for any service. I want to be able to take screenshots using my rented server, which is Linux based, and output them on the screen. I know there are a lot of services that do this, but they usually have limits or watermarks, or you have to wait for your screenshot to be taken from the queue. Is there any way to just take the screenshots myself and maybe later cache them or anything? I'm using PHP, but I'm not limited to it; I'm just on a Linux

Read echo'ed output from another PHP file

二次信任 提交于 2019-12-17 18:33:28
问题 I want 1 PHP file to "run" (include?) another PHP file on the same server, and access its echo'ed output as a string. How do i do this in PHP? Any inbuilt functions to do this? Or any better way of executing another PHP file and getting its output? 回答1: You can use PHP's output buffering to accomplish this: ob_start(); // begin collecting output include 'myfile.php'; $result = ob_get_clean(); // retrieve output from myfile.php, stop buffering $result will then contain the text. 回答2: You can't