Using breakpoints
codepen.io example I created that shows how to use CSS along with SVG graphics for responsive designs.
http://codepen.io/lego/full/dPmWVG/
KIROKAZE
Lint Roller? I Barely Know Her

if i look back, i am lost
ojovivo
AnasAbdin

Andulka

tannertan36
No title available
One Nice Bug Per Day
I'd rather be in outer space 🛸
art blog(derogatory)

Janaina Medeiros
Sweet Seals For You, Always
trying on a metaphor

shark vs the universe
No title available

祝日 / Permanent Vacation
todays bird
almost home
occasionally subtle

seen from United States
seen from United States

seen from United States
seen from United States
seen from United States
seen from United States

seen from United States
seen from United States
seen from United States
seen from United States
seen from Malaysia
seen from United Kingdom

seen from Chile

seen from United States

seen from United States
seen from Malaysia

seen from Malaysia

seen from United Kingdom

seen from Malaysia
seen from United States
@legoservices
Using breakpoints
codepen.io example I created that shows how to use CSS along with SVG graphics for responsive designs.
http://codepen.io/lego/full/dPmWVG/
browserstack.com
I'm finding all kinds of new shit today.
htttp://www.browserstack.com
SVG Optimizer - Github
https://github.com/svg/svgo-gui
For future reference
http://jsonprettyprint.com/
Javascript FizzBuzz
http://repl.it/9WV
Help my daughter reach her goal of $500 for the American Heart Association / Jump Rope for Hearts fundraising program. She is six and is extremely excited to help save children's lives.
This has to be my favorite discussion on UX design colors.
A must read.
Equivalent of git add . for tracking deleted files?
git add -u
Warning, starting git 2.0 (mid 2013), this will stage files on the whole working tree. If you want to stage file only under your current path with that working tree, then you need to use
git add -u .
I loved your post about "Using parameterized queries with MySqlClient in VB!" Thank you so much! However I do have one question. Your code only shows how to insert/update/delete items in a database using parameterized queries. How would I go about using a parameterized query for a SELECT statement where I would be getting several rows of data back?
Sorry for the late response, I looked at it, got caught up in something, and then completely forgot.
Dim sql As New MySQL("SELECT * FROM users WHERE User_Name LIKE ?Name")
sql.Parameters("?Name", "%" & stringName & "%")Call sql.Retrieve()
'whatever you do with your results
Call sql.close()
class mysql:
Public Sub New(ByVal query As String) If connection.State = ConnectionState.Open Then connection.Close()
connection.ConnectionString = My.Settings.defaultConnectionString connection.Open()
command.Connection = connection command.CommandText = query
End Sub
Public Sub Retrieve() reader = command.ExecuteReader()
End Sub
Public Sub Close() If Me.command.Connection.State = ConnectionState.Open Then Me.command.Connection.Close() If Me.connection.State = ConnectionState.Open Then Me.connection.Close() Me.Dispose()
End Sub
Rubular is a Ruby-based regular expression editor and tester. It's a handy way to test regular expressions as you write them. Rubular is an especially good fit for Ruby and Rails developers, since it uses Ruby on the server to evaluate regexes, but should also be useful for those working in other programming languages and frameworks (Java, PHP, Python, Javascript, etc.)
For my own future references.
Easy as 1,2,3 - not in Windows though!
I would have never imagined how much simplier it is to install Git & Ruby on Ubuntu than it is on Windows. Unreal!
sudo apt-get install git-core
done... Ruby with RVM (Ruby Version Manager)
sudo apt-get update sudo apt-get install curl \curl -L https://get.rvm.io | bash -s stable source ~/.rvm/scripts/rvm/ rvm requirements
Rails
rvm install ruby rvm use ruby --default
Install RubyGems
rvm rubygems current
Install Rails
rvm install rails
DONE. Trust me, I spent ALOT longer in Windows 7.
Installing and using Sublime Text 2 on Ubuntu
I love Sublime Text. It isn't free, but it is worth the money by far.
I use it for PHP, HTML, CSS, Rails, and Python. I haven't found any other text editor that I like better. I have posts explaining how to configure sublime with Git on windows and launching it from the command prompt in the archive, but now I wanted to install and configure it on my Ubuntu system.
Download Sublime Text
Visit sublimetext.com and download the flavour that best suites your needs (x86 or x64). I chose x64 - must faster.
Once the tarfile is downloaded open the terminal (ctrl+alt+t) and navigate to your downloads folder: cd Downloads and run the following command. Replace the x with the version number that suites you (mine was 2.0.2)
tarxf Sublime\ Text\ 2.0.x\ x64.tar.bz2
Relocate the Sublime Text 2 Application Files to a More Appropriate Directory
This will extract the necessary files to a folder called Sublime Text 2 inside your Downloads folder. You will want to copy this folder to your optional add-on folder (probably the best place for this add on application..) The downloads folder really isn't the best place to keep application files for many reasons, my number one would be accidental deletion.. Use the following command to copy the folder:
sudo mv Sublime\ Text\ 2 /opt/
Create a Symbolic Link to Call Sublime Text from the Terminal
I constantly use the terminal to launch applications, I even do this with the command prompt in windows. It is a habit. If you would like to create a reference for sublime text in the terminal so that you can launch it at will run the following command. Please note I am using the short name subl for my launching purpuses, you can rename it to whatever you would like.
sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/subl
Simply replace subl at the end of the command with the desired nickname you would like to use to launch the application
Create a Launcher in the Unity Desktop
To create a .desktop file in "/usr/share/applications"to launch sublime text from the Unity Desktop, run the following command:
sudo subl /usr/share/applications/sublime.desktop
Note, if you created the symbolic link correctly to launch sublime text from the terminal, sublime text should open with the file sublime.desktop awaiting input! If it didn't, return to step 3 and follow the instructions again.
Paste/Copy the following into the sublime.desktop file:
[Desktop Entry] Version=1.0 Name=Sublime Text 2 GenericName=Text Editor Exec=sublime Terminal=false Icon=/opt/Sublime Text 2/Icon/48x48/sublime_text.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow [NewWindow Shortcut Group] Name=New Window Exec=sublime -n TargetEnvironment=Unity
If you want to use Sublime Text to open all text files
If you want sublime text to be the default application for text files, open the file associations list with sublime text:
sudo subl /usr/share/applications/defaults.list
Whenever Sublime Text opens, press ctrl+h (Replace) and fill in Find What: with geedit.desktop and Replace With: sublime.desktop
That's It! I learned how to do this on technoreply.com and decided to write my own post for future references and the update version of Sublime Text (2).
Launch Sublime Text with subl command inside Git Bash
Open git bash and type:
$echo HOME
to view your git home directory, windows is normally /c/users/user_name
Create a new file in sublime text and add the following line:
alias subl="/C//Program\ Files/Sublime\ Text\ 2/sublime_text.exe"
Save the file in your home directory as .bash_profile
Open the git bash & type subl, your sublime text editor should open. You may need to play with your directory, version number etc.
Thank you so much for writing this article on parameterized queries with MySQLClient in VB. I now am using this example and applying this to all of my programs that I am writing! I was hoping you could give me some advice on the best way to use parameterized queries with SELECT statement and other queries that return results. What is the best way to go about this? Or is it not necessary to use parameterized queries on SELECT statments? If not how should I clean the data for SQL Injections?
Imports MySql.Data.MySqlClient
Imports System.Data
Public Class MySQL
Implements IDisposable
Private connection As New MySqlConnection
Private command As New MySqlCommand
Public reader As MySqlDataReader
Public Sub New(ByVal query As String)
Try
If connection.State = ConnectionState.Open Then connection.Close()
connection.ConnectionString = YOURCONNECTIONSTRING
connection.Open()
command.Connection = connection
command.CommandText = query
Catch ex As MySqlException
'whatever
End Try
End Sub
Public Sub Parameters(ByVal name As String, ByVal value As String)
Try
command.Parameters.AddWithValue(name, value)
Catch ex As MySqlException
'whatever
End Try
End Sub
Public Sub Retrieve()
Try
reader = command.ExecuteReader()
Catch ex As MySqlException
'whatever
End Try
End Sub
Public Sub Send()
Try
command.ExecuteNonQuery()
Catch ex As MySqlException
'whatever
End Try
End Sub
Public Function Last() As Double
Dim id As Double = 0
Dim query As String =
" SELECT LAST_INSERT_ID() "
Try
Me.command.CommandText = query
Call Me.Retrieve()
While Me.reader.Read
id = Me.reader.GetDouble(Me.reader.GetOrdinal("LAST_INSERT_ID()"))
End While
Return id
Catch ex As MySqlException
'whatever
End Try
End Function
Public Sub Close()
Try
If Me.command.Connection.State = ConnectionState.Open Then Me.command.Connection.Close()
If Me.connection.State = ConnectionState.Open Then Me.connection.Close()
Me.Dispose()
Catch ex As MySqlException
'whatever
End Try
End Sub
#Region "IDisposable Support"
Private disposedValue As Boolean ' To detect redundant calls
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
' TODO: dispose managed state (managed objects).
End If
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
connection.Dispose()
command.Dispose()
' TODO: set large fields to null.
reader = Nothing
End If
Me.disposedValue = True
End Sub
' TODO: override Finalize() only if Dispose(ByVal disposing As Boolean) above has code to free unmanaged resources.
'Protected Overrides Sub Finalize()
' ' Do not change this code. Put cleanup code in Dispose(ByVal disposing As Boolean) above.
' Dispose(False)
' MyBase.Finalize()
'End Sub
' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
End Class
And then to call it for select you would:
Dim sql as new MySQL('SELECT * FROM TABLE WHERE member = ?Name')
sql.parameters("?Name", stringName)
Call sql.retreive
While sql.reader.Read()
'get your results
End While
Call sql.close()
To use a like statement with mysql, you would:
Dim sql as new MySQL("SELECT * FROM TABLE WHERE member LIKE ?Name")
sql.parameters("?Name", "%" & stringName &"%")
call sql.retreive
and so on.. There may be a few errors, I typed everything after the class.
Officejet Pro X475dw Micro Ink for Checks?
While this printer is awesome for an inkjet, extremely fast, and very low prices per page, I had to jump through hoops to find out if this could use the micro ink to print checks.
The answer: No.
Loading .CVS file contents into MySQL database.
Create a new table and have the columns match the data types for the columns in the CSV file.
Run the following query to load contents of CSV file into a MySQL database:
LOAD DATA LOCAL INFILE '/data.csv' INTO TABLE my_table FIELDS TERMINATED BY ','
No No No. Yes.
jeff: can you check to see if my mysql server is down?
***: No, it is not down.
jeff: I can't connect to phpmyadmin
jeff: and
jeff: http://whatever
jeff: i get that error
jeff: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 113 in /hermes/bosoraweb044/b2564/blahblahblah on line 39 Lost connection to MySQL server at 'reading initial communication packet', system error: 113
***: We are sincerely sorry for the issue you are facing with phpmyadmin.
***: I'm able to access your website
***: Can you please check it once again from your end?
jeff: whenever you access the site on the link above, do you see a function.mysql-connect error saying it lost connection?
***: No Jeff.
jeff: wtf
jeff: do you think the mysql server may have blocked my ip
***: No Jeff.
***: Could you please clear your browser cache and cookies before accessing the URL?
jeff: yeah still doesnt work
jeff: i can send you a picture
jeff: it does it on ie, chrome, and firefox
***: Send the screenshot to [email protected].
jeff: sent
jeff: the site loads, just php errors
jeff: well, php related to mysql
***: From which email address you have sent it.
jeff: Sorry - [email protected]
***: Thank you!
***: Currently, we received an update from our engineers.
jeff: database server is down?
***: We are currently experiencing issue with our server due to which our customers are experiencing issue. Our senior engineers are working on the issue. We deeply apologize for this service interruption, we know that you count on us, and our team is working as quickly as possible to restore full service for all customers. I assure you that the issue will be resolved soon.
***: Yes Jeff.