Posts

Showing posts from September, 2005

Advanced Systemcare 14,02 Serial Number Code Example

Example: Advanced SystemCare PRO 14 serial UJYHT-GRFEE-RGBTH-NJUIU-YTR5W ECRTGY-UI8U7-6543F-GHJKL-OKYTR EW4GT-YUJ2O-KU3YN-TG5EE-RB7TH YM9IU-MYNT-BR4ER-BTNYJ-LKUMY

Content-type To Be Used For Uploading Svg Images To AWS S3

Answer : As you mentioned, the correct Content-Type for SVG files is "image/svg+xml". Even if the AWS console does not provide that value in the Content-Type selection field, you can enter it anyway and S3 will accept it. AWS specifies the following in their API docs for the Content-Type header: A standard MIME type describing the format of the contents. For more information, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17. Type: String Default: binary/octet-stream Valid Values: MIME types Constraints: None For additional details see http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html

Wordpress - Correct Way To Enqueue Jquery-ui

Answer : First of all, WordPress registers jQuery UI via wp_default_scripts() . Dependencies are already set, so you only need to enqueue the script you really need (and not the core). Since you're not changing version number or anything, it is ok to only use the handle. // no need to enqueue -core, because dependancies are set wp_enqueue_script( 'jquery-ui-widget' ); wp_enqueue_script( 'jquery-ui-mouse' ); wp_enqueue_script( 'jquery-ui-accordion' ); wp_enqueue_script( 'jquery-ui-autocomplete' ); wp_enqueue_script( 'jquery-ui-slider' ); As for the stylesheets: WordPress does not register jQuery UI styles by default! In the comments, butlerblog pointed out that according to the Plugin Guidelines Executing outside code within a plugin when not acting as a service is not allowed, for example: Calling third party CDNs for reasons other than font inclusions; all non-service related JavaScript and CSS must be included locally This means loading

Css Linear Animation Code Example

Example: css animation linear animation-timing-function: linear;

Ttf Format Css Code Example

Example 1: how many fonts can i add in a css font-face @font-face { font-family : CustomFont ; src : url ( 'CustomFont.ttf' ) ; } @font-face { font-family : CustomFont2 ; src : url ( 'CustomFont2.ttf' ) ; } Example 2: @font-face @font-face { font-family : "The name of your font for your file" ; src : url ( "The link to your .ttf or .otf file" ) ; }

Whatsapp Web Url Link Code Example

Example: link whatsapp to website < ! -- link the following URL to the desired icon or button in your code : https : //wa.me/PhoneNumber (see the example below) remember to include the country code -- > < a href = 'https://wa.me/27722840005' target = '_blank' > < i class = "fa fa-whatsapp" > < / i > < / a >

Admob Account Suspended Due To "invalid Activity On The AdSense Ads Hosted On Your Website"

Answer : From googles support pages: Invalid click activity consists of any clicks or impressions that may artificially inflate an advertiser's costs or a publisher's earnings, and for which we decide not to charge the advertiser. This includes, but is not limited to, clicks or impressions generated by a publisher clicking his own ads, a publisher encouraging clicks on his ads, automated clicking tools or traffic sources, robots or other deceptive software. Basically, they want genuine user interest. Most of the generated revenue from your app may have been from one person (intentional or not) which has lead them to believe that the clicks were fake. Google uses very sophisticated Artificial Intelligence program to track user mouse pointer location on the page and using the mouse pointer behavior it decides whether it’s a legit or fake click. Sometimes the app or website owner will click the links themselves. This 30 day ban is a cooling off period. Some common ca

Tar Czf Code Example

Example: tar cmd # tar cvzf MyImages - 14 - 09 - 12. tar . gz / home / MyImages OR # tar cvzf MyImages - 14 - 09 - 12. tgz / home / MyImages

Can't Drop Foreign Key In MySQL

