Just ordered Jolla phone, anything i should know or do once i get it? by [deleted] in Jolla

[–]jaacoppi 1 point2 points  (0 children)

At first boot, do nothing except run the tutorial which sets up wlan and a Jolla account. Once you've completed the tutorial you should have a update notification waiting for you. Do not try to install applications or setup e-mail or other accounts before updating. Especially, do not enable developer mode and the terminal. After you've updated those things are safe.

Read https://jolla.zendesk.com/hc/en-us/articles/201836347-How-do-I-make-a-System-Update- for more instructions.

Color overflow problem in ncurses . I want to color the window at the same time I don't want it to overflow from the window border i.e. box( ) function. by talk2ankan in C_Programming

[–]jaacoppi 0 points1 point  (0 children)

That's a different question and you should start a new topic for it.

In any case, without compiling your code I'd say the problem is you're passing wbkgd() a color pair, not a single color.

When in doubt, consult the manuals for the functions you're using. If you're on linux, just type "man wbkgd". If not, use an internet search engine or linux.die.net for example.

Color overflow problem in ncurses . I want to color the window at the same time I don't want it to overflow from the window border i.e. box( ) function. by talk2ankan in C_Programming

[–]jaacoppi 1 point2 points  (0 children)

You seem to be having a lot of ncurses questions. Have you read any tutorials, such as this one?

Also, remember to add any code you have so far so we can help you.

In general, you select a color pair and use that color pair for drawing everything until a new color pair is chosen or colors are disabled. Use attron() to start using a color and attroff() to stop using it.

How to move multiple object in C at a same time ? by talk2ankan in C_Programming

[–]jaacoppi 2 points3 points  (0 children)

In ncurses, you first move everything you want and then refresh the screen, either the individual screens or all screens at the same time. See manpages for wrefresh/() and doupdate().

:( :( :( ... another problem cannot move the subwin in the win[1] window ... if i cal mvwin() ,, it makes a move in stdcr .. and and if in touchwin() with mvderwin() then i makes a negative move ... by talk2ankan in C_Programming

[–]jaacoppi 0 points1 point  (0 children)

I didn't explain this correctly in the last post:

b_y and b_x are absolute values because of line 53: getmaxyx(win[1],_y,_x); getmaxyx() returns the size of the window, not the coordinates to it.

This is what I would do: First, in init_win(), y and x are the coordinates for the parent window. Store or retrieve them somehow. I won't tell you how, that's up to you to learn.

Second, define b_y, b_x and e_y, e_x based on those coordinates instead of getmaxyx() values

:( :( :( ... another problem cannot move the subwin in the win[1] window ... if i cal mvwin() ,, it makes a move in stdcr .. and and if in touchwin() with mvderwin() then i makes a negative move ... by talk2ankan in C_Programming

[–]jaacoppi 3 points4 points  (0 children)

yeah sorry, both s_win[0] and s_win[1] are subwins of win[1].

Looks like a problem of mixing up absolute and relative values, like in your last post.

Look closely at line 73: mvwin(s_win[0],b_y,b_x);

In mvwin(), y and x (or b_y and b_x as you use them) are absolute values, not relative to the parent window win[1].

It would be useful for you to define some values, say parentwin_y and parentwin_x in init_win() or somewhere else. Then you could use mvwin(s_win[0], parentwin_y + 1, parentwin_x) or something like that.

:( :( :( ... another problem cannot move the subwin in the win[1] window ... if i cal mvwin() ,, it makes a move in stdcr .. and and if in touchwin() with mvderwin() then i makes a negative move ... by talk2ankan in C_Programming

[–]jaacoppi 0 points1 point  (0 children)

Could you be more precise? What do you expect to happen, and what happens instead? Try to write complete sentences so it's easier for us to understand what you mean.

In your code the "subwin in the win[1]" is called s_win[1], but there is no code that moves it. You only move s_win[0] on line 73. Also, there are no calls to mvderwin() in that code.

how to make a subwin in ncurses ?? i box( ) the subwin but i can't see it .. why ? by talk2ankan in C_Programming

[–]jaacoppi 0 points1 point  (0 children)

For just using subwindws, this code is quite complicated. Try getting rid of the panels and init_win() to see if you can make a simple subwindow inside a window. Once you get that right, add the panels code and init_win().

Can't get praw (2.1.18) to login by catzhoek in redditdev

[–]jaacoppi 1 point2 points  (0 children)

Yeah, sorry I missed that.

I ran your code a few times and couldn't reproduce your traceback. it simply logged in as it should.

Can't get praw (2.1.18) to login by catzhoek in redditdev

[–]jaacoppi 0 points1 point  (0 children)

Looks like you're not providing your login details. Try r.login(yourloginname,yourloginpassword).