w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Wireless-tools for linux to scan for wireless devices without them being connected
The following tools are available NetworkManager wicd Adding another Answer: You can use the following command also iwlist wlan0 scanning It gives lot of information about all the wireless networks available in your range... the sample output is also given here wlan0 Scan completed : Cell 01 - Address: 00:1F:E6:00:48:12 Channel:11 Frequency:2.462 GHz (Channel 11) Quality=28/70 Signal level=-82 dBm Encryption key:off ESSID:"BrcmAP0" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s 24 Mb/s; 36 Mb/s; 54 Mb/s Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s Mode:Master

Categories : C

SQLite - Insert Command is taking 10s on 1200 records
If you are using SQL server, you can use the "Display Estimated Execution plan" on your SQL statement to find if there is one part that is taking more resources than another. For example if you using the results of a select query to populate a table, the select with complicated joins may be slowing this down.

Categories : C#

A generic error occurred in GDI+ when viewing a 1200 Dpi Tiff Image
In my experience this error message is misleading and it's usually caused by an OutOfMemoryException. I'd wager that you're losing memory because you're failing to clean up all of your IDisposable objects. I understand that GC.Collect() isn't necessarily a reliable approach. Try putting some using blocks in. I use C# not VBScript so can't give you the exact syntax but in C# it'd be something like this: using (var SrcImg = Image.FromFile(path)) { using (var ms = MemoryStream()) { var FrDim = new FrameDimension(SrcImg.FrameDimensionsList(0)); SrcImg.SelectActiveFrame(FrDim, Page) SrcImg.Save(ms, ImageFormat.Tiff) using (var returnImage = Image.FromStream(ms)) { return returnImage; } } }

Categories : Asp Net

How do I put all this 1200+ line custom javascript into a closure so there are no global vars?
Without any idea of what you code looks like: (function(window, $) { // your code here }(window, jQuery)); But if everything is already in a $(document).ready(), then you don't really need to do anything.

Categories : Javascript

Fat Free router blocks Backbone router, how/when does Backbone router.js work?
If you are not using pushState, then the backbones routes are easy to differentiate from the server routes: /route1 /route2 /route1#route/a /route1#route/b The part before the hash is the one transmitted to the server (F3 routes). The part after the hash corresponds to the backbone routes. //F3 routing $f3->route('GET /route1',…) $f3->route('GET /route2',…) //Backbone routing routes: { "route/a": "routeA", "route/b": "routeB", } Note that the Backbone router doesn't generate any HTTP request to the server (unless you specifically define it of course). What generates automatically HTTP requests is the Backbone model. A backbone model is mapped to a server resource using urlRoot. The methods fetch(), save() and destroy() are then mapped respectively to the GET, PUT and

Categories : Backbone Js

Elasicsearch nodes disconnecting
To answer this myself with the actual reason for the behavior; A tcp-connection between 2 nodes (while keeping the connection to the other nodes) are disconnected. It could be recreated by using a utility like tcpkill. The Elasticsearch Zen discovery sadly does not handle errors like this very good, and all sorts of strange outcomes are possible. The node that looses connection to the master will do an election, and may confuse other nodes.

Categories : Elasticsearch

Exception when disconnecting GCDAsyncSocket
Well, I learned that my question was not helpful at all, sorry guys :) For everyone who has trouble interpreting the debuggers comments, read this article: Ray Wenderlich: My App Crashed, Now What? , it helped me finding the row of code which leaded to the error.

Categories : Iphone

Run PHP-Script through CLI and don't stop it when disconnecting SSH
Use screen to run your program screen php /var/www/admin/myscript.php and then detach from the screen using CTRL+A d You can use screen to run any number of programs by running screen command_you_want_to_run and then detach from the screen More about screen here http://www.gnu.org/software/screen/ A gentle introduction to screen http://www.thegeekstuff.com/2010/07/screen-command-examples/

Categories : PHP

Is there any way to get clients information when disconnecting from the server?
Once your client is disconnected, its all over. You cant get any more information from them at all. You could get it while they are connected, store it, and use it after they disconnect, but once they are disconnected you cant get anything from them at all. Its like if I walk to your front door and start a conversation with you and shortly there after leave. Then ten minutes later you say to the spot I was standing "how was your day?" Clearly Im not going to know you said that, so I wont be able to respond, and you wont know.

Categories : Java

Meteorite router package installation - Uncaught 'error' event on 'mrt add router'
Node 0.10.9 has a couple of issues. I'm not sure it'll help but try mrt add router --repoPort=80 as suggested here : https://github.com/oortcloud/meteorite/issues/135

Categories : Javascript

C# Named Pipes, how to detect a client disconnecting
Set a read timeout and poll the NamedPipeClientStream.IsConnected flag when a timeout occurs. A Read Timeout will cause reads that are idle for the timeout duration to throw InvalidOperationException If you are not reading, and want to detect disconnections, call this method on a worker thread for the lifetime of your pipe connection. while(pipe.IsConnected && !isPipeStopped) //use a flag so that you can manually stop this thread { System.Threading.Thread.Current.Sleep(500); } if(!pipe.IsConnected) { //pipe disconnected NotifyOfDisconnect(); }

Categories : C#

Tomcat with APR connector is disconnecting Java clients with SSL
main, WRITE: TLSv1 Handshake, length = 81 main, WRITE: SSLv2 client hello message, length = 110 I presume this is coming from a Java 6 environment (unless the client has explicitly enabled the SSLv2Hello protocol). Have you tried to see if the client was able to connect when run on a Java 7 JRE (which doesn't enable SSLv2Hello by default). I would guess this problem happens because the APR connector might not like receiving an SSLv2 Client Hello (which, coming from Java, isn't really an SSLv2 Client Hello, but a v3 wrapped into a v2, see EJP's answer). A couple of suggestions that may fix this: Try to make APR accept SSLv2 connections, at least SSLv3 or above wrapped into a v2 Hello. (Using SSLv2 isn't a good idea, but the SSLv2Hello with SSLv3/TLS shouldn't be a problem.) Switch A

Categories : Java

Mono/Unity3D disconnecting from a wcf duplex service after a while
I was facing the same problem, until I copy another version of System.ServiceModel.dll and System.Runtime.Serialization.dll in my Unity Asset (or plugin) folder. You can find these assemblies here : https://www.dropbox.com/sh/z05gp6zsqhshvpx/S-Wywb7NDh (Running with Unity 4.2.2f1) Have a good day !

Categories : Wcf

KnockOut JS - applying a new binding. Error - Message: ReferenceError: 'router' is undefined; Bindings value: css: { active: router.isNavigating }
Before you execute the problematic code, the Composition lifecycle of Durandal has bound the the shell.jsand subsequently the ViewModel agency.js with the UI. Meanwhile in the addContact function, at the last line you basically change the whole binding applied to the view: ko.applyBindings(objAgency); So your whole UI is now bound to this objAgency which I guess does not contain a router instance as the errors is pointing : ReferenceError: 'router' is undefined; This error comes probably from the binding of the shell because is no longer bound to the UI since your code applied new bindings. SOLUTION: The applyBindings is managed by Durandal in the composition process. If you want to modify some properties of the ViewModel there's no need to update the bindings. I don't know if

Categories : Javascript

How to test Meteor router or Iron router with laika
I had the same problem. I needed to navigate to some page before running my tests. I'm using iron router as well. I figured you can't just execute Router.go('foo') and that's it. You need to wait until the actual routing took place. Fortunately the router exposes a method Router.current() which is a reactive data source that will change as soon as your page is ready. So, in order to navigate to a specific route before running my tests, I firstly run the following code block: // route to /some/path client.evalSync(function() { // react on route change Deps.autorun(function() { if (Router.current().path == '/some/path') { emit('return'); this.stop(); } }); Router.go('/some/path'); }); Since this is within an evalSync()everything that

Categories : Meteor

Does windows azure virtual machine logs out when disconnecting
No, your Virtual Machines don't shut down when you disconnect from rdp/ssh. However: There's always the possibility that your machine will restart, even if infrequently (e.g. failed hardware, Host OS maintenance, etc.). So... your essential programs should be set up to auto-start at boot time, without requiring you to rdp/ssh in to start them up again.

Categories : Windows

adb device offline with ADB wireless
Disconnect adb over wifi, connect your phone with a USB-cable to your pc. It will ask you on your phone is you want to allow the connection. Tick always allow. You will only get this when you connect with USB and have to do this only once, you can use over wifi afterwards. Don't get the pop-up? Try the answers on google over a cable, since you need to do this first.

Categories : Android

Arduino wireless and Node.js
While the monitor is running no other program can read the serial port. In case you do not open both at the same time then things are more tricky. My suggestion would be to spy on the wire. That is: install Wireshark and have a look at the data on the serial connection / USB bus. You might also want to check how the serial port of the APC220 and the Arduino differ with regard to their serial/USB converters. Another idea would be to analyze this issue under Linux since may allow more insights into the low-level differences of the chip sets / USB activity. Of course if you do not have Linux experience this is hard to do, but maybe you know some Linux enthusiasts.

Categories : Node Js

Detecting if a mouse is wireless
start here: http://www.ibm.com/developerworks/library/j-usb/index.html[^] read on here: http://today.java.net/pub/a/today/2006/07/06/java-and-usb.html[^] and then check out this project: http://jusb.sourceforge.net/[^] These might help to get a little close to extract the specification of a hardware. I dont know if it can check whether a hardware is wireless or not, as the computer has nothing to do with it..

Categories : Java

iPhone Wireless Ad Hoc App Distribution
(Updated) Easiest Way: I have found another way to distribute the ipa. http://www.diawi.com/ This website provide service to distribute you adhoc app (ipa). Another way: To Distribute your app to other device your have to register those device in your developer account. To AdHoc distribution you need the devices UDID.... register those in developer account and make a AdHoc profile and sign your app using the profile. After that send the AdHoc profile and your app to the Users...

Categories : Iphone

why ip address differs when wireless is off?
.An IP address is the address of a network adapter within a specific local network. It will be different when connected to different networks. When not connected to any network, it will either be a link-local address or an auto-configuration address. You might want the MAC address, which is the hardware address of a single network adapter and is not very likely to change.

Categories : Java

Wireless.h How do I print out the signal level?
For future record, this was resolved from the comments, thanks to the relevant people. I simply needed to cast the unsigned int to a signed one and it was solved. Changed the print line to this: printf("Transmit power: %d ", (int8_t) result->stats.qual.level); Now the values that looked like 178, 200 turned to -80, -69 etc!

Categories : C

How to reset system in wireless driver?
As Basile says, kill() is a user space syscall, so you can't use it from a kernel module. It's a crude way to accomplish what you are trying to do anyways. Unless you have a reason to use emergency_restart() over kernel_restart() I would use the latter. The options you have can be found in reboot.h. BTW, this is opening a security hole in your system. Since the driver is interpreting the data packet to determine if it is time to restart, there the OS cannot help to determine if that source has authority to perform such an action on your system. You may be better off with a user-space daemon which is run with the appropriate permissions to reboot the computer, and can act as an authentication agent and a reboot agent rather than doing it in your driver.

Categories : C

Javascript detect Wireless settings
No. The best you can do is to use http://www.w3.org/TR/netinfo-api/#idl-def-Connection where avaliable. Support is low, but it will help you decide what sort of connection the device has. If you actually want geolocation, just ask for it directly using navigator.geolocation. (http://diveintohtml5.info/geolocation.html)

Categories : Javascript

Sending Message Using Wireless to GSM number
A part of the application is that the administrator can send universal notification to everyone registered to that application. How can i possibly do that? You can use Google Cloud Messaging for Android. It a service that allows you to send data from your server to your users' Android-powered device, and also to receive messages from devices on the same connection. You can send messages( or notifications) to all the Android users of your app. Each user would have a registrationId which would be unique for each user ( if you register them). That ID can be used to send messages to all your app users. P.s: By wireless I am assuming internet.

Categories : Android

Meteor ports used (seems to be blocked by wireless network)
It sounds a bit like the websocket bit of the connection isn't connecting through. In meteor there are two connections, one static containing the html, images and js (which looks like its working) and the other via websockets which handles the data & live updates. You could check in Chrome's javascript error console for a 400 websocket error, in which case it tries to drop to long polling, which takes quite a while. It might be something like a proxy which is troubling you. I've run into this without a HTTP proxy but a invisible socks proxy too (via iptables). You could check quickly too by checking Meteor.status() which would indicate its 'waiting' if the above is the case.

Categories : Meteor

Javascript to check the status of wireless connection
Browser errors and system tray icons will sufficiently indicate the state of the wireless network to the user. The way you describe your application indicates, to me, that you are doing some kind of continuous AJAX-style querying that is frequently interrupted. Rather than concentrating on underlying network connections, I recommend taking a more business-level approach: If your application cannot maintain a connection (or does not receive a response within a certain time limit), simply notify the user that a connection could not be established (for added robustness, keep retrying until it succeeds -- see, e.g. GMail's web interface). The user will have other means to diagnose why - your application should not and can not know the reason for the failure, your application only knows that i

Categories : Javascript

Setting up local wireless server using WAMP
On your hosting laptop open cmd and call ipconfig look for the internal IP address on the network interface your hosting the ad-hoc network. Enter that IP address into the browser on your client laptops web browser instead of localhost. If that doesn't work, try other ip addresses listed by ipconfig (incase you used the wrong) and then check the properties of your ad-hoc network, windows firewall and any other firewall software to disable anything that might be blocking it. An ad-hoc network is suitable option for what your doing, most people would probably use a switch or router though, however that requires hardware you probably don't have.

Categories : Networking

Wireless tools: Converting network essid to char
It's a completely different problem to the one you think you have. What's happening is that you never initialize result, so this: network = result->b.essid; is just going to give you garbage, and this: result = result->next; will likely give you an infinite loop. You should probably turn up the warning level on your compiler, and/or look into tools like splint and Valgrind.

Categories : C

Intercepting webpage requests through Wireless Hosted Network
You will need to set up your own DNS server for this to work. The problem is that your laptop makes a DNS query for google.com and receives an IP which points to Google's servers and not yours. Or, if there is only a few sites you want to redirect - add entries for them in your hosts file.

Categories : C#

How to configure ASP.NET project to be accessible via local wireless network?
Short answer, change from 'localhost' to '0.0.0.0'. That's probably all you need. Also check the port is open through your firewall, if you have one turned on. you can ping other devices on the wifi network. Some wifi access points restrict sending traffic from one node to another on the same wlan. Longer answer: When you use localhost as the hostname it's resolved (through system32/drivers/etc) to 127.0.0.1. The network card is designed to restrict access from anywhere else to that ip address, so you will need to choose a different IP address to bind to. You could choose the actual IP address for your machine, but that may change over time. The special IP address, 0.0.0.0, means bind to all interfaces on the system.

Categories : Asp Net

how to send a message in multicast group (wired to wireless)
sock.Bind(new IPEndPoint(IPAddress.Any, _Port)); The problem is here. That causes UDP to route the outgoing datagram according to the unicast IP routing tables, and if the routing table doesn't prefer the wireless route it won't be used. Bind it to an IP address of the local wifi interface.

Categories : C#

how to disable fast frames in ath5k wireless driver
Ok, I try to explain with a simplified example #include <stdio.h> /* Just for print in binary mode */ char *chartobin(unsigned char c) { static char a[9]; int i; for (i = 0; i < 8; i++) a[7 - i] = (c & (1 << i)) == (1 << i) ? '1' : '0'; a[8] = ''; return a; } int main(void) { unsigned char u = 0xf; printf("%s ", chartobin(u)); u >>= 2; // Shift bits 2 positions (to the right) printf("%s ", chartobin(u)); printf("%s ", chartobin(u & 0x1)); // Check if the last bit is on return 0; } Output: 00001111 00000011 00000001 Do I replace the above line with #define AR5K_EEPROM_FF_DIS(_v) 1? Nooooo!! If you initialize u with 0xb instead of 0xf you get: 00001011 00000010 00000000 As you ca

Categories : C

Socket.getOutputStream() blocking when wireless connection disabled
SSLSocket.getOutputStream() initiates the SSL handshake if neceessary, which involves reads, which may block. You should set a read timeout on the socket before calling it, with Socket.setSoTimeout(). I'm intrigued by "SSLSocket.getOutputStream() initiates the SSL handshake if neceessary" what defines "if necessary"? If it hasn't already been done, or the current SSL Session has been invalidated. Is this behavior (initiating the SSL handshake) something that's required by the JVM specification? IOW is it guaranteed across JVMs? No, it's required by the TLS/SSL specification. I've also read the only way to determine if a socket connex will work is to read/write data with it. This is not an option for me. Yes it is. You're doing it. The SSL handshake consists of reads

Categories : Java

How to configure docker to be able to have internet access via wireless connection?
I see two possibility: 1) Make sure your ip_forward is set to 1 (sysctl -w net.ipv4.ip_forward=1) 2) Make sure it is not a DNS issue: try docker run base ping google.com, if it does not work, you can set custom dns server: docker run -dns 8.8.8.8 base ping google.com.

Categories : Misc

Android mobile not detecting wireless network created on my laptop
Ad Hoc networks are not supported natively by Android devices, unless you get your device rooted and make some tricks in the underlying linux system. There are a lot of pages talking about that: http://dev.gadgeticworld.com/how-to-connect-android-devices-to-adhoc-network/ http://www.pcadvisor.co.uk/how-to/google-android/3372947/connect-android-phone-ad-hoc-network/ http://code.google.com/p/adhoc-on-android/ You can try this at your risk: http://www.arenddeboer.com/wifi-ad-hoc-enabler-for-android

Categories : Android

Suggested wireless access point with support for 802.11n and vlan tagging (802.1q)
Have a look at the Buffalo WAPS-APG600H. This access point supports vlan tagging, has two gigabit lan ports (1 PoE), supports 300mbps at both 2.4ghz & 5ghz and can handle multiple SSIDs - each of which can be assigned to unique vlans. The Draytek AP800 offers a similar spec at a similar price (you need to buy a separate 5ghz dongle for 5ghz operation, which takes it up to the same price as the Buffalo), but I've had real problems getting these to work reliably in a vlan environment. Main problems have been slow DHCP responses and intermittent network connection dropouts. The Draytek works ok as an untagged device connecting into a vlan switch, but you then lose the ability to create multiple SSIDs on dedicated vlans. Also, this access point has 4 fast ethernet lan ports (1 PoE), but I

Categories : Networking

Android ksoap connection timed out when using more than one device on same wireless network :(
Turns out ksoap2 works well, and my code works well. After tracing ksoap call method, and sniffing html traffic I found out that, sometimes, server doesn't respond on my requests. This happens because server configuration was changed and now, when there are a lot of requests from the same IP address, server treats some of them as retransmission and ignores them. This problem has to be solved on server side.

Categories : Android

Send and receive info between windows and android through wireless network
You need to create Web Services and call them from your android app. Please have a look at this link which will give you information on calling webservices in android how to call RESTful web service from android?

Categories : C#

Real-time wireless sensor data transfer. WiFi or Bluetooth? TCP or UDP?
Question 1: Is it worthwhile? Sorry, you have to decide that one yourself once you understand the trade-offs (including development time) Question 2: Point-to-point? Yes Question 3: Transfer at 500 Hz? 500 msg per second * 200 bytes per message(allowing protocol overhead) * 8 bits per byte = 0.8 GHz. So it's theoretically possible on a 1Ghz channel. However this assumes perfect senders & receivers, so you might not do quite that well. If you can WiFi at 10Ghz you should be fine. As a general rule UDP is faster than TCP due to less protocol overhead. Question 4: Reliability. TCP guarantees delivery in order but you have to find the message boundaries yourself. UDP is a best-effort protocol for both delivery and ordering of messages, but the packet boundaries match the mes

Categories : Android



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