w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
the current activity only read the nfc card detected
Use foreground mode. See my test app here.

Categories : Android

QT UTC linux Clock skew detected. Your build may be incomplete
I think this error happens when your file times are newer than your system clock. make warns you that it may not be building everything correctly because of this. touching all your files should sort out the problem. One of the causes is an SCM system that preserves file times and is ahead of your system clock.

Categories : C++

How to get more advanced network interface card type in Linux and Mac OSx
There is no direct equivalent. The Windows API mixes two properties: protocol and driver. To get interface protocol (Ethernet, ATM, Loopback, firewire) you can use SIOCGIFHWADDR ioctl which will return "Link Encapsulation". In most computers, it will be either loopback or Ethernet (most devices, including Wifi, tunnels, etc.. are Ethernet). This information is shown by 'ifconfig' tool: $ ifconfig | grep encap eth0 Link encap:Ethernet HWaddr 00:21:cc:xx:xx:xx lo Link encap:Local Loopback virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 wlan0 Link encap:Ethernet HWaddr 00:24:d7:xx:xx:xx To get interface driver, you can explore /sys/class/net/INTERFACE/device/ path. Then you can just use various heuristics: # get driver name $ readlink /sys/class/net/eth0/dev

Categories : C

Implementing user-space network card "bus-mastering" in C++ on Linux
If you mmap a region of memory, and give the address of that to the OS, the OS can lock that region (so that it doesn't become swapped out) and get the physical address of the memory. It is not at all used for that purpose, but the code in drivers/xen/privcmd.c, in the function mmap_mfn_range called from privcmd_ioctl_mmap (indirectly, by traverse_map). This in turn calls remap_area_mfn_pte_fn from xen_remap_domain_mfn_range. So, if you do something along those lines in the driver, such that the pages are locked into memory and belong to the application, you can program the physical address(es) of the mmap'd region into the hardware of the network driver, and get the data directly to the user-mode memory that was mmap'd by the user code.

Categories : C++

Installation of ubuntu 12.04: win7 not detected, partitions not detected
You need to run the Ubuntu GRUB bootloader, follow the instructions on the Ubuntu website https://help.ubuntu.com/community/Grub2/Installing#Reinstalling_GRUB_2 When I installed ubuntu, I lost my partitions on the drive, in the end I reverted to having two drives one with Windows 7 and the other with Ubuntu, I had to recover the drive with partition recovery software (TestDisk). Skipping the quick scan saves time as you will probably want to do a full scan. http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

Categories : Ubuntu

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

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

App crashing due to "stack corruption detected: aborted" on HTC One V but working fine on Samsung Devices
Only happening when launching 9th and 10th activities? Can you share lifecycle debug logging for all of your activities? Can you borrow a One X or a One to test on as well? - It could very well be a basic memory/stack limitation issue. Some devices are more aggressive in cleaning up - which is valid and may happen at any time with other devices as well, you just don't see it as often if it's very lenient or has more resources.

Categories : Android

List connected devices to Android phone working as WiFi Access point
This is an answer from another stackoverflow question, I read it before two month and don´t know from which user the answer is from, but this should work. WifiManager gives You what You need: Main.java import java.util.ArrayList; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import com.whitebyte.hotspotclients.R; import com.whitebyte.wifihotspotutils.ClientScanResult; import com.whitebyte.wifihotspotutils.WifiApManager; public class Main extends Activity { TextView textView1; WifiApManager wifiApManager; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); textView1 = (TextView) findViewById(R.id.t

Categories : Android

Which graphics card is used when working with OpenGL shaders over RDP?
That depends on your remote system's configuration. Your usual consumer GPU with standard drivers will not provide any HW acceleration for the RDP whatsoever and you'll drop into a SW emulation mode. However there are special visualization server GPUs and drivers which hook into the RDP server implementation and provide GPU acceleration for it; very likely you don't have that though. Note that it's ultimately just a driver issue. With the right drivers every GPU could do that. But HW vendors want to sell their special purpose devices, so they're locking that functionality to a specific product line. I'm hoping, that the advances of the Linux open source graphics ecosystem will, as a sideshow, enable implementing such visualization servers with commodity hardware in the near future. As mu

Categories : Opengl

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

Card.io usage in android. Displaying Credit card number and Expiry date
Maybe I missed it but I dont see anything wrong with the code. The problem may be in your XML so I thought I would make it easy for you. Send the user to another activity when the scan is completed. Copy this in the appropriate place. Create a new xml.file and see if this works. If you have any problems tell me. This is working fine for me. private Button scanButton; } @Override protected void onResume() { super.onResume(); if (CardIOActivity.canReadCardWithCamera(this)) { scanButton.setText("Charge"); } else { scanButton.setText("Charge"); } } final String TAG = getClass().getName(); private int MY_SCAN_REQUEST_CODE = 100; // arbitrary int public void onScanPress(View v) { // This method is set up as an onClick handler in the layout xml // e.g. and

Categories : Android

What is the difference between twitter photo card and summary with large image card?
The difference between a summary_large_image card and a photo card is what occurs when the user clicks on the image in the card: In the case of a summary_large_image card, a click on the image opens the link in a new tab (or in a browser on smartphones). In the case of a photo card, a click on the image opens a bigger version of the image in the same browser window (or displays the image full-screen on smartphones).

Categories : Twitter

Im trying to figure out how to deal a card from the deck in my card game class
yeah, now that i've thinked about, "hand" was empty because you fill it from "deck" that is in turn empty. Maybe you can define a method "initDeck" in deck class that fills the deck with random cards, and call it from game constructor. or maybe you already do this out of the game class, but in that case you should pass the deck to game!

Categories : Java

How to implemet creadit card and debit card payment in salesforce
If you are not experienced with API development, paypal API details are here: https://developer.paypal.com/docs/api/ Then the best other option is an App. I have used the connected Epos solution, which is great for taking payments from credit cards, either with the customer present (chip n pin) or by keying in the card numbers. You need to get the PayPalHere card terminal which is about $50, but it is a great all round solution. https://appexchange.salesforce.com/listingDetail?listingId=a0N30000000qD0GEAU

Categories : Paypal

Java Card: How to load SIM applet to real smart card?
It might not work because the SIM application might have dependencies to APIs that are not present in the JCOP cards (for instance ETSI 102 705). But then it is worth trying. Make sure that the file format is compatible between the tools (a cap file is not always a cap file by the way; a real cap file is a zip, some tools prefer IJC files). Try using the cap file from the Gemalto tool in the jcManager. If it does not work you can try GPShell. The main challenge is to have the keys to your target, and then the right tool.

Categories : Java

iOS Phonegap app crashes after Card.io scans credit card
@Paul if you using latest card.io SDK just modify the CardIOPGPlugin.m file on line 101 from [CardIOCreditCardInfo displayStringForCardType:info.cardType] to [CardIOCreditCardInfo displayStringForCardType:info.cardType usingLanguageOrLocale:[[NSLocale currentLocale] localeIdentifier]] Hope it helps.

Categories : IOS

Reset Smart Card pin having Muscle card applet
MSCUnblockPIN is the function to use, but you have to know the unblock value of course. The corresponding ISO command Reset Retry Counter allows variants without unblock value, but these need another kind of protection to avoid arbitrary many retries.

Categories : Security

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

Authentication scheme for an Android application: When the SIM card is locked or exhanged by another, the app stops working
If you lock your app with SIM properties and requires those properties to be presented for unlocking the app, have you thought about where to store those properties in the app (hard coded, database, file, Preferences,...)? Or are you thinking to contact the server for verification? Both way, you may end up in a complex solution with possible security flaws. SIM serial number is something unique but at the same time it is public, you can't rely on this property to lock your app. TelephonyManager class is the gateway for accessing SIM properties( this class also exposes users privacy in a number of ways). As of now, there is no android crypro API exposed to perform cryptographic operations in the SIM. But, since your customer can contact the operator, you may consider to ask the operator t

Categories : Android

Card.io SDK gives partial credit card number
Josh from card.io here. The sample code you're probably looking at reads: - (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)info inPaymentViewController:(CardIOPaymentViewController *)scanViewController { // The full card number is available as info.cardNumber, but don't log that! NSLog(@"Received card info. Number: %@, expiry: %02i/%i, cvv: %@.", info.redactedCardNumber, info.expiryMonth, info.expiryYear, info.cvv); // Use the card info... [scanViewController dismissModalViewControllerAnimated:YES]; } Note the comment above the NSLog call. What is being logged is info.redactedCardNumber. You want info.cardNumber instead. See the header files, which are pretty well documented, for more details. The older version of the SDK is has been publicly deprecated for nearly a

Categories : Iphone

Coordinate Id of same card that is read by two different card readers
Its rather hard to understand just exactly what your wanting, but in the bottom you state: 'in other words, i want to convert this array of bytes to corresponding hex code'. You can perform that operation like so: public static string ByteArrayToString(byte[] ba) { StringBuilder sb = new StringBuilder(ba.Length * 2); foreach (byte b in ba) { sb.AppendFormat("{0:x2}", b); } return sb.ToString(); } Just pass in your Byte array and the result will be your hex conversion in string format. Edit: This will probably yield the same results, but try this: byte[ ] bytes = {0, 1, 2, 4, 8, 16, 32, 64, 128, 255 } Console.WriteLine( BitConverter.ToString( bytes ) );

Categories : C#

Card holder's name in APDU commands (ICC Card)
Reading the card holders name and other info on a chip & pin card is not as simple as you might think. It's not as simple as just one straight forward APDU , there are several more steps you have to go through first. First you need to perform an application selection. How you do this, depends on your card and your terminal. There are 2 standard ways. 1) Application file selection 2) AID Scanning For type 1, you typically call a known file name using the select file apdu (NOTE: I'm not going to implement full apdu sentences in what I type here as there is just too much data to try and represent, if there is enough attention to this post then I might do a blog entry) The file name to select for most EMV standard cards is '1PAY.SYS.DDF01' or '2PAY.SYS.DDF01' for contactless ca

Categories : Misc

Paypal direct Recurring Payments using credit/debit card not working on live. DPRP disabled for this merchant.
DPRP stands for DirectPayment RecurringPayments. With the old Payments Pro you had to pay $30/mo for Pro itself and then another $30/mo on top of that for recurring payments. Until you were approved and agreed to the additional $30/mo you would get that error. So what it essentially means is you don't have DPRP enabled on your PayPal account right now. You mentioned that you already signed up for Recurring Billing. It sounds to me like you're on the new version of PayPal Pro which uses the PayPal Manager and the PayFlow Gateway. This is a separate API from DoDirectPayment or CreateRecurringPaymentsProfile. So they've got you enabled for PayFlow, but you're trying to use the old API. What you need to do is either re-develop your stuff using the PayFlow API or get PayPal to set you u

Categories : Paypal

Is it possible to get credit card type using card.io?
I have no experience of using card.io. But your question got me all curious about this API. In github, I found it and in there, there is a file: CardIOCreditCardInfo.h // Derived from cardNumber. // When provided by card.io, cardType will not be CardIOCreditCardTypeUnrecognized or CardIOCreditCardTypeAmbiguous. @property(nonatomic, assign, readonly) CardIOCreditCardType cardType; Hope this helps. I am trying to learn this, if it doesnot help you please tell me.

