background preloader

Lesson 1: What is SQL?

Lesson 1: What is SQL?
Related:  IT Stuff

Tutorial: HTML Templates with Mustache.js When developing modern HTML applications, you often write a lot of HTML fragments programmatically. You concatenate HTML tags and dynamic data, and insert the resulting UI markup into the DOM. Here is a random code example of this approach: The proliferation of this kind of code throughout your application comes with some downsides. Mustache is a “logic-less” template syntax. In this article, we take a quick tour of some of the capabilities of Mustache.js. To start using Mustache.js, simply add a script tag to your html file pointing to mustache.js which is available here. You can run all the examples below here. Sample 1: Basic Template This is a self-explanatory example. Instead of being defined in a variable, the data often comes from a service call (see sample 2)Instead of being defined in a variable, the template is often read from a file (see sample 3) Result: Blog: Sample 2: Basic Template using Ajax data Blog: Sample 3: Externalized Template

SQL Server - Create a Database One of the first things we should look at with SQL Server/Management Studio is how to create a database. After all, most of the tasks you perform with SQL Server will evolve around one or more databases. System Databases If you've only just installed SQL Server, you might notice that some databases have already been created. We will now create another database for our own use. Creating a New Database The following steps demonstrate how to create a database in SQL Server using SQL Server Management Studio. Right click on the "Databases" icon and select "New Database Your New Database You will now notice your new database appears under the "Databases" section of SQL Server Management Studio. Your new database is based on the "Model" database. Other Options We have just created a database using the default options. If we'd wanted to, we could have specified a different location for these files. To view or change the database properties, simply right click on the database and select "Properties":

Apps, Tablets and Usability The current trend towards flat design presents a real threat to the usability on tablets, a recent study from researchers at the Neilson Norman Group (NNG) has found. The latest study was one of six to be carried out on usability and, while it was found that tablet usability is improving, there are still issues such as poor gestures, rescaled design and workflow. While for the most part the study found that sites in general tend to work reasonably well, the biggest issue with usability was found to lie in apps. However, with sites it’s not a huge issue and for the most part those the study looked at only needed “limited adjustment” to suit most tablets. This means that with regard to responsive sites, “tablet usability is reasonably solid” and has really improved recently, but apps are a different story. Testing, testing … The study tested apps on a variety of tablets, from first generation iPads to the latest Android and even some Windows devices. Do you need an app? Common app user issues

Intro to OLAP This is the first of a series of posts about business intelligence tools, particularly OLAP (or online analytical processing) tools using MySQL and other free open source software. OLAP tools are a part of the larger topic of business intelligence, a topic that has not had a lot of coverage on MPB. Because of this, I am going to start out talking about these topics in general, rather than getting right to gritty details of their performance. I plan on covering the following topics: Introduction to OLAP and business intelligence. What is BI? As far as BI is concerned, this series of posts focuses on OLAP analysis and in a lesser sense, on data warehousing. OLAP? Multidimensional Analysis Multidimensional analysis is a form of statistical analysis. There are two main ways to store multidimensional data for OLAP analysis OLAP servers typically come in two basic flavors. A relational OLAP (or ROLAP) server uses data stored in an RDBMS. What makes a ROLAP so great? Data before pivoting:

Using CSS gradients - Web developer guide CSS gradients are new types of <image> added in the CSS3 Image Module. Using CSS gradients lets you display smooth transitions between two or more specified colors. This lets you avoid using images for these effects, thereby reducing download time and bandwidth usage. In addition, because the gradient is generated by the browser, objects with gradients look better when zoomed, and you can adjust your layout much more flexibly. Browsers support two types of gradients: linear, defined with the linear-gradient() function, and radial, defined with radial-gradient(). Linear gradients To create a linear gradient, you set a starting point and a direction (specified as an angle) along which the gradient effect is applied. Simple linear gradients Here's a linear gradient that starts at the center (horizontally) and top (vertically), and starts blue, transitioning to white. background: -prefix-linear-gradient(top, blue, white); background: linear-gradient(to bottom, blue, white); Using angles Size

