Posts

Showing posts from September, 2018

CHKDSK Is Not Available For RAW Drives

Answer : " The type of the file system is RAW. " means that CHKDSK was unable to determine the file system used on the drive, and considers it to hold unknown data. CHKDSK is made for verifying the filesystem data structures, and it doesn't make sense to verify something it doesn't know which way is correct. (Try spell-checking a text in a language you can't read.) That the filesystem is not recognized means the "inconsistencies" are at a level beyond CHKDSK's expertise. However, the fact that you are able to boot from said filesystem confuses the hell out of me. One possibility is that there is some sort of malware (or anti -malware) that is preventing CHKDSK access to the raw disk device. Run a RootkitRevealer scan and see if it shows anything interesting. If you have a Windows 7 install disc, try running CHKDSK from its "Repair" mode.

Backup Raspberry Pi Sd Card Ubuntu Code Example

Example: how to backup raspberry pi sd card sudo dd bs = 4 M if = / dev / sdb of = raspbian . img

Clearing TPM Does Not Ask For New Password, But "change Owner Password" Asks For The Old One

Image
Answer : I had the same problem. This is what I found after a lot of searching: Later versions of Windows 10 do not allow you to set, save or change the TPM owner password by default. The password is generated by windows, used by windows to configure the TPM then discarded. That way nobody can tamper with the TPM after it has been activated. In effect, the owner password no longer exists. You can disable this security feature by changing a registry value, clearing the TPM and rebooting. After that, you will be able to set and change the TPM owner password. See this article: https://technet.microsoft.com/en-us/itpro/windows/keep-secure/change-the-tpm-owner-password?f=255&MSPPError=-2147217396 After reading the article, I decided to leave things as they are, with the new Windows default (i.e. no way to access or change TPM owner password). You only need the TPM owner password if the PC security is being centrally managed in an enterprise setup with the need for a security admin

Background Image With Color Overlay Css Code Example

Example 1: how to have a background image with a color overlay /* Working method */ .tinted-image { background : /* top, transparent red, faked with gradient */ linear-gradient ( rgba ( 255 , 0 , 0 , 0.45 ) , rgba ( 255 , 0 , 0 , 0.45 ) ) , /* bottom, image */ url ( image.jpg ) ; } Example 2: background image overlay html { background : url ( http://lorempixel.com/800/600/nature/2 ) ; background-size : cover ; box-shadow : inset 0 0 0 2000 px rgba ( 255 , 0 , 150 , 0.3 ) ; } Example 3: make background overlay css #element-with-background-image { position : relative ; background-image : url ( "//spin.atomicobject.com/wp-content/uploads/20170324102432/portfolio-tips-feature-image.jpg" ) ; } #color-overlay { position : absolute ; top : 0 ; left : 0 ; width : 100 % ; height : 100 % ; background-color : black ; opacity : 0.6 ; } Example 4: overlay co

Best Approach To Write Html In Js InnerHTML Or DOM Code Example

Example 1: javascript innerhtml document . getElementById ( "example" ) . innerHTML = "Paragraph changed!" ; Example 2: js innerHTML document . getElementById ( "Test" ) . innerHTML = "<p style='color:red;'>Test</p>" ;

Batch Convert H.265 Mkv To H.264 With Ffmpeg To Make Files Compatible For Re-encoding

Answer : Yes, using ffmpeg . Open a terminal and direct it to the directory containing the H.265 encoded files, assuming you have ffmpeg and the appropriate libraries installed and assuming they are in MKV format copy and paste the following into the terminal window. INPUT="$1" for i in *.mkv ; do ffmpeg -i "$i" -bsf:v h264_mp4toannexb -sn -map 0:0 -map 0:1 -vcodec libx264 "$i.ts" mv "$i.ts" "$i.mpg" sleep 3 done There you have it. This will convert to h.264 in an MPG container in the same directory. Explanation of the command switches: for i in *.mkv ; do ... done This sets up all .mkv files in a directory to be included in the batch process. This may be changed to accommodate the container extension of the files you wish to process. ffmpeg -i "$i" Executes the program ffmpeg and calls for files to be processed. -bsf:v activates the video bit stream filter to be used. h264_mp4toannexb - Is

Can't Find File Executable In Your Configured Search Path For Gnc Gcc Compiler

Answer : I'm guessing you've installed Code::Blocks but not installed or set up GCC yet. I'm assuming you're on Windows, based on your comments about Visual Studio; if you're on a different platform, the steps for setting up GCC should be similar but not identical. First you'll need to download GCC. There are lots and lots of different builds; personally, I use the 64-bit build of TDM-GCC. The setup for this might be a bit more complex than you'd care for, so you can go for the 32-bit version or just grab a preconfigured Code::Blocks/TDM-GCC setup here. Once your setup is done, go ahead and launch Code::Blocks. You don't need to create a project or write any code yet; we're just here to set stuff up or double-check your setup, depending on how you opted to install GCC. Go into the Settings menu, then select Global compiler settings in the sidebar, and select the Toolchain executables tab. Make sure the Compiler's installation director

A Binary Indexed Tree Code Example

Example: dfenwick tree code c++ // C++ code to demonstrate operations of Binary Index Tree # include <iostream> using namespace std ; /* n --> No. of elements present in input array. BITree[0..n] --> Array that represents Binary Indexed Tree. arr[0..n-1] --> Input array for which prefix sum is evaluated. */ // Returns sum of arr[0..index]. This function assumes // that the array is preprocessed and partial sums of // array elements are stored in BITree[]. int getSum ( int BITree [ ] , int index ) { int sum = 0 ; // Iniialize result // index in BITree[] is 1 more than the index in arr[] index = index + 1 ; // Traverse ancestors of BITree[index] while ( index > 0 ) { // Add current element of BITree to sum sum += BITree [ index ] ; // Move index to parent node in getSum View index -= index & ( - index ) ; } return su

Codepen Login/singup Form Code Example

Example: login and register form codepen Some of the codes that can help : 1. https://codepen.io/ehermanson/pen/KwKWEv 2. https://codepen.io/trangsihung/pen/zbwGx 3. https://codepen.io/Mhmdhasan/pen/JbJzZv 4. https://codepen.io/suez/pen/RpNXOR

Imshow Cmap Code Example

Example: plt.imshow grayscale plt . imshow ( arr , cmap = 'gray' , vmin = 0 , vmax = 255 )

0f To C Code Example

Example: convert fahrenheit to celsius import java . util . Scanner ; public class Main { public static void main ( String args [ ] ) { Scanner sc = new Scanner ( System . in ) ; int far = sc . nextInt ( ) ; int cel = ( far - 32 ) * 5 / 9 ; System . out . printf ( "%d Fahrenheit is %d Celsius" , far , cel ) ; } }

Codeigniter Redirect -- The URI You Submitted Has Disallowed Characters

Answer : CodeIgniter checks all URI segments for disallowed characters. This happens by white listing allowed characters. Which ones are allowed can be checked in /system/application/config/config.php in the $config['permitted_uri_chars'] variable. permitted_uri_chars are the characters that CodeIgniter accepts in your URI.The default value is set to something like. $config['permitted_uri_chars'] = 'a-z 0-9~%.:&_\-'; By default only these are allowed: a-z 0-9~%.:_- Leave blank to allow all characters -- but only if you are insane. %22 comes for " .You can add this in permitted_uri_chars list. Try this may help but is not recommended , in your application/config/config.php change: $config['permitted_uri_chars'] = ''; #keep it blank to allow all characters $config['allow_get_array'] = TRUE; $config['enable_query_strings'] = TRUE;

C# WPF - ScrollViewer + TextBlock Troubles

Answer : This works: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Name="Scroller"> <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="100" Width="{Binding ElementName=Scroller, Path=ViewportWidth}" TextWrapping="Wrap" Text="Some really long text that should probably wordwrap when you resize the window." /> </ScrollViewer> </Window> Without more detail, the best I can do is provide the standard way of doing this. Basically, host your element (which has a minimum size) in a scroll viewer; when th

Boot Strap Loader Code Example

Example 1: bootstrap loader <div class= "spinner-border text-primary" role= "status" > <span class= "sr-only" >Loading...</span> </div> <div class= "spinner-border text-secondary" role= "status" > <span class= "sr-only" >Loading...</span> </div> <div class= "spinner-border text-success" role= "status" > <span class= "sr-only" >Loading...</span> </div> <div class= "spinner-border text-danger" role= "status" > <span class= "sr-only" >Loading...</span> </div> <div class= "spinner-border text-warning" role= "status" > <span class= "sr-only" >Loading...</span> </div> <div class= "spinner-border text-info" role= "status" > <span class= "sr-only" >Loading...</sp

Printing Double Values In C Code Example

Example: print double in c # include <stdio.h> int main ( ) { double d = 123.32445 ; //using %f format specifier printf ( "Value of d = %f\n" , d ) ; //using %lf format specifier printf ( "Value of d = %lf\n" , d ) ; return 0 ; }

Angular ViewChildren

decorator Parameter decorator that configures a view query. See more... Description Use to get the QueryList of elements or directives from the view DOM. Any time a child element is added, removed, or moved, the query list will be updated, and the changes observable of the query list will emit a new value. View queries are set before the ngAfterViewInit callback is called. Metadata Properties : selector - The directive type or the name used for querying. read - Used to read a different token from the queried elements. emitDistinctChangesOnly - The QueryList#changes observable will emit new values only if the QueryList result has changed. When false the changes observable might emit even if the QueryList has not changed. Note: * This config option is deprecated , it will be permanently set to true and removed in future versions of Angular. Further information available in the Usage Notes... Options Usage notes import {AfterViewInit, Component, Direct

32 Bits Max Value Code Example

Example 1: 16 bit max unsigned 16 bit = 0 - 65,535 signed 16 bit = -32,768 - 32,767 Example 2: 32 bit integer limit (2,147,483,647)10 (7FFFFFFF)16 (11111111111111111111111111111111)2

Anyway To Change Href Of Link With No Id And No Jquery?

Answer : window.onload=function() { var links = document.links; // or document.getElementsByTagName("a"); for (var i=0, n=links.length;i<n;i++) { if (links[i].className==="checkout_link" && links[i].title==="Checkout") { links[i].href="someotherurl.html"; break; // remove this line if there are more than one checkout link } } } Update to include more ways to get at the link(s) document.querySelector("a.checkout_link"); // if no more than one document.querySelectorAll("a.checkout_link"); // if more than one to be even more selective: document.querySelector("a[title='Checkout'].checkout_link"); Lastly newer browsers have a classList if (links[i].classList.contains("checkout_link") ... window.onload = function() { alert(document.querySelector("a[title='Checkout 2'].checkout_link").href); } <a href="x.html" class=

C Wlie Loop Examples

Example: WHILE loop in c while( a < 20 ) { printf("value of a: %d\n", a); a++; }

Auto Layout: Y Position As The Max Of Two Values

Image
Answer : Here's one way to think about it: create a constraint that the top of playButton is greater than or equal to the bottom of myView1 plus 10, another constraint that the top of playButton is greater than or equal to the bottom of myView2 plus 10, and then a third constraint that the top of playButton be at the top of the shared superview at a low priority. The two inequalities will make sure the button is below the two views. However, that leaves ambiguity. The button could be anywhere below both. The third constraint can't be satisfied as such, but the auto layout system will try to get as close as possible. This resolves the ambiguity. The button will be as close to the top as possible while still being below both views. This can actually be simplified. You could sort of combine one of the inequalities with the low-priority equality. Have one constraint that the top of playButton is greater than or equal to the bottom of myView1 plus 10. Have a second constrain