Category Archives: Uncategorized

How to get rid of warning messages after installing R?

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
5: Setting LC_MONETARY failed, using "C"         # this line is not occurring in OSX 10.10.1 Yosemite but other four are.

I found an existing question but the solution does not work for me. I do this

  1. Open Terminal
  2. Write or paste in: defaults write org.R-project.R force.LANG en_US.UTF-8
  3. Close Terminal
  4. Start R

and the warning messages are still shown. I guess this works when installing R using the package from the R project page.

How to get rid of these warning messages after installation of R in OSX?

src :

Tagged ,

Xcode Archive Is Too Large

I have a Unity3D project that I’ve already released for iOS via Xcode. Previously the archive size was about 30-40Mb which I’m happy with.

I’ve now changed a few things within the Unity project, and rebuilt it for Xcode. Now when I archive it, the size is around 110Mb, which is huge compared to the previous file size. I only changed the logo, and splash screen design.

Also, when I rebuild the older version, the size isn’t 30-40Mb anymore, it’s 110Mb too!

So I’m guessing this is something to do with the new Xcode for iOS8? Not 100% sure, hence why Im asking.


sRC :

Tagged , , ,

How to use column range chart with range and navigator in Highcharts?

I have a requirement to plot run history of a task in Highcharts which should show tasks run as a horizontal bar. Recently I found out that inverted option is not supported in StockChart andnavigator & rangeSelector is only available in StockChart.

So in order to achive the requirement I created something similar to this jsfiddle example (found somewhere while browsing don’t remember the source) and ended up with this plunker link with help from my previous question, thanks to Pawel Fus

Updating question to avoid confusion

Intent of chart

Show only those tasks which ran in a particular date time range. In case there are too many runs say more than 10, then there should be a way to display only 10 tasks and yaxis should be scrollable to show other tasks. plunker link to the problem

Problem explanation of above plunker.

If you check the screenshot below from above plunker, the time range is from 12/12/2014 09:32:26to 12/12/2014 10:32:26 and there are only 2 tasks that has run m_ARRAYV_SALES_ZIG1_CALL2_VOD__C_OB & m_ZIG2_HCP_MERGE_IB_CN. However I can see another task in between LILLY_C which did not even ran in this date time range. (In actual data there are more than 10 tasks that clutters this chart which does not even fall under this date time range)

Also if you notice at the bottom most right corner time shifted from 09:38 to 19:20. 19:20 is the end time for m_ZIG2_HCP_MERGE_IB_CN task. enter image description hereBelow is my chart options Continue reading

Tagged , , , , ,

Is there a reliable, cross-platform (on *nix anyway) way to create a temporary file on another device?

I’m trying to write a test case for some code that should iterates over a filesystem tree, but should stop if a file is on another device. In writing tests for it, I considered creating a file in /dev/shm, symlinking to it from my test directory, and then checking that it isn’t read, but /dev/shm seems to be Linux-specific. mount-ing a tmpfs could be an option, but it requires root…

Any ideas how this can be accomplished?

Tagged , , ,

How can I anchor an image to the center within an Imageview in a scrollview, in Android?

When I scroll within my Android scrollview, it scrolls down as it should.

But I’d like the image within the imageview to anchor to the centre. So you always see the face of the person in the image as you scrolling up.

So far I have not been able to accomplish this

A similar effect is created in the image below:

enter image description here

Stockguy image: Continue reading

Tagged , , , ,

Calling getSupportFragmentManager() after getChildFragmentManager() causes IllegalStateException: Recursive entry to executePendingTransactions

I am using FrameLayout to show fragments

        android:background="@android:color/white" >

and to open fragment i am using this

ft.add(, frag);

Continue reading

Tagged , ,

How can I change UserManager logic so that user must exist in database before they register

I am customizing the MVC5 registration process so that when users are registering they must enter two custom fields ‘MyNewField1’ and ‘MyNewField2’ which will be then checked against the user context to ensure if they exist in which case the registration can succeed by updating that current user.

 if(user != null)
                var emailCheck = await UserManager.FindByNameAsync(model.Email);

                if (emailCheck == null)
                    //We have found a user and email address has not been already assigned to another
                    //assign the email entered for this user in place of the username and email place
                    //holders and update the user before saving to the database
                    user.UserName = model.Email;
                    user.Email = model.Email;
                    var hasher = new PasswordHasher();
                    user.PasswordHash = hasher.HashPassword(model.Password);

                    var code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id);
                    var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
                    await UserManager.SendEmailAsync(user.Id, "Budget Energy Email Verification", "Please confirm your account by clicking this link: <a href=\"" + callbackUrl + "\">link</a>");
                    ViewBag.Link = callbackUrl;

                    ViewBag.Message = "Check your email and confirm your account, you must be confirmed before you can log in.";
                    return View("Info");

                    //This email address is already assigned to a user
                    return View(model);
                //No user exists with these details so redisplay form
                return View(model);

src :
Tagged , , ,

Get every new post delivered to your Inbox.

Join 508 other followers

%d bloggers like this: