
That begs the question how do you separate the time into seperate elements? Making use of explode can work. Exploding where there a : so: $parts = explode(':', '14:25:00'); This would result in an array: [ "14", "25", "00", ] To use an element you can refer to its index for example $parts[0] would contain 14 Using them by their index is fine to do but kinda messy. I prefer to give each element a name using the list function list($hours, $minutes, $seconds) = explode(':', '14:25:00'); When using list() passing an array to it will allow you to name each index of the array in the order listed. Putting this into p...
ادامه مطلب
Ruing API tests you may be tempted to open PostMan or another API client, did you know, you can run HTTP requests from inside PhpStorm directly? When developing a new API, you will want to run the API endpoints. Being able to run them without leaving PhpStorm speeds up your workflow. To start a request file, you can either select a HTTP Request file when using the new file or create a new scratch file. For a scratch file select the HTTP Request type. In either case a file ending in .http for example scratch.http You can name the file anything you like and have multiple files. The difference between having .http files in your project...
ادامه مطلب
I've documented my PhpStorm setup, what theme I use, plugins, and keybindings. Theme I use the New UI which is located at Appearance & Behaviour -> New UI Once tued on I use the Light Theme: I like to keep things minimal, in fact, I tu off the toolbars and status bars by toggling distraction-free mode Plugins .env file support Environment variables completion based on .env, Dockerfile and docker-compose.yml files. Go to declaration(in .env file) and usages(in code), by Ctrl(Cmd)+click or hotkey(Ctrl(Cmd)-B, etc.) .env file syntax highlighter BitBucket Pull Requests (Paid) The plugin allows you to review Atlassian Bitbucke...
ادامه مطلب
The script generated by the Feedback Form Wizard has been updated to improve compatibility with PHP 8 (eg, 8.0, 8.1, etc). Note: if you have generated your form and script after 1 January 2023, you already have this version (ver 3.2.0). ...
ادامه مطلب
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 = $matches[1][$i]; $text = strip_tags($matches[2][$i]); $slug = strtolower(str_replace("--","-",preg_replace('/[^da-z]/i', '-', $text))); $anchor = '<a name="'.$slug.'">'.$...
ادامه مطلب
Nowadays in my classroom I show video tutorials that I made for my students related to CG-apps, Excel, etc. using a utility that shows keyboard and mouse combinations named Moukey. for some cases like on a projector in the classroom it doesn't detect my Windows 10 and I don't want to call the technician. Also, I mostly like using OSX (of my dual boot MAC), sometimes and I'm looking for an OSX El Capitan version of this Key and Mouse Stroke Displayer. In conclusion, I'm looking for an OSX Version that can display mouse and Keyboard keystrokes/combinations with mode signs similar to Moukey. If it exists please give me the name of it so that I can search it in iTunes apps. Let's block ads! بخوا...
ادامه مطلب
Just bought this printer, everything works well wirelessly except airprint from my iPad. Hardware: HP m201dw printer, initially configured to a Windows 10 PC through USB to select wifi network, but now ruing wirelessly only on the main network on a dhcp-given ipv4. All default protocols enabled, including Airprint, Bonjour and IPP. Tried enabled IPPS, disabling ipv4, switching ePrint (web services), but nothing made a difference on airprint. Windows 10 PC coected to router on etheet. Prints to the wireless printer just fine. No issues accessing printer config wirelessly using either HP toolbox or web browser on DCHP-given ip. Also, the Bonjour Browser utility can see printer services (screee...
ادامه مطلب
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 Let's block ads! بخوانید...
ادامه مطلب
In OneNote 2013, let's say you're currently editing some text in a regular text box/field: Now I want to exit this text box and move the cursor somewhere else on the page. Pressing Escape doesn't work, neither do the usual suspects (Ctrl+Enter, Alt+Enter, etc.). Can I exit the box with a keyboard shortcut of some kind? I have looked at the official page for OneNote 2013 keyboard shortcuts to no avail. Let's block ads! بخوانید...
ادامه مطلب
I know that I have to get to the advanced BIOS setting,s but how, specifically, do I do this? ...
ادامه مطلب
I've got an old laptop (Thinkpad T60, 32 bit, 7 years old) ruing Linux Mint, on which I'd like to install Windows as well. However, I can't get it to boot from the flash drive containing the Windows installation image: After writing the Windows installation image to the flash drive (dd if=win.iso of=/dev/sdc bs=1M), it is being displayed as a UDF device. GParted is not able to read any information ("Waing: unrecognised disk label"), but contents can be accessed after mounting. When restarting the computer with the flash drive coected, it is not being recognized as bootable device at all. When writing another image to the same flash drive using the same method, booting from it works fine. Aft...
ادامه مطلب
I am ruing Win 7 Home, SP1 I am having search problems and this Reg Key: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows Search is missing. Please advise ...
ادامه مطلب
In my php.ini, I see this option called Command buffer size, which is set to 4096. However, what is this and what exactly does this do? In what cases would you want to increase (or decrease) this limit? I tried googling around but came up empty. ...
ادامه مطلب
I'm feeling a bit dumb because I'm sure I'm missing something simple, but I'm trying to set up an IPsec coection between two Strongswan clients using RSA "sigkeys." The documentation says that leftsigkey and rightsigkey are used to provide the public RSA keys for the two participants, but I caot figure out how to provide the private key for the "left side" participant. The documentation doesn't mention a way to do so, and this being asymmetric cryptography, of course that left side would need its private key provided somehow (confirmed by the message in the debug log: "no RSA private key found for..."). I've scoured the Strongswan documentation and website and the Inteet in general, and I ju...
ادامه مطلب
Hi on a dell latitude laptop with Windows 10, for a specific user account keyboard doesn't work after the login screen. But it starts working back only when we launch on-screen keyboard application. And it also continues to work even after we close the on-screen keyboard. So far we've tried to uninsall keyboard driver but this didn't solve our problem. And nothing suspicious on system start. Any help is appreciated. Let's block ads! بخوانید...
ادامه مطلب
People who have a subscription to the Microsoft Action Pack Network (https://partner.microsoft.com/en-us/membership/action-pack) get access to a bunch of products with legitimate license keys provided (https://www.microsoft.com/Licensing/servicecenter/home.aspx). In once case, I've noticed that they provide a download for a title and the key as well; however, when the software is downloaded the key seems to be bued into the image and ultimately does not match up to the key provided on the site. Keys are being checked with ProduKey (http://www.nirsoft.net/utils/product_cd_key_viewer.html). So to recap, how are Multiple Activation Key (MAK) products that come off the MS site licensed, or where...
ادامه مطلب
It doesn't appear to have a lot of hotkeys per se, but it is navigable with the keyboard. When the How do you want to open this file? dialog appears, you can press Tab, Down, Space, End, Space to produce the normal Open with browser dialog. From there, Alt+Up moves up one level. To select an item, you can type its name and press Enter, or press Shift+Tab to move into the main area, in which you can use the arrow keys and Enter to open a folder or choose a file. Let's block ads! بخوانید...
ادامه مطلب
I'm coming from using plain old RSA with OpenSSL for all my asymmetric encryption needs, which I leaed fairly well, but I'm having a bit of a hard time wrapping my head around the OpenPGP protocol. Therefor, this is going to be a few questions. In my Debian box, using GPG, upon creation of a master key in the current keychain, I noticed the default creation of a subkey. I leaed, after a bit of reading, that GPG manages keys this way automatically; the master key used strictly for signing and the subkey used strictly for encryption. This led me to believe it that they just had different names for a private and public key: The master key (like the private key) was used to sign data that only t...
ادامه مطلب
So as the title says, I bricked my laptop. I'm not that good at explaining but let me try. I reformatted my laptop and installed the drivers given by the acer support, driver and manual site. and noticed my speakers aren't working. I opened my laptop to check if the speakers are still okay or the pins might have been discoected. So it was still okay, after a couple of minutes searching, I found out I needed to update my BIOS. and so I did (yes I checked the version first). everything was doing well as plaed except for some reason there was an error on memory block 0xFFFFF100. it didn't give me any more details except Error on Memory Block 0xFFFFF100 and decided to shut it self down. I re sta...
ادامه مطلب
After 3 years of use, Windows indicates a problem with the BIOS and the machine is unable to boot with a linux rescueCD. Attempts to upgrade the BIOS indicate success, however, the machine does not seem to boot the BIOS. Monitor indicates no signal If the BIOS is foobar, what can be done to correct or re-install? What diagnostic can be performed? Procedures / actionable suggestions are appreciated. Let's block ads! بخوانید...
ادامه مطلب