Sunday, July 17, 2022

e-techbytes

e-techbytes


Recent Questions - Arqade

Posted: 16 Jul 2022 02:11 PM PDT

Recent Questions - Arqade


Stop Install Epic Game's Launcher from flickering on Linux

Posted: 15 Jul 2022 11:01 PM PDT

This is how I got the Epic Game's Launcher to work. I followed what was on the Manjaro forums: https://forum.manjaro.org/t/howto-installing-epic-games-and-other-games-via-wine-without-lutris-and-proton/92236

It shows using Wine Tricks: winetricks -q d3dcompiler_43 d3dcompiler_47 d3dx9 corefonts cjkfonts faudio

Then there are some common solutions for crashing games:

sudo pacman -S --needed glew lib32-dbus-glib lib32-freeglut lib32-glew lib32-gtk2 lib32-imlib2 lib32-libappindicator-gtk2 lib32-libcaca lib32-libcurl-compat lib32-libcurl-gnutls lib32-libdbusmenu-glib lib32-libdbusmenu-gtk2 lib32-libgcrypt lib32-libid3tag lib32-libidn11 lib32-libindicator-gtk2 lib32-libjpeg6-turbo lib32-libmikmod lib32-libmodplug lib32-libnm lib32-libpng12 lib32-librtmp0 lib32-libtheora lib32-libtiff lib32-libudev0-shim lib32-libvpx lib32-libwebp lib32-libwrap lib32-openssl lib32-pipewire lib32-sdl lib32-sdl2_image lib32-sdl2_mixer lib32-sdl2_ttf lib32-sdl_image lib32-sdl_mixer lib32-sdl_ttf lib32-smpeg libcurl-compat libcurl-gnutls libdbusmenu-gtk2 libgcrypt15 libidn11 libindicator-gtk2 libjpeg6-turbo libpng librtmp0 libtiff4 libudev0-shim libvpx libwrap openssl opusfile sdl2_image sdl2_mixer sdl2_ttf sdl_image sdl_mixer sdl_ttf smpeg  

Crash report in modded 1.8.9

Posted: 15 Jul 2022 10:12 PM PDT

After installing Schematica and LunatriusCore, my game is crashing with this crash report. Can someone help?

---- Minecraft Crash Report ----

WARNING: coremods are present: PatcherTweaker (Patcher-1.8.1 (1.8.9).jar) FMLLoadingPlugin (Scrollable Tooltips-1.4 (1.8.9).jar) Skytils On Top (Skytils-1.2.6.jar) SkyblockAddonsLoadingPlugin (SkyblockAddons-1.7.0-beta.3+7064-for-MC-1.8.9.jar) ModTweaker (Patcher-1.8.1 (1.8.9).jar) Contact their authors BEFORE contacting forge

// There are four lights!

Time: 7/15/22 11:08 AM Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderException: java.lang.OutOfMemoryError: Direct buffer memory at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:162) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:739) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:310) at net.minecraft.client.Minecraft.startGame(Minecraft.java:495) at net.minecraft.client.Minecraft.run(Minecraft.java:329) at net.minecraft.client.main.Main.main(SourceFile:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at gg.essential.loader.stage2.relaunch.Relaunch.relaunch(Relaunch.java:124) at gg.essential.loader.stage2.EssentialLoader.preloadEssential(EssentialLoader.java:145) at gg.essential.loader.stage2.EssentialLoader.loadPlatform(EssentialLoader.java:91) at gg.essential.loader.stage2.EssentialLoaderBase.load(EssentialLoaderBase.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at gg.essential.loader.stage1.EssentialLoaderBase.load(EssentialLoaderBase.java:110) at gg.essential.loader.stage1.EssentialSetupTweaker.(EssentialSetupTweaker.java:44) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at gg.essential.loader.stage0.EssentialSetupTweaker.loadStage1(EssentialSetupTweaker.java:53) at gg.essential.loader.stage0.EssentialSetupTweaker.(EssentialSetupTweaker.java:26) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:98) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) at org.multimc.EntryPoint.listen(EntryPoint.java:143) at org.multimc.EntryPoint.main(EntryPoint.java:34) Caused by: java.lang.OutOfMemoryError: Direct buffer memory at java.nio.Bits.reserveMemory(Unknown Source) at java.nio.DirectByteBuffer.(Unknown Source) at java.nio.ByteBuffer.allocateDirect(Unknown Source) at net.minecraft.client.renderer.GLAllocation.createDirectByteBuffer(SourceFile:37) at net.minecraft.client.renderer.WorldRenderer.(VertexBuffer.java:76) at net.minecraft.client.renderer.RegionRenderCacheBuilder.(SourceFile:18) at net.minecraft.client.renderer.chunk.ChunkRenderDispatcher.(ChunkRenderDispatcher.java:80) at net.minecraft.client.renderer.chunk.ChunkRenderDispatcher.(ChunkRenderDispatcher.java:50) at com.github.lunatrius.schematica.client.renderer.chunk.OverlayRenderDispatcher.(OverlayRenderDispatcher.java:14) at com.github.lunatrius.schematica.client.renderer.RenderSchematic.(RenderSchematic.java:99) at com.github.lunatrius.schematica.client.renderer.RenderSchematic.(RenderSchematic.java:68) at com.github.lunatrius.schematica.proxy.ClientProxy.init(ClientProxy.java:182) at com.github.lunatrius.schematica.Schematica.init(Schematica.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:560) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:737) ... 45 more

A detailed walkthrough of the error, its code path and all known details is as follows:

-- System Details -- Details: Minecraft Version: 1.8.9 Operating System: Windows 11 (amd64) version 10.0 Java Version: 1.8.0_321, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 2777534248 bytes (2648 MB) / 3747086336 bytes (3573 MB) up to 3817865216 bytes (3641 MB) JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms4096m -Xmx4096m IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.19 Powered by Forge 11.15.1.2318 Optifine OptiFine_1.8.9_HD_U_M5 19 mods loaded, 19 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

| State | ID                    | Version      | Source                                            |  | ----- | --------------------- | ------------ | ------------------------------------------------- |  | UCHI  | mcp                   | 9.19         | minecraft.jar                                     |  | UCHI  | FML                   | 8.0.99.99    | forge-1.8.9-11.15.1.2318-1.8.9-universal.jar      |  | UCHI  | Forge                 | 11.15.1.2318 | forge-1.8.9-11.15.1.2318-1.8.9-universal.jar      |  | UCHI  | essential             | 1.0.0        | Essential (forge_1.8.9).jar                       |  | UCHI  | Danker's Skyblock Mod | 1.8.6        | 1.8.9.Danker.s.Skyblock.Mod.-.1.8.6.jar           |  | UCHI  | apec                  | 1.10.1       | Apec-1.10.1.jar                                   |  | UCHI  | cowlection            | 1.8.9-0.14.0 | Cowlection-1.8.9-0.14.0.jar                       |  | UCHI  | dungeonrooms          | 3.3.1        | Dungeon_Rooms-3.3.1.jar                           |  | UCHI  | fw                    | 1.5.1        | FullscreenWindowed-1.10.2-1.5.1.jar               |  | UCHI  | hyblockrnganalyzer    | 1.7          | hyblockrnganalyzer-1.7.jar                        |  | UCHI  | LunatriusCore         | 1.1.2.32     | LunatriusCore-1.8.9-1.1.2.32-universal.jar        |  | UCHI  | notenoughupdates      | 2.0.0-REL    | NotEnoughUpdates-2.0.0.jar                        |  | UCHI  | patcher               | 1.8.1        | Patcher-1.8.1 (1.8.9).jar                         |  | UCHE  | Schematica            | 1.7.7.143    | Schematica-1.8.9-1.7.7.143-universal.jar          |  | UCHI  | text_overflow_scroll  | 1.4.0        | Scrollable Tooltips-1.4 (1.8.9).jar               |  | UCHI  | SimpleStats           | 1.5          | SimpleStats-1.5.jar                               |  | UCHI  | skyblockaddons        | 1.7.0-beta.3 | SkyblockAddons-1.7.0-beta.3+7064-for-MC-1.8.9.jar |  | UCHI  | skyblockcatia         | 1.3.2        | SkyBlockcatia-1.8.9-1.3.2.jar                     |  | UCHI  | skytils               | 1.2.6        | Skytils-1.2.6.jar                                 |    Loaded coremods (and transformers):   

PatcherTweaker (Patcher-1.8.1 (1.8.9).jar) club.sk1er.patcher.tweaker.ClassTransformer FMLLoadingPlugin (Scrollable Tooltips-1.4 (1.8.9).jar) club.sk1er.mods.scrollabletooltips.forge.ClassTransformer Skytils On Top (Skytils-1.2.6.jar) skytils.skytilsmod.asm.SkytilsTransformer SkyblockAddonsLoadingPlugin (SkyblockAddons-1.7.0-beta.3+7064-for-MC-1.8.9.jar) codes.biscuit.skyblockaddons.tweaker.SkyblockAddonsTransformer ModTweaker (Patcher-1.8.1 (1.8.9).jar) club.sk1er.patcher.tweaker.other.ModClassTransformer GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 472.47' Renderer: 'NVIDIA GeForce RTX 2060/PCIe/SSE2' Skytils Debug Info: {HasBetterFPS=false, BetterFPS Version=NONE, Disabled Start Checks=false} OptiFine Version: OptiFine_1.8.9_HD_U_M5 OptiFine Build: 20210124-163719 Render Distance Chunks: 16 Mipmaps: 4 Anisotropic Filtering: 1 Antialiasing: 0 Multitexture: false Shaders: null OpenGlVersion: 4.6.0 NVIDIA 472.47 OpenGlRenderer: NVIDIA GeForce RTX 2060/PCIe/SSE2 OpenGlVendor: NVIDIA Corporation CpuCount: 16

Blockers not working in hoppers

Posted: 15 Jul 2022 08:22 PM PDT

I've been creating a pretty large sorting system that uses a ton of hoppers. Part of it is re-naming an item to use as a blocker so that it isn't sorted. I have 3 floors of this, and the first floor and a half it worked beautifully, but suddenly for the rest of them it starts to sort the blockers. I've tried different names, different items, or restarting the game with no success.

How do I summon a wither skeleton without a weapon in Minecraft 1.16.5?

Posted: 15 Jul 2022 02:12 PM PDT

I'm trying to use commands to summon a wither skeleton without a sword using commands but can't figure out how to do it, does anyone know how?

Making a video game in GameMaker studio 2 [closed]

Posted: 15 Jul 2022 01:44 PM PDT

Ok so I dont know if thats the place where I should ask for help with this, the problem that I have is that I have no idea how to start it I open the engine and what do i inport sprites do I code the physics and collissions is there an order i have to follow in code? What should I focus on first?

Where do you find Lucas’s 2 outfit

Posted: 15 Jul 2022 12:15 PM PDT

Where can you find Lucas's outfit? I can't find it and I need it to complete the game

How to fix Assassins Creed from pinging dead servers/how to "reroute" the IP addresses of those servers?

Posted: 15 Jul 2022 02:15 PM PDT

Apparently the game pings these IP Addresses:

  • 216.98.48.18
  • 216.98.48.53
  • 216.98.48.57
  • 216.98.48.133
  • 216.98.48.134

Is there a way to make the game think that these IP addresses are alive? such as when my pc tries to ping one of these IP addresses, it'll ping localhost instead?

I've tried to edit the hosts file, but I'll only get timeouts when attempting to ping the mentioned addresses. I've also unplugged my ethernet cable which seems to fix the crashing, but that's quite inconvenient.

Which Minecraft Java version first included the Ender Dragon?

Posted: 15 Jul 2022 02:12 PM PDT

I've tried Googling for the answer, but all the answers are for Pocket Edition (1.0) or obviously wrong (1.9). The answer doesn't even seem to appear on the Fandom wiki.

What was the first version (beta or release) that contained the Ender Dragon as a boss you could fight?

One vehicle in place, can't be removed

Posted: 15 Jul 2022 04:01 PM PDT

I have the airport hanger for both Michael and Franklin. I stole the military jet for the first time with Michael but now, I'm wary, because in my hanger I have a vehicle that I can't remove. What do I do? I want to put the military jet there to save it and have it forever. This was while offline.

Disconnecting from Minecraft server with good connection

Posted: 15 Jul 2022 08:54 AM PDT

My friend has hosted a Minecraft server on Shockbyte but I cannot connect.

I have a decent internet connection. I have on average 137ms ping to the server, 43Mbps download and 10Mbps upload.

I'm getting error messages such as:

java
java.net.socketException:
Connection Reset Timed Out

All my friends can smoothly play on the server but I can't. I'm playing on 1.18.1 and my Java is the newest. I have also forwarded the port 25565 on my firewall but I don't know how to fix it.

What would be the easiest way to detect if a player breaks a block in Minecraft 1.16?

Posted: 15 Jul 2022 04:04 PM PDT

I want to add block breaking detection and right click detect to a datapack I'm working on. I want this to be multiplayer friendly and I need to know who broke the block.

To add right click detection is easy. I just have a scoreboard for using a carrot/fungi on a stick. Now, I want to add block break detection, but I also want to know where the event occurred as a part of the detection.

This is we're I'm stuck. I can use raycasting for location, but I don't know how to detect if there is a block that was broken. I can't use a bunch of scoreboards for each individual block. I don't know if I can use loot tables to add a player uuid to a special drop as nbt. Although for that method, it probably won't work because in that same datapack I have a loot table for each block already.

I have to have right click detection and block break detection both using a carrot/fungi on a stick. So using used pickaxe/other tool scoreboard won't work either. Raycasting also won't work since it isn't multiplayer friendly because you can't detect who broke the block.

If you have any questions or if any of this is unclear please comment below. Thanks for helping.

Enchanting non-enchantable items on MCPE 1.2.3 iOS [duplicate]

Posted: 15 Jul 2022 07:21 AM PDT

I know that there is the /enchant command, but it, as usual, only does armor and weapons and fishing rods, and my long-waited "Sticky the Stick" is unmakeable. Any suggestions on how to enchant any item without a special app? Commands only, please.

I have Xbox Live Gold; Will my son get gold deals with his own credit?

Posted: 15 Jul 2022 09:26 AM PDT

My son got an Xbox One for his birthday. Someone advised me to set up a Gold subscription in my own name and then a child account for him, so I could be in control of who does what (and also let his sister set up her own child account and share the benefits).

He has just received a Xbox gift card. If he redeems the code under his own child account will he still be able to take advantage of the gold deals or will he have to pay full price? If he buys the game under his account, will the games also work for other family members?

Perhaps I should just redeem the code under my own account and make all purchases for him?

Although he's still quite young, I'm also mindful that in a few years he might want to have an adult account on a new Xbox but still be able to play some of the old games he bought with his own credit.

Is it possible to settle the Boston Airport?

Posted: 15 Jul 2022 04:22 PM PDT

I've settled every settlement in the main Fallout 4 game. Except the Boston Airport. I can't seem to figure this one out. I can't craft a beacon radio here and it doesn't even give me an option to plant crops (food doesn't even show as a resource in the workshop interface). Just for reference, this is post

in case that makes a difference. I'd really like to 100% the settlement aspect of this game and the 0% staring at me from the Boston Airport is really grating on my nerves. Is there anyway to settle this place?

Z + Up arrow key doesn't work (Undertale)

Posted: 15 Jul 2022 03:43 PM PDT

I am trying to solve the piano puzzle in Undertale. Unfortunately, I can't get the up or left arrow keys to produce a note. (NOTE: I am holding them then pressing z) Does anyone know whats going on? I am on a Windows 8.1 Desktop.

Switching to Xbox One from Xbox 360

Posted: 15 Jul 2022 12:02 PM PDT

If I have moddered money on GTA V online Xbox 360 and I switch to the Xbox One, will I lose all of it and all the stuff I've spent it on as well? This includes cars, Pegasus vehicles, guns and property. If someone could tell me that would be great.

How does the time work?

Posted: 15 Jul 2022 07:15 PM PDT

Why is the dawn at 1000 and the dusk at 13000?

I tried looking it up on minecraft wiki but it didn't work, it kept going on about clocks. Whenever I put in the command time set day it says Set time to 1000. And when I put time set night, it says Set time to 13000. What is the system behind this?

Why are there files in my End and Nether regions?

Posted: 15 Jul 2022 03:00 PM PDT

In this world, I haven't visited the End or the Nether yet, so the /DIM and /DIM-1 folders have both been empty.

At some point today, after building a long rail line, I noticed that there is now a 12kb /region/r.1.1.mca in both folders, even though I haven't been to either dimension! The files are missing in my backup from yesterday, so I know they were just created.

This is a single-player map, so that precludes the possibility of another server user having visited and caused chunks to be generated.

Where did they come from? Why is Minecraft generating chunks for dimensions I haven't visited?

Is there a way to change the weather in Minecraft?

Posted: 15 Jul 2022 12:56 PM PDT

Is there a way to change the weather in Minecraft in Creative Mode? All it does is rain all the time. It's rained for three days. Is there a way, mods included, that can change it?

How to get my birthday present in Guild Wars?

Posted: 15 Jul 2022 02:23 PM PDT

My character gets 1 year old soonish. How do I get the birthday present?

OSCHINA 社区最新讨论话题

Posted: 16 Jul 2022 12:53 PM PDT

OSCHINA 社区最新讨论话题


小米11 MIUI13.0.5,折线图显示一片虚影

Posted: 16 Jul 2022 01:24 AM PDT

@ApacheECharts 你好,想跟你请教个问题:当y轴刻度值较大(因为数据较大)时,其中一些数据较小(小数 )时。用canvas和svg两种方式渲染,折线图 在小米手机上显示异常,其他机型正常,出现一片虚影。表现形式见图: option为: {"legend":{"show":false,"data":["自我复盘","区域优秀值","区域平均值"],"selected":{"name"...

Recent Questions - Server Fault

Posted: 16 Jul 2022 12:05 PM PDT

Recent Questions - Server Fault


Get Asterisk IVR inputs to Linphone user

Posted: 15 Jul 2022 07:40 PM PDT

Let's say someone creates an Interactive Voice Response (IVR) system using Asterisk, that prompts the caller to input his customer number using his dial pad, e.g. 1234.

How does one get this information to the internal user who picks up the phone? The user might use a standard VoIP/SIP client like Linphone.

DMARC reports - fail then pass, and "softfail"

Posted: 15 Jul 2022 07:24 PM PDT

Here are two records from reports, with the actual domain name of my client replaced with "example.com". In the first one, SPF is marked "fail" above under "policy_evaluated" and then "pass" below under auth_results. I find this confusing. This is email sent by a service the client pays for, so we do want these emails delivered if they are indeed legitimately coming from that service. Do I need to do more to have SPF set up for that service?

The second shows all failures (and the IP traces back to China, I believe, where we do not operate) so this should not be delivered. Why does Google mark this as "softfail" and not just "fail"?

  <record>        <row>           <source_ip>204.28.11.160</source_ip>          <count>1</count>          <policy_evaluated>              <disposition>none</disposition>           <dkim>pass</dkim>             <spf>fail</spf>         </policy_evaluated>         </row>        <identifiers>           <header_from>example.com</header_from>          </identifiers>        <auth_results>          <dkim>              <domain>example.com</domain>              <selector>sl1</selector>              <result>pass</result>           </dkim>           <spf>           <domain>bounces.salsalabs.org</domain>            <result>pass</result>           </spf>          </auth_results>     </record>       <record>      <row>        <source_ip>60.23.112.175</source_ip>        <count>1</count>        <policy_evaluated>          <disposition>none</disposition>          <dkim>fail</dkim>          <spf>fail</spf>        </policy_evaluated>      </row>      <identifiers>        <header_from>example.com</header_from>      </identifiers>      <auth_results>        <spf>          <domain>example.com</domain>          <result>softfail</result>        </spf>      </auth_results>    </record>  

How to backup GCP vm to local harddisk and reverse , easily?

Posted: 15 Jul 2022 07:15 PM PDT

How to backup Google Compute Engine VMs to my local pc harddisk and reverse ? Is there any good tools or need CLI command ? Please be more specific .

Thanks.

Linux Command to See Outbound Network Requests

Posted: 15 Jul 2022 06:25 PM PDT

Is there a linux command that summarizes outbound network requests?

I'm specifically interested in seeing what the git push command sends to github (headers, body, etc) without having to download something like wireshark.

How do I change which of my projects a call to the Google Programmable Search Engine/Element Paid API uses?

Posted: 15 Jul 2022 04:23 PM PDT

I am making calls to the Google Programmable Search Engine/Element Paid API googleapis.com/customsearch/v1. I want to change which project it refers to. What controls that? Does each project have a Search Engine key? Does each Search Engine key have a project? Should I create a new Search Engine?

Wifi 6E access point in Linux

Posted: 15 Jul 2022 02:56 PM PDT

Context: I'm looking to set up a 6 GHz (Wifi 6E) Access Point in Linux. I have two Intel AX210s (WiFi cards) on two computers.

nmcli only supports 2.4GHz + 5GHz

hostapd seems to support WiFi 6 but doesn't distinguish it from WiFi 6E, meaning the 6 GHz channels can't actually be used.

Linux has had support for WiFi 6E cards since the 5.11 kernel. Am I missing something here? How can I set up a 6 GHz AP on Linux?

Virsh command hangs when script runs in the background

Posted: 15 Jul 2022 02:44 PM PDT

I have a bash script which runs as a cronjob. This script runs several commands and one of them is the following virsh command:

/usr/bin/virsh list --all  

When I run this script in the terminal (as root) or as a cronjob (as root also) the virsh command works as expected and lists all the virtual machines.

During my testing and debugging of this script, I noticed that if I send the script to the background or if I send it to the background and then disown it, the script hangs indefinitely at the virsh command. Below I provide some more details.

To illustrate the issue, let's assume a simple script "test.bash":

[root@kvm-host]# cat test.bash  #!/bin/bash    /usr/bin/virsh list --all  

When I run the script test.bash in the foreground it works as expected:

[root@kvm-host]# bash -x test.bash  + /usr/bin/virsh list --all   Id   Name                    State  ----------------------------------------   27   slave1                  running   29   ubuntu_discourse        running   30   osticket                running   31   lubuntu_desktop         running   -    slave2                  shut off  

When I run the script test.bash in the background it hangs indefinitely at the virsh command:

[root@kvm-host]# bash test.bash 2>stderr &  [1] 1119722  [root@kvm-host]# ps aux | grep virsh | grep -v grep  root     1119723  0.0  0.0 442660 16012 pts/4    Tl   17:07   0:00 /usr/bin/virsh list --all    [1]+  Stopped                 bash test.bash 2> stderr  

If I send the script to the background and disown it, the script also hangs at the virsh command:

[root@kvm-host]# bash -x test.bash 2>stderr & disown  [1] 1119502  [root@kvm-host]# ps aux | grep virsh | grep -v grep  root     1119503  0.0  0.0 442656 15956 pts/4    Tl   17:05   0:00 /usr/bin/virsh list --all  

I have tried running the virsh command with -c qemu:///system and the behaviour is the same when I send the script test.bash to the background. As you can see above, I have also tried running the script without "bash -x". I have also tried running the script redirecting both stderr and stdout to /dev/null. Finally, I have also tried running the script without redirecting stderr or stdout to any file. The issue is the same in all these cases.

Is it possible to run the virsh command in the background as described? Any comments would be highly appreciated. Thank you!

Here are some details about my system:

[root@kvm-host]# cat /etc/redhat-release  Rocky Linux release 8.6 (Green Obsidian)    [root@kvm-host]# virsh -V  Virsh command line tool of libvirt 8.0.0  See web site at https://libvirt.org/    Compiled with support for:   Hypervisors: QEMU/KVM ESX Test   Networking: Remote Network Bridging Interface netcf Nwfilter   Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM RBD Gluster   Miscellaneous: Daemon Nodedev SELinux Secrets Debug DTrace Readline  

Stop yum-cron getting stuck holding yum lock

Posted: 15 Jul 2022 02:24 PM PDT

I'm running a bunch of CentOS 7 servers with yum-cron and yum is constantly getting locked.

Now and then I'll go to install something or manually run yum update and I'm almost always greeted with something like this:

# yum update  Loaded plugins: fastestmirror, langpacks  Existing lock /var/run/yum.pid: another copy is running as pid 14877.  Another app is currently holding the yum lock; waiting for it to exit...  The other application is: yum-cron      Memory : 443 M RSS (857 MB VSZ)      Started: Wed Jun 29 14:43:00 2022 - 16 day(s) 7:17:29 ago      State  : Sleeping, pid: 14877  

I know how to free it up when it gets locked like this - but how can I stop this from happening once and for all?

Replicating Loki Logs to a Central Instance

Posted: 15 Jul 2022 02:12 PM PDT

I have an embedded device, running (among other things) an InfluxDB and a Loki instance. This device is on the move: usually it is on its own without internet connectivity, but occasionally it has access to its home network. Inside this home network both metrics (InfluxDB) and logs (Loki) shall be transferred/replicated/mirrored onto a central instance.

For InfluxDB this is possible both in real time by edge data replication an retroactively in batches using a flux query.

How can I achieve this with Loki/Promtail/LogQL?

  1. (soft) real time streaming of all Loki content to a remote instance
  2. retroactively mirroring existing logged content to a remote instance

Service php8.0-fpm refuses to start

Posted: 15 Jul 2022 04:04 PM PDT

I was about to do some changes to the php.ini and when I checked the service I found out that is was in a failed state. Stopping and starting the service didn't do the trick. The most helpful log entry was this one from the php8.0-fpm.log file:

ERROR: fork() failed: Resource temporarily unavailable (11)  

At first I thought I hited some PID limit but:

❯ ps -eLf | wc -l  130    ❯ sysctl kernel.pid_max  kernel.pid_max = 32768  

So that is not the case.

I checked the php.ini of fpm but I couldn't find anything wrong.

Here is some output that might help(I searched for all them extensively but couldn't find any solution)

❯systemctl status -l php8.0-fpm  php8.0-fpm.service - The PHP 8.0 FastCGI Process Manager     Loaded: loaded (/lib/systemd/system/php8.0-fpm.service; enabled; vendor preset: enabled)     Active: failed (Result: protocol) since Thu 2022-07-14 23:07:24 CEST; 20min ago       Docs: man:php-fpm8.0(8)    Process: 6960 ExecStart=/usr/sbin/php-fpm8.0 --nodaemonize --fpm-config /etc/php/8.0/fpm/php-fpm.conf (code=exited, status=0/SUCCESS)    Process: 7126 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/8.0/fpm/pool.d/www.conf 80 (code=exited, status=0/SUCCESS)   Main PID: 6960 (code=exited, status=0/SUCCESS)  
❯ journalctl -b -u php8.0-fpm  -- Logs begin at Fri 2022-07-15 00:45:44 CEST, end at Fri 2022-07-15 21:56:46 CEST. --  Jul 15 xxxxxx systemd[1]: Starting The PHP 8.0 FastCGI Process Manager...  Jul 15 xxxxxx systemd[1]: php8.0-fpm.service: Failed with result 'protocol'.  Jul 15 xxxxxx systemd[1]: Failed to start The PHP 8.0 FastCGI Process Manager.  
❯cat php8.0-fpm.log  NOTICE: fpm is running, pid 1794  ERROR: fork() failed: Resource temporarily unavailable (11)  NOTICE: exiting, bye-bye!  
❯ php -v  PHP 8.0.20 (cli) (built: Jun 14 2022 10:25:42) ( NTS )  Copyright (c) The PHP Group  Zend Engine v4.0.20, Copyright (c) Zend Technologies      with Zend OPcache v8.0.20, Copyright (c), by Zend Technologies  

I am running Debian 10 and apache and no other php version is installed.

1 rewrite or internal redirection cycle while internally redirecting to "/en/index.html"

Posted: 15 Jul 2022 01:23 PM PDT

I want to host the Angular i18n website using the Nginx proxy.

As per the official Nginx configuration suggestion https://angular.io/guide/i18n-common-deploy#nginx-example, my app.conf file in the /etc/nginx/site-available directory is like

map $http_accept_language $accept_language {          ~*^de de;          ~*^fr fr;          ~*^en en;  }    server {      listen 80;      server_name i18n.example.io;      root /var/www/html/app/dist/app;        # Fallback to default language if no preference defined by browser      if ($accept_language ~ "^$") {          set $accept_language "en";      }        # Redirect "/" to Angular application in the preferred language of the browser      rewrite ^/$ /$accept_language permanent;        # Everything under the Angular application is always redirected to Angular in the      # correct language      location ~ ^/(fr|de|en) {          try_files $uri /$1/index.html?$args;      }  }  

But when I try to access my website http://i18n.example.com, it gives the following error in the error.log file

2022/07/15 20:19:15 [error] 16886#16886: *1 rewrite or internal redirection cycle while internally redirecting to "/en/index.html", client: xx.xxx.235.xx, server: i18n.example.io, request: "GET /en HTTP/1.1", host: "i18n.example.io"  

How to load balance between two VMs

Posted: 15 Jul 2022 01:16 PM PDT

I have two virtual machines running a flask application in each of them. These VMs are hosted on a hyper-v platform. I'd like to create a load balancer that'll act as the primary endpoint and the requests hitting it will be distributed among the VMs. I'm assuming that the load balancer would be hosted on another VM? Is there an open-source implementation for this? I couldn't get any handy tutorials for achieving this setup. Any help would be great

Stress Test Interpretation

Posted: 15 Jul 2022 05:35 PM PDT

I ran a basic stress test and am having trouble interpreting the results.

Setup

  • Super simple node.js API (returns a string for a GET request) deployed on heroku's free tier

  • Increased RPS until I started to see a lag in average response time (unfortunately the tool I was using didn't allow a p90, etc, just average)

  • Datadog integration for monitoring

While I did hit a threshold (2.5k rps) I started to see a slowdown, I didn't see anything in DataDog to indicate stress - RAM, CPU.

If it's not CPU or RAM, what is likely causing the bottleneck here? How can I tell whether vertical or horizontal scaling would be likely to help?

How to access the SVI of a switch through a IPSEC tunnel?

Posted: 15 Jul 2022 01:08 PM PDT

I'm adding a new router, firewall and switch to our brand new site, and I'm scratching my head with the configuration of the SVI.

In the other sites, there is 4 VLANs on the switches:

  • 1x VoIP (DECT) -> VLAN 8
  • 1x User_Wifi -> VLAN 126
  • 1x User_LAN -> VLAN 60
  • 1x Guest_Wifi -> VLAN 20

Those switches have 3 trunks going to the firewall:

  • 1x User_LAN (Gi1/0/1) -> letting pass VLAN 60
  • 1x VoIP (Gi1/0/2) -> letting pass VLAN 8
  • 1x Wifi for users (Gi1/0/24) -> letting pass VLAN 126 & 20

I manage those switches by giving the IP address of the VLAN 60, which is, afaik, not the best practice. On each port of those switches, the native VLAN is the VLAN 60.

What I want to achieve is to create a new VLAN (VLAN 2 for example) dedicated to the management of the router, the firewall and the switch. This VLAN will have the 192.168.69.0/24 subnet attached, and can be accessed through our site-to-site VPN.

What I've done is to create a new VLAN interface who has the IP 192.168.69.3, and I made every interface of the switch a member of this VLAN (switchport access 2).

But now the problem is that every interface has access to the VLAN 2, which is not what I want. I only want our IT team to access it, and the rest of the users to acces the VLAN 60. And I need to keep the native VLAN of the 1st trunk to be the VLAN 60.

Thinking about it at a physical level, might it be a good idea to dedicate a physical interface for the management VLAN? And just plug it into one of the firewall interfaces like this?

docker/podman container with public IPv6

Posted: 15 Jul 2022 07:41 PM PDT

I have got a server with IPv4 address and IPv6 /64 subnet (let's say 2001:db8::/64), both public. Server itself has the following IPv6 address: 2001:db8::1/64. The gateway is fe80::1 (which causes problems with docker/podman, because it's not in the same subnet).

My goal is to create docker/podman container (WWW server, for example) with its own public IPv6 (let's say 2001:db8::2/64). From my understanding, such a setup needs macvlan network. So the setup would look as follows:

picture1

I managed to partially fulfill this setup using bridge network and the following command:
sudo podman network create --subnet 2001:db8::/64 --ipv6 mynet
Container within this network was accessiable from Internet via correct IP (2001:db8::2), but its public IP (for http, ping etc.) was wrong - it was 2001:db8::1, which is totally understandable when using bridge network.

Things get complicated when I tried using macvlan, first problem was the gateway which needs to be set to fe80::1. docker refused to create such network with error "no matching subnet for gateway fe80::1". podman successfully create network using the following command:
sudo podman network create -d macvlan --subnet 2001:db8::/64 --gateway fe80::1 --ipv6 -o parent=eth0 mynet
Unfortunately, a container inside this network has no connectivity in any direction, even though it has correct IP and gateway specified.

Server is working on Ubuntu, with enabled IP routing in kernel.

Any ideas how this setup could be made would be much appreciated. Thanks.

Getting libssl abd libcrypto conflict warning while compiling php on RHEL 7.8

Posted: 15 Jul 2022 06:04 PM PDT

I m getting following warning messages while compiling php on RHEL7.8 I am able to successfully compile and install php but I am not sure what will be the side effect of these warnings. Is there any way to resolve these warning?

/usr/bin/ld: warning: libssl.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libssl.so.1.1  /usr/bin/ld: warning: libssl.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libssl.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libssl.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libssl.so.1.1  /usr/bin/ld: warning: libssl.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libssl.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libssl.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libssl.so.1.1  /usr/bin/ld: warning: libssl.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libssl.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1  /usr/bin/ld: warning: libcrypto.so.10, needed by //usr/lib64/libssh2.so.1, may conflict with libcrypto.so.1.1      #OpenSSL Installation    ./config --prefix=/usr/local/ssl shared  make  make test  make install      #Apache Installation    ./configure \  --prefix=/usr/local/apache2 \  --with-ssl=/usr/local/ssl \  --with-included-apr \  --with-mpm=prefork \  --enable-ssl \  --enable-modules=all \  --enable-mods-shared=most \  make  make install    #PHP Installation    './configure' \  '--prefix=/usr/local/php7' \  '--with-apxs2=/usr/local/apache2/bin/apxs' \  '--with-config-file-path=/usr/local/php7/conf' \  '--with-curl' \  '--with-kerberos' \  '--with-openssl=/usr/local/ssl' \  '--with-openssl-dir=/usr/local/ssl' \  '--with-zlib' \  '--with-zlib-dir=/lib64/' \  '--enable-bcmath' \  '--enable-ftp' \  '--enable-gd-native-ttf' \  '--enable-mbstring' \  '--enable-opcache' \  '--enable-pcntl' \  '--enable-pdo' \  '--enable-shared' \  '--enable-shmop' \  '--enable-soap' \  '--enable-sockets' \  '--enable-sysvshm' \  '--enable-xml' \  '--enable-zip' \  '--without-libzip' \  

ldd /usr/local/ssl/bin/openssl

linux-vdso.so.1 =>  (0x00007fff46493000)  libssl.so.1.1 => /usr/local/ssl/lib/libssl.so.1.1 (0x00007fc710c31000)  libcrypto.so.1.1 => /usr/local/ssl/lib/libcrypto.so.1.1 (0x00007fc710746000)  libdl.so.2 => /lib64/libdl.so.2 (0x00007fc710542000)  libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc710326000)  libc.so.6 => /lib64/libc.so.6 (0x00007fc70ff58000)  /lib64/ld-linux-x86-64.so.2 (0x00007fc710ec3000)  

ldd /usr/local/apache2/bin/httpd

linux-vdso.so.1 =>  (0x00007ffcea29e000)  libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fcb03f33000)  libaprutil-1.so.0 => /usr/local/apache2/lib/libaprutil-1.so.0 (0x00007fcb03d09000)  libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fcb03adf000)  libapr-1.so.0 => /usr/local/apache2/lib/libapr-1.so.0 (0x00007fcb038a4000)  libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fcb0369f000)  librt.so.1 => /lib64/librt.so.1 (0x00007fcb03497000)  libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fcb03260000)  libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcb03044000)  libdl.so.2 => /lib64/libdl.so.2 (0x00007fcb02e40000)  libc.so.6 => /lib64/libc.so.6 (0x00007fcb02a72000)  /lib64/ld-linux-x86-64.so.2 (0x00007fcb04195000)  libfreebl3.so => /lib64/libfreebl3.so (0x00007fcb0286f000)  

ldd /usr/local/apache2/modules/mod_ssl.so

linux-vdso.so.1 =>  (0x00007ffc2019d000)  libssl.so.1.1 => /usr/local/ssl/lib/libssl.so.1.1 (0x00007fb63e115000)  libcrypto.so.1.1 => /usr/local/ssl/lib/libcrypto.so.1.1 (0x00007fb63dc2a000)  libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fb63da25000)  librt.so.1 => /lib64/librt.so.1 (0x00007fb63d81d000)  libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fb63d5e6000)  libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb63d3ca000)  libdl.so.2 => /lib64/libdl.so.2 (0x00007fb63d1c6000)  libc.so.6 => /lib64/libc.so.6 (0x00007fb63cdf8000)  /lib64/ld-linux-x86-64.so.2 (0x00007fb63e5e4000)  libfreebl3.so => /lib64/libfreebl3.so (0x00007fb63cbf5000)    # ldd /usr/local/php7/bin/php    /lib64/ld-linux-x86-64.so.2 (0x00007ffadb8d3000)          libbz2.so.1 => /lib64/libbz2.so.1 (0x00007ffad4ed8000)          libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007ffad7d23000)          libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007ffad45dc000)          libcrypto.so.1.1 => /usr/local/ssl/lib/libcrypto.so.1.1 (0x00007ffad91a8000)          libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ffadb69c000)          libc.so.6 => /lib64/libc.so.6 (0x00007ffad742c000)          libcurl.so.4 => /lib64/libcurl.so.4 (0x00007ffad7ab9000)          libdl.so.2 => /lib64/libdl.so.2 (0x00007ffada34d000)          libfreebl3.so => /lib64/libfreebl3.so (0x00007ffad7229000)          libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007ffad77fa000)          libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007ffad8443000)          libidn.so.11 => /lib64/libidn.so.11 (0x00007ffad67a0000)          libifasf.so => /home/informix/lib/libifasf.so (0x00007ffadac28000)          libifcli.so => /home/informix/lib/cli/libifcli.so (0x00007ffadb2e3000)          libifdmr.so => /home/informix/lib/cli/libifdmr.so (0x00007ffadb0db000)          libifgen.so => /home/informix/lib/esql/libifgen.so (0x00007ffada9c6000)          libifgls.so => /home/informix/lib/esql/libifgls.so (0x00007ffada551000)          libifglx.so => /home/informix/lib/esql/libifglx.so (0x00007ffada14b000)          libifos.so => /home/informix/lib/esql/libifos.so (0x00007ffada7a4000)          libifsql.so => /home/informix/lib/esql/libifsql.so (0x00007ffadae87000)          libjpeg.so.62 => /lib64/libjpeg.so.62 (0x00007ffad9693000)          libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007ffad7f27000)          libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007ffad69d3000)          libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007ffad815a000)          libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007ffad6bd7000)          liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007ffad533d000)          libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007ffad50e8000)          liblzma.so.5 => /lib64/liblzma.so.5 (0x00007ffad6de7000)          libm.so.6 => /lib64/libm.so.6 (0x00007ffad8c14000)          libnsl.so.1 => /lib64/libnsl.so.1 (0x00007ffad89fa000)          libnspr4.so => /lib64/libnspr4.so (0x00007ffad554c000)          libnss3.so => /lib64/libnss3.so (0x00007ffad5dc3000)          libnssutil3.so => /lib64/libnssutil3.so (0x00007ffad5b93000)          libpcre.so.1 => /lib64/libpcre.so.1 (0x00007ffad415d000)          libplc4.so => /lib64/libplc4.so (0x00007ffad578a000)          libplds4.so => /lib64/libplds4.so (0x00007ffad598f000)      libpng15.so.15 => /lib64/libpng15.so.15 (0x00007ffad98e8000)          libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffad700d000)          libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ffad9d1b000)          librt.so.1 => /lib64/librt.so.1 (0x00007ffad9b13000)          libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007ffad43bf000)          libselinux.so.1 => /lib64/libselinux.so.1 (0x00007ffad4cb1000)          libsmime3.so => /lib64/libsmime3.so (0x00007ffad60f2000)          libssh2.so.1 => /lib64/libssh2.so.1 (0x00007ffad6573000)          libssl3.so => /lib64/libssl3.so (0x00007ffad631a000)          libssl.so.10 => /lib64/libssl.so.10 (0x00007ffad4a3f000)          libssl.so.1.1 => /usr/local/ssl/lib/libssl.so.1.1 (0x00007ffad8f16000)          libxml2.so.2 => /lib64/libxml2.so.2 (0x00007ffad8690000)          libz.so.1 => /lib64/libz.so.1 (0x00007ffad9f35000)          linux-vdso.so.1 =>  (0x00007fffe9bb3000)  

