
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.'">'.$...
ادامه مطلب
I created a boot image of RHEL 7.2 and configured BIOS to boot from USB. The USB boot image is recognized. I am asked to Install or check hash. After selecting Install, the following text appears on screen: [0.0000000] tsc: Fast TSC calibration failed [ OK ] Started Show Plymouth Boot Screen. [ OK ] Reached target Paths. [ OK ] Reached target Basic System. Mounting Configuration File System... [ OK ] Mounted Configuration File System. [7.920070] nouveau E[ PIBUS][0000:01:00.0] HUB0: 0x614900 0x00800000 (0x1e408200) The system hangs at this point, and is unresponsive. What could be causing this to hang/fail? 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...
ادامه مطلب
I usually work with many windows at a time so it is very inconvenience to use tab searching for windows that i need. Are there any programs help me do this? This is similar to ctrl + p in Sublime Text 3 .I tried Listary but instead of switch to the opening window it open a new windows for instance a new file in Notepad Let's block ads! بخوانید...
ادامه مطلب
I'm an L2 helpdesk guy and I have a user whose Lenovo L440 will not coect to wifi. The wifi icon in the notification area shows a red X and the "tu wireless on" button is greyed out in the Mobility Center. When she presses F8, it shows that wifi is on. The adapter is enabled and "allow to tu off to save power" is unchecked. We've reinstalled Pro/Set Wireless, and tried to install the adapter driver from the Device Manager. When I uninstalled the device there, checking the "remove driver" checkbox, it did not find the driver in Windows Update and I had to install Pro/Set Wireless from the Intel website. I've reinstalled the Hotkey Features Integration package and the Power Management driver. ...
ادامه مطلب
even with my android device coected 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? ...
ادامه مطلب
My environment is like: I have two users 'user1' and 'user2' both are in same group(say group name is 'abc') in server 'server1'. Now I have another server 'server2' which have user 'user2'. user2 in both the servers are exchanged their public keys (I mean to say authentication configured properly). Now requirement is like : I have to perform a copy operation on server2 (both source and destination folders are in server2 only) from server1 as user2(because identity file configuration done successfully as said above), but currently I have loggedin as user1, user1 doesn't have permissions to use 'su' to switch to user2 (not only user1 all users belongs 'abc' group are don't have permi...
ادامه مطلب
I HV A 24 PORT SWITCH OF DLINK WHICH HV A OPTICAL WIRED CONNECTION AND ALL COMPUTER RUN ON LAN PROVIDED BY SWITCH , I WANT TO CONNECT THAT 24 PORT SWITCH TO MY MOBILE HOTSPOT ,MEANS IF THAT 24 PORT SWITCH CAN RECEIVE WIFI SIGNAL BY MY MOBILE MY QUESTION IS THERE ANY DEVICE (LAN WIFI RECEIVER ) THAT I CAN PLUG IN BY LAN PORT IN ANY PORT , IN MY 24 PORT SWITCH . THAT WILL RECEIVE WIFI SIGNAL FR MY PHONE AND ALL MY 23 COMPUTER WILL RUN ,WITH OUT ADDING INDIVISUAL WIFI RECEIVER IN 23 PC . Let's block ads! بخوانید...
ادامه مطلب
First - yes I support old stuff... not blades and the like, Racks of 2 and 4U servers, up to 16 of them in a set. A hardware IP KVM solution in new deployments answers all of my issues, my gap currently is that I want to equip each location I support with a low cost Dongle they can coect to any troubled server (say they blow up the BIOS settings and need help or the RAID controller needs configured or maybe a server is blue screening and we need to capture the stop data after windows crashes remotely). Hardware standalone IP-KVM dongles exist and work adequately yet always need an IP configured. I am seeking a device that I could plug into any nearby working server via USB, and it coect to t...
ادامه مطلب
I just got a new laptop which is just 2 months old ruing Windows 10. Today when I checked the battery life the battery has wo down 9% which is like 4.5% per month, in this rate my battery would only last close to two years or less. What's the average wear rate of the laptop battery? I use the laptop plugged in most of the time how ever let it drain (not completely) and charge it back once in a week. So a 9% drop is like 50 charging cycles which it definitely didn't had. So this much of wearing is normal or too much? average wear rate of the laptop battery? Of course this is assuming that the battery was 100% by the time I bought it, being a brand new laptop I assume that it should be close t...
ادامه مطلب
I have a Dell Inspiron 15 laptop with factory-installed Windows 8, upgraded to Windows 8.1, and later to Windows 10. Since I have purchased a new computer, I decided to perform a factory reset on the laptop (using the Remove files and clean the drive option) in order to repurpose it. It reset flawlessly on the first try in about 5-6 hours, and runs perfectly now, but with only one issue introduced after the reset that wasn't present before: the laptop now powers itself on from a shut-down state upon opening the lid, as opposed to opening the lid and then pressing the power button (this occurs on both battery and power). To add on to that, there was even an instance where the lid was already ...
ادامه مطلب
I have a junker laptop that I want to run Linux on and just SSH into. I believe that the BGA of the videocard has some damage, do I really need to reflow this sucker before using it, or is it safe to install Linux on it, ssh in, and just keep the lid down so the monitor stays off? Let's block ads! بخوانید...
ادامه مطلب
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 have a home network built around an ancient computer that I've tued into a router, ruing Debian Wheezy. The wireless part is based on a TP-LINK TL-WN851ND PCI card on the hardware side, and uses hostapd on the software side. Now, I have recently obtained a new phone, on which I am ruing CyanogenMod 12.1 (equivalent to Android 5.1). This device can coect to my wireless network, but most network operations (e.g. downloading things) result in timeouts, requiring retries. Fetching emails over IMAP is particularly terrible, almost invariably resulting in timeout exceptions. If a coection succeeds, it's fast, but getting the coection to succeed is problematic. It is only on this network that I'm...
ادامه مطلب
In Windows 7 (64-bit Ultimate in my case), is there any way to gain only the rights of an administrator account, rather than effectively "ruing" the application as <insert administrator name here>? I am having a dilemma with MPC-HC (Media Player Classic - Home Cinema), where it requires administrator privileges to associate files with it. When I enter the credentials for an administrator account there, it essentially updates the whole environment, so the settings are applied only to the account I supplied, and not the standard account I am logged into. To be clear, I do first run the application under my standard, logged in account, and then click the "run as administrator" button avai...
ادامه مطلب
I got a wifi extender, prolink at the start of this month. The speeds were much better on the extender, while I only got 2 bars from my router which is downstairs and constant coection drops and slow speeds. But now however my extenders speed is just slow, I get full bars however the speed is about 3-4 mpbs while when I am coected to the my router, the speeds go to above 7+ mpbs. I have no idea what is going on. I would also like to point on when I set up the extender, it automically cotected to my router but I can not access the extenders IP to conifg it, which is "192.168.123.253". I cant access that site from my extender or my router. Anyone know what is going on and how to fix it or a wa...
ادامه مطلب