server

GUI update with threads error

断了今生、忘了曾经 提交于 2019-12-02 22:10:33
问题 I make board game in javafx and I stumbled upon a problem. My application has Client/Server connection. Whenever server sends data about where player moved his pawn I call a function movePawn() that moves pawn and call another function refresh() that repaints board and pawns. unfortunatelly I get error saying that function is called from thread that is not FX and therefore cannot proceed. I tried tasks and Platform.runLater but either I'm doing it wrong or it doesnt work. Can anyone help?

SQL SERVER 2005还原数据库

徘徊边缘 提交于 2019-12-02 21:44:43
在SQL SERVER 2005下还原数据库 1、新建数据库A,右键还原数据库,此时目标数据库为A,选择备份文件B_db_201311040200.BAK,还原时提示“备份集中的数据库备份与现有的A数据库不同 ” 2、google一下,有人说是文件名不同,即B的数据库文件为B.MDF,要还原到A.MDF上,所以报错 3、删除A库,在根目录【数据库】上右键,还原数据库,先选择源文件,然后再目标数据库中会自动出现B,选择B之后即可还原成功 问题:如果要还原出一个名称不同的库该怎么处理? 1)还原后修改名称? 来源: oschina 链接: https://my.oschina.net/u/557089/blog/174087

解决MySQL server has gone away问题

旧时模样 提交于 2019-12-02 21:34:54
今天跑的一个php脚本遇到了一个MySQL server has gone away问题的问题 原因是遍历循环生成excel并打包的时间过长,超过了mysql的 wait-timeout时间,导致mysql断开了链接。 两种方法可以解决: 1.增加你的 wait-timeout值,这个参数是在my.cnf(在Windows下台下面是my.ini)中设置,(这个值的单位是秒,意思是当一个数据库连接在10秒钟内没有任何操作的话,就会强行关闭) 2.检查 MySQL的链接状态,使其重新链接 //数据库操作类中间的一个函数 function ping(){ if(!mysql_ping($this->link)){ mysql_close($this->link); //注意:一定要先执行数据库关闭,这是关键 $this->connect(); } } $DB->ping();//导致数据库连接关闭,检查并重新连接 $threeResult = $DB->fetch_arrays($sql); 经过这样处理后,可以非常有效的解决MySQL server has gone away这样的问题,而且不会对系统造成额外的开销 来源: oschina 链接: https://my.oschina.net/u/188211/blog/162441

Where is the data directory in Redis?

徘徊边缘 提交于 2019-12-02 21:04:06
After writing some data to a redis server, I could read the data from a client. However, how can I find the data directory on the file system? Quickest method: use redis-cli. redis-cli config get dir If you have authentication configured, you will need to pass that in using -a password Replacing "password" with your password. Find your Redis configuration directory, probably /etc/redis . Then look in the config file called redis.conf and find the line that starts dir . It will look similar to this: dir /etc/redis/database This will do the job slowly but surely if you can't be bothered to look

Server http:/localhost:8080 requires a user name and a password. The server says: XDB

℡╲_俬逩灬. 提交于 2019-12-02 20:47:38
I am trying to access localhost:8080 but it is showing me I need to enter user name and pass word. I remember messing up with the server some 4 months ago while I was trying to develop a web application and hosting my domain name on my pc, Unfortunately I become unsuccessful. While working with servlets I was tring some security features and till some time i did not see and of these pop up windows asking for authentication. I tried to enter the password that I was playing with but non of those are working. Is there anyway i could get out of this problem? This is http authentication. You can

django development server, how to stop it when it run in background

走远了吗. 提交于 2019-12-02 20:11:14
I use a clode server to test my django small project , I type in manage.py runserver & ,and then I log out my cloude server ,I can visit mysite normally but when I reload my cloude server , I don't know how to stop the development server, I had to kill the process to stop it, is there anyway to stop the development? The answer is findable via Google -- and answered in other forums. Example solution is available on the Unix & Linux StackExchange site . To be explicit, you could do: ps auxw | grep runserver This will return the process and its respective PID, such as: de 7956 1.8 0.6 540204

How to upload a PDF file to server in android?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 20:02:51
问题 I referred some previously asked questions but not get proper solution.I am creating an Application and want to send PDF file by selecting it from File Manager. Thanks any type of help would appreciated. 回答1: Only you have to change this lines of code when you have to select PDF file from gallery . intent.setType("application/pdf") this will search only PDF files from gallery. Intent intent = new Intent(); intent.setType("application/pdf"); intent.setAction(Intent.ACTION_GET_CONTENT);

websphere - CWWKE0054E error unable to open file

谁说胖子不能爱 提交于 2019-12-02 18:36:32
问题 i am trying run the websphere liberty profile server from the command line. I am following the steps told here : https://developer.ibm.com/wasdev/downloads/liberty-profile-using-non-eclipse-environments/ I have created the server with the name server1. But when the extraction completes and I try to start the server using the command : server start server1 the server throws an error : CWWKE0054E: Unable to open file C:\wlp\wlp\usr\servers\server1\logs\C:\Users\Furquan\AppData\Local\Temp\\ihp

How to pass variable from python to javascript

本小妞迷上赌 提交于 2019-12-02 18:28:03
问题 I have a server in python to process an id (the id of youtube video), this is the code: class MessageHandler(tornado.web.RequestHandler): def get(self, action_id): print "Message = " + action_id if action_id == "id": for ws in opened_ws: ws.write_message("ID: " + action_id) return render_template('js/player.js', action_id=json.dumps(action_id)) (...) I use the return render_template to pass "action_id" to player.js, which is a function to process films using the API from Youtube, the code is

How do multiple servers work in sync for web application?

社会主义新天地 提交于 2019-12-02 18:25:08
My first question is, I often read about people using multiple dedicated servers to run their websites, and process queries from users. But how do they exactly do this? I mean, when I enter a domain name, a DNS resolves maps that to an IP address, but I am lost after that.. is there some kind of master/slave architecture there to load balance incoming requests amongst the (potentially) hundreds of servers? If that's the case, how do the various servers, share data (database for e.g.)? Will they be connected to the same hard disk? ultramonkey will give you a good description of how to load