Win-Acme / Let's encrypt DNS txt validation?

Posted: 15 Jul 2022 02:38 PM PDT

How do I do the DNS txt record validation? There are simply no tutorial or any info whatsoever about it. I need to bypass regular validation mechanism cause it uses Amazon which is banned here. How do I generate a TXT record to add to GoDaddy? I use Win-Acme, I'm on IIS. There is this link talking about a token but of course and as usual, there is no reference or link to any tool, nor there is info on how to generate a token.

Windows Server 2019 Virtual NAT - VMs have no internet access

Posted: 15 Jul 2022 05:00 PM PDT

We have a Win Server 2019 (Version 1809, OS Build 17763.1282) with Hyper-V. We want to run a number of Ubuntu VMs using the internal NAT, so we don't need separate external IPs for each VM. The steps we're using are the ones we've seen many examples of across the internet:-

New-VMSwitch –SwitchName "NATSwitch" –SwitchType Internal  Get-NetAdapter (to lookup the index of the new "vEthernet (NATSwitch)" - which is 24)  New-NetIPAddress –IPAddress 14.0.0.1 -PrefixLength 24 -InterfaceIndex 24  New-NetNat –Name NATNetwork –InternalIPInterfaceAddressPrefix 14.0.0.0/24  

We set the properties for the VM network connection to use the NATSwitch, and then configure the VM to have static addresses - 14.0.0.1 for the gateway, and 14.0.0.2 for the VM itself. ie: /etc/netplan/00-installer-config.yaml looks like this:-

network:    version: 2    ethernets:      eth0:        addresses:          - 14.0.0.2/24        gateway4: 14.0.0.1        nameservers:            addresses: [14.0.0.1]  

So on the VM, ip route says:

default via 14.0.0.1 dev eth0 proto static  14.0.0.0/24 dev eth0 proto kernel scope link src 14.0.0.2  

and ip a includes:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000      link/ether 00:15:5d:1a:84:01 brd ff:ff:ff:ff:ff:ff      inet 14.0.0.2/24 brd 14.0.0.255 scope global eth0         valid_lft forever preferred_lft forever      inet6 fe80::215:5dff:fe1a:8401/64 scope link         valid_lft forever preferred_lft forever  

After booting the VM from Hyper-V, I can successfully SSH into 14.0.0.2, with Putty, but the VM does not have access to the internet, and it cannot ping 14.0.0.1. So it looks like the NAT is not doing anything to bridge the 14.0.0.x network to the main NIC on the server (which has internet access of course). From the 2019 Server, I can ping both 14.0.0.1 (itself=the gateway), and 14.0.0.2 (the VM).

We can get things to work with an external address, on our network, by creating an "external switch" in Hyper-V, connecting to that, and using DHCP to get an IP address from our domain controller for the VM's MAC address - but we'd prefer not to have to assign external IP adddresses for all the VMs.

Does anyone have any ideas what we're missing?

Unable to log in to FreeIPA web ui - "Login failed due to an unknown reason."

Posted: 15 Jul 2022 03:00 PM PDT

After Fedora server update, my Freeipa broke and I am not sure how to deal with it. Does anyone have some ideas what might be the issue?

I am unable to log in to web UI nor execute any IPA command.

$ journalctl

gssproxy[910]: gssproxy[951]: (OID: { 1 2 840 113554 1 2 2 }) Unspecified GSS failure.  Minor code may provide more information, No credentials cache found  gssproxy[951]: (OID: { 1 2 840 113554 1 2 2 }) Unspecified GSS failure.  Minor code may provide more information, No credentials cache found  gssproxy[910]: gssproxy[951]: (OID: { 1 2 840 113554 1 2 2 }) Unspecified GSS failure.  Minor code may provide more information, Preauthentication failed  gssproxy[951]: (OID: { 1 2 840 113554 1 2 2 }) Unspecified GSS failure.  Minor code may provide more information, Preauthentication failed  

$ cat /var/log/httpd/error_log

[suexec:notice] [pid 5529:tid 139897184471296] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)  [so:warn] [pid 5529:tid 139897184471296] AH01574: module proxy_module is already loaded, skipping  [so:warn] [pid 5529:tid 139897184471296] AH01574: module proxy_http_module is already loaded, skipping  [lbmethod_heartbeat:notice] [pid 5529:tid 139897184471296] AH02282: No slotmem from mod_heartmonitor  [mpm_event:notice] [pid 5529:tid 139897184471296] AH00489: Apache/2.4.39 (Fedora) OpenSSL/1.1.1c mod_wsgi/4.6.4 Python/3.7 3.9 mod_perl/2.0.10 Perl/v5.28.2 configured -- resuming normal operations  [core:notice] [pid 5529:tid 139897184471296] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'  [wsgi:error] [pid 5833:tid 139897184471296] ipa: INFO: *** PROCESS START ***  [wsgi:error] [pid 5837:tid 139897184471296] ipa: INFO: *** PROCESS START ***  [wsgi:error] [pid 5832:tid 139897184471296] ipa: INFO: *** PROCESS START ***  [wsgi:error] [pid 5839:tid 139897184471296] ipa: INFO: *** PROCESS START ***  [wsgi:error] [pid 5833:tid 139896787969792] [remote 10.0.1.8:36236] ipa: INFO: [jsonserver_i18n_messages] UNKNOWN: CCESS  [:warn] [pid 5842:tid 139896429713152] [client 10.0.1.8:36236] KRB5CCNAME file (/run/ipa/ccaches/admin@HOME.MYDOMAIN.COM) lookup .home.mydomain.com/ipa/ui/  [:warn] [pid 5841:tid 139896561800960] [client 10.0.1.8:36238] KRB5CCNAME file (/run/ipa/ccaches/admin@HOME.MYDOMAIN.COM) lookup .home.mydomain.com/ipa/ui/  [auth_gssapi:error] [pid 5840:tid 139896236779264] [client 10.0.1.10:47164] GSS ERROR gss_acquire_cred[_from]() failed to get lure.  Minor code may provide more information ( SPNEGO cannot find mechanisms to negotiate)]  [wsgi:error] [pid 5833:tid 139896787969792] [remote 10.0.1.8:36236] ipa: INFO: 401 Unauthorized: No session cookie found  

