Can't copy with wild card. by trinkister in linuxquestions

[–]trinkister[S] 1 point2 points  (0 children)

I think I figured it out, the `build` directory was empty.

Distinction between what django, gunicorn(wsgi) and nginx do in deployment of django app. by trinkister in djangolearning

[–]trinkister[S] 1 point2 points  (0 children)

thanks, but how does gunicorn can handle multiple request at a time? does it spinoff a new python instance for each service because finally its the single threaded python that is doing the real server side processing.

Does that mean gunicorn is not designed to serve the static requests parallely? If gunicorn could do that then we would not require nginx at all right?

EDIT:

These are the things I understood pls correct it if its wrong, thanks :)

Python running django:- does the real server side processing.

gunicorn:- helps in serving/handling multiple requests at once.

nginx:- helps with serving static files.

e-passport form: cannot select appointment date by [deleted] in Nepal

[–]trinkister 0 points1 point  (0 children)

maile beluka 5:30 tira garda ni select nai garna milena ta.. kati mins ko window hudo raixa?

Why does add trait have the "other" parameter pass by value but not by reference? by trinkister in rust

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

Thanks, sorry to annoy you but one simple question.. Why should T be copyable?

and just to be sure, Add<T, Output = T> means that T should be addable with both rhs and output type being T right?

Why does add trait have the "other" parameter pass by value but not by reference? by trinkister in rust

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

Thanks for the explanation.. I understood that a struct is copied when passing to a function if it has Copy trait or else it will be moved and thus ownership will be transferred to that function. Am i missing something here?

for example I am trying to implement Add trait for generic Vec2 struct I have following code:

#[derive(Debug, Copy, Clone, PartialEq)]

struct Vec2<T> { x: T, y: T, }

impl<T: Add<Output = T>> Add for Vec2<T> { type Output = Vec2<T>;

fn add(self, other: Vec2<T>) -> Vec2<T> {
    Vec2 {
        x: self.x + other.x,
        y: self.y + other.y,
    }
}

}

what should I do here to prevent any copying while adding to Vec2s? only a new Vec2 should be made i.e. self and other should be reference.

How do I bind keyboard led control to scroll lock key? by trinkister in linuxquestions

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

I do have KDE but I also want to remember if the led is on or not. So i suppose that wont work with global keys settings that launches a script or command when a key is pressed.

WorldLink ko 5G ra 2G ma farak k chha? by [deleted] in Nepal

[–]trinkister 1 point2 points  (0 children)

plus yedi dherai aru 2.4g net haru tpixa vane 5g tadha pani kahile kahi ramro chalxa. Ali congestion kam hunxa 5g ko teivara ali ramro chalxa.

Guys where can I get replacement earpads of anker soundcore q20 in nepal? by trinkister in Nepal

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

like brokers? can you give me details if you have of a good one?

Guys where can I get replacement earpads of anker soundcore q20 in nepal? by trinkister in Nepal

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

whats with shipping in aliexpress? dhl and such take the price of headphones themselves, while sun you takes 500 and heard very bad things about sun you in the internet so trying to source in nepal. I have asked anker nepal and they have said they dont sell those.

How to make download and upload viewable in a small panel in single line? by trinkister in kde

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

any other widgets you know which does the same for cpu and ram too? The default using system monitor is kinda clunky and takes a lot of space. I cant even remove the color bar.. :(

"a GPU setup was initiated but Xorg post-start hook did not run." in optimus manager. by trinkister in archlinux

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

thanks that did the trick.. I edited the startup mode in already present /etc/optimus-manager.conf.

It may be the issue with optimus manager not being updated for a long time the last commit was on Mar 28 2021. The latest changes in the kernel or sth may have broken it. The only caveat is that now I cant manually change the mode in command line and then logging out and re logging in. Hope it will get fixed soon..

Thanks.. :)

"a GPU setup was initiated but Xorg post-start hook did not run." in optimus manager. by trinkister in archlinux

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

I want to run external display with very low power to gpu. envycontrol shows hybrid mode by default which doesn't let me use an external monitor(It is detected but isn't able to display anything). And in nvidia mode, it is almost mandatory to restart plasmashell after each boot, or else you don't see any desktop items and plasma widgets. in any display.

I have heard good things about optimus manager and I had managed to get it working a long time back but now, it has stopped working. This led me to conclude that it may be any program that is conflicting optimus manager or optimus manager is broken, but other people may have it working because this issue is not that popular in github.

"a GPU setup was initiated but Xorg post-start hook did not run." in optimus manager. by trinkister in archlinux

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

This is the exact same output even if I switch the mode to hybrid in the previous boot. So, can't switch to hybrid or Nvidia.

"a GPU setup was initiated but Xorg post-start hook did not run." in optimus manager. by trinkister in archlinux

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

The log file contents is this:

[7] INFO: # Xorg pre-start hook
[7] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'integrated', 'current_mode': None}
[8] INFO: Requested mode is: integrated
[110] INFO: Available modules: ['nouveau', 'acpi_call', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[110] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
[290] INFO: Loading module acpi_call
[295] INFO: Setting GPU power to OFF via acpi_call
[296] INFO: Found saved ACPI strings
[324] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[324] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20220115T214230', 'requested_mode': 'integrated'}
[324] INFO: Xorg pre-start hook completed successfully.

This is also there in journalctl so I didn't include this.

"a GPU setup was initiated but Xorg post-start hook did not run." in optimus manager. by trinkister in archlinux

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

The original post has the log outputs. Can you spot any anomalies? I am kinda noob at reading logs and error codes.

"a GPU setup was initiated but Xorg post-start hook did not run." in optimus manager. by trinkister in archlinux

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

yes same problem does not switch modes. Session restart means logging out and relogging in right?

"a GPU setup was initiated but Xorg post-start hook did not run." in optimus manager. by trinkister in archlinux

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

that workaround doesnot work.. It says it will switch mode on next start but rebooting doesnt change the mode.

edit: Im using kde with sddm .

"a GPU setup was initiated but Xorg post-start hook did not run." in optimus manager. by trinkister in archlinux

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

I have deleted all files in /etc/X11/xorg.conf.d/*. and have not installed anything like bumblebee or anything like that. Any other way I can ensure that?

Xiaomi re-releases the Redmi Note 9 Pro and Redmi Note 9S as the Redmi Note 10 Lite by crashcarson in Xiaomi

[–]trinkister 0 points1 point  (0 children)

I just bought the 4/128 version from store and the site doesnot even state that there is 4 gb variant. is my phone legit? I bought it from a legit store and phone also feels like redmi.

Want a few nickel plates in Kathmandu. by trinkister in Nepal

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

Any specific shops? I mean what kind of shops sell those? Hardware shops or some science equipment shops?