Bundler: can’t find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException) during bundle install with gem

Bundler version 2 introduced a new feature to automatically use the version of Bundler specified in the Gemfile.lock of your project. Thus, if you have an existing Gemfile.lock with a line like this at the bottom BUNDLED WITH 1.17.3 Bundler will try to run with a Bundler version < 2.0. Since you just have Bundler … Read more

Benefit of using Parcelable instead of serializing object

From “Pro Android 2” NOTE: Seeing Parcelable might have triggered the question, why is Android not using the built-in Java serialization mechanism? It turns out that the Android team came to the conclusion that the serialization in Java is far too slow to satisfy Android’s interprocess-communication requirements. So the team built the Parcelable solution. The … Read more

Android HashMap in Bundle?

try as: Bundle extras = new Bundle(); extras.putSerializable(“HashMap”,hashMap); intent.putExtras(extras); and in second Activity Bundle bundle = this.getIntent().getExtras(); if(bundle != null) { hashMap = bundle.getSerializable(“HashMap”); } because Hashmap by default implements Serializable so you can pass it using putSerializable in Bundle and get in other activity using getSerializable

How to send objects through bundle

You can also use Gson to convert an object to a JSONObject and pass it on bundle. For me was the most elegant way I found to do this. I haven’t tested how it affects performance. In Initial Activity Intent activity = new Intent(MyActivity.this,NextActivity.class); activity.putExtra(“myObject”, new Gson().toJson(myobject)); startActivity(activity); In Next Activity String jsonMyObject; Bundle extras … Read more

Passing a Bundle on startActivity()?

You have a few options: 1) Use the Bundle from the Intent: Intent mIntent = new Intent(this, Example.class); Bundle extras = mIntent.getExtras(); extras.putString(key, value); 2) Create a new Bundle Intent mIntent = new Intent(this, Example.class); Bundle mBundle = new Bundle(); mBundle.putString(key, value); mIntent.putExtras(mBundle); 3) Use the putExtra() shortcut method of the Intent Intent mIntent = … Read more

Should everything really be a bundle in Symfony 2.x?

I’ve written a more thorough and updated blog post on this topic: http://elnur.pro/symfony-without-bundles/ No, not everything has to be in a bundle. You could have a structure like this: src/Vendor/Model — for models, src/Vendor/Controller — for controllers, src/Vendor/Service — for services, src/Vendor/Bundle — for bundles, like src/Vendor/Bundle/AppBundle, etc. This way, you would put in the … Read more

How to send parameters from a notification-click to an activity?

Take a look at this guide (creating a notification) and to samples ApiDemos “StatusBarNotifications” and “NotificationDisplay”. For managing if the activity is already running you have two ways: Add FLAG_ACTIVITY_SINGLE_TOP flag to the Intent when launching the activity, and then in the activity class implement onNewIntent(Intent intent) event handler, that way you can access the … Read more

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