вторник, 6 мая 2014 г.

Git assume unchanged files

Working on the BBB mobile client I came to the problem that when I want to test the client with my local server I need to change the server address in the LoginPageViewMediator file.

Once I am done with local changes and testing and want to proceed with pushing the code to github, obviously Git will tell me that LoginPageViewMediator was changed and will give an option to either checkout the master version of it(reset) or add it to the commit. What I used to do - is every time before the submission I will discard the changes in LoginPageViewMediator with git checkout command, push my branch, and then when I start working on another branch I have to do the same procedure with changing server address again.

Luckily, Git has a command to assume that specific file is unchanged, however the file will contain all your changes.

Now I can do it only once: 

git update-index --assume-unchanged LoginPageViewMediator.as 

and then file is not marked as changed anymore.

If I actually decide that file needs to be changed and included to my commit - I can revert file to the default state:

git update-index --no-assume-unchanged LoginPageViewMediator.as 
 
Now, file is marked as modified and ready to be added to the submission.
 
Also, if you want to see all the files that were marked with --assume-unchanged.
Following command worked for me:
 
git ls-files -v | grep ^[a-z]

Hope this helps.

вторник, 4 февраля 2014 г.

First week at CDOT ! Hello BigBlueButton!

Two weeks ago I've joined Centre for Development of Open Technology at Seneca College as Research Assistant, I've started working on BigBlueButton project, which is a open source web conferencing system for on-line learning. With this system you can share audio, webcam, chat, whiteboard, upload documents, and all this FOR FREE! In my opinion, this is a perfect tool for people who can't afford all the available enterprise solutions. Check it out for more details: bigbluebutton.org

In the first week, I've been setting up my machine, working environment, getting familiar with the team, project, and had a chance to go a little bit through the code.

In the second week, I received a task to re-enable ability for user to choose a color of the chat message. This feature is been developed some time ago, but because it wasn't in demand, it's been depreciated. So for me it wasn't too much of the actual coding, but more of going through the project and find all the places where Color picker was used before and restore it, which still gave me a great opportunity to get more acquainted with code and the workflow.

And last but not the least part of the procedure was the code submission, this is where GitHub comes into action. Just to remind, GitHub is web-based hosting service for software development projects that use the Git revision control system, which nowadays got very popular, especially in Open Source circles. It took me some time and probably will take me some more to become comfortable with Git, however I did manage to push my changes to the Git project successfully!

Now if BigBlueButton user wants to have the option to choose the color, the only thing they need to do is in Config.xml file they need to set colorPickerIsVisible="true", since it is invisible by default.

среда, 7 ноября 2012 г.

Challenge accepted :) 
             I've looked at what Amir and Saeid did, nice job, but I was wondering how you guys checked it if your code not even complied without doing this function modifiable with & sign.
             I decided to go a bit further and I did my operator[] method able to add new Nodes to the end of the Queue if we have index > size.
 Here is the code
int& Queue::operator[](unsigned int index){
  Node* temp = _head;
  int i;
  if (index >= _size) {
     while(index>=_size){
         int data = (_tail->_data/10)+(_head->_data/10);
         Node* newnode = new Node(data);
         _tail->_next = newnode;
         _tail = newnode;
         _size++;
     }
  }
  for (i = 0; i < index % _size; i++){
    temp = temp-> _next;
  }
  return temp-> _data;
}
---------------------------------------------------------
So then in the tester instead of:
for(i=0;Q.size();i++){
   cout<<Q[i]<<endl;
   Q[i] = Q[i] * 10;
  }

we have:
for(i=0;i<10;i++){
   cout<<Q[i]<<endl;
   Q[i] = Q[i] * 10;
  }
And it will continue add Nodes with valid data.
---------------------------------------------------------
Comments are welcome...

среда, 10 октября 2012 г.

Few questions were not clear for me, so I asked Fardad to clarify, maybe for somebody it will be usefull.
1)The user terminates editing by pressing ENTER, TAB, ESCAPE, UP, DOWN, PGUP, PGDN
How do I terminate it? by using system("pause"); ? and if user presses for example ENTER again he can continue typing?

2) If the user presses ESCAPE, your function aborts editing.
Does it mean that I am just returning string and cursor to it's original state?


Answers:

1) Termination happens but breaking the interface loop and returning the last key hit by user (int key).

2)
a) yes, you must do this by allocating memory to the size of the incoming string before editing begins and copying the content of str in it. Also you must create local variables holding the values of *strOffset and *curpos.
b) then make sure right before returning key at the end, you delete the allocated memory.
c) when  Escape is hit restore the value of str by copying back the data from allocated memory into str and setting the values of *strOffset and *curpos to their original values.