w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Multicasting big packet contain all info to multiple clients vs individual packets to targeted clients
One of the major advantages of multicast is scalability so in the future if you tend to have more devices multicast will help. Better to look at multicast vs unicast performance for guidance M. Ebrahimi, M. Daneshtalab, P. Liljeberg, and H. Tenhunen. Performance evaluation of unicast and multicast communication in three-dimensional mesh architectures. In Computer Architecture and Digital Systems (CADS), 2010 15th CSI International Symposium on, pages 161-162, sept. 2010.

Categories : C++

bundle exec thin start vs ./bundle/bin/thin start
In that specific case, there is no difference. bundle exec thin start -p 8080 will end up calling .bundle/bin/thin, but what if you you installed binstubs in a different path? bundle exec thin start will read your .bundle/config to find where your binstubs folder is. If you don't have binstubs installed and say you have 3 versions of thin installed, bundle exec will execute the one that's defined in your Gemfile. Edit: @tadman also made a good point that I initially missed. When you use bundle exec, the gem environment from your Gemfile will be used, without it, it'll load the latest version of each gem currently installed.

Categories : Ruby

How to thin out data in zoo
Try subset: > subset(myts, diff(myts) > 10) 2013-07-09 12:04:00 2013-07-09 12:07:00 2013-07-09 12:10:00 2013-07-09 12:22:00 1621.04 1630.75 1645.89 1616.67 2013-07-09 12:28:00 2013-07-09 12:32:00 2013-07-09 12:37:00 2013-07-09 12:38:00 1631.87 1650.43 1524.28 1603.65 2013-07-09 12:39:00 2013-07-09 12:40:00 2013-07-09 12:41:00 1622.49 1636.68 1652.10 Use abs(diff(myts)) if either direction is needed.

Categories : R

Thin provisioning in sd card
http://psonlinehelp.equallogic.com/V3.3/enabling_and_disabling_thin_provisioning.htm http://www.condusiv.com/blog/post/2010/11/30/Thin-Provisioning-and-Defrag.aspx This both should give an insight. Thanks & Regards, Alok

Categories : Linux

Rubymine Thin with SSL options
I got help here: http://devnet.jetbrains.com/message/5490676 It seems Rubymine can't parse such arguments. But an workaround is to do this with an Ruby/Script from Run/Debug Configurations

Categories : Ruby

Oracle JDBC thin client 64 bit
Instant Client Downloads for Microsoft Windows (x64) http://www.oracle.com/technetwork/topics/winx64soft-089540.html Does this help?

Categories : Java

Rails Thin Servers no PID found
I had exactly the same annoying problem I've found that if the server crashes on startup, the pid file gets created but there is no pid in the file. Try cat'ing the log file for the server ./logs/thin.3001.log and look for errors. You could also try starting the server manually via rails s -p 3000 and see if there are any errors thrown. Good luck Chris

Categories : Ruby On Rails

Thin Spacer CSS not working properly in IE 8 and IE 7
There aren't any good solutions for gradients in old-IE -- it's just something that those old browsers simply don't do very well. IE's old filter styles are well known for having major bugs and quirks. As you're finding, they're really not much fun to work with. You have a couple of other options though: You could just drop the gradients for old IE versions. It's only a visual nicety, and won't affect the actual functionality of the site. Okay, so old IE users may not get the site looking quite as nice as people with newer browsers.... well, yeah, but you know what? They're on an old IE versions, so used to that by now; they can live with it. Creating a plain fall-back is easy. Simply specify a normal plain colour background style in the CSS immediately above your gradient background.

Categories : HTML

Starting a Thin application via cron
Per my comment I am still not 100% sure that the script is being run as root. I would add a line in the script: echo $user > /tmp/test.txt Then run the script via cron and see what the value of the file is. Also I question your script. Why is it necessary to cd? How about /usr/share/dashboard/dashing start -p 500 -d Also you may have to do a nohup, which is the no hang up signal, so ... nohup /usr/share/dashboard/dashing start -p 500 -d Those are my guesses.

Categories : Ruby

Thin or thick REST-client?
Generally the best approach for a scalable application is to make as few HTTP requests as possible. To do this, you should include information about other resources in the data sent back for the initial resource request. The key is to mark the other data as being a different URI, which your client can then cache under a different URI. Take a look at HAL. HAL provides a representation of the requested resource, as well as some metadata, which include the URIs of other resources it is linked to (_links) and allows full copies of those other resources to be in-lined with the response (_embedded). This give you the maximum bang per request, until we get HTTP/2.0 which will allow multiple request inlining. I don't use the terms "thin" and "thick" client. Every line of code makes it slightly

