One of the best benefits to my VS.net like is that you can use different programming languages simultaneously. In this case we are talking about VB.net and C #. Net.
It is straightforward to add a form in C # or VB, is as simple as clicking on the project with the right mouse button and select add that we add a form / WebPage language you want.
If we try to do that with a class, we see that not everything works so well.
In this case it will be necessary to do something more.
You shall do the same as before, add, add kind of language we want, put it within the app code in a folder that we create called CScode (for file C #) or VBCode (for VB) depending on language and go to the file "web.config".
Once opened we have to add this fragment:
</compilation>
...
<codeSubDirectories>
<add directoryName="CSCode"/>
<add directoryName="CSCode"/>
</codeSubDirectories>
...
</compilation>
Once done, everything works perfectly and you can make calls between classes of different languages.
I hope you have been helpful.
Web dedicada a publicar mis avances en mis proyectos, mis investigaciones y mis frikadas.
viernes, 22 de junio de 2012
jueves, 24 de mayo de 2012
Develop Chrome Extensions IV
Some days ago i wrote how test your extensions.
Well I was planned to explain how to autoupdating your extension, so i have been trying to do it and I can not get it.
The problem has been very simple, has been imposible to get a hosting where locate a crx file to allow google chrome download the updated file.
Well, there is a solution for that. If you want your users get automatically your updates, you can upload the extension to the Chrome Market.
If you decide that you must to consider two important things
Well I was planned to explain how to autoupdating your extension, so i have been trying to do it and I can not get it.
The problem has been very simple, has been imposible to get a hosting where locate a crx file to allow google chrome download the updated file.
Well, there is a solution for that. If you want your users get automatically your updates, you can upload the extension to the Chrome Market.
If you decide that you must to consider two important things
- first time to upload something you must pay 3,85€ or 5$
- you must to start to publish your extension as test.
The second one is very important.
Let´s see: if you upload an bad product and you recibe a poor puntation, in the future you will be curtailed to be a good creator.
I recomend you to publish your extension when you will be sure that it is a good product.
martes, 8 de mayo de 2012
Developping chrome extensions III
You can feel reading this text that i am explain nothing about code. Ok it is right. I dont mind to explain developping techniques, i want to tell you steeps to get an extensin from the begin to the market.
Lets see... now you have a extension which you can add a button to a web, por example. Now its time to share it and start ti test for bugs. If you try to do it alone its imposible.
The best way is to tell it to your friends in G+ for example. Firstly you must to upload your crx file to Gdrive and share with your friends the link to this file.
How can i get a crx file?. the answer its very Easy
You must access to the extension properties page and you must check the developper mode. Now appears new buttons. One of them is "package an extension". If you click here you will be asked about the folder extension, and about a private key. If it is the first time, you must to leave blank the private key in other case you must to link to file generated first time, if you want to Chrome detects this as extension update.
After that, you will get a crx file. Now you can host this crx file where you want and share the link with your friends.
In the next chapter will learn to get automatically updates.
Lets see... now you have a extension which you can add a button to a web, por example. Now its time to share it and start ti test for bugs. If you try to do it alone its imposible.
The best way is to tell it to your friends in G+ for example. Firstly you must to upload your crx file to Gdrive and share with your friends the link to this file.
How can i get a crx file?. the answer its very Easy
You must access to the extension properties page and you must check the developper mode. Now appears new buttons. One of them is "package an extension". If you click here you will be asked about the folder extension, and about a private key. If it is the first time, you must to leave blank the private key in other case you must to link to file generated first time, if you want to Chrome detects this as extension update.
After that, you will get a crx file. Now you can host this crx file where you want and share the link with your friends.
In the next chapter will learn to get automatically updates.
Developping chrome extensions II
Now you are having a folder with all your files.
You are ready to test your extension.
As you can see in the upper picture, when you check developper mode appears different buttons. If you click in "load uncompressed extension" you will be asked about the location of the folder contains all files.
Once do it, will appears as a new extension in your panel and you will be able to test and debug it.
As a very light gide lines about your first extension... for example have you think about change the styles of a page getting something that you prefer instead the original? For example have you think about to get disapear the chat in Gmail?
Please check web reference about Jquery
lunes, 23 de abril de 2012
Working with Arduino Boards
Today I am spending to program Arduino Boards.
Arduino Boards are very versatile and easy to program. The board I programing is Libelium, Libelium is a company specializing in sensor networks. The company also providing boards has a wide range of accessories, in this case I work with gas sensors.
I made a file of modular programming in which with few configuration strings I can enable or disable features.
The development in question allows the variables collected from the sensors and setting them in a string compatible with csv format and sends by radio frequency up to 12 km and writ to a local text file (MicroSD card) to ensure not lose any data.
As seen, the Loop and Setup functions only call functions that can run or not, based on the configuration you need.
This gives us great versatility and ease way of configuration.
Arduino Boards are very versatile and easy to program. The board I programing is Libelium, Libelium is a company specializing in sensor networks. The company also providing boards has a wide range of accessories, in this case I work with gas sensors.
I made a file of modular programming in which with few configuration strings I can enable or disable features.
The development in question allows the variables collected from the sensors and setting them in a string compatible with csv format and sends by radio frequency up to 12 km and writ to a local text file (MicroSD card) to ensure not lose any data.
void setup() { PWR.ifHibernate(); key_access_in_EEPROM(); configurar_xbee868(); RTC.ON(); activar_sensores(); SD.ON();
[...]
crear_fichero(); } void loop() { Utils.blinkLEDs(3000); if( intFlag & HIB_INT ) { hibInterrupt(); } PWR.hibernate("00:00:00:10",RTC_OFFSET,RTC_ALM1_MODE2); }
[...]
void generar_paquete_motas() { [...]//generación de todas las variables[...] sprintf(aux2," MOTA2: %s, -mac: %s%s, -bat: %d, -temp: %s,-ozone: %s, -polution: %s \n", RTC.getTime(),macHigh, macLow, PWR.getBatteryLevel(), tabla,tabla2, tabla3); data=aux2; enviar_paquete(); }
[...]
void hibInterrupt()
{
generar_paquete_motas();
escribir_linea_fichero();
Utils.blinkLEDs(1000);
Utils.blinkLEDs(1000);
intFlag &= ~(HIB_INT);
}
As seen, the Loop and Setup functions only call functions that can run or not, based on the configuration you need.
This gives us great versatility and ease way of configuration.
jueves, 19 de abril de 2012
Developping chrome extensions
As you can imagine I am not an advanced developer of extensions for Google Chrome but I would like to share with you what I have learned to develop my first extension.
4 days ago I had no idea about how it developed an extension and that only need 3 or 4 files, possibly some more if you want to develop something more advanced.
The first and most important is "manifest.json"
This file describes the overall configuration of the extension.
The field "background_page" is one that contains the name of the file that has the code that runs our extension.
The field "Browser_action" accepts various parameters, in this case we are defining the icon that will have our extension in the browser interface.
In "Content_scripts", as it somehow define what files we want to have available in our environment (jquery.min.js, in this case) and that websites (entire site).
Finally we have the "Permissions". In this field we will enable our extension to interact with web elements and there indicate.
The second file is background.html
This file is very simple.
Here you are going to define who will do your extension.
For example for you to understand quickly. , I am detecting when a tab is updated and detect when loading is complete.
If the URL of the website in which contains the words "plus.google" and "photos" then injected into the web the "JS" file that i have defined in my Manifest.json file and "inyeccion.js" that implements the various actions that get the purpose of the extension.
Of course this post is not intended to give an extension done. My purpose is to explain how it works in a way as simple as possible. Official help of Google is very useful, I recommend it
4 days ago I had no idea about how it developed an extension and that only need 3 or 4 files, possibly some more if you want to develop something more advanced.
The first and most important is "manifest.json"
| { "name": "Title", "version": "1.0", "background_page": "background.html", "options_page": "opciones.html", "description": "Aprendiendo a usar archivos de configuracion", "browser_action": {"default_icon": "icono.png"}, "content_scripts": [{ "matches": ["http://*/*"], "js": ["jquery.min.js"] }], "permissions": ["tabs", "http://*/", "https://plus.google.com/" ] } |
This file describes the overall configuration of the extension.
The field "background_page" is one that contains the name of the file that has the code that runs our extension.
The field "Browser_action" accepts various parameters, in this case we are defining the icon that will have our extension in the browser interface.
In "Content_scripts", as it somehow define what files we want to have available in our environment (jquery.min.js, in this case) and that websites (entire site).
Finally we have the "Permissions". In this field we will enable our extension to interact with web elements and there indicate.
The second file is background.html
| <script> chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { if(tab.url.indexOf("plus.google") != -1 && tab.url.indexOf("photos") != -1 ) { if (changeInfo.status=="complete") { chrome.tabs.executeScript(tab.id, {'file':'jquery.min.js'}); chrome.tabs.executeScript(tab.id, {'file':'inyeccion.js'}); } } }); </script> |
This file is very simple.
Here you are going to define who will do your extension.
For example for you to understand quickly. , I am detecting when a tab is updated and detect when loading is complete.
If the URL of the website in which contains the words "plus.google" and "photos" then injected into the web the "JS" file that i have defined in my Manifest.json file and "inyeccion.js" that implements the various actions that get the purpose of the extension.
Of course this post is not intended to give an extension done. My purpose is to explain how it works in a way as simple as possible. Official help of Google is very useful, I recommend it
miércoles, 18 de abril de 2012
Picasaweb for Google+ 1.0
I have decide to design an extension for Google Chrome to rescue an easy access to the public Picasaweb Gallery for each user.
Few weeks ago when you try to navigate to a public picasa gallery there was no problem, It wasn´t easy but you can see it. Now it´s imposible. Actually is not imposible but you must to know some tips to get access.
With this extension i want to get access everybody to the full functionality of picasaweb from Google+.
Next days i will public the extension. Now i am testing the first version.
Suscribirse a:
Entradas (Atom)
