
I wanted to create a table of contents from the post's heading tags automatically without having to change the headings like adding an id or anchor. I started to look at existing solutions and came across this custom function on Stackoverflow by sjaak-wish function generateIndex($html) { preg_match_all('/<h([1-6])*[^>]*>(.*?)</h[1-6]>/',$html,$matches); $index = "<ul>"; $prev = 2; foreach ($matches[0] as $i => $match){ $curr = ...
ادامه مطلب
Find out how to generate an SSL certificate for a website on your own computer. (For those wondering, SSL certificates are needed so that your site can be accessed using HTTPS instead of HTTP.) ...
ادامه مطلب
How to easily generate json out of a running instance for usage in run-instances --cli-input-json=? The purpose is to recreate instance without too much manual handling or too much json editing. I would be grateful for your answer. ...
ادامه مطلب
even with my android device connected to it, it tus off after some time. i guess it happens when the phone goes to sleep. is there any way to keep it on, until it is switched off manually? ...
ادامه مطلب
I wanted to set automatic rules for Quiet hours features in Windows 10. I want quiet hours to automatically activate during specific time. In Windows 10 Mobile I have done the same by going to Cortana->Notebook->Quiet Hours. However I cannot do the same on Windows 10 PC. There is no quiet hour page in Cortana's notebook on PC. Is the setting located somewhere else or is it not implemented yet? Any solution such as registry edits is also welcome. Let's block ads! بخوانید...
ادامه مطلب
ubuntu16.04.1, systemd An application depends on mongodb. The application and mongodb both start on boot as services. app.service containts next line: After=network.target mongod.service Unfortunately, the application fails (with connection to database error), I guess, because the mongodb needs some time to startup and be ready to connections (if I start the app later, everything is ok). It looks like Type=notify (in [Service] section of mongod.service) will solve the problem if mongodb sends...
ادامه مطلب
I'm trying to create a Powershell script that watches a folder for new MP3 files and converts them to M4A format using FFMPEG and FDK AAC encoder. Since fdkaac.exe won't take MP3 files as input, I use this command, which pipes from ffmpeg: ffmpeg -i $path -f caf - | fdkaac -p5 -b64 - -o $outfolder$outname.m4a This works just fine if I enter it into a command prompt and the resulting M4A file that's generated has no problems. However if I run this from Powershell, the M4A file is created but co...
ادامه مطلب
How can I auto generate number if 1 of the column is fixed with the number that I want and another column randomly generate the number that is not in first column? I do not want any duplicate. For example: I need to auto generate 1-10 into 2 columns. Column A (fixed number) 1 3 4 5 6 Column B (random number) to generate that didnt appear in column A? Column B should have 2,7,8,9,10. With this formula, I am able to generate unique number for 2 columns from 1 - 10 but now if I want to fix the firs...
ادامه مطلب
My goal is to automate the OOBE process (launched by sysprep) by removing the need for a new product key to be entered. I already have a product key since I am launching this through sysprep. I would be fine with skipping the step completely since the system is already active. However, I thought it might be easier to just provide the product key already in use on the system. I am using sysprep for the first time. I have saved an unattend.xml file in the sysprep folder. I tried to make it as simp...
ادامه مطلب
When I wanted to tu on my laptop, I encountered Auto repair loop. My laptop has C,D,E drives normally. C in one physical drive, D and E in another physical drive. Windows is working on C drive. When I open command prompt, C is empty but a "boot" folder and a .txt file. When I listed drives I see and extra drive which is F and all files of "old" C seems in it, including Windows, Program Files etc. When I started my laptop with gparted live usb, every partition seems legit :(. Any idea? Let's bloc...
ادامه مطلب
I know that's being asked but I can't find a solution for my problem. I have old Asus EeePc notebook with windows XP Home SP3 x86 From time to time (few seconds up to few minutes) it acts like the right arrow key is being held down, and stops that behavior when left or up arrows or backspace is pressed, but sometimes starts again when down or right arrow is pressed, while right arrow is not functioning at all most of the time. Also no '#' sign, though other like '$' '%' e.g. work perfectly fine....
ادامه مطلب
I have two LG monitors (different ones) connected to my PC, one via D-SUB and the other (a newer monitor) via HDMI. When my PC goes to sleep and sends the VESA sleep command, both of my monitors shut down and go to sleep. The D-SUB monitor's light tus yellow, but the HDMI one just completely shuts off. When I move the mouse and the screens come up from sleep, the D-SUB monitor tus on but the HDMI monitor stays off, and I have to tu it on by pressing the power button, after which it works fine. T...
ادامه مطلب
How to reterieve the record from the table by reducing duplicacy in case of joins using sql and then fetch the same record using php? ...
ادامه مطلب
I am running Windows 10 Professional on my laptop. In System Settings->Choose what the power buttons do, both When I press the power button and When I press the sleep button are set to Sleep for both On battery and Plugged in. When I press and hold the laptop's power button, after a couple of seconds, my laptop tus off, and presumably enters sleep mode. However, when I come back a few hours later, it is running again, and the login screen is displayed. This has happens every time, and has bee...
ادامه مطلب
The autohide feature on my Windows 7x64 stopped working on my home computer. I've tried moving it around top, left, right, bottom, unsetting and resetting the feature, but no luck. I remoted in to my office computer, also Windows 7x64, and the same thing is happening there. Let's block ads! بخوانید...
ادامه مطلب
I just had two drives go bad. Looks like faulty sectors. But I run chkDsk regularly. Unfortunately, it's a manual process. Also, you have to look at the report and read the # of bad sectors, rather than having a simple flag that pops up only WHEN there is a problem. (Set it and forget sort of thing) Any tips for an automated process to check for problems? Let's block ads! بخوانید...
ادامه مطلب
I have a field(cell): P2 and when I type 25 I need that value to be copied to cell B53 and from this cell B53 to start autofilling and increasing the value when cell C46 is not empty anymore. Let me explain that again : So when I put a value to P2 that should be copied to B53. After that when I fill cell C46 the cell B54 would be the increased value from cell B53 Example: I put 25 in cell P2...Then cell B53 become 25...Then I put something in cell C46 so the cell B54 is autofilled with value 26....
ادامه مطلب
Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ...
ادامه مطلب
Last night I updated to Windows 10 anniversary update and I am experiencing the following issue. I run SQL Management Studio 2016 as a different user so that I can connect to other database server however after the update I cannot. I get a error popup saying This taks requires the application to have elevated permissions. Restart with different credentials or Cancel the task. Neither of these options allow SQLMS to open as the correct user. I have a work around in that I can use SQLMS 2014 which...
ادامه مطلب
I am running tor (OSX browser), and then using it as SOCKS5 proxy in another app It works great in the other app, but what I would really like is for a new exit node to be updated automatically every 30 minutes or so. At the moment, as I understand it, if I just leave the tor browser running (empty), it will keep using the original exit node, and therefore never change IP address. Any ideas? Let's block ads! بخوانید...
ادامه مطلب