Atli's Profile User Rating: *****

Reputation: 3712 Guru
Group:
Moderators
Active Posts:
6,419 (4.24 per day)
Joined:
08-June 10
Profile Views:
77,360
Last Active:
User is offline Today, 11:18 AM
Currently:
Offline

Previous Fields

Country:
IS
OS Preference:
Linux
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Mitsubishi
Dream Kudos:
275
Expert In:
PHP, Databases, Web Development
Icon   Atli has not set their status

Posts I've Made

  1. In Topic: Suggestion required

    Posted 28 Jul 2014

    Is there anything specific about the Compute Engine project you would like our input on?

    Google generally tends to document their products pretty well - and as far as I can see this project is no different - so I'm not sure what exactly we can offer you that Google hasn't provided you already.
  2. In Topic: wiki and bug database recommendation

    Posted 27 Jul 2014

    I've come to like the Atlassian tools a lot. They've got a lot of coding related tools: source control (Bitbucket), issue tracker (JIRA), and a bunch of other tools you might need.
  3. In Topic: transfering data to mysql db.

    Posted 27 Jul 2014

    It doesn't really matter what kind of data-type it is, what you are constructing there is a SQL query string. Before MySQL can take it and store it in whatever format you designated in the table structure, it must first be injected correctly into the query string.

    Prepared Statements will no doubt offer a binary parameter type though, so that's another plus.

    Quote

    yah i know about that preparedstatment method, just wanted to get it work without anything first

    That's one of the worst excuses we ever hear. If you know how to do it right, then do it that way. There is no point getting a crappy outdated method working, only to have to rewrite it using the right method later.

    There is no place for string injection queries in the real world. The best thing to do is to forget they were ever used, and get used to writing prepared statements for everything. Even casual tests.
  4. In Topic: transfering data to mysql db.

    Posted 27 Jul 2014

    I'd guess that the problem there (among others) is that you are just placing a byte array directly into a string without any kind of conversion. I'm not entirely sure how Java will handle that, but I sincerely doubt that it is going to end up the way you seem to be thinking it will. At the very least you should be doing something like: new String(data, "encoding") to tell Java how to handle it.

    However that's really only the lesser of the problems here. Constructing a query string with all the data haphazardly injected into it is bad enough, but when you are including an entire file in the query string, then it actually becomes likely that it will start to randomly fail. - What if one of the byte sequences in the file data translates to a single-quote? It would close the string and the query would fail to parse.

    You need to learn how to use parameterized queries: prepared statements. I suggest you read this article and work from there.

    P.S.
    Why on earth would you store the file size as a string, in the format of "X Bytes"? That makes no sense. It should be stored as an integer; the file length as a simple number. - Storing it as a string makes it far harder to use, outside of just printing it, and it will almost definitely take several times more storage space. (Not that the storage space is necessarily a huge factor here, but still.)
  5. In Topic: displaying images

    Posted 26 Jul 2014

    @no2pencil, I get what you mean, but it can also be a very big inconvenience if new developers get into the habit of using fully qualified paths. Using them as a teaching aid is all well and good, but it must also be stressed that in practice they are a bad idea.

    I've personally had great trouble with this in the past, where I've been hired to improve/fix sites set up by novice web devs who didn't know better. You'd think the solution was just a directory search and replace, but mix this with CMS sites with a poor database back end - like WordPress - and it may not turn out to be simple at all.

My Information

Member Title:
D.I.C Lover
Age:
27 years old
Birthday:
September 5, 1986
Gender:
Location:
Iceland
Full Name:
Atli Ţór Jónsson
Years Programming:
11
Programming Languages:
Mainly: PHP, SQL (MySQL, MSSQL, PostgreSQL), Web Development, (HTML, CSS, Javascript, jQuery).

Additionally: C#, VB.NET, Java, Node.js, ActionScript 3, LUA, C/C++, Python.

Contact Information

E-mail:
Private
Yahoo:
Yahoo  atli.jonsson@ymail.com
Twitter:
Atli_Thor

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    Anuraj23 Icon

    24 Nov 2012 - 00:43
    hi
  2. Photo

    Atli Icon

    21 Sep 2012 - 03:19
    Hey lyster. Please post questions like that in the forums. That's what they're there for.
  3. Photo

    lyster Icon

    21 Sep 2012 - 00:40
    i just can't figure out what are the possible tables,,i want to know normalization well..u_u
  4. Photo

    lyster Icon

    21 Sep 2012 - 00:34
    hi there mr. atli..i hope you could give me some advices and idea on how to make an erd on my mini mortuary_system,thanks god bless you..
    by the way im a student of a state college here in the philippines.
  5. Photo

    kimimimi Icon

    26 Aug 2012 - 00:37
    please help me
  6. Photo

    xenoslash Icon

    19 Jul 2012 - 23:35
    You are quite possibly the most helpful member of the community. I wish I could +1 you more than once for every long (and useful!) post you make.
  7. Photo

    Maryam.m Icon

    23 Jun 2012 - 10:52
    hey i understood what should i do!!!
    i'm so happy :D :D
    tnx
  8. Photo

    polyosis Icon

    11 Jun 2012 - 16:49
    I would like to thank you on your advice with my site path and installation problems, you are most kind my friend.
  9. Photo

    Atli Icon

    14 Apr 2012 - 05:22
    Yea it seems to like you, Dimitri ;)
  10. Photo

    DimitriV Icon

    08 Apr 2012 - 19:20
    Your avatar… it blinked at me.
  11. Photo

    Atli Icon

    06 Nov 2011 - 19:49
    Hehe. Thanks guys :)
  12. Photo

    Dogstopper Icon

    06 Nov 2011 - 19:19
    Lookin' a little blue there. Cheer up man! You're a mod! Congratz!
  13. Photo

    codeprada Icon

    06 Nov 2011 - 18:34
    It's about time. Congrats on reaching blue status.
  14. Photo

    n00l3 Icon

    05 Sep 2011 - 12:59
    Happy birthday! :D
  15. Photo

    cupidvogel Icon

    03 Sep 2011 - 23:06
    I can't seem to like your reply to my jQuery post an hour ago (fantastic explanation it was), because the Javascript in my browser is somewhat malfunctioning. I will like it later, ok?
  • (2 Pages)
  • +
  • 1
  • 2