Answer : Please run an SHOW CREATE TABLE course; to make sure instructorID is the name of foreign key constraint . Additional: The error means MySQL searches for a foreign key constraint named "InstructorID" but there is no constraint with such name, maybe this is your column name, but you have to use the constraint name to delete foreign keys. After you run SHOW CREATE table course; you should find the fk symbol which is commonly like the one bellow: (course_ibfk_1) it may differ according to your mysql version you are using then drop the foreign key using the fk symbol as follow : alter table course drop foreign key course_ibfk_1; You need to delete the 'foreign key constraint' and the 'key'. Alter Table <table name> drop foreign key <constraint_name> Alter table <table name> drop key <column name>

Bootstrap Modal Backdrop = 'static' Not Working

Answer : I found a workaround for this issue. Once the modal has been hidden bootstrap data still remains on it. To prevent that I had the following: $('#myModal').modal('show'); //display something //... // if you don't want to lose the reference to previous backdrop $('#myModal').modal('hide'); $('#myModal').data('bs.modal',null); // this clears the BS modal data //... // now works as you would expect $('#myModal').modal({backdrop:'static', keyboard:false}); I had the same problem with Bootstrap 4.1.1 and it only worked when I added the data attributes to the html <div class="modal fade show" id="myModal" tabindex="-1" role="dialog" style="display: block;" data-keyboard="false" data-backdrop="static"> ... Similar to Daniele Piccioni but a bit more concise: $('#myModal').modal({backdrop: true, keyboard: false, show: t

Angular Invalid Host Header Code Example

Example 1: invalid host header ngrok ngrok http 8080 -host-header="localhost:8080" ngrok http --host-header=rewrite 8080 Example 2: ngrok invalid host header ngrok http --host-header=rewrite 8080

Can You Just Update A Partial View Instead Of Full Page Post?

