Friday, April 25, 2014

7 Super Useful Application Servers For Developers

Application servers are usually essential software frameworks that are used by developers. There are many of these that are available. Here are some of the more important ones that are used popularly.


1. Wildfly or JBoss Application Server


This is an application server authoured by JBoss and developed currently by Red Hat. It has been written in Java and runs on multiple platforms.


2. Zope


This is a free and open source web application server that has been written it Pytthon.


3. Apache Geronimo


Apache Geronimo is an open source server runtime that integrates the best open source projects to create Java/OSGi server runtimes that meet the needs of enterprise developers and system administrators. Our most popular distribution is a fully certified Java EE 6 application server runtime.


4. GlassFish


This is an open source application server, which is also the official reference implementation for Servlets 3.0.


5. Zend Server CE


According to their website, this is "the fastest PHP server around".


6. JOnAS


JOnAS is a leading edge Java EE 6 Web Profile certified Open Source OSGi Enterprise Server developed by Bull and OW2. (Official Website)


7. Jetty


Jetty provides a Web server and javax.servlet container, plus support for SPDY, WebSocket, OSGi, JMX, JNDI, JAAS and many other integrations. These components are open source and available for commercial use and distribution. (Official Website)


Source : http://www.showsites.org/sites/developerfeed.blogspot.in

Variadic Objective-C Functions ( variable function parameters )

What are variadic functions?


Well, to be honest, I wasn’t exactly sure the name of these kinds of functions for years after I started programming. Just knowing the terminology will make your life a lot easier when googling for this same kind of thing in different programming languages.



In computer programming, a variadic function is a function of indefinite arity, i.e., one which accepts a variable number of arguments. Support for variadic functions differs widely among programming languages. (stolen from Wikipedia)



In the simplest of terms, it is a function that takes any number of arguments vs a function that takes a defined number of arguments.


iOS Library usage


There are multiple places that you run into variadic functions when doing iOS development. They are fairly simple to understand and use. The variable parameter can contain a comma seperated list of values and must be Nil terminated. Example below demonstratest creating a UIAlertView without any syntax



UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Title"
message:@"Message"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK", @"Ignore", nil];


Implementing your own Variadic function


Using these functions is simpler than creating your own function that accepts a variable parameter. Much of the syntax and usage is inherited from C, so it may seem a little bit foreign if Objective-C is all you know. Example below demonstrates sorting any number of NSString’s.



-(NSArray*) sort:(NSString*) values, ...

NSMutableArray* sortableItems = [[NSMutableArray alloc] init];

if( values == nil )
return sortableItems;

va_list args;
va_start(args, values);

NSString* str = values;
do

[sortableItems addObject:str];

while( (str = va_arg(args,NSString*)) );

va_end(args);

return [sortableItems sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];



Explanation


The first thing to notice is the method definition. This is just syntax, but the ... signifies that this is a variable argument. The second thing is the nil check, values will always be a pointer to the first element of the variable argument, if the first element is nil we simply return an empty array.


The c-style stuff comes into play when you reach the va_list line. It is pretty simple, but you create a va_list and start reading from that list using va_start. I used a do , while loop because the va_arg function will move the pointer, and I wanted access to the first item. After you are done, of course, call va_end.


That’s all there is to making variadic functions in iOS


Source : http://www.showsites.org/sites/alexboyd.me

Wednesday, April 16, 2014

At least 4 dead, 292 missing after ferry sinks off South Korean coast



south-korea-ferry-sinking-internal.jpg

April 16, 2014: South Korean rescue helicopters fly over a passenger ship.AP/Yonhap




South Korean officials said Wednesday that nearly 300 people were still missing several hours after a multi-story passenger ferry sank off that country's southern coast, leaving at least four dead and dozens injured.


The ferry was carrying 459 people, most of them high school students, and was bound for the island of Jeju when it sent a distress call at around 9 a.m. local time Wednesday as it began leaning to one side, according to South Korea's Ministry of Security and Public Administration.  


Kang Byung-kyu, a government minister, said two of the dead were a female crew member and a male high school student. He said a third body was also believed to be that of a student. A coast guard officer confirmed a fourth fatality but had no immediate details about it. 


He said 164 people were rescued, of whom 55 were injured. He said 292 people were missing, likely either trapped inside the ship or floating in the ocean. 


Media photos showed wet students, some without shoes, some wrapped in blankets, tended to by emergency workers. One student, Lim Hyung-min, told broadcaster YTN from a gym on a nearby island that he and other students jumped into the ocean wearing life jackets and then swam to a nearby rescue boat.


"As the ferry was shaking and tilting, we all tripped and bumped into each another," Lim said, adding that some people were bleeding. Once he jumped, the ocean "was so cold. ... I was hurrying, thinking that I wanted to live."


The water temperature in the area was about 12 degrees Celsius, cold enough to cause signs of hypothermia after about 90 minutes or 2 hours, according to an emergency official who spoke on condition of anonymity citing department rules. Officials said mud on the ocean floor made underwater search operations difficult.


Local media photographs showed the ship heavily tilted onto its side, partially submerged, as helicopters flew overhead and rescue vessels and a small boat covered with an orange tarp floated nearby. Photos showed wet students wrapped in blankets as emergency workers tended to them.


Lee Gyeong-og, a vice minister for South Korea's Public Administration and Security Ministry, said 160 coast guard and navy divers were searching for survivors, and 87 vessels and 18 aircraft were mobilized. 


The U.S. Navy said the amphibious assault ship USS Bonhomme Richard, which was on a routine patrol off South Korea's west coast on Wednesday, would assist in the search and rescue operation. 


Divers were deployed to look for people inside the ship's wreckage, a few miles from the shore of Byeongpung Island, which is not too far from the mainland. The area is about 290 miles from Seoul. 


"We heard a big thumping sound and the boat stopped," a passenger told the YTN news channel by telephone, The Guardian reported. "The boat is tilting and we have to hold on to something to stay seated." 


Park Ji-hee, a first-year student, said she saw about a dozen parents crying at the school entrance and many cars and taxies gathered at the gate as she left in the morning.


She said some students in her classroom began to cry as they saw the news on their handsets. Teachers tried to soothe them, saying that the students on the ship would be fine.


Passenger Kim Seong-mok, speaking from a nearby island after his rescue, told YTN that he was "certain" people were trapped inside the ship as water quickly filled up inside and the severe tilt of the ferry kept them from reaching the exits. Some people yelled at those who couldn't get out, urging them to break windows.


Kim said that after having breakfast he felt the ferry tilt and then heard it crash into something. He said the ferry operator made an announcement asking that passengers wait and not move from their places. Kim said he didn't hear any announcement telling passengers to escape.


The students are from a high school in Ansan city, near Seoul, and they were on their way to Jeju for a four-day trip, according to a relief team set up by Gyeonggi Province, which governs the city. The ship left Incheon port, just west of Seoul, on Tuesday evening, according to the state-run Busan Regional Maritime Affairs & Port Administration.


The Maritime Ministry said the two previous deadliest ferry disasters were in 1970 when 323 people drowned and in 1993 when 292 people died.


The Associated Press and Reuters contributed to this report.




Source : foxnews[dot]com