Please Click on the link and download
Read___write_XLS_via_NPOI___display_in_GRID
software development notes, main category for Cs, Java, and other programming experiences.
Because
1 reason is that,,
YOU USED ‘ ‘ this quotation marks
dont use these.
1 2 3 4 |
for(Iterator i = someList.iterator(); i.hasNext(); ) { String item = i.next(); System.out.println(item); } |
1 |
API Reference > IWebmasterApi Members |
1 2 3 4 |
void SubmitUrl( string siteUrl, string url ) |
1 2 3 4 5 6 7 8 9 |
POST /webmaster/api.svc/pox/SubmitUrl?apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1 Content-Type: application/xml; charset=utf-8 Host: ssl.bing.com Content-Length: 127 <SubmitUrl xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api"> <siteUrl>http://example.com</siteUrl> <url>http://example.com/url1.html</url> </SubmitUrl> |
from : https://msdn.microsoft.com/en-us/library/jj554133.aspx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
namespace kutayzorlucom_webServeice_BING_API_EXAMPLE { using System; using System.Linq; using System.ServiceModel; internal class Program { private static void Main(string[] args) { var api = new WebmasterApi.WebmasterApiClient(); try { var oneMonthAgo = DateTime.Now.AddMonths(-1); var stats = api.GetRankAndTrafficStats("http://www.kutayzorlu.com/") .Where(s => s.Date > oneMonthAgo) .OrderBy(s => s.Date); Console.WriteLine("Date\tImpressions\tClicks"); foreach (var value in stats) { Console.WriteLine( value.Date.ToShortDateString()+", "+value.Impressions, value.Clicks); } } catch (FaultException<WebmasterApi.ApiFault> fault) { Console.WriteLine("Failed to add site: {0}", fault.Message); } } } } |
How to get API KEY (https://msdn.microsoft.com/en-us/library/hh969388.aspx)
1 2 3 4 5 6 7 8 9 |
Getting your API Key To be able to get your Webmaster API Key, follow the steps below: Sign into your Bing Webmaster account at http://www.bing.com/webmaster with your LiveID. If you do not already have a LiveID you can get one by clicking "Sign up with Windows LiveID” If you have no verified sites, please add and verify one. Then click on any site and select Webmaster API on the left hand side. Read the Terms and Conditions if not done so already Select on Generate to create an API Key. You only get 1 API key at a time |
The Bing Webmaster Tools API Services has the following protocols that can be used to get, call, submit, and retrieve data from Bing Webmaster to your website.
SOAP – Simple Object Access Protocol
Simple Object Access Protocol (“SOAP”) is a structure on which to exchange information with Extensible Markup Language (“XML”). Example of SOAP is that you could send a SOAP message to a website that has Web Services Enabled and receive information back from the website in XML that could then be used or implemented into a website.
POX/HTTP – Plain Old XML over HTTP
Plain Old XML (“POX”) is a term for basic XML and is an information format style. POX is compatible with the XML Schema. POX messages can be sent and received by many types of clients, including clients such as Web browsers that do not have any native support for SOAP-based protocols. POX is a suitable choice for services that exchange data over HTTP and have no requirement to use the advanced protocol capabilities of SOAP and WS-* such as non-HTTP transports, message exchange patterns other than request/response, and message-based security, reliability, and transactions.
JSON/HTTP – JavaScript Object Notation over HTTP
JavaScript Object Notation (“JSON”) is an imitated or copied from the JavaScript Language in order to provide simple data structures that can be text based.
1- Memory problems
1 2 3 |
# Find the catalina.sh file, export CATALINA_OPTS="-Xms256m -Xmx256m" #change 256 to 128 or what every you want |
1 2 3 4 5 6 7 |
The Heap: This is the memory used to store your objects and is controlled by the -Xms and -Xmx parameters. The Stack: This is the memory used to store the stack frames for the threads that your program maintains and can be controlled with the -Xss parameter. Permgen Memory: This is the memory used to store your compiled classes and pooled strings as well as some other things and can usually be controlled with -XX:MaxPermSize although the -XX represents a debugging parameter, so there's no guarantee it's on all JVM's. But, the default Sun/Oracle reference implementations have always had them. JNI Allocated Memory Any classes utilizing native methods and JNI could potentially allocate unlimited memory. This memory comes from the OS and not the heap and there's no way of knowing how much memory a native class will use without having access to the source. |
2- CPU ( For number of Threads, server.xml)
1 2 3 |
1- Limit the number of Java threads. 2- Limit the maximum Java heap size. |
Example
1 2 |
<Connector port="8080" address="localhost" minSpareThreads="20" /> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
To enable custom errors in ASP.NET MVC application we need (IIS 7+): Configure custom pages in web config under system.web section: <customErrors mode="RemoteOnly" defaultRedirect="~/error"> <error statusCode="404" redirect="~/error/kutayzorlu404" /> <error statusCode="500" redirect="~/error" /> </customErrors> HttpContext.Current.Response.StatusCode = 500; HttpContext.Current.Response.TrySkipIisCustomErrors = true; <httpErrors errorMode="Detailed" /> |
An aspect is a common feature that’s typically scattered across methods, classes, object hierarchies, or even entire object models.
For example, let’s say you wanted to add code to an application to measure the amount of time it would take to invoke a particular method. In plain Java, the code would look something like the following.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
public class Account { public void Calculate(double amount) { long startTime = System.currentTimeMillis(); try { // Actual method body... } finally { long endTime = System.currentTimeMillis() - startTime; System.out.println("Draw Actual area," + endTime); } } } |
Implementing metrics in a AOP Interceptor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
public class Metrics implements org.jboss.aop.advice.Interceptor { public Object invoke(Invocation invocation) throws Throwable { long startTime = System.currentTimeMillis(); try { return invocation.invokeNext(); // if return fails, Test it your self. } finally { long endTime = System.currentTimeMillis() - startTime; java.lang.reflect.Method m = ((MethodInvocation)invocation).method; System.out.println(" Our kutays methods end : " + m.toString() + " time: " + endTime + "ms"); } } } |