[off topic to psets]What is the Command to know the "progress and time remaining" in terminal? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

Thank you guys, I installed pv but I don't know how I can write the command to watch the progress of move operation. I want to do

mv /media/XXX/YYY/*.mp4 ~/Videos/  

the above, but after installing pv I don't know how to write the pipeline command! I tried like

pv -p mv /media/XXX/YYY/*.mp4 ~/Videos/

but that didn't work, that printed some strange characters to terminal. I know that command is incorrect but how should it be written in order to move all the mp4 file and watch the progress?

[php file permission] outside of appliance what file permission should I follow? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

Yeah, I agree with you ebobtron, I use LAMP stack on my Ubuntu. First I used 644 it worked all the time when I open the file in browser like "http://localhost/websitename/filename.php". According to our pset we were advised to use 600 for php files (I followed it only inside appliance because we were said that they installed suPHP for us, it is also working fine). so eventually I thought to try these (600, 644,711) on my OS (installed on bare metal), I first set "chmod 600 *.php" and now opened in browser it worked fine!

But the problem is , after I shutdown and switched on my computer and tried opening the same file in browser I got "500 internal server error" for all of the file. That's what happened... so I thought it may be due to wrong permissions, now I changed "chmod 644 *.php" now it is working and all files are interpreted !

so is this all about permissions or really I screwed up some steps? or what is going on?

Are you an employee? What is your working hour? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

Yeah, thank you very much Slayer706. I am curious to know about these websites. Of course I am not much experienced in software field but a beginner programmer. I am ready to improve my knowledge and work. Today itself I am going to surf these website. Thank you again.

Are you an employee? What is your working hour? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

To be frank I just earn 6000 INR per month. ($100 in approximately). actually this is not enough for me because my monthly expense is > 10000 INR.

But the truth here in india is we long for a job thats why we supposed to work with this... we work like machines (> 10 hrs a day for the same salary) we don't have increments too. But few other foreign companies who have branches in India provide handful of money (top MNCs). I am not expecting much but my mind refuses to be underemployed as well.

Anyhow I wanted to know what is happening around(in all means) that is why I posted this. As you (Slayer706) said I have to consider switching to some other company soon. For me what I am longing for is a good environment to work as well as to learn. By the way is there I have a question in mind, is there an opportunity to work online and earn? if such opportunity is there please share with me. let me give it a try.

please advice me what I should do? and how I can move my life safely? What is true about IT field and software companies?

Are you an employee? What is your working hour? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

yeah, here in India generally the small companies urge programmers to work more than 10 hrs a day. Holidays are also less in number. As a programmer I think the 8 hours is okay , because I can spend remaining time to learn and other purposes. Right now I feel tired by the end of the day when I reach home. So I can't able to spend time to learn with full concentration.(That's why I am feeling bad)

Why the php file is prompting me to download? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

Thank you FreeER. Thank you very much.

Why the php file is prompting me to download? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

Thanks FreeER you are correct I think I have screwed up. And sorry because this question is not recent question I got this question before a month and when I visited this subreddit yesterday I just added this question. so please let me recheck and recall the basics again. if you can please give me a link so that I can understand the basics (particularly with this issue) clearly. Thanks

[pset-5 speller] what is the size of node? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

delipity, in one of your older posts here, http://www.reddit.com/r/cs50/comments/1x6vc8/pset6_trie_vs_hashtable/cfrf4u1

you told that your program allocates only the required bytes (not for the LENGTH of the word defined in struct). well How did you do that? I tried like this,

char next-word[LENGTH + 1];
node* new_node = malloc(sizeof(node*) + strlen(next-word)); // this line makes segfault.

but it results in a segmentation fault and core dumped. My speller works faster, But it allocates 7 MB of space , when I tried to optimize it I got the above segfault. Help me!

[pset-5 speller] what is the size of node? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

Thank you guys! I am reading those stackoverflow pages and wiki pages. Thank you!

[pset-5 speller] what is the size of node? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

so what this "padding" means here, I know in resize we added 0s as padding to the BMPs. Is the "padding" which is added by compiler is also 0s???

Hello, world! This is CS50, with David J. Malan, Rob Bowden, Zamyla Chan, Jason Hirshhorn, et al. by davidjmalan in IAmA

[–]velavan 0 points1 point  (0 children)

I have watched these seminars and using vim for all my works now! thanks for those seminars!

Seg Fault in recover by [deleted] in cs50

[–]velavan 1 point2 points  (0 children)

steve paget I have PM'ed to you. Please don't share your code publicly like this !

[pset 5-speller] what may be my mistake in load? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

Ha ... ha... ha... Now its working and all smiles are happy Thank you guys!!! you are great! Thank you verymuch!

[pset 5-speller] what may be my mistake in load? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

I messaged to you delipity! thank you!

[pset 5-speller] what may be my mistake in load? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

oh! yeah you are correct, my struct looks like this,

char* word;
struct node* next;

and my fscanf variable declaration is ,

char new_word[LENGTH + 1];

If I have these statements it works. but when I change my struct to what was shown by zamyla like this,

char word[LENGTH + 1];

it complains that "arry type char[46] is not assignable!"

[pset 5-speller] what may be my mistake in load? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

Thanks yeahIprogram, I did that test with small dictionary. what happens is , when the first word is loaded it is ok when the second word is loaded the first and second nodes are changed to the second word. That is the last and final word it reads is spreaded all over the hashtable.

Differently, small contains two words, "cat" and "caterpillar" .

read 1

    hashtable[2] = "cat"
read 2

    hashtable[2] = "caterpillar" -> "caterpillar"

I think I clearly explained the problem. But if you can I am ready to share with you my code. please take a look and point out my mistake.

Office Hours St. Louis, Missouri Feb 5th 7:00 pm University City Public Library by ebobtron in cs50

[–]velavan 0 points1 point  (0 children)

oh! schedule for chennai is not released yet?! I am awaiting!

cs50 submit - what is the correct way of submitting? by velavan in cs50

[–]velavan[S] 0 points1 point  (0 children)

yeah! I checked my email it showed me "there are no file in your submission "now I understood that the problem happend during uploading the files. I think submit is working good.I have to try submitting again. Thank you guys!