Posts by jbaptperez • 311 points
11 posts
-
1
votes2
answers59
viewsA: Integer values on the terminal
You forgot to initialize the r! So the value of r is always indeterminate and depends on what you have in memory at the time of your allocation. Changes your startup: int x,y,r; in: int x,y,r=0;…
-
2
votes3
answers494
viewsA: Extract information from a.txt file
sed -r 's/[^ ]+:([^ ]+)/\1/g' arquivo.txt
-
5
votes1
answer3809
viewsA: Why use "git branch --unset-upstream"?
You have 2 options: 1/ Push to create the remote branch, then create the missing link: git push origin master 2/ Breaks the local connection between master and origin/master: git branch…
gitanswered jbaptperez 311 -
1
votes2
answers240
viewsA: String parse for PHP array
Should work: $string = "/dev/sda1 ext4 19620732 16936800 1664184\n" . "udev devtmpfs 10240 10240 0\n" . "tmpfs tmpfs 101232 96740 4492\n" . "tmpfs tmpfs 253080 253080 0\n" . "tmpfs tmpfs 5120 5120…
-
2
votes2
answers3965
viewsA: How do you "synchronize" a branch with a master before working on it?
First, save your branch (in case of any problem) during the following: git branch <branch_save> <branch> Try switching Rais from branch: git rebase master <branch> # OU # Se você…
-
1
votes1
answer414
viewsA: Recovering Deleted Project in Staged E-git
Git will not help you this time: what is not "committed" at least once cannot be recovered. However, Eclipse can save you: utilizes "local history" to recover removed files:…
-
3
votes1
answer2328
viewsA: How to delete an old Git commit?
If the commit that introduced the file is called <bad> (locates it with a git log --stat), reconstruct your history from the commit before <bad> (I assume you’re in the branch that…
-
0
votes1
answer65
viewsA: Virtual page - Frame allocation algorithm
I commented the code to you. The program looks for the first free bit of a table with 1 and 0. // A bitset of frames - used or free. u32int *frames; // Tabela de frames de 32 bits, tem que alocar…
-
0
votes1
answer53
viewsA: Help with GIT recovery
First, make a folder to re-create a deposit: mkdir repo mv .git repo cd repo Then delete empty files (coruptos) find .git -size 0 -delete Try a file system scan: git fsck If you have another…
-
2
votes2
answers275
viewsA: Avoid pushing a specific branch to the wrong remote
First, Configure the push: git config --global push.default simple Then use the "track" with your branch: git branch master --set-upstream-to=empresa/master git status # mostra conexão entre master…
gitanswered jbaptperez 311 -
1
votes1
answer368
viewsA: How to solve DIRTY_WORKTREE
Enter a shell until your Pository. Typo git status to view the files modified since the last commit. Typo git diff to see the differences if you want. 2 options: Commit to "clear" the Repository:…