Posts

Showing posts from September, 2017

Bacpac Vs Dacpac For Migrating Database To Azure

Image
Answer : As Grant said bacpac is dacpac+data.Below is one more definition that might help "A bacpac includes the schema and data from the database. A dacpac containers only the schema and not the data" You might have understood, you need bacpac. I need this process to run in the fastest way possible, so I'd be curious if one option is better for performance. We have few databases(400Gb) in Azure.we observed it is faster to import data when we load data from storage..The approach we followed was to load data into storage which is in same location as database and then import data.. SQLSERVER team tested a few options and they observed BCP is fastest compared to remaining options .. Below is how you import bcp data into azure bcp TestDB.dbo.Customer in "C:\Users\cesardl\BCP\Customer.txt" -c -U mysqlazureuser@mysqlazureservername -S tcp:mysqlazureservername.database.windows.net -P mypassword Further reading/References:

Bitbucket: Update A Fork To Merge Changes Of Master Repo?

Answer : Just like GitHub, you have to pull the commits down to your own machine, merge, and then push them back to your fork on Bitbucket. If you go to your fork on Bitbucket you can click "compare fork" to get to a page where you see incoming and outgoing commits. If you go to the "incoming" tab, you will see instructions like $ git remote add <remote_name> git@bitbucket.org:<upstream>/<repo>.git $ git fetch <remote_name> $ git checkout master $ git merge <remote_name>/master which correspond closely to the GitHub instructions. Goto your fork on bitbucket Click the Branches menu from the left navigation pane Click on the "..." button to the right of the branch and select "Compare". Or, in the url add the word “compare”. So that the URL looks like this: https://bitbucket.org/<user name>/<fork name>/branches/compare Click on the switch icon (black up/down arrows between the branch segments)

C String Compare C Programming Code Example

Example 1: statement o compare two strings in c # include <stdio.h> # include <string.h> int main ( ) { char str1 [ ] = "abcd" , str2 [ ] = "abCd" , str3 [ ] = "abcd" ; int result ; // comparing strings str1 and str2 result = strcmp ( str1 , str2 ) ; printf ( "strcmp(str1, str2) = %d\n" , result ) ; // comparing strings str1 and str3 result = strcmp ( str1 , str3 ) ; printf ( "strcmp(str1, str3) = %d\n" , result ) ; return 0 ; } Example 2: string compare in c strcmp ( leftStr , rightStr ) ; //compares ascii value and gives positive, negative or zero.

Aws Ssh Permission Denied (publickey Gssapi-keyex Gssapi-with-mic) Code Example

Example: permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). I had the same issue while using vagrant. So from my Mac I was trying to ssh to a vagrant box (CentOS 7) Solved it by amending the /etc/ssh/sshd_config PasswordAuthentication yes then re-started the service using sudo systemctl restart sshd Hope this helps.

Ascii Code For Arrow Keys Code Example

Example: keycode letters 0 48 1 49 2 50 3 51 4 52 5 53 6 54 7 55 8 56 9 57 a 65 b 66 c 67 d 68 e 69 f 70 g 71 h 72 i 73 j 74 k 75 l 76 m 77 n 78 o 79 p 80 q 81 r 82 s 83 t 84 u 85 v 86 w 87 x 88 y 89 z 90

Blank Line In Latex Code Example

Example: latex add empty line \hfill \break

Apache2 Require All Granted Code Example

Example 1: #AllowOverride none #Require all denied Require all granted Example 2: #AllowOverride none #Require all denied Order allow,deny Allow from all

ChartJS Doughnut Charts Gradient Fill

Image
Answer : ChartJS will not (properly) use gradient fill colors when drawing a linear gradient on non-linear paths like your donut chart. A linear gradient does not curve. Possibility #1 -- use a radial gradient You might experiment with a radial gradient and see if the results meets your design needs. Possibility #2 -- use a gradient stroke (a DIY project) Also, canvas's stroke will curve around a circle. If you want to "roll-your-own" gradient donut chart, here's example code and a Demo that uses a gradient strokeStyle on a circular path (see my previous answer here: Angle gradient in canvas): var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); function drawMultiRadiantCircle(xc, yc, r, radientColors) { var partLength = (2 * Math.PI) / radientColors.length; var start = 0; var gradient = null; var startColor = null, endColor = null; for (var i = 0; i < radientColors.length; i++) {

Enum Values In C Code Example

Example 1: a enum data type in c // An example program to demonstrate working // of enum in C # include <stdio.h> enum week { Mon , Tue , Wed , Thur , Fri , Sat , Sun } ; int main ( ) { enum week day ; day = Wed ; printf ( "%d" , day ) ; return 0 ; } // OUTPUT 2 Example 2: how to define a enum in c //enum <name of enumeration> { <possible choices separated by commas> } enum type_of_fuel { Gasolina , Gasoleo , Hibrido , Eletrico } ;

Change Admin Password In Gitea

Answer : From your issue, any gitea command (like gitea admin change-password --username myusername --password asecurenewpassword ) ends up with: gitea: command not found If you installed from binary, you will note that the $PATH was not modified, and gitea was called directly from its installation folder. ./gitea web So you can do the same for changing the password: cd /path/to/gitea ./gitea admin change-password --username myusername --password asecurenewpassword Note that Robert Ranjan adds in the comments: /path/to/gitea is gitea's home path, where you find folder custom . In my case gitea's home is /var/lib/gitea . From this path, you should see file: custom/conf/app.ini which is expected by default. For Current GITEA sometime it will not work by cd /path/to/gitea ./gitea admin change-password --username myusername --password asecurenewpassword You need to specify the configuration also e.g. : cd /path/to/gitea ./gitea admin change-passwor

Range Attribute Unity Code Example

