Tag Archives: Windows 8

Android UI – SeekBar example.

Today I will tell you how to make a user interface element called the seekbar with the Android Studio I.D.E.
On Android Studio select a new Empty Activity project, named it uiseekbar001.
You need to add the SeekBar UI and TextView UI into activity_main.xml file.
The textView, seekBar are variable for id into user interface elements and call by java file.
See the result:

You must interact with the user interface through the java file called MainActivity.java.
The
See this file:

The output will be a number text with value 24 sized by SeekBar up to value 100.

Posted in All, Android, Programming. Tagged with , , , , , , .

Network and Windows – test your WebSocket Protocol.

This web page will test WebSockets supported in your browser. The test checks WebSocket operation by connecting to the WebSocket-enabled server and exchanging the data.

The web page shows us:
This server supports WebSocket Protocol proposed standard (RFC-6455, December 2011), per-frame-deflate-extension-00 draft, older websocket drafts as well as even older Hixie drafts 75 and 76 (August 2010) with the fix for HTTP reverse proxies.

About then this rfc6455 told us:
The WebSocket Protocol enables two-way communication between a client
running untrusted code in a controlled environment to a remote host
that has opted-in to communications from that code. The security
model used for this is the origin-based security model commonly used
by web browsers. The protocol consists of an opening handshake
followed by basic message framing, layered over TCP. The goal of
this technology is to provide a mechanism for browser-based
applications that need two-way communication with servers that does
not rely on opening multiple HTTP connections (e.g., using
XMLHttpRequest or iframe’s and long polling).

Posted in All, web, Windows 10. Tagged with , , , , , .

Network and Windows – firefox browser and socks.

This tutorial will explain to you how it works the SOCKS and Firefox browser.
Open one firefox tab with about:config to see the network.proxy.socks_remote_dns value.
If you wan to route your DNS requests through the SOCKS, you’ll need to turn it on.
But because you don’t need to use that then you need to keep to false.
This two result of values will be:

This value controls whether DNS lookups for SOCKS v5 clients happen on the client or on the proxy server.
You can read more about the SOCKS here.
NOTE: Because this use proxy term then you need to know also this about proxy:
– the SOCKS server is a general purpose proxy server that establishes a TCP connection to another server on behalf of a client;
– HTTP proxy is similar, and may be used for the same purpose when clients are behind a firewall and are prevented from making outgoing TCP connections to servers outside the firewall;

Posted in All, web, Windows 10, Windows 7, Windows 8. Tagged with , , , , , .

Blender 3D – screencast keys addon.

Fist you need to take the python script from here.
The script need to be into Blender script folder to be used.
Open the Blender 3D application, go to the File – User preferences search the word Screencast and enable the addon by check the checkbox.
To use this addon then go to the 3D View, hit Shift+Alt+C keys.
Another way is to press N key to see the right panel and then use the Start Display button.
See the next image:
Blender 3D addon

Posted in 3D, All, Blender 3D. Tagged with , , , , , , , , , , .

Python and LibreOffice – part 001.

As you know the LibreOffice includes several applications that make it the most powerful Free and Open Source office suite on the market: Writer (word processing), Calc (spreadsheets), Impress (presentations), Draw (vector graphics and flowcharts), Base (databases), and Math (formula editing).
This tutorial is about LibreOffice and python scripts used like macros.
First you need to assign the permission for your user to write into script folder.
The main reason come from your software – the LibreOffice and your script editor for python language need to using this path: C:\Program Files (x86)\LibreOffice 5\share\Scripts.
If you using one of the linux OS then he path will be: /Applications/LibreOffice.app/Contents/Resources/Scripts/python/.
Your script can be run using the LibreOffice macro : Tools – Macros – Organize Macros – Python.
This allow you to see the python files and also can be run with Run button.
I used LibreOffice version: 5.2.3.3 to make one default python script.
I open my python script with the LibreOffice default interface ( not Writer, Calc, Base, etc.) and this allow me to run python scripts for any type of LibreOffice apllications.
Let’s see the python script:

The output of the running script will be open under new document named Untitled 1.
The content of this result is: The Python version is 3.3.5 and the executable path is C:\Program Files (x86)\LibreOffice 5\program\soffice.bin.
The size of the text is 12, Default Style and font is Liberation Serif.
The python script is simple: Is like take the interface model and put some text into that.
About hasattr part is just for reduce your possible errors and avoid confusing differences in behavior between Python 2 and 3.
Don’t use Python’s hasattr() unless you’re writing Python 3-only code and understand how it works.
The sintax under Python 3 is:
hasattr(object, name)

The arguments are an object and a string. The result is True if the string is the name of one of the object’s attributes, False if not. (This is implemented by calling getattr(object, name) and seeing whether it raises an AttributeError or not.)

Posted in All, LibreOffice, Programming, Python, Windows 8. Tagged with , , , , , , .