Categories : Rest

Can you bounce thin servers instead of restarting them all at once?
rtfm > thin Command required Usage: thin [options] start|stop|restart|config [...] Cluster options: -s, --servers NUM Number of servers to start -o, --only NUM Send command to only one server of the cluster -C, --config FILE Load options from config file -O, --onebyone Restart the cluster one by one (only works with restart command)

Categories : Ruby On Rails

Why do we need nginx with thin on production setup?
Ngnix is used to load balance thin. You may wish to use Unicorn instead. More on the matter here: http://cmelbye.github.io/2009/10/04/thin-vs-unicorn.html

Categories : Ruby On Rails

stacked column charts appearing too thin
You need to define pointRange as timestamp http://jsfiddle.net/QnuEA/3/

Categories : Highcharts

Rails deployment using thin on windows vs linux
Ruby is slow when running under windows. Also take a look at this topic for a detailed explanation: Why is ruby so much slower on windows? Basically, most best practices for achieving higher performance in any other environment do apply, but running Rails on Windows will probably never be faster than running it on Linux. Ruby 1.9.3 will be faster than 1.8.7, so if you're still running 1.8.7, that could be a start.

Categories : Ruby On Rails

Thin font not showing correctly on windows
Windows just has crappier font rendering in browsers than OSX or iOS does. Sometimes you can fix it by picking specific font sizes at which the browser antialiasing doesn't look too awful. There is also the text-rendering: optimizeLegibility CSS property but in my experience it often does more harm than good. Pick a different font that is more optimized for web display. Google Web Fonts is a good place to start. They have lots of great modern fonts that are all optimized to be used as webfonts, and on top of that they provide the CSS etc - you just need to <link> to their external CDN CSS file in your <head> and bam you're good to go. "Lato" and "Raleway" are fonts I use in place of Helvetica Neue sometimes. Also, it's almost certainly illegal to embed that font anyway si

Categories : HTML

redmine installation not working through nginx and thin
The error is because your firewall "iptables" blocked the port. Rollback your iptables config, then issue the follow command: iptables -I INPUT -i lo -p tcp --dport 3123 -j ACCEPT Remember to save the setting by: service iptables save More information about iptables: https://help.ubuntu.com/community/IptablesHowTo p.s. sudo may be needed for the above commands.

Categories : Nginx

JDBC Oracle Thin Client to Fail Over to Second DB
Your using the same service_name as your SID. Even if you stop the service MYDB, it'll always find it because of the SID. primary db is in mount mode, so that explains the error you get. Create a new service_name (other than your SID) and connect on that servicename For instance: service_name = MYDB_CLIENT

Categories : Oracle

SpTBX: remove TabControl thin frame
This can be done by adding an OnDrawBackground event to the component, like so: procedure TForm3.SpTBXTabControl1DrawBackground(Sender: TObject; ACanvas: TCanvas; ARect: TRect; const PaintStage: TSpTBXPaintStage; var PaintDefault: Boolean); begin if (PaintStage = pstPrePaint) then begin PaintDefault := False; end; end; You will also need to add SpTbxSkins to the forms interface uses. This will provide you with the following look: I would suggest though that you remove the border from the TMemo control instead of the tab border as this will provide a better "Look and Feel" to what your trying to do.

Categories : Delphi

Sinatra with thin, multi thread do not work
Thin can be multi-threaded, but only if you configure it to be so, by default it is single-threaded (evented). From the answer to the question you linked to: since Sinatra 1.3.0, Thin will be started in threaded mode, if it is started by Sinatra (i.e. with ruby app.rb, but not with the thin command, nor with rackup). There doesn’t appear to be a way to get rackup to pass the threaded option through to Thin, so you will need to use either thin start --threaded or ruby my_app.rb to get threading on Thin.

Categories : Ruby

Detect whether static library is a thin archive
How can I check if a given .a file is a thin archive or not? head -1 t.a !<thin> Eventually, file(1) should be able to tell you. My file-5.09 just says data.

Categories : C

How can thin horizontal lines be added between each row in a grayscale image?
I did not try the code, but I think that something like that should work: sizeOfACube = 6; numberOfRows = 47; RGB = imread('image.png'); RGB = imresize(A, [(numRows+numberOfRows) numCols]); for i=1:1:NumberOfRows RGB(i*6,:,:) = 0; end imagesc(RGB); imwrite(RGB,'newImage.png'); with: sizeOfAcube the size of one cube on the QRcode. numRows and numCols the number of Rows and Column of the original image.

