w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Nested Repeaters in C#
There are plenty of examples available on internet. Following are some of that. http://www.codeproject.com/Tips/563919/Nested-Repeater-Controls-in-ASP-NET http://support.microsoft.com/kb/326338 From below link you can download the code also. http://everymanprogrammer.com/index.php/nested-repeaters-do-it-clean-and-simple-a-beginners-tutorial-part-2/

Categories : Asp Net

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

If statement in repeaters ItemTemplate
I would use codebehind: protected void OnCheckboxListItemBound(Object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { HtmlTableRow itemRow = (HtmlTableRow) e.Item.FindControl("itemRow"); itemRow.Visible = e.Item.ItemIndex % 2 == 0; } }

Categories : C#

C# Repeaters while amending some figures
As I understand from your explanation you need to repeat the same piece of HTML on many places with only difference of some values of some cells. So I suggest you create a new ASCX control. Webusercontrol is very similar to asp.net page, but has .ascx extension and can be inserted onto page or other control. So to create it use Add -> New Item -> Web User Control in VisualStudio. The web user control will have markup file .ascx and code-behind .ascx.cs file. Place your html on markup file: <div class="span3 finance-boxes"> <table class="table table-bordered table-hover finance-table"> <tr><td>Title</td></tr> <tr><td class="fig" runat="server" ID="cell1"></td></tr> <tr><td>Title</td>

Categories : C#

Accessing Nested repeaters
Repeaters have an ItemCommand event that I think would be useful for you. When the Button's Click event happens, the ItemCommand event will swallow it up if you haven't set the Button's Click event handler. On the ItemCommand event you can use the e arguments to determine which button, and the sender to determine which Repeater it came from. I was a little confused by your question, but I think this is the answer you're driving to. Does that help?

Categories : C#

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

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

How to get LinkButton text in nested Repeaters
What you should do is use the sender argument in the LinkButton_Click handler to get access to the instance of LinkButton that was actually clicked, and has raised the Click event: protected void LinkButton1_Click(object sender, EventArgs e) { // Use sender instead of trying to find the control within the Repeater LinkButton lnkBtnTags = (LinkButton) sender; Response.Redirect("~/WebsofWonder.aspx?tag=" + lnkBtnTags.Text); }

Categories : C#

Prototype and jQuery UI interference
You should use $ for Prototype functions and jQuery for jQuery's, like this: <script type="text/javascript"> jQuery(document).ready(function() { jQuery('.product_tabs').tabs(); }); </script>

Categories : Jquery

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

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

Bootstrap accordion collapsible and checkbox change interference
I found the solution by using this. It seems it stops event propagation when jQuery stopPropogation() and StopImmediatePropagation() didn't work for me $('#accordion').on('hidden',function(e) { return false;//stopping propagation });

Categories : Jquery

How do I programmatically change the color behind a pager or repeaters select page number?
UserControl ASPX: <p> Page <asp:Label ID="currentPageLabel" runat="server" /> of <asp:Label ID="howManyPagesLabel" runat="server" /> | <asp:HyperLink ID="previousLink" Runat="server">Previous</asp:HyperLink> <asp:Repeater ID="pagesRepeater" runat="server" onitemdatabound="pagesRepeater_ItemDataBound"> <ItemTemplate> <asp:HyperLink ID="hyperlink" runat="server" Text='<%# Eval("Page") %>' NavigateUrl='<%# Eval("Url") %>' /> </ItemTemplate> </asp:Repeater> <asp:HyperLink ID="nextLink" Runat="server">Next</asp:HyperLink> </p> UserControl Code behind: public class p { public string Page { get; set; } public string Url { get; set; } public p(string url, stri

Categories : C#

Public variable interference between InMemory generated assemblies from CodeDom
After a lot of trial and testing I found a solution. It had nothing to do with the Public variables and also changing the Namespace and Class name for each instance did not work either, each code assembly was still sharing information back and forth. So the answer... Because the multiple instances were being called from the same parent application the _evaluator Object needs to be independent for each instance in the Compiler code and the Invoking code. I ended up allowing for 5 instances that could be launched at the same time from a windows application. If one instance is closed then the program assigns the next called instance to the available id which I am storing in a public List(Of...) paired values. that code is not shown here of how to assign and remove. Dim _evaluator1 As Objec

Categories : Vb.Net

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

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

Method interference in Google Cloud Endpoints with Google Eclipse Plugin
Firstly, when you get an error with that annoying undescriptive message: Generating Cloud Endpoint has encountered errors and is not complete you should check the Error Log under Window -> Show View -> Error Log to get more info. I did so, and I found that the actual exception is: java.lang.IllegalArgumentException: Multiple methods with same rest path "POST facelist": "getOrangers" and "getMangoers" So, the problem is that your 2 methods have the same path! Adding explicitly a path for your methods will solve the problem: @ApiMethod(name="getOrangers", path="get_oranges", httpMethod=HttpMethod.POST) public FaceList getOrangers(UserRequest request) throws NotFoundException { //... } @ApiMethod(name="getMangoers", path="get_mangoers", httpMethod=HttpMethod.POST) p

Categories : Java

Wifi in .Net application
Your application wouldn't be built specific to WiFi; you'd simply use network connections, and how the network connection is physically connected (or not) is irrelevant to your application. Typically you'd make use of web service calls over https (or maybe http if the data isn't sensitive). The OS takes care of the network connect itself, whether its Ethernet, WiFi, or cellular.

Categories : Asp Net

Locating don't work without Wifi
Two things: We don't know if u are checking at all if GooglePlayServices are available.. With requestLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); you are stating you are interested in GPS data.. I am not sure but this might be the issue

Categories : Java

Get MAC Address without connect to WiFi
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context c, Intent intent) { List<ScanResult> results = wifiManager.getScanResults(); for (ScanResult ap : results) { Log.d(TAG, "SSID=" + ap.SSID + " MAC=" + ap.BSSID); } } }, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)); wifiManager.startScan(); For a BSS operating in infrastructure mode, the BSSID is the MAC address of the wireless access point (WAP)

Categories : Android