Example: how to set a range for public int or float unity using UnityEngine ; public class Example : MonoBehaviour { // This integer will be shown as a slider, // with the range of 1 to 6 in the Inspector [ Range ( 1 , 6 ) ] public int integerRange ; // This float will be shown as a slider, // with the range of 0.2f to 0.8f in the Inspector [ Range ( 0.2f , 0.8f ) ] public float floatRange ; }

Android Studio 3.0 Parameter Hints Information Not Always Visible?

Image
Answer : 1. Press Alt-Enter on your method and select doesn't show hints for the current method. Then you can see a dialog in the bottom right of the android studio. select Show Parameters Hint Setting, now you can customize this functionality. and finally, select undo in the dialog. 2. File -> Setting -> Editor -> General -> Appearaance-> show parameters hint configure You can enable it by doing the following: Go to File > Settings > Editor > General > Appearance > Show parameter name hints Click Configure Language: -> Java Options -> Check Show hints even when type of expression is clear As you can see below, it is visible for all parameters regardless of type: EDIT It looks like this setting was removed in Android Studio 4.0 There are however new Inlay Hints options: Go to File > Settings > Editor > Inlay Hints > Java > Parameter hints Check Show parameter hints for:

Add To Array Unity C# Code Example

Example: add to array unity var Array = new[] {"str1", "str2"}; Array = Array.Concat(new[] {"str3"}).ToArray();

Jquery If Else Statement Code Example

Example 1: javascript if else var age = 20 ; if ( age < 18 ) { console . log ( "underage" ) ; } else { console . log ( "let em in!" ) ; } Example 2: if statements javascript if ( pros < 10 ) { console . log ( "LESS THAN 10 PROS!" ) ; } else if ( pros < 5 ) { console . log ( "LESS THAN 5 PROS!" ) ; } else { console . log ( "How many pros are there?" ) ; }

Next Sibling Css Code Example

Example 1: adjacent sibling selector /*The adjacent sibling combinator (+) separates two selectors and matches the second element only if it immediately follows the first element, and both are children of the same parent element.*/ li : first - of - type + li { color : red ; } < ul > < li > One < / li > // The sibling < li > Two < / li > // This adjacent sibling will be red < li > Three < / li > < / ul > Example 2: sibling selector css /*General Sibling*/ /*The general sibling selector selects all elements that are siblings of a specified element. The following example selects all <p> elements that are siblings of <div> elements: */ /*<div></div> <p></p>*/ div ~ p { } /*Adjacent Sibling*/ /*The adjacent sibling selector is used to select an element that is directly after another specific element. Sibling elements must have the same parent element, and "adjace

Append Data Jquery Code Example

Example 1: jquery append $ ( "p" ) . append ( " <b>Appended text</b>." ) ; Example 2: jquery append element to body $ ( ".inner" ) . append ( "<p>Test</p>" ) ; Example 3: jquery append html $ ( "p" ) . append ( " <b>You can write your Text Here </b>." ) ; Example 4: jQuery - Add Elements < ! DOCTYPE html > < html > < head > < script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" > < / script > < script > $ ( document ) . ready ( function ( ) { $ ( "#btn1" ) . click ( function ( ) { $ ( "p" ) . append ( " <b>Appended text</b>." ) ; } ) ; $ ( "#btn2" ) . click ( function ( ) { $ ( "ol" ) . append ( "<li>Appended item</li>" ) ; } ) ; } ) ; < / script > < / head > < body > <

Battery Health Check Windows 10 Code Example

Example: check battery health windows 10 powercfg/ batteryreport/ output "C:\battery-report.html

Bash Random String Code Example

Example 1: cli generate random string #purely random 12 character string openssl rand 12 # more useful random 12 character strings openssl rand -base64 12 # random hex-code sequence openssl rand -hex 12 Example 2: random string linux tr -dc A-Za-z0-9 < /dev/urandom | head -c 64 > random_text.txt

Android Studio Flutter Sdk Path Windows Code Example

Example 1: flutter sdk path flutter doctor -v Example 2: flutter sdk path where flutter

Array Unique Javascript Code Example

Example 1: javascript array unique values var arr = [ 55 , 44 , 65 , 1 , 2 , 3 , 3 , 34 , 5 ] ; var unique = [ ... new Set ( arr ) ] //just var unique = new Set(arr) wont be an array Example 2: javascript find unique values in array // usage example: var myArray = [ 'a' , 1 , 'a' , 2 , '1' ] ; var unique = myArray . filter ( ( v , i , a ) => a . indexOf ( v ) === i ) ; // unique is ['a', 1, 2, '1'] Example 3: array unique values javascript const myArray = [ 'a' , 1 , 'a' , 2 , '1' ] ; const unique = [ ... new Set ( myArray ) ] ; // ['a', 1, 2, '1'] Example 4: unique values in array javascript let uniqueItems = [ ... new Set ( items ) ] Example 5: javascript get unique values from array const myArray = [ 1 , 2 , 3 , 1 , 5 , 8 , 1 , 2 , 9 , 4 ] ; const unique = [ ... new Set ( myArray ) ] ; // [1, 2, 3, 5, 8, 9, 4] const myString = [ "

Ansible. Fast Way To Check Syntax?

Answer : This is expected behaviour according to the documentation: When ansible-playbook is executed with --check it will not make any changes on remote systems. Instead, any module instrumented to support ‘check mode’ (which contains most of the primary core modules, but it is not required that all modules do this) will report what changes they would have made rather than making them. Other modules that do not support check mode will also take no action, but just will not report what changes they might have made. http://docs.ansible.com/ansible/playbooks_checkmode.html If you would like to check the YAML syntax you can use syntax-check. ansible-playbook rds_prod.yml --syntax-check playbook: rds_prod.yml I was looking for the same, but was not satisfied by the --syntax-check option, since it does not work its way down to the roles. A more complete check can be performed with ansible-lint which also includes style-checks. But if you turn off all style-chec

Find Find Method In Python Code Example

Example: find in python def find_all_indexes ( input_str , search_str ) : l1 = [ ] length = len ( input_str ) index = 0 while index < length : i = input_str . find ( search_str , index ) if i == - 1 : return l1 l1 . append ( i ) index = i + 1 return l1 s = 'abaacdaa12aa2' print ( find_all_indexes ( s , 'a' ) ) print ( find_all_indexes ( s , 'aa' ) )