O Projeto Software Livre Bahia (PSL-BA) é um movimento aberto que busca, através da força cooperativa, disseminar na esfera estadual os ideais de liberdade difundidos pela Fundação Software Livre (FSF), possibilitando assim a democratização do acesso a informação, através dos recursos oferecidos pelo Software Livre. Esta busca tem seus alicerces fundados na colaboração de todos, formando um movimento sinérgico que converge na efetivação dos ideais de Liberdade, Igualdade, Cooperação e Fraternidade.
O Projeto Software Live Bahia é formado pela articulação de indivíduos que atuam em instituições publicas e privadas, empresas, governos ou ONGs, e demais setores da sociedade. Além disso o projeto não é subordinado a qualquer entidade ou grupo social, e não estabelece nenhuma hierarquia formal na sua estrutura interna.
KDE Connect, usando seu celular como controle remoto do PC
1 de Setembro de 2014, 10:15 - sem comentários aindaKDE Connect é um projeto que tem objetivo comunicar o KDE com seu celular.
Com o KDE Connect hoje é possível fazer várias coisas interessantes:
- Enviar e receber arquivos do seu celular
- Notifica no seu KDE quando recebe ligação e mensagem SMS no celular
- Informa no seu KDE a carga atual da sua bateria do celular
- Navega nos arquivos do seu celular via KDE
- Pausa o som do seu KDE quando recebe ligação
- Controle multimídia do KDE a partir do celular
- Controle do ponteiro do mouse no KDE a partir do KDE
Para usar é muito fácil, basta instalar um aplicativo em seu KDE e outro no celular.
No seu KDE, caso utilize debian, pode instalar com o seguinte comando:
# aptitude install kdeconnect
Obs: Infelizmente o debian, mesmo a versão unstable, não tem a versão mais nova do kdeconnect.
Caso queira instalar a versão mais nova do KDE Connect, siga os passos abaixo:
# aptitude install kde-workspace-dev libqca2-dev libqjson-dev libxtst-dev libfakekey-dev git
# git clone git://anongit.kde.org/kdeconnect-kde
# cd kdeconnect-kde
# mkdir build
# cd build
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4
# make
# sudo make install
Depois de instalado, ele aparecerá em seu gerenciador do KDE
Para instalar a versão android do KDE Connect no seu celular basta procurar no seu google play o KDE Connect e instalar, da mesma forma como faz para todos outros aplicativos do android.
O KDE Connect se conecta de forma bem simples, basta que os dois dispositivos estejam na mesma rede WiFi.
Obs: Infelizmente ele ainda não tem suporte a conexão via bluetooth.
Quando um celular que tem o aplicativo KDE Connect acessar uma rede, ele envia um broadcast para buscar dispositivos com KDE Connect instalado no KDE. Uma vez encontrado, o KDE interage automaticamente com o dispositivo apenas para coletar informações de acesso, ou seja, os dispositivos não se conectam automaticamente.
Uma vez encontrado o aparelho desejado para conexão, é necessário efetuar uma liberação em ambos dispositivos.
Uma vez recebido a solicitação de pareamento, o KDE pode ou não autorizar a conexão.
O inicio dessa conexão pode ser em sentido contrário, ou seja, o KDE lista os celulares com KDE Connect instalado e solicitar pareamento, sendo assim você precisará confirmar em seu telefone.
Como foi dito em seu blog (Inglês), o criador da ferramenta utiliza criptografia para assegurar a segurança da comunicação. Eu ainda não fui a fundo na analise dessa questão, mas como as funções são simples e bem reguladas, não vejo problema do seu uso com cautela até então.
Pronto! Agora poderá otimizar a comunicação entre seu celular e estação com KDE.
Obs: Todas as fotos foram retiradas do site do Ronny, que é um dos desenvolvedores do KDE Connect.
Fontes :
http://albertvaka.wordpress.com/
https://ronnyml.wordpress.com/2014/08/21/kde-connect-connecting-your-devices-to-kde/
GoldenDict, a definição e tradução de verbetes em uma tecla de atalho
29 de Agosto de 2014, 15:19 - sem comentários aindaQuem nunca precisou de um programa pra agilizar pesquisas de significados das palavras, definição no Wikipédia, tradução e afins, tudo com teclas de atalho, sem precisar acessar outros aplicativos ou sites web?
A primeira vista, pode parecer algo bobo e desnecessário, mas quando está lendo um texto longo, parar tudo para acessar um dicionário externo geralmente é uma perda de tempo, que pode atrapalhar seu entendimento sobre o assunto.
Para resolver esse problema, temos o GoldenDict, que é um aplicativo feito em QT. Bem simples, direto e extensível, pois aceita adição de diversos dicionários.
Pra usar o GoldenDict é bastante simples, basta selecionar a palavra e digitar o atalho “Ctrl+c” duas vezes seguidas. Com isso aparecerá uma tela com informação disponível em todos dicionários configurados.
Para instalar no Debian ou Ubuntu, é muito simples, basta digitar o comando abaixo:
# apt-get install goldendict -y
No debian ele acompanha por padrão apenas o Wikipédia, sendo assim vamos facilitar seu trabalho com instalação de novos dicionários. Baixe esse arquivo e descompacte em uma pasta.
Obs: Alguns dos arquivos dessa base de dados são proprietários, infelizmente.
Acesse o aplicativo goldendict via ícone, acesse o menu “Editar” e escolha a opção “Dicionários”.
Escolha as abas “Fontes” e “Arquivos”. Em seguida clique no ícone “Adicionar…” escolha sua pasta que acabou de descompactar.
Por fim marque a opção “Buscar em subpastas” e clique no botão “Ok”.
Se você deseja colaborar, basta comprar a versão para android desse software, que é paga. Essa versão android serve como método de financiamento para o projeto GoldenDict. Custa menos de R$ 12,00.
Blog novo, vida nova
29 de Agosto de 2014, 9:07 - sem comentários aindaDepois de muito tempo com o blog parado, decidi reinicializar o sistema, sendo assim decidi manter todas os meus conteúdos por aqui e começar do zero mesmo.
Aqui você terá contato com meus conteúdos sobre tecnologia da informação, que vai de infraestrutura de TI, passando por segurança até mesmo minha tentativas sobre desenvolvimento de software.
Em todo caso, a novidade é que nesse blog falarei também sobre outros assuntos, aquelas que são mais subjetivas, tal como poesias, prosas, posições sobre assuntos sociais e organização política.
Se quiser evitar assuntos desnecessários, use as categorias que ficam a esquerda e acessem o link diretamente. Para software livre o link seria http://techfree.com.br/category/softwarelivre/ por exemplo.
Espero poder compartilhar da melhor forma os conhecimentos que já tenho e/ou venha obter com o passar do tempo. Não tenham vergonha em interagir, a ideia do blog é essa mesmo.
New blog, new life
28 de Agosto de 2014, 18:00 - sem comentários aindaAfter so many time with my blog stopped, I decided to reboot the system, so I will keep all my content here and start from scratch even.
Here you will be in touch with my knowledge about IT infrastructure, security and my attempts on software development.
This blog will also talk about other subjects, more subjective, such as poetry, prose and thoughts about political organization.
If you want to avoid some articles, use the categories that are left and access the link directly. For the free software you can use http://techfree.com.br/category/softwarelivre/ for example.
I hope to share the best way all my knowledge. Do not be shy to interact, it is the idea of this blog.
New gadget
8 de Agosto de 2014, 20:16 - sem comentários aindaSolid, energy-efficient, nice UI, wireless, multiple output formats and hmm... can you smell it? :)
The new TwoWayView
31 de Julho de 2014, 8:33 - sem comentários aindaWhat if writing custom view recycling layouts was a lot simpler? This question stuck in my mind since I started writing Android apps a few years ago.
The lack of proper extension hooks in the AbsListView API has been one of my biggest pain points on Android. The community has come up with different layout implementations that were largely based on AbsListView‘s code but none of them really solved the framework problem.
So a few months ago, I finally set to work on a new API for TwoWayView that would provide a framework for custom view recycling layouts. I had made some good progress but then Google announced RecyclerView at I/O and everything changed.
At first sight, RecyclerView seemed to be an exact overlap with the new TwoWayView API. After some digging though, it became clear that RecyclerView was a superset of what I was working on. So I decided to embrace RecyclerView and rebuild TwoWayView on top of it.
The new TwoWayView is functional enough now. Time to get some early feedback. This post covers the upcoming API and the general-purpose layout managers that will ship with it.
Creating your own layouts
RecyclerView itself doesn’t actually do much. It implements the fundamental state handling around child views, touch events and adapter changes, then delegates the actual behaviour to separate components—LayoutManager, ItemDecoration, ItemAnimator, etc. This means that you still have to write some non-trivial code to create your own layouts.
LayoutManager is a low-level API. It simply gives you extension points to handle scrolling and layout. For most layouts, the general structure of a LayoutManager implementation is going to be very similar—recycle views out of parent bounds, add new views as the user scrolls, layout scrap list items, etc.
Wouldn’t it be nice if you could implement LayoutManagers with a higher-level API that was more focused on the layout itself? Enter the new TwoWayView API.
TwoWayLayoutManagercode is a simple API on top of LayoutManager that does all the laborious work for you so that you can focus on how the child views are measured, placed, and detached from the RecyclerView.
To get a better idea of what the API looks like, have a look at these sample layouts: SimpleListLayout is a list layout and GridAndListLayout is a more complex example where the first N items are laid out as a grid and the remaining ones behave like a list. As you can see you only need to override a couple of simple methods to create your own layouts.
Built-in layouts
The new API is pretty nice but I also wanted to create a space for collaboration around general-purpose layout managers. So far, Google has only provided LinearLayoutManager. They might end up releasing a few more layouts later this year but, for now, that is all we got.
The new TwoWayView ships with a collection of four built-in layouts: List, Grid, Staggered Grid, and Spannable Grid.
These layouts support all RecyclerView features: item animations, decorations, scroll to position, smooth scroll to position, view state saving, etc. They can all be scrolled vertically and horizontally—this is the TwoWayView project after all ;-)
You probably know how the List and Grid layouts work. Staggered Grid arranges items with variable heights or widths into different columns or rows according to its orientation.
Spannable Grid is a grid layout with fixed-size cells that allows items to span multiple columns and rows. You can define the column and row spans as attributes in the child views as shown below.
<FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" app:colSpan="2" app:rowSpan="3"> ... </FrameLayout>
Utilities
The new TwoWayView API will ship with a convenience view (TwoWayView) that can take a layoutManager XML attribute that points to a layout manager class.
<org.lucasr.twowayview.widget.TwoWayView android:layout_width="match_parent" android:layout_height="match_parent" app:layoutManager="ListLayoutManager"/>
This way you can leverage the resource system to set layout manager depending on device features and configuration via styles.
You can also use ItemClickSupport to use ListView-style item (long) click listeners. You can easily plug-in support for those in any RecyclerView (see sample).
I’m also planning to create pluggable item decorations for dividers, item spacing, list selectors, and more.
That’s all for now! The API is still in flux and will probably go through a few more iterations. The built-in layouts definitely need more testing.
You can help by filing (and fixing) bugs and giving feedback on the API. Maybe try using the built-in layouts in your apps and see what happens?
I hope TwoWayView becomes a productive collaboration space for RecyclerView extensions and layouts. Contributions are very welcome!
'WDTCR' was not declared in this scope
21 de Julho de 2014, 14:23 - sem comentários aindaTutorials on microcontroller ATtiny will push you to use WDTCR definition. It has been switched long time ago to WDTCSR, according to ATtiny24/44/84 Datasheet. I hope this short post may save some of your precious hacking time.
HOPE X ical for schedule
17 de Julho de 2014, 19:05 - sem comentários aindaAs Adirondack (train line MTL-NYC) is not Internet-friendly for RSS feeds I can't profit of my ~11h travelling to check this huge schedule in the way I want to, (= having a timetable view including room, description and speakers). HOPE X has just released a pdf and a xls (wtf??), but these contain only titles and room.
So I've coded an ics generator to process their feed. The result file is available at http://acaia.ca/hopex.ics and should be up to date with the original RSS.
Little garden project
17 de Junho de 2014, 11:51 - sem comentários aindaAfter three years living in Montréal we're still amazed by the fact that here we have er... seasons!!
I believe that things have a special beauty when they don't last the time we want them to last, and seasons are all about it! (some people will exclude winter here) Anyways, taking pictures may give them more lifetime without compromising too much their beauty. And sharing them here and there is somewhat sharing our happiness, which might be a good balance in the end :)
At the time we moved the garden was just a single white thing...
then we realized that it provided some chairs, a table and a compost container, yay!
But the grey ground was something to be fixed...
so we hacked it and got some land :)
Few months later and it's finally becoming chard, beets, carrots, spinach, berries, cheries, okra, tomatoes, basil, potatoes, sage, agastache and a saskatoon berry tree!
An introduction to the Debian Continuous Integration project
1 de Junho de 2014, 17:11 - sem comentários aindaDebian is a big system. At the time of writing, looking at my local package list caches tells me that the unstable suite contains 21306 source packages, and 42867 binary packages on amd64. Between these 42867 binary packages, there is an unthinkable number of inter-package dependencies. For example the dependency graph of the ruby packages contains other 20-something packages.
A new version of any of these packages can potentially break some functionality in the ruby
package.
And that dependency graph is very small. Looking at the dependency graph for,
say, the rails
package will make your eyes bleed. I tried it here, and
GraphViz needed a PNG image with 7653×10003 pixels to draw it. It ain’t pretty.
Installing rails on a clean Debian system will pull in another 109 packages as
part of the dependency chain. Again, as new versions of those packages are
uploaded the archive, there is a probability that a backwards-incompatible
change, or even a bug fix which was being worked around, might make some
funcionality in rails
stop working. Even if that probability is low for each
package in the dependency chain, with enough packages the probability of any
of them causing problems for rails is quite high.
And still the rails
dependency chain is not that big. libreoffice
will pull
in another 264 packages. gnome
will pull in 1311 dependencies, and kde-full
1320 (!).
With a system this big, problems will arrive, and that’s a fact of life. As developers, what we can do is try to spot these problems as early as possible, and fixing them in time to make a solid release with the high quality Debian is known for.
While automated testing is not the proverbial Silver Bullet of Software Engineering, it is an effective way of finding regressions.
Back in 2006, Ian Jackson started the development of autopkgtest as a tool to test Debian packages in their installed form (as opposed to testing packages using their source tree).
In 2011, the autopkgtest test suite format was proposed as a standard for the Debian project, in what we now know as the DEP-8 specification.
Since then, some maintainers such as myself started experimenting with DEP-8 tests in their packages. There was an expectation in the air that someday, someone would run those tests for the entire archive, and that would be a precious source of QA information.
Durign the holiday break last year, I decided to give it a shot. I initially
called the codebase dep8
. Later I renamed it to debci
, since it could
potentially also run other other types of test suites in the future. Since
early January, ci.debian.net run an instance of debci
for the Debian Project.
The Debian continuous Integration will trigger tests at most 4 times a day, 3 hours after each dinstall run. It will update a local APT cache and look for packages that declare a DEP-8 test suite. Each package with a test suite will then have its test suite executed if there was any change in its dependency chain since the last test run. Existing test results are published at ci.debian.net every hour, and at the end of each batch a “global status” is updated.
Maintainers can subscribe to a per package Atom feed to keep up with their package test results. People interested in the overall status can subscribe to a global Atom feed of events.
Since the introduction of Debian CI in mid-January 2014, we have seen an amazing increase in the number of packages with test suites. We had little less than 200 packages with test suites back then, against around 350 now (early June 2014). The ratio of packages passing passing their test suite has also improved a lot, going from less than 50% to more than 75%.
There is documentation available, including a FAQ for package maintainers with further information about how the system works, how to declare test suites in their packages and how to reproduce test runs locally. Also available is development information about debci itself, to those inclined to help improve the system.
This is just the beginning. debci
is under a good rate of development, and
you can expect to see a constant flux of improvements. In special, I would like
to mention a few people who are giving amazing contributions to the project:
- Martin Pitt has been working on improving debci to support parallel and distributed workers. Being the current autopkgtest maintainer, Martin also already got some bug fixes and fixes into autopkgtest motivated by debci use cases.
- Brandon Fairchild is a GSOC student working on improving the debci web interface to provide more useful information, display information for multiple suites and architectures, plus making the UI work even without Javascript enabled.
- Lucas Kanashiro is another GSOC student, who is working on investigating patterns among packages that fail their test suites, so that we can figure out how we can fix them, or if there are classes of failures that are actually caused by problems in the debci infrastructure.
On losing contacts with old friends
30 de Maio de 2014, 11:03 - sem comentários aindaIn 2010 I decided to stop using my google account. In 2011 I decided to leave facebook, twitter and other $cool stuff. This was a hard decision. Not because email migration was annoying, nor because I liked to do social networking. It's hard because most of friends depend on either google or facebook to chat. Since I moved to another country, phone calls and presencial meetings have been substantially reduced.
So we keep in contact by using IRC and XMPP. I have good friends who use IRC, mostly Debian people, which is great. I also have lots of friends and contacts not using IRC. In the past they used ICQ, then moved to MSN and now they are using google talk and facebook. I used to explain them that we could talk by using their google account and my Jabber account due to an open standard called XMPP. I enjoy having short conversations in random times, which sometimes takes hours and helps us to keep affectionately connected.
It used to work so well. Now it seems to be gone. I've noticed that I can't connect anymore with contacts using google talk, probably because google has finally put into action their decision to abandon open standards for instant messaging.
I'm not going to list here all the good things that happened in my life when I stopped using all this crap services. But I have to admit that it really hurts to see my contacts disappearing day by day, feeling like my friends are being devoured by these companies, with zero critical sense. You'll say that good friends won't disappear like that if they are good friends. I agree, but the convenience of having people from one-click distance in random hours a day makes a difference, mainly when physical distance is a blocker.
Custom Layouts on Android
12 de Maio de 2014, 9:42 - sem comentários aindaIf you ever built an Android app, you have definitely used some of the built-in layouts available in the platform—RelativeLayout, LinearLayout, FrameLayout, etc. They are our bread and butter for building Android UIs.
The built-in layouts combined provide a powerful toolbox for implementing complex UIs. But there will still be cases where the design of your app will require you to implement custom layouts.
There are two main reasons to go custom. First, to make your UI more efficient—by reducing the number of views and/or making faster layout traversals. Second, when you are building UIs that are not naturally possible to implement with stock widgets.
In this post, I will demonstrate four different ways of implementing custom layouts and discuss their respective pros and cons: composite view, custom composite view, flat custom view, and async custom views.
The code samples are available in my android-layout-samples repo. This app implements the same UI with each technique discussed here and uses Picasso for image loading. The UI is a simplified version of Twitter app’s stream—no interactions, just the layouts.
Ok, let’s start with the most common type of custom layout: composite view.
Composite View
This is usually your starting point. Composite views (also known as compound views) are the easiest way of combining multiple views into a reusable UI component. They are very simple to implement:
- Subclass one of the built-in layouts.
- Inflate a merge layout in the constructor.
- Initialize members to point to inner views with findViewById().
- Add your own APIs to query and update the view state.
TweetCompositeViewcode is a composite view. It subclasses RelativeLayout, inflates tweet_composite_layout.xmlcode into it, and exposes an update() method to refresh its state in the adaptercode. Simple stuff.
Custom Composite View
TweetCompositeView will likely perform fairly well in most situations. But, for sake of argument, suppose you want to reduce the number of child views and make layout traversals a bit more efficient.
Although composite views are simple to implement, using general-purpose layouts has a cost—especially with complex containers like LinearLayout and RelativeLayout. As platform building blocks, they have to handle tons of layout combinations and might have to measure child views multiple times in a single traversal—LinearLayout‘s layout_weight being a common example.
You can greatly optimize your UI by implementing a custom logic for measuring and positioning child views that is specially tailored for your app. This is what I like to call a custom composite view.
A custom composite view is simply a composite view that overrides onMeasure() and onLayout(). So, instead of subclassing an existing container like RelativeLayout, you will be subclassing the more general ViewGroup.
TweetLayoutViewcode implements this technique. Note how it gets rid of the LinearLayout from TweetComposiveView and avoids the use of layout_weight altogethercode.
The laborious work of figuring out what MeasureSpec to use on each child view is done by the ViewGroup’s handy measureChildWithMargins() method—and getChildMeasureSpec() under the hood.
TweetLayoutView probably doesn’t handle all possible layout combinations correctly but it doesn’t have to. It is absolutely fine to optimize custom layouts for your specific needs. This allows you to write both simpler and more efficient layout code for your app.
Flat Custom View
As you can see, custom composite views are fairly simple to write using ViewGroup APIs. Most of the time, they will give you the performance your app needs.
However, you might want to go further and optimize your layouts even more on critical parts of your UI that are very dynamic e.g. ListViews, ViewPager, etc. What about merging all TweetLayoutView child views into a single custom view to rule them all? That is what flat custom views are about—see image below.
A flat custom view is a fully custom view that measures, arranges, and draws its inner elements. So you will be subclassing View instead of ViewGroup.
If you are looking for real-world examples, enable the “show layout bounds” developer option in your device and have a look at apps like Twitter, GMail, and Pocket. They all use flat custom views in their listing UIs.
The main benefit from using flat custom views is the great potential for flattening your view hierarchy, resulting in faster traversals and, potentially, a reduced memory footprint.
Flat custom views give you maximum freedom as they are literally a blank canvas. But this comes at a price: you won’t be able to use the feature-packed stock widgets such as TextView and ImageView. Yes, it is simple to draw text on a Canvas but what about ellipsizing? Yes, you can easily draw a bitmap but what about scaling modes? Same applies to touch events, accessibility, keyboard navigation, etc.
The bottom line is: with flat custom views,you will likely have to re-implement features that you would get for free from the platform. So you should only consider using them on core parts of your UI. For all other cases, just lean on the platform with composite views, custom or not.
TweetElementViewcode is a flat custom view. To make it easier to implement it, I created a little custom view framework called UIElement. You will find it in the canvascode package.
The UIElement framework provides a measure/layout API which is analogous to Android’s. It contains headless versions of TextView and ImageView with only the necessary features for this demo—see TextElementcode and ImageElementcode respectively. It also has its own inflatercode to instantiate UIElements from layout resource filescode.
Probably worth noting: the UIElement framework is in a very early development stage. Consider it a very rough sketch of something that might actually become useful in the future.
You have probably noticed how simple TweetElementView looks. This is because the real code is all in TweetElementcode—with TweetElementView just acting as a hostcode.
The layout code in TweetElement is pretty much analogous to TweetLayoutView‘s. It handles Picasso requests differentlycode because it doesn’t use ImageViews.
Async Custom View
As we all know, the Android UI framework is single-threaded. And this is for a good reason: UI toolkits are not your simplest piece of code. Making them thread-safe and asynchronous would be an unworthy herculean effort.
This single-threaded nature leads to some fundamental limitations. It means, for example, that you can’t do layout traversals off main thread at all—something that would be useful in very complex and dynamic UIs.
For example, if your app has complex items in a ListView (like most social apps do), you will probably end up skipping frames while scrolling because ListView has to measurecode and layoutcode each child view to account for their new content as they become visible. The same issue applies to GridViews, ViewPagers, and the like.
Wouldn’t it be nice if we could do a layout traversal on the child views that are not visible yet without blocking the main thread? This way, the measure() and layout() calls on child views would take no time when needed in the UI thread.
Enter async custom view, an experiment to allow layout passes to happen off main thread. This is inspired by the async node framework developed by the Paper team at Facebook.
Given that we can never ever touch the UI toolkit off main thread, we need an API that is able to measure/layout the contents of a view without being directly coupled to it. This is exactly what the UIElement framework provides us.
AsyncTweetViewcode is an async custom view. It uses a thread-safe AsyncTweetElementcode factorycode to define its contents. Off-screen AsyncTweetElement instances are created, pre-measured, and cached in memory from a background thread using a Smoothie item loadercode.
I had to compromise the async behaviour a bit because there’s no sane way of showing layout placeholders on list items with arbitrary heights i.e. you end up resizing them once the layout gets delivered asynchronously. So whenever an AsyncTweetView is about to be displayed and it doesn’t find a matching AsyncTweetElement in memory, it will force its creation in the UI threadcode.
Furthermore, both the preloading logic and the memory cache expiration would need to be a lot smarter to ensure more layout cache hits in the UI thread. For instance, using a LRU cachecode here doesn’t seem ideal.
Despite these limitations, the preliminary results from async custom views look very promising. I’ll continue the explorations in this area by refining the UIElement framework and using it in other kinds of UIs. Let’s see where it goes.
Wrapping up
When it comes to layouts, the more custom you go, the less you’ll be able to lean on the platform’s proven components. So avoid premature optimization and only go fully custom on areas that will actually affect the perceived quality and performance of your app.
This is not a black-and-white decision though. Between stock widgets and fully custom views there’s a wide spectrum of solutions—from simple composite views to the more complex async views. In practice, you’ll usually end up combining more than one of the techniques demonstrated here.
Introducing Radio Pyo: live python music!
28 de Abril de 2014, 2:10 - sem comentários aindaRadio Pyo is now online as a beta experiment. All the compositions are made entirely with Python and Pyo. They mostly have pseudo-random music sections, so technically speaking the chances that you listen to the same song twice are very little :)
I'm contacting the composers in order to make all the sources available in a public repository.
Here's a template with some rules for those who want to submit a composition (for now it's just about sending the script to tiago at acaia.ca):
#!/usr/bin/env python # encoding: utf-8 """ Template for a RadioPyo song (version 1.0). A RadioPyo song is a musical python script using the python-pyo module to create the audio processing chain. You can connect to the radio here : http://radiopyo.acaia.ca/ There is only a few rules: 1 - It must be a one-page script. 2 - No soundfile, only synthesis. 3 - The script must be finite in time, with fade-in and fade-out to avoid clicks between pieces. Use the DURATION variable. belangeo - 2014 """ from pyo import * ################### USER-DEFINED VARIABLES ################### ### READY is used to manage the server behaviour depending ### ### of the context. Set this variable to True when the ### ### music is ready for the radio. TITLE and ARTIST are the ### ### infos shown by the radio player. DURATION set the ### ### duration of the audio file generated for the streaming.### ############################################################## READY = False # Set to True when ready for the radio TITLE = "Song Title" # The title of the music ARTIST = "Artist Name" # Your artist name DURATION = 300 # The duration of the music in seconds ##################### These are optional ##################### GENRE = "Electronic" # Kind of your music, if there is any DATE = 2014 # Year of creation ####################### SERVER CREATION ###################### if READY: s = Server(duplex=0, audio="offline").boot() s.recordOptions(dur=DURATION, filename="radiopyo.ogg", fileformat=7) else: s = Server(duplex=0).boot() ##################### PROCESSING SECTION ##################### # global volume (should be used to control the overall sound) fade = Fader(fadein=0.001, fadeout=10, dur=DURATION).play() ### ### Insert your algorithms here... ### #################### START THE PROCESSING ################### s.start() if not READY: s.gui(locals())
Thanks to Olivier Bélanger and Jean-Michel Dumas for all the code!
Mon petit Jean marchant
6 de Abril de 2014, 12:24 - sem comentários aindaI got this cute little walker by following these instructions. It's a simple 3 servo robot controled by a light sensor, mapping light intensity with speed. To avoid beating his face against the wall Jean uses an ultrasonic sensor which also gives him a fancy big-eye look. So smart uh? :) The code doesn't differ much from that one mentioned above. I've just taken these pictures before he gets disassembled, after all I can't afford a microcontroller for each fun I have on this arduino-world thing.
Confira novidades da versão 0.46.0 "Uaris" do Noosfero!
25 de Março de 2014, 11:12 - sem comentários ainda
Neste mês de fevereiro foi lançada uma nova versão do Noosfero, plataforma web livre para redes sociais. A versão 0.46.0 foi batizada de Uaris e conta com 14 novidades, entre melhorias de recursos e novas funcionalidades.
O Noosfero é uma plataforma web livre para redes sociais e redes de economia solidária na internet que agrega as funções de blog, Sistema de Gerenciamento de Conteúdo (CMS), chat, fórum, portfólio eletrônico, produção e consumo de feeds RSS, agenda de eventos etc. O Noosfero é também um projeto de software livre, com licença GNU Affero General Public License, desenvolvido pela Colivre com a contribuição de uma comunidade de desenvolvedores/as que garantem o lançamento de novas versões constantemente.
Entre as últimas melhorias para os/as usuários/as estão novos blocos, opções de layout e formas de recuperação de senha. Confira as novidades da versão 0.46.0 Uaris!
Novo botão para restaurar página inicial
Já se foi o tempo em que era preciso remover o artigo que estava como página inicial para ter nossa homepage de volta para o padrão da página de perfil. Agora, no Gerenciador de Conteúdos, há um botão com a opção "Restaurar página inicial". Ao clicar nele, a homepage do site volta a ser a página de perfil.
Recuperação de senha
O/A usuário/a não precisa mais ficar limitado a preencher seu login e e-mail para recuperar sua senha. Agora basta apenas preencher uma das opções.
A página também foi melhorada com a possibilidade para que plugins incluam novos campos de recuperação de senha. Como você pode ver na imagem abaixo, o StoaPlugin adicionou o campo "Número USP" como novo campo disponível para recuperação de senha.
Plugin para adicionar bloco para conteúdos recentes
Temos uma nova forma de mostrar nossos conteúdos mais recentes. É através do Plugin de Conteúdo Recente. Este plugin adiciona um novo bloco que mostra o conteúdo recente de um dos blogs do usuário.
Exceção para conteúdos privados
Este recurso permite que os/as usuários/as definam quem pode acessar seu conteúdo privado. Esta é uma boa maneira de garantir maior privacidade de conteúdos.
Bloco principal editável
Agora o Bloco Principal pode ser editado pelo/a usuário/a sem improvisos nem quebra-galhos. Os blocos passaram a fluir normalmente entre as caixas laterais e o box principal.
Inserção de imagem de capa no blog
O/A usuário/a está habilitado/a a adicionar uma imagem de capa para seu blog. Esta imagem é exibida no cabeçalho da página de visualização do blog.
Ambiente para gerenciamento de integrantes
O ambiente de administração agora é capaz de gerenciar todos os usuários. Na página de gerenciamento, é possível procurar por usuários, usar filtros para administradores ou usuários comuns, e usuários ativos ou inativos. O ambiente também permite transformar um usuário em administrador ou em usuário comum, além de ativar ou desativar usuários. Na mesma página, é possível exportar os usuários em forma to CSV ou XML.
Nova opção de layout
Uma nova opção de layout com coluna à esquerda junto com o rodapé foi adicionada à lista de layouts personalizados oferecidos pelo Noosfero.
Filtros para gerenciamento de grupos
Agora, na página "Gerenciar Grupos", o/a usuário/a é capaz de filtrar os grupos de acordo com a relação que tem com eles - se administrador, moderador ou integrante, por exemplo.
Bloco de vídeo
Boas notícias! Agora temos um Bloco de Vídeo. Esse bloco é gerado pelo Plugin de Vídeo e permite que o/a usuário/a faça referência a vídeos do Vimeo, Youtube ou Webm e incorpore-os ao bloco. Isso facilitará a vida de muitos usuários.
Melhorias na ferramenta Calendário
Nosso calendário recebeu mais atenção e ganhou melhorias em sua interface.
Novo bloco "Conteúdo Contextual"
Outro bloco é o Conteúdo Contextual, que agrupa os conteúdos a partir do contexto/tipo. Este bloco mostra "os filhos" do conteúdo que está sendo visualizado no momento pelo/a usuário/a. Ele também permite a escolha de qual tipo de conteúdo deve ser exibido.
Bloco que mostra o caminho de navegação
O bloco Breadcrumbs exibe o caminho de navegação percorrido pelo/a usuário/a. Isto permite uma navegação simples e rápida pelos conteúdos. Embora ainda faltem alguns ajustes, a ferramenta já está funcionando e pode ter sua aparência totalmente personalizada.
Para desenvolvedores: Ambiente de configuração para definir tamanho máximo de carregamento
Essa vai para os administradores do sistema! Depois de um longo tempo codificando o bom e velho 5mb como tamanho máximo de upload, nós temos agora uma maneira para os administradores do sistema definirem o tamanho máximo de upload para uma instalação Noosfero. Ainda não temos a possibilidade de ter vários ambientes no mesmo sistema com diferentes tamanhos máximos de upload, mas estamos a um passo disso. Esta configuração está em config/noosfero.yml e você pode ver um exemplo de como fazer isso no arquivo config/noosfero.tml.dist.
Para o lançamento desta versão do Noosfero, foi imprescindível o trabalho do pessoal do Serviço Federal de Processamento de Dados (Serpro), empresa brasileira considerada uma das maiores organizações públicas de TI no mundo. Obrigado galera!
Fonte: http://noosfero.org/pub/Development/NoosferoVersion00x46x00