Interlocked and volatile

Interlocked operations and volatile are not really supposed to be used at the same time. The reason you get a warning is because it (almost?) always indicates you have misunderstood what you are doing. Over-simplifying and paraphrasing: volatile indicates that every read operation needs to re-read from memory because there might be other threads updating … Read more

Custom Layout for DialogFragment OnCreateView vs. OnCreateDialog

I had the same exception with the following code: public class SelectWeekDayFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return new AlertDialog.Builder(getActivity()) .setMessage(“Are you sure?”).setPositiveButton(“Ok”, null) .setNegativeButton(“No way”, null).create(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.week_day_dialog, container, false); return view; } } You must choose … Read more

How do I use Travis-CI with C# or F#

See danielnixon’s answer for the official way to do this now. It is possible. 1. Your project needs to work on Mono On your own mono machine, using the terminal, cd into your solution directory and running the command xbuild. This may automatically work, or it may not, as there are features you used in … Read more

Develop Android app using C#

Having used Mono, I would NOT recommend it. The Mono runtime is bundled with your app, so your apk ends up being bloated at more than 6MB. A better programming solution for C# would be dot42. Both Mono and dot42 are licensed products. Personally, I would recommend using Java with the IntelliJ IDEA dev environment. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)