My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Wednesday, December 23, 2020

iMovie Not Enough Disk Space: How to Clear Disk Space on iMovie

Best Ways to Fix “iMovie Not Enough Disk Space” Error


iMovie is a software developed by Apple and it is their most basic video editing product. There are more advanced video editing applications of Apple, so iMovie has limitations. But still, I find it very useful as a free and default App.

But sometime you get to see an error message while importing a video. The error says - "there is not enough disk space available at the selected destination"





When we talk about “iMovie, not enough disk space” error, of course, the first thing that comes to mind is that you’ll have to clear up space to resolve the issue.


So how exactly can you reduce the space that is consumed by the iMovie app? If this is only the case, then you have a lot of options to pick from. Here’s a rundown of those options:


  • Move your files into another drive
  • Check for and delete duplicated clips
  • Export files you don’t necessarily need at the moment
  • Erase iMovie projects that are not up-to-date
  • Clear up your iMovie library of unnecessary projects and events
  • Delete clips that already have no use for you

These six are your options for resolving the “iMovie not enough disk space” error. While it may sound easy, there are steps that need to be taken to pull them off perfectly.


So cheers!

Thursday, December 3, 2020

Various Social Engineering Threats

Social engineering is the clever manipulation of people to gain access to privileged information. It can occur on the telephone, in person, or via email.


SHOULDER SURFING

Shoulder surfing refers to looking over someone's shoulder to obtain information. Be mindful of people nearby when working with sensitive business information. If you step away from your computer, lock it so that others can’t see or access confidential information.

Use a privacy screen to cover your laptop or tablet screen while in use. If you witness someone hovering, acknowledge the person to see what they need. Bring to your supervisor's attention if you are suspicious of their intentions.


TAILGATING

Tailgating is an unauthorized person attempting to gain access to secure office space. Be mindful of people entering behind you. Do not allow tailgating.

Refer anyone without a company badge to reception or security. If you feel threatened or notice suspicious behavior, report the incident to concerned department in your org. In the event of imminent harm, contact local emergency services.


EAVESDROPPING

Eavesdropping refers to secretly listening in on conversations to capture information. Be mindful of who is around when discussing or conducting company business. Do not discuss company business in hallways, shared building spaces, or public places.

Keep confidential discussions behind closed doors.


VISHING

Vishing (voice phishing) happens when you receive a phone call from someone impersonating a trusted source, like your bank, a client, or an employee. They may say there's a problem with your bank account, or credit card and direct you to a web site or phone number where you will be asked to provide personal or company information to verify your identity or account. Beware! They are trying to steal your money, identity, or gain access to organization systems. If you access the Vishing web site from your workstation or smart device, it's possible for hackers to access anything stored there.

Follow your policies and procedures; do not provide personal or payment information to unsolicited callers. Do not attempt to call the number back. Do not take direction from the caller about navigation or use of your tools and systems.

