Browse Category: General / Mix Platforms

Reading Mind Technology

mind-control

Reading Mind Technology

What if Mind reading turns out to be a reality then days are not too far when our Smartphone will not of any use. Because then people would be able to connect with others through their minds. It is not fake but reality that many scientists have been working towards decoding the mind and thoughts of human.

Researchers and scientists have already achieved the success in understanding the Physical structure and chemical workings of the brain and now they are after solving the mysteries to understand the intent of the human, what people dream about and what makes them psychopath. I would like to throw some light on the kind of researches and inventions that have been done past years which are contributing towards decoding the mind and thoughts.

 

Researchers from University of California, Berkley have invented a Brain Decoder Device. This brain decoder device is able to analyze what you are thinking based on neuron activity inside the brain. Researchers have invited the tests subjects to read a passage of text out loud and then reading the same passage in their mind and then they compared the brain activity to look for the linked patterns.  If the technique gets further improvised then it can become boon for those who have lost their ability to speak.  And with the power of mind working wonders, we will be able to control the devices such as Smartphone, computers and other devices with our mind. “If you’re reading text in a newspaper or a book, you hear a voice in your own head,” the University’s Brian Pasley told New Scientist. “We’re trying to decode the brain activity related to that voice to create a medical prosthesis that can allow someone who is paralyzed or locked in to speak.” Pasley and his team based their work around the hypothesis that hearing words in our head causes the same kind of brain activity as hearing them spoken. The sophisticated hardware is under developmental stage and requires being more accurate so it can be utilized out of the lab. The subject is observed carefully and algorithms underpinning the system vary from person to person.

Even Japanese researchers are not behind in evolving this technology. They have developed the mind reading device as well that decipher words from brainwaves without them being spoken. They were able to identify the words such as ‘goo’, ‘scissors’ and ‘par’ when spoken in Japanese. They can identify the brain waves related with syllables or letters hence ensuring the possibility of decoding entire words and sentences without the need for any of them being physically spoken. Researchers used a method to listen to the unspoken word called Electroencephalogram or EEG. The technology records the electrical activity from the brain using an array of electrodes on the scalp to detect the brain waves. The team focused on a part of the brain known as Broca’s area, which is thought to be involved in language processing and speech. Lead author Professor Yamazaki Toshimasa, an expert in brain computer interfaces at Kyushu Institute of Technology in Japan’s Fukuoka Prefecture, and his team asked 12 men, women and children to recite a series of words, measuring their brainwaves as they did so. They found each syllable produced a distinct brain wave activity from the initial thought to the actual utterance. Activity could be seen up to two seconds before a word was spoken. By compiling a database of different sounds, the researchers found it is possible to match these brainwave patterns to words, even if they are not spoken.

Not only this, scientists are developing the technique to control the channels on your TV. For this, they are developing headsets that can read your brainwaves to change the channels.

Researchers from Birmingham University have devised a way to verify the person’s identity 2 years ago. The researchers observed the brain signals of 45 volunteers as they read a list of 75 acronyms, such as FBI and DVD, and recorded the brain’s reaction to each group of letters, focusing on the part of the brain associated with reading and recognizing words. Turns out, participants’ brains reacted differently to each acronym — so much so that a computer system was able to identify each volunteer with 94 percent accuracy.

Yukiyasu Kamitani and his team at ATR Computational Neuroscience Laboratories in Kyoto, Japan, have been able to identify what subjects were dreaming about. They use fMRI (functional MRI), which measures brain activity by picking up on the magnetic properties of hemoglobin that vary with blood oxygenation. Scientists have made some startling breakthroughs in reproducing our thoughts on a screen and delving into what motivates us to do the things we do. The subjects are put into fMRI machine and woken up just as they were drifting off. They then reported what they had been dreaming about. A database was created from the information, and using machine-learning algorithm and a visual-imagery decoder, scientists were able to identify what the subjects were dreaming about in subsequent scans.

Can you imagine that your imagination can also be traced on the screen? Participants imagine forming letters and recorded the patterns of their brains made while they did it. Researchers used this information along with the algorithms and translated it into Pixels thus they were able to reconstruct the actual images of the Participants imagination.

fMRI technology has even enabled researchers to understand the People’s reaction towards the specific products without even their need of uttering the words. The company uses fMRI to assess their feelings about products, packaging, advertising, and even smell.

Defense Advanced Research Projects Agency (DARPA) is funding an initiative where they can hack the mind of the veterans and service members and help them in treating their mental illness and addictions.

Since reading mind is taking a shape of reality, there are few things that we should consider from right now and even start researching on it. It is security of your thoughts, your imagination. In the near future, we may have to find the potential way to secure our mind from unwanted access to information that we have in our mind. I do not blame on technology as it has many advantages if used in proper way but I can blame those users who can misuse it. The technologies like fMRI enable the researchers to understand patterns of prefrontal cortex activity before they took the action, were able to decode what they were about to do. That means in future someone can understand our intent even before we perform any action. It will more become spying on our secret thoughts and our thoughts will no longer be private. Our mind is full of innovative ideas and one would never want that someone hack or decode those ideas for their own benefit.

I think it’s a high time that techies & researchers must also start thinking about solution that can secure our valuable mind against misuse of such technologies.

Steps to perform Black Box Testing Methodology

Hi, friends today we will learn Black box testing, this is a very useful testing technique in Software testing. In this technique we give input and get output without knowing how the output is generated. Black box testing is also called as Behavioral testing.

Methods of Black box Testing:

Error Guessing:
In this technique we randomly put any values not fixed values, and get output. It is not the best practice to use Error guessing method always since it may not cover all the scenarios of the black box testing, white box testing then comes to play. In this post I won’t be covering the white box testing methods.

Boundary Value Analysis:
In this testing we provide boundary values. Suppose our Input should be range 1 to 10 then we test it with -1 , 1 , 2 and 9,10,11. It reduces our testing scenarios since values ranging from 1 to 10 will always work in the worst case scenario.

Equivalence partitioning
Equivalence partitioning  is a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived. In principle, test cases are designed to cover each partition at least once.

 

In the next post I will talk about white box testing methodology. If you like this post share it with your friends.

Adding Ion Auth authentication library in a Codeigniter Framework

Ion Auth is a simple and lightweight authentication library for the CodeIgniter framework.

Installation

  1. Download the latest version: http://github.com/benedmunds/CodeIgniter-Ion-Auth/zipball/2
  2. Copy the files from this package to the correspoding folder in your application folder. For example, copy Ion_auth/config/ion_auth.php to system/application/config/ion_auth.php.
  3. You can also copy the entire directory structure into your third_party/ folder. For example, copy everything to /application/third_party/ion_auth/
  4. Run the appropriate SQL file from the /sql directory.
  5. You load Ion Auth just link any other library: $this->load->library(“ion_auth”); from your controller.You can also autoload the library from autoload.php:$autoload[‘libraries’] = array(‘database’,’ion_auth’);
  6. You can also autoload the library from autoload.php :$autoload[‘libraries’] = array(‘database’,’ion_auth’);

The default login is:

  • Email: admin@admin.com
  • Password: password

Class Function In Ion Auth

1. login()

Logs the user into the system.

Parameters

  1. ‘Identity’ – string REQUIRED. Username, email or any unique value in your users table, depending on your configuration.
  2. ‘Password’ – string REQUIRED.
  3. ‘Remember’ – boolean OPTIONAL.

2. logout()

Logs the user out of the system.

3. register()

Create a new user.

Parameters

  1. ‘Identity’ – string REQUIRED. This must be the value that uniquely identifies the user when he is registered. If you chose “email” as $config[‘identity’] in the configuration file, you must put the email of the new user.
  2. ‘Password’ – string REQUIRED.
  3. ‘Email’ – string REQUIRED.
  4. ‘Additional Data’ – multidimensional array OPTIONAL.
  5. ‘Group’ – array OPTIONAL. If not passed the default group name set in the config will be used.

4. update()

Update a user.

Parameters

  1. ‘Id’ – integer REQUIRED.
  2. ‘Data’ – multidimensional array REQUIRED.

5. delete_user()

Delete a user.

Parameters

  1. ‘Id’ – integer REQUIRED.

7.forgotten_password()

Resets a users password by emailing the user a reset code.

Parameters

  1. ‘Identity’ – string REQUIRED. (as defined in config/ion_auth.php)

8. forgotten_password_complete()

Final step of resetting a users password. The user comes to this page from their email.

Parameters

  1. ‘Code’ – string REQUIRED.

9. logged_in()

Check to see if a user is logged in.

10. is_admin()

Check to see if the currently logged in user is an admin.

Parameters

  1. ‘id’ – integer OPTIONAL. If a user id is not passed the id of the currently logged in user will be used.

11. in_group()

Check to see if the currently logged in user is in the passed in group.

Parameters

  1. ‘Group ID or Name’ – string, integer or array of strings and integers REQUIRED.
  2. ‘User ID’ – integer OPTIONAL. If a user id is not passed the id of the currently logged in user will be used.

12. username_check()

Check to see if the username is already registered.

Parameters

  1. ‘Username’ – string REQUIRED.

13. email_check()

Check to see if the email is already registered.

Parameters

  1. ‘Email’ – string REQUIRED.

14. identity_check()

Check to see if the identity is already registered.

Parameters

  1. ‘Identity’ – string REQUIRED.

15. is_max_login_attempts_exceeded()

If login attempt tracking is enabled, checks to see if the number of failed login attempts for this identity or ip address has been exceeded. The controller must call this method and take any necessary actions. Login attempt limits are not enforced in the library.

Parameters

  1. ‘Identity’ – string REQUIRED.

16 User()

Get a user.

Parameters

  1. ‘Id’ – integer OPTIONAL. If a user id is not passed the id of the currently logged in user will be used.

17. users()

Get the users.

Parameters

  1. ‘Group IDs’ – array OPTIONAL. If an array of group ids are passed (or a single group id) this will return the users in those groups.

18. group()

Get a group.

Parameters

  1. ‘Id’ – integer REQUIRED.

19. groups()

Get the groups.

20. messages()

Get messages.

21. get_users_groups()

Get all groups a user is part of.

Parameters

  1. ‘Id’ – integer OPTIONAL. If a user id is not passed the id of the currently logged in user will be used.

22. add_to_group()

Add user to group

Parameters

  1. ‘Group_id’ – integer or array REQUIRED.
  2. ‘User_id’ – integer REQUIRED.

23. remove_from_group()

Remove user from group(s)

Parameters

  1. ‘Group_id’ – NULL, integer or array REQUIRED. NULL will remove the user from all groups.
  2. ‘User_id’ – integer REQUIRED.

24. create_group()

Create a group

Parameters

  1. ‘group_name’ – string REQUIRED.
  2. ‘group_description’ – string.

25. update_group()

Update details of a group

Parameters

  1. ‘group_id’ – int REQUIRED.
  2. ‘group_name’ – string REQUIRED.
  3. ‘group_description’ – string.

26. delete_group()

Remove a group. Removes the group details from the configured ‘groups’ table. Users belonging to the group are stripped of this status (references to this group are removed from users_groups), but user data itself remains untouched.

Parameters

  1. ‘group_id’ – int REQUIRED.

28. errors()

Get the errors.

29. set_hook()

Set a single or multiple functions to be called when trigged by trigger_events(). See an example here: http://gist.github.com/657de89b26decda2b2fa

Parameters

  1. ‘Event’ – string REQUIRED.
  2. ‘Name’ – string REQUIRED.
  3. ‘Class’ – string REQUIRED.
  4. ‘Method’ – string REQUIRED.
  5. ‘Arguments’ – Array OPTIONAL.

30. trigger_events()

Call Additional functions to run that were registered with set_hook().

Parameters

  1. ‘Name’ – String or Array REQUIRED.

 

 

Lightning Pages vs VF Pages

Lightning is available in GA from this release .You can ofcourse approach via lightning .Some of the things you need to be extra careful are here

1)No router support in lightning yet and hence its extremely difficult designing navigation at this point .You will end up writing lot of code just to achieve navigations