Categories : Iphone

jsp not working on linux ec2
Wow.. yep @fmodos was correct. I've been so use to PHP I dropped the .jsp file in my www folder of apache instead of my webapps folder of tomcat. Der. I also needed to give give my ec2-user permissions in order to FTP files into it.

Categories : Java

fflush() is not working in Linux
fflush() doesn't do much for input streams but since scanf() never returns this doesn't matter. scanf() blocks because the terminal window doesn't send anything to the C program until you press Enter You have two options: Type 10 Enter Put the terminal into raw mode. The second option has many drawbacls like you will lose editing capabilities, so I suggest to read the input line by line.

Categories : C

Working with sed linux command
That regex recognises <Telephone type = "fax"> entries where the number is given as none, and deletes them. Breakdown: s sed command for "substitution". ~ pattern separator. You can choose any character for this. sed recoginizes it because it comes right after the s. <Telephone type This matches the literal text "<Telephone type". [ ]* matches zero or more spaces. = matches a literal "=" [ ]* matches zero or more spaces. "fax" matches literal text. The quotes are escaped because the whole pattern appears inside quotes, but the shell removes the quote characters () before sed sees them. [ ]* matches zero or more spaces. ><Number>none matches literal text. [ ]* matches zero or more spaces. </Number></Telephone> matches the literal text. ~~ the pa