$ ipa-pkinit-manage status

PKINIT is enabled  The ipa-pkinit-manage command was successful  

$ kinit myuser

Password for myuser@HOME.MYDOMAIN.COM:   $ klist  Ticket cache: KEYRING:persistent:1907400001:krb_ccache_QYeLVmz  Default principal: myuser@HOME.MYDOMAIN.COM    Valid starting     Expires            Service principal  08/09/19 00:11:36  09/09/19 00:11:33  krbtgt/HOME.MYDOMAIN.COM@HOME.MYDOMAIN.COM  

$ ipa -v ping

ipa: DEBUG: trying https://$ ipaserver.home.mydomain.com/ipa/json  ipa: DEBUG: Created connection context.rpcclient_139944946411792  ipa: DEBUG: [try 1]: Forwarding 'schema' to json server 'https://$ ipaserver.home.mydomain.com/ipa/json'  ipa: DEBUG: New HTTP connection ($ ipaserver.home.mydomain.com)  ipa: DEBUG: HTTP connection destroyed ($ ipaserver.home.mydomain.com)  Traceback (most recent call last):    File "/usr/lib/python3.7/site-packages/ipaclient/remote_plugins/__init__.py", line 126, in get_package      plugins = api._remote_plugins  AttributeError: 'API' object has no attribute '_remote_plugins'    During handling of the above exception, another exception occurred:    Traceback (most recent call last):    File "/usr/lib/python3.7/site-packages/ipalib/rpc.py", line 649, in get_auth_info      response = self._sec_context.step()    File "</usr/local/lib/python3.7/site-packages/decorator.py:decorator-gen-15>", line 2, in step    File "/usr/lib64/python3.7/site-packages/gssapi/_utils.py", line 167, in check_last_err      return func(self, *args, **kwargs)    File "</usr/local/lib/python3.7/site-packages/decorator.py:decorator-gen-5>", line 2, in step    File "/usr/lib64/python3.7/site-packages/gssapi/_utils.py", line 127, in catch_and_return_token      return func(self, *args, **kwargs)    File "/usr/lib64/python3.7/site-packages/gssapi/sec_contexts.py", line 521, in step      return self._initiator_step(token=token)    File "/usr/lib64/python3.7/site-packages/gssapi/sec_contexts.py", line 542, in _initiator_step      token)    File "gssapi/raw/sec_contexts.pyx", line 244, in gssapi.raw.sec_contexts.init_sec_context  gssapi.raw.misc.GSSError: Major (851968): Unspecified GSS failure.  Minor code may provide more information, Minor (2529639053): No Kerberos credentials available (default cache: KEYRING:persistent:0)    During handling of the above exception, another exception occurred:    Traceback (most recent call last):    File "/usr/lib/python3.7/site-packages/ipalib/rpc.py", line 699, in single_request      self.get_auth_info()    File "/usr/lib/python3.7/site-packages/ipalib/rpc.py", line 651, in get_auth_info      self._handle_exception(e, service=service)    File "/usr/lib/python3.7/site-packages/ipalib/rpc.py", line 608, in _handle_exception      raise errors.CCacheError()  ipalib.errors.CCacheError: did not receive Kerberos credentials  ipa: DEBUG: Destroyed connection context.rpcclient_139944946411792  ipa: ERROR: did not receive Kerberos credentials  

$ kinit -k -t /var/lib/ipa/gssproxy/http.keytab HTTP/$

ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM  kinit: Preauthentication failed while getting initial credentials  

$ ipa -vv pwpolicy-show global_policy

ipa: DEBUG: failed to find session_cookie in persistent storage for principal 'admin@HOME.IBLVFX.COM'  ipa: DEBUG: trying https://$ ipaserver.home.mydomain.com/ipa/json  ipa: DEBUG: Created connection context.rpcclient_140652464016656  ipa: DEBUG: [try 1]: Forwarding 'schema' to json server 'https://$ ipaserver.home.mydomain.com/ipa/json'  ipa: DEBUG: New HTTP connection ($ ipaserver.home.mydomain.com)  ipa: DEBUG: HTTP connection destroyed ($ ipaserver.home.mydomain.com)  Traceback (most recent call last):    File "/usr/lib/python3.7/site-packages/ipaclient/remote_plugins/__init__.py", line 126, in get_package      plugins = api._remote_plugins  AttributeError: 'API' object has no attribute '_remote_plugins'    During handling of the above exception, another exception occurred:    Traceback (most recent call last):    File "/usr/lib/python3.7/site-packages/ipalib/rpc.py", line 726, in single_request      if not self._auth_complete(response):    File "/usr/lib/python3.7/site-packages/ipalib/rpc.py", line 679, in _auth_complete      message=u"No valid Negotiate header in server response")  ipalib.errors.KerberosError: No valid Negotiate header in server response  ipa: DEBUG: Destroyed connection context.rpcclient_140652464016656  ipa: ERROR: No valid Negotiate header in server response  

$ cat /var/log/krb5kdc.log

