For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Sunday, February 28, 2016

how to include js file in JavaScript code

How to include js file in JavaScript code

Sometime you need to include js file in javaScript code. below is the code that will solve this problem.

<script type="text/javascript">//<![CDATA[
document.write('<script src="url_path/js/js-file.js"><\/script>');
}
//]]>
</script>
Share:

delete multiple emails in Gmail basic HTML mode


How to delete multiple emails in Gmail basic HTML mode

Sometime you have slow internet connect, so at that time you will not able to open gmail in standard mode. at that time you will open it in HTML mode.
It is okay. now when you want to delete multiple emails(100 emails at a time) then you need to click checkbox one by one. this will take many times and frustration.
here is the solution for this types of situation. see below image and follow instructions.
.















Share:

Monday, February 08, 2016

XSS Exploits


XSS Exploits

It is XSS, It is Web site hacking. It is cross site scripting (XSS). 
The most usual form of Web site hacking . hackers force a site to perform certain actions like inject a client side scripting code (JavaScript) mixed with submitted content.


so that when a user visits a Web page with the submitted content, the malicious script gets downloaded automatically in his web browser and gets executed.

Using this types of hacking user's cookies and session stolen and sent to site of the attacker.
the user may get redirected to a targeted Web site for instance.
XSS may also be used for user account hacking. When the attacker is able to steal the session cookie value, he may be able to access to the user account as if it was the real user.

Prevention of XSS Exploits

XSS vulnerabilities can be avoided by properly encoding HTML using entities for <, >, " and '. Escaping of HTML characters on online forums can also be avoided by using bbcodes usually offered there.

The htmlpecialchars() function can be helpful in this regard as it converts content automatically into HTML entities. It also converts single quotes by using ENT_QUOTES as second argument. The strip_tags() function also removes PHP and HTML tags from string.
Share:

Saturday, February 06, 2016

update control value in C# Thread

How to update control value in C# Thread.



Use below sample of code:

Thread t1=new Thread();
String b="";
int all=0;
 private void button5_Click(object sender, EventArgs e)
 {
         
            t1 = new Thread(new ThreadStart(MyCodeRun));  t1.Start();
 }

void MyCodeRun()
{
           while (String.IsNullOrEmpty(b) || String.IsNullOrWhiteSpace(b))
            {
                this.BeginInvoke(new MethodInvoker(changeValue));
                all = all + 1;
                System.Threading.Thread.Sleep(1000);
            }
 }

 private void changeValue()
{
            label1.Text =all + "";
}
Share:

Friday, February 05, 2016

JSON parse in PHP

JSON parse in PHP



Suppose you want to parse listed below JSON data in PHP and you only needed to print objectId values. you can see here 3 records under merchants value "RPEZF3MRM39Z0"

-----------------------------------------------------------------------
{
"appId": "0QA16KMMVJAQR",
"merchants": {
"RPEZF3MRM39Z0": [{
"objectId": "O:S1MXC6FCY6GDW",
"type": "UPDATE",
"ts": 1453110818494
}, {
"objectId": "O:S1MXC6FCY6GDW",
"type": "UPDATE",
"ts": 1453110818913
}, {
"objectId": "P:SYD46NHH64EQG",
"type": "CREATE",
"ts": 1453110818913
}]
}
}
------------------------------------------------------------------------

php code:

suppose $st is hlding the above json data.

$json_a=json_decode($st,true);
foreach ( $json_a['merchants']['RPEZF3MRM39Z0'] as $objectId )
{
    echo $objectId['objectId']."</br>";
}




Share:

Wednesday, February 03, 2016

Video Cutter

Video Cutter

A Windows based Video cutter application. compatible with Windows 7, Windows 8,Windows 10 for 32 and 64 bit.

You do not stop or pause movie while cutting any part from video. just watch video while my application cut the part which you set.

Video Cutter

Video Cutter



Cut part/parts of large video files. This can be useful for cutting favorite or removing unwanted sections of video, such as commercials, outtakes and trailers.


The application is easy to use and has a simple, standard interface. What is really noticeable about this application is the speed.

Overall, Free Video Cutter is a relatively lightweight application that has good options to choose from and to select portion. It is rapid at standard conversions and the user interface is uncluttered and standard. If you want a basic video cutter application, then Free Video Cutter is a good choice.

Key features include:
Support for numerous formats including AVI, MP4, FLV, WMV, MOV, VOB, and 3GP.
Loss-less video cutting quality.
Rapid file processing.
Standard user interface.


Download links:

Download all the files and remove ".txt" extension. extract it.
Password is VideoCutter

http://agalaxycode.blogspot.com/2012/01/video-cutter-file-1.html
http://agalaxycode.blogspot.com/2012/01/video-cutter-file-2.html
http://agalaxycode.blogspot.com/2012/01/video-cutter-file-3.html
http://agalaxycode.blogspot.com/2012/01/video-cutter-file-4.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-5.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-6.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-7.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-8.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-9.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-10.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-11.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-12.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-13.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-14.html
http://agalaxycode.blogspot.com/2012/01/video-cutter-file-15.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-16.html
http://agalaxycode.blogspot.com/2012/02/video-cutter-file-17.html


Share:

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip