Search Results

Search found 3 results on 1 pages for 'portablejim'.

Page 1/1 | 1 

  • Using Mercurial repository inside a Git one: Feasible? Sane?

    - by Portablejim
    I am thinking on creating a Mercurial repository under a Git repository. e.g. ..../git-repository/directory/hg-repo/ The 2 repositories Is it possible to manage (keeping your sanity)? How similiar is it to this? I am a computer science student at University. I manage my work in Git, mainly as a distribution mechanism (after realizing that rsync fails when you have changes in more than one place) between my desktop and usb drive. I try use of Git as a VCS as I do work. I have finished a semester where I did a small group project to prepare for a larger group project next year. We had to use Subversion, and experienced the joys of a centralised VCS (including downtime). I tried to keep the subversion repository separate to my Git repository for the subject**, however it was annoying that it was seperate (not in the place where I store assignments). I therefore moved to using an Subversion repository inside my Git repository. As I think ahead (maybe I am thinking too far ahead) I realise that I will have to try and convince people to use a DVCS and Mercurial will probably be the one that is preferred (Windows and Mac GUI support, closer to Subversion). Having done some research into the whole Git vs Mercurial debate (however not used Mercurial at all) I still prefer Git. Can I have a Mercurial repository inside a Git one without going mad (or it ruining something)? Or is it something that I should not consider at all? (Or is it a bad question that should be deleted?) ** I think outside of Australia it is called a course

    Read the article

  • How to open new view (call an activity) from options menu defined in XML? (android)

    - by Portablejim
    I cant seem to open a new view from an options menu item. The program keeps crashing as it applies the intent and listener to the item. I am just beginning, so please be nice. The current view is mnfsms, and the view I am trying to open is mnfsms_settings. I am developing for 1.5. Could someone please help me get the menu working. The menu (called options_menu.xml): <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/settings_button" android:title="Settings" android:icon="@android:drawable/ic_menu_preferences" /> <item android:id="@+id/about_button" android:title="About" android:icon="@android:drawable/ic_menu_myplaces" /> </menu> The main view (called mnfsms.java): package com.example.mnfsms; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; public class mnfsms extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); /* OnClickListener myocl = new View.OnClickListener() { public void onClick(View v){ Intent myi = new Intent(mnfsms.this, mnfsms_settings.class); startActivity(myi); } };*/ } public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.options_menu, menu); MenuItem mi_settings = (MenuItem)findViewById(R.id.settings_button); mi_settings.setIntent(new Intent(this, mnfsms_settings.class)); return true; } } The manifest: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.mnfsms" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".mnfsms" android:label="@string/main_window_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".mnfsms_settings" android:label="string/main_window_name"> </activity> </application> <uses-sdk android:minSdkVersion="3" /> </manifest> The stacktrace: 01-06 15:07:58.045: ERROR/AndroidRuntime(2123): Uncaught handler: thread main exiting due to uncaught exception 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): java.lang.NullPointerException 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at com.example.mnfsms.mnfsms.onCreateOptionsMenu(mnfsms.java:30) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at android.app.Activity.onCreatePanelMenu(Activity.java:2038) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:421) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at com.android.internal.policy.impl.PhoneWindow.onKeyDownPanel(PhoneWindow.java:664) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at com.android.internal.policy.impl.PhoneWindow.onKeyDown(PhoneWindow.java:1278) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1735) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2188) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2158) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at android.view.ViewRoot.handleMessage(ViewRoot.java:1490) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at android.os.Handler.dispatchMessage(Handler.java:99) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at android.os.Looper.loop(Looper.java:123) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at android.app.ActivityThread.main(ActivityThread.java:3948) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at java.lang.reflect.Method.invokeNative(Native Method) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at java.lang.reflect.Method.invoke(Method.java:521) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 01-06 15:07:58.055: ERROR/AndroidRuntime(2123): at dalvik.system.NativeStart.main(Native Method)

    Read the article

  • Accessing variables with different scope in C++

    - by Portablejim
    With #include <iostream> using namespace std; int a = 1; int main() { int a = 2; if(true) { int a = 3; cout << a << " " << ::a // Can I access a = 2 here? << " " << ::a << endl; } cout << a << " " << ::a << endl; } having the output 3 1 1 2 1 Is there a way to access the 'a' equal to 2 inside the if statement where there is the 'a' equal to 3, with the output 3 2 1 2 1 Note: I know this should not be done (and the code should not get to the point where I need to ask). This question is more "can it be done".

    Read the article

1