Posts tagged MySQL
Master thesis – Implementation of Repositories
1My thesis proposes several approaches as result of the research questions. Their validity of each approach should be verified by allowing users to interact with a prototype built to fulfill all the proposed solutions. Hence, the final users will prove the correctness of this thesis approaches. The implemented prototype will be a brainstorming supporting application.
Because my thesis studies brainstorming on a tabletop, I will choose the Microsoft Surface as the underlying hardware because it supports multitouch and multiuser experience. As development environment I will use Visual Studio 2010 and the programming will be done in C# with User Interface (UI) built in Windows Presentation Foundation (WPF) framework.
In this article I will start with a brief introduction in general details of the baseline system and the technologies implied in the creation of the prototype system. I will continue with the presentation of the architecture of the actual implemented system, which tries to follow the proposed one; the differences between the proposed system and the actual implementation will be underlined and the choices motivated. The article will continue with the class diagrams of the prototype and will end with the presentation of the User Interface, allowing a clear view over the features and the way the prototype performs in achieving the goals of the previous concept presentation. (more…)
7 easy steps to use Webmatrix and WordPress local development
0
Almost all good developers that I know have some kind of repository of their code. Mine is my blog, this blog. Stay with me and you’ll find out how to easily be able to create your local version of WordPress, customize and test your plugins.
For´this you’ll need to follow the next steps:
- Go to Webmatrix official website and download the Web Platform Installer which will install for you not only Webmatrix itself, but also a lot of useful tools like an integrated webserver, Internet Information Services Express, PHP interpretor and its connectors just to name a few. But you can also use it to add new features like ASP .Net MVC3! (more…)
How to generate image_src for Facebook links in WordPress theme
6
Sharing your article for free advertisement on Facebook is a fact. While using different Social Networks sharing tools I had a problem when sharing my articles on Facebook: sometimes the image that I intended to use to represent the article wouldn’t show in the list of the images who can be chosen. Why is that?
It bothered me some while I got the some free time to actually look into this, between exams, work and master research. After some wandering on the internet, I found here the correct directions. What I learnt: Always search for the API!
In order to make sure that the preview is always correctly populated, you should add the tags shown below to the <head> element in your HTML code. If you don’t tag your page, Facebook Share will grab the title of your page as specified in the <title> tag, and will create a summary description from the first text that appears in the body of your page. A list of thumbnails will all be selected from available images on your page.
You can control the exact title, description, and thumbnail that Facebook Share uses by adding the following meta tags to the <head> element in your page:
<meta name=”title” content=”title” /> <meta name=”description” content=”description ” /> <link rel=”image_src” href=”thumbnail_image” / >
IdeaPitch – built on Microsoft Surface
1I am very close to finish another project in Fraunhofer FIT: IdeaPitch on the Microsoft Surface.
This concept is very simple, you are able to “store” ideas in a repository, created using PHP and MySQL, and later on manipulate it on Microsoft Surface, along with the rest of the contributors. Other clients, iPhone and Air, were developed and are able to connect to the repository and register the ideas there. They are acting like individual clients, the iPhone can’t be used comfortable by more than one person. Not to mention that this is kind of personal device by its nature.
The Surface application allows users to connect to a PHP webservice which provides the interface to the small repository for “ideas”, the transfer is using XML to provide a easy way to consume data. Below you can see some photos which depict how these ideas are shown. The application uses quite a lot from the surface features – multitouch, special contextual menus – different for “idea” representation and for the main surface, a custom built management interface, allowing easy saving and restore of the session from the repository.
It features “agents” which can:
- send the message back to the sender,
- “duplicate” the message
- send it to a timer
- to a random logged in user by using the “decide”
- … and worth mention also to a Nabaztag, the funny white wireless rabbit!
I have the feeling that this app will be demoed soon in some fairs or conferences regarding communication and collaboration where Fraunhofer FIT will be represented!
CursValutar
0
Uses: Borland Delphi 7 VCL, HTTP, HTML Parsing, JavaScript, PHP server side script
The program parses web pages from Romanian National Bank site (www.bnr.ro), offering the latest currency ratings, among with a currency calculator, a very useful converter. The program was designed by me in Softwise Development company as a low resource program, hidden in the tray bar of Windows, while periodically checking BNR site and warning the refreshing of the currencies rate. Another feature is that it shows the trend of the user selected currency over the time, allowing you know how it fluctuates – improving the user decision.
The application is designed to be used as a simple, easy to use tool, providing without any previously knowledge of software usage the full functionality and power to the end user.It also has enough options to allow user to customize the time of refreshing data from the BNR site, the visible currencies (although all are refreshed, user may want to see just a number of them), the program start), and the calculator part – a tool visible in the main window of program (in right-bottom corner), but also in a separate window, which can be set to become visible as user clicks on the tray icon.
Softwise Development
0Positions: Junior to Senior Developer, Project Manager
Softwise Development is the company that shaped me as developer. I worked there for 2 years, between January 2002 and January 2004. I enjoyed there not only a good atmosphere, but also discovered a friend in the person of Mr. Dan Trutia, CEO of the company. I was his first employee and I believe that we created a good team. Together we raised the company to a 10 people business, having international contractors while working in software outsourcing industry.
There I had quite a few projects, challenge being the word of the day. I learn a lot about developing Object Oriented applications in Delphi 5 and 6, Access databases, PHP and MySQL, Windows API programming and not to mention user accessibility techniques, helping users with eye problems.
In the last six months of his employment, I was trusted with the responsibility to manage several projects to completion in budget and timely manner, being advanced to project manager. I enjoyed this opportunity and tried my best to prove my professional potential and leadership ability. Being a manager on several projects, I was responsible for conducting many meetings with the customers, conducting requirement analysis and requirements engineering that lead to successful projects.
Responsibilities:
- Delivering IT projects to user specification, on time and on budget
- Testing functionalities and modules
- Documenting IT policies and procedures
- Scheduling the project tasks
- Maintaining the IT security in line with group specifications
- Database maintenance, data updates and records checking
Technologies that I used were:
- Borland Delphi 6 and 7 Enterprise, custom built controls.
- Microsoft Access and Microsoft SQL databases, ADO
- Windows ‘98 Api programming
- PHP and MySQL for server-side applications
How to add Zend Debugging capabilities to Apache
2
Most developer use a local website to test and develop their applications. One of the most used servers is Apache. Since for many developers setting this complex tool is not worth spending their time, some use smart installers who can do those settings for them. I personally use Vertrigo server, who brings me the advantage of 0 time for install, 0 time required for setting and making other tools work together, like MySQL, PHP, PHP MyAdmin, Zend Optimizer etc.
This tutorial is for Windows environment, but it can be easily adapted to Linux or MAC environments because all the settings are done in the configurations files.
The problem that I want to solve in this tutorial arises when one might want to debug its work. I mean, you wrote your application in PHP. There are some tools to allow you to debug it, but either are costly, like Zend Studio and Zend Server or are hard to setup, like XCode. At the end of the day, you’re paid to create applications, not to do dirty settings in 10 or so files in order to enable a simple debug feature.
WordPress: MySQL Random posts
0While working on my webslice, I wanted to add some content to let the users know what’s happening on the website. So I was thinking to provide some random posts from my blog. Most of us know how to use the WordPress default methods to get the posts, to ask for random ones, but how to do it outside the warm WordPress environment?
I started digging in MySQL help (soon I should become a guru
) and find out that it is quite simple if all you want to do is to return some random rows from a table, let’s say a collection of random posts in your blog. Easily, MySQL’s base functions like ORDER BY RAND() come to the rescue. I found lots of examples, so I asume that everybody’s doing it. At least on my search on Google, all the PHP programmers did it:
SELECT * FROM wp_posts ORDER BY RAND() LIMIT 3
I set the limit to 3 because I don’t want to bother my users with all my posts, three are more than enough.
So I did it. But wait, there’s a catch! It really does what it’s supposed to. But what will happen when you reach high levels of users? Your webserver probably will suffer a lot from this. OK, it is not the case in articles,
Your social network keeps growing and growing and after about a year and 50000 new users you realize a slow-down on the page where you show random users. You’re thinking of caching it, but what’s the point? It wouldn’t be random. You break it down with EXPLAIN and realize with horror that your fancy query doesn’t use the nice index you placed on the table ages ago. And why would it? It’s calling RAND() for every row in your table, there’s just no way around it. So what to do? One alternative is to fetch random IDs first and then join the IDs found with the USERS table to fetch the real data. How do we do that? Why, using ORDER BY RAND(), of course. Wait, didn’t I just say you’re not supposed to use it? Well, I did say that, but the difference is that we’ll run the ORDER BY RAND() on the best-indexed column there is, the primary key. Let’s break it down and get our hands dirty:
SELECT USERS.* FROM (SELECT ID FROM USERS WHERE IS_ACTIVE = 1 ORDER BY RAND() LIMIT 20) AS RANDOM_USERS JOIN USERS ON USERS.ID = RANDOM_USERS.ID
And with a little bit of thinking we got ourselves a nice and fast way to fetch random data. Most likely there are other ways out there (sometimes I do miss Oracle’s ROWID), but this one worked fairly well for me. It probably won’t scale forever though, so be prepared to get back to it every once in a while.
How to add a Webslice
1
It is very nice and user-friendly to have Webslices on your website. It improves the user experience by allowing visitors to be up to date with the latest content that you provide, assuming that it is fitted to this presentation style. Since my BNR exchange rates page was this kind, I pursued in adding a Webslice especially for it.
Adding a webslice to your website is simple. After you read the main specifications or my previous article, you’ll understand the concept behind: first you signal to the browser that you have a special part of your website by setting to a container element the class “hslice”:
<div id="BNRExchange" class="hslice">
<div style="display: none" class="entry-title">
<img id="image" alt="Radu Poenaru's weblog gives you BNR Exchange rates" src="http://www.radupoenaru.com/bnr/images/radupoenaru.jpg" width="128" height="128" />
<p>
Cursul oficial BNR
</p>
</div>
<p>
<a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="entry-content">
<a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="Bookmark" target="_blank">
<span style="display: none" class="ttl">5</span>
</p>
<div id="updateTrigger" class="entry-content" runat="server" />
........ your content that you want surrounded by the green webslice part ..............
</div>
WordPress – Database backup and restore
0
From time to time, you’ll need to get a backup of your MySQL database and install it on a different machine – as I needed when reinstalling my Windows 7. I wanted to do something simple, as the last time. But now the database sql file is 11 Mb as opposed to merely 2 MB last time.
But I thought that this would be a breeze for the MySQL interface that I use and enjoy – HeidiSQL. It’s free, easy to use and user friendly. I personally don’t like too much the phpMyAdmin interface from the Vertrigo webserver installation that I use for local development.

























