Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 327 328 [329] 330 331 ... 350

Author Topic: The Generic Computer Advice Thread  (Read 574673 times)

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4920 on: July 26, 2022, 08:20:02 am »

So, I've got a bunch of .doc files from work (about 20) that I need to swap a name out on (changing one employee's name for another). I had done this before with .txt documents so I ran the same thing with xargs and sed in the terminal.

This didn't work, as a doc file doesn't like that sort of thing, and it just turned the whole thing to wingdings. Since it was only 20 files and it was short notice, I brute force did it by hand. I'm not a big fan of that sort of thing, especially when I'm sure I could do it automatically through the terminal (or with a bit of python, surely).

Anyone know of how to do that? Everything I saw online was just about VBA, which isn't something I use.
(as in, some tools for bash or some useful libraries. python-docx is what I'm reading about right now and it seems...bad.)
« Last Edit: July 26, 2022, 08:44:53 am by delphonso »
Logged

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4921 on: July 26, 2022, 08:56:38 am »

It may depend upon which version of Word savefile you have, but because there isn't plain raw text in the save, but all kinds of formatting and markup hints, which is at least part-compressed but may leave some literal stuff 'open' anyway, your plaintext swap may have interfered with some formatting premise. Like "...and now we have 169 bytes of text, after which there's a new block of possible font-descriptors" which could go wrong if you s/Lucy Wu/Charles Henry Fotherington-Smythe, Jr./g (or vice-versa). Or it may hit the lazy compression algorithm, that declares plaintext bytes and refers back to them later (except now the reference is changed, data-munging.

Assuming the simplest answer wouldn't work (taking the Wingding document and reasserting that it's Arial/whatever, because only that changed and it's not a hotbed of now corrupted multi-font/multi-sized/multi-decorated text that needs more than a handful of global changes to somehow revert whatever you didn't mean to do with it), I think it might be best automated if you're using .DOCX format... Albeit that I personally avoid that for various reasons.

.DOCX and .XLSX, etc, are (from memory, can't check this) compressed by a common method (essentially .zip?) from a set of .XML resources. You may be able to extract the .docx into the component .XMLish file(s), box clever to make sure you only sed the necessary tag contents with your required substitution and repack the .XML into the .DOCX again.

If it's .DOC, it is a somewhat more proprietry format (though well studied) that you might need better file-object manipulation tools for (e.g. a Perl/Python/whatever module and then a very simple regexp between read/decode and encode/write stages, and that option also likely available for .DOCX if you're into Perl/Python/whatever already).

It depends how much time you'll spend to save, which you might not immediately know for sure and even thinking about that might make it far worse for you. I'd be tempted to take the hit of a known "open with Word, replace textA with textB, resave and close" process if it's not expected to be a daily task, though a batch-conversion would always be theoretically possible. ;)
Logged

delphonso

  • Bay Watcher
  • menaces with spikes of pine
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4922 on: July 26, 2022, 09:14:52 am »

Aye the points at the end are exactly it. I don't expect to do this more than once a year, but it's niggling me that I didn't do it programmatically, when I know I should be able to.

Yeah, reading more about it, it seems editing the XML is the way to go and repackaging it afterwards. Unfortunately the name itself is formatted and the xml translates that roughly to:

<w:t>S</w:t>
</w:r>
<w:r>
<w:t>tarver</w:t>

plus heaps of other tags for the font, color, and italicization, though it's only this name text that needs to be swapped. It's certainly possible. I'll talk to the rest of the teachers come the next school year and see if I can write something to do this for all of us, thus saving more time (cumulatively) than it would take me to learn enough to knock this out. 

LordBaal

  • Bay Watcher
  • System Lord and Hanslanda lees evil twin.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4923 on: July 30, 2022, 09:37:23 pm »

Hello fellas! Long time no see, i'm going crazy with this laptop. It boots to bios and can stay like that for hours just fine, but it will turn off the very second it tries to load any OS, even live linux. It simply shut off. Is not he hard disk, is not the RAM.... what else could be?
Logged
I'm curious as to how a tank would evolve. Would it climb out of the primordial ooze wiggling it's track-nubs, feeding on smaller jeeps before crawling onto the shore having evolved proper treds?
My ship exploded midflight, but all the shrapnel totally landed on Alpha Centauri before anyone else did.  Bow before me world leaders!

Schmaven

  • Bay Watcher
  • Abiding
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4924 on: July 30, 2022, 10:06:48 pm »

Hello fellas! Long time no see, i'm going crazy with this laptop. It boots to bios and can stay like that for hours just fine, but it will turn off the very second it tries to load any OS, even live linux. It simply shut off. Is not he hard disk, is not the RAM.... what else could be?

It could be any other component starting to fail really.  Cheapest next option would be the power supply.  If you're lucky, it's just a bad connection, and disconnecting/reconnecting everything from the PSU might fix it.  That worked for me once when I couldn't even get to the OS boot menu.  Next up in cost might be the motherboard, but if you were to try a new motherboard, I would advise upgrading to the more current CPU socket model.  AM5 might be dropped this autumn.  I'm sure a replacement CPU that fits your mobo socket wouldn't have to break the bank to test.  You might even be able to return it for a full refund if it doesn't fix your issue.  Or also if it does fix your issue, and then invest in a more powerful CPU option rather than a cheap test CPU. 
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4925 on: July 31, 2022, 02:30:25 am »

I would investigate the battery first.

It could be that the SMBUS charge controller in the battery is reporting "absurd" charge. (EG, cells are fully charged, but the charge controller thinks it is at 0%, which then triggers the OS to think that the battery is in CRITICAL_LOW state, which then triggers ACPI shutdown.)

Try booting with the battery removed?
Logged

BigD145

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4926 on: July 31, 2022, 12:19:59 pm »

It could be overheating. Clogged fan. Clogged heatsink fins.
Logged

LordBaal

  • Bay Watcher
  • System Lord and Hanslanda lees evil twin.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4927 on: August 03, 2022, 06:57:47 pm »

So this is what I've done so far:
- Checked the heat control system, it was dirty but no to the point of becoming a problem (have seen far worst), it wasn't clogged or anything. Still cleaned it and applied new thermal paste. No dice.
- Checked the disk. Crystal disks says the drive is in "caution" but personally have seen drives works for months or years in with such warnings. The drive is working so the problem is not here.
- Checked the ram in another laptop, worked fine. Tried to use another, working ram in the faulty laptop, got the same error of turning off when booting the OS. Tried in both RAM slots, same result.
- Tried booting without the battery, same old shutdown whenever it tries to load any OS.

It keeps shutting down whenever it tries to load any OS, be it a live linux distro, the OS in the hard drive or a windows installer. Maybe is something with the RAM bus that gives issues whenever the computer tries to load it up, have seen the time to shutdown varies from immediately to a few seconds up to something like 30 seconds or so.

I'm about to send route the work to an electrical engineer.
Logged
I'm curious as to how a tank would evolve. Would it climb out of the primordial ooze wiggling it's track-nubs, feeding on smaller jeeps before crawling onto the shore having evolved proper treds?
My ship exploded midflight, but all the shrapnel totally landed on Alpha Centauri before anyone else did.  Bow before me world leaders!

King Zultan

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4928 on: August 04, 2022, 03:21:58 am »

Sounds like it might be your motherboard.
Logged
The Lawyer opens a briefcase. It's full of lemons, the justice fruit only lawyers may touch.
Make sure not to step on any errant blood stains before we find our LIFE EXTINGUSHER.
but anyway, if you'll excuse me, I need to commit sebbaku.
Quote from: Leodanny
Can I have the sword when you’re done?

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4929 on: August 04, 2022, 04:10:05 am »

Try passing kernel options by doung a custom boot with grub, via the linux live disk.

powersave=off panic=0

Logged

heydude6

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4930 on: August 07, 2022, 12:32:22 am »

So, I don't know how much you guys know about graphics processing, but my computer has been suffering from a certain issue since Monday.

Basically, all of my anti-aliasing is gone. Whether it be in games, or just casually looking at the icons on my desktop, or text on the screen, everything is covered in jaggies. It's crazy to see just how much post-processing is applied to your computer, and it's even worse to see what happens when it's gone. (google refuses to share any info about this feature)

Thing is, this isn't the first time this has happened to my laptop. Last time it was caused by a faulty graphics card driver update which I was able to quickly revert, but I don't know what the cause of it is this time. I wasn't around when it happened. I let my younger cousin borrow my PC while I was gone and when I came back in the evening I immediately noticed the issue. The kid insists he didn't mess with anything so tracing back my steps isn't going to help much.


Anyway, I feel like I've already tried all of the sensible solutions. At this point all I'm looking for is a way to find proper diagnostics (Dx11 diagnostics say that there are no issues to be found). If there was a console window I could open up that would show a useful error message, I'd feel like I was making some progress. As of now, I don't even know if this is a hardware or software issue.
« Last Edit: August 07, 2022, 12:37:36 am by heydude6 »
Logged
Lets use the ancient naval art of training war parrots. No one will realize they have been boarded by space war parrots until it is to late!
You can fake being able to run on water. You can't fake looking cool when you break your foot on a door and hit your head on the floor.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4931 on: August 07, 2022, 01:37:10 am »

Insufficient data.

OS vers?
Graphics card make and model?

Etc.
Logged

heydude6

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4932 on: August 07, 2022, 12:16:20 pm »

Windows 10.

Nvida GeForce GTX 980M

Laptop is Asus Republic of Gamers G752VY

Do you really think this info can help?
Logged
Lets use the ancient naval art of training war parrots. No one will realize they have been boarded by space war parrots until it is to late!
You can fake being able to run on water. You can't fake looking cool when you break your foot on a door and hit your head on the floor.

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4933 on: August 07, 2022, 01:25:20 pm »

It can't hurt.

My first thought was that you'd changed from 24-bit true-colour to something with far less bit-depth, so that you were getting 'anti-aliasing', but only at a certain limit of possible mid-tones, but surely you'd notice the change to a more "ultra-websafe" pallette in other.

Yet I was wondering is if you can do a screenshot of the problems and view that screenshot on another device of yours (that's if you don't even care to share it) to see if the effect is carried across there or some strange post-post-processing enhancement setting that's actually trying to sharpen your image (badly?) at in the display rather than the initial video-composition.

I've seen a few strange things. Sometimes just a rogue tickbox/registry-entry setting, occasionally a slightly dodgy pin in a VGA cable! This is well before 2D/3D-acceleration GPUs started to redistribute more and more of the effort (and fault!) of getting the programmed intention into displayed reality and potentially introduces a totally different set of Heisenbugs.... Someone out there might know that this model of graphics card or even laptop has this sort of occasionaly twitchy-behaviour (or what some prankster could have changed, deliberately, deep in a reconfiguration wizard).
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4934 on: August 07, 2022, 01:41:25 pm »

Nvida GeForce GTX 980M

Have you looked at the Nvidia Control Panel settings?
Logged
Pages: 1 ... 327 328 [329] 330 331 ... 350