always use WIFI in Windows Mobile 6.5 C#
I am not sure but I assume you can handle this using provisioning and specifying the Desktop-Passthru-Connection (ActiveSync/WMDC), also called DTPT, as unsecure and the WiFi/LAN connection as secure (http://msdn.microsoft.com/en-us/library/aa455851.aspx). That should work, as the connMgr first uses the 'secure' connection. STOP: I just read the note on the linked site: "Note Setting the value of Secure to false is not supported for Desktop Passthrough (DTPT) connections. DTPT was designed to work as a secure connection.". So this approach is no option for DTPT. Another approach would be to specify the DTPT connection as a 'Work' connection, wheras (I assume) your connection request is for an 'Internet' connection. Example provisioning: http://msdn.microsoft.com/en-us/library/ms890844.a

Categories : C#

Getting wifi Signal strength
Why don't you use a WMI query to get it in a clean way ? private double RetrieveSignalString() { double theSignalStrength = 0; ConnectionOptions theConnectionOptions = new ConnectionOptions(); ManagementScope theManagementScope = new ManagementScope("root\wmi"); ObjectQuery theObjectQuery = new ObjectQuery("SELECT * FROM MSNdis_80211_ReceivedSignalStrength WHERE active=true"); ManagementObjectSearcher theQuery = new ManagementObjectSearcher(theManagementScope, theObjectQuery); try { //ManagementObjectCollection theResults = theQuery.Get(); foreach(ManagementObject currentObject in theQuery.Get()) { theSignalStrength = theSignalStrength + Convert.ToDouble(currentObject["Ndis80211ReceivedSignalStrength"]); } } catch (Exception e)

Categories : C#

How can I get RSSI value of wifi network in IOS?
Following link can help you Accessing iPhone WiFi Information via SDK Google code mentioned there can be helpful

Categories : Iphone

Get RSSI of Wifi when doing discovering in iOS?
As far as I know you can't do it via public API on iOS. There is a public CoreWLAN framework for such purpose, but it is only available on OSX. There is however a private api: Apple80211 private framework. There is no public documentation for it, but something you can find here. You can't create apps for App Store using it, but if you need something for yourself - you are welcome.

Categories : IOS

WiFi state change
WifiManager wifi = (WifiManager)getSystemService(Context.WIFI_SERVICE); if (wifi.isWifiEnabled()){ //wifi is enabled return true; }else{ return false; } refer http://developer.android.com/reference/android/net/wifi/WifiManager.html

Categories : Android

Scan for available WiFi networks in F#
It is not clear from your message if your college assignment prescribes pure F# solution, or you can base it on existing open source .NET libraries. Depending on this factor your mileage may vary... Nevertheless, if you are allowed to use existing .NET libraries, then as Jack P already noted you may base your approach on Managed Wifi API. It consists of 2 C# classes: Wlan, which is pInvoke interop wrapper over Native WiFi API, and WlanClient, which represents per se managed .Net API for manipulating WiFi. If you would be able building the Managed Wifi API DLL named, say, interop.dll from CodePlex C# sources, then using it from F# to list available WiFi networks and their signal strength is almost trivial: #if INTERACTIVE System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ #r @

Categories : Networking

udp android server over wifi
Are you sure that when connected thru a cable this program works? Then we do not need to check the code, but taking a look I see that in the run method of your thread, the very first line of code says: while (socket != null && !socket.isClosed()) which both happen to be true just the way the code is written. So I doubt that it works with Wifi or with cable. I think you should change the thread's code like this: public void run() { try { socket = new DatagramSocket(SERVER_PORT); socket.setSoTimeout(RECEIVING_TIMEOUT_SERVER); DataOut = new byte[1024]; // InetAddress fromaddress = InetAddress.getByName("10.4.0.11"); packetIn = new DatagramPacket(DataOut, DataOut.length); // keep receiving packets, until keepOn set to false

Categories : Android

Reachability Not Detecting WiFi
we took a look at the programming and narrowed it down to a switch case issue, reachability was returning 2 but the switch case inside another class returned "wwan" instead of "wifi" for case 2, please check this answer or close this question so others will not try to answer a solved problem, Thank You.

Categories : IOS

How to Take Permission for accessing Wifi?
In Android, id the wi-fi is enable by default then the application just uses it. There are not general application based rules in Android like in iOs (enable-disable the internet access to a certain application). For that requirement here prepare a Dialog box, when the user tries to access the internet, with option s like "Use it", "Abandon" and let the user decide.

Categories : Android

How to get RSSI of Wifi on iPhone?
First of all, you need to add an entitlement to your project using the com.apple.wifi.manager-access key. The creation of the entitlement differs from the Xcode version you are using (.xml, .entitlement), but your entitlement's content should look like this: <?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>keychain-access-groups</key> <array> <string>YOUR_APP_BUNDLE_ID</string> </array> <key>com.apple.wifi.manager-access</key> </true> </dict> </plist> Second, you need to have a Jailbreak and AppSync on your iOS device in order to launch your app,

Categories : Iphone

Exclude WIFI from NETWORK_PROVIDER
One way of obtaining this is to use PASSIVE_PROVIDER, which as stated here: A special location provider for receiving locations without actually initiating a location fix. This provider can be used to passively receive location updates when other applications or services request them without actually requesting the locations yourself. This provider will return locations generated by other providers. You can query the getProvider() method to determine the origin of the location update. Requires the permission ACCESS_FINE_LOCATION, although if the GPS is not enabled this provider might only return coarse fixes. Constant Value: "passive" One certain way of obtaining what you want is the following: ConnectivityManager conMan = (ConnectivityManager) getSystemService

Categories : Android

android web server without wifi
we ended up using "Servers Ultimate". https://play.google.com/store/apps/details?id=com.icecoldapps.serversultimate&hl=en it is paid but the client does not matter and we are also, till it is running well :)

Categories : Android

The relationship between Wifi and Socket
What's the relationship between Wifi and Socket? Does Socket code below still applies where the Wifi connection is being made? Yes. The socket API is an abstraction layer and doesn't depend on the network interface. There's not relationship between Wifi and socket, in your code.

Categories : C

Show wifi selection box on iOS
It should pop up if you set the UIRequiresPersistentWifi key, and the user has Wifi enabled globally.

Categories : C++

How can i disable wifi when battery level is less 10%?
If you want to check battery level when you click on button: public void getRisparmio(View view) { ..... IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); Intent batteryStatus = context.registerReceiver(null, ifilter); int level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); if (level<10){ ...... } ....... } If you want to disable wifi when battery level is low,you can register a Broadcast receiver with with this IntentFilter Intent.ACTION_BATTERY_LOW. public class BatteryReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { boolean batteryLow = intent.getAction().equals(Intent.ACTION_BATTERY_LOW); if (batteryLow){ ....

Categories : Android

How to get the coarse location using Wifi or GSM or GPS, whichever is available?
In order to get info from specific provider you should use: LocationManager.getLastKnownLocation(String provider), if you want your app to choose automatically between providers then you can add choosing of the provider with getBestProvider method. As for stopping refreshing of GPS location, I didn't quite catch. Do you need to get the location info only once or do you need to monitor location changes periodically? EDIT: Oh by the way, if you want your location info to be up-to-date you should use requestSingleUpdate method of location manager, with specified Criteria. In this case provider should also be chosen automatically

Categories : Android

To check whether the wifi scan is complete
You need to implement a BroadcastReceiver listening for the scan results returned from WifiManager.startScan(). onReceive() allows you to access the scan resuls directly. it takes about 1 second for the scan to complete and trigger onReceive()...

Categories : Android

Use wifi to find location instead of gps, javascript
DEMO FIDDLE <head> <script> var myip; function callback(data) { alert(data.city); } function request_location() { var oHead = document.getElementsByTagName('head')[0]; var oScript = document.createElement("script"); oScript.type = "text/javascript"; oScript.src = "http://ip-api.com/json/" + myip + "?callback=callback"; oHead.appendChild(oScript); } </script> <script type="text/javascript" src="http://l2.io/ip.js?var=myip" onload="request_location();"></script> </head>

Categories : Javascript

Transfer speed over wifi and 3G within the same room
Wifi speed in the same room would operate at the maximum connection speed of the signal allowed, split between the number of active devices. This would generally be considered quite high although not as high as a network cabled series of devices. When sending a file over wifi to a remote host, the exchange goes from your computer through a series of hops on its route to the destination so the initial wifi speed is only in transferring the file to the server. It is then server dependent on how fast it transfers between computers, since they can't have a direct wifi connection. 3G locally is faster than between cities because, as you say, it interacts with the local host tower rather than then moving beyond that to the next tower and so forth. 3G would be slower than wifi initially, but wh

Categories : Networking

Check whether mobile is using WIFI or Data/3G
void chkStatus() { final ConnectivityManager connMgr = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE); final android.net.NetworkInfo wifi = connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI); final android.net.NetworkInfo mobile = connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (wifi.isConnectedOrConnecting ()) { Toast.makeText(this, "Wifi", Toast.LENGTH_LONG).show(); } else if (mobile.isConnectedOrConnecting ()) { Toast.makeText(this, "Mobile 3G ", Toast.LENGTH_LONG).show(); } else { Toast.makeText(this, "No Network ", Toast.LENGTH_LONG).show(); } }

Categories : Android



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