Search Results

Search found 59291 results on 2372 pages for 'node set'.

Page 6/2372 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Map /dev/bus/usb node to /sys node on Linux

    - by Cody Brocious
    I'm using libusb to find and access a USB device, but once I get the information I need from there, I need to map it to a /sys node. This could be to the actual USB bus it's on, the /sys/bus/usb-serial node (which is where I'm going to get eventually), or effectively anywhere else since I can walk the tree from there. I can get to a /dev/bus/usb node easily enough, but I'm a bit lost from there. What would be the best route to perform this mapping?

    Read the article

  • Last node of the treeview selected node changed not working

    - by Domnic
    im using Treeview in my master page...and every node except last node get selected if i click on it and can be redirect to respond treenode page...but when i click last node of the treeview the selectednode changed event doesnt fired it just stop page load event itself(breakpoint)..... how can i solve this problem?

    Read the article

  • Problem with building tree bottom up

    - by Esmond
    Hi, I have problems building a binary tree from the bottom up. THe input of the tree would be internal nodes of the trees with the children of this node being the leaves of the eventual tree. So initially if the tree is empty the root would be the first internal node. Afterwards, The next internal node to be added would be the new root(NR), with the old root(OR) being one of the child of NR. And so on. The problem i have is that whenever i add a NR, the children of the OR seems to be lost when i do a inOrder traversal. This is proven to be the case when i do a getSize() call which returns the same number of nodes before and after addNode(Tree,Node) Any help with resolving this problem is appreciated edited with the inclusion of node class code. both tree and node classes have the addChild methods because i'm not very sure where to put them for it to be appropriated. any comments on this would be appreciated too. The code is as follows: import java.util.*; public class Tree { Node root; int size; public Tree() { root = null; } public Tree(Node root) { this.root = root; } public static void setChild(Node parent, Node child, double weight) throws ItemNotFoundException { if (parent.child1 != null && parent.child2 != null) { throw new ItemNotFoundException("This Node already has 2 children"); } else if (parent.child1 != null) { parent.child2 = child; child.parent = parent; parent.c2Weight = weight; } else { parent.child1 = child; child.parent = parent; parent.c1Weight = weight; } } public static void setChild1(Node parent, Node child) { parent.child1 = child; child.parent = parent; } public static void setChild2(Node parent, Node child) { parent.child2 = child; child.parent = parent; } public static Tree addNode(Tree tree, Node node) throws ItemNotFoundException { Tree tree1; if (tree.root == null) { tree.root = node; } else if (tree.root.getSeq().equals(node.getChild1().getSeq()) || tree.root.getSeq().equals(node.getChild2().getSeq())) { Node oldRoot = tree.root; oldRoot.setParent(node); tree.root = node; } else { //form a disjoint tree and merge the 2 trees tree1 = new Tree(node); tree = mergeTree(tree, tree1); } System.out.print("addNode2 = "); if(tree.root != null ) { Tree.inOrder(tree.root); } System.out.println(); return tree; } public static Tree mergeTree(Tree tree, Tree tree1) { String root = "root"; Node node = new Node(root); tree.root.setParent(node); tree1.root.setParent(node); tree.root = node; return tree; } public static int getSize(Node root) { if (root != null) { return 1 + getSize(root.child1) + getSize(root.child2); } else { return 0; } } public static boolean isEmpty(Tree Tree) { return Tree.root == null; } public static void inOrder(Node root) { if (root != null) { inOrder(root.child1); System.out.print(root.sequence + " "); inOrder(root.child2); } } } public class Node { Node child1; Node child2; Node parent; double c1Weight; double c2Weight; String sequence; boolean isInternal; public Node(String seq) { sequence = seq; child1 = null; c1Weight = 0; child2 = null; c2Weight = 0; parent = null; isInternal = false; } public boolean hasChild() { if (this.child1 == null && this.child2 == null) { this.isInternal = false; return isInternal; } else { this.isInternal = true; return isInternal; } } public String getSeq() throws ItemNotFoundException { if (this.sequence == null) { throw new ItemNotFoundException("No such node"); } else { return this.sequence; } } public void setChild(Node child, double weight) throws ItemNotFoundException { if (this.child1 != null && this.child2 != null) { throw new ItemNotFoundException("This Node already has 2 children"); } else if (this.child1 != null) { this.child2 = child; this.c2Weight = weight; } else { this.child1 = child; this.c1Weight = weight; } } public static void setChild1(Node parent, Node child) { parent.child1 = child; child.parent = parent; } public static void setChild2(Node parent, Node child) { parent.child2 = child; child.parent = parent; } public void setParent(Node parent){ this.parent = parent; } public Node getParent() throws ItemNotFoundException { if (this.parent == null) { throw new ItemNotFoundException("This Node has no parent"); } else { return this.parent; } } public Node getChild1() throws ItemNotFoundException { if (this.child1 == null) { throw new ItemNotFoundException("There is no child1"); } else { return this.child1; } } public Node getChild2() throws ItemNotFoundException { if (this.child2 == null) { throw new ItemNotFoundException("There is no child2"); } else { return this.child2; } } }

    Read the article

  • Using SET NULL and SET DEFAULT with Foreign Key Constraints

    Cascading Updates and Deletes, introduced with SQL Server 2000, were such an important, crucial feature that it is hard to imagine providing referential integrity without them. One of the new features in SQL Server 2005 that hasn't gotten a lot of press from what I've read is the new options for the ON DELETE and ON UPDATE clauses: SET NULL and SET DEFAULT. Let's take a look!

    Read the article

  • Nginx Reverse Proxy Node.js and Wordpress + Static Files Issue

    - by joemccann
    I have had quite a time trying to get nginx to serve static assets from my wordpress blog. Have a look at the config and let me know if you can help. ( https://gist.github.com/1130332 - to see the entire thing) server { listen 80; server_name subprint.com; access_log /var/www/subprint/logs/access.log; error_log /var/www/subprint/logs/error.log; root /var/www/subprint/server/public; # express serves static resources for subprint.com out of here location / { proxy_pass http://127.0.0.1:8124; root /var/www/subprint/server; access_log on; } #serve static assets location ~* ^(?!\/).+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ { expires max; access_log off; } # the route for the wordpress blog # unfortunately the static assets (css, img, etc.) are not being pathed/served properly location /blog { root /var/www/localhost/public; index index.php; access_log /var/www/localhost/logs/access.log; error_log /var/www/localhost/logs/error.log; if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?q=$1 last; break; } if (!-f $request_filename) { rewrite /blog$ /blog/index.php last; break; } } # actually serves the wordpress and subsequently phpmyadmin location ~* (?!\/blog).+\.php$ { fastcgi_pass localhost:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/localhost/public$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; include /usr/local/nginx/conf/fastcgi_params; } # This works fine, but ONLY with a symlink inside the /var/www/localhost/public directory pointing to /usr/share/phpmyadmin location /phpmyadmin { index index.php; access_log /var/www/phpmyadmin/logs/access.log; error_log /var/www/phpmyadmin/logs/error.log; alias /usr/share/phpmyadmin/; if (!-f $request_filename) { rewrite /phpmyadmin$ /phpmyadmin/index.php permanent; break; } } # opt-in to the future add_header "X-UA-Compatible" "IE=Edge,chrome=1"; }

    Read the article

  • Access node.js local server though mobile via same shared wifi

    - by laggingreflex
    EDIT: I was stuck in this situation before but then it was Apache-related But this time I'm using NodeJS, so the old answer doesn't help. I'm running apache a NodeJS webserver (on port 80) on Windows 7. I want to access the webserver through my mobile which shares the wifi router with my pc locally. http://localhost works from PC. But I can't access http://192.168.1.4 from either my phone or even my computer. ipconfig /all on my computer lists my ip address as 192.168.1.4 Wireless LAN adapter Wireless Network Connection: IPv4 Address. . . . . . . . . . . : 192.168.1.4(Preferred) I can ping my phone's (internal) ip address [192.168.1.5] from PC and vice-versa, I can ping my PC [192.168.1.4] from my phone. So why can't I access http://192.168.1.4 from my phone? (or PC) Firewall is off.

    Read the article

  • node.js on multi-core machines

    - by zaharpopov
    node.js looks interesting BUT... I must miss something - isn't node.js tuned only to run on a single process & thread? Then how does it scale for multi-core CPUs and multi-CPU servers? After all, it is all great to make fast as possible single-thread server, but for high loads I would want to use several CPUs. And the same goes for making applications faster - seems today the way is use multiple CPUs and parallelize the tasks. How does node.js fit into this picture? Is its idea to somehow distribute multiple instances or what?

    Read the article

  • Websocket TLS Node Server and wss://

    - by CNelson
    I'm looking to start using javascript on the server, most likely with node.js, as well as use websockets to communicate with clients. However, there doesn't seem to be a lot of information about encrypted websocket communication using TLS and the wss:// handler. In fact the only server that I've seen explicitly support wss:// is Kaazing. This TODO is the only reference I've been able to find in the various node implementations. Am I missing something or are the websocket js servers not ready for encrypted communication yet? Another option could be using something like lighttpd or apache to proxy to a node listener, has anyone had success there?

    Read the article

  • Drupal - Lightbox -> iframe node displaying entire website with views

    - by kilrizzy
    I am attempting to make a view that would list thumbnails of my projects, then when clicking them enlarge the photo using lightbox and list out some text and a link to the website. I am not sure if there is a way I can just add text to the lightbox using views so right now I have it using a field for Lightbox2 iframe: thumb200wh-node page. Open my entire website again in the lightbox instead of just the node: http://jeffkilroy.com/portfolio_boxes Is there a way to just display the node from the views module or is there a way to just use an image but modify the description so that I can put text in?

    Read the article

  • OSX launchd plist for node forever process

    - by lostintranslation
    I am trying to write a launchd.plist file for my node server. I am using forever to run my node server. I would like the server to start on boot. I would also like to wait for the mongodb launchd plist to run first. I installed mongobb using homebrew and it came with a launchd.plist already. I have executed the following: $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist plist for mongodb is: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>homebrew.mxcl.mongodb</string> <key>ProgramArguments</key> <array> <string>/usr/local/opt/mongodb/mongod</string> <string>run</string> <string>--config</string> <string>/usr/local/etc/mongod.conf</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <false/> <key>WorkingDirectory</key> <string>/usr/local</string> <key>StandardErrorPath</key> <string>/usr/local/var/log/mongodb/output.log</string> <key>StandardOutPath</key> <string>/usr/local/var/log/mongodb/output.log</string> <key>HardResourceLimits</key> <dict> <key>NumberOfFiles</key> <integer>1024</integer> </dict> <key>SoftResourceLimits</key> <dict> <key>NumberOfFiles</key> <integer>1024</integer> </dict> </dict> </plist> If I shutdown the computer and restart mongodb fires up as it should. However my node server is not starting. Any ideas? <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <false/> </dict> <key>Label</key> <string>com.test.app</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/forever</string> <string>-a</string> <string>-l</string> <string>/var/log/app/app.log</string> <string>-e</string> <string>/var/log/app/app_error.log</string> <string>/data/server/app.js</string> </array> <key>RunAtLoad</key> <true/> <key>StartInterval</key> <integer>3600</integer> </dict> </plist> EDIT: writing to log file and I see this: env: node: No such file or directory I think this means that the node binary cannot be found. I can echo $PATH and /usr/local/bin is in my path. I can start node from the terminal. Ideas?

    Read the article

  • Node.js and wss://

    - by CNelson
    I'm looking to start using javascript on the server, most likely with node.js, as well as use websockets to communicate with clients. However, there doesn't seem to be a lot of information about encrypted websocket communication using TLS and the wss:// handler. In fact the only server that I've seen explicitly support wss:// is Kaazing. This TODO is the only reference I've been able to find in the various node implementations. Am I missing something or are the websocket js servers not ready for encrypted communication yet? Another option could be using something like lighttpd or apache to proxy to a node listener, has anyone had success there?

    Read the article

  • Getting closure-compiler and Node.js to play nice

    - by bukzor
    Are there any projects that used node.js and closure-compiler (CC for short) together? The official CC recommendation is to compile all code for an application together, but when I compile some simple node.js code which contains a require("./MyLib.js"), that line is put directly into the output, but it doesn't make any sense in that context. I see a few options: Code the entire application as a single file. This solves the problem by avoiding it, but is bad for maintenance. Assume that all files will be concatenated before execution. Again this avoids the problem, but makes it harder to implement a un-compiled debug mode. I'd like to get CC to "understand" the node.js require() function, but that probably can't be done without editing the compiler itself, can it?

    Read the article

  • Node.JS Server Cuts Off Frequently?

    - by aherrick
    I have a Node JS Server where I am using Socket.IO to stream content to the browser. It works great for about 45 minutes or so of streaming, then it will usually cut out. There are no "errors" reported in the terminal and the Node server acts like it is in, however the page I am serving clearly stops working. What are my options for trying to get to the bottom of this? Could this be a configuration issue with Node/Socket.IO? is there any basic error logging you would recommend I setup?

    Read the article

  • Is node.js ready for production use?

    - by Simon Wentley
    Starting a new project. It's basically a blogging/commenting system. We're considering node.js as the back end server. Is node.js ready for this sort of thing or is it too early and experimental? We need HTTPS and gzip compression - perhaps a front end nginx server could provide this? What's missing from node.js that would make developing a web app difficult? From a production ready perspective, we're wondering if it is stable enough for building a commercial app on top of. Thanks

    Read the article

  • Install NPM Packages Automatically for Node.js on Windows Azure Web Site

    - by Shaun
    In one of my previous post I described and demonstrated how to use NPM packages in Node.js and Windows Azure Web Site (WAWS). In that post I used NPM command to install packages, and then use Git for Windows to commit my changes and sync them to WAWS git repository. Then WAWS will trigger a new deployment to host my Node.js application. Someone may notice that, a NPM package may contains many files and could be a little bit huge. For example, the “azure” package, which is the Windows Azure SDK for Node.js, is about 6MB. Another popular package “express”, which is a rich MVC framework for Node.js, is about 1MB. When I firstly push my codes to Windows Azure, all of them must be uploaded to the cloud. Is that possible to let Windows Azure download and install these packages for us? In this post, I will introduce how to make WAWS install all required packages for us when deploying.   Let’s Start with Demo Demo is most straightforward. Let’s create a new WAWS and clone it to my local disk. Drag the folder into Git for Windows so that it can help us commit and push. Please refer to this post if you are not familiar with how to use Windows Azure Web Site, Git deployment, git clone and Git for Windows. And then open a command windows and install a package in our code folder. Let’s say I want to install “express”. And then created a new Node.js file named “server.js” and pasted the code as below. 1: var express = require("express"); 2: var app = express(); 3: 4: app.get("/", function(req, res) { 5: res.send("Hello Node.js and Express."); 6: }); 7: 8: console.log("Web application opened."); 9: app.listen(process.env.PORT); If we switch to Git for Windows right now we will find that it detected the changes we made, which includes the “server.js” and all files under “node_modules” folder. What we need to upload should only be our source code, but the huge package files also have to be uploaded as well. Now I will show you how to exclude them and let Windows Azure install the package on the cloud. First we need to add a special file named “.gitignore”. It seems cannot be done directly from the file explorer since this file only contains extension name. So we need to do it from command line. Navigate to the local repository folder and execute the command below to create an empty file named “.gitignore”. If the command windows asked for input just press Enter. 1: echo > .gitignore Now open this file and copy the content below and save. 1: node_modules Now if we switch to Git for Windows we will found that the packages under the “node_modules” were not in the change list. So now if we commit and push, the “express” packages will not be uploaded to Windows Azure. Second, let’s tell Windows Azure which packages it needs to install when deploying. Create another file named “package.json” and copy the content below into that file and save. 1: { 2: "name": "npmdemo", 3: "version": "1.0.0", 4: "dependencies": { 5: "express": "*" 6: } 7: } Now back to Git for Windows, commit our changes and push it to WAWS. Then let’s open the WAWS in developer portal, we will see that there’s a new deployment finished. Click the arrow right side of this deployment we can see how WAWS handle this deployment. Especially we can find WAWS executed NPM. And if we opened the log we can review what command WAWS executed to install the packages and the installation output messages. As you can see WAWS installed “express” for me from the cloud side, so that I don’t need to upload the whole bunch of the package to Azure. Open this website and we can see the result, which proved the “express” had been installed successfully.   What’s Happened Under the Hood Now let’s explain a bit on what the “.gitignore” and “package.json” mean. The “.gitignore” is an ignore configuration file for git repository. All files and folders listed in the “.gitignore” will be skipped from git push. In the example below I copied “node_modules” into this file in my local repository. This means,  do not track and upload all files under the “node_modules” folder. So by using “.gitignore” I skipped all packages from uploading to Windows Azure. “.gitignore” can contain files, folders. It can also contain the files and folders that we do NOT want to ignore. In the next section we will see how to use the un-ignore syntax to make the SQL package included. The “package.json” file is the package definition file for Node.js application. We can define the application name, version, description, author, etc. information in it in JSON format. And we can also put the dependent packages as well, to indicate which packages this Node.js application is needed. In WAWS, name and version is necessary. And when a deployment happened, WAWS will look into this file, find the dependent packages, execute the NPM command to install them one by one. So in the demo above I copied “express” into this file so that WAWS will install it for me automatically. I updated the dependencies section of the “package.json” file manually. But this can be done partially automatically. If we have a valid “package.json” in our local repository, then when we are going to install some packages we can specify “--save” parameter in “npm install” command, so that NPM will help us upgrade the dependencies part. For example, when I wanted to install “azure” package I should execute the command as below. Note that I added “--save” with the command. 1: npm install azure --save Once it finished my “package.json” will be updated automatically. Each dependent packages will be presented here. The JSON key is the package name while the value is the version range. Below is a brief list of the version range format. For more information about the “package.json” please refer here. Format Description Example version Must match the version exactly. "azure": "0.6.7" >=version Must be equal or great than the version. "azure": ">0.6.0" 1.2.x The version number must start with the supplied digits, but any digit may be used in place of the x. "azure": "0.6.x" ~version The version must be at least as high as the range, and it must be less than the next major revision above the range. "azure": "~0.6.7" * Matches any version. "azure": "*" And WAWS will install the proper version of the packages based on what you defined here. The process of WAWS git deployment and NPM installation would be like this.   But Some Packages… As we know, when we specified the dependencies in “package.json” WAWS will download and install them on the cloud. For most of packages it works very well. But there are some special packages may not work. This means, if the package installation needs some special environment restraints it might be failed. For example, the SQL Server Driver for Node.js package needs “node-gyp”, Python and C++ 2010 installed on the target machine during the NPM installation. If we just put the “msnodesql” in “package.json” file and push it to WAWS, the deployment will be failed since there’s no “node-gyp”, Python and C++ 2010 in the WAWS virtual machine. For example, the “server.js” file. 1: var express = require("express"); 2: var app = express(); 3: 4: app.get("/", function(req, res) { 5: res.send("Hello Node.js and Express."); 6: }); 7:  8: var sql = require("msnodesql"); 9: var connectionString = "Driver={SQL Server Native Client 10.0};Server=tcp:tqy4c0isfr.database.windows.net,1433;Database=msteched2012;Uid=shaunxu@tqy4c0isfr;Pwd=P@ssw0rd123;Encrypt=yes;Connection Timeout=30;"; 10: app.get("/sql", function (req, res) { 11: sql.open(connectionString, function (err, conn) { 12: if (err) { 13: console.log(err); 14: res.send(500, "Cannot open connection."); 15: } 16: else { 17: conn.queryRaw("SELECT * FROM [Resource]", function (err, results) { 18: if (err) { 19: console.log(err); 20: res.send(500, "Cannot retrieve records."); 21: } 22: else { 23: res.json(results); 24: } 25: }); 26: } 27: }); 28: }); 29: 30: console.log("Web application opened."); 31: app.listen(process.env.PORT); The “package.json” file. 1: { 2: "name": "npmdemo", 3: "version": "1.0.0", 4: "dependencies": { 5: "express": "*", 6: "msnodesql": "*" 7: } 8: } And it failed to deploy to WAWS. From the NPM log we can see it’s because “msnodesql” cannot be installed on WAWS. The solution is, in “.gitignore” file we should ignore all packages except the “msnodesql”, and upload the package by ourselves. This can be done by use the content as below. We firstly un-ignored the “node_modules” folder. And then we ignored all sub folders but need git to check each sub folders. And then we un-ignore one of the sub folders named “msnodesql” which is the SQL Server Node.js Driver. 1: !node_modules/ 2:  3: node_modules/* 4: !node_modules/msnodesql For more information about the syntax of “.gitignore” please refer to this thread. Now if we go to Git for Windows we will find the “msnodesql” was included in the uncommitted set while “express” was not. I also need remove the dependency of “msnodesql” from “package.json”. Commit and push to WAWS. Now we can see the deployment successfully done. And then we can use the Windows Azure SQL Database from our Node.js application through the “msnodesql” package we uploaded.   Summary In this post I demonstrated how to leverage the deployment process of Windows Azure Web Site to install NPM packages during the publish action. With the “.gitignore” and “package.json” file we can ignore the dependent packages from our Node.js and let Windows Azure Web Site download and install them while deployed. For some special packages that cannot be installed by Windows Azure Web Site, such as “msnodesql”, we can put them into the publish payload as well. With the combination of Windows Azure Web Site, Node.js and NPM it makes even more easy and quick for us to develop and deploy our Node.js application to the cloud.   Hope this helps, Shaun All documents and related graphics, codes are provided "AS IS" without warranty of any kind. Copyright © Shaun Ziyan Xu. This work is licensed under the Creative Commons License.

    Read the article

  • Where is the node.js file in the stack trace located?

    - by user225189
    Obviously, I'm pretty new to node.js. I'm attempting to debug a node.js application and I see node.js in the stack trace. I would like to put some sys.puts calls in there, but I cannot locate the node.js that is being run by my server. Is there a way to tell where node.js is located? Is there an equivalent to Ruby's FILE in node? Thanks, Brian

    Read the article

  • Naming selenium grid nodes. Spawning a specific node

    - by ???? ????
    I'm trying to implement a kind of default queues in selenium hub. There is a possibility to specify node's name (actually its environment, smth like "firefox on ubuntu" or "chrome on windows"). Selenium grid itself has a default queue, it works according to 'First In, First Out' principle. But I want to prioritize some of my tasks given to selenium server. I have no possibility to introduce custom queue (seems like there is no API for that), that's why I decided to separate queue's logic from selenium server. I'll only call a specific node with specific name (environment) for example "firefox important node" or smth like that. So, I want to know how to directly tell selenium which node to use for my task? And generally, am I thinking in a right way? Here are my configs: hubConfig.json.erb { "host": null, "port": <%= node[:selenium][:server][:port] %>, "newSessionWaitTimeout": -1, "servlets" : [], "prioritizer": null, "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher", "throwOnCapabilityNotPresent": true, "nodePolling": <%= node[:selenium][:server][:node_polling] %>, "cleanUpCycle": <%= node[:selenium][:server][:cleanup_cycle] %>, "timeout": <%= node[:selenium][:server][:timeout] %>, "browserTimeout": 0, "maxSession": <%= node[:selenium][:server][:max_session] %> } nodeConfig.json.erb { "capabilities": [ { "browserName": "firefox", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "chrome", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "phantomjs", "maxInstances": 5, "seleniumProtocol": "WebDriver" } ], "configuration": { "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "maxSession": <%= node[:selenium][:node][:max_session] %>, "port": <%= node[:selenium][:node][:port] %>, "host": "<%= node[:fqdn] %>", "register": true, "registerCycle": <%= node[:selenium][:node][:register_cycle] %>, "hubPort": <%= node[:selenium][:server][:port] %> } } And my Driver class: ... def remote_driver @browser = Watir::Browser.new(:remote, :url => "http://myhub.com:4444/wd/hub", :http_client => client, :desired_capabilities => capabilities ) end def capabilities Selenium::WebDriver::Remote::Capabilities.send( "firefox", :javascript_enabled => true, :css_selectors_enabled => true, :takes_screenshot => true ) end def client client = Selenium::WebDriver::Remote::Http::Default.new client.timeout = 360 client end ... I still don't know how to use specified node for my task. If I try to start a driver adding :name => "firefox important node" and extend nodeConfig.json.erb's configuration with environments: - name: "firefox important node" browser: "*firefox" - name: "Firefox36 on Linux" browser: "*firefox" selenium just starts random firefox browser on a random node. How can I control it?

    Read the article

  • Microsoft soutient Node.js et participe au développement de la bibliothèque JavaScript client/serveur

    Microsoft soutient Node.js Et participe au développement de la bibliothèque JavaScript client / serveur Sur le blog interoperability Claudio Caldato (Principal Program Manager of Interoperability Srategy Team) annonce que Microsoft va participer au développement d'une version Windows de Node.js Le premier objectif consistera à ajouter à Node une API IOCP Windows performante. Cette phase initiale achevée, un programme exécutable (node.exe) sera disponible sur le site nodejs.org et Node.js fonctionnera alors sur Win...

    Read the article

  • An efficient code to determine if a set is a subset of another set

    - by Edward
    I am looking for an efficient way to determine if a set is a subset of another set in Matlab or Mathematica. Example: Set A = [1 2 3 4] Set B = [4 3] Set C = [3 4 1] Set D = [4 3 2 1] The output should be: Set A Sets B and C belong to set A because A contains all of their elements, therefore, they can be deleted (the order of elements in a set doesn't matter). Set D has the same elements as set A and since set A precedes set D, I would like to simply keep set A and delete set D. So there are two essential rules: 1. Delete a set if it is a subset of another set 2. Delete a set if its elements are the same as those of a preceding set My Matlab code is not very efficient at doing this - it mostly consists of nested loops. Suggestions are very welcome! Additional explanation: the issue is that with a large number of sets there will be a very large number of pairwise comparisons.

    Read the article

  • An efficient code to determine if a set is a subset of another set

    - by Edward
    I am looking for an efficient way to determine if a set is a subset of another set in Matlab or Mathematica. Example: Set A = [1 2 3 4] Set B = [4 3] Set C = [3 4 1] Set D = [4 3 2 1] The output should be: Set A Sets B and C belong to set A because A contains all of their elements, therefore, they can be deleted (the order of elements in a set doesn't matter). Set D has the same elements as set A and since set A precedes set D, I would like to simply keep set A and delete set D. So there are two essential rules: 1. Delete a set if it is a subset of another set 2. Delete a set if its elements are the same as those of a preceding set My Matlab code is not very efficient at doing this - it mostly consists of nested loops. Suggestions are very welcome! Additional explanation: the issue is that with a large number of sets there will be a very large number of pairwise comparisons.

    Read the article

  • How to debug node.js applications

    - by Fabian Jakobs
    How do I debug a node.js server application? Right now I'm mostly using alert debugging with print statements like this: sys.puts(sys.inspect(someVariable)); There must be a better way to debug. I know that google Chrome has a command line debugger. Is this debugger available for node.js as well?

    Read the article

  • Node.js as a custom (streaming) upload handler for Django

    - by Gijs
    I want to build an upload-centric app using Django. One way to do this is with nginx's upload module (nonblocking) but it has its problems. Node.js is supposed to be a good candidate for this type of application. But how can I make node.js act as an upload_handler() for Django (http://docs.djangoproject.com/en/1.1/topics/http/file-uploads/#modifying-upload-handlers-on-the-fly) I'm not sure where to look for examples?

    Read the article

  • Stream data with Node.js

    - by Saif Bechan
    I want to know if it is possible to stream data from the server to the client with Node.js. From what I can understand all over the internet is that this has to be possible, yet I fail to find a correct example or solution. What I want is a single http post to node.js with AJAX. Than leave the connection open and continuously stream data to the client. The client will receive this stream and update the page continuously.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >