mardi 26 mai 2015

Scalability (Design) Considerations

I tried searching for accurate information, but I fail to find any. So I am asking you veterans here.

Firstly, What kind of requests has a platform like Facebook/stakoverflow has to perform per unit of time?

Secondly, What kind of resources and restrictions are required to run such a web services, let's say for 10 million users? (hardware/software considerations)

I know my question is a bit vague, but I am having a hard time understanding the scalability in such an application.




What languages do I need to know before I am able to build a custom website like this?

What languages do I need to know before I am able to build a website like this?

I'm able to build websites using a CMS like Wordpress etc but would like to begin learning how to build custom websites from scratch.

What languages/programing skills are needed to build a unique website like this and others you see online... twitter, facebook, etc etc.




How to share the SSRS generated report with users

I have an html, css, javascript website. I want to add a Stat link which will direct users to the SSRS reports based on their entered data. Just like nike fuel band web site where the user is presented with a dashboard on signing in which shows bar graph of walking activity for the last week. Users can change it to month or year etc.

To cut the long story short. I want to show an SSRS report of user activity when the user click a link on the webpage. I dont know what tools I can use to achieve it.




Woocommerce product dimensions not showing on first product

I am using Wordpress with Woocommerce and would like the shop and archive pages to show the product dimensions along with the price and title of the product.

I added this code to my content-product.php woocommerce file: http://ift.tt/1Kyj7dt

Which worked great! Except for the first product in the shop loop. Both on the shop page and in other product lists, the dimensions are not shown on the first product.

How might I resolve this?

Image: http://ift.tt/1F9fEtZ




rewrite get variables in url

I'm working on a website and now i want to edit the htaccess file to change a url with get variable. But i look on the internet for information without any success.

http://ift.tt/1F96Ggv{massageName}

this is the link and i want it to look like this

http://ift.tt/1HJjO2I{massageName}

Can someone help me with that??

Martijn




jquery consumes to JAX -WS

have a java web service (JAX -WS) ...

@WebMethod(operationName = "TraerConsulta")
public String TraerConsulta() {
    try {
        cl_integrens icl_integrens = new cl_integrens();
        String as_xmldat = "";
        as_xmldat = icl_integrens.sp_QueryReturnXML("sa", "dactaZQL2008", "exec sp_sysbas_dd_tabdef ?, ?, ?", 10, "001", "101", "estreg");
        return as_xmldat;
    } catch (Exception ex) {
        Logger.getLogger(ws1.class.getName()).log(Level.SEVERE, null, ex);
    }
    return null;
}

and i'm trying consume with jquery

function WebMethodConsulta() {            
        var codigo =$("#txtCodigo").val();            
        var nombre =$("#txtNombre").val();            
        var q = '<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://ift.tt/sVJIaE" xmlns:SOAP-ENV="http://ift.tt/sVJIaE">'+
                '<SOAP-ENV:Header></SOAP-ENV:Header>'+
                '<S:Body><ns2:TraerConsulta xmlns:ns2="http://ws/"/></S:Body></S:Envelope>';

        $.ajax({
            url: 'http://ift.tt/1GBGArC',
            data: q,
            type: 'post',
            contentType: 'text/xml; charset="utf-8"',
            success: function(res) {                    
                 var responseWS = $(res);                     
                 var data2 = responseWS.find("Body").find("TraerConsultaResponse").find("return").text();                     
                 alert(data2.toString());
                 $('#spnresu').html(data2.toString());              
            },
            error: ServiceFailed
        });
    }

and it works ... but I get to activate the cross domain

help me please!!




Django BD error

Hi guys i´m using Django 1.7 and mysql to create an application and I´m receiving this error

ValueError at /Cannot create form field for 'radiotipo_idradiotipo' yet, because its related model u'Radioinfo' has not been loaded yet

I don´t know what is this. this error happenes on my forms.py, here´s the code: forms.py

from django import forms
from models import Node, Datasource, Radio, Radiotipo, Snapshot, Tag, Taginfo, Valores

class NodeForm(forms.ModelForm):
    class Meta:
        model = Node

class DatasourceForm(forms.ModelForm):
    class Meta:
        model = Datasource
class RadiotipoForm(forms.ModelForm):
    class Meta:
        model = Radiotipo
class SnapshotForm(forms.ModelForm):
    class Meta:
        model = Snapshot
class TagForm(forms.ModelForm):
    class Meta:
        model = Tag
class TaginfoForm(forms.ModelForm):
    class Meta:
        model = Taginfo
class ValoresForm(forms.ModelForm):
    class Meta:
        model = Valores
class RadioForm(forms.ModelForm):
    class Meta:
        model = Radio

and here is my models.py

class Datasource(models.Model):

    objects = GChartsManager()

    idestacao_meteo = models.IntegerField(db_column='idDATASOURCE', primary_key=True, editable=False)  # Field name made lowercase.
    nome_estacao = models.CharField(db_column='NAME', max_length=45)  # Field name made lowercase.
    fabricante = models.CharField(db_column='MANUFACTURER', max_length=45, blank=True)  # Field name made lowercase.
    modelo = models.CharField(db_column='MODEL', max_length=45, blank=True)  # Field name made lowercase.
    node_idnode = models.ForeignKey('Node', db_column='site_idSITE', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'datasource'


class Node(models.Model):

    objects = GChartsManager()

    idnode = models.IntegerField(db_column='idSITE', primary_key=True, editable=False)  # Field name made lowercase.
    nome = models.CharField(db_column='NAME', max_length=45)  # Field name made lowercase.
    informacoes = models.CharField(db_column='DESCRIPTION', max_length=45, blank=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'site'

class Radio(models.Model):

    objects = GChartsManager()

    idradio = models.IntegerField(db_column='idRADIO', primary_key=True, editable=False)
    endreal = models.CharField(db_column='ENDREAL', max_length=64, blank=True)  # Field name made lowercase.
    radiotipo_idradiotipo = models.ForeignKey('Radioinfo', db_column='radioInfo_idRADIOINFO')  # Field name made lowercase.
    datasource_idestacao_meteo = models.ForeignKey(Datasource, db_column='datasource_idDATASOURCE', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'radio'

class Radiotipo(models.Model):

    objects = GChartsManager()

    idradiotipo = models.IntegerField(db_column='idRADIOINFO', primary_key=True, editable=False)  # Field name made lowercase.
    nome = models.CharField(db_column='NAME', max_length=45)
    descricao = models.CharField(db_column='DESCRIPTION', max_length=300, blank=True)

    class Meta:
        managed = False
        db_table = 'radioinfo'

class Snapshot(models.Model):

    objects = GChartsManager()

    idsnap = models.IntegerField(db_column='idSNAP', primary_key=True, editable=False)  # Field name made lowercase.
    valor = models.FloatField(db_column='VALUE', blank=True, null=True)  # Field name made lowercase.
    snapshot = models.DateTimeField(db_column='SNAPSHOT', blank=True, null=True)  # Field name made lowercase.
    tag_idtag = models.ForeignKey('Tag', db_column='tag_idTAG')  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'snapshot'

class Tag(models.Model):

    objects = GChartsManager()

    idtag = models.IntegerField(db_column='idTAG', primary_key=True, editable=False)  # Field name made lowercase.
    desvio = models.FloatField(db_column='DEVIATION', blank=True, null=True)  # Field name made lowercase.
    tempo_max = models.IntegerField(db_column='TIME_MAX', blank=True, null=True)  # Field name made lowercase.
    conv_rate = models.IntegerField(db_column='CONV_RATE', blank=True, null=True)  # Field name made lowercase.
    taginfo_idtaginfo1 = models.ForeignKey('Taginfo', db_column='tagInfo_idTAGINFO')  # Field name made lowercase.
    datasource_idestacao_meteo = models.ForeignKey(Datasource, db_column='datasource_idDATASOURCE', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'tag'

class Taginfo(models.Model):

    objects = GChartsManager()

    idtaginfo = models.IntegerField(db_column='idTAGINFO', primary_key=True, editable=False)  # Field name made lowercase.
    nome = models.CharField(db_column='NAME', max_length=45)  # Field name made lowercase.
    descricao = models.CharField(db_column='DESCRIPTION', max_length=255, blank=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'taginfo'

class Valores(models.Model):

    objects = GChartsManager()

    idvalores = models.IntegerField(db_column='idVALUES', primary_key=True, editable=False)  # Field name made lowercase.
    valor = models.FloatField(db_column='VALUE')  # Field name made lowercase.
    datahora = models.DateTimeField(db_column='DATETIME')  # Field name made lowercase.
    tag_idtag = models.ForeignKey(Tag, db_column='tag_idTAG')  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'values'

Thanks for helping.