w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Scanning for wifi signals only in 2.4Ghz band
Is there any way I could tell the device to scan only in the 2.4GHz band I think there is not way how to achieve it. All you can do is only call startScan() and wait for results. Then you can filter results due to their frequency especially for 2.4Ghz frequency of each AP (Access Point) should be bellow 2500 Mhz.

Categories : Android

Dose Google AppEngine support self-signed cert? (not custom doamin)
The docs clearly state that GAE does support self-signed certs: https://developers.google.com/appengine/docs/ssl#cert_type It does not state the minimum length of the key.

Categories : Google App Engine

How to detect whether device has 5Ghz Wi-Fi or not
Our approach is to look for the results of a wifi scan and look for a signal of 5GHz. That's not a good solution, 'cause it would give false negatives, but if your context is a venue where you can assure that there are 5GHz wifis near you, it can solve the issue. See: How can I get Android Wifi Scan Results into a list? The data you can extract from a wifi scan (look for the frequency value): Hope it helps!

Categories : Android

Does IOS support simultaneous wifi and 3g/4g connections?
I've been looking for this answer myself and eventually found a solution here: http://apple.stackexchange.com/questions/62870/how-do-i-tell-an-ios-device-theres-no-internet-connection-on-the-wifi The solution does not involve any code but instead changing the settings on your iPad. Change the settings for the Wi-Fi connection to Static instead of DHCP. In the Static settings leave the Router field EMPTY. What I did was write down the IP Address, Subnet Mask, and DNS values that were being used by DHCP and then just left the Router field blank. I have found a couple of other posts that suggest entering 0 or 0.0.0.0 but leaving it blank was what made it work for me.

Categories : IOS

What is the preferred way to create a signal of signals to combine to signals and complete when either completes or errors?
Something like this works for me in both success and failure cases: RACSignal *signal = [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) { RACDisposable *success = [[[[NSNotificationCenter defaultCenter] rac_addObserverForName:@"TEST_SUCESS" object:nil] take:1] subscribeNext:^(id x) { [subscriber sendNext:x]; } completed:^{ [subscriber sendCompleted]; }]; RACDisposable *failure = [[[[NSNotificationCenter defaultCenter] rac_addObserverForName:@"TEST_FAILURE" object:nil] take:1] s

Categories : Objective C

SAS: to count how many respondents, who have *brand i* in their choice set, have also *brand j* in the choice set
Just have a look at the proc freq command. You basically want a proc freq where the tables statement is like: proc freq data=YOUR_DATASET noprint; tables brand1*brand2*brand3*...*brandn /out=OUTPUT_DATASET; run; disclaimer: never have used it myself to that extent yet (that many variables interrelated), i have a suspicion it may be very resource-heavy. If you only want the 2-way interactions. you then just do a datastep where you filter for those: data RESULT_DATASET; set OUTPUT_DATASET; where sum(of: brand1--brandn) EQ 2; run;

Categories : Sas

How to use Android mobile as Remote control for wifi enabled raspberry pi car , without using any access point/wifi router
as of now i have used USB/Wifi tethering method which has worked for me.i first tried with USB tethering , it was assigning some IP to Rpi. i changed the /etc/network/interfaces file so that this IP remain static. i used android Ip address as gateway and was able to ping them and even i was able to SSH from connectBot app. i think the same approah will work for wifi also. i will give it a try later. this discussion can be closed now :) my issue was resolved.

Categories : Misc

Android: How to detect if a device is WiFi or WiFi+Cellular
Here is excerpt from my code (it works so far): ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE); NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); NetworkInfo mEthernet = connManager.getNetworkInfo(ConnectivityManager.TYPE_ETHERNET); NetworkInfo m3G = connManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (mWifi!=null) isOnWifi = mWifi.isConnected(); if (mEthernet!=null) isOnEthernet = mEthernet.isConnected(); if (m3G!=null) is3G = m3G.isConnected();

Categories : Android