使用Python连接MySQL和EXCEL,实现EXCEL和MySQL数据互传_zzcwing_新浪博客 这几天又重新回顾了一下Python,当初学习它是因为VB6被微软抛弃后不想再用庞大的.NET工具,毕竟不是专业程序员,对于我来说只需要一个小巧、 同时安装方便不需要管理员权限(因为公司电脑强制锁权限)、简单快捷实用的编程工具,Python无论哪方面看都成了我的最佳选择。工作中的数据处理工具 一直围绕着EXCEL,但VBA能力所限,而且有些功能实现起来比较复杂,有了Python的辅助明显方便许多,这种动态语言只要有环境连编译都不需要, 这让我怀念起当年的MATLAB。 在数据库方面,过去我一直选择实用MSSQL或者ACCESS(姑且称其为数据库吧),但在工作中个人使用SQL比较麻烦,使用ACCESS简单方便(但 讨厌的是ACCESS的SQL语言并非标准的SQL)。当时曾想过MySQL似乎是一个不错的选择,可惜用惯了OLEDB和ODBC的我,实在找不到 MySQL和EXCEL直接进行数据互传的API或者接口,同时也考虑到数据互传的话没有数据库服务器支持的情况下毕竟ACCESS是比较方便的,于是无 奈只好放弃MySQL。 由于最近心血来潮突然想再研究一下Python,找到了Python和MySQL互传的方法,就想到以Python为中介来实现MySQL和EXCEL的 数据互传。以下是实现的方法,程序比较简单:利用Python从EXCEL中读取两列数据存储在LIST中然后连接数据库利用insert语句和LIST 内容结合,导入数据库;然后再从数据库读取表的字段和内容,存放到EXCEL新表中,由于是示例以核心内容为主错误处理就不写了 (注意,Python以空格和缩进作为语句结束的标志,由于网络日志文本的原因,所有可能空格都被去掉了,以下代码无法直接复制执行,仅供参考): # -*- coding: utf-8 -*- """ Created on Fri Oct 05 23:52:33 2012 @author: zzcwing """ #导入模块,需要pywin32和MySQLdb模块,下载地址: #pywin32: #MySQLdb:

Software Language Processing Suite — Grammar zoo The objective of the Grammar Zoo is to accumulate grammars of various software languages, extracted and recovered from language documentation, parser specifications and other artefacts and make them available in a range of formats. 569 grammars and counting Abstract Behavioral Specification Language Source: HATS team, Grammar definition for the ABS language, (May 2012) [ReadMe] [ABS Tool Suite] [GitHub] [GitHub] Extracted grammar: [Browsable] [BGF] [EBNF] [DMS BNF] [SDF]Tagged with: language:ABS src:HATS tol0:private tol1:rscs2bgf author:HATS team extraction:rascal-sdUsed tools: [Rascal SD⇒BGF] Ada Ada 95 — Ada 2005 Ada 95 (4 grammars) Ada 2005 (2 grammars) Source: International Standard ISO/IEC 8652/1995(E) with Technical Corrigendum 1 and Amendment 1, Ada 2005 Reference Manual. API2MoL API2MoL API2MoL (2 grammars) Assembly Delphi Assembler Delphi Assembler Source: Jorge L. Basic Visual Basic concrete syntax — Visual Basic abstract syntax Visual Basic concrete syntax Source: James R. BibTeX

Ausdroid | Welcome home Evolve your own beats: automatically generating music via algorithms - Vik's Blog Update: you can find the next post in this series here. I recently went to an excellent music meetup where people spoke about the intersection of music and technology. One speaker in particular talked about how music is now being generated by computer. Music has always fascinated me. It can make us feel emotions in a way few media can. Sadly, I have always been unable to play an instrument well. I opted to pursue a strategy that "evolves" music out of other pieces of music. I'm going to broadly outline the keys to my strategy below. We can easily acquire music that is already categorized (ie labelled as classical/techno/electronic, etc)We can teach a computer to categorize new music automatically.Teaching a computer to categorize music automatically will give us a musical quality assessment tool (patent pending on the MQAT!) Here are some samples of the computer generated music. So, how did you do it? Unfortunately, these tracks were in .mp3 format. Training the algorithm Splicing/Remixing

Debugging Mobile with jsconsole Web development for mobile devices has several major limitations. There are strongly divergent screen resolutions (from iPad to the first generation of Blackberry), multiple browsers (webkit but also IEMobile, Firefox, Opera mini and mobile, etc.) and multiple operating systems (Windows Phone, Android, iOS, Palm, Blackberry). Each device has its own constraints and performance. When it comes time to debug all this, the task is not easy because there are only few tools permitting it – and because of the size of the screen, even then we are not out of the woods. Dragonfly for Opera already offers a native solution for remote debugging, but this technique is quite limited, especially when one has to take into account other mobile / browsers. Several phone manufacturers also offer emulators, but they don’t compare to the use of a real device offering ”feel and touch” – especially on the side of the web-client programming, and especially JavaScript. A JavaScript Console for Mobile :listen