Wednesday, December 10, 2014

UIScrollView won't scroll (Storyboards)

Two things turned out to be necessary:
1) Set height of scrollview to 480.
2) Add constraint to the bottommost field in the scrollview. The constraint was Pin >> Bottom Space to Superview.

Wednesday, November 12, 2014

Wcf-The maximum message size quota for incoming messages (65536) has been exceeded?

Wcf-The maximum message size quota for incoming messages (65536) has been exceeded?

You should set maxReceivedMessageSize="2147483647" to increase message size. Try to change config to this:

 maxBufferSize="2147483647" 
         maxBufferPoolSize="2147483647" 
         maxReceivedMessageSize="2147483647">
     maxDepth="2147483647" 
                  maxStringContentLength="2147483647" 
                  maxArrayLength="2147483647" 
                  maxBytesPerRead="2147483647"
                  maxNameTableCharCount="2147483647" />


ref:
1) http://stackoverflow.com/questions/19564047/wcf-the-maximum-message-size-quota-for-incoming-messages-65536-has-been-exceed
2) http://weblogs.asp.net/hajan/transferring-large-data-when-using-web-services

Monday, November 10, 2014

sql server finding duplicate on one column but using select where


sql server finding duplicate on one column but using select where

SELECT Id, Terms, Track, Active
FROM QueryData
WHERE Terms IN (
                SELECT Terms 
                FROM QueryData
                WHERE Track = 'Y' and Active = 'Y' 
                GROUP BY Terms
                HAVING COUNT(*) > 1
                )

SELECT ArticleId
FROM Image2Articles
WHERE ArticleId IN (
                SELECT ArticleId 
                FROM Image2Articles
                
                GROUP BY ArticleId
                HAVING COUNT(*) > 1
                )

Saturday, October 25, 2014

Run MongoDB as windows service.

Run MongoDB as windows service.

Step 1 : c:\mongodb\bin>; mongod --dbpath "c:\mongodb" --logpath "c:\mongodb\log.txt" --install --serviceName "MongoDB"

         Now, mongod is created as windows services.In order to start this service("MongoDB") follow 'step 2'.

Step 2 : service can be started using the command line -------->  net start "MongoDB".



Reference link :

http://www.mkyong.com/mongodb/how-to-run-mongodb-as-windows-service/
http://stackoverflow.com/questions/2438055/how-to-run-mongodb-as-windows-service

Wednesday, September 24, 2014

https://www.linkedin.com/pulse/article/20140923052534-2022319-how-to-challenge-your-team-take-it-to-the-next-level?trk=tod-home-art-list-small_2

https://www.linkedin.com/pulse/article/20140923021544-64875646-how-successful-people-deal-with-stress?trk=tod-home-art-list-large_0

Friday, September 12, 2014

Hold execution after showing UIAlertView

// Displays a UIAlertView and returns the index of the button pressed.
public static Task ShowAlert (string title, string message, params string [] buttons)
{
    var tcs = new TaskCompletionSource ();
    var alert = new UIAlertView {
        Title = title,
        Message = message
    };
    foreach (var button in buttons)
        alert.AddButton (button);
    alert.Clicked += (s, e) => tcs.TrySetResult (e.ButtonIndex);
    alert.Show ();
    return tcs.Task;
}
Then you do instead:
int button = await ShowAlert ("Foo", "Bar", "Ok", "Cancel", "Maybe");
Source : http://stackoverflow.com/questions/19120841/yes-no-confirmation-uialertview