Android 4.2:turning off wifi when wifi direct is enabled
Try this code Button btnWiFi = (Button)findViewById(R.id.btnWiFi); btnWiFi.setOnClickListener(new OnClickListener() { @SuppressWarnings("deprecation") @Override public void onClick(View arg0) { // TODO Auto-generated method stub WifiManager wifi =(WifiManager)getSystemService(Context.WIFI_SERVICE); if(wifi.isWifiEnabled()) { Toast.makeText(getBaseContext(), "WiFi is Enabled", Toast.LENGTH_LONG).show(); } else { AlertDialog builder = new AlertDialog.Builder(MainActivity.this).create(); builder.setTitle("Caution"); builder.setMessage("WiFi is Disabled.

Categories : Android

When downloading data over WiFi, how do I know I am connected using Wifi
ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE); NetworkInfo info = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); More information can be extracted from NetworkInfo. Just check this reference. You'll need this permission: <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> Complementing: I am not sure if it's an Android default or a device configuration, but whenever there is an established wifi connection, 3G is automatically disabled. I tested in a few devices and all of them have this behavior.

Categories : Java

Audio Stream WiFi to WiFi - Broadcast
Yes, it is doable. You will need two major components: A network API to send/receive data , and audio capture and playback API. For network library, you can try CocoaAsyncSocket. It is quite simple to use. You can use UDP protocol with multicast address. Even thought you said you wanted to broadcast, but you would be better off using multicast ( send to a group of devices). For Audio sample how to capture and playback, check out my answer on this .

Categories : IOS

pass string between two wifi direct connected user in android using wifi direct?
you can use socket to connect between two peers in the same network. for instance create a server socket on one of the peers on any port and then from the client side connect to that port on the other user . then you can use this socket connection to send strings, file whatever you want. for starters i would recommend you employ the server socket on the group owner so it will be easier on your client side to get the ip of the peer(i.e group owner) using the groupOwnerAddress field provided by the api refer to this -> http://www.oracle.com/technetwork/java/socket-140484.html

Categories : Android

Dose anyone know something like PropertyEditor or PropertyGrid in SWT?
Using data bindings might be what you're looking for. https://developers.google.com/java-dev-tools/wbpro/features/swt/data_binding/example

Categories : Java

how dose jemalloc on ARM/Linux
At the bottom of this site http://www.canonware.com/jemalloc/ (seems to be official site) you can find this e-mail: jasone@canonware.com which you can contact for support.

Categories : C

Android transferring data between a wifi direct and non-wifi direct device
following pattern can connect via wifi. wifi direct device(P2P AP) <-> non-wifi direct device, has wifi(W) P2P AP: do wifi direct api "createGroup()", this api create wifi accesspoint P2P AP: do wifi direct api "requestGroupInfo()", this api returns WifiP2pGroup, that contains wifi accesspoint informations, such as ap name, password and other. (P2P AP to W: tell ap name and password to W device owner) W: setting app -> wireless -> search and connect wifi accesspoint created by P2P AP device. if you need auto connect to wifi accesspoint, P2P AP app should have a broadcast accesspoint name and password...

Categories : Android

The wpf controls dose't displaying on the canvas
Inheriting WPF controls is problematic to say the least. WPF control's are "lookless". that is to say, the control itself doesn't know how it's going to be presented. When the control is placed in a window WPF looks for the corresponding ControlTemplate to this specific control. The problem with inherited controls is that they have no such template. If you want to display it, you'll have to write one yourself, and that's not always simple. You can find an example here, but i'd recommend against it. Use UserControls instead.

Categories : C#

Ajax code dose not working properly
Some headers must be included for POST request: xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.setRequestHeader("Content-length", params.length); xhr.setRequestHeader("Connection", "close"); Edit : My script use a variable called 'params'. So add a var at the beginning of your script and put in it the content of your request : var params = "info="+str+"&info_1="+info_1+"&info_2="+info_2; And replace in the call of xhr.send "info="+str+"&info_1="+info_1+"&info_2="+info_2; by params: xhr.send(params); Here is the final script: var xhr = new XMLHttpRequest(); var params = "info="+str+"&info_1="+info_1+"&info_2="+info_2; xhr.open("POST",url,true); xhr.onreadystatechange = function() { if( this.readyState == 4 && thi

Categories : PHP

MSSQL dose not return data for all fields
You need to use SQL Server Profiler to see what’s actually getting to database engine. If your stored procedure is executed correctly when run from SSMS then there is a problem somewhere in PHP part. Are you using the same database using when testing from SSMS? There might be some issue in that…

Categories : PHP

Dynatree node.reloadChildren() dose not always refresh tree in FireFox or IE
ajxAddNewCatalogProduct(products, node); starts an asynchronous request and may return before it is processed. Try to call node.reloadChildren(); in the success callback of your ajax call.

Categories : Jquery

brand new app I'm pushing to github
Try ssh://git@github.com/Mallanaga/ABCD.git instead of ssh://git@github/Mallanaga/ABCD.git The command is git remote set-url origin ssh://git@github.com/Mallanaga/ABCD.git

Categories : GIT

Filter by brand loop
Try this: $sortby = mysql_real_escape_string($_GET['sortby']) or $sortby = "name"; if($sortby != "name") { $sort_query = "WHERE category = '$sortby'"; $select[$sortby] = 'selected'; } else { $sort_query = ""; } $sql = mysql_query("SELECT * FROM products $sort_query");

Categories : PHP

Magento brand page based on attribute
Solution 1: add a new attribute to categories : brand_to_display where you can save the brand value add all products to said categories find where the product collection is loaded for the category view and chack if brand to display is set, if so add an "addAttributeToFilter" on your collection Solution 2 (better shop performance): add a new attribute to categories : brand_to_display where you can save the brand value add an event listener for saving product data in admin area and before save find the categories that have brand_to_display = product->getBrand() and attach product to said categories

Categories : PHP

image map brand logo change on hover
you don't need any map tags to achieve this you can do this in two ways <li><a href="#" id="first"><img src="blackenwhite.jpg"></a></li> <li><a href="#" id="first"><img src="blackenwhite.jpg"></a></li> then change the src attribute of the images via jquery in a hover event OR You can do it with just css which is way more easier <li><a href="#" id="first" class="brands">Brand 1</a></li> <li><a href="#" id="first" class="brands">Brand 2</a></li> This would be the css .brands { text-indent:-1000px;} #first {background:url('blackenwhite.jpg') no-repeat center center;} #first:hover {background:url('color.jpg');} do this for each brand HOpe this helps :D

Categories : HTML

Product name, brand and price is not displaying accordingly in page
your loop is incorrectly placed. you need to move it down as described here. <html> <title>Edit Product</title> <body> <a href="#">Home</a> <br/><br/> <form name="edit" method="post" action="updprod.php"> <table border="0"> while($res=mysql_fetch_array($result)) { $prod_name = $res['prod_name']; $prod_brand = $res['prod_brand']; $prod_price = $res['prod_price']; <tr> <td>Product Name</td> <td> <input disabled="disabled" type="text" name="prod_name" value=<?php echo $prod_name;?>/> </td> </tr> <tr> <td>Brand</td> <td> <input disabled="disabled" type="text" name="prod_brand" value=<?php echo $prod_brand;?>> </td> </t

Categories : PHP

How can I configure NHibernate so that I can create a new (Brand New) session as I need it?
You probably just want a new transaction in the loop. For a new transaction, your code should look like ISession session = ...; // Create the session as you are currently doing it // Pass the session into myRepoClass foreach(var record in recordsToImport) { using (ITransaction trx = session.BeginTransaction()) { myRepoClass.Update(record); trx.Commit(); } }

Categories : C#

HTML5 window.postMessage in Youtube Brand Channel
Make sure that your custom gadget is accessible with both protocols, http and https. When user opens your channel with url https://youtube.com/[username], youtube will render your gadget in iframe with https, when user opens http://youtube.com/[username], youtube will render http version of your gadget. Just make sure that you are not redirecting from http to https. We made a gadget like this a couple of days ago with dynamic resizing and keeping in mind what i wrote earlier everything works on both protocols.

Categories : Javascript

Query doesn't return empty Brand fields
I was able to retrieve the records with a right join. Access kept complaining that putting an outer join where I have the right one was a syntax error. It appears access should use Outer joins as I read from the docs here http://office.microsoft.com/en-us/access-help/creating-an-outer-join-query-in-access-HA001034555.aspx SELECT Review.ID, Review.Claim, Review.Consultant, Review.TSO, Review.[Claim Review Date], Review.[Discussion Point], Review.[Review Notes], Review.[Review Decision], Brand.Brand, Categories.Reason, [TSO Leader].LeaderName FROM [TSO Leader] INNER JOIN (Categories INNER JOIN (Brand RIGHT JOIN Review ON Brand.BrandID=Review.Brand) ON Categories.CategoriesID=Review.Categories) ON [TSO Leader].LeaderID=Review.[TSO Leader];

Categories : SQL

How to use CSS in Bootstrap to load a logo in the nav-brand class and have it centred?
Now add line height in your anchor link and Display inline-block as like this .navbar-brand.pull-left+a { display: inline-block; vertical-align: top; line-height: 50px; } Result is this

Categories : CSS

How to align brand + links on navbar in twitter bootstrap(the latest version V3.0.0)
There is this helper class class="pull-left" that could possibly help you. I've missed it the first times, bootstrap navbar-component-alignment. However, if you want to align a dropdown menu item in the navbar, you should use 'dropdown-menu-left' in place of the 'dropdown-menu' class bootstrap dropdown-alignment.

Categories : Misc

Mapping Android device models to human-readable brand names
Unfortunately, android.os.Build.MODEL returns the model name, such as GT-I9300 MODEL in many cases will return what you consider the "brand name" to be. It will vary by device, manufacturer, and carrier. Where can I find a complete list of devices with a mapping There is none. You won't even find a complete list of every Android device model ever manufacturered, let alone some three-dimensional matrix mapping models to carriers to "brand names" in all relevant human languages. Moreover, since you cannot necessarily determine the carrier responsible for the device's manufacture (which may differ from the carrier whose SIM is in the device), you may lack sufficient detail at runtime to make this mapping in all cases. or a better solution for this mapping issue? Get rid of t

Categories : Android

What is the proper jQuery Syntax for removing a class based upon a visitor's brand web browser?
You need to wrap the code in a $(document).ready() block, or the #someIdHere element won't exist on the page when your code executes. $(document).ready(function () { if ((navigator.userAgent.match(/IE/i))) { $('#someIdHere').removeClass('someClassHere'); } }); .. alternatively, you can include your code at the bottom of the page (before the </body>) rather than in the <head>. Also note that you run the risk of matching non-IE browsers with your regex pattern. Something like /MSIE/i would be more precise. FWIW, see HTML Script tag: type or language (or omit both)? with regard to using language=javascript in <script /> tags.

Categories : Jquery

Bootstrap navbar a.brand breaks onto own line when setting @gridGutterWidth(s) to 0px for a flush grid
I believe the gutter is added by .row where you would normally place spans. I've added negative left margin values to .row or .row-fluid before and it seemed to have worked, I'm not sure if this is wise to compile, maybe just override with a separate stylesheet. .row { margin-left: -20px; }

Categories : HTML

Brand new WPF Application, MVVM, and how to use POCO partical classes generated from ADO Entity Data Model....?
Your question is really broad, but you might want to start out by deciding how your ViewModels are going to get their data and submit their updates through the EF classes. While you can bind your EF types directly to your view I've found that a better approach is to keep your ViewModels separate from the ORM model types as much as possible. Model the needs of the View in terms of the behaviours (ICommands) and data (ViewModel props or child ViewModel props or ObservableObjects) apart from the EF types. Then create a service type that can be injected or instantiated within the ViewModel that will interact with the data model directly and translate the ViewModels into Data Models and vice versa. You can either do that work manually, with LINQ/Lambdas, or using something like AutoMapper

Categories : Wpf

support lib android.support.v7.widget.GridLayout causes InflateException / ClassNotFoundException with app widgets
When making widgets, you are constrained to the Views that implement the RemoteViews mechanism. The way that mechanism works is that the remote, "host" process is the one doing the actual inflating. Therefore, if that remote process (the launcher that hosts the widget) does not have the GridLayout class in its classpath, there is absolutely no way you can do this short of drawing the View in your own process and setting it as a Bitmap on an ImageView. I wouldn't do that, though. In general, when making widgets, constrain yourself to the Views that come with the framework.

Categories : Android

jQuery.support.ajax returns true even if XMLHTTP support is disabled
According to this Microsoft page, the IE8 setting only disables the W3C standard XMLHttpRequest object. It leaves the ActiveX Microsoft.XMLHTTP control enabled. There is a separate setting to disable (all) ActiveX controls. The jQuery support.ajax test works for both methods, so disabling the former but leaving the latter enabled will return true.

Categories : Javascript

Proble with support library android.support.v7.app.ActionBarActivity
Create a custom and modify it with this: <item name="android:actionMenuTextColor">#aabbcc</item> I didn't confirm this though (I'm just pretty confident it will work).

Categories : Android

OpenCV: No GPU support (The library is compiled without CUDA support)
You seem to have a mix of two different versions of OpenCV on your system (2.4.6.1 and 2.4.2). The older version (2.4.2) appears to be built without GPU support. You might try removing any older versions of OpenCV completely and start your build process for 2.4.6.1 over again.

Categories : C++

Design Scenario: Smartphone class and will have derived classes like IPhone,AndroidPhone,WindowsMobilePhone can be even phone names with brand
Your design seems to be fine. I would suggest: 1-> Create a Parent Class "SmartPhone" 2-> It can have SmartPhone must have attributes like Model,Release Year, Brand. 3-> Parent class should also include Smart Phone must have features like Calling,Messaging as abstract methods 3-> For Common SmartPhone features,You can have Interfaces that Indicates SmartPhone common features like Camera,Palyer etc 4-> Then Child Classes like AndroidPhone ,iOSPhone can inherit the SmartPhone Parent Class and shall define all must have attributes and featuresof a SmartPhone. 5-> Child Classes then can implement common features Interfaces , if those features are spported by that Phone. 6->In future if a new SmartPhone Child Class is created, it can also inherit from SmartPhone Parent Class and implem

Categories : Java

LeapMotion, Qt and signals
Use the Q_OBJECT macro http://qt-project.org/doc/qt-5.0/qtcore/qobject.html#Q_OBJECT The Q_OBJECT macro must appear in the private section of a class definition that declares its own signals and slots or that uses other services provided by Qt's meta-object system. Oh, also, QObject must be the first inherited class

Categories : C++

C++, Qt Signals & slots
Your method is implemented as void testprint() { ... }, but it should be void ser::testprint() { ... }. It's in your cpp file. Also note that you don't need to use this-> to refer to class members. emit testsignal(ba1); will fork fine.

Categories : C++



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