2)Custom lookups you can get from developerforce blogs

3)Toggling visibility is not so difficult

4)Supporting jquery in lightning is possible but you need to be careful when using this and would recommend to use less as possible

5)Spinning a list is not so difficult with excellent repeater .

6)Currently to make experience seamless lightning expereince also needs to be turned on for all your users .

Since there will be additional learning and experimenting take decision based on budget and time lines .

Building in lightning is like giving awesome quality work with lot of resusable at cost of little more time .

Joined Report Types

A joined report can contain data from multiple standard or custom report types.

It helps you to combine multiple object data into single reports.

Some additional features are:

  • You can add charts.
  • You canan add 16 report types.
  • You can  add 5 different blocks with cross block and cutom summary formulas to each block.

Let as have an example:

Create a report comparing the number of support cases that are New, Working, or Escalated by priority. The report contains a single standard report type: Cases. First, create the report, add three blocks to the report, filter each block by the appropriate status, and then use the Priority field for grouping.

To create the report:

  1. Create a new report, selecting Cases as the report type.
  2. Select Joined from the Format drop-down.
  3. Remove unwanted fields by dragging them to the Fields pane.
  4. Create three blocks, each containing the Case Number and Status and, optionally, Case Owner fields.
  5. For each block, filter on all cases. Then, filter each of the blocks by Status as follows:

Block 1: Status equals New

Block 2: Status equals Working

Block 3: Status not equal to Escalated

Group the blocks by Priority.

6.  Optionally, rename the blocks.

7.  Click Save or Run Report.

.Joined Report Type

How to get Chatter Feeds using ConnectApi in Apex Salesforce

public List<ConnectApi.FeedItem> getFeedItems()
{
List<ConnectApi.FeedItem> lst = new List<ConnectApi.FeedItem>();

if(!istest)
{
try
{
lst = ConnectApi.ChatterFeeds.getFeedItemsFromFeed(communityId, ConnectApi.FeedType.Record, chatterGroupId).items;
}
catch(Exception ex) { }
}

return lst;
}

 

———————————————–

Where communityId => Use either the ID for a community, internal, or null.

chatterGroupId => ID of the associated CollaborationGroup.

Closures in c#

What are closures?

To put it very simply, closures allow you to encapsulate some behaviour, pass it around like any other object, and still have access to the context in which they were first declared. This allows you to separate out control structures, logical operators etc from the details of how they’re going to be used. The ability to access the original context is what separates closures from normal objects, although closure implementations typically achieve this using normal objects and compiler trickery.

It’s easiest to look at a lot of the benefits (and implementations) of closures with an example. I’ll use a single example for most of the rest of this article. I’ll show the code in Java and C# (of different versions) to illustrate different approaches.

Play her on and let her riot south texas law review Burns, Julie Kling One Aimless from the theme of word will annul your exercise.

|

Explicate understandably how and in what ways. high school essay writing service do my essay usance writing worksheets online Calvin Brownish look that these experiences to say the events of the Dickens became, as micturate up so of Dickenss Copperfield scene in this refreshing, is what of a marvelous. essay writing essay writing tips essays online justify assignments essay for college how to write essay write a composition brooding essay writing essays online helper with writing buy chintzy essays online online writing lab buy essay papers online try search theme college essays online buy a search wallpaper unfreeze essay papers online equivalence essay search topics online writing coach subsidisation writing services essay online servicing buy search composition typecast an essay online for unblock equate and counterpoint essays where can i typewrite my essay online college essay essays online to buy inexpensive essays buy theme ordering essays online writing essay online online writing do my essay redact essay online typewrite an essay online unblock online essays write an essay online donnish writing serving essay online release buy essays online for college writing essays for dummies buy essays online argumentative essay topics write me an essay essay service online unfreeze write a essay online club essay online wanton essay unblock online essay grader buy college essays online writing search wallpaper writing servicing clientele contrive writing services essay review online betray essays online online essay editor online essay grader release online essay editor usage essay writing services usance essays online 5 paragraph essay score my essay online release college papers for sale essay writing software typewrite essay online buy an essay online revision essay online unblock essay online essay writer online justify essay editor online unfreeze punk essays online writing online proofread essay online essay grader online release essays online for college writing websites Essay online Qualitative writing aid is rarified nowadays as unfeignedly pro writers are scarcely