Do not disclose any information unless you are able to verify them, and they are authorized (e.g., if they state they're an employee try to reach them on IM). If you receive a call or a text you suspect to be vishing or smishing, contact spoof@majftech.com with as much information as is available.


SMISHING

Smishing happens when you receive a text message (SMS = smishing) from someone impersonating a trusted source, and the same threats apply as with Vishing.

Do not text scammers back. If you receive a call or a text you suspect to be vishing or smishing, contact spoof@majftech.com with as much information as is available.


PHISHING

Phishing is a form of social engineering in which a fraudulent message is sent to you with the intent of tricking you into opening an attachment, clicking a link, or responding to the message. Phishing typically occurs over email, but can happen during a phone call, through a chat program, in a text message, or even in-person!

Successful phishing attacks can steal your credentials (passwords), install malware on your computer, trick you into disclosing confidential company data, or convince you to take unauthorized actions that benefit the phisher. It is no surprise, that phishing is one of the most common attacks leading to data breaches you see in the news.cWith all the technological defenses in place to prevent phishing emails from landing in your inbox, it’s still one of our biggest security vulnerabilities! Our best resource in defending against phishing is YOU!



Learn the warning signs of such emails:

  • Unexpected sender or content
  • Threats, urgency, and secrecy
  • Phishing or Spam?
  • Promised lottery or super amazing deals


What to do If you think you have received a phishing email:

  • DO NOT reply to the message.
  • DO NOT click on links or open attachments.
  • DO report the email by creating a new email message, attaching the phish email, and sending to spoof@majftech.com.
  • DO NOT send or "forward" the phishing email to anyone as this can cause further exposure.
  • DO permanently delete the phishing email.
  • Does the message push for urgent action?
  • Does the message threaten bad things will happen if you don't do what it says?
  • Is it unusual to use email as authorization for wire transfer? 

GDPR and PCI DSS Intro - General Data Protection Regulation (GDPR) & Payment Card Industry Data Security Standard

General Data Protection Regulation (GDPR) is a new data privacy and security law in Europe.

When will it go into effect?
May 25, 2018.

What is the primary purpose?
To provide EU citizens with greater control over how their personal data is collected, protected and used.

To whom does this regulation apply to?
GDPR applies to how Company must handle all EU customer and employee data.

Is there a penalty for non-compliance?
Yes, the risks are significant financial penalties and legal exposure. Fines up to 4% of annual worldwide revenue or €20 million are possible.



PCI-DSS (the Payment Card Industry Data Security Standard) mandates specific security safeguards for handling credit card data.

Companies are required to adhere to PCI standards as part of our contractual agreements with banks, partners, and credit card companies. Failing to adhere to these requirements could result in significant fines and possibly termination of Companie's ability to accept credit cards for transactions.

Embedding Privacy and Security Impact Assessments into our various business processes to ensure that privacy and security are consulted throughout the lifecycle of data-related initiatives;

Formalizing processes around Data Subject Rights to ensure that we can respond comprehensively and within the timeframe set out in the GDPR;

Updating our Privacy Policies to ensure they are GDPR compliant;

Developing our Data Retention and Deletion Capabilities;

Updating our Vendor Contract Templates to ensure they are in accordance with GDPR requirements; and

Developing our Privacy Resources and Specialist Training Modules to ensure all teams have the information they need.




Eclipse : Set maximum line length for auto formatting

This is easy!

Preferences -> Java -> Code Style -> Formatter / "Edit..."

Tabs: "Line wrapping" , "Comments"

Field: "Maximum line width"



Mockito Vs EasyMock - How to use and the difference in Unit Testing

What is mocking? 

A unit test should be independent of any external resources : database, message queue etc.

Ideally, a unit test should test only one class. Mocking is a best practice when testing an object which is linked to other objects.

Example : CompanyCreateTest should only test CompanyCreate


Mockito and EasyMock:


Both are java mocking libraries for Unit Testing, and follow the same model of

  1. Mock external dependencies
  2. Setup expectations
  3. Run test
  4. Verify results

Both of the above are equivalent in features and capabilities. The essential difference exists in their usage at point 3 and 4. EasyMock needs explicit replaying and verification of Mocks and Mockito doesn't. 

Similarities :

  • Mocks concrete classes as well as interfaces
  • Supports exact-number-of-times and at-least-once verification
  • Argument matchers
  • Annotation support

Remember that for Mocking, we will use mocks in our object. So, if you are using interfaces and IOC you can write your own fake implementations and inject it in your tested object. However, writing fake implementations for every linked objects could be very fastidious. That's why we will use mock libraries.


Differences between both:

Mockito has a simplified api that results in much flatter learning curve and ease of writing and maintainability. A great benefit outlined above is the developer doesn't need to call out what mocks need to be replayed. This is handled implicitly in Mockito. That compared to Easy Mock, the learning curve is higher and results in confusion several times when new mocks are added/deleted, all the explicit references need to be accordingly handled. EasyMock results in more code than Mockito to test the same functionality.

 

A simplified EasyMock example below :

TestClassA {
 
void setup(){
//Create mock
ClassBeingMocked mock1 = EasyMock.createMock(ClassBeingMocked);
}
 
 
void testMethod(){
//Setup expectations
EasyMock.expect(mock1.getAge()).andReturn(10);
//Replay mode
EasyMock.replay(mock1);
//Test
ClassBeingTested source = new ClassBeingTested();
source.calculateAge(mock1);
//Assertions
assertEquals(50, source.getAverageAge());
//Verification mode
EasyMock.verify(mock1);
}
}

Same example in Mockito

TestClassA {
 
 
void setup(){
//Create mock
ClassBeingMocked mock1 = Mockito.Mock(ClassBeingMocked);
}
 
 
void testMethod(){
//Setup expectations
Mockito.when(mock1.getAge()).thenReturn(10);
 
//Test
ClassBeingTested source = new ClassBeingTested();
source.calculateAge(mock1);
 
//Assertions
assertEquals(50, source.getAverageAge());
 
//Verification mode
Mockito.verify(source).someInternalMethodCalled();
}
}

Using Mockito:

Definition

Mockito is a Java library used to mock objects.

Basically, you can write the following to create a fake implementation of a List :

List mockedList = mock(List.class);

And you can specify the expected behaviour of your mock for your test case :

when(mockedList.get(0)).thenReturn("first");

MockitoJUnitRunner

Mockito comes with a JunitRunner you could enable like that :

@RunWith(MockitoJUnitRunner.class)
public class TestDefaultRule
{
    @InjectMocks
    private DefaultRule defaultRule = new DefaultRule();
     
    @Mock
    private AirProductManager apManager;
     
    @Mock
    private AirProduct airProduct ;
...
}

Doing that, Mockito will create all your mocks for every objects annotated with @Mock and inject those mocks in DefaultRule that was annotated with @InjectMocks.

Inject mock without setters

The annotation @InjectMocks is very usefull when your object do not expose setter as for the object DefaultRule :

public class DefaultRule implements MarkupRule {
...
    @Autowired
    private AirProductManager airProductManager;
...

airProductManager is private and has no setters, so without the annotation @InjectMocks you would have used very tricky method to inject your mock manually.

Initialize value without setters

Sometimes, you could have some objects initialized by @Value annotation and without setters.
Exemple in TneManager :

public class TneManagerImpl implements TneManager
{
    @Value("${DimoAuthentificationCryptingStrategy.PassKey}")
    private String dimoPassKey;
    @Value("${EolAuthentificationCryptingStrategy.PassKey}")
    private String eolPassKey;
...
}

In this situation, you have a solution using ReflectionTestUtils from Spring in your setup method :

@Before
public void initialize ()
{
    ReflectionTestUtils.setField(tne, "dimoPassKey""dimo");
    ReflectionTestUtils.setField(tne, "eolPassKey""eol");
}

Mock static method

Mockito is not able to mock static method by itself. However when using static method you can mix Mockito and PowerMock.

To enable PowerMock you have to use the runner PowerMockRunner.

Example in AirThirdPartyLinkImplMockitoTest :

@RunWith(PowerMockRunner.class)
@PrepareForTest({ Lookup.class })
@PowerMockIgnore("org.apache.commons.logging.*")
public class AirThirdPartyLinkImplMockitoTest
{
...
    @Before
    public void initialize() throws Exception
    {
        // As you don't use MockitoRunner, you have to initialize all mocks with the following line
        MockitoAnnotations.initMocks(this);
...
    // o use PowerMockito to mock the static call of Lookup.getInstance()
    // A lot of stuff just to use Carbon...
    // -------------------------------------------------------------------
    PowerMockito.mockStatic(Lookup.class);
        Lookup lookup = mock(Lookup.class);
        when(Lookup.getInstance()).thenReturn(lookup);
        PNRConstructManager mgr = mock(PNRConstructManager.class, withSettings().extraInterfaces(Component.class));
        when(lookup.fetchComponent(PNRConstructManager.DEFAULT_COMPONENT_PATH)).thenReturn((Component)mgr);
 
    }

Explanations :

Enable the runner :

@RunWith(PowerMockRunner.class)

Explicitely tell which object will be mocked

@PrepareForTest({ Lookup.class })

The following line is needed in the setup method. Otherwise every annotations Mock and InjectMock will be ignored as you don't use MockitoJUnitRunner

MockitoAnnotations.initMocks(this);

and the mock of the static method :

PowerMockito.mockStatic(Lookup.class);
    Lookup lookup = mock(Lookup.class);
    when(Lookup.getInstance()).thenReturn(lookup );