w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to reload swf (reload class definition) in a running application?
There are a couple of things going on here... the first is that when you load the same Class from different swfs (which in essence is what you are doing), Flash assumes that the first definition it got is the correct one. You can get around this with things like loader contexts, but I suspect that your loading swf is directly touching the loaded Classes, so this probably won't work for you. I see you're choosing to load everything in the main context, so it's definitely not going to work for you until you change that. Instead of directly touching the Classes, instead program to Interfaces (Abstract or Base Classes would work as well) and provide an API for your main swf to request the local implementation of the Interface from the loaded swf. This would allow you to isolate the different

Categories : Actionscript

how to keep a node server app running on windows server
I'm not sure about running node in iis. However, you can take a look at the node packages forever, pm2, and nodemon, which will recover the instance in case of failure. Here's how to install node.js as a service Here's something on installing node in iis 7.5 Just an update. I've been using iisnode at work for the better part of a year. I would recommend it if you are deploying to Windows.

Categories : Node Js

running a server file on node.js
When you close the terminal, everything that runs in it is killed. There are many solutions on both Linux and Windows systems, most of them create some sort of a service which then runs in the background. Here are some possible solutions: http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever https://github.com/indexzero/daemon.node http://www.coretechnologies.com/products/AlwaysUp/Apps/RunNodeJSAsAService.html http://coreybutler.github.io/node-windows/manual/#!/api/nodewindows.Service Pick the one that is best for you. Related question on StackOverflow: How to run node.js app forever when console is closed?

Categories : Node Js

How to switch app.js to app2.js running on node server?
(Assuming you're using Express) You can create some middleware that checks if the user is authenticated. If they are, it forwards the request; otherwise, it does whatever it needs. See app.use in the documentation for more information. It turns out that if you want to apply middleware to specific routes, you can; just pass the middleware as additional arguments after the path and before the main handler.

Categories : Node Js

Running a forward proxy server in nodejitsu using node js
You can write a simple proxy using the request module, like this: var http = require('http'), request = require('request'); // For nodejitsu, this will be port 80 externally var port = process.env.PORT || 8000; http.createServer(function(req,res) { req.pipe(request(req.url)).pipe(res) }).listen(port); However, this will only work with http, not https. Nodejitsu also produces a proxy module, you may get some ideas on what to do next by looking at that.

Categories : Node Js

Receiving data sent from AIR app in node.js server running on Heroku
It seems it only does not work on the Simulator, once on testing on a real device it will work with the URL given by Heroku. Still don't know how to make it work on the Simulator though.

Categories : Node Js

How do I create an HTTP server with Node.js on a DreamHost VPS running Apache?
Turns out I needed to tell Apache to forward the requests for that domain, and DreamHost provides a nice frontend for mod_proxy: http://wiki.dreamhost.com/Proxy_Server Thanks, CodeCaster!

Categories : Node Js

error on running node.io via commandline on windows server 2008
I had the same problem and tried a couple of things. It seems Windows 7 had a problem with the command file name itself (node.io.cmd). If you copy this command to something without the period (ie. nodeio.cmd), then I could successfully invoke the tool using "nodeio" instead of "node.io". The file that would need to be changed was in my %APPDATA% pm directory. My %APPDATA% environment variable was mapped to "C:Users{my user name}AppDataRoaming".

Categories : Node Js

socket.io becoming slow and unresponsive after node server is left running for a couple days
You are probably experiencing a known bug in node.js that was recently fixed - see issue#5504. Is the problem still there after upgrading to node v0.10.11?

Categories : Node Js

phpstorm and remote server
Remote Hosts Access plug-in needs to be enabled: Then you should have Deployment settings where a server can be added:

Categories : PHP

phpstorm: Difficulty in setting up local server on PHP STorm
File->New Profile From Existing File->Web Server is installed locally->(Choose your destination folder->(click on Project root{located on the same page})->Choose Your Webserver{local host} Note: That the folder path will be automatically appended to the

Categories : PHP

Node.js node-apn module for Apple Push Notification stopped working after moving to Amazon EC2 instance running Ubuntu 12.04
Check your node --version s. On my Mac, homebrew installed v0.10.12 but on the server I was running v0.11.8-pre (by mistake). Apparently the present node-apn doesn't work under the unstable. I had this same extremely frustrating issue and hunted among firewalls/OpenSSH stuff until I realized the APNS connection still worked through PHP. The Ray Wenderlich script is a quick way to check if the problem is with node or elsewhere.

Categories : Node Js

How to reload current running app's SharedPreferences from external XML file downloaded from cloud
Use prefs = getSharedPreferences(PREFS_FILE, Context.MODE_MULTI_PROCESS); instead of prefs = getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE); http://developer.android.com/reference/android/content/Context.html#MODE_MULTI_PROCESS

Categories : Android

java scripts on my website running locally but not running on server
Uncaught SyntaxError: Unexpected end of input jquery.js:6 Uncaught ReferenceError: jQuery is not defined Check if you uploaded jQuery correctly. The file might have been truncated in the process. UPDATE Checking your jQuery file, the file truncates on line 6 with these as the last few characters. if(this[0]){var b=f(a,this[0].owne SOLUTION Re-upload the jQuery file (jquery.js) again, or Use jQuery CDN: Change: <script src='http://www.broadigital.co.ke/style/newcss/js/jquery.js?ver=1.7.2' type='text/javascript'></script> To: <script src='http://code.jquery.com/jquery-1.7.2.min.js' type='text/javascript'></script>

Categories : Javascript

How reload configuration file on server
Check if you have: [assembly: log4net.Config.XmlConfigurator(Watch=true)] Watch means that log4net will pick up changes in the config file. You can also configure this in your application configuration. <appSettings> <add key="log4net.Config" value="log4net.config"/> <add key="log4net.Config.Watch" value="True"/> </appSettings> If it stop logging the temp dir, and does not start in de logs dir, you probably have a permissions problem. Give your apppool user access to the logs directory. If that is not working, you can enable log4net internal debuging: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="log4net.Internal.Debug" value="true"/> </appSettings> </configuration> o

Categories : C#

Error while writing a Google CCS server in node using node-xmpp
The important part is to send the message in the required format : <message id=""> <gcm xmlns="google:mobile:data"> { "to":"REGISTRATION_ID", // "to" replaces "registration_ids" "message_id":"m-1366082849205" // new required field "data": { "hello":"world", } "time_to_live":"600", "delay_while_idle": true/false } </gcm> </message> It doesn't matter if you use a template or not. I don't know python nor javascript, but the purpose of the template in the python example seems to be simply to avoid the need to write the xml tags that wrap the JSON every time you send a message. You can append them to the JSON when you send the message.

Categories : Javascript

How to reload a php page automatically from server and not from browser
Run the PHP script from a command line with your CRON or Windows Task Scheduler. Create a new Task, and execute that task as often as you like without a user or a browser. C:phpphp.exe -f C:My_FolderMy_Script.php

Categories : PHP

Read XML node attributes without using node name in SQL Server query
declare @xml xml set @xml = '<book Category="Hobbies And Interests" PropertyName="C#" CategoryID="44" /> <sport Category="Hobbies And Interests" PropertyName="Cricket" CategoryID="46" />' select T.c.value('@PropertyName', 'varchar(100)') from @xml.nodes('/*') T(c) If you expect that there can be elements without PropertyName attribute, you can use: select T.c.value('@PropertyName', 'varchar(100)') from @xml.nodes('/*[@PropertyName]') T(c) If you also expect that elements can be nested, you can use: select T.c.value('@PropertyName', 'varchar(100)') from @xml.nodes('//*[@PropertyName]') T(c)

Categories : Sql Server

Can I force a grails dev server to reload when any code recompiles?
CRITICAL UPDATE I was able to get what you were looking for. Laying it down step wise: REQUIREMENT - When Helper class is modified, service class should be refreshed to refer to the modified helper class. SETUP //src/groovy class SampleHelper { String name = 'Heisenberg' def sayMyName(){ "$name" } } //grails-app/service import javax.annotation.PostConstruct class SampleService { String cachedName @PostConstruct def initIt(){ cachedName = new SampleHelper().sayMyName() } def serviceMethod() { cachedName } } //controller class SampleController { def sampleService def index() { render sampleService.serviceMethod() } } PROBLEM STATEMENT When name in helper class is updated to Gus, the class refreshe

Categories : Tomcat

Datatables: How to reload server-side data with additional params
This is normally the right way to retrieve the initialization settings: var oSettings = oTable.fnSettings(); Why is it not what you need? What's wrong with these params? If you need to filter data depending on your additional filters, you can complete the array of "AJAX data" sent to the server using this: var oTable = $('#myTable').dataTable(); var oParams = oTable.oApi._fnAjaxParameters( oTable ); oParams.push({name: "your-additional-param-name", value: your-additional-param-value }); You can see some example usages in the TableTools plugin. But I'm not sure this is what you need... :-)

Categories : Database

Node: Distinguish between a reload event and a browser exit with socket event
the main concept of my thought, is that you can never know that a user is reloading or disconnecting and never come back for 1day or so , there are ways to detect that the browser is navigating away from the website, but cant know (in server side) that it will go to the same address, or different.. Instead if any clients disconnect, of course the disconnect event will be fired to socket.io server for that socket, so taking that in account you can set a Session Variable to false you can say that the player is "disconnected" so when the client of that session "reconnects" aka reloads , the socket.io will fire an "connection" event, BUT reading the session variable you can say that the client has previously disconnected and then connected again. Timestamps could apply to this so a reconnecti

Categories : Node Js

Cursors running 100 times slower in SQL Server 2008 R2 than in SQL Server 2000?
After reading all the suggestions, I ended up doing some old trick and it worked miracles! I had this cursor which was taking almost 3 mins to run, while the enclosing query was instant. I have other databases with more complex cursors that were only taking 1 second or less, so I ruled out the global issue on using cursors. My solution: Detach the database in question, but ensure you tick Update Statistics. Attach the database and check performance This seems to help optimize all the performance parameters without the detailed effort. I am using SQL Express 2008 R2. Would like to know your experience.

Categories : Sql Server

Running script on a remote server in bash working on 1 server, not on the other
It's just a guess but i would try this filename=hostnames > export.log while read -r -a line do hostname=${line//"} echo $hostname":" >> export.log ssh -t -t $hostname "bash -s" < script.sh >> export.log & done < "$filename" exit Just to make sure you don t get stuck on one server.

Categories : Bash

Netscape Enterprise Server and Server-Side JavaScript (SSJS) vs Node.js
The main difference would be the evolution of Javascript over the the past 15+ years. Node.js uses the V8 Javascript Engine which would be far more optimized for modern computers. Wikipedia has a good list of the differences between various server-side JS solutions. Here is a list of features for Netscape Enterprise Server - provides a good idea of what makes modern SSJS solutions much better. Why did it not gain attention? Realistically, client-side JS has only recently started to become the standard for web development so it was unlikely anybody would have considered using it for server-side development when it wasn't even really widely adopted for it's original purpose. I say widely adopted in that previously it was always difficult to cater JavaScript solutions to all browsers.

Categories : Javascript

how to download a pdf file stored in a server in client side in node.js server
Send the correct mime-type, and then the content of the pdf. fs.readFile('temp/xml/user/username.pdf',function(error,data){ if(error){ res.json({'status':'error',msg:err}); }else{ res.writeHead(200, {"Content-Type": "application/pdf"}); res.write(data); res.end(); } }); I'm assuming res is your response object. Ah but you are using Express. Use Jonathan's answer instead.

Categories : Node Js

How to copy file from one server to another server in node js using webDAV protocol?
You can try with node module - poster for directly upload to server Stream local file var poster = require('poster'); var options = { uploadUrl: 'http://mysite.com/upload', method: 'POST', fileId: 'file', fields: { 'myfield': 'value', 'myfield2': 'value2' } }; poster.post('file.jpg', options, function(err, data) { if (!err) { console.log(data); } }); Stream remote file var poster = require('poster'); var options = { uploadUrl: 'http://mysite.com/upload', method: 'POST', fileId: 'file', fields: { 'myfield': 'value', 'myfield2': 'value2' } }; poster.post('https://www.google.com/logos/2012/addams11-hp.jpg', options, function(err, data) { if (!err) { console.log(data); } });

Categories : Node Js

Running node on EC2
This is a setup for a Linux VM where I run a MEAN app. I run my node application on a non-privileged port (>= 1024) on my VM. I use an Upstart/Monit combo to start it and keep it running. You can check out this blog post about how to set it up. For the port 80 traffic I use NGINX as a reverse proxy to my node aplication. NGINX will allow you to route the incoming traffic based on the incoming URL. Here is link to a good SO page on how to set that part up.

Categories : Node Js

Don't reload Activity orientation change but still reload Fragments
You need to move your network operations outside of the Activity/Fragment lifecycle so that your Activity and Fragments can work as intended and you can have long running network operations that aren't interrupted by Activity and Fragment lifecycles. Remember that Activities and Fragments are meant to be dynamic, have narrow concerns, etc. They're not designed for network operations. That's why there's SO much emphasis on using background threads for various things and why there are Services. For example, you could use an IntentService to handle your network operations. Here's an example of how to your Activity would deal with resuming/updating information when configuration changes happen: http://stackoverflow.com/a/4481297/2306657

Categories : Android

Running Node.js app with Ruby app together
Kramdown is a parser gem, and like bundler it can be called from commandline. Kramdown takes markdown or any of its superset as an input parameter and spits out html/latex/kramdown as o/p. Without any options the default output is HTML and that's the desired o/p in this case. So we just need to call kramdown from shell from the node.js app (if kramdown gem is installed, if not $gem install kramdown). Here is what I guess it should be done in node.js. (I have zero knowledge in node.js, if there is something like ffi available to interface with ruby? if so its the better option than calling it from shell). var util = require('util'), exec = require('child_process').exec, child; child = exec('kramdown '+markdownFile, // command line argument directly in string function

Categories : Ruby

pdf.js running hello world in node app
I tried your code without disableWorker=true, because otherwise the promise never gets called, and also included pdf.worker.js in the project (the other file generated by node make generic) so I don't get .workerSrc error (what was it exactly?). Also the PDFDoc constructor seems to be obsolete in the version of pdf.js I'm using - 0.8.0. Making these changes the PDF is loaded fine.

Categories : Javascript

running my sample app using express.js and node.js
You can put the files wherever you like, so long as the user the server is running as can read them. If you want that code to serve them, however, then you will need to replace all the response.* code you have with code that will: Identify which file is being requested based on the data in request Determine if that file exists (and send a 404 response if it does not) Determine the correct content type for that file type and set the header appropriately Read the file in and output it in the response In other words: Node.js is not a web server. You can write a web server in JavaScript and run it on Node.js, but you've only taken the very first steps along that route.

Categories : Javascript

Error running Node.js app on Heroku
That demo isn't a node app, or atleast isn't packaged the way heroku likes it with a Procfile and everything. If you have a node app, then it would server the static files as per it's code (or atleast it should), but heroku isn't a standard web server for static pages (like Apache or nginx or whatever). Heroku was built to run web apps, which are essentially their own servers. If you get a node server running, this heroku quickstart for node should help you out. https://devcenter.heroku.com/articles/nodejs

Categories : Node Js

Running EJB timer on each node in a cluster
Yes, you want a non-persistent timer. Per the EJB 3.1 specification: Non-persistent timers can be created programmatically or automatically (using @Schedule or the deployment descriptor). For automatic non-persistent timers, the container creates a new non-persistent timer during application initialization for each JVM across which the container is distributed. (As an aside, Derby databases can only be shared by multiple processes if you use Derby network server. Multiple application server processes cannot open a Derby database simultaneously.)

Categories : Java

Change reload interval to waiting after the last reload
I have just done something similar. You should use activate property on your route (http://emberjs.com/api/classes/Ember.Route.html#method_activate). Checkout this pull request: https://github.com/chrmod/rowmark/pull/2/files Some example: App.NoteRoute = Ember.Route.extend({ activate: function() { this.interval = setInterval(function() { this.get('controller').set('toSave', true); }.bind(this), 5000); } }) UPDATE I understand you wrong. Sorry for that. First of all you need to know that find from Ember Model or Ember Data returns promises (http://emberjs.com/blog/2013/05/28/ember-data-0-13.html) I think you can do such trick to implement that: App = Ember.Application.create({ ready: function() { var switchboard; setInterval(function() { switchboa

Categories : Javascript

WL 5.0.6.1 - Dialog "Unexpected response" (Reload,Close,Details) comes up at WL-Server Connection when on public WIFI Captive Portal / AuthPage
You need to implement a challenge handler that will take care of your login form. See this training module - http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v600/08_02_Form_based_authentication.pdf The only difference is that login form returned by your gateway and not WL server, but from client perspective it doesn't really matter.

Categories : Android

running multiple files on node js at the same time
This is normal behavior. Node will only exit if there's nothing more to do (or if you manually stop it via Ctrl+C). Since you told http to listen(), the process will stay alive indefinitely. It's not exactly clear what you're asking, but if you want to run additional files inside your app, you simply require() them. var otherFile = require('./otherFile.js') // the .js is optional otherFile will now be set to whatever you do to module.exports in otherFile.js. You should read the module documentation to get a full understanding of how require works. If you want to run other unrelated files with node at the same time, open a separate command prompt window. I will now read between the lines a little: it looks like you might be wondering how to get http to serve files from disk like

Categories : Javascript

Why does BFS gives different running time for different node positions in same graph?
First of all: did you run it multiple times? Results might vary quite a lot. Anyways, there is a good chance that it is because of caching issues. Computers usually work quite well when you access an array from 0, because they immediately cache (a part of) the array from the index you are accessing. But if you start from the end of the array, it will not have the entire array in a fast cache. (this is no different for a vector, since a vector is simply a dynamically size able array) Also, you should not test algorithm speed this way, you can't really compare them like this. Because if you first run BFS, it has simply not yet cached the entire array. But when you have ran DFS, the entire array is probably in a fast cache for the processor. I would recommend taking a larger graph and check

Categories : C++

neo4j 2.0 not creating node but running successfully
Make sure your Web Admin is pointing to the same place as the DB_PATH in your code. You can find the Web Admin properties in conf/neo4j-server.properties of your neo4j directory

Categories : Java

Is it possible to debug a currently running production Node application?
Yes, you just need to follow a few steps from node inspector's README: node-inspector has to be running on the machine with the node process you are trying to debug. So, you must be able to install this there. Presumably your production process did not start with the --debug flag. You can send a signal to achieve this though: kill -s USR1 <pid>. (pid can be obtained with something like ps aux | grep node.) Make sure port 8080 is exposed to your local machine from your production machine. Point your browser as normal; you're all set up.

Categories : Node Js

Running a Grunt Task directly from Node
Update While this is the answer, Grunt has tons of issues with being run directly from Node. Not the least of which is when the grunt task fails, it calls process.exit and nicely quits your node instance. I cannot recommend trying to get this to work. Ok, I'll just answer my own question. I was right, the command I had was wrong. Updated code: var grunt = require('grunt'); grunt.registerTask('default', 'Log some stuff.', function() { console.log('stuff'); }); grunt.tasks(['default']);

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.