Computing

To connect to a database from PERL you can use DBI, the Database independent interface. The following code snipped shows you how:
use DBI;
my $dbh = DBI->connect("DBI:mysql:database=test;host=localhost", "joe", "joe's password", {'RaiseError' => 1});
my $sth = $dbh->prepare("SELECT …. FROM articles WHERE article_id=?");
$sth->execute(1);
while(my @row = $sth->fetchrow_array()){
printf("%s\t%s\n%s\n",$row[0],$row[1],$row[4]);
}
$sth->finish();

Taggings:

Technology:

Streaming API, extend the StreamListener() to customise the way we process the incoming data, based on a certain #hashtag in Twitter.

ProgrammingLanguage:

Technology:

I wrote a web tool in Java EE, performing the following subtasks:

  • Reverse engineer the project file (zip-File with an XML describing the project and folders containing the device drivers)
  • Reverse engineer the XML file representing the entire project (i.e. house)
  • Reverse engineer the XML structure representing programs the installers wrote for old and new proxy versions
  • Create models for old and new proxies
  • Create a mapping between these models
  • Provide an online tool where installers can upload a project which is then migrated to the new versions:
    • replace the old drivers with new ones
    • configure them accordingly
    • automatically re-implement programs using the new interfaces
    • clean up invalid parts of the project file
    • be as fault-tolerant as possible: migrate as many drivers/devices as possible; inform the installer about parts that failed to migrate
  • Iterative process: based on failed migrations, learn more about the internal workings of the project file and improve the migration tool accordingly

Technology:

I implemented a custom WebSocketAppender for log4j. Log messages were escaped using String.escapeHtml4, newlines were replaced with <br>.
Depending on the log level, messages where printed in bold (WARNING) or in red (ERROR or FATAL).
Events that were considered a problem that needs the user's attention were explicitly stored in a collection, and written to the websocket at the end when the program was done.

ProgrammingLanguage:

Technology:

The configuration is done in the file "server.xml" (it is in the installed server's config directory, which you can find under "Servers" in your project explorer in Eclipse), in the element "Resource" (under element "GlobalNamingResources").

Technology:

Solution:
Use Google Analytics which is one of most popular traffic tracking tool on the web. First create or sign in to your Analytics account and add the tracking code on your site (two snippets of code onto every page of your website). GA provides individual tracking ID that tells GA to send analytics data to you. On every page of your website you can use tags which you can trigger to send data you choose to google analytics which analyses this data (For example it can be a purchase of ebook, then you know when it was bought, which user bought it and where user was before it).
Remember to take consideration new GDPR regulations when adding this functionality to your website.

The port is occupied by another application already, thus WAMP cannot start. Run netstat -a -b to identify all processes with network connections, find those, listening on port 80 and 8080 (Skype, etc). Terminate those processes. Restart WAMP, all Servers should start now correctly. The other processes can be started again (Skype in particular will default to another port as the WAMP ports are now taken).

OperatingSystem:

Technology:

Nested tables? Do you actually mean TreeTables? PrimeFaces is throwing out so many new widgets every 6 months, some old features are just not being improved anymore. Check out their new wisget set in showcases. Also, what is maybe not always the best solution, but often helps, is to develop your own custom widget. It is actually easy to do, and will give you the best understanding of how certain components function. I work with JSF for almost 8 years already, I am a senior dev, and I still manage to find enormous amount of bugs within their framework. Some of them I also reported, which were later turned into features in the new versions.

OperatingSystem:

ProgrammingLanguage:

There is only one universal solution for all the third party libraries in MAC OS, and it's called BREW! :) Check it out. Everything that you can think of is installed by one liner. This is a way you would install it everywhere else (any other linux, windows etc), and is already deprecated if you transfer to mac. From your article, I can conclude that you are a serious and competent developer if you use maven, but also that you are a relatively new to Mac OS. There must be some friends in your circle who are long time Mac OS users, ask them for an advice. Mac OS has some amazing features that you cannot really learn about alone. They concentrate on making your life easier, which is not the case with other operating systems.

OperatingSystem:

You mention it is Sunday, so this must be a home network. 10 devices would place some significant load on it. Apart from trying to disconnect some of them, you can also try to change the WiFi's channel to improve performance. There are apps like WiFi analyzer (Android) for that.

Taggings:

Pages

Subscribe to Computing