Categories : Matlab

Running a modular Sinatra app with Thin and EventMachine. It starts twice?
The docs on Modular vs. Classic style mention that there are some changes to the default settings, and one of these is logging, which is turned off by default. Adding settings.logging = true to the top of class Frontend < Sinatra::Base gives me a log in my terminal window for the localhost:5000 requests. I don't think the second issue is that it's creating two processes, but rather that it's killing and re-starting the process right before closing the server. This can be solved by following the Sinatra recipe for using EventMachine with Sinatra, which is a little more complicated than what you've done. Here's their code, modified to fit your app: The new app.rb: EM.run do server = 'thin' host = '' port = ENV['PORT'] || '8181' web_app = App::Frontend.new # St

Categories : Ruby

How to get the content from an HTTP POST request received in thin?
You need to use the rack.input entry of the env object. From the Rack Spec: The input stream is an IO-like object which contains the raw HTTP POST data. When applicable, its external encoding must be “ASCII-8BIT” and it must be opened in binary mode, for Ruby 1.9 compatibility. The input stream must respond to gets, each, read and rewind. So you can call read on it like this: http_server = proc do |env| json_string = env['rack.input'].read json_string.force_encoding 'utf-8' # since the body has ASCII-8BIT encoding, # but we know this is json, we can use # force_encoding to get the right encoding # parse json_string and do your stuff response = "Hello World!" [200, {"Connection" => "close",

Categories : Ruby

Thin webserver shuts down immediately after start (rails)
Turns out starting Thin in production mode made Rails eager load a module also using EventMachine, thus keeping the Thin code from being blocked after starting and immediately shutting down instead.

Categories : Ruby On Rails

SSL connection error in production mode rails 3.2.3 thin server
The problem you described is related to using a self-signed certificate. SSL certificates relies on a chain of trust, where the root CA's (Certification Authority) are at the top. To understand more how it works, the Wikipedia entry on SSL provide a good insight. For Self-Signed certificates there's also an entry at Wikipedia. To solve you issue you can have a self-signed certificate (be aware of the security issues), but your users will be always prompted for an action. Another option is to apply for a certificate on CertCA since some Linux distributions have them on root CA's. The last and most reliable option is to acquire a certificate.

Categories : Ruby On Rails

Android text style missing light, medium, thin,
You can only combine those three attributes : normal bold italic http://developer.android.com/reference/android/widget/TextView.html#attr_android:textStyle So it can be : normal bold italic bold | italic

Categories : Android

Running RoR2 application via unicorn or thin gives gem missing error
I would expect that you have multiple versions of ruby/rubygems running (via RVM or rbenv for example). This might help you determine which ruby is actually used: which ruby which gem

Categories : Ruby On Rails

How to enable Etag in development mode in rails 3.2.12 using WEbrick / Thin
Remove rack-mini-profiler gem from your project and restart the server. For some reason rack-mini-profiler gem will strip out the Etags. I found this SO post because I was looking to figure out why it strips out the Etags. Update You can also disable that behavior according to the Official Docs like this Rack::MiniProfiler.config.disable_caching = false Please note that disabling that behavior may introduce some nasty bugs with rack-mini-profiler as mentioned in the documentation

Categories : Misc

Ruby servers (thin, unicorn, puma, etc) can only be installed using `bundle install`
I have no idea why this "solution" works: Compile ruby-2.0.0-p247 with the following flags: ./configure prefix=/change_this/to/your/needs --disable-install-doc --enable-shared Those flags are the same ones used by RVM. puma, thin, and unicorn all install fine. Note: rbenv users: change prefix= to your .rbenv/versions directory.

Categories : Ruby

HTTP streaming connection (SSE) client disconnect not detected with Sinatra/Thin on Heroku
I would do this check by hand sending, in a periodic time, alive signal where the client should respond if the message was received. Please, look at this simple chat implementation https://gist.github.com/tlewin/5708745 that illustrate this concept. The application communicates with the client using a simple JSON protocol. When the client receive the alive: true message, the application post back a response and the server store the last communication time.

Categories : Ruby

To get Clients hostname without using DNS look up using asp.net
you have to change only your local machine DNS address see here http://windows.microsoft.com/en-in/windows7/change-tcp-ip-settings