Categories : Linux

StdIn not working... @ Linux
You need to setup your classpath to use external java libraries If you are using eclipse, you could Project - > Properties -> Java build path ->add Jar. That jar file should be placed in a directory inside your workspace (lib/ for example)

Categories : Java

Cakephp join not working on linux
It seems to me that there is something wrong with your database, and not Linux. Is your database properly linked? $this->Portfolio->recursive = 0; $this->paginate = array( 'fields' => array('Portfolio.id', 'Portfolio.application_name','Portfolio.category_id','Portfolio.description','Portfolio.screenshots','Portfolio.icon','Portfolio.bg_color_code','Portfolio.created','Category.id'), 'limit' => 10, 'order' => array( 'Portfolio.id' => 'asc' ) );`

Categories : PHP

Java working with linux sudo abilities
To act as gufw you must use polkit along with dbus-java. Another possibly simpler solution is to build a command (e.g. "sudo command" and run it with Runtime.getRuntime().exec Doing this can be very dangerous must be done carefully.

Categories : Java

Codeigniter web app is not working with the linux but here on windows is fine
As stated in the comment by @Orangepill it could be either case sensitive unix filesystem either, in my own experience it was connected to the .htaccess parsed differently: RewriteEngine on RewriteCond $1 !^(index.php|images|robots.txt) RewriteRule ^(.*)$ /index.php/$1 [L] Sometimes these fail on linux as it requres an ? sign after index.php so you can try: RewriteRule ^(.*)$ /index.php?/$1 [L]

Categories : PHP

exec functions not working from linux daemon
So after discussion with Casey I investigated more into my called program and I found that my program indeed is getting called. Also I found out that environment variables are not the issue child process is taking environment from parent itself. I am creating QApplication (qt gui application) in my main program. Its some issue with that and linux system daemon. I will try to figure that out and will ask separate question if needed. Edit: Final Solution It was a qt GUI application which was not able to connect to XServer. I had to changes suggested by Casey and given in this post Cannot connect to X server :0.0 with a Qt application after that it started launching.

Categories : C++

Linux command not working when changing servers
Either you can write a shell script new_ls calling ls and removing the lines that end with "~" Or when you process the results in java you can also ignore lines read from the BufferedReader by checking each String read if line.endsWith("~");

Categories : Java

Windows Builder plugin of Eclipse not working in Linux
The plugins might be conflicting.And why not directly use an Eclipse for RCP and RAP Developers version.The WindowBuilder plugin is included and you don't need to download it. Eclipse for RCP and RAP Developers : A complete set of tools for developers who want to create Eclipse plug-ins and Rich Clients (RCP), or develop with the Remote Application Platform (RAP), plus Mylyn, XML editors, Code Recommenders, Git, CVS, and Maven integration.

Categories : Eclipse

Working with file path strings on Linux, what encoding to use?
You can still use the standard type wchar_t (and %ls for printf/scanf when using wchar_t). This type allows you to use non-ascii characters. wchar_t mystring[50] = L"sometext"; Note: that to make normal char string into wchar_t you have to use the pre-fix "L", you have to remember this is not the same as a char type so its a bit funny to use :o

Categories : C++

linux find with exec with > not working when inside cron
You should use absolute pthes. '/usr/bin/find' instaed of 'find' To see what's wrong, invoke your command line this way env -i mycommands .... This will strip off the environment of your session and run the commands in an environment which is very like the cron environment. Then correct your entry in the crontab.

Categories : Bash



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