I seems like the string in command is being cut off. The /serio2/speed is getting cut off for some reason. #codinghelp

I'm working on tool to allow you to easily change your Trackpoint settings on the Lenovo thinkpads. The little nipple. I'm writing it in C to help me learn the language more. I'm having a problem I can't quite put my paw on.

The code responsible for changing the setting is:

int set_nipple_speed(int speed) { if (speed <= 0) { printf("Invalid value %d speed must be greater than 0", speed); return 1; } char command[100]; char * path = get_trackpoint_path(); sprintf(command, "echo %d | sudo tee %s/serio2/speed", speed, path); return system(command); }
I'm getting:
tee: /sys/devices/platform/i8042/serio1: Is a directory 33 sh: 2: /serio2/speed: not found
Oh and theres a function being called to get the base path to get to the trackpoint settings:
char *get_trackpoint_path() { FILE *pipe_stream = popen("find /sys/devices/platform/i8042 -name name | xargs grep -Fl " "TrackPoint | sed 's/\\/input\\/input[0-9]*\\/name$//'", "r"); char path[2048]; if (pipe_stream == NULL) { printf("Failed to run command to find trackpoint path"); return NULL; } fgets(path, sizeof(path), pipe_stream); pclose(pipe_stream); char *path_ptr = path; return path_ptr; }
Would anyone be willing to help me
#debug this? I'm pretty new to C. Project is here #codinghelp

@pipe_dreams you have a zoo next door? thats cool! #codinghelp
I was able to finally find it! Here is where I found the answer! #codinghelp
What is the bash command: `command`?

The command command has no manual entry but help displays as follows: $ help command command: command [-pVv] command [arg ...] Execute a simple command or display information about commands. ...

Ask Ubuntu
Hey you #bashscripting dergs! I'm working on a shell script and I need help understanding what the command command does. I basically ran command ls is and it seems to just run ls. I have no man entry for this in Debian, and looking up, "what does the command command do" really confuses the search engine lol. Please help! #codinghelp

I'd like to make my pixel art site more mobile-responsive. A lot (if not all) the doll/art pages end up with content off to the right, so the viewer has to scroll side-to-side to see everything.

Right now, my art, blurbs, and base credits are in HTML tables. Is there any way to make it so that if it's being viewed in a narrow browser window, the table cells will stack?

I'm also open to suggestions of other ways to display my art that don't involve tables. I'm just a very old-school coder, so HTML and a bit of CSS is all I know. 😅 I'm just not sure what's possible right now!

 

#smallweb #indieweb #neocities #codinghelp #websitehelp #advicewanted #suggestionswelcome

✧ Nickle's Night Sky ✧

Anyone using OpenCode for coding with AI? I've been trying that for writing boring parts, like tests for functions...
What others think?

#openSource #programming #AI #codingHelp

Luyện tập Python, HTML và CSS trên FreeCodeCamp nhưng nhiều bước thất bại khiến mình bế tắc! Mong anh em chia sẻ tài liệu, khóa học hữu ích hoặc sách tham khảo chất lượng. Làm sao để học hiệu quả mà không lo âu? Bức xúc quá! 🛠️ #HọcLậpTrinh #TưVấnLậpTrình #Python #HTML #CSS #CodingHelp #TechCommunity

https://www.reddit.com/r/programming/comments/1qqc6f7/any_advice_because_this_is_annoying_the_outta_me/

I want to connect a LORA and a rassbery pi pico, what should I know when connecting them? ("friend" gifted the parts and i can't really ask them for help, nor have I been able to play with rasbeery pico-s much, I have childhood electronic board-basic level of practical understanding of electronics with high school physics theory-understanding)
Should I just give up or can I connect them? Mao?


#electronics #Raspberry-Pico #Raspberry-Pi #Raspberry-Pi-help #Raspberry-Pi-coding #coding #help #coding-help #electronics

**Greuon giúp ng цереineux hành động với google sheets!**
Đang tạo giao diện đăng nhập, cần hỗ trợ xác định vai trò Admin/Employee từ bảng Google Sheets (cột A: tên dùng, B: mật khẩu, C: vai trò). Giói年から Himmie giúp ạ!
#GoogleSheets #LoginSystem #AdminRole #EmployeeRole #CodingHelp #VietnameseTech

https://www.reddit.com/r/SideProject/comments/1oajwcz/help_me_ayudenme/