Answer : Not without jQuery. What you would have to do is put your Partial in a div, something like: <div id="partial"> @Html.Partial("YourPartial") </div> Then, to update (for example clicking a button with the id button ), you could do: $("#button").click(function () { $.ajax({ url: "YourController/GetData", type: "get", data: $("form").serialize(), //if you need to post Model data, use this success: function (result) { $("#partial").html(result); } }); }) Then your action would look something like: public ActionResult GetData(YourModel model) //that's if you need the model { //do whatever return View(model); } Actually, if your Partial has a child action method, you can post (or even use an anchor link) directly to the child action and get an Ajax-like affect. We do this in several Views. The syntax is @Html.Action

Styling Youtube Embed Css Code Example

Example: style youtube embed video css //Add the following CSS to your code .iframe-container { position : relative ; width : 100 % ; padding-bottom : 56.25 % ; height : 0 ; } .iframe-container iframe { position : absolute ; top : 0 ; left : 0 ; width : 100 % ; height : 100 % ; }

Spin Css Code Example

Example 1: css spinning animation /* How to use : <div class="spinning"></div>*/ .spinning { animation-name : spin ; animation-duration : 1500 ms ; /* How long lasts 1 turn */ animation-iteration-count : infinite ; animation-timing-function : linear ; } @keyframes spin { from { transform : rotate ( 0 deg ) ; } to { transform : rotate ( 360 deg ) ; } } Example 2: css loading spinner .loader { border : 16 px solid #f3f3f3 ; /* Light grey */ border-top : 16 px solid #3498db ; /* Blue */ border-radius : 50 % ; width : 120 px ; height : 120 px ; animation : spin 2 s linear infinite ; } @keyframes spin { 0% { transform : rotate ( 0 deg ) ; } 100% { transform : rotate ( 360 deg ) ; } } <div class= "loader" ></div>

A Light Alternative To Gnome-system-monitor?

Image
Answer : htop it is a terminal app: sudo apt-get install htop htop htop with graph mode ProcMeter3 Look for this system monitor (GUI works with GTK1,2,3): ProcMeter3 An utility which works with LCD devices even. ProcMeter3 GUI on GTK3 Psymon Also once I tried a Psymon . This is not extremely lightweight software and written on Qt (not GTK , and therefore should work better with KDE) though despite to this fact it works well not only with Unity and Gnome, but also in other OS, like FreeBSD, MacOS, Windows etc., because it use great python-psutil Debian package. So look it closer: Nice post about Psymon Psymon project site Psymon You can try xfce4-taskmanager from Xfce or lxtask from LXDE. Neither of them pull any specific dependencies. ndicator-SysMonitor Indicator-SysMonitor does a little, but does it well. Once installed and run, it displays CPU and RAM usage on your top panel. Simple. Download from here Conky One of my personal favourites

Google Fonts Poppins Cdn Code Example

Example 1: css poppins font <style> @import url ( 'https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap' ) ; </style> Example 2: poppins cdn <link rel= "preconnect" href= "https://fonts.gstatic.com" > <link href= "https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap" rel= "stylesheet" >

Converting Djvu To Pdf AND Preserving Table Of Contents , How Is It Possible?

Answer : update: user3124688 has coded up this process in the script dpsprep . I don't know of any tools that will do the conversion for you. You certainly should be able to do it, but it might take a little work. I'll outline the basic process. You'll need the open source command line utilities pdftk and djvused (part of DjVuLibre). These are available from your package manager (GNU/Linux) or their websites (Windows, OS X). step 1: convert the file text First, use any tool to convert the DJVU file to a PDF (without bookmarks). Suppose the files are called filename.djvu and filename.pdf . step 2: extract DJVU outline Next, output the DJVU outline data to a file, like this: djvused "filename.djvu" -e 'print-outline' > bmarks.out This is a file listing the DJVU documents bookmarks in a serialized tree format. In fact it's just a SEXPR, and can be easily parsed. The format is as follows: file ::= (bookmarks <bookmark>*) bookmark

Convert Binary String To Bytearray In Python 3

Answer : Here's an example of doing it the first way that Patrick mentioned: convert the bitstring to an int and take 8 bits at a time. The natural way to do that generates the bytes in reverse order. To get the bytes back into the proper order I use extended slice notation on the bytearray with a step of -1: b[::-1] . def bitstring_to_bytes(s): v = int(s, 2) b = bytearray() while v: b.append(v & 0xff) v >>= 8 return bytes(b[::-1]) s = "0110100001101001" print(bitstring_to_bytes(s)) Clearly, Patrick's second way is more compact. :) However, there's a better way to do this in Python 3: use the int.to_bytes method: def bitstring_to_bytes(s): return int(s, 2).to_bytes((len(s) + 7) // 8, byteorder='big') If len(s) is guaranteed to be a multiple of 8, then the first arg of .to_bytes can be simplified: return int(s, 2).to_bytes(len(s) // 8, byteorder='big') This will raise OverflowError if len(s) is n

Javascript Text Animation Code Example

Example 1: text change animation css h1 :before { content : 'Original Text' ; font-size : 600 % ; animation-name : head ; animation-duration : 4 s ; animation-iteration-count : infinite ; } @keyframes head { 0% { font-size : 600 % ; opacity : 1 ; } 25% { font-size : 570 % ; opacity : 0 ; } 50% { font-size : 600 % ; opacity : 1 ; } 65% { font-size : 570 % ; opacity : 0 ; } 80% { font-size : 600 % ; opacity : 1 ; content : "Changed Text" } 90% { font-size : 570 % ; opacity : 0 ; } 100% { font-size : 600 % ; opacity : 1 ; content : "Original Text" } } Example 2: moving letters animation javascript // Wrap every letter in a span var textWrapper = document. querySelector ( '.ml3' ) ; textWrapper.innerHTML = textWrapper.textContent. replace ( /\S/g , "<span class='letter'>$&</span>" ) ; anime .timeline ( { loop : true } ) .add ( { targets :

Destroy Unity C# Code Example

Example 1: unity remove gameobject // To remove a GameObject use the function 'Destroy()' Destroy ( gameObject ) ; Example 2: unity destroy gameobject // Destroy this gameobject Destroy ( gameObject ) ; // Kills the game object in 5 seconds Destroy ( gameObject , 5 ) ; // Removes this script instance from the game object Destroy ( this ) ; // Removes the rigidbody from the game object Destroy ( GetComponent < Rigidbody > ( ) ) ; Example 3: destroy gameobject unity Destroy ( this . gameObject ) ;

.vimrc File Location Code Example

Example: where is my vimrc vi ~ / . vimrc

1x1 Rubik's Cube World Record Code Example

Example: 1x1 rubik's cube world record 8 minuites and 59 seconds