Categories : Asp Net

Does ehcache uses same cache for all clients
Please look at Ehcache Cache server http://ehcache.org/documentation/user-guide/cache-server For sample Java code, see this link: http://ehcache.org/documentation/user-guide/cache-server#java-code-samples Hope it helps

Categories : Java

Chat clients in Windows
Is your chat client a Peer 2 Peer model? In other words, do the clients connect directly to each other? If so, then they will need to know the IP/hostname of the other peers, or they will need to provide a way to publish their connection info. Going with that second method, you are close to establishing a client-server model. In this case, the server keeps track of the client sessions and routes the messages. The "big guys" use a client-server model, so it's close to option #1 in your question.

Categories : C#

GWTEventService push to all clients
On server-side, you can either: extend the RemoteEventServiceServlet (if you can/you are allowed to); use an in-process EventExecutorService. In the first case you already have an addEvent() method available right in the servlet, in the second case, you need to instantiate the executor service via: EventExecutorServiceFactory factory = EventExecutorServiceFactory.getInstance(); EventExecutorService service = factory.getEventExecutorService(httpServletRequest) Where httpServletRequest is the current http request (e.g., retrieve it using getThreadLocalRequest() in a RPC-based servlet). The point is that you need to define your domain(s) in which events will be published. Then you can freely use addEvent(yourDomain, yourEvent) (from your servlet, or from the executor) to send

Categories : Java

Broadcast message to all clients
You are calling the on function on the wrong object. You should rename the socket variable to something else. Most commonly, people use io. io = require('socket.io').listen(server); Then, you will need to call emit on sockets to send to all users: io.sockets.on('connection', function(socket) { io.sockets.emit('message', data); }); Of course, send is an emit that uses message as the event. So you can use it instead inside your callback: io.sockets.send(data); In either case, you then have to do the following in your client to react to this event: socket.on('message', function (data) { // Do things with data }); Note: socket.broadcast.emit can be used to send an event to all users connected other than the user that just connected as the socket.

Categories : Javascript

cannot emit sIo.sockets.clients()
Since the problem is a circular reference there no real 'fixing it'. Circular reference means that some object in the structure points to another part of the object, making an infinite loop. What you can do is something like this. var returnList = []; var clients = sIo.sockets.clients(); // grab list of clients, assuming its an array for(var i = 0; i < clients.length; i++) { var client = clients[i]; // next client in array // push values into return list returnList.push({ name: client.name, someOther: client.value, another: client.thing }); } // emit cleaned up list socket.emit('users', returnList); With this code you can cherry pick the values you want and send only those. This is good for several other reasons. Since this clients list is likely an internal imp

Categories : Node Js

WCF Service - how to protect so only my clients can use it?
If you are using Form Authentication then you can leverage the ASP.NET to check for FormAuthentication Cookie by enabling AspNetCompatibilityRequirementsMode to Required Or if your service is stand alone i.e is consumed by everyone then you can use oauth authentication you can read more about it Oauth Authentication What you could do is there would be a consumer secret key which would be shared to all authenticated clients. The caller would sign some info using this key and server would also sign it using the same key and then compare it. Hope it helps

Categories : C#

how to communicate between two clients using channel API?
The client_id you used to create the connection to the app engine server is what you need to send a message to another client_id. Either persist this on datastore or it is buildable by their ID but you would still need some sort of way to know what other client_id is for example: Create a room: room = models.Room(user=user_id) room.put() token = channel.create_channel(room.key.id() + user_id) Other one joins the room: room = models.Room.query().get() room.another_user = user_id room.put() token = channel.create_channel(room.key.id() + user_id) Then pass room id and token for reference on your js to send message: room = models.Room.get_by_id(room_id) send_to = room.user if room.user != user_id else room.other_user channel.send_message(room.key.id() + send_to, message) Note that us

Categories : Google App Engine

Tomcat - Filter clients by IP
Tomcat does not supply a component to do request-filtering with a configuration that is modifiable at run-time. You may be able to re-configure some components via JMX, but they may not behave the way you expect. Your best bet is to write your own component to do this kind of thing, or use something like Java ModSecurity.

Categories : Tomcat

Email clients for Dynamics AX
Dynamics AX uses MAPI for client mail. You can use the SysINetMail::sendEMail method to send a simple mail using this. If you mail in batch another option is to use SMTP mail using SysEmailTable::sendMail. This requires the use of mail templates.

Categories : Misc

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