Kleine Vragen Topic #4

Gestart doorOne2xs1.965 reacties23.994 weergaven

1.966 berichten · pagina 27 van 132

Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Raoul schreef:
HeidiSQL is een aanrader.

Maar dat lukt niet altijd als hosts *kuch*one2xs*kuch* externe MySQL connecties blokkeren.
Ook lokaal is het erg handig. Het werkt beter dan het gedrocht gemaand PhpMyAdmin (PMA).
Sinds een paar jaar exporteer ik geen MySQL-dumps van hele of halve databases meer via PMA, maar werk ik lekker commandline. Veel toffer en sneller. yummie
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Milan schreef:
Je hebt geen primary key
En hoe stel ik dan wel een primary key in ofzo?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Sanderc schreef:
Eerdere citaten tonen
Milan schreef:
Je hebt geen primary key
En hoe stel ik dan wel een primary key in ofzo?
"ALTER TABLE [naam] ADD PRIMARY KEY ([identifier-kolom])"

De identifier-kolom moet trouwens NOT NULL zijn (of in ieder geval geen NULL waardes bevatten). Anders krijg je een error.
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Eerdere citaten tonen
Milan schreef:
Je hebt geen primary key
Inderdaad, maar toch snap ik niet waarom phpMyAdmin dit dan blokkeert emohet is, het blijft... een kutproduct!
Nouja, ze blokkeren het niet, maar je kunt rijen niet onderscheiden als ze geen unieke kolom hebben, dus vandaar die melding. PMA kan dan nooit weten welke rij je aan het bewerken bent. Je moet gewoon altijd een PK hebben. spinsmile
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Sowieso databases zonder PK emo
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Ik voeg altijd een PK toe, maar sommige tabellen in mijn CMS hebben het van oudsher nog niet, maar die krijgen er natuurlijk wel eentje. wink
Maar normaal kon PMA eerst (versie 3.x?) wel netjes berichten aanpassen zonder PK, geloof ik?
0
Berichten
3.001
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Right, ik heb de volgende code:

Codeblok (style.css):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

.lock-name {
background:#fff;
width:50%;
float:left;
height:50px;
line-height:50px;
margin-top:55px;
padding:0 20px;
text-align:left;
border-radius:5px 0 0 5px;
-webkit-border-radius:5px 0 0 5px;
color:#1fb5ad;
}
.lock-pwd {
background:#fff;
width:50%;
float:right;
height:50px;
line-height:50px;
margin-top:55px;
padding:0 0 0 80px;
border-radius:0 5px 5px 0;
-webkit-border-radius:0 5px 5px 0;
color:#1fb5ad;
}
.lock-pwd input {
width:72% !important;
margin-top:6px;
color:#626f81;
}

Codeblok (login.php):

1
2
3
4
5
6
7
8
9
10
11
12
13
14

Nu wil ik, dat als er een error is in één of beide velden, er een rode omlijning heen komt, is ook ingebouwd in de lay-out:
Afbeelding

Codeblok (forms.html):

1
2
3
4
5
6
Input with error

Maar op het voorbeeld zie je zonder op de input te klikken de rode omlijning, terwijl ik zonder te klikken geen rode omlijning krijg:
Afbeelding

Wie helpt mij? biggrin
0
Stef

Lid

Berichten
10.150
Reputatie
2
Punten
0,00
Lid sinds
Laatst gezien
Bugged schreef:
Right, ik heb de volgende code:
Codeblok (style.css):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

.lock-name {
background:#fff;
width:50%;
float:left;
height:50px;
line-height:50px;
margin-top:55px;
padding:0 20px;
text-align:left;
border-radius:5px 0 0 5px;
-webkit-border-radius:5px 0 0 5px;
color:#1fb5ad;
}
.lock-pwd {
background:#fff;
width:50%;
float:right;
height:50px;
line-height:50px;
margin-top:55px;
padding:0 0 0 80px;
border-radius:0 5px 5px 0;
-webkit-border-radius:0 5px 5px 0;
color:#1fb5ad;
}
.lock-pwd input {
width:72% !important;
margin-top:6px;
color:#626f81;
}

Codeblok (login.php):

1
2
3
4
5
6
7
8
9
10
11
12
13
14

Nu wil ik, dat als er een error is in één of beide velden, er een rode omlijning heen komt, is ook ingebouwd in de lay-out:

Afbeelding

Codeblok (forms.html):

1
2
3
4
5
6
Input with error

Maar op het voorbeeld zie je zonder op de input te klikken de rode omlijning, terwijl ik zonder te klikken geen rode omlijning krijg:

Afbeelding

Wie helpt mij? biggrin
Is het bootstrap o.i.d.?
Zit er misschien JavaScript achter?
0
Berichten
3.001
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Stef schreef:
Eerdere citaten tonen
Bugged schreef:
Nu wil ik, dat als er een error is in één of beide velden, er een rode omlijning heen komt, is ook ingebouwd in de lay-out:
Afbeelding

Codeblok (forms.html):
1
2
3
4
5
6
Input with error

Maar op het voorbeeld zie je zonder op de input te klikken de rode omlijning, terwijl ik zonder te klikken geen rode omlijning krijg:

Afbeelding

Wie helpt mij? biggrin
Is het bootstrap o.i.d.?
Zit er misschien JavaScript achter?

t Is inderdaad een lay-out gebaseerd op Bootstrap.
0
Berichten
5.274
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien

Eindhoven, Nederland

Raoul schreef:
HeidiSQL is een aanrader.

Maar dat lukt niet altijd als hosts *kuch*one2xs*kuch* externe MySQL connecties blokkeren.
Navicat heeft daar blijkbaar een oplossing voor, klikkerdieklik. Kan je met PHP alles door tunnelen. Werkt blijkbaar best fijn, als ik een oude baas mag geloven.
0
Berichten
1.533
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Joeryy schreef:
Hey, ik ben bezig met een programma in QML, ik probeer nu een eigen element aan te maken maar als ik hem compile krijg ik een error over een van de QT Framework bestanden.

main.cpp
Spoiler tonen
#include <QApplication>
#include <QtQml>
#include <QQmlEngine>
#include <QQuickView>
#include <QDeclarativeItem>
#include "udpsocket.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    qmlRegisterType<UDPSocket>("socket", 1, 0, "UDPSocket");

    QQmlEngine engine;
    QQuickView *window = new QQuickView(&engine, 0);
    window->setSource(QUrl("qrc:/main.qml"));
    window->setResizeMode(QQuickView::SizeRootObjectToView);
    window->show();


    return a.exec();
}


udpsocket.h / udpsocket.cpp
Spoiler tonen
udpsocket.h

#ifndef UDPSOCKET_H
#define UDPSOCKET_H

#include <QtCore>
#include "qdeclarativeitem.h"

class UDPSocket : public QDeclarativeItem
{
    Q_OBJECT
    Q_PROPERTY(QString host READ host WRITE setHost)
    Q_PROPERTY(qint16 port READ port WRITE setPort)

public:
    QString host() const;
    void setHost(const QString &host);

    qint16 port() const;
    void setPort(const qint16 &port);
private:
    QString m_host;
    qint16 m_port;
};

#endif // UDPSOCKET_H
udpsocket.cpp

#include "udpsocket.h"
#include "qdeclarativeitem.h"

QString UDPSocket::host() const
{
    return m_host;
}

void UDPSocket:SMILEYYYYYYYYYYYBEGIN:setHost(const QString &host)
{
    m_host = host;
}

qint16 UDPSocket::port() const
{
    return m_port;
}

void UDPSocket:SMILEYYYYYYYYYYYBEGIN:setPort(const qint16 &port)
{
    m_port = port;
}


Dit is de compiler output:
Spoiler tonen
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(49) : warning C4005: QML_DECLARE_TYPE : macro redefinition

c:qt5.4msvc2013_64includeqtqmlqqml.h(50) : see previous definition of QML_DECLARE_TYPE
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(52) : warning C4005: QML_DECLARE_TYPE_HASMETATYPE : macro redefinition

c:qt5.4msvc2013_64includeqtqmlqqml.h(53) : see previous definition of QML_DECLARE_TYPE_HASMETATYPE
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(62) : error C2365: QML_HAS_ATTACHED_PROPERTIES : redefinition; previous definition was enumerator

c:qt5.4msvc2013_64includeqtqmlqqml.h(63) : see declaration of QML_HAS_ATTACHED_PROPERTIES
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(74) : warning C4005: QML_DECLARE_TYPEINFO : macro redefinition

c:qt5.4msvc2013_64includeqtqmlqqml.h(75) : see previous definition of QML_DECLARE_TYPEINFO
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(112) : error C2995: int qmlRegisterType(void) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(99) : see declaration of qmlRegisterType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(114) : warning C4273: qmlRegisterTypeNotAvailable : inconsistent dll linkage

c:qt5.4msvc2013_64includeqtqmlqqml.h(129) : see previous definition of qmlRegisterTypeNotAvailable
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(148) : error C2995: int qmlRegisterUncreatableType(const char *,int,int,const char *,const QString &) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(132) : see declaration of qmlRegisterUncreatableType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(182) : error C2995: int qmlRegisterType(const char *,int,int,const char *) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(232) : see declaration of qmlRegisterType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(216) : error C2995: int qmlRegisterType(const char *,int,int,const char *) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(263) : see declaration of qmlRegisterType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(250) : error C2995: int qmlRegisterRevision(const char *,int,int) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(294) : see declaration of qmlRegisterRevision
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(285) : error C2995: int qmlRegisterExtendedType(void) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(326) : see declaration of qmlRegisterExtendedType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(327) : error C2995: int qmlRegisterExtendedType(const char *,int,int,const char *) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(357) : see declaration of qmlRegisterExtendedType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(347) : error C2995: int qmlRegisterInterface(const char *) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(396) : see declaration of qmlRegisterInterface
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(385) : error C2084: function int qmlRegisterType(const QUrl &,const char *,int,int,const char *) already has a body

c:qt5.4msvc2013_64includeqtqmlqqml.h(580) : see previous definition of qmlRegisterType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(417) : error C2572: qmlAttachedPropertiesObject : redefinition of default parameter : parameter 2

c:qt5.4msvc2013_64includeqtqmlqqml.h(521) : see declaration of qmlAttachedPropertiesObject
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(417) : error C2995: QObject *qmlAttachedPropertiesObject(const QObject *,bool) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(521) : see declaration of qmlAttachedPropertiesObject
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(421) : error C2766: explicit specialization; QMetaTypeId<QObject*> has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(601) : see previous definition of QMetaTypeId<QObject *>
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(422) : error C2766: explicit specialization; QMetaTypeId<QVariant> has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(602) : see previous definition of QMetaTypeId<QVariant>
Ik kan hier echt niks over vinden en heb echt geen idee wat ik fout doe.

Iemand?
0
Stef

Lid

Berichten
10.150
Reputatie
2
Punten
0,00
Lid sinds
Laatst gezien
Joeryy schreef:
Eerdere citaten tonen
Joeryy schreef:
Hey, ik ben bezig met een programma in QML, ik probeer nu een eigen element aan te maken maar als ik hem compile krijg ik een error over een van de QT Framework bestanden.
main.cpp
Spoiler tonen
#include <QApplication>
#include <QtQml>
#include <QQmlEngine>
#include <QQuickView>
#include <QDeclarativeItem>
#include "udpsocket.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    qmlRegisterType<UDPSocket>("socket", 1, 0, "UDPSocket");

    QQmlEngine engine;
    QQuickView *window = new QQuickView(&engine, 0);
    window->setSource(QUrl("qrc:/main.qml"));
    window->setResizeMode(QQuickView::SizeRootObjectToView);
    window->show();


    return a.exec();
}


udpsocket.h / udpsocket.cpp
Spoiler tonen
udpsocket.h

#ifndef UDPSOCKET_H
#define UDPSOCKET_H

#include <QtCore>
#include "qdeclarativeitem.h"

class UDPSocket : public QDeclarativeItem
{
    Q_OBJECT
    Q_PROPERTY(QString host READ host WRITE setHost)
    Q_PROPERTY(qint16 port READ port WRITE setPort)

public:
    QString host() const;
    void setHost(const QString &host);

    qint16 port() const;
    void setPort(const qint16 &port);
private:
    QString m_host;
    qint16 m_port;
};

#endif // UDPSOCKET_H
udpsocket.cpp

#include "udpsocket.h"
#include "qdeclarativeitem.h"

QString UDPSocket::host() const
{
    return m_host;
}

void UDPSocket:SMILEYYYYYYYYYYYBEGIN:setHost(const QString &host)
{
    m_host = host;
}

qint16 UDPSocket::port() const
{
    return m_port;
}

void UDPSocket:SMILEYYYYYYYYYYYBEGIN:setPort(const qint16 &port)
{
    m_port = port;
}


Dit is de compiler output:
Spoiler tonen
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(49) : warning C4005: QML_DECLARE_TYPE : macro redefinition

c:qt5.4msvc2013_64includeqtqmlqqml.h(50) : see previous definition of QML_DECLARE_TYPE
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(52) : warning C4005: QML_DECLARE_TYPE_HASMETATYPE : macro redefinition

c:qt5.4msvc2013_64includeqtqmlqqml.h(53) : see previous definition of QML_DECLARE_TYPE_HASMETATYPE
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(62) : error C2365: QML_HAS_ATTACHED_PROPERTIES : redefinition; previous definition was enumerator

c:qt5.4msvc2013_64includeqtqmlqqml.h(63) : see declaration of QML_HAS_ATTACHED_PROPERTIES
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(74) : warning C4005: QML_DECLARE_TYPEINFO : macro redefinition

c:qt5.4msvc2013_64includeqtqmlqqml.h(75) : see previous definition of QML_DECLARE_TYPEINFO
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(112) : error C2995: int qmlRegisterType(void) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(99) : see declaration of qmlRegisterType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(114) : warning C4273: qmlRegisterTypeNotAvailable : inconsistent dll linkage

c:qt5.4msvc2013_64includeqtqmlqqml.h(129) : see previous definition of qmlRegisterTypeNotAvailable
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(148) : error C2995: int qmlRegisterUncreatableType(const char *,int,int,const char *,const QString &) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(132) : see declaration of qmlRegisterUncreatableType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(182) : error C2995: int qmlRegisterType(const char *,int,int,const char *) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(232) : see declaration of qmlRegisterType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(216) : error C2995: int qmlRegisterType(const char *,int,int,const char *) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(263) : see declaration of qmlRegisterType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(250) : error C2995: int qmlRegisterRevision(const char *,int,int) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(294) : see declaration of qmlRegisterRevision
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(285) : error C2995: int qmlRegisterExtendedType(void) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(326) : see declaration of qmlRegisterExtendedType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(327) : error C2995: int qmlRegisterExtendedType(const char *,int,int,const char *) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(357) : see declaration of qmlRegisterExtendedType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(347) : error C2995: int qmlRegisterInterface(const char *) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(396) : see declaration of qmlRegisterInterface
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(385) : error C2084: function int qmlRegisterType(const QUrl &,const char *,int,int,const char *) already has a body

c:qt5.4msvc2013_64includeqtqmlqqml.h(580) : see previous definition of qmlRegisterType
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(417) : error C2572: qmlAttachedPropertiesObject : redefinition of default parameter : parameter 2

c:qt5.4msvc2013_64includeqtqmlqqml.h(521) : see declaration of qmlAttachedPropertiesObject
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(417) : error C2995: QObject *qmlAttachedPropertiesObject(const QObject *,bool) : function template has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(521) : see declaration of qmlAttachedPropertiesObject
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(421) : error C2766: explicit specialization; QMetaTypeId<QObject*> has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(601) : see previous definition of QMetaTypeId<QObject *>
C:Qt5.4msvc2013_64includeQtDeclarative/qdeclarative.h(422) : error C2766: explicit specialization; QMetaTypeId<QVariant> has already been defined

c:qt5.4msvc2013_64includeqtqmlqqml.h(602) : see previous definition of QMetaTypeId<QVariant>
Ik kan hier echt niks over vinden en heb echt geen idee wat ik fout doe.
Iemand?

No offense maar ik denk dat niet veel mensen hier verstand er van hebben yummieOf misschien Raoul wel redface
0
Stef

Lid

Berichten
10.150
Reputatie
2
Punten
0,00
Lid sinds
Laatst gezien
Ik maak op http://stef.party meerdere divs aan dmv dit:

Codeblok (voorbeeld.php):

1
2
3
4
5
6
7
8
9
10

for(var i = 0; i < amount; i++) {
var div = document.createElement("div");
div.style.position = "absolute";
var pos = getRandomPos();
div.style.top = "0px";
div.style.left = pos[1];
div.innerHTML = "Afbeelding";
div.className = "fristi";
document.body.appendChild(div);
}

(fristiRain())
En ik probeer met dit de div naar beneden te bewegen:

Codeblok (voorbeeld.php):

1
2
3
4
5
6
7

var fristi = document.getElementsByClassName("fristi");
for(var a = 0; a < fristi.length; a++) {
setInterval(function() {
fristi[(a - 1)].style.top = parseInt(fristi[(a-1)].style.top.replace("px", "")) +1 + "px";

}, 50)
}

Er moeten dus meerdere divs komen, maar wanneer ik dat doe beweegt alleen div 0 (denk ik) naar beneden.
Weet iemand hoe ik het moet maken dat ze allemaal naar beneden bewegen?

En weet iemand waarom [c]fristis = setInterval(fristiRain(1), 1000);[/c] niet werkt? clown
0
Stef

Lid

Berichten
10.150
Reputatie
2
Punten
0,00
Lid sinds
Laatst gezien
En weet iemand waarom [c]fristis = setInterval(fristiRain(1), 1000);[/c] niet werkt? clown
toevoeging op 8 mei 2015, 11:59:24:
Shit dubbelpost sadley
toevoeging op 8 mei 2015, 11:59:46:
Triplepost eigenlijk clown
0
Berichten
7.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
BANN!!!!!!
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren