<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Ali Karaca</title>
 <link href="http://hasanalikaraca.github.io/atom.xml" rel="self"/>
 <link href="http://hasanalikaraca.github.io/"/>
 <updated>2022-05-25T17:05:06+00:00</updated>
 <id>http://hasanalikaraca.github.io/</id>
 <author>
   <name>Ali Karaca</name>
   <email></email>
 </author>

 
 <entry>
   <title>Android Kickstart colors</title>
   <link href="http://hasanalikaraca.github.io/2017/02/24/android-kickstart-colors.xml.html"/>
   <updated>2017-02-24T00:00:00+00:00</updated>
   <id>http://hasanalikaraca.github.io/2017/02/24/android-kickstart-colors.xml</id>
   <content type="html">&lt;h1 id=&quot;android-kickstart-colors&quot;&gt;Android Kickstart colors&lt;/h1&gt;

&lt;p&gt;Here is the gist:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/HasanAliKaraca/3d9c6d057c30f2b2e413f2c3dbae1094.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Angularjs Google Places Autocomplete</title>
   <link href="http://hasanalikaraca.github.io/2015/09/24/angularjs-google-places-autocomplete.html"/>
   <updated>2015-09-24T00:00:00+00:00</updated>
   <id>http://hasanalikaraca.github.io/2015/09/24/angularjs-google-places-autocomplete</id>
   <content type="html">&lt;h1 id=&quot;angularjs-google-places-autocomplete&quot;&gt;Angularjs Google Places Autocomplete&lt;/h1&gt;

&lt;p&gt;Here is a simple example of google places api w/ a angularjs directive. Here is a working demo:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jsfiddle.net/hasanalikaraca/s9wxtv3s/&quot;&gt;https://jsfiddle.net/hasanalikaraca/s9wxtv3s/&lt;/a&gt;&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>tip: json to pojo generator</title>
   <link href="http://hasanalikaraca.github.io/2015/08/tip-json-to-pojo-generator/"/>
   <updated>2015-08-15T18:25:16+00:00</updated>
   <id>http://hasanalikaraca.github.io/2015/08/tip-json-to-pojo-generator</id>
   <content type="html">&lt;h1 id=&quot;tip-json-to-pojo-generator&quot;&gt;tip: json to pojo generator&lt;/h1&gt;

&lt;p&gt;An usable online tool for to generate json to java model class aka a plain old Java object (POJO).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://pojo.sodhanalibrary.com/&quot; target=&quot;_blank&quot;&gt;http://pojo.sodhanalibrary.com/&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>tip: How to enable Cross-Origin Resource Sharing (CORS) on chrome</title>
   <link href="http://hasanalikaraca.github.io/2015/06/how-to-enable-cross-origin-resource-sharing-cors-on-chrome/"/>
   <updated>2015-06-13T23:10:45+00:00</updated>
   <id>http://hasanalikaraca.github.io/2015/06/how-to-enable-cross-origin-resource-sharing-cors-on-chrome</id>
   <content type="html">&lt;h1 id=&quot;tip-how-to-enable-cross-origin-resource-sharing-cors-on-chrome&quot;&gt;tip: How to enable Cross-Origin Resource Sharing (CORS) on chrome&lt;/h1&gt;

&lt;p&gt;For development purposes add “–disable-web-security” flag to the chrome shortcut.&lt;/p&gt;

&lt;p&gt;eg:&lt;/p&gt;

&lt;p&gt;“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” –disable-web-security&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>[javascript snippet] get query string parameter on url</title>
   <link href="http://hasanalikaraca.github.io/2015/01/javascript-snippet-get-query-string-parameter-on-url/"/>
   <updated>2015-01-28T01:51:36+00:00</updated>
   <id>http://hasanalikaraca.github.io/2015/01/javascript-snippet-get-query-string-parameter-on-url</id>
   <content type="html">&lt;h1 id=&quot;javascript-snippet-get-query-string-parameter-on-url&quot;&gt;[javascript snippet] get query string parameter on url&lt;/h1&gt;

&lt;p&gt;get query string parameter on url:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/HasanAliKaraca/0708c98e1a57367b7a78.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Form serialize with jquery for ajax post</title>
   <link href="http://hasanalikaraca.github.io/2015/01/form-serialize-with-jquery-for-ajax-post/"/>
   <updated>2015-01-06T23:03:46+00:00</updated>
   <id>http://hasanalikaraca.github.io/2015/01/form-serialize-with-jquery-for-ajax-post</id>
   <content type="html">&lt;h1 id=&quot;form-serialize-with-jquery-for-ajax-post&quot;&gt;Form serialize with jquery for ajax post&lt;/h1&gt;

&lt;p&gt;If you have normal form(like all text fields) to serialize form data use&lt;/p&gt;

&lt;pre class=&quot;brush: jscript; title: ; notranslate&quot; title=&quot;&quot;&gt;$(&quot;#my-form&quot;).serialize(); 
&lt;/pre&gt;

&lt;p&gt;Beside that if you have form enctype of “multipart/form-data” then use&lt;/p&gt;

&lt;pre class=&quot;brush: jscript; title: ; notranslate&quot; title=&quot;&quot;&gt;new FormData(this)
&lt;/pre&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre class=&quot;brush: jscript; title: ; notranslate&quot; title=&quot;&quot;&gt;$('#my-form') .submit( function(e) {
        var formData = new FormData(this);
        $.ajax({
            url: 'http://url',
            type: 'POST',
            data: formData,
            processData: false,  // tell jQuery not to process the data
            contentType: false   // tell jQuery not to set contentType
        });
        e.preventDefault();
    });
&lt;/pre&gt;

&lt;p&gt;Ref&lt;/p&gt;

&lt;p&gt;https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects&lt;/p&gt;

&lt;div class=&quot;addtoany_share_save_container addtoany_content_bottom&quot;&gt;
  &lt;div class=&quot;a2a_kit a2a_kit_size_32 addtoany_list a2a_target&quot; id=&quot;wpa2a_14&quot;&gt;
    &lt;a class=&quot;a2a_button_facebook&quot; href=&quot;http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2015%2F01%2Fform-serialize-with-jquery-for-ajax-post%2F&amp;amp;linkname=Form%20serialize%20with%20jquery%20for%20ajax%20post&quot; title=&quot;Facebook&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_button_twitter&quot; href=&quot;http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2015%2F01%2Fform-serialize-with-jquery-for-ajax-post%2F&amp;amp;linkname=Form%20serialize%20with%20jquery%20for%20ajax%20post&quot; title=&quot;Twitter&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_button_google_plus&quot; href=&quot;http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2015%2F01%2Fform-serialize-with-jquery-for-ajax-post%2F&amp;amp;linkname=Form%20serialize%20with%20jquery%20for%20ajax%20post&quot; title=&quot;Google+&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_dd addtoany_share_save&quot; href=&quot;https://www.addtoany.com/share_save&quot;&gt;&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 <entry>
   <title>Using form authentication with asp.net identity side by side</title>
   <link href="http://hasanalikaraca.github.io/2014/12/using-form-authentication-with-asp-net-identity-side-by-side/"/>
   <updated>2014-12-28T14:27:22+00:00</updated>
   <id>http://hasanalikaraca.github.io/2014/12/using-form-authentication-with-asp-net-identity-side-by-side</id>
   <content type="html">&lt;h1 id=&quot;using-form-authentication-with-aspnet-identity-side-by-side&quot;&gt;Using form authentication with asp.net identity side by side&lt;/h1&gt;

&lt;p&gt;If you want to use form authentication and asp.net identity and in your web config&lt;/p&gt;

&lt;authentication mode=&quot;Forms&quot;&gt;

then with a little trick you can use both, the same time

&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot; title=&quot;&quot;&gt;public class ChallengeResult : HttpUnauthorizedResult
{
    public ChallengeResult(string provider, string redirectUri)
        : this(provider, redirectUri, null)
    {
    }

    public ChallengeResult(string provider, string redirectUri, string userId)
    {
        LoginProvider = provider;
        RedirectUri = redirectUri;
        UserId = userId;
    }

    public string LoginProvider { get; set; }
    public string RedirectUri { get; set; }
    public string UserId { get; set; }

    public override void ExecuteResult(ControllerContext context)
    {
        // HERE
        // this line did the trick
        context.RequestContext.HttpContext.Response.SuppressFormsAuthenticationRedirect = true;


        var properties = new AuthenticationProperties() { RedirectUri = RedirectUri };
        if (UserId != null)
        {
            properties.Dictionary[XsrfKey] = UserId;
        }

        context.HttpContext.GetOwinContext().Authentication.Challenge(properties, LoginProvider);
    }
}

&lt;/pre&gt;

reference:
  
http://stackoverflow.com/questions/19893718/mvc-5-external-authentication-with-authentication-mode-forms

&lt;div class=&quot;addtoany_share_save_container addtoany_content_bottom&quot;&gt;
  &lt;div class=&quot;a2a_kit a2a_kit_size_32 addtoany_list a2a_target&quot; id=&quot;wpa2a_13&quot;&gt;
    &lt;a class=&quot;a2a_button_facebook&quot; href=&quot;http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F12%2Fusing-form-authentication-with-asp-net-identity-side-by-side%2F&amp;amp;linkname=Using%20form%20authentication%20with%20asp.net%20identity%20side%20by%20side&quot; title=&quot;Facebook&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_button_twitter&quot; href=&quot;http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F12%2Fusing-form-authentication-with-asp-net-identity-side-by-side%2F&amp;amp;linkname=Using%20form%20authentication%20with%20asp.net%20identity%20side%20by%20side&quot; title=&quot;Twitter&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_button_google_plus&quot; href=&quot;http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F12%2Fusing-form-authentication-with-asp-net-identity-side-by-side%2F&amp;amp;linkname=Using%20form%20authentication%20with%20asp.net%20identity%20side%20by%20side&quot; title=&quot;Google+&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_dd addtoany_share_save&quot; href=&quot;https://www.addtoany.com/share_save&quot;&gt;&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/authentication&gt;
</content>
 </entry>
 
 <entry>
   <title>TC Kimlik No Doğrulama c#</title>
   <link href="http://hasanalikaraca.github.io/2014/12/tc-kimlik-no-dogrulama-c/"/>
   <updated>2014-12-15T20:54:55+00:00</updated>
   <id>http://hasanalikaraca.github.io/2014/12/tc-kimlik-no-dogrulama-c</id>
   <content type="html">&lt;h1 id=&quot;tc-kimlik-no-doğrulama-c&quot;&gt;TC Kimlik No Doğrulama c#&lt;/h1&gt;

&lt;h3 id=&quot;kurallar&quot;&gt;Kurallar:&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;11 haneli bir rakamdır.&lt;/li&gt;
  &lt;li&gt;0’la başlayamaz.&lt;/li&gt;
  &lt;li&gt;ilk 10 rakamın toplamının birler basamağı, son rakama eşittir&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;vikipedi&quot;&gt;Vikipedi:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;1, 3, 5, 7 ve 9. rakamın toplamının 7 katı ile 2, 4, 6 ve 8. rakamın toplamının 9 katının toplamının birler basamağı 10. rakamı;&lt;/li&gt;
  &lt;li&gt;1, 3, 5, 7 ve 9. rakamın toplamının 8 katının birler basamağı 11. rakamı vermektedir.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;programatik-olarak-düşünürsek-ilk-rakam-0-index-olduğuna-göre&quot;&gt;Programatik olarak düşünürsek, ilk rakam 0. index olduğuna göre:&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;0, 2, 4, 6, 8. rakamın(çift haneler 10 hariç) toplamının 7 katı ile 1, 3, 5, 7.(tek haneler 9 ve 11 hariç) toplamının 9 katının toplamının birler basamağı(mod10) sondan bir önceki rakama eşittir&lt;/li&gt;
  &lt;li&gt;0, 2, 4, 6, 8. rakamın toplamının 8 katının birler basamağı(mod10) son rakama eşittir&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Buna göre şöyle bir method yazdım:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/HasanAliKaraca/90a2011c3e649108c551a4b63376db63.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Seperating EF POCO&#8217;s(model.tt) from model.edmx to another project</title>
   <link href="http://hasanalikaraca.github.io/2014/06/seperating-ef-pocos-from-model-edmx-to-another-project/"/>
   <updated>2014-06-01T17:07:59+00:00</updated>
   <id>http://hasanalikaraca.github.io/2014/06/seperating-ef-pocos-from-model-edmx-to-another-project</id>
   <content type="html">&lt;h1 id=&quot;seperating-ef-pocosmodeltt-from-modeledmx-to-another-project&quot;&gt;Seperating EF POCO’s(model.tt) from model.edmx to another project&lt;/h1&gt;

&lt;p&gt;&lt;a title=&quot;http://allen-conway-dotnet.blogspot.com.tr/2013/01/separating-entity-framework-poco.html&quot; href=&quot;http://allen-conway-dotnet.blogspot.com.tr/2013/01/separating-entity-framework-poco.html&quot; target=&quot;_blank&quot;&gt;http://allen-conway-dotnet.blogspot.com.tr/2013/01/separating-entity-framework-poco.html&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;addtoany_share_save_container addtoany_content_bottom&quot;&gt;
  &lt;div class=&quot;a2a_kit a2a_kit_size_32 addtoany_list a2a_target&quot; id=&quot;wpa2a_11&quot;&gt;
    &lt;a class=&quot;a2a_button_facebook&quot; href=&quot;http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F06%2Fseperating-ef-pocos-from-model-edmx-to-another-project%2F&amp;amp;linkname=Seperating%20EF%20POCO%E2%80%99s%28model.tt%29%20from%20model.edmx%20to%20another%20project&quot; title=&quot;Facebook&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_button_twitter&quot; href=&quot;http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F06%2Fseperating-ef-pocos-from-model-edmx-to-another-project%2F&amp;amp;linkname=Seperating%20EF%20POCO%E2%80%99s%28model.tt%29%20from%20model.edmx%20to%20another%20project&quot; title=&quot;Twitter&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_button_google_plus&quot; href=&quot;http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F06%2Fseperating-ef-pocos-from-model-edmx-to-another-project%2F&amp;amp;linkname=Seperating%20EF%20POCO%E2%80%99s%28model.tt%29%20from%20model.edmx%20to%20another%20project&quot; title=&quot;Google+&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_dd addtoany_share_save&quot; href=&quot;https://www.addtoany.com/share_save&quot;&gt;&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 <entry>
   <title>Building Blocks of DDD</title>
   <link href="http://hasanalikaraca.github.io/2014/05/building-blocks-of-ddd/"/>
   <updated>2014-05-24T00:29:42+00:00</updated>
   <id>http://hasanalikaraca.github.io/2014/05/building-blocks-of-ddd</id>
   <content type="html">&lt;h1 id=&quot;building-blocks-of-ddd&quot;&gt;Building Blocks of DDD&lt;/h1&gt;

&lt;div id=&quot;attachment_167&quot; style=&quot;width: 646px&quot; class=&quot;wp-caption alignnone&quot;&gt;
  &lt;a href=&quot;http://hasanalikaraca.com/wp-content/uploads/2014/05/BuildingBlocksOfDDD.png&quot;&gt;&lt;img class=&quot;size-full wp-image-167&quot; alt=&quot;BuildingBlocksOfDDD&quot; src=&quot;http://hasanalikaraca.com/wp-content/uploads/2014/05/BuildingBlocksOfDDD.png&quot; width=&quot;636&quot; height=&quot;456&quot; /&gt;&lt;/a&gt;
  
  &lt;p class=&quot;wp-caption-text&quot;&gt;
    Building Blocks Of DDD
  &lt;/p&gt;
&lt;/div&gt;

&lt;div class=&quot;addtoany_share_save_container addtoany_content_bottom&quot;&gt;
  &lt;div class=&quot;a2a_kit a2a_kit_size_32 addtoany_list a2a_target&quot; id=&quot;wpa2a_10&quot;&gt;
    &lt;a class=&quot;a2a_button_facebook&quot; href=&quot;http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F05%2Fbuilding-blocks-of-ddd%2F&amp;amp;linkname=Building%20Blocks%20of%20DDD&quot; title=&quot;Facebook&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_button_twitter&quot; href=&quot;http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F05%2Fbuilding-blocks-of-ddd%2F&amp;amp;linkname=Building%20Blocks%20of%20DDD&quot; title=&quot;Twitter&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_button_google_plus&quot; href=&quot;http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fhasanalikaraca.com%2F2014%2F05%2Fbuilding-blocks-of-ddd%2F&amp;amp;linkname=Building%20Blocks%20of%20DDD&quot; title=&quot;Google+&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;/a&gt;&lt;a class=&quot;a2a_dd addtoany_share_save&quot; href=&quot;https://www.addtoany.com/share_save&quot;&gt;&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;
</content>
 </entry>
 
 <entry>
   <title>Saving russian data on Sql Server</title>
   <link href="http://hasanalikaraca.github.io/2014/04/saving-russian-data-on-sql-server/"/>
   <updated>2014-04-15T09:56:36+00:00</updated>
   <id>http://hasanalikaraca.github.io/2014/04/saving-russian-data-on-sql-server</id>
   <content type="html">&lt;h1 id=&quot;saving-russian-data-on-sql-server&quot;&gt;Saving russian data on Sql Server&lt;/h1&gt;

&lt;p&gt;1) use nvarchar or nchar datatype&lt;/p&gt;

&lt;p&gt;2) insert values with N prefix. eg:&lt;/p&gt;

&lt;p&gt;insert into tblFoo values(N’слайд’)&lt;/p&gt;

&lt;p&gt;2) use N prefix on your select statements.eg:&lt;/p&gt;

&lt;p&gt;N’select * from tblFoo’&lt;/p&gt;

&lt;p&gt;3) On c# code dont use datatype as DataType.AnsiString use DataType.String instead&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Qml notes</title>
   <link href="http://hasanalikaraca.github.io/2013/08/qml-notes/"/>
   <updated>2013-08-04T05:03:13+00:00</updated>
   <id>http://hasanalikaraca.github.io/2013/08/qml-notes</id>
   <content type="html">&lt;h1 id=&quot;qml-notes&quot;&gt;Qml notes&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;How to get Qml object from c++&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Qml:&lt;/em&gt;&lt;/p&gt;

&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot; title=&quot;&quot;&gt;Button {
   id:btnPower
   objectName:&quot;oBtnPower&quot;
   text:&quot;Hello&quot;
}

&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;c++:&lt;/em&gt;&lt;/p&gt;

&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot; title=&quot;&quot;&gt;//app.cpp
#include &amp;lt;bb/cascades/Button&amp;gt;
...

QmlDocument *qml = QmlDocument::create(&quot;main.qml&quot;);

AbstractPane *root = qml-&amp;gt;createRootObject&amp;lt;AbstractPane&amp;gt;();

//getting the button object

QPointer&amp;lt;bb::cascades::Button&amp;gt; oBtnPower= root-&amp;gt;findChild&amp;lt;Button*&amp;gt;(&quot;oBtnPower&quot;);

oBtnPower-&amp;gt;setText(&quot;Omg&quot;);

&lt;/pre&gt;

</content>
 </entry>
 
 <entry>
   <title>JVM not found &#8211; %JAVA_HOME% problem phonegap / ant</title>
   <link href="http://hasanalikaraca.github.io/2013/06/java_home-problem-phonegap-ant/"/>
   <updated>2013-06-12T18:09:30+00:00</updated>
   <id>http://hasanalikaraca.github.io/2013/06/java_home-problem-phonegap-ant</id>
   <content type="html">&lt;h1 id=&quot;jvm-not-found--java_home-problem-phonegap--ant&quot;&gt;JVM not found – %JAVA_HOME% problem phonegap / ant&lt;/h1&gt;

&lt;p&gt;%JAVA_HOME% = “C:\Program Files (x86)\Java\jdk1.6.0_22″&lt;/p&gt;

&lt;p&gt;%ANT_HOME% = “C:\ant”&lt;/p&gt;

&lt;p&gt;They must defined without “\bin” but in System variables:&lt;/p&gt;

&lt;p&gt;add to following line to &lt;strong&gt;beginning&lt;/strong&gt; of the Path variable:&lt;/p&gt;

&lt;p&gt;%JAVA_HOME%\bin;%ANT_HOME%\bin;&lt;/p&gt;

&lt;p&gt;—————————————————————–&lt;/p&gt;

&lt;p&gt;Phonegap commands(in project’s directory):&lt;/p&gt;

&lt;p&gt;ant playbook build&lt;/p&gt;

&lt;p&gt;//after build, install app to simulator&lt;/p&gt;

&lt;p&gt;ant playbook load-simulator&lt;/p&gt;

&lt;p&gt;—————————————————————-&lt;/p&gt;

&lt;p&gt;sencha touch 2 form panel is buggy on playbook&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>c# ile hotmail üzerinden mail gönderme işlemi</title>
   <link href="http://hasanalikaraca.github.io/2013/06/c-ile-hotmail-uzerinden-mail-gonderme-islemi/"/>
   <updated>2013-06-06T14:01:08+00:00</updated>
   <id>http://hasanalikaraca.github.io/2013/06/c-ile-hotmail-uzerinden-mail-gonderme-islemi</id>
   <content type="html">&lt;h1 id=&quot;c-ile-hotmail-üzerinden-mail-gönderme-işlemi&quot;&gt;c# ile hotmail üzerinden mail gönderme işlemi&lt;/h1&gt;

&lt;p&gt;Not: Gmail smtp servisi faal olmadığından hotmail için yazdım. SmtpHost ve SmtpPort bilgileri değiştirilerek, başka bir servis için rahatlıkla kullanabilir.&lt;/p&gt;

&lt;p&gt;Yeni bir konsol projesi için aşağıdaki kod kullanabilir.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/HasanAliKaraca/eaeeadafc590f65ba5a6.js&quot;&gt;&lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>Dependency Inversion Principle</title>
   <link href="http://hasanalikaraca.github.io/2013/05/dependency-inversion-principle/"/>
   <updated>2013-05-20T13:13:02+00:00</updated>
   <id>http://hasanalikaraca.github.io/2013/05/dependency-inversion-principle</id>
   <content type="html">&lt;h1 id=&quot;dependency-inversion-principle&quot;&gt;Dependency Inversion Principle&lt;/h1&gt;

&lt;p&gt;&lt;img style=&quot;height:300px;width:500px&quot; src=&quot;http://ircmaxell.github.io/DontBeStupid-Presentation/assets/images/dependency_inversion_principle.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;ProductServiceBeforeDIP&lt;/li&gt;
&lt;/ol&gt;

&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot; title=&quot;&quot;&gt;namespace ConsoleApplication1
{
    public class ProductServiceBeforeDIP
    {
        LinqToSqlProductRepository _productRepository;

        public ProductServiceBeforeDIP()
        {
            _productRepository = new LinqToSqlProductRepository();
        }
    }
}

&lt;/pre&gt;

&lt;ol&gt;
  &lt;li&gt;ProductServiceAfterDIP&lt;/li&gt;
&lt;/ol&gt;

&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot; title=&quot;&quot;&gt;namespace ConsoleApplication1
{
    class ProductServiceAfterDIP
    {
        IProductRepository _productRepository;

        // using constructor to passing dependecy
        public ProductServiceAfterDIP(IProductRepository productRepository)
        {
            _productRepository = productRepository;
        }

        public void GetAll()
        {
            // getting data
        }
    }

    public interface IProductRepository
    {
        void GetAll();
    }
}
&lt;/pre&gt;

&lt;ol&gt;
  &lt;li&gt;Demo&lt;/li&gt;
&lt;/ol&gt;

&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot; title=&quot;&quot;&gt;namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            //1. using LinqToSql as data provider
            ProductServiceAfterDIP productService = new ProductServiceAfterDIP(new LinqToSqlProductRepository());

            productService.GetAll();

            //2. using EF as data provider
            productService = new ProductServiceAfterDIP(new EntityFrameWorkProductRepository());

            productService.GetAll();
        }
    }

    public class EntityFrameWorkProductRepository : IProductRepository
    {
        #region IProductRepository Members

        public void GetAll()
        {
            // getting data with ef
        }

        #endregion
    }

    public class LinqToSqlProductRepository : IProductRepository
    {
        #region IProductRepository Members

        public void GetAll()
        {
            // getting data with LinQtoSql
        }

        #endregion
    }
}
&lt;/pre&gt;

</content>
 </entry>
 
 <entry>
   <title>blackberry 10 dev alpha c telefon odulu kazandım</title>
   <link href="http://hasanalikaraca.github.io/2013/03/blackberry-10-dev-alpha-c-telefon-odulu-kazandim/"/>
   <updated>2013-03-01T00:02:55+00:00</updated>
   <id>http://hasanalikaraca.github.io/2013/03/blackberry-10-dev-alpha-c-telefon-odulu-kazandim</id>
   <content type="html">&lt;h1 id=&quot;blackberry-10-dev-alpha-c-telefon-odulu-kazandım&quot;&gt;blackberry 10 dev alpha c telefon odulu kazandım&lt;/h1&gt;

&lt;p&gt;BlackBerry için geliştirdiğim uygulamardan ötürü çekiliş sonucunda BlackBerry dev alpha b ve blackberry dev alpha c telefon ödüllerini kazandım. Elime geçtiğinde fotoğraflarını yayınlayacağım &lt;img src=&quot;http://hasanalikaraca.com/wp-includes/images/smilies/simple-smile.png&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; style=&quot;height: 1em; max-height: 1em;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Teşekkürler BlackBerry!&lt;/p&gt;

&lt;p&gt;&lt;img style=&quot;float:left&quot; class=&quot;alignnone size-full wp-image-93&quot; alt=&quot;dev_alpha_B&quot; src=&quot;http://hasanalikaraca.com/wp-content/uploads/2013/03/dev_alpha_B.png&quot; width=&quot;199&quot; height=&quot;366&quot; /&gt;&lt;img alt=&quot;&quot; style=&quot;float:left&quot; src=&quot;https://developer.blackberry.com/webroot/img/devalpha-c.png&quot; /&gt;&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>mobil cihazlar/platformlarda uygulama gelistirmek icin hangi frameworku secmeli?</title>
   <link href="http://hasanalikaraca.github.io/2013/01/mobil-cihazlarplatformlarda-uygulama-gelistirmek-icin-hangi-frameworku-secmeli/"/>
   <updated>2013-01-31T23:34:57+00:00</updated>
   <id>http://hasanalikaraca.github.io/2013/01/mobil-cihazlarplatformlarda-uygulama-gelistirmek-icin-hangi-frameworku-secmeli</id>
   <content type="html">&lt;h1 id=&quot;mobil-cihazlarplatformlarda-uygulama-gelistirmek-icin-hangi-frameworku-secmeli&quot;&gt;mobil cihazlar/platformlarda uygulama gelistirmek icin hangi frameworku secmeli?&lt;/h1&gt;

&lt;p&gt;Mobil frameworklar arasında tercih yapmakta kullanmak için iyi bir araç:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.markus-falk.com/mobile-frameworks-comparison-chart/&quot; title=&quot;http://www.markus-falk.com/mobile-frameworks-comparison-chart/&quot; target=&quot;_blank&quot;&gt;http://www.markus-falk.com/mobile-frameworks-comparison-chart/&lt;/a&gt;&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>choosing web apis over wcf</title>
   <link href="http://hasanalikaraca.github.io/2013/01/choosing-web-apis-over-wcf/"/>
   <updated>2013-01-24T23:43:37+00:00</updated>
   <id>http://hasanalikaraca.github.io/2013/01/choosing-web-apis-over-wcf</id>
   <content type="html">&lt;h1 id=&quot;choosing-web-apis-over-wcf&quot;&gt;choosing web apis over wcf&lt;/h1&gt;

&lt;blockquote&gt;
  &lt;ul&gt;
    &lt;li&gt;If your intention is to create services that support special scenarios – one way messaging, message queues, duplex communication etc, then you’re better of picking WCF&lt;/li&gt;
    &lt;li&gt;If you want to create services that can use fast transport channels when available, such as TCP, Named Pipes, or maybe even UDP (in WCF 4.5), and you also want to support HTTP when all other transports are unavailable, then you’re better off with WCF and using both SOAP-based bindings and the WebHttp binding.&lt;/li&gt;
    &lt;li&gt;If you want to create resource-oriented services over HTTP that can use the full features of HTTP – define cache control for browsers, versioning and concurrency using ETags, pass various content types such as images, documents, HTML pages etc., use URI templates to include Task URIs in your responses, then the new Web APIs are the best choice for you.&lt;/li&gt;
    &lt;li&gt;If you want to create a multi-target service that can be used as both resource-oriented service over HTTP and as RPC-style SOAP service over TCP – talk to me first, so I’ll give you some pointers.&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://www.codeproject.com/Articles/341414/WCF-or-ASP-NET-Web-APIs-My-two-cents-on-the-subjec&quot; target=&quot;_blank&quot;&gt;source&lt;/a&gt;&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>c# yeni rastgele deger / guid uretme</title>
   <link href="http://hasanalikaraca.github.io/2012/11/c-yeni-rastgele-deger-guid-uretme/"/>
   <updated>2012-11-01T23:51:45+00:00</updated>
   <id>http://hasanalikaraca.github.io/2012/11/c-yeni-rastgele-deger-guid-uretme</id>
   <content type="html">&lt;h1 id=&quot;c-yeni-rastgele-deger--guid-uretme&quot;&gt;c# yeni rastgele deger / guid uretme&lt;/h1&gt;

&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot; title=&quot;&quot;&gt;//this creates an empty guid - 00000000-0000-0000-0000-000000000000
//Guid guid = new Guid();

//this creates an actual new guid
Guid guid = Guid.NewGuid();
&lt;/pre&gt;

</content>
 </entry>
 

</feed>