Recent Notes

Displaying keyword search results 81 - 90
Created by Fang on January 23, 2011 19:28:35    Last update: October 28, 2011 12:10:07
Maven repositories are a central part of the Maven build system. Maven resolves dependencies through repositories. There are two types of repositories: local and remote . The local repository stores local build artifacts (when you do mvn install ) and caches artifacts from remote repositories. It is usually located on the local file system at $USER_HOME/.m2/repository . Remote repositories are located on the network and accessed by URLs ( http:// or file:// etc). The central Maven repository is: repo1.maven.org . The Java EE repositories are located at: http://download.java.net/maven/2/ and http://download.java.net/maven/1/ . Remote repositories can also be set up on the company intranet within a company's firewall. The central repository is automatically configured after installation. You can add additional repositories in settings.xml , for example: <?xml version="1.0" encoding="UTF-8"?> <setting......
Created by balu on October 14, 2011 10:21:08    Last update: October 14, 2011 10:21:08
Got this error while trying to start vFabric tc server : C:\Apps\vfabric-tc-server-standard-2.6.1.RELEASE>t... It's a UAC error. Need to start the command prompt with Administrator privileges: right click the shortcut and select Run as administrator . Or enable administrator rights for the shortcut: Bring up the cmd shortcut properties Select the Shortcut tab, click the Advanced button. Check Run as administrator .
Created by freyo on September 29, 2011 16:01:31    Last update: September 29, 2011 16:09:37
With standalone broadcast receiver AndroidManifest.xml : <?xml version="1.0" encoding="utf-8"?> <manifes... Java code: package com.android.networkreceiver; import... Register listener inside Activity programmatically AndroidManifest.xml : <?xml version="1.0" encoding="utf-8"?> <manifes... Java code: package com.android.networklistener; import... Register/unregister broadcast receiver in onResume / onPause works because the connectivity change broadcast is sticky . I intentionally used two registerReceiver calls in onResume to demonstrate this - onReceive will be called once for each registration.
Created by freyo on September 29, 2011 15:43:12    Last update: September 29, 2011 15:43:12
I got this error while enabling/disabling wifi on an Android device: W/ActivityManager( 2735): Unable to launch app com... The receiver was registered for network connection change: <receiver android:name="NetworkReceiver"> ... This was fixed by just rebooting the device!
Created by magnum on September 24, 2011 13:14:37    Last update: September 28, 2011 18:08:35
There are two sides to an IP socket: the local side and the remote side: The getpeername function retrieves the peer address of the specified socket. #include <sys/socket.h> int getpeername(int soc... Example: struct sockaddr_in addr; socklen_t socklen = si... The getsockname function retrieves the locally-bound name of the specified socket. #include <sys/socket.h> int getsockname(int soc... Example: struct sockaddr_in addr; socklen_t socklen = si...
Created by magnum on September 27, 2011 21:51:05    Last update: September 28, 2011 18:02:49
Client socket usually does not call bind . But I've seen code that does and it was puzzling to me what bind does to a client socket. Therefore, this little test program. It retrieves a web url and displays info about the socket. You can optionally give a bind host name/ip and port and see what it does. Here are my test results: $ ./client www.google.com Local addr: 172.16.0.... This is the code: #include <stdio.h> #include <stdlib.h> #incl...
Created by magnum on September 28, 2011 09:31:58    Last update: September 28, 2011 09:31:58
This procedure works for xl2tpd . Edit L2TP configuration file /etc/xl2tpd/xl2tpd.conf : ; ; This is a minimal sample xl2tpd configurati... Edit PPP options file for L2TP /etc/ppp/options.xl2tpd.client : ipcp-accept-local ipcp-accept-remote refuse-... Edit PPP authentication file /etc/ppp/chap-secrets : # Secrets for authentication using CHAP # serve... Start xl2tpd : # /etc/init.d/xl2tpd start Connect to the server: # echo "c vpnserver" >/var/run/xl2tpd/l2tp-control Tail /var/log/messages , you should see something like: Sep 28 11:05:46 sta101894 pppd[26059]: pppd 2.4.5 ... ifconfig should show that ppp0 is added: # ifconfig ppp0 ppp0 Link encap:Point-to-P... To tear down the vpn: # echo "d vpnserver" >/var/run/xl2tpd/l2tp-control If authentication fails, try to set "require authentication" to no on both server and client and restart xl2tpd on both sides: # /etc/init.d/xl2tpd restart # echo "c vpnserve......
Created by magnum on September 23, 2011 16:06:02    Last update: September 28, 2011 09:29:53
This procedure works for xl2tpd . Edit L2TP configuration file /etc/xl2tpd/xl2tpd.conf : ; Sample l2tpd.conf ; [global] ; listen... Edit PPP options file for L2TP /etc/ppp/options.xl2tpd : ipcp-accept-local ipcp-accept-remote ms-dns ... Edit PPP authentication file /etc/ppp/chap-secrets : # Secrets for authentication using CHAP # serve... Start the server: # /etc/init.d/xl2tpd start Monitor the log: # less /var/log/messages
Created by magnum on September 21, 2011 16:01:16    Last update: September 21, 2011 16:02:33
More like assign a second ip address to the same nic, instead of a virtual nic. Multiple IP addresses can be assigned to the same NIC, but all IP addresses must be on the same subnet - otherwise some IP addresses will not be accessible. From command line, assign IP address 192.168.0.2 to alias eth0:0 : sudo ifconfig eth0:0 192.168.0.2 netmask 255.255.2... But IP addresses added this way are not persistent. They are lost whent he OS is restarted. To make the additions persistent: For Fedora: $ su - # cd /etc/sysconfig/network-scripts/ ... The contents of ifcfg-eth0:0 should look like this: DEVICE=eth0:0 IPADDR=192.168.0.2 NETMASK=255... Restart network: # service network restart For Ubuntu: $ sudo vi /etc/network/interfaces Append this to the file: auto eth0:0 iface eth0:0 inet static name Et......
Created by magnum on September 21, 2011 12:35:14    Last update: September 21, 2011 12:35:14
NAME brctl - ethernet bridge administration SYNOPSIS brctl [command] DESCRIPTION brctl is used to set up, maintain, and inspect the ethernet bridge configuration in the linux kernel. An ethernet bridge is a device commonly used to connect different networks of ethernets together, so that these ethernets will appear as one ethernet to the participants. Each of the ethernets being connected corresponds to one physical interface in the bridge. These individual ethernets are bundled into one bigger ('logical') ethernet, this bigger ethernet corresponds to the bridge network interface.
Previous  4 5 6 7 8 9 10 11 12 13 Next