Sunday, November 26, 2017

Running Task Scheduler by Group

I have been en counting an error, setting up my python to run automatically by Windows Task Scheduler as i only have the domain credentials.

The Windows Task Scheduler keep pop up an error whenever i try to save the domain user's password for the task ( on selecting "Run whether user is logged on or not"" mode)

As an alternative, i set the scheduler to run using "group"

Pick Run only when user is logged on.
Click Change user or group (it says group right there :)
type in users and click Check Names and Click Ok
and you application will run interactively for all users in the group users.

Friday, January 20, 2017

Robocopy FTW

recently i having issues to copy files to remote location where the network is slow.

It keep fails midway. i found a pretty need solution provided by MS in every PC. Below are the syntax i wrote in the cmd

Robocopy "C:\UserFolder" "C:\FolderBackup" /e /Z /log+: logcopy.txt
 
first syntax is source address
second is destination
/e is for copy all contents including empty directories of SourceFolder to DestinationFolder:
/Z is to re-do/continue on error/network fails 
last one is log location.

Monday, August 1, 2016

Offscreen Application

I have been experiencing off-screen with my firefox, many times since i start using Surface Pro 4 (yeah, Surface Pro 4 baby! ).

So here a tips to get my application ( or any application ) on screen back.

You just need to press ALT + Spacebar at your keyboard, and below popup will show.



Choose Move. and use the keyboard arrow to navigate it back to your screen. Boom!


Monday, September 7, 2015

Close open session on shared directory\shared folder

click run or windows to run below application

fsmgmt.msc

Browse to the session, to see current session connected to your shared folder and user. Click close connection\kill.

Tuesday, February 24, 2015

MySQL INSERT INTO VALUES and SELECT multiples row of data

Found  a way to insert into a table some value i've and one i get from a select from other table


INSERT INTO table1 VALUES ("string", 10, [int]).

I  have the value of ''string" and the 10, but i've to find that [int] from a select like this:

SELECT idTable2
FROM table2
WHERE ...
Solutions:
Use an insert ... select query, and put the known values in the select:

insert into table1
select 'A string', 5, idTable2
from table2
where ...
Issue that may come out:

A problem I've found with this approach is that if the SELECT returns zero records then the statement succeeds but no data is INSERT. –  Neil C. Obremski Feb 13 '14 at 1:52

Sunday, January 11, 2015

Android : Toast inside a fragment

Hello,

another tips. I come around an error of

the method getApplicationContext() is undefined

while i try to toast inside a fragment. TO remove the error,simple replace the toast


Toast.makeText(getApplicationContext(), (String)data.result, Toast.LENGTH_LONG).show();
to

Toast.makeText(getActivity(), (String)data.result,
Toast.LENGTH_LONG).show();

Cheers.

Wednesday, May 21, 2014

Freeze multiple column in excel


On occasion where i want to freeze multiple column in excel, i just need to highlight the cell next to it as below:


For above example D1,

click view> Freeze panes.

Now all column from D on wards are freeze.