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

Finding the distance of object from a logitech camera .
though i could barely understand your question i think you are looking for z-direction information even though the image from a camera only gives x-direction and y-direction information. what you have embarked upon is considerably tricky. at you current stage of investigation i would recommend that you go through chapter 4 and 5 of Programming Computer Vision with Python. Then try an algorithm, if your code is giving you errors then someone at SO can help you. even if you have never worked with python the codes in that book will still be understandable because they have lots of explanation. essentially, you could get the algorithm and pseudocode you need for your problem. alternatively, cameras output metadata which is available when you save an image from the camera. this could be a

Categories : Opencv

Unifying Types in Haskell
Let's just do the first. map :: (a -> b) -> [a] -> [b] Now we can write it again with two different names, for clarity: map :: (c -> d) -> [c] -> [d] Now we substitute the second as the first parameter of the first, getting: (a -> b) === (c -> d) -> ([c] -> [d]) (recall the associativity of (->)) a === (c -> d) b === ([c] -> [d]) Now we substitute those type assignments into the remaining portion of the first signature, getting map map :: [c -> d] -> [[c] -> [d]] Clear?

Categories : Haskell

Unifying view bounds within classes
You could rely on a type class. A bit heavy, but works: trait Cmp[A,B] { def cmp( a: A, b: B ): Boolean } trait LowPriorityCmpImplicits { implicit def cmp1[A,B]( implicit conv: A => B, ord: Ordering[B] ) = new Cmp[A, B]{ def cmp( a: A, b: B ) = ord.lt(conv(a), b) } } object Cmp extends LowPriorityCmpImplicits { implicit def cmp2[A,B]( implicit conv: B => A, ord: Ordering[A] ) = new Cmp[A, B]{ def cmp( a: A, b: B ) = ord.lt(a, conv(b)) } } case class Foo[A](i:A) { def cmp[B](b: B)(implicit cmp: Cmp[A,B]) = cmp.cmp( i, b ) } The LowPriorityCmpImplicits trait is to avoid ambiguity when both types are the same (cmp2 will be favored over cmp1) Test: scala> Foo(1).cmp(2.0) res0: Boolean = true scala> Foo(1.0).cmp(2) res1: Boolean = true scala> Foo(1).c

Categories : Scala

Combining Hashtables without unifying interface
private static final class MapGroup { private final List maps = new ArrayList(); public MapGroup(Hashtable start) { maps.add(start); } public MapGroup(MapGroup group) { for (int x = 0; x < group.maps.size(); x++) { maps.add(group.maps.get(x)); } } public void add(Hashtable h) { maps.add(h); } public Enumeration keys() { return new Enumeration() { private final Enumeration[] enumerations; private int i; { enumerations = new Enumeration[maps.size()]; for (int x = 0; x < maps.size(); x++) { enumerations[x] = ((Hashtable) maps.get(x)).keys(); } } public boolean hasMoreElem

Categories : Java

ON CONFLICT IGNORE - How to insert data into a dupes table if there is a conflict instead of ignoring
Are you looking for this? Tables CREATE TABLE programs ( programId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, programName TEXT NOT NULL, episodeName TEXT, UNIQUE(programName, episodeName) ON CONFLICT IGNORE ); CREATE TABLE program_dupes ( programId INTEGER, programName TEXT, episodeName TEXT ); Trigger CREATE TRIGGER tg_programs_insert BEFORE INSERT ON programs FOR EACH ROW BEGIN INSERT INTO program_dupes (programId, programName, episodeName) SELECT programId, NEW.programName, NEW.episodeName FROM programs WHERE programName = NEW.programName AND episodeName = NEW.episodeName; END Here is SQLFiddle demo

Categories : SQL

Why are the Ember Data REST Adapter and LS Adapter structured differently? One returns, one doesn't
Rest Adapter didn't have that change too, until this PR. I think that LS Adapter doesn't return the promisse because it outdated, at the moment the last update in this file was 7 months ago. I recommend you to return the promisse to have the advanage of use. App.User.find().then( ... )

Categories : Ember Js

How to put another adapter inside my custom adapter (info from one object)
I used ((Activity)context). It is working now! I still don't know what it really means or does. But I'm happy that it is working for now. I'm still wondering if this is the right way to do it.

Categories : Android

Conflict resolution or conflict avoidance in GIT?
Should we be using branches to work separately? Yes: he should have done a git pull --rebase (for a branch not yet pushed), before pushing his changes, at which point you would have been able to merge his branch as a simple fast-forward merge. See also merge vs. rebase and a similar blog post. (from Git Is Your Friend not a Foe Vol. 4: Rebasing) More generally, yes, merge locally before pushing.

Categories : GIT

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

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

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

How to make the Ember Local Storage Adapter (LSAdapter) work with the Ember REST Adapter?
After reading Ember data's DS.Store comments, it looks like it might be possible to use 2 adapters at once: You can retrieve models from the store in several ways. To retrieve a record for a specific id, use DS.Model's find() method: var person = App.Person.find(123); If your application has multiple DS.Store instances (an unusual case), you can specify which store should be used: var person = store.find(App.Person, 123); I will update this answer if I try it out and get it working. Update 1: Check out the code in UPDATED for Additional question where both FixtureAdapter and RestAdapter are called.

Categories : Ember Js

I am calling custom category adapter.How to set background for full screen in android when using custom adapter
Actually i have extended ListActivity class and i was setting background image of adapter.I figured out the issue.I have to add following code in onCreate Method getListView().setBackgroundResource(R.drawable.back);

Categories : Android

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

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

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

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

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

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

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

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

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

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

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

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#

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#

Android ListView set two different adapter. ListView is not updated to newly set adapter until I scroll it
The UI in Android is efficient and will only update when it NEEDS to. In the case of your list the UI only updates when you scroll it because it needs to fetch more items for the list. To force an update you need to call invalidate() on your ListView.

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#

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 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

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

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

linux wireless driver coding (ath9k): which API to use for reconfiguring channel type (b/t HT20 & HT40) on the go?
I think it's the linux-wireless mailing list material. Please make sure you include the change you have made (choose one approach that you think would be the best) and the resulting backtrace. My gut feeling you are calling a function that expects process context from softirq context.

Categories : Linux

Rake db:migrate error Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter`
It looks like you might be using sqlite in development. Can you try this in your gemfile instead of what you have? group :development, :test do gem 'sqlite3' gem "unicorn", "~> 4.6.2" end Then usual bundle install and run migration again.

Categories : Ruby On Rails

Hostname in Peer to Peer Wireless Networking using Socket between two Mobile devices
For your second question. YOu will have to use a port number that is known to both devices, otherwise the client would not know the port number on which to invoke connect() and thus, establish the connection with the server. Now, first 1024 are reserved but so are some of the ports beyond 1024! You can find hte list here: http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml . The largest numebr I see is 49151, so I would start with a random value between 49151 and 64K. Lastly, since TCP layer is standard, picking a common port number should not matter if you use an iPhone with Android or any other TCP-aware device. Your first question is tricky. The more basic question is how do you discover the peer? May be, the peers can broadcast messages once in

Categories : C

Setting up local ip over wireless network to create a local server on Ubuntu
Just add this to your normal runserver command: python manage.py runserver 0.0.0.0:8000 Then others on your local network can access it through: http://192.168.1.18:8000

Categories : Django



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