38:08 ipa (info): AS_REQ (8 etypes {aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 10.0.1.10: NEEDED_PREAUTH: admin@HOME.MYDOMAIN.COM for krbtgt/HOME.MYDOMAIN.COM@HOME.MYDOMAIN.COM, Additional pre-authentication required  38:08 ipa (info): closing down fd 11  38:11 ipa (info): AS_REQ (8 etypes {aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 10.0.1.10: ISSUE: authtime 1568572691, etypes {rep=aes256-cts-hmac-sha1-96(18), tkt=aes256-cts-hmac-sha1-96(18), ses=aes256-cts-hmac-sha1-96(18)}, admin@HOME.MYDOMAIN.COM for krbtgt/HOME.MYDOMAIN.COM@HOME.MYDOMAIN.COM  38:11 ipa (info): closing down fd 11  38:21 ipa (info): TGS_REQ (8 etypes {aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 10.0.1.10: ISSUE: authtime 1568572691, etypes {rep=aes256-cts-hmac-sha1-96(18), tkt=aes256-cts-hmac-sha1-96(18), ses=aes256-cts-hmac-sha1-96(18)}, admin@HOME.MYDOMAIN.COM for HTTP/ipa.home.mydomain.com@HOME.MYDOMAIN.COM  38:21 ipa (info): closing down fd 11  38:21 ipa (info): AS_REQ (8 etypes {aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 10.0.1.10: NEEDED_PREAUTH: HTTP/ipa.home.mydomain.com@HOME.MYDOMAIN.COM for krbtgt/HOME.MYDOMAIN.COM@HOME.MYDOMAIN.COM, Additional pre-authentication required  38:21 ipa (info): closing down fd 11  38:21 ipa (info): preauth (spake) verify failure: Preauthentication failed  38:21 ipa (info): AS_REQ (8 etypes {aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 10.0.1.10: PREAUTH_FAILED: HTTP/ipa.home.mydomain.com@HOME.MYDOMAIN.COM for krbtgt/HOME.MYDOMAIN.COM@HOME.MYDOMAIN.COM, Preauthentication failed  38:21 ipa (info): closing down fd 11  38:21 ipa (info): AS_REQ (8 etypes {aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 10.0.1.10: NEEDED_PREAUTH: HTTP/ipa.home.mydomain.com@HOME.MYDOMAIN.COM for krbtgt/HOME.MYDOMAIN.COM@HOME.MYDOMAIN.COM, Additional pre-authentication required  38:21 ipa (info): closing down fd 11  38:21 ipa (info): preauth (spake) verify failure: Preauthentication failed  38:21 ipa (info): AS_REQ (8 etypes {aes256-cts-hmac-sha1-96(18), aes128-cts-hmac-sha1-96(17), aes256-cts-hmac-sha384-192(20), aes128-cts-hmac-sha256-128(19), DEPRECATED:des3-cbc-sha1(16), DEPRECATED:arcfour-hmac(23), camellia128-cts-cmac(25), camellia256-cts-cmac(26)}) 10.0.1.10: PREAUTH_FAILED: HTTP/ipa.home.mydomain.com@HOME.MYDOMAIN.COM for krbtgt/HOME.MYDOMAIN.COM@HOME.MYDOMAIN.COM, Preauthentication failed  38:21 ipa (info): closing down fd 11  

$ kvno ldap/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM

ldap/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM: kvno = 2  

$ klist -kte

Keytab name: FILE:/etc/krb5.keytab  KVNO Timestamp           Principal  ---- ------------------- ------------------------------------------------------     2 2019-02-18 18:46:43 host/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (aes256-cts-hmac-sha1-96)      2 2019-02-18 18:46:43 host/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (aes128-cts-hmac-sha1-96)      2 2019-02-18 18:46:43 host/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (DEPRECATED:des3-cbc-sha1)      2 2019-02-18 18:46:43 host/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (DEPRECATED:arcfour-hmac)      2 2019-02-18 18:46:43 host/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (camellia128-cts-cmac)      2 2019-02-18 18:46:43 host/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (camellia256-cts-cmac)      4 2019-02-19 00:33:12 host/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (aes256-cts-hmac-sha1-96)      4 2019-02-19 00:33:12 host/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (aes128-cts-hmac-sha1-96)      1 2019-02-19 00:34:01 nfs/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (aes256-cts-hmac-sha1-96)      1 2019-02-19 00:34:01 nfs/ipaserver.home.mydomain.com@HOME.MYDOMAIN.COM (aes128-cts-hmac-sha1-96)   

Apache mod_cache cache misses

Posted: 15 Jul 2022 07:07 PM PDT

Somehow I can't get Apache's mod-cache to work as I want. I want it to cache a proxy call to my tomcat server which is a jsp file. The jsp file displays the current time so I can notice if I get a cached response or not.. This is my config:

        CacheQuickHandler off          CacheLock on          CacheLockPath /tmp/mod_cache-lock          CacheLockMaxAge 5          CacheIgnoreHeaders Set-Cookie           <Location /Kanzan/>            CacheEnable disk            CacheHeader on            CacheDefaultExpire 800            CacheMaxExpire 64000            CacheIgnoreNoLastMod On            #ExpiresActive on            #ExpiresDefault A60         </Location>             ProxyPreserveHost On         ProxyPass /Kanzan/ http://127.0.0.1:8080/Kanzan/         ProxyPassReverse /Kanzan/ http://127.0.0.1:8080/Kanzan/  

All this is inside my virtual host. I do log this in 5 different files,

cached-requests.log  cache.log  invalidated-requests.log  revalidated-requests.log  uncached-requests.log  

But only cache.log and the 2 last ones ever get content. In the last file I allways get

127.0.0.1 [21/sep/2018xxxxx +0200] "GET /Kanzan/testCache.jsp HTTP/1.1" 200 472  

and in cache.log I repeatedly get

cache miss: attempting entity save  

I get data saved to /var/cache/apache2/mod_cache_disk, but the the cache is never used as the time keeps updating on reload..

UPDATE:

Now I realize that the cache works... BUT ... it does not work the way I want it to. When I press refresh on my browser I want the cached value on the server to be returned if it hasn't expired.. instead, whenever I press refresh, the chache is updated! How do I make it work so that the cached value is not updating whenever a new user require this page??

Where are the logs for commands executed as root in AWS Linux 2 AMI?

Posted: 15 Jul 2022 01:07 PM PDT

Can't find them, there's no .bash_history. Also checked at /var/log/audit and /var/log/secure* Maybe they don't even exist or are disabled.

Thanks!

Reverse DNS does not match SMTP Banner - G Suite

Posted: 15 Jul 2022 01:07 PM PDT

I ran our domain through MXToolbox, and this error comes up several times: "Reverse DNS does not match SMTP Banner".

We use G Suite for our email and Cloudflare for DNS. Can I fix these warnings from MXtoolbox? Since I obviously don't run the SMTP server (Google does), I'm thinking these aren't fixable.

Thanks!

IIS - Wildcard HTTPS Binding with Centralized Certificate Store

Posted: 15 Jul 2022 05:00 PM PDT

Using IIS 10 and a Centralized Certificate Store, is it possible to have a wildcard https binding, so that any request coming in over HTTPS will automatically attempt to grab the relevant certificate from the centralized store?

SQL server 2016 express - Error 1067: The process terminated unexpectedly

Posted: 15 Jul 2022 04:02 PM PDT

I have installed SQL server 2016 on windows 10. The install process completed successfully except for the final step, which was a restart. Prior to this I had tried a couple of times and the process did not seem to get as far.

I manually restarted the computer and opened SSMS. In the object explorer windows I clicked "Connect object explorer"->"Server name" drop down->"Browse for more"->local servers. But no instances showed.

I opened services and saw this

enter image description here

I tried starting each one but got the message

Windows could not start SQL server (SQLSERVEREXPRESS) service on local computer. Error 1067: The process terminated unexpectedly

What have i tried???

  • reviewed and tried the action suggested here but it points to an 8 year old post referencing .net 1,2 and 3
  • and here which has some stuff that I tried, detailed below
  • looked for something in the event viewer but MSSQLSERVER doesnt show in the event viewer snippet of where I would expect to find MSSQL
  • looked for an error log file here C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS but couldn't find one
  • followed advice from this youtube video (but I could not find the regedit entry he was referring to)
  • I noticed sql server browser wasn't running so I started that and then tried to run SQL server, this had the exact same error and imminently stopped sql server browser running.

Extra info

My system is a home computer and a fresh install of windows 10

Please help i'm out of ideas (I'd also be interested in how to get rid of those extra instances of SQL server I can see running in services)

Edit

This log file snippet was pulled from:

C:\Program Files\Microsoft SQL Server\130

however there is also a

  • C:\Program Files\Microsoft SQL Server\140
  • C:\Program Files\Microsoft SQL Server\110
  • C:\Program Files\Microsoft SQL Server\100
  • C:\Program Files\Microsoft SQL Server\90
  • C:\Program Files\Microsoft SQL Server\80

but 130 is the only one that contains \setup bootstrap\log (So I assume this is correct). Its a big file. I believe the below line may be of interest

(01) 2017-09-26 21:59:34 Slp: Error: Action "SqlEngineConfigAction_install_confignonrc_Cpu64" failed during execution.

Trouble Shooting errdisabled Cause

Posted: 15 Jul 2022 03:00 PM PDT

I have a Cisco Catalyst 3850. I added a network module with 4 gbic for fiber connection. The module is not showing any lights on either side of the connection. After the searching the depths of the internet I found out that when adding a network module like I did I have to enable the media-type of sfp for those interfaces. This is what I have tried.

enable    conf t    int tengigabitethernet 1/1/1    media-type sfp  

it's not wanting to take this command. is this the right way to enable media-type sfp?

Show inventory command:

flcoffice_48m_01#show inv  NAME: "c3xxx Stack", DESCR: "c3xxx Stack"  PID: WS-C3850-48T      , VID: V04  , SN: FCW1905C178    NAME: "Switch 1", DESCR: "WS-C3850-48T"  PID: WS-C3850-48T      , VID: V04  , SN: FCW1905C178    NAME: "Switch 1 - Power Supply A", DESCR: "Switch 1 - Power Supply A"  PID: PWR-C1-350WAC     , VID: V01  , SN: LIT19221FY     NAME: "Switch 1 FRU Uplink Module 0", DESCR: "4x10G Uplink Module"  PID: C3850-NM-4-10G    , VID: V01  , SN: FOC19238XKL    NAME: "TenGigabitEthernet1/1/1", DESCR: "1000BaseSX SFP"  PID: GLC-SX-MMD         , VID: V01  , SN: FNS19270TD6        NAME: "TenGigabitEthernet1/1/2", DESCR: "1000BaseSX SFP"  PID: GLC-SX-MMD         , VID: V01  , SN: FNS19270TQ0        NAME: "TenGigabitEthernet1/1/3", DESCR: "1000BaseSX SFP"  PID: GLC-SX-MMD         , VID: V01  , SN: FNS1920059J     

here is the errdisable recovery command:

flcoffice_48m_01#show errdisable recovery   ErrDisable Reason            Timer Status  -----------------            --------------  arp-inspection               Disabled  bpduguard                    Disabled  channel-misconfig (STP)      Disabled  dhcp-rate-limit              Disabled  dtp-flap                     Disabled  gbic-invalid                 Disabled  inline-power                 Disabled  l2ptguard                    Disabled  link-flap                    Disabled  mac-limit                    Disabled  loopback                     Disabled  pagp-flap                    Disabled  port-mode-failure            Disabled  pppoe-ia-rate-limit          Disabled  psecure-violation            Disabled  security-violation           Disabled  sfp-config-mismatch          Disabled  storm-control                Disabled  udld                         Disabled  vmps                         Disabled  psp                          Disabled  Recovery command: "clear     Disabled  

IIS AppPools stop working when server joined to domain

Posted: 15 Jul 2022 07:07 PM PDT

I have a Windows 2012 R2 server that was configured with IIS, websites, and other supporting software while not connected to a domain. After the server was joined to a domain IIS AppPools crash when the a website is requested.

The problem I'm seeing is that any time I test a webpage I'm getting a 503 Service Unavailable error. For example, if I go to "http://localhost/dc/" I receive this error message:

Service Unavailable

I have found that the ApplicationPools are crashing when a webpage is requested. For example, the Default Web Site uses the application pool DefaultAppPool. If I make sure this is started and then request a webpage the DefaultAppPool is stopped.

Looking in the event viewer I can see this message: "The worker process failed to initialize correctly and therefore could not be started. The data is the error."

The data in the error is "80070005". Using MS's err.exe tool I looked this up and got this information back:

C:\Users\dhughes.figleaf\Desktop\Err>err.exe 80070005  # for hex 0x80070005 / decimal -2147024891 :    COR_E_UNAUTHORIZEDACCESS                                      corerror.h  # MessageText:  # Access is denied.    DIERR_OTHERAPPHASPRIO                                         dinput.h    DIERR_READONLY                                                dinput.h    DIERR_HANDLEEXISTS                                            dinput.h    DSERR_ACCESSDENIED                                            dsound.h    ecAccessDenied                                                ec.h    ecPropSecurityViolation                                       ec.h    MAPI_E_NO_ACCESS                                              mapicode.h    STIERR_READONLY                                               stierr.h    STIERR_NOTINITIALIZED                                         stierr.h    E_ACCESSDENIED                                                winerror.h  # General access denied error  # 11 matches found for "80070005"  

All I can tell from this is that this appears to be an access denied error. But I'm not sure what's being denied. I've made sure that the permissions on the inetpub directory are correct, but that didn't make a difference. I also added in the IIS Failed Request Tracing module and that didn't log anything at all.

I used process explorer to watch the w3svc process and saw that when I tried to access a webpage that the process would attempt to access configuration information under the windows directory but was denied access.

I've tried fiddling with permissions on the IIS config directory but I'm unable to make changes there and, frankly, it just feels wrong to have to do that.

Does anyone know where this error might be coming from or how I could further research it?

I've also tried:

  • Removing the server from the domain does resolve the IIS AppPool crashing problem, but the server needs to be connected to the domain.
  • I've tried uninstalling and reinstalling IIS. The problem persists.

Of possible relevance: This is a VM that was cloned from another VM.

Any help or suggestions would be greatly appreciated.

teaming with nmcli: bringing connection down and up again fails

Posted: 15 Jul 2022 06:04 PM PDT

On a centos 7 virtual box, I create a team like this:

nmcli connection add type team con-name team0  ifname veteam0  nmcli connection modify team0 team.config roundrobin.conf  [root@rhce1 ~]# cat roundrobin.conf  {          "device":               "team0",          "runner":               {"name": "roundrobin"},          "ports":                {"enp0s9": {}, "enp0s10": {}}  }  # add slave interfaces  nmcli connection add type team-slave con-name team0-port0 ifname enp0s9 master team0  nmcli connection add type team-slave con-name team0-port1 ifname enp0s10 master team0  

I now have the following connections:

[root@rhce1 ~]# nmcli con s  NAME                UUID                                  TYPE            DEVICE  team0               77869010-af1a-48a5-b10b-c05b3035837f  team            veteam0  team0-port1         99f54013-b20b-41d2-9661-d654b89870bd  802-3-ethernet  enp0s10  team0-port0         3f5e5924-f7f3-409a-b4cb-661904ddbf60  802-3-ethernet  enp0s9  Wired connection 1  acc2747d-9576-4ac5-a06a-d45d3a9a4ff4  802-3-ethernet  enp0s3  enp0s3              b4db7dd8-8735-4590-b12f-621d1003841a  802-3-ethernet  --  hostonly            8993c4c0-fa90-455d-ae83-d1a644c36886  802-3-ethernet  enp0s8  

This brings all interfaces up correctly:

[root@rhce1 ~]# nmcli dev status  DEVICE   TYPE      STATE      CONNECTION  enp0s10  ethernet  connected  team0-port1  enp0s3   ethernet  connected  Wired connection 1  enp0s8   ethernet  connected  hostonly  enp0s9   ethernet  connected  team0-port0  veteam0  team      connected  team0  lo       loopback  unmanaged  --  

and I get an IP from dhcp for my virtual team interface:

[root@rhce1 ~]# ip addr show veteam0  6: veteam0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP      link/ether 08:00:27:c7:15:f1 brd ff:ff:ff:ff:ff:ff      inet 10.23.23.104/24 brd 10.23.23.255 scope global dynamic veteam0         valid_lft 1073sec preferred_lft 1073sec      inet6 fe80::a00:27ff:fec7:15f1/64 scope link tentative dadfailed         valid_lft forever preferred_lft forever  

(I am aware that in a typical teaming use case, dhcp is probably not being used, but the main problem also exists with static IPs.)

Now I would like to be able to take the connection down, and later up again, without reboot:

[root@rhce1 ~]# nmcli con down team0  [root@rhce1 ~]# nmcli dev status  DEVICE   TYPE      STATE         CONNECTION  enp0s3   ethernet  connected     Wired connection 1  enp0s8   ethernet  connected     hostonly  enp0s10  ethernet  disconnected  --  enp0s9   ethernet  disconnected  --  lo       loopback  unmanaged     --  [root@rhce1 ~]# nmcli con up team0  Error: Device 'veteam0' is waiting for slaves before proceeding with activation.  [root@rhce1 ~]# nmcli dev status  DEVICE   TYPE      STATE                                  CONNECTION  enp0s3   ethernet  connected                              Wired connection 1  enp0s8   ethernet  connected                              hostonly  veteam0  team      connecting (getting IP configuration)  team0  enp0s10  ethernet  disconnected                           --  enp0s9   ethernet  unavailable                            --  lo       loopback  unmanaged                              -  

Now can get the team interface working half way, by connecting enp0s10 first:

[root@rhce1 ~]# nmcli dev connect enp0s10  Device 'enp0s10' successfully activated with '99f54013-b20b-41d2-9661-d654b89870bd'.  [root@rhce1 ~]# nmcli con up team0  Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7)  

But my team now just consists of one device:

[root@rhce1 ~]# nmcli dev st  DEVICE   TYPE      STATE        CONNECTION  enp0s10  ethernet  connected    team0-port1  enp0s3   ethernet  connected    Wired connection 1  enp0s8   ethernet  connected    hostonly  veteam0  team      connected    team0  enp0s9   ethernet  unavailable  --  lo       loopback  unmanaged    --  

My problem is, I currently do not see how to bring enp0s9 up without a reboot, since the device is in state "unavailable". Is my understanding correct, that I should be able to bring enp0s9 up without a reboot, just like enp0s10? To me it looks like there is something fishy with my device enp0s9, but I do not quite see what. I already tried assigning new MAC addresses, but no help. Also, using traditional ifcfg configuration, I can bring my team0 interface up and down without a problem.

Or could it be that my virtual switch (I am using the VirtualBox hostonly network) does not support (? - or needs to be configured to support) teaming?

EDIT: I tried building a team with just one slave. That worked, and I got the same behavior using enp0s9 and enp0s10 - I had to connect the device first bevor I could up the connection. Does this imply my virtual switch is disconnecting one device (which by chance is enp0s9 - but because its deterministic its always enp0s9)?

I don't really need to "Solve" this - I would be happy to give the bounty to someone who helps me understand what is going on.

LSI MegaRAID Expected Chip Temperature?

Posted: 15 Jul 2022 07:48 PM PDT

We recently built a replicating SAN array from 2x Dell R720XD's, we are using LSI 9270-8i MegaRAID cards with CacheCade 2.0, BBU and Write Back cache enabled.

Our cards are showing HUGE chip temperatures (97*C+ with NO disk activity!).

Our R720's are in auto temp management mode so the max exhaust temp is 50*C.

The MegaRAID cards are passively cooled and depend on good airflow to cool them - however is 97*C normal? - I have seen reference to 60*C max ambients but nothing for chip temp.

In-place upgrade from Windows Server 2012 Foundation to Windows Server 2012 Standard

Posted: 15 Jul 2022 04:51 PM PDT

I was attempting to upgrade from Windows server 2012 Foundation to Windows 2012 Standard without having to wipe and reinstall.

Is there an in-place upgrade path for these editions, and if there is, is there any documentation on it? The only one I could find pointed to an upgrade from Essentials to Standard, but didn't explicitly mention that that was the only possible upgrade.

I have exhausted my patience with Microsoft support who don't seem to have an answer for me!

This question is similar in requirement and error to (In-place upgrade from Windows Server Standard to Enterprise or Datacenter) but varies significantly by the Version and Edition.

What further info do you need to assist me in finding a solution?

Curl - download file range

Posted: 15 Jul 2022 04:02 PM PDT

I'm trying to download a range of files using curl.

curl -R -O -z /dir/file1.png http://somesite.com/file[1-100].png  

The problem I'm having is how to make the "file1.png" change to the approperate range # that is currently being downloaded. I have tried :

curl -R -O -z /dir/file#1.png http://somesite.com/file[1-100].png  

However, that breaks the "-z" option (only download if remote file is newer than a local copy) with the error :

Warning: Illegal date format for -z/--timecond (and not a file name).   Warning: Disabling time condition. See curl_getdate(3) for valid date syntax.  

How do I fix this?

Recent Questions - Stack Overflow

Posted: 16 Jul 2022 11:12 AM PDT

Recent Questions - Stack Overflow


Inserting NaN in specific positions in an array in Python

Posted: 16 Jul 2022 03:55 AM PDT

I have two arrays P and J. I want to insert C1=nan in P according to positions in J. But I am getting an error. I present the expected output.

import numpy as np  from  numpy import nan    J=np.array([[1, 4, 5, 7]])  P=np.array([[1.35961580e+03, 1.35179719e+03, 1.30676673e+03, 1.17569069e+02,          5.19255443e+00, 5.19255443e+00, 5.19255443e+00, 1.00000000e-09]])  C1=nan    P=np.insert(P,J,[C1],axis=1)  print("Pnew =",[P])  

The error is

in <module>      P=np.insert(P,J,[C1],axis=1)      File "<__array_function__ internals>", line 5, in insert      File "C:\Users\USER\anaconda3\lib\site-packages\numpy\lib\function_base.py", line 4626, in insert      raise ValueError(    ValueError: index array argument obj to insert must be one dimensional or scalar  

The expected output is

array([[1.35961580e+03, nan, 1.35179719e+03, 1.30676673e+03, nan, nan, 1.17569069e+02,          nan, 5.19255443e+00, 5.19255443e+00, 5.19255443e+00, 1.00000000e-09]])  

How to get a value from an Html page?

Posted: 16 Jul 2022 03:55 AM PDT

In this portion of code of an Amazon scraper program that only checks the price of an item, i get an error saying TypeError: object of type 'Response' has no len() , how to solve this? I simply want to get the value from the id="corePriceDisplay_desktop_feature_div") , here is the portion of code:

 headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}   url_the_last_of_us = "https://www.amazon.it/Last-Us-Parte-Remake-PS5/dp/B0B3X2N4PR/ref=sr_1_1?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=236V6E1BSSZMO&keywords=the+last+of+us+ps5&qid=1657964276&sprefix=the+last+of+us+ps5%2Caps%2C133&sr=8-1"   apri_sito = requests.get(url_the_last_of_us, headers=headers)   soup = bs4.BeautifulSoup(apri_sito, "html.parser")   prezzo_tlou = soup.find(id="corePriceDisplay_desktop_feature_div").get_text()  

And i imported these libraries:

import bs4  import urllib.request  import requests  

Cannot resolve method 'getStackTrace' in 'ExceptionUtils' error

Posted: 16 Jul 2022 03:55 AM PDT

I am trying to build a global exception class and followed this example.

@Slf4j(topic = "GLOBAL_EXCEPTION_HANDLER")  @RestControllerAdvice  public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {        // code omitted        private ResponseEntity<Object> buildErrorResponse(Exception exception,                                                        String message,                                                        HttpStatus httpStatus,                                                        WebRequest request) {          ErrorResponse errorResponse = new ErrorResponse(httpStatus.value(), message);          if (printStackTrace && isTraceOn(request)) {              errorResponse.setStackTrace(ExceptionUtils.getStackTrace(exception));//!          }          return ResponseEntity.status(httpStatus).body(errorResponse);      }  }  

However, the errorResponse.setStackTrace(ExceptionUtils.getStackTrace(exception)); line gives "Cannot resolve method 'getStackTrace' in 'ExceptionUtils'" error. I checked related maven references and there is nothing missed in my project. May it be related to the following library that is inferred when I mouse over ExceptionUtils ?

org.apache.tomcat.util  Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.64 (tomcat-embed-core-9.0.64.jar)  

How to solve "dbt: error unrecognised arguments: --schema"?

Posted: 16 Jul 2022 03:55 AM PDT

Here I am using windows laptop with python version 3.10.4 and dbt version 1.1.1 while running this command '''dbt test --schema --models'''in cmd I am getting error as '''dbt: error: unrecognized arguments: --schema'''

Why npm run dev command is showing error cannot find module '. /dist/rx'

Posted: 16 Jul 2022 03:55 AM PDT

C:\Users\sharm\codeweb\eth-to-do-list>npm run dev npm WARN config global --global, --local are deprecated. Use --location=global instead.

eth-to-do-list@1.0.0 dev lite-server

node:internal/modules/cjs/loader:936 throw err; ^

Error: Cannot find module './dist/rx' Require stack:

  • C:\Users\sharm\codeweb\eth-to-do-list\node_modules\rx\index.js
  • C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\file-watcher.js
  • C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\browser-sync.js
  • C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\index.js
  • C:\Users\sharm\codeweb\eth-to-do-list\node_modules\lite-server\lib\lite-server.js
  • C:\Users\sharm\codeweb\eth-to-do-list\node_modules\lite-server\bin\lite-server at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (C:\Users\sharm\codeweb\eth-to-do-list\node_modules\rx\index.js:1:10) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\sharm\codeweb\eth-to-do-list\node_modules\rx\index.js', 'C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\file-watcher.js', 'C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\browser-sync.js', 'C:\Users\sharm\codeweb\eth-to-do-list\node_modules\browser-sync\dist\index.js', 'C:\Users\sharm\codeweb\eth-to-do-list\node_modules\lite-server\lib\lite-server.js', 'C:\Users\sharm\codeweb\eth-to-do-list\node_modules\lite-server\bin\lite-server' ] }

Pass AWS authorizer policy context values to .net 6 minimal api

Posted: 16 Jul 2022 03:54 AM PDT

I have a scenerio that, I need to send custom headers from the api gateway after successfully authorised using lambda authorizer.

From authorizer, i will be sending the json policy return with the context json key value pair as well.

My question is, now i need to pass the context key value pair as custom headers to the minimal api from the api gateway.

Can you please suggest me how to achieve this, since iam started learning AWS a month ago and working on the same. It will he helpful if I get some suggestions from the people who worked on these scenarios before.

Note : Lambda function is deployed with .net 6 minimal api and api gate resources call the deployed lambda

Api gateway resources are lambda proxy enabled in lamda integration part.

wrapper emitted() not working in vue test utils composition api

Posted: 16 Jul 2022 03:54 AM PDT

I am trying to make a simple test to check that the button is emitting an event called "click" every time it is detected, the problem is that when I use wrapper.emitted('click') to validate that it is receiving it, it always arrives as an empty object... I don't know what I may be doing wrong.

Current versions: Vue: 3.2.31 Vitest: 0.7.12 Vite: 2.8.6 Vue/test-utils: 2.0.0-rc.17

<template>    <button      class="eci-button"      :disabled="props.disabled"      @click="handleClick"    >      {{ props.label }}    </button>  </template>    <script setup lang="ts">  /* Interfaces and types */  interface Props {    label: string    disabled?: boolean  }    /* Props */  const props = withDefaults(defineProps<Props>(), {    disabled: false  })    /* Events */  const emit =    defineEmits<{ (e: 'click'): void }>()    /* Methods */  const handleClick = () => {    emit('click')  }  </script>    <style lang="scss" src="./Button.scss"></style>  

Test

test('should render and emit event at click', async () => {      const label = 'Siguiente'        const wrapper = mount(Button, {        props: {          label        }      })        wrapper.trigger('click')        expect(wrapper.emitted()).toHaveProperty('click')    })  

Result

enter image description here

What data model to use for Blazor tables

Posted: 16 Jul 2022 03:54 AM PDT

I am building a .Net 6 Blazor web app. I needs to display lots of html tables with data. For example I need tables that look like this:

       |Jul 17 | Jul 16  | Jul 15  --------------------------------- . . .  Hour 1 | 11.213 | 123.23 | 123.54  Hour 2 | 12.234 | 234.45 | 54.34  .  .  .  

Code:

I want to display a lot of tabular data and I would like to be able to compute new tabular data based on the ones I already have, like calculating averages of an existing "table" models rows.

I considered having a data structure like this:

public class DataTable  {      public DataTable(Dictionary<string, Dictionary<string, decimal?>>? values)      {          Values = values ?? new Dictionary<string, Dictionary<string, decimal?>>();      }        public Dictionary<string, Dictionary<string, decimal?>>? Values { get; set; }  }  

Questions:

  • Is this a good approach?
  • How can I store optional row and column headers?
  • What if I want to create a table with strings? I can't restrict extension methods for a generic class to "number" types, so it seems to no be good design.

PTB (PythonTelegramBot) v20: upload file to S3

Posted: 16 Jul 2022 03:54 AM PDT

I need to upload the file that I receive from the user in the bot to the S3 remote storage. The bot works asynchronously, and aioboto3, as well as aioboto3, have a non-asynchronous method for uploading files. So I get the file, upload it, and create a process to upload to the server using Python Multiprocessing. However, I can't get the download status. If I wait for the download result using process.join(), it will block the execution flow. What are the options for downloading the file in this case?

Javascript Canvas Viewport Camera for Top down RPG game

Posted: 16 Jul 2022 03:53 AM PDT

I've gone over most other posts about this subject. It seems that, everyone, has their own unique problem for their own unique implementation of the "Canvas topdown game". That makes it really hard finding a solution for your problem without refactoring your whole code.

So hopefully you guys will be able to help me this time.

Simple game (so far) - utilizing Vue3 btw but that's besides the point - most of the code is just Vanilla stuff.

Simple topdown map. X and Y Axis

What I'm doing in my implementation is taking a PNG I've created with the Tiled application

Zoomed in by about 400% - drawing it with ctx.drawImage

then I'm also setting boundaries

and then drawing the player

what I'm doing now is adding a "force" value to the x and y position on key pressed (WASD) Which means the character moves on the map and collision detection works what I want is the map to draw x amount of pixels based on where the character is positioned WITHOUT moving the map since I'm already implementing some SocketIO code to make this multiplayer

I'm really really lost here, not sure what I should be doing to make the map draw a viewport....

I hope some of this makes sense

Some code

function create() {          const canvas: HTMLCanvasElement = document.getElementById("game") as HTMLCanvasElement;          if (!canvas) return console.error("canvas is undefined");          const ctx: CanvasRenderingContext2D = canvas.getContext("2d") as CanvasRenderingContext2D;          ctx.imageSmoothingEnabled = false;          initializeGameWindow(canvas, ctx);          setEvents(canvas, ctx);          const playerSpriteWidth = 192;          const playerSpriteHeight = 68;          const spriteFrames = 4;          background = new Sprite();          player = new Sprite();          update(canvas, ctx);      }        function update(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D) {          window.requestAnimationFrame(() => update(canvas, ctx));          drawGame(canvas, ctx);      }        function drawGame(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D) {          background.draw(ctx);          boundaries.forEach((boundary) => {              boundary.draw(ctx);          });          player.value.draw(ctx);          let moving: boolean = true;          player.value.moving = false;          if (keys.w.pressed && lastKey.value === "w") {              player.value.moving = true;              player.value.image = player.value.sprites.up;              for (let i = 0; i < boundaries.length; i++) {                  if (                      rectengularCollision(player.value, {                          ...boundaries[i],                          position: { x: boundaries[i].position.x, y: boundaries[i].position.y + Sprite.force },                      })                  ) {                      moving = false;                      break;                  }              }              if (!moving) return;              player.value.position.y -= Sprite.force;                        } else if (keys.a.pressed && lastKey.value === "a") {              player.value.moving = true;              player.value.image = player.value.sprites.left;              for (let i = 0; i < boundaries.length; i++) {                  if (                      rectengularCollision(player.value, {                          ...boundaries[i],                          position: { x: boundaries[i].position.x + Sprite.force, y: boundaries[i].position.y },                      })                  ) {                      moving = false;                      break;                  }              }              if (!moving) return;              player.value.position.x -= Sprite.force;                        } else if (keys.s.pressed && lastKey.value === "s") {              player.value.moving = true;              player.value.image = player.value.sprites.down;              for (let i = 0; i < boundaries.length; i++) {                  if (                      rectengularCollision(player.value, {                          ...boundaries[i],                          position: { x: boundaries[i].position.x, y: boundaries[i].position.y - Sprite.force },                      })                  ) {                      moving = false;                      break;                  }              }              if (!moving) return;              player.value.position.y += Sprite.force;                        } else if (keys.d.pressed && lastKey.value === "d") {              player.value.moving = true;              player.value.image = player.value.sprites.right;              for (let i = 0; i < boundaries.length; i++) {                  if (                      rectengularCollision(player.value, {                          ...boundaries[i],                          position: { x: boundaries[i].position.x - Sprite.force, y: boundaries[i].position.y },                      })                  ) {                      moving = false;                      break;                  }              }              if (!moving) return;              player.value.position.x += Sprite.force;                        }      }            export class Sprite {          static force: number = 3; // speed, velocity, acceleration, etc.          frames: number;          spriteIteration: number = 0;          elapsed: number = 0;          defaultSrc: string;          image: HTMLImageElement;          sprites: { up: HTMLImageElement; down: HTMLImageElement; left: HTMLImageElement;                       right: HTMLImageElement };          position: { x: number; y: number };          width: number = 0;          height: number = 0;          moving: boolean = false;          constructor(              position: { x: number; y: number },              src : string,              frames: number = 1,              sprites: { up: string; down: string; left: string; right: string } = { up:                         "", down: "", left: "", right: "" },              ) {                  this.defaultSrc = src;                  this.moving = false;                  const { up, down, left, right } = this.initSprites(sprites);                  this.sprites = { up, down, left, right };                  this.image = down;                  this.frames = frames;                  this.position = position;                      this.image.onload = () => {                      this.width = this.image.width / this.frames;                      this.height = this.image.height;                  };          }        draw(ctx: CanvasRenderingContext2D) {          ctx.drawImage(              // src              this.image,              // crop from x axis              this.spriteIteration * this.width,              // crop from y axis              0,              // crop width               this.image.width / this.frames,              // crop height              this.image.height,              // x position on canvas              this.position.x,              // y position on canvas              this.position.y,              // width on canvas              this.image.width / this.frames,              //  height on canvas              this.image.height,          );      }        initSprites(sprites: { up: string; down: string; left: string; right: string }) {          const up = new Image();          up.src = sprites.up;          const down = new Image();          down.src = sprites.down !== "" ? sprites.down : this.defaultSrc;          const left = new Image();          left.src = sprites.left;          const right = new Image();          right.src = sprites.right;          return { up, down, left, right };      }  }            

PEP8, blank line convention and reduced readability in dense code

Posted: 16 Jul 2022 03:53 AM PDT

Most of the time, PEP8 does not allow more than 1 blank line inside function or more than 2 blank lines between functions. When code is dense, even 2 blank lines can reduce readability.

Is there any guidance how to overcome this? Use some visual elements composed of ASCII characters?

def fun1():      """      This does x      """        ## Problem 1        # Subproblem 1.1          ...        # Subproblem 1.2      ...        ## -------------------      ## Problem 2      ...    # ------------------------  def fun2():      """      This does y      """      pass     

"error CS0103: The name 'targetAngle' does not exist in the current context" in unity 3d while was trying to make a 3rd person camera

Posted: 16 Jul 2022 03:54 AM PDT

So, I've been trying to make a third-person camera for the game I'm making in Unity 3D. I'm new to game dev(but I understand some things in this because I tried to make games earlier and tried to learn Java a bit) so I used Brackeys' guide on this (https://www.youtube.com/watch?v=4HpC--2iowE), but every time I'm trying to compile the code, it just says that variable targetAngle where's stored math Atan function cannot be used in another variable moveDir for some reason. this is the error "Assets\Scripts\PlayerMovement.cs(67,48): error CS0103: The name 'targetAngle' does not exist in the current context", and here's the code

using System.Collections;  using System.Collections.Generic;  using UnityEngine;    public class PlayerMovement : MonoBehaviour  {        public CharacterController controller;      public Transform cam;          public float speed = 12f;      public float gravity = -9.81f;      public float jumpHeight = 3f;      public float _doubleJumpMultiplier = 1.5f;      public float turnSmoothTime = 0.1f;      private float turnSmoothVelocity;          public Transform groundCheck;      public float groundDistance = 0.4f;      public LayerMask groundMask;         Vector3 velocity;      bool isGrounded;      private bool _canDoubleJump = false;      bool _playerMove = false;          private void Start() {            _playerMove = GetComponent<PlayerMovement>();      }          void Update()      {          isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);            if(isGrounded && velocity.y < 0) {              _canDoubleJump = true;              velocity.y = -2f;            }           else {              if(Input.GetButtonDown("Jump") && _canDoubleJump) {                  velocity.y = 3f * _doubleJumpMultiplier;                  _canDoubleJump = false;                }            }            float vertical = Input.GetAxisRaw("Vertical");          float horizontal = Input.GetAxisRaw("Horizontal");  Vector3 direction = new Vector3(horizontal, 0f, vertical).normalized;    if(direction.magnitude >= 0.1f) {        float targetAngle = Mathf.Atan2(direction.x, direction.z) * Mathf.Rad2Deg + cam.eulerAngles.y;      float angle = Mathf.SmoothDampAngle(transform.eulerAngles.y, targetAngle, ref turnSmoothVelocity, turnSmoothTime);      transform.rotation = Quaternion.Euler(0f, angle, 0f);          }            Vector3 moveDir = Quaternion.Euler(0f, targetAngle, 0f) * Vector3.forward;          controller.Move(moveDir * speed * Time.deltaTime);            if(Input.GetButtonDown("Vertical") && isGrounded && _canDoubleJump) {                _playerMove = true;            }            else          if(!Input.GetButtonDown("Vertical") && isGrounded && _canDoubleJump) {                _playerMove = false;            }     if(Input.GetButtonDown("Horizontal") && isGrounded && _canDoubleJump) {                _playerMove = true;            }            else          if(!Input.GetButtonDown("Horizontal") && isGrounded && _canDoubleJump) {                _playerMove = false;            }                if(Input.GetButtonDown("Jump") && isGrounded)          {              velocity.y = Mathf.Sqrt(jumpHeight * -2 * gravity);          }            velocity.y += gravity * Time.deltaTime;            controller.Move(velocity * Time.deltaTime);      }    }  

javascript detect scrolling past the end of the window when scroll event doesn't fire

Posted: 16 Jul 2022 03:56 AM PDT

I have a site in which all sections take 100vh/vw, and I want to animate the opacity transition when user attempts to scroll up/down.

The thing is, the scroll event doesn't fire because the window hasn't really scrolled.

here's the codepen, and the gist of it:

// css  .section {    width: 100vw;    height: 100vh;    opacity: 0;    transition: opacity 0.5s;  }    .section.active {    opacity: 1;  }    // html  <div className="section active">Some stuff here...</div>  <div className="section">Some stuff here...</div>    // js  window.addEventListener("scroll", () => {    console.log("never fires")  })  

is this even possible?

And if not, any ideas for a workaround?

What is the error in the code ? I want to call game, then call full name then for output

Posted: 16 Jul 2022 03:54 AM PDT

// I want to change program   namespace WebApplication1.Controllers  {      public class DomainController : Controller      {            public string Game()           {                  public string FullName(string first, string last)                  {                      if (!string.IsNullOrEmpty(first) &&                                               string.IsNullOrEmpty(last))                          return "Your First Name is = " + first;                      else if (string.IsNullOrEmpty(first) &&                                             !string.IsNullOrEmpty(last))                          return "Last Name is = " + last;                      else                          return "Your First Name is = " + first + "And Last                             Name is = " + last;                 }                   return Game();   // I want to call this             }       }  }  

convert dict to csv and upload to folder(csv name should be what df is grouped by)

Posted: 16 Jul 2022 03:53 AM PDT

I have created a folder called Data_test. The dictionary contains data frames that a grouped by a specific column. I want to loop through the dictionary and convert to csv and have it in the Data_test folder. Each csv name should be what the df is grouped by; for example, if grouped by 'orange' the name of the csv should be orange.csv

import pandas as pd  import numpy as np   import os    #create folder to upload CSV too  folderName = "Data_test"  if os.path.exists(folderName):      shutil.rmtree(folderName)  os.mkdir(folderName)  dirName = os.path.abspath(folderName)      #dict contains csvs grouped by specific col  grouped_dict_dfs = {key: df.loc[value] for key, value in df.groupby("col1").groups.items()}   

how to save local file content using fetch in javascript [duplicate]

Posted: 16 Jul 2022 03:55 AM PDT

I have a text.txt file and I want to save its content in a variable. My problem is that I can log the text but I can't store it in a var

let fileText;  fetch("./text.txt")      .then(response => response.text())      .then(text => {          fileText = text;      });      console.log(fileText);  // undefined

Bad Request 400; Reason "invalid" while creating user (Firebase-Pyrebase4)

Posted: 16 Jul 2022 03:54 AM PDT

I am trying to:
i. Create a user
ii. Send verification email with link
iii. once verified; use web-app;
iv. next time; login directly

There are two ways; using email provider;
i. with email and password;
ii. password less sign in

I am using pyrebase4 wrapper; and managing login state using flask-sessions;
When I try to create user with user = auth.create_user_with_email_and_password(email, password) from signUp page;
it throws error 400; bad request; reason='invalid'.
And the verification email is never send/received on my email.

Login function works just fine (I tried adding an email manually in firebase console and tried login in using pyrebase4).

Route I wrote for signUp:

@app.route('/signUp', methods=['POST', 'GET'])  def signUp():      if request.method == 'POST':          email = request.form['email']          password = request.form['password']          try:              user = auth.create_user_with_email_and_password(email, password)              auth.send_email_verification(user['idToken'])              session['user'] = user              return redirect(url_for('home'))          except requests.exceptions.HTTPError as e:              print(e)              return render_template('Fails/fail.html', error=e)      return render_template('SignIn/signup.html')  

Code for login looks same; but with user = auth.sign_in_with_email_and_password(email, password) function.

Complete error log:

[Errno 400 Client Error: Bad Request for url: https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=AIzaSyAP2eMADsSDfWBRVvzD7dGCBEA2BeP9zrQ] {    "error": {      "code": 400,      "message": "EMAIL_NOT_FOUND",      "errors": [        {          "message": "EMAIL_NOT_FOUND",          "domain": "global",          "reason": "invalid"        }      ]    }  }  

I have referenced this question and other many questions like such on SO:
i. Getting a bad request bad request 400 when creating user(Firebase)
ii. Why do I see a "400 (Bad Request)" in my developer console when sign-in to Firebase Authentication fails?
As referenced in the above question, the pyrebase while does the same, actually didn't register the user in this case, hence didn't work here

Most other answers are implemented using JS (as is the case in official docs); Pyrebase/Pyrebase4 docs do not seem to have a function for password-less signIn (?)

add some delays between request in promis.map using cheerio and nodejs?

Posted: 16 Jul 2022 03:54 AM PDT

I have following code:

urls have 5000 different url, when I try to grab and scrape these urls, I ran into a 500 Error, so I decide to add some delay between each request, I add the {concurrency: 1} but nothing changed.

Promise.map(urls, requestPromise)    .map((htmlOnePage, index) => {          const $ = cheerio.load(htmlOnePage);        $('.txtSearch1').each(function () {           var h="";          h=$(this).text()          h= h.replace(/(\r\n|\n|\r)/gm, "")            html44.push (h)      })      shareTuple=html44        // ...      // some works        return shareTuple;            }, {concurrency: 1})        .then ()    .catch((e) => console.log('We encountered an error' + e));     

how I can add some random delay between each request here?

Fill a board using rectangles and L shaped blocks with given size

Posted: 16 Jul 2022 03:55 AM PDT

This might be an easy problem, but I'm not quite getting it:

Given a rectangular puzzle board and 10 puzzle pieces, determine which pieces will fill the puzzle grid. Pieces are shaped as either a rectangle or the letter "L."
Use the following rules in order to fill the puzzle board:

  1. Pieces must be placed in the board from large to small. If multiple pieces have the same area, use the one with the largest width first.

  2. The first puzzle piece is placed in the lower left hand corner of the grid. The following pieces are placed in the leftmost cell of the bottommost row where it will fit.

  3. Continue to place pieces in the grid using the rules above until the grid is filled or no more pieces will fit.

Print the pieces in the order they fit into the board; if the board cannot be completely filled, print "NONE". Pieces cannot be rotated or flipped in any way. The largest puzzle board will be 9x9.

Rectangular pieces are described by 2-character strings, the width followed by height. The "L" pieces are described by 3-character strings: width, height of the vertical part, the width of the vertical part; the base of the "L" has a height of 1.

INPUT: There will be 11 lines of input. The first line will contain the 10 puzzle pieces: 2-character or 3-character numeric strings. The remaining 10 lines will each contain 2 integers, representing the width and height, respectively, of the puzzle board. Use only rectangular pieces for the first 5 boards; the last 5 boards can use the "L" shaped puzzle pieces.

OUTPUT: Print the pieces used to fill the puzzle board in the order they were used. If the board can't be filled, print NONE.

Some examples

SAMPLE INPUT:

12, 22, 32, 23, 43, 31, 44, 33, 443, 11  7, 4  6, 3  3, 2  3, 5  2, 2  4, 4  3, 3  5, 3  6, 2  8, 4      

SAMPLE OUTPUT:

44, 33, 31  43, 23  22, 12  33, 32  NONE  443, 12,11  32, 31  43,12, 11  32, 22, 12  44, 443, 12, 11  

I tried to create a Width by Height 2D array filled with boolean and made it True when placed with block. However, it didn't seem to work. I'm quite new to this type of question. Can someone please provide a solution or give a hint?

MPDF not downloading PDF on cPanel but works fine when locally hosted (XAMPP)

Posted: 16 Jul 2022 03:55 AM PDT

Here is the generatepdf.php:

    <?php  include('db.php');  require_once 'vendor/autoload.php';  ob_start();    ?>    <?php  $student_id = 0;    if (isset($_GET['id'])) {      $student_id = $_GET['id'];  }    // var_dump($student_id);    $fetchUser = $conn->query("SELECT * from student where id = $student_id")->fetchAll(PDO::FETCH_ASSOC);  $subjects = $conn->query("SELECT * FROM subjects WHERE student_id = $student_id")->fetchAll(PDO::FETCH_ASSOC);    //   // var_dump($fetchUser);    // Student Info    $name = $fetchUser[0]['name'];      $rollno = $fetchUser[0]['rollno'];    $image = $fetchUser[0]['image'];  $center = $fetchUser[0]['center'];  $division = $fetchUser[0]['division'];  $academic_year = $fetchUser[0]['academic_year'];    $class = $fetchUser[0]['class'];  $session = $fetchUser[0]['session1'] . ' - ' . $fetchUser[0]['session2'];  $father = $fetchUser[0]['father'];  $stream = $fetchUser[0]['stream'];  $totalmarks = $fetchUser[0]['totalmarks'];;  $obtmarks = $fetchUser[0]['obtmarks'];  $marksinwords = $fetchUser[0]['marksinwords'];    $percentage = ($fetchUser[0]['obtmarks'] / $fetchUser[0]['totalmarks']) * 100;  $percentage = number_format($percentage, 2);    $todaysDate = gmdate("M d, Y", strtotime('now'));      $html = '  <html>  <head>  <style>  body {font-family: sans-serif;      font-size: 10pt;  }  p { margin: 0pt; }  table.items {      border: 0.1mm solid #000000;  }  td { vertical-align: top; }  .items td {      border-left: 0.1mm solid #000000;      border-right: 0.1mm solid #000000;  }  table thead td { background-color: #EEEEEE;      text-align: center;      border: 0.1mm solid #000000;      font-variant: small-caps;  }  .items td.blanktotal {      background-color: #EEEEEE;      border: 0.1mm solid #000000;      background-color: #FFFFFF;      border: 0mm none #000000;      border-top: 0.1mm solid #000000;      border-right: 0.1mm solid #000000;  }  .items td.totals {      text-align: right;      border: 0.1mm solid #000000;  }  .items td.cost {      text-align: "." center;  }  </style>  </head>  <body>    <!--mpdf  <htmlpageheader name="myheader">  <table width="100%"><tr>  <td width="80%" style="color:#000; "><span style="font-weight: bold; font-size: 14pt;">Online Marksheet For TELEGANA UNIVERSITY</span></td>  // <td width="20%" style="text-align: right;">Date: ' . $todaysDate . '<br />  </tr></table>  </htmlpageheader>    <htmlpagefooter name="myfooter">  <div style="border-top: 1px solid #000000; font-size: 9pt; text-align: center; padding-top: 3mm; ">  Page {PAGENO} of {nb}  </div>  </htmlpagefooter>    <sethtmlpageheader name="myheader" value="on" show-this-page="1" />  <sethtmlpagefooter name="myfooter" value="on" />  mpdf-->  <img style="margin-top: -50px;padding: 15px; border: 2px solid #000; height: 100px;margin: auto !important;width: 100px;background-size: contain;background-repeat: no-repeat;background-position: center;margin-left: 80px !important;" src="images/' . $image . '" class="img-thumbnail">  <table width="100%" style="font-family: serif;" cellpadding="10"><tr>  <td width="55%"><br /><br /><span style="font-weight: bold;">Name:</span> ' . $name . '<br /><span style="font-weight: bold;">Father:</span> ' . $father . '<br /><span style="font-weight: bold;">Center:</span> ' . $center . '<br /><span style="font-weight: bold;">Division:</span> ' . $division . '<br /><span style="font-weight: bold;">Class:</span> ' . $class . '</td>  <td width="5%">&nbsp;</td>  <td width="40%"><br /><br /><span style="font-weight: bold;">Hall Ticket / Roll No:</span> ' . $rollno . '<br /><span style="font-weight: bold;">Session:</span> ' . $session . '<br /><span style="font-weight: bold;">Stream:</span> ' . $stream . '<br /><span style="font-weight: bold;">Year of Passing:</span> ' . $academic_year . '</td>  </tr></table>    <br />    <table class="items" width="100%" style="font-size: 9pt; border-collapse: collapse; " cellpadding="8">  <thead>  <tr>  <td width="15%">Sub Code</td>  <td width="40%">Subject Name</td>  <td width="10%">Theory</td>  <td width="15%">Practicals</td>  <td width="20%">Marks Secured</td>  </tr>  </thead>  <tbody>  <!-- ITEMS HERE -->  ';    foreach ($subjects as $subject) {        $html .= '<tr>';      $html .= '<td align="center">' . $subject['subcode'] . '</td>';      $html .= '<td align="center">' . $subject['subject_name'] . '</td>';      $html .= '<td>' . $subject['total_marks'] . '</td>';      $html .= '<td class="cost">' . $subject['obtained_marks'] . '</td>';      $html .= '<td class="cost">' . $subject['marksinwords'] . '</td>';      $html .= '</tr>';  }  $html .= '  <tr style="border-top: 2px solid #000;">  <td style="border-top: 2px solid #000;" align="center" >Percentage: ' . $percentage . '</td>  <td style="border-top: 2px solid #000;" align="center"></td>  <td style="border-top: 2px solid #000;">' . $totalmarks . '</td>  <td style="border-top: 2px solid #000;" class="cost">' . $obtmarks . '</td>  <td style="border-top: 2px solid #000;" class="cost">' . $marksinwords . '</td>  </tr>  </tbody>  </table>    </body>  </html>  ';    require_once 'bootstrap.php';    $mpdf = new \Mpdf\Mpdf([      'margin_left' => 10,      'margin_right' => 10,      'margin_top' => 30,      'margin_bottom' => 25,      'margin_header' => 10,      'margin_footer' => 10  ]);    $mpdf->SetTitle("Online Marksheet");  $mpdf->SetDisplayMode('fullpage');      $mpdf->WriteHTML($html);    $mpdf->Output();  

This is working perfectly fine in XAMPP for me, and is downloading the PDF every time I load the page.

But when I hosted these exact same files on cPanel's File Manager - it's only showing me a blank page. No errors. What can I do?

I've checked the PHP versions of both my XAMPP (v8.0) and PHP(v7.3) but that doesn't seem to be the issue (unless one of you think it is?)

map.items is not function how do i slove this?

Posted: 16 Jul 2022 03:54 AM PDT

I tried to map all items but it says map. items is not a function. How can I solve this problementer image description here

adding new column assigning other column first value from list

Posted: 16 Jul 2022 03:53 AM PDT

hello i have got a situation here. got dataset and in several 'price' columns there are two values instead of one. looks like "$1.99 64.78" etc.. data look like this

my code looks like

no_na['Kaina'] = no_na['price'].str.split(' ').astype('str')  no_na  

this creates new column and adds list of prices. the question is how to add only one element from list to a new column? tried to use pop but got errors

well it worked with

no_na['Kaina'] = no_na['price'].apply(lambda x: x[0:5]).astype(float)  no_na  

but still i believe there should be a better way, because if price is 111.11 the result would be 111.1 i guess. now looks like this

sympy:Please tell me about the line.equation()

Posted: 16 Jul 2022 03:53 AM PDT

sympy.line.equation()

Same value and type, but what's the difference?"

How can I fix it?

What is the difference between z1 and z2?

from sympy import *  var('x y z1 z2')  z1=8*x+6*y+48  print("#z1",z1,type(z1))    z2=Line(Point(-6,0),Point(0,-8)).equation()  print("#z2",z2,type(z2))    if type(z1)==type(z2):      print("#","type==")  else:      print("#","type<>")  if z1==z2:      print("#","==")  else:      print("#","<>")  #z1 8*x + 6*y + 48 <class 'sympy.core.add.Add'>  #z2 8*x + 6*y + 48 <class 'sympy.core.add.Add'>  # type==  # <>  

I try add .expand().simplify() 30 mins ago

from sympy import *  var('x y')  print("#z1#",solve(8*x+6*y+ 48                                                 ,y))  print("#   ",      Line(Point(-6,0),Point(0,-8)).equation().expand().simplify()   )  print("#z2#",solve(Line(Point(-6,0),Point(0,-8)).equation().expand().simplify(),y))  #z1# [-4*x/3 - 8]  #    8*x + 6*y + 48  #z2# []  

Thank you.

from sympy import *  var('x y')  print("#z1#",solve(8*x+6*y+ 48                                           ,y))  print("#   ",                  Line(Point(-6,0),Point(0,-8)).equation()     )  print("#z2#",solve(sympify(str(Line(Point(-6,0),Point(0,-8)).equation())),y))  #z1# [-4*x/3 - 8]  #    8*x + 6*y + 48  #z2# [-4*x/3 - 8]  

IPython.notebook.kernel.execute in the same cell

Posted: 16 Jul 2022 03:53 AM PDT

I have a follow up question to Can a Jupyter / IPython notebook take arguments in the URL?

There is an assumption here that the HTML object should be the last one in the cell and the print URL is in the next one. Is it possible to get the URL directly without these assumptions? I need it in an app that runs through a package voila. A snippet of code(like below from the other query on stackoverflow) in a single cell would be ideal.

*from IPython.display import HTML  HTML('''      <script type="text/javascript">          IPython.notebook.kernel.execute("URL = '" + window.location + "'")      </script>''')  print(URL)*  

Pydantic - Allow missing field

Posted: 16 Jul 2022 03:54 AM PDT

I have a pydantic model. One of its fields must be supplied by user, however, the second one can be present but it is totally okay if it is missing.

In case of missing age, I don't want it to be present on pydantic model instance at all.

My Model:

from pydantic import BaseModel    class Employee(BaseModel):      name: str      age: Optional[int]  

Problem:

e = Employee(name="Harwey Smith")  e.age  # Has age parameter equal to None, even if not provided.  

How do I setup my Employee pydantic model not to have age attribute at all if it is not provided on init? If I would try to access e.nonexistent attribute, AttributeError would be thrown. This is what I want to happen for e.age, if not provided.

Pycharm matplotlib figure opened but i'm still getting error

Posted: 16 Jul 2022 03:54 AM PDT

I've created a graph. The keys have become inactive and the unresponsive error continues. The buttons are not active. I installed the latest version, but it still didn't happen

I'm getting an error that the graph is not responding even though it occurs.

enter image description here

import seaborn as sns

import matplotlib.pyplot as plt

df = sns.load_dataset("titanic")

plt.boxplot(df["fare"]) plt.show()

When clicking on a button inside another button, the functions for both buttons are run

Posted: 16 Jul 2022 03:55 AM PDT

I have show-button that, when clicked, expands and shows some text and a collapse-button:

<button id='show-button'>      <p>Test</p>      <button id='collapse-button'></button>  </button>  

When show-button is clicked, it expands and shows the paragraph and the collapse button. When the collapse-button is clicked, it collapses back to the original size where it's all hidden.

The problem is the following:

When I click on the collapse-button, the event listener for click is run and everything collapses. However, for some reason, the event listener of the show-button is also triggered and everything is shown again. A loop. You can show but never collapse it again.

How can I make sure that when collapse-button is pressed, show-button isn't also triggered?

Thanks

problems with IDE IJ Community vs IJ Ultimate

Posted: 16 Jul 2022 03:53 AM PDT

I create a Maven project with IJ Community Edition, and it's work with no errors. After I try to open this project with IJ Ultimate, but my progect(exercises) went to break up in both IDE.

Abnormal build process termination:  /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java -Xmx700m -   Djava.awt.headless=true -Djava.endorsed.dirs=\"\" Dexternal.project.config=/home/viktoriya/.cache/JetBrains/IntelliJIdea2021.2/external_bui   ld_system/aop.8b786682 -Dcompile.parallel=false -Drebuild.on.dependency.change=true -   Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -   Dio.netty.initialSeedUniquifier=-3134077656729915217 -Dfile.encoding=UTF-8 -   Duser.language=it -Duser.country=IT -Didea.paths.selector=IntelliJIdea2021.2 -   Didea.home.path=/snap/intellij-idea-ultimate/311 -   Didea.config.path=/home/viktoriya/.config/JetBrains/IntelliJIdea2021.2 -   Didea.plugins.path=/home/viktoriya/.local/share/JetBrains/IntelliJIdea2021.2 -   Djps.log.dir=/home/viktoriya/.cache/JetBrains/IntelliJIdea2021.2/log/build-log -   Djps.fallback.jdk.home=/snap/intellij-idea-ultimate/311/jbr -   Djps.fallback.jdk.version=11.0.11 -Dio.netty.noUnsafe=true -   Djava.io.tmpdir=/home/viktoriya/.cache/JetBrains/IntelliJIdea2021.2/compile-   server/aop_fceb3a58/_temp_ -Djps.backward.ref.index.builder=true -   Dtmh.instrument.annotations=true -Dtmh.generate.line.numbers=true -   Dkotlin.incremental.compilation=true -Dkotlin.incremental.compilation.js=true -   Dkotlin.daemon.enabled -Dkotlin.daemon.client.alive.path=\"/tmp/kotlin-idea-   12642686614178805058-is-running\" -classpath /snap/intellij-idea-   ultimate/311/plugins/java/lib/jps-launcher.jar:/home/viktoriya/.jdks/adopt-openjdk-   1.8.0_292/lib/tools.jar org.jetbrains.jps.cmdline.Launcher /snap/intellij-idea-   ultimate/311/lib/jps-model.jar:/snap/intellij-idea-   ultimate/311/plugins/java/lib/maven-resolver-transport-file-1.3.3.jar:/snap/intellij-   idea-ultimate/311/lib/forms_rt.jar:/snap/intellij-idea-ultimate/311/lib/jna-   platform.jar:/snap/intellij-idea-ultimate/311/plugins/java/lib/jps-   builders.jar:/snap/intellij-idea-ultimate/311/plugins/java/lib/jps-builders-   6.jar:/snap/intellij-idea-ultimate/311/lib/kotlin-stdlib-jdk8.jar:/snap/intellij-   idea-ultimate/311/lib/slf4j.jar:/snap/intellij-idea-ultimate/311/lib/protobuf-java-   3.15.8.jar:/snap/intellij-idea-ultimate/311/plugins/java/lib/maven-resolver-   connector-basic-1.3.3.jar:/snap/intellij-idea-   ultimate/311/lib/idea_rt.jar:/snap/intellij-idea-ultimate/311/plugins/java/lib/maven-   resolver-transport-http-1.3.3.jar:/snap/intellij-idea-   ultimate/311/lib/jna.jar:/snap/intellij-idea-   ultimate/311/plugins/java/lib/javac2.jar:/snap/intellij-idea-ultimate/311/lib/3rd-   party.jar:/snap/intellij-idea-ultimate/311/plugins/java/lib/jps-javac-extension-   1.jar:/snap/intellij-idea-ultimate/311/lib/util.jar:/snap/intellij-idea-   ultimate/311/lib/annotations.jar:/snap/intellij-idea-   ultimate/311/plugins/java/lib/aether-dependency-resolver.jar:/snap/intellij-idea-   ultimate/311/lib/platform-api.jar:/snap/intellij-idea-   ultimate/311/plugins/JavaEE/lib/jasper-v2-rt.jar:/snap/intellij-idea-   ultimate/311/plugins/Kotlin/lib/kotlin-reflect.jar:/snap/intellij-idea-   ultimate/311/plugins/Kotlin/lib/kotlin-plugin.jar:/snap/intellij-idea-   ultimate/311/plugins/ant/lib/ant-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/uiDesigner/lib/jps/java-guiForms-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/eclipse/lib/eclipse-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/eclipse/lib/eclipse-common.jar:/snap/intellij-idea-   ultimate/311/plugins/IntelliLang/lib/java-langInjection-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/Groovy/lib/groovy-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/Groovy/lib/groovy-constants-rt.jar:/snap/intellij-idea-   ultimate/311/plugins/maven/lib/maven-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/gradle-java/lib/gradle-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/devkit/lib/devkit-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/javaFX/lib/javaFX-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/javaFX/lib/javaFX-common.jar:/snap/intellij-idea-   ultimate/311/plugins/JavaEE/lib/javaee-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/webSphereIntegration/lib/jps/javaee-appServers-websphere-   jps.jar:/snap/intellij-idea-ultimate/311/plugins/weblogicIntegration/lib/jps/javaee-   appServers-weblogic-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/JPA/lib/jps/javaee-jpa-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/Grails/lib/groovy-grails-jps.jar:/snap/intellij-idea-   ultimate/311/plugins/Grails/lib/groovy-grails-compilerPatch.jar:/snap/intellij-idea-   ultimate/311/plugins/Kotlin/lib/jps/kotlin-jps-plugin.jar:/snap/intellij-idea-   ultimate/311/plugins/Kotlin/lib/kotlin-jps-common.jar:/snap/intellij-idea-   ultimate/311/plugins/Kotlin/lib/kotlin-common.jar org.jetbrains.jps.cmdline.BuildMain    127.0.0.1 36431 07bedbac-3b45-46ae-985c-23aa3cfc7910    /home/viktoriya/.cache/JetBrains/IntelliJIdea2021.2/compile-server   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 1: ��ELF: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 2: ��: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 3: ��: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 4: ����: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 5: ��: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 6: ��: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 7: TTT: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 8: ��: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 9: ��: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 10: PP/lib64/ld-linux-    x86-64.so.2GNU: not found   /home/viktoriya/.jdks/adopt-openjdk-1.8.0_292/bin/java: 16: Syntax error: ")"    unexpected`  

So I try to open it again with IJ Community, but I's was also broked. I create a new one,identical, with the same classes and the same Maven dependecies with IJ Community, I change just the name progect, and it's work. So my question is why IJ Utilmate broke my progect and how may I adjust it. After I create a simple Maven progect with just an System.out.println("hello"); with Ij Ultimate, and I've got the same results like in my firs progect, so was broked with the same message about "Abnormal buiild process terminated". So the problem it's not in my code, but with IJ Ultimate Ide. How may I fix it? Because I prefer work with Ultimate edition. Thank you

chrome.scripting.executeScript not working in my manifest v3 Chrome Extension

Posted: 16 Jul 2022 03:54 AM PDT

I have an extension where I call

function doScript(window) {    chrome.scripting.executeScript(      {        target: {tabId: window.tabs[0].id},        files: ['myscript.js'],      });  }  

myscript.js simply has

alert("Made it")  

but I get no alert in my tab.

If I change the tabId to something random like 123

  chrome.scripting.executeScript(      {        target: {tabId: 123},        files: ['myscript.js'],      });  

then I get an error "Unchecked runtime.lastError: No tab with id: 123"

So it looks like my tabId is right, but for some reason myscript.js is not triggering an alert.

If I mess up the script name like this

  chrome.scripting.executeScript(      {        target: {tabId: window.tabs[0].id}},        files: ['ttttttttttt.js'],      });  

I get "runtime.lastError: Could not load file: 'ttttttttttt.js'."

I tried looking through the console logs and the only thing I see is this error upon clicking but it looks like a red herring.

"Unchecked runtime.lastError: Cannot access contents of url "". Extension manifest must request permission to access this host." https://github.com/GoogleChrome/web-vitals-extension/issues/54

Here is my manifest

{      "manifest_version": 3,      "name": "pokemon bokemon",      "description": "",      "version": "0.3.0",      "action": {          "default_popup": "popup.html"      },      "icons": {          "16": "icon16.png",          "32": "icon32.png"      },      "permissions": [          "tabs",          "storage",          "scripting",          "activeTab",          "cookies"      ],      "host_permissions": [          "*://*/*",          "<all_urls>"      ],      "options_page": "options.html"  }  

EDIT: Apparently it's a bug in chrome/manifest v3. Opened a bug here: https://bugs.chromium.org/p/chromium/issues/detail?id=1191971

Parallel JavaScript Code

Posted: 16 Jul 2022 03:53 AM PDT

Is it possible to run JavaScript code in parallel in the browser? I'm willing to sacrifice some browser support (IE, Opera, anything else) to gain some edge here.

Recent Questions - English Language & Usage Stack Exchange

Posted: 16 Jul 2022 08:27 AM PDT

Recent Questions - English Language & Usage Stack Exchange


Is there a word or phrase for "a weak person harming another weak person"?

Posted: 16 Jul 2022 08:21 AM PDT

My question is what is the Word or phrase for the following?

a weak person harming another (equally) weak person and both inflicting harm on each other in the process.

Warning: The next part contains f word.

Let me go into a bit of a background. Actually a friend asked me English alternative for a Punjabi saying. If I translate the exact words, it'll be something like this: one hungry person fucks another hungry person and as a result both faint.

Synonym/alternative for "rhetorical kill shot"?

Posted: 16 Jul 2022 04:58 AM PDT

The phrase "rhetorical kill shot" means clever persuasion with words that immediately incapacitates the rhetorical opponent.

Sometimes that phrase is simplified to just "kill shot".

The phrase has been used in at least one book sub-title (How Dare You: Inspecting the Rhetorical Kill-shots of America's Most Banned Comedian, Owen Benjamin).

BUT:

Without context and especially when omitting the word "rhetorical", some people are prone to misunderstand and/or misuse the phrase, alleging that "kill shot" was meant as a literal suggestion to kill a person.

Question:

What words or phrases can be used — words/phrases that are just as snappy as "kill shot" — as a synonym or alternative to that phrase?

I mean, "rhetorical kill shot" or "kill shot" is sharp and catchy while "clever persuasion with words" is cumbersome and slow (and doesn't convey the instantaneous effect).

Connotation of "swagger" [closed]

Posted: 16 Jul 2022 04:39 AM PDT

Could someone explain the exact meaning of the "swagger" word in this context?

Whereas ego is artificial, this type of confidence can hold weight. Ego is stolen. Confidence is earned. Ego is self-anointed, its swagger is artifice.

Ramifications of/in/on [closed]

Posted: 16 Jul 2022 04:39 AM PDT

Consider the following sentence

They can be extended to the main model, leading to ramifications in game theory.

Is the expression "ramifications in" correct? I have seen online examples with "in" and "for", but I am not too sure whether I understand the difference. Any ideas?

Is “month year” or “month, year” the more common form of punctuation in print publishing?

Posted: 16 Jul 2022 07:11 AM PDT

A great many style guides address the question of whether or not to separate the month and year with a comma in phrases of the type "January[,] 2018"—and yet, to my surprise, a search of English Language & Usage for the terms "month year comma" yields only one question that seems to focus on precisely this point: Is there always a comma before and after a year in a sentence?

Unfortunately, that question was closed as duplicate back in 2014, even though the prior question that it supposedly duplicates (How to use AP Style commas after dates) does not ask about "month[,] date" constructions, and even though none of the answers posted in response to that question address the issue either.

But the "Is there always a comma before and after a year in a sentence?" question doesn't show any research, which would probably lead to its being closed again for that reason if it were reopened as not being a true duplicate—so rather than try to rehabilitate it, I ask the question afresh (and in my own words) here:

In instances where only a month and a year appear as date indicators—such as "January[,] 2018"—is it more common in print publishing (that is, in ink-and-paper books and magazines, whose publishers tend to enforce in-house or third-party style guidelines) to include a comma after the month or to omit it? Are the relevant style guides evenly divided on this issue, or do they preponderantly favor one or the other option?

Is "You’re a better man than I am, Gunga Din!" still considered a compliment in English?

Posted: 16 Jul 2022 07:00 AM PDT

I grew up hearing the phrase, "You're a better man than I am, Gunga Din!" used as a compliment, a genuine expression of admiration, fairly self-effacing at the same time.

I have to admit that, while I knew from context that it was meant as praise, I long ago forgot most of the poem it came from, remembering just that Gunga Din was heroic on the battlefield. Hence the admiration.

I was about to use the phrase when I realized that the person I was addressing might be too young to get the reference, so I skipped it, but went back to read the poem. It is (to me) shockingly racist, with lines like

An' for all 'is dirty 'ide
'E was white, clear white, inside
When 'e went to tend the wounded under fire!

Researching it a bit, it seems the poem is not taught anymore, much like some of Mark Twain's works in the US.

So, is it still a compliment or have the racist overtones made it obsolete?

Edited to add: The last stanza refers to meeting up with Gunga Din in hell someday. [Again edited to add] I realize that the meeting in hell was a compliment - once again - to Gunga Din. The author calls him, "You Lazarushian-leather Gunga Din!" In the Bible, the Rich man (in hell) asks to let Lazarus (in heaven) give him water: 'Father Abraham, have pity on me and send Lazarus to dip the tip of his finger in water and cool my tongue, because I am in agony in this fire.' While the Biblical answer is 'Nope', the author has so much faith in the goodness of Gunga Din that he believes Gunga Din will bring him - and others - water not only on the battlefield, but also in hell. (I think...) Thanks to @Michael.

Sorry, I realize this has some POB aspects to it.

No comments:

Post a Comment

End of Summer Sale ☀️😎

20% OFF Inside!🤯 ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏...