Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

April 21, 2017

Now Sign Into Microsoft Account Without Password

U.S. tech giant Microsoft has announced a new feature wherein users can now just use their smartphone to sign in to their account.

The company is enabling the new option as part of the iOS and Android Microsoft Authenticator app.

"The process is easier than standard two-step verification and significantly more secure than only a password, which can be forgotten, phished, or compromised," said Alex Simons, Director of Program Management, Microsoft Identity Division, in a statement.

Just add your account to the Android or iOS Microsoft Authenticator app, then enter your username as usual when signing in somewhere new. Instead of entering your password, you will get a notification on your phone. Unlock your phone, tap "Approve", and you are in.

Using your phone to sign in with PIN or fingerprint is a seamless way to incorporate two account "proofs" in a way that feels natural and familiar, Simons added.

Bootstrap Tricks And Tips

Bootstrap is full of incredible features but can seem too complex for many of us. You simply cannot remember all the functions or cannot take one week off to study its documentation. Many times even experienced users get surprised when they discover some of its hidden gems.

I have carefully chosen some of the best tips and tricks that I have used in my Bootstrap coding career so far and I would like to share them with you.

For a better reading experience, I divided them into 4 groups.

If you would have suggestions for some more tricks, share them with me in comments.




Bootstrap Components

navbar, footer

How to open a navbar dropdown on hover

A standard behaviour of Bootstrap dropdowns is that they open on click. It has its pros and cons and I usually keep it as default. If you would like to open dropdowns on hover, it is not a complicated process to achieve it.

We will need to change two things and we will apply our changes only if the viewport's wider than 768px (i.e. navbar is not collapsed).

First, add this CSS rule to your stylesheet after loading the Bootstrap's CSS. It is quite straightforward - if the viewport's wider than 768px and you hover above a .dropdown link, a .dropdown-menu opens.

Second, if the parent link should point to an URL too, we will need  to add a bit of JS code to change the .dropdown links' onclick behaviour. 

How to change navbar height

When you want to change the navbar height, you will need to adjust more things than simply adding a new height value for .navbar. 

In the following code, I outline an approach how to change your navbar's height to 80px. 

How to create sticky footer

Create a sticky footer for your website following these steps:

1. Create a footer element and set its position to absolute with bottom offset 0. 2. Set a fixed height for it. (In my example, it will be 80px).
3. Add bottom padding to your element, set it to the same value as the footer's height.

Bootstrap Grid

How to make columns same height

This is a classical problem. You have content boxes with different content but you want them to have the same height. A solution to this problem will be a smart usage of flexbox on the Bootstrap rows.

This approach consists of these steps:

1. Create a .row-flex and apply it to your content boxes' parent row.
2. Columns in the .row-flex row will have same height now.
3. Usually do not mix Bootstrap with my components and I have all the           backgrounds, padding, etc. of the content boxes declared in its child element -    .content. To make everything work, all you need to do is just to set a height: 100% to the .content boxes.

How to add vertical spacing to columns

To add some vertical spacing to your columns easily, use the following simple CSS rule that gives bottom margin of 30px to every Bootstrap column. 

How to use your own classes instead of columns and rows

Many people simply do not like the Bootstrap way of writing the code with columns and rows such as:

To achieve it, you will need to use Bootstrap {LESS} .make-row() and .make-*-column() mixins.

How to change ordering of columns on mobile

A quite useful feature of the Bootstrap grid is an ability to order columns differently on mobile devices and differently on desktops. 

All you need to do is to use .col-(breakpoint)-push-(number) and .col-(breakpoint)-pull-(number) classes to push or pull the columns on the specified breakpoint out of its original place.

I know it sounds a bit complicated and usually, it takes me some time to visualise the outcome but let's have a look at it in an example. In the following code, the first column will appear as a first item on mobiles but as a second item on tablets and desktops.

In the following code, the first column will appear as a first item on mobiles but as a second item on tablets and desktops.

How to show or hide elements on mobile

If you need to quickly and easily hide an element only on xs devices, there is a .hidden-xs class that you can use. 

Similarly, you can use a .hidden-(breakpoint) class for the rest of the breakpoints too and combine them together, i.e. use classes .hidden-lg, .hidden-md, .hidden-sm.

On the other hand, if you want to show an element only on certain devices, you can use .visible-(breakpoint)-(display) classes. Note a slight difference there - you have to use a display property there too. Possible values for the (display) part of the class name are block, inline-block and inline. So, if you need to display an element as a block on large devices, just add a .visible-lg-block class to it.

How to disable responsiveness

There can be situations when you would prefer your page to behave as a non-responsive. These could be when preparing your web page for print or generating output for PDF.

Basic steps to disable responsiveness:

Omit a
Set a fix width for your .container. E.g., .container {width: 1000px !important;}

April 13, 2017

Set Static Port SQL Server 2012

How to assign a static port to a SQL Server named instance

While Books Online clearly mentions the steps to Configure a Server to Listen on a Specific TCP Port we still see people missing out on one small but important detail in these steps: they forget to delete the entry (0 or some random port) for dynamic port. This firstly results in confusion and occasionally can result in connectivity problems as well. Let me explain how using an example from one of our lab setups.

As a first step, let’s see what the ‘administrator’ (in this case, yours truly Smile) had done:


As you can see, they have added the static port for ‘IPAll’ with a value of 1450. That part is fine. The problem though is they forgot to remove the entries for the dynamic ports (0 or some random port). That means that when they restarted SQL, the dynamic port setting is still valid. In fact if we query sys.tcp_endpoints, you will still see the engine thinks it is listening on dynamic port:

SELECT        name, protocol_desc, type_desc, state_desc, is_admin_endpoint, port,        is_dynamic_port, ip_address 
FROM            sys.tcp_endpoints

The important observation is that the engine reports that it is still using a dynamic port. It does not report the static port number 1450 which we selected in Configuration Manager. Let’s double-check in the errorlog to see if indeed the static port is being picked up at all. And lo and behold:

Server is listening on [ ‘any’ 1450]. 
Server is listening on [ ‘any’ 1450]. 
Server is listening on [ ‘any’ 49626]. 
Server is listening on [ ‘any’ 49626].

In our case, sqlservr.exe has a PID of 1240. Using the command netstat –ano, we can see what it is listening on.

  Proto  Local Address       Foreign Address                State                  PID 
  TCP      0.0.0.0:1450                0.0.0.0:0                           LISTENING             1240 
  TCP      0.0.0.0:49626             0.0.0.0:0                           LISTENING             1240 
  TCP      127.0.0.1:49627          0.0.0.0:0                           LISTENING             1240 
  TCP      192.168.1.101:1450    192.168.1.200:49386      ESTABLISHED       1240 
  TCP      192.168.1.101:1450    192.168.1.200:49396      ESTABLISHED       1240 
  TCP      [::]:1450                      [::]:0                                   LISTENING             1240 
  TCP      [::]:49626                   [::]:0                                   LISTENING             1240 
  TCP      [::1]:49627                  [::]:0                                   LISTENING            1240

So it is not only listening on the static port, but also on the dynamic port 49626. The DAC is listening on TCP port 49627. The values with a local address of [::] are the IPv6 ‘All’ address.

So depending on what got cached earlier in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SNI11.0\LastConnect on the client (you can find some detail about the LastConnect registry key and the caching mechanism in this KB article), the client might attempt to connect to the previous dynamic port (which is still valid based on our observation above.)

FYI, if we run NetMon, we can see that the SSRP response from the SQL Browser correctly gives back 1450 as the port for this named instance:


For clarity I’ve reproduced the response from SQL Browser (using the SSRP protocol) back to my client (SQLCMD.exe):

.^.ServerName;SOMESERVER;InstanceName;SOMEINSTANCE;IsClustered;No;Version;11.0.2100.60;tcp;1450;;

From the above it is clear that SQL Browser is correctly sending the static port assignment. But if you are like me, I feel uneasy till I fix the root cause, which is to delete the dynamic port assignment!

To summarize here is what we saw in this walkthrough:

The official steps (captured in Books Online) to assign a static port for a named instance involve also deleting the value (0 or some random port) for the dynamic port.
Failure to delete the dynamic port value in SQL Configuration Manager will cause SQL to listen on both the static as well as the dynamic ports.
This means that clients will succeed to connect to the erstwhile dynamic port if they had that cached in the LastConnect client side registry key.
For clients which do not have cached connection details, SQL Browser seems to pickup the static port and sends that back to the client.
So follow the steps in the BOL article to the T and delete the dynamic port value right after you type in the static port value, and in any case before you restart the instance.
FYI the steps to fix a static port for the Dedicated Admin Connection (DAC) are in the KB article How to configure SQL Server to listen on a specific port under the section ‘Configuring an instance of SQL Server to use a static port’.

April 12, 2017

D Language's Official Compiler is Open Source

Long held back by proprietary licensing issues, the D language's official compiler is now open source for all, a first step toward broadening its user base.


The D language, long an underdog among programmers, got a significant boost this past week when its developers received permission to its reference compiler as an open source project.

DMD, the reference compiler for D, has been encumbered by legacy licensing, courtesy of Symantec. The license made it problematic to distribute the compiler in conjunction with other open source software -- for instance, in a Linux distribution -- and often sparked confusion about what it permitted.

[ Get started with functional programming, including examples in F#.  Attack of the one-letter programming languages.  Keep up with hot topics in programming with Info World's App Report newsletter. ]

All that changed when Symantec finally gave permission to allow DMD to be under the highly permissive Boost License.

Two other open source D compilers exist, GDC and LDC, but both have typically lagged in terms of their feature support for the language.

DMD's licensing is one likely reason why the D language, originally created as an evolutionary expansion of C/C++, has not enjoyed wider adoption. Most other recently created languages, such as Go and Rust, have their reference implementations available as open source projects.

Supporters of D cite many features that put it in the same class as Rust and Go in terms of convenience and safety: fast compilation times, garbage-collected memory management (with manual memory management also available), and strong interoperation with C/C++. But it stands out thanks to its static introspection functions and code-generation features, which allow compile-time optimizations that would be difficult in other languages.

Freeing up DMD means one fewer obstacle to wider acceptance of D, but not automatically so. D co-creator Andrei Alexandrescu has cited three key obstacles D would need to overcome: How its use of garbage collection by default alienated many C/C++ programmers, its "historical lack of vision," and the fact that it remains minimally used though it's been around for years. Relicensing DMD can address the first of those by allowing a broader base of developers to build more standard-library additions that don't depend exclusively on D's garbage-collected memory management.

But D also faces strong competition from other languages. Much of the potential user base for D may already have made commitments to Rust and Go, and newcomer languages like Nim are seeking their own comfort zones between security, speed, and convenience. Still, D can potentially make a case for itself in the face of those odds, and it has now added one more way to do so.

Microsoft Buys Startup To Boost Its Cloud

Software giant Microsoft has bought startup Deis that specialises in containers -- a modern way to develop and deploy software.

The deal is seen as a boost to Microsoft's cloud because software containers are termed as the new building blocks of cloud-based applications. 

According to a report in Fortune on Monday, the containers constitute a hot category as many businesses are turning to third-party public clouds -- like Microsoft Azure and Amazon Web Services -- to run their applications. 

"Deis gives developers the means to vastly improve application agility, efficiency and reliability through their Kubernetes container management technologies," said Scott Guthrie, Executive Vice President Microsoft in a blog post.

According to Microsoft, the company has seen explosive growth in both interest and deployment of containerised workloads on Azure. 

The company expected that the Deis' technology simplified it for customers to work with Microsoft's existing container portfolio including Linux and Windows Server Containers and Azure Container Service.

April 5, 2017

How to edit PDF File

We recommend PDFs be converted to a DOC, RTF, ODG or another file format before editing them. After the file is edited, it can be saved as as updates PDF. Below are the stepd converting a file using a software program or online resources.





Free tools to edit PDF files


we highly recommend the Oracle PDF Import Extension for OpenOffice Draw and PDFill as free tools for editing PDF files. We  found PDF Import Extension to be the most useful free program because of its ability to convert almost any PDF file. Also, PDFill can convert images contained in your PDF into image, as well as edit PDF objects. It is available for all major platforms, including Mac. PDFill can come in handy when you want with form fields, decrypt a PDF, and perform another features not available in the PDF Import Extension.

To edit a PDF file using the PDF Import Extension, follow the steps below.

1. If you don't already have OpenOffice installed on your computer. Download and install OpenOffice. This is a complete suite of free productivity software that includes OpenOffice Draw.

2. After installing OpenOffice, run the PDF Import Extension.

3. Next, open the program OpenOffice Draw.

4. Once open, navigate to the PDF you want to edit and open it.

5. After the PDF has been open, edit any text field by double-click it. If you want to add new text, click the Text link at the bottom of the window, and then click where you want to add text.

6. Finally, after you have finished editing the file click the PDF link to export the file as a PDF.

Although this is a fantastic free solution for editing a PDF, the PDF Import Extension does have some limitations. It does not currently support PDF forms, table conversions, or the decrypting of protected files. If you are running Microsoft Windows, many of these limitations can be avoided by also using PDFill.

Below are the steps to edit and otherwise manipulate a PDF using PDFill.

1.Download and install PDFill.

2. Open the PDFill PDF Editor if you want to edit a PDF or the PDFill PDF Tools if you want to encrypt, decrypt, merge, add headers, or perform other quick tasks.

3. If you are editing a file, after PDFill PDF Editor is open, click File, select Open New PDF Project, and browse to the PDF you want to edit.

March 15, 2012

Microsoft's New Software Makes You Speak In 26 Languages

Computer giant Microsoft has reportedly created a software dubbed the "Universal Translator" that can convert English language spoken to it into 26 different languages. 

Universal Translator
Frank Soong and Rick Rashid -- from the Microsoft headquarters in Redmond, Washington -- created the software which can also speak in the user's own voice, the Daily Mail reported. The scientists hope that the software will one day allow visitors to foreign countries have conversations with other people, even though they do not speak the same language. Soong said his breakthrough could help language students and might also work with navigational devices. Hypothetically, it could be installed into a smart phone meaning tourists have a ready made translation device sitting in their pockets. "We will be able to do quite a few scenario applications. For a monolingual speaker travelling in a foreign country, we'll do speech recognition followed by translation, followed by the final text to speech output in a different language, but still in his own voice," Soong said. Soong and Rashid created the software with colleagues at the Microsoft Research Asia in Beijing, the company's second-largest research lab. The device needs around one hour to get used to a person's voice, and then works by comparing the words that have been recorded with stock models for the target language.