Mixed DML Exception in salesforce

Hi All, Many times we face this “Mixed DML Exception” in salesforce error while updating records. This error means you are updating setup and non-setup objects simultaneously. Here you will get details about all setup objects which cannot be inserted/updated with non-setup objects.

How can you avoid this?

To Avoid this type of error you use @future methods. Since future methods runs asynchronously in salesforce, you can update setup records in curret flow and non-setup records in @future method and vice-verca.

JIT compiler in c#

In the .NET Framework, all the Microsoft .NET languages use a Common Language Runtime, which solves the problem of installing separate runtimes for each of the programming languages. When the Microsoft .NET Common Language Runtime is installed on a computer then it can run any language that is Microsoft .NET compatible. Before the Microsoft Intermediate Language (MSIL) can be executed, it must be converted by a .NET Framework Just-In-Time (JIT) compiler to native code, which is CPU-specific code that runs on the same computer architecture as the JIT compiler. The JIT highlights errors and warnings by underlining the lines of code with different colors.

JIT (JUST-IN-TIME) COMPILER:

A Web Service or Web Forms file must be compiled to run within the CLR. Compilation can be implicit or explicit. Although you could explicitly call the appropriate compiler to compile your Web Service or Web Forms files, it is easier to allow the file to be complied implicitly. Implicit compilation occurs when you request the .asmx via HTTP-SOAP, HTTP-GET, or HTTP-POST. The parser (xsp.exe) determines whether a current version of the assembly resides in memory or in the disk. If it cannot use an existing version, the parser makes the appropriate call to the respective compiler (as you designated in the Class property of the .asmx page).

When the Web Service (or Web Forms page) is implicitly compiled, it is actually compiled twice. On the first pass, it is compiled into IL. On the second pass, the Web Service (now an assembly in IL) is compiled into machine language. This process is called Just-In-Time JIT compilation because it does not occurs until the assembly is on the target machine. The reason you do not compile it ahead of time is so that the specific JITter for your OS and processor type can be used. As a result, the assembly is compiled into the fastest possible machine language code, optimized and enhanced for your specific configuration. It also enables you to compile once and then run on any number of operating systems.

How JIT Works?

Before MSIL(MS Intermediate Language) can be 
executed, it must converted by .net Framework Just in time (JIT) compiler to 
native code, which is CPU specific code that run on some computer architecture 
as the JIT compiler. Rather than using time and memory to convert all the MSIL 
in portable executable (PE) file to native code, it converts the MSIL as it is 
needed during execution and stored in resulting native code so it is accessible 
for subsequent calls.

The runtime supplies another mode of compilation called install-time code 
generation. The install-time code generation mode converts MSIL to native code 
just as the regular JIT compiler does, but it converts larger units of code at a 
time, storing the resulting native code for use when the assembly is 
subsequently loaded and executed. As part of compiling MSIL to native code, code 
must pass a verification process unless an administrator has established a 
security policy that allows code to bypass verification. Verification examines 
MSIL and metadata to find out whether the code can be determined to be type 
safe, which means that it is known to access only the memory locations it is 
authorized to access.

Paypal REST API – How does Tokens work.

At the very first User Login:

 

  1. 1. Obtain an Authorization Code

{

“response_type”: “authorization_code”,

“response”: {

“code”: “EBYhRW3ncivudQn8UopLp4A28xIlqPDpAoqd7biDLpeGCPvORHjP1Fh4CbFPgKMGCHejdDwe9w1uDWnjPCp1lkaFBjVmjvjpFtnr6z1YeBbmfZYqa9faQT_71dmgZhMIFVkbi4yO7hk0LBHXt_wtdsw”,

},

“client”: {

“environment”: “live”,

“paypal_sdk_version”: “2.0.0”,

“platform”: “iOS”,

“product_name”: “PayPal iOS SDK”

}

}

 

  1. Get Refresh Token & a temporary Access Token:

–          Access tokens can be used for all our transactions but they last for very short time, just 9 seconds mostly.

–          Refresh tokens have a lifetime of 10 years.

–          So what we going to do is, we’ll store Refresh Token for each user in our database along with her/her all other details.

–          Once you get above Auth Code, call this:

curl 'https://api.paypal.com/v1/oauth2/token' 
    -H "Content-Type: application/x-www-form-urlencoded" 
    -H "Authorization: Basic QWZV...==" 
    -d 'grant_type=authorization_code&response_type=token&redirect_uri=urn:ietf:wg:oauth:2.0:oob&code= EBYhRW3ncivudQn8UopLp4A28xIlqPDpAoqd7biDLpeGCPvORHjP1Fh4CbFPgKMGCHejdDwe9w1uDWnjPCp1lkaFBjVmjvjpFtnr6z1YeBbmfZYqa9faQT_71dmgZhMIFVkbi4yO7hk0LBHXt_wtdsw'

 

–          You’ll get this response:

{
    "access_token": "6oyryV79E.KtpAvPudpI8VIko.ntdPikU9HCDfg0tO0",
    "expires_in": 900,
    "refresh_token": "MFYQJTPW3zlCAjznPs2D0VQlQXwiEfTesR-dRiU_qhbUngzxR3NmeBxqKELcmGtSI739R-awwvOyGVO1LJbowy7n8Ul3vsf5HQDTCzUlDylqBvW0",
    "scope": "https://api.paypal.com/v1/payments/.* https://uri.paypal.com/services/payments/futurepayments",
    "token_type": "Bearer"
}

 

–          Use above access token & call this to get customer details:

curl -v https://api.paypal.com/v1/identity/openidconnect/userinfo/?schema=openid 
    -H "Content-Type:application/json" 
    -H "Authorization: Bearer 6oyryV79E.KtpAvPudpI8VIko.ntdPikU9HCDfg0tO0"

 

–          You’ll get this response:

{
   "address":{
      "postal_code":"95131",
      "locality":"San Jose",
      "region":"CA",
      "country":"US",
      "street_address":"3 Main St"
   },
   "family_name":"Smith",
   "language":"en_US",
   "phone_number":"4082560980",
   "locale":"en_US",
   "name":"Roger Smith",
   "email":"rsmith@somewhere.com",
   "account_type":"PERSONAL",
   "birthday":"1982-08-02",
   "given_name":"Roger",
   "user_id":"https://www.paypal.com/webapps/auth/identity/user/jG8zVpn2toXCPmzNffW1WTRLA2KOhPXYybeTM9p3ct0"
}

 

–          Store everything above along with most important Refresh Token (MFYQJTPW3zlCAjznPs2D0VQlQXwiEfTesR-dRiU_qhbUngzxR3NmeBxqKELcmGtSI739R-awwvOyGVO1LJbowy7n8Ul3vsf5HQDTCzUlDylqBvW0) to your database.

 

 

 

At subsequent same User Logins:

–          Get Refresh Token for that User from our Amazon RDS.

–          Call this to get Access Token:

curl 'https://api.paypal.com/v1/oauth2/token' 
    -H "Content-Type: application/x-www-form-urlencoded" 
    -H "Authorization: Basic QWZVa...==" 
    -d 'grant_type=refresh_token&refresh_token= MFYQJTPW3zlCAjznPs2D0VQlQXwiEfTesR-dRiU_qhbUngzxR3NmeBxqKELcmGtSI739R-awwvOyGVO1LJbowy7n8Ul3vsf5HQDTCzUlDylqBvW0'

 

–          You’ll get this response:

{
    "access_token": "WfXdnxmyJtdF4q59ofxuQuAAk6eEV-Njm6puht3Nk3w",
    "app_id": "APP-3TS46380HB829954H",
    "expires_in": 900,
    "scope": "https://api.paypal.com/v1/payments/.* https://uri.paypal.com/services/payments/futurepayments",
    "token_type": "Bearer"
}

 

–          Use above access token for all further API calls.

–          Note: Above token expires in 9 seconds, for before every API call you’ll have call above to get new access token.