tag:blogger.com,1999:blog-44830612884863127152024-03-12T20:50:45.068-07:00My Geeky NotesFuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-4483061288486312715.post-86921635083356739282017-11-26T19:23:00.002-08:002017-11-26T19:23:47.859-08:00Running Task Scheduler by GroupI have been en counting an error, setting up my python to run automatically by Windows Task Scheduler as i only have the domain credentials.<br />
<br />
The Windows Task Scheduler keep pop up an error whenever i try to save the domain user's password for the task ( on selecting <span style="background-color: white; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px;">"Run whether user is logged on or not"" </span>mode)<br />
<br />
As an alternative, i set the scheduler to run using "group"<br />
<br />
<div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Pick <code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">Run only when user is logged on</code>.</div>
<div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Click <kbd style="background-color: #e1e3e5; border-radius: 3px; border: 1px solid rgb(173, 179, 185); box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; display: inline-block; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 11px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4; margin: 0px 0.1em; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Change user or group</kbd> (it says <strong style="border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">group</strong> right there :)</div>
<div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
type in <code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">users</code> and click <kbd style="background-color: #e1e3e5; border-radius: 3px; border: 1px solid rgb(173, 179, 185); box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; display: inline-block; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 11px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 1.4; margin: 0px 0.1em; padding: 0.1em 0.6em; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; white-space: nowrap;">Check Names</kbd> and Click Ok</div>
<div style="background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
and you application will run interactively for all users in the group <code style="background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">users</code>.</div>
Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0tag:blogger.com,1999:blog-4483061288486312715.post-15787126658255212952017-01-20T01:43:00.003-08:002017-01-20T01:43:46.255-08:00Robocopy FTWrecently i having issues to copy files to remote location where the network is slow.<br />
<br />
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<br />
<br />
<pre>Robocopy "C:\UserFolder" "C:\FolderBackup" /e /Z /log+: logcopy.txt</pre>
<pre> </pre>
<pre>first syntax is source address</pre>
<pre>second is destination</pre>
<pre>/e is for copy all contents including empty directories of SourceFolder to DestinationFolder:</pre>
<pre>/Z is to re-do/continue on error/network fails </pre>
<pre>last one is log location.</pre>
Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0tag:blogger.com,1999:blog-4483061288486312715.post-31415237762808081262016-08-01T20:42:00.001-07:002016-08-01T20:44:03.830-07:00Offscreen ApplicationI have been experiencing off-screen with my firefox, many times since i start using Surface Pro 4 (yeah, Surface Pro 4 baby! ).<br />
<br />
So here a tips to get my application ( or any application ) on screen back.<br />
<br />
You just need to press ALT + Spacebar at your keyboard, and below popup will show.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmxcukg3OOUCgDWtNvYJysagLPUQh8BItkwQP48F_ctOwOgwHz5S1me1oqRTHETqJnOEnVj6-UlpTc_hnXUp5dV-dvtcb01-Ya2pA-BTOnXwIa-5ZOX3tQNg19eo49kGFbuQAwHltJsNEv/s1600/Step2B.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmxcukg3OOUCgDWtNvYJysagLPUQh8BItkwQP48F_ctOwOgwHz5S1me1oqRTHETqJnOEnVj6-UlpTc_hnXUp5dV-dvtcb01-Ya2pA-BTOnXwIa-5ZOX3tQNg19eo49kGFbuQAwHltJsNEv/s320/Step2B.jpg" width="320" /></a></div>
<br />
<br />
Choose Move. and use the keyboard arrow to navigate it back to your screen. Boom!<br />
<br />
<br />Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0tag:blogger.com,1999:blog-4483061288486312715.post-17663450856250634402015-09-07T21:02:00.000-07:002015-09-07T21:02:03.901-07:00Close open session on shared directory\shared folderclick run or windows to run below application<br />
<br />
<span style="background-color: white; color: #070f14; font-family: Verdana, Tahoma, 'Nimbus Sans L', arial, sans-serif; font-size: 12px;">fsmgmt.msc</span><br />
<span style="background-color: white; color: #070f14; font-family: Verdana, Tahoma, 'Nimbus Sans L', arial, sans-serif; font-size: 12px;"><br /></span>
<span style="background-color: white; color: #070f14; font-family: Verdana, Tahoma, 'Nimbus Sans L', arial, sans-serif; font-size: 12px;">Browse to the session, to see current session connected to your shared folder and user. Click close connection\kill.</span>Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0tag:blogger.com,1999:blog-4483061288486312715.post-28587857484746701152015-02-24T06:00:00.002-08:002015-02-24T06:00:28.957-08:00MySQL INSERT INTO VALUES and SELECT multiples row of data<span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;">Found a way to insert into a table some value i've and one i get from a select from other table</span><br />
<span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;"><br /></span>
<br />
<pre class="lang-sql prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><span class="kwd" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: darkblue; margin: 0px; padding: 0px;">INSERT</span><span class="pln" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="kwd" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: darkblue; margin: 0px; padding: 0px;">INTO</span><span class="pln" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;"> table1 </span><span class="kwd" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: darkblue; margin: 0px; padding: 0px;">VALUES</span><span class="pln" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="pun" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;">(</span><span class="str" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: maroon; margin: 0px; padding: 0px;">"string"</span><span class="pun" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;">,</span><span class="pln" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="pln" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: maroon; margin: 0px; padding: 0px;">10</span><span class="pun" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;">,</span><span class="pln" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="pun" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;">[</span><span class="pln" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;">int</span><span class="pun" style="border-image-outset: initial; border-image-repeat: initial; border-image-slice: initial; border-image-source: initial; border-image-width: initial; border: 0px; color: black; margin: 0px; padding: 0px;">]).</span></code></pre>
<span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;"><br /></span><span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;">I have the value of ''string" and the 10, but i've to find that [int] from a select like this:</span><br />
<span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;"><br /></span>
<pre class="lang-sql prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">SELECT</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> idTable2
</span><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">FROM</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> table2
</span><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">WHERE</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">...</span></code></pre>
<span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;">Solutions:</span><br />
<span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;">Use an </span><code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">insert ... select</code><span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;"> query, and put the known values in the </span><code style="background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;">select</code><span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;">:</span><br />
<span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;"><br /></span>
<pre class="lang-sql prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">insert</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">into</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> table1
</span><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">select</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="str" style="border: 0px; color: maroon; margin: 0px; padding: 0px;">'A string'</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">,</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="lit" style="border: 0px; color: maroon; margin: 0px; padding: 0px;">5</span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">,</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> idTable2
</span><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">from</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> table2
</span><span class="kwd" style="border: 0px; color: darkblue; margin: 0px; padding: 0px;">where</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: black; margin: 0px; padding: 0px;">...</span></code></pre>
<span style="color: #222222; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="background-color: white; font-size: 15px; line-height: 19.5px;">Issue that may come out:</span></span><br />
<span style="color: #222222; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="background-color: white; font-size: 15px; line-height: 19.5px;"><br /></span></span>
<span class="comment-copy" style="background-color: white; border: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16.8999996185303px; margin: 0px; padding: 0px;">A problem I've found with this approach is that if the <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 1px 5px;">SELECT</code> returns zero records then the statement succeeds but no data is <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; margin: 0px; padding: 1px 5px;">INSERT</code>.</span><span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16.8999996185303px;"> – </span><a class="comment-user" href="http://stackoverflow.com/users/9642/neil-c-obremski" style="background-color: white; border: 0px; color: #0c65a5; cursor: pointer; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16.8999996185303px; margin: 0px; padding: 0px; text-decoration: none; white-space: nowrap;" title="4442 reputation">Neil C. Obremski</a><span style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16.8999996185303px;"> </span><span class="comment-date" dir="ltr" style="background-color: white; border-bottom-style: none; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; color: #999999; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16.8999996185303px; margin: 0px; padding: 0px;"><a class="comment-link" href="http://stackoverflow.com/questions/15523597/mysql-insert-into-values-and-select#comment32887014_15523688" style="border-bottom-style: none; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; color: #999999; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;"><span class="relativetime-clean" style="border: 0px; margin: 0px; padding: 0px;" title="2014-02-13 01:52:18Z">Feb 13 '14 at 1:52</span></a></span>Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0tag:blogger.com,1999:blog-4483061288486312715.post-53343998885478352572015-01-11T04:42:00.002-08:002015-01-11T04:42:31.113-08:00Android : Toast inside a fragmentHello,<br />
<br />
another tips. I come around an error of<br />
<br />
<blockquote class="tr_bq" style="background: rgb(255, 255, 255); border: 0px; font-family: 'Trebuchet MS', 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 23px; line-height: 1.3; margin: 0px 0px 7px; padding: 0px; vertical-align: baseline;">
the method getApplicationContext() is undefined</blockquote>
<br />
while i try to toast inside a fragment. TO remove the error,simple replace the toast<br />
<br />
<br />
<span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #2b91af; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">Toast</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">.</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">makeText</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">(</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">getApplicationContext</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">(),</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;"> </span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">(</span><span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #2b91af; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">String</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">)</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">data</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">.</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">result</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">,</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">
</span><span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #2b91af; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">Toast</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">.</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">LENGTH_LONG</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">).</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">show</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">();</span><br />
to<br />
<br />
<span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #2b91af; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">Toast</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">.</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">makeText</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">(</span><span style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; white-space: inherit;">getActivity</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">(),</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;"> </span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">(</span><span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #2b91af; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">String</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">)</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">data</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">.</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">result</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">,</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;"> </span><br />
<span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;"> </span><span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #2b91af; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">Toast</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">.</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">LENGTH_LONG</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">).</span><span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">show</span><span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8048000335693px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">();</span><br />
<br />
Cheers.<br />
<br />Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0tag:blogger.com,1999:blog-4483061288486312715.post-36931886793892100602014-05-21T20:48:00.001-07:002014-05-21T20:48:14.567-07:00Freeze multiple column in excel<br />
On occasion where i want to freeze multiple column in excel, i just need to highlight the cell next to it as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj31XasFm2ZfA4q25gC9ifggtZJnXtr6xiMJ_lZfb77k2RRRBQaQnobTBQ-jJoSaMnqp7WILeeHrNDGC-j0n9rpfpoJpLnU1LIWOv24hItgxRdqZsj7ldcuyNEDg_BW5ADyFX7l9RSkgDtS/s1600/d1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj31XasFm2ZfA4q25gC9ifggtZJnXtr6xiMJ_lZfb77k2RRRBQaQnobTBQ-jJoSaMnqp7WILeeHrNDGC-j0n9rpfpoJpLnU1LIWOv24hItgxRdqZsj7ldcuyNEDg_BW5ADyFX7l9RSkgDtS/s1600/d1.png" height="320" width="275" /></a></div>
<br />
For above example D1,<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbqXYwtKacR3gyjqHqVwsIrKMTJgJ2cfZQkLEUGoqP7HFA6YG6njjEREuJGlr5MMJmr7jdT0F4FGl9Ra01Uxxvp2S34YsUtLrBUKvCX1_vWUoCvTcNxBQQYeMZKeicw7mAMfA_Y_4c0XRR/s1600/d2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbqXYwtKacR3gyjqHqVwsIrKMTJgJ2cfZQkLEUGoqP7HFA6YG6njjEREuJGlr5MMJmr7jdT0F4FGl9Ra01Uxxvp2S34YsUtLrBUKvCX1_vWUoCvTcNxBQQYeMZKeicw7mAMfA_Y_4c0XRR/s1600/d2.png" height="171" width="320" /></a></div>
<br />
click view> Freeze panes.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4Mvo_eE4AyJ8wGtIz952Sf5-flYXTdvA8cjTzhxHukFaJhS7wNfS8zXLOhateb6mZFjSEZY5Tm54s2FbzBDzokJkb9dX_WDEog0EzMWoZvZhtWlrPOyeHwyH_lRo1hNJsUwHKJGcHKHJT/s1600/d3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4Mvo_eE4AyJ8wGtIz952Sf5-flYXTdvA8cjTzhxHukFaJhS7wNfS8zXLOhateb6mZFjSEZY5Tm54s2FbzBDzokJkb9dX_WDEog0EzMWoZvZhtWlrPOyeHwyH_lRo1hNJsUwHKJGcHKHJT/s1600/d3.png" height="167" width="320" /></a></div>
<br />
Now all column from D on wards are freeze.<br />
<br />
<br />
<br />Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0tag:blogger.com,1999:blog-4483061288486312715.post-8671224981388652782014-01-27T20:33:00.001-08:002014-01-27T20:33:11.383-08:00Password Protect WordPress Attachments (files)I had a website where users can upload important file to share. i used one of the option provided by web host in the cp called, 'Secured folder'. so other people on the net cannot access the file.<br />
<br />
Well, recently the option no longer supported, and i had to look around on the net to find a simpler solution other than subscribing to an '<i>additional services'. </i><br />
<br />
so i found one, which is <a href="http://www.idowebdesign.ca/wordpress/password-protect-wordpress-attachments/">this</a>.<br />
<br />
<div style="border: 0px; color: #404040; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; outline: none; padding: 0px 0px 1.3em;">
You might have some sections of your WordPress site that are only accessible for your WordPress user. Pretty easy to protect the page or post in WordPress for only the registered user but what about the attachments of the post/page (files, images)?</div>
<div style="border: 0px; color: #404040; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; outline: none; padding: 0px 0px 1.3em;">
They won’t be protected by default, this means if a request is made directly to the file it can be accessed without any password. There is potentially the solution where you protect the files in a directory with htaccess password, but do you really want to manage new set of username and password outside or WordPress? Not really.</div>
<div style="border: 0px; color: #404040; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; outline: none; padding: 0px 0px 1.3em;">
Here is the solution, use htaccess to check if a user is logged in the WordPress site when accessing the files area, if not then redirect to the WordPress login page. Here is the new .htaccess:</div>
<div style="border: 0px; color: #404040; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; outline: none; padding: 0px 0px 1.3em;">
# BEGIN WordPress<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" /><IfModule mod_rewrite.c><br style="border: 0px; margin: 0px; outline: none; padding: 0px;" />RewriteEngine On<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" />RewriteBase /<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" /><strong style="border: 0px; margin: 0px; outline: none; padding: 0px;">RewriteCond %{REQUEST_URI} ^.*uploads/.*<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" />RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" />RewriteRule . /wp-login.php?redirect_to=%{REQUEST_URI} [R,L]</strong><br style="border: 0px; margin: 0px; outline: none; padding: 0px;" />RewriteRule ^index\.php$ – [L]<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" />RewriteCond %{REQUEST_FILENAME} !-f<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" />RewriteCond %{REQUEST_FILENAME} !-d<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" />RewriteRule . /index.php [L]<br style="border: 0px; margin: 0px; outline: none; padding: 0px;" /></IfModule><br style="border: 0px; margin: 0px; outline: none; padding: 0px;" /># END WordPress</div>
<div style="border: 0px; color: #404040; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; outline: none; padding: 0px 0px 1.3em;">
We simply have protected the whole uploads area and redirect to login if the user is not logged. You can protect a different directory.</div>
<br />
basically just create a file called .htaccess <i>(note that.htaccess is the extension, if you create .htaccess.php for examples, it wont work)</i> with the code above and place it inside the folder that you want to protect.<br />
<br />
Cheers.<br />
<br />Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com068000 Ampang, Selangor, Malaysia3.1588 101.75744593.0319645 101.5960844 3.2856354999999997 101.91880739999999tag:blogger.com,1999:blog-4483061288486312715.post-33924940369429943422014-01-20T22:50:00.001-08:002014-01-27T20:33:55.369-08:00No more connections can be made to this remote computerRecently i come to a problem where too many people try to access a shared folder on windows XP.<br />
<br />
i have come to this solution on the net, hope it works.<br />
<br />
<br />
<div style="background-color: white; font-family: tahoma, arial, sans-serif; font-size: 13px; margin-bottom: 1em; margin-top: 1em; padding: 0px;">
When using Windows XP Professional as a server for more than 10 client pc, maybe you will encounter this kind of error;</div>
<blockquote style="background-color: #f4f4f4; border: 1px solid rgb(225, 225, 225); clear: both; color: #555555; font-family: tahoma, arial, sans-serif; font-size: 13px; height: 73.59375px; padding: 1em;">
<div style="margin-bottom: 1em; margin-top: 1em; padding: 0px;">
No more connections can be made to this remote <a class="alrptip" href="http://dailytroubleshooting.com/hack-computer/" style="color: #666666; font-weight: bold; text-decoration: none;">computer</a> at this time because there are already as many connections as the computer can accept.</div>
</blockquote>
<div style="background-color: white; font-family: tahoma, arial, sans-serif; font-size: 13px; margin-bottom: 1em; margin-top: 1em; padding: 0px;">
This error is caused by the limitation of Windows XP Professional to 10 connection only. To solve this problem, you have to edit your registry. Follow this steps;</div>
<div style="background-color: white; font-family: tahoma, arial, sans-serif; font-size: 13px; margin-bottom: 1em; margin-top: 1em; padding: 0px;">
1. Click START -> RUN<br />
2. Type <i>regedit</i><br />
3. Go to \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon<br />
4. Look for <i>cachedlogonscount</i><br />
5. Replace its value to your desired number of connection, for example 15.</div>
<div style="background-color: white; font-family: tahoma, arial, sans-serif; font-size: 13px; margin-bottom: 1em; margin-top: 1em; padding: 0px;">
That’s it!<br />
<br />
<br /></div>
Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0tag:blogger.com,1999:blog-4483061288486312715.post-26795229630536608462013-05-29T02:11:00.003-07:002013-05-29T02:16:37.331-07:00Initate MySQL<span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20.796875px;">1. Start mysql.exe, the MySQL monitor:</span><br />
<blockquote style="background-color: white; color: #333333; font-family: 'courier new'; font-size: 13px; line-height: 1.3em; margin: 1em 20px;">
C:\Program Files\mysql\mysql-5.0.77-win32\bin> mysql.exe -h localhost --user=root -p</blockquote>
<span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20.796875px;">2. Create the user and set the password:</span><br />
<blockquote style="background-color: white; color: #333333; font-family: 'courier new'; font-size: 13px; line-height: 1.3em; margin: 1em 20px;">
mysql> CREATE USER theusername@localhost IDENTIFIED BY 'thepassword';</blockquote>
<span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20.796875px;">3. Make sure the new user appear in the user table:</span><br />
<blockquote style="background-color: white; color: #333333; font-family: 'courier new'; font-size: 13px; line-height: 1.3em; margin: 1em 20px;">
mysql> SELECT * FROM mysql.user;</blockquote>
<span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20.796875px;">4. Create the database:</span><br />
<blockquote style="background-color: white; color: #333333; font-family: 'courier new'; font-size: 13px; line-height: 1.3em; margin: 1em 20px;">
mysql> CREATE DATABASE yourdatabase;</blockquote>
<span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20.796875px;">5. Make sure your database was created:</span><br />
<blockquote style="background-color: white; color: #333333; font-family: 'courier new'; font-size: 13px; line-height: 1.3em; margin: 1em 20px;">
SHOW DATABASES;</blockquote>
<span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20.796875px;">6. Grant all privileges for your new database to your user:</span><br />
<blockquote style="background-color: white; color: #333333; font-family: 'courier new'; font-size: 13px; line-height: 1.3em; margin: 1em 20px;">
mysql> GRANT ALL ON yourdatabase.* to theusername@localhost;</blockquote>
<span style="background-color: white; color: #333333; font-family: Georgia, serif; font-size: 13px; line-height: 20.796875px;">7. Done. Now you got a new database and a new user with all privileges.</span>Fuadhttp://www.blogger.com/profile/04744489533105683874noreply@blogger.com0