tag:blogger.com,1999:blog-34903521985182087812024-03-12T18:57:08.409-07:00seneca_stanislavStanislavhttp://www.blogger.com/profile/10761581328773850892noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-3490352198518208781.post-66281773636407960992014-05-06T12:24:00.002-07:002014-05-06T12:26:53.613-07:00Git assume unchanged files<div dir="ltr" style="text-align: left;" trbidi="on">
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.<br />
<br />
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.<br />
<br />
Luckily, Git has a command to assume that specific file is unchanged, however the file will contain all your changes.<br />
<br />
Now I can do it only once: <br />
<br />
<pre><code>git update-index --assume-unchanged </code>LoginPageViewMediator.as </pre>
<br />
and then file is not marked as changed anymore.<br />
<br />
If I actually decide that file needs to be changed and included to my commit - I can revert file to the default state:<br />
<br />
<pre><code>git update-index --no-assume-unchanged </code>LoginPageViewMediator.as </pre>
<pre> </pre>
<pre>Now, file is marked as modified and ready to be added to the submission.</pre>
<pre> </pre>
<pre>Also, if you want to see all the files that were marked with <code>--assume-unchanged.</code></pre>
<pre><code>Following command worked for me:</code></pre>
<pre><code> </code></pre>
<pre><code><span class="comment-copy">git ls-files -v | grep ^[a-z]</span></code></pre>
<pre><code>
</code></pre>
<pre><code>Hope this helps.</code></pre>
</div>
Stanislavhttp://www.blogger.com/profile/10761581328773850892noreply@blogger.com0tag:blogger.com,1999:blog-3490352198518208781.post-26581643894179659482014-02-04T07:21:00.000-08:002014-02-04T07:21:03.296-08:00First week at CDOT ! Hello BigBlueButton!<div dir="ltr" style="text-align: left;" trbidi="on">
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: <a href="http://bigbluebutton.org/">bigbluebutton.org</a><br />
<br />
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.<br />
<br />
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.<br />
<br />
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 <span class="st">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!</span><br />
<span class="st"><br /></span>
<span class="st">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 </span>colorPickerIsVisible="true", since it is invisible by default. </div>
Stanislavhttp://www.blogger.com/profile/10761581328773850892noreply@blogger.com0tag:blogger.com,1999:blog-3490352198518208781.post-81318676235369582282012-11-07T15:31:00.001-08:002012-11-07T15:33:46.242-08:00<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Challenge accepted :) </b><br />
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 <b>& sign</b>.<br />
I decided to go a bit further and I did my <b>operator[] </b>method able to add new Nodes to the end of the Queue if we have <b>index > size</b>.<br />
Here is the code<br />
int& Queue::operator[](unsigned int index){<br />
Node* temp = _head;<br />
int i;<br />
if (index >= _size) {<br />
while(index>=_size){<br />
int data = (_tail->_data/10)+(_head->_data/10);<br />
Node* newnode = new Node(data);<br />
_tail->_next = newnode;<br />
_tail = newnode;<br />
_size++;<br />
}<br />
}<br />
for (i = 0; i < index % _size; i++){<br />
temp = temp-> _next;<br />
}<br />
return temp-> _data;<br />
}<br />
---------------------------------------------------------<br />
So then in the tester instead of:<br />
for(i=0;Q.size();i++){<br />
cout<<Q[i]<<endl;<br />
Q[i] = Q[i] * 10;<br />
}<br />
<br />
we have:<br />
for(i=0;i<10;i++){<br />
cout<<Q[i]<<endl;<br />
Q[i] = Q[i] * 10;<br />
}<br />
And it will continue add <b>Nodes</b> with valid <b>data</b>.<br />
---------------------------------------------------------<br />
Comments are welcome...</div>
Stanislavhttp://www.blogger.com/profile/10761581328773850892noreply@blogger.com0tag:blogger.com,1999:blog-3490352198518208781.post-91342383390912246312012-10-10T12:47:00.000-07:002012-10-11T07:55:29.394-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
Few questions were not clear for me, so I asked Fardad to clarify, maybe for somebody it will be usefull.<br />
<span style="font-family: Tahoma; font-size: x-small;"><span dir="ltr" style="font-size: 10pt;"><b> 1)The user terminates editing by pressing ENTER, TAB, ESCAPE, UP, DOWN, PGUP, PGDN</b><br />
How do I terminate it? by using system("pause"); ? and if user presses for example <b>ENTER</b> again he can continue typing? <br />
<br />
<b>2)</b> <b>If the user presses ESCAPE, your function aborts editing. </b><b><br />
</b>Does it mean that I am just returning string and cursor to it's original state?</span></span><br />
<br />
<span style="font-family: Tahoma; font-size: x-small;"><span dir="ltr" style="font-size: 10pt;">Answers:</span></span><br />
<br />
<span style="font-family: Tahoma; font-size: x-small;"><span dir="ltr" style="font-size: 10pt;"><b>1)</b> Termination happens but breaking the interface loop and returning the last key hit by user (int key). <br />
<br />
<b>2) </b><br />
<b>a)</b> 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.<br />
<b>b)</b> then make sure right before returning key at the end, you delete the allocated memory.<br />
<b>c)</b> 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. </span></span></div>
Stanislavhttp://www.blogger.com/profile/10761581328773850892noreply@blogger.com0