Thursday, June 18, 2015

Digest for comp.lang.c++@googlegroups.com - 25 updates in 9 topics

Paul <pepstein5@gmail.com>: Jun 18 03:09AM -0700

On Wednesday, June 17, 2015 at 10:19:48 PM UTC+1, K. Frank wrote:
> generate your concatenations can be one and the same.
 
> > ...
 
> Anyway, just some thoughts.
 
Many thanks for your suggestions. I am trying to incorporate some of these ideas.
 
I'm finding it very difficult to make this work, though -- no easier to write than my previous attempt.
 
The problem is that (123 + 4) concatenated with 5 = 1275 which is not a legal sequence.
 
So we need to make sure to keep the sequences legal, and then I end up basically redoing my previous code.
 
Anyway, I'm very pleased to see someone else thought about the problem.
 
Paul
Victor Bazarov <v.bazarov@comcast.invalid>: Jun 18 07:33AM -0400

On 6/18/2015 6:09 AM, Paul wrote:
> up basically redoing my previous code.
 
> Anyway, I'm very pleased to see someone else thought about the
> problem.
 
I didn't think of it until you posted. I didn't read either your
solution or K's. My approach would be this. Since you need to find all
possible combinations of digits interspersed with pluses or minuses (and
I am assuming that plus-minus is not valid), then you only have a
limited (and well-defined) number of combinations to try. They all
follow the pattern
 
<digit> { <op or nothing> <digit> } ...
 
That, with nine digits to use, gives 3^8 combinations, 6561 sets of
symbols. What I'd write is a function to convert a number between 0 and
6561 into a ternary representation (- for 0, _ for 1 and + for 2), then
take the original string, which is "123456789", and "apply" that ternary
representation to it, after which remove all underscores. Once you got
the final sequence, compute the expression it contains. If the outcome
is what you need (whatever the target), store the expression.
 
Seems very straight-forward.
 
V
--
I do not respond to top-posted replies, please don't ask
Victor Bazarov <v.bazarov@comcast.invalid>: Jun 18 09:10AM -0400

On 6/18/2015 7:33 AM, Victor Bazarov wrote:
> the final sequence, compute the expression it contains. If the outcome
> is what you need (whatever the target), store the expression.
 
> Seems very straight-forward.
 
Here is my attempt to generate all possible sequences:
 
#include <list>
#include <string>
#include <iostream>
#include <sstream>
 
using namespace std;
 
list<string> solutions(string const& sequence, int goal)
{
list<string> retval;
if (!sequence.empty())
{
auto ns = pow(3, sequence.length() - 1);
 
for (int k = 0; k < ns; ++k)
{
int is = k;
// generate the possible solution
string possible;
decltype(sequence.length()) ic = 0;
ostringstream os;
os << "possible solution # " << is;
while (is > 0)
{
possible.push_back(sequence[ic++]);
switch (is % 3)
{
case 1:
possible.push_back('+'); break;
case 2:
possible.push_back('-'); break;
}
 
is /= 3;
}
while (ic < sequence.length())
possible.push_back(sequence[ic++]);
 
retval.push_back(os.str() + " : " + possible); // debugging
}
}
return retval;
}
 
int main()
{
list<string> ls = solutions("1234", 100);
for (auto ss : ls)
{
cout << ss << endl;
}
}
 
Now just add your code to calculate the expression and record only those
that give you the correct one.
 
V
--
I do not respond to top-posted replies, please don't ask
Ben Bacarisse <ben.usenet@bsb.me.uk>: Jun 18 02:31PM +0100

Paul <pepstein5@gmail.com> writes:
<snip>
>> > 67 - 8 + 9 = 100.*/
 
> Anyway, I'm very pleased to see someone else thought about the
> problem.
<snip> I did, too, but I chose to solve it in another language (C as it
happens). Where is the problem from?
 
I got lost in your code very quickly -- it looked overly-complex for the
task. You might get people to engage wit the code more if you give the
overall plan first.
 
--
Ben.
Victor Bazarov <v.bazarov@comcast.invalid>: Jun 18 10:24AM -0400

On 6/18/2015 9:10 AM, Victor Bazarov wrote:
 
> [...snip...]
 
> Now just add your code to calculate the expression and record only those
> that give you the correct one.
 
It was fun to add a recursive calculating function, and here is the
complete program:
 
#include <list>
#include <string>
#include <iostream>
#include <sstream>
 
using namespace std;
 
long calculate(string const &sequence)
{
auto pi = sequence.find('+');
auto mi = sequence.find('-');
if (pi == string::npos && mi == string::npos)
{
long val{0};
istringstream is(sequence);
is >> val;
return val;
}
else
{
if (mi == string::npos // only plus is there
|| pi < mi) // or plus comes first
{
return calculate(sequence.substr(0, pi))
+ calculate(sequence.substr(pi + 1));
}
else if (pi == string::npos // only minus is there
|| mi < pi) // or minus comes first
{
return calculate(sequence.substr(0, mi))
- calculate(sequence.substr(mi + 1));
}
}
return 0;
}
 
list<string> solutions(string const& sequence, long goal)
{
list<string> retval;
if (!sequence.empty())
{
auto ns = pow(3, sequence.length() - 1);
 
for (int k = 0; k < ns; ++k)
{
int is = k;
// generate the possible solution
string possible;
decltype(sequence.length()) ic = 0;
ostringstream os;
os << "possible solution # " << is;
while (is > 0)
{
possible.push_back(sequence[ic++]);
switch (is % 3)
{
case 1:
possible.push_back('+'); break;
case 2:
possible.push_back('-'); break;
}
 
is /= 3;
}
 
while (ic < sequence.length())
possible.push_back(sequence[ic++]);
 
if (calculate(possible) == goal)
retval.push_back(os.str() + " : " + possible); // debugging
}
}
return retval;
}
 
int main()
{
list<string> ls = solutions("123456789", 100);
for (auto ss : ls)
{
cout << ss << endl;
}
}
 
Enjoy!
 
V
--
I do not respond to top-posted replies, please don't ask
Victor Bazarov <v.bazarov@comcast.invalid>: Jun 18 10:31AM -0400

On 6/18/2015 10:24 AM, Victor Bazarov wrote:
 
> It was fun to add a recursive calculating function, and here is the
> complete program:
 
> #include <list>
 
[...]
 
Nope. There is a bug somewhere... Back to find it...
 
V
--
I do not respond to top-posted replies, please don't ask
Victor Bazarov <v.bazarov@comcast.invalid>: Jun 18 10:33AM -0400

On 6/18/2015 10:31 AM, Victor Bazarov wrote:
 
>> #include <list>
 
> [...]
 
> Nope. There is a bug somewhere... Back to find it...
 
Found the bug. It was performing the calculation out of order. Need to
start from the back.
 
V
--
I do not respond to top-posted replies, please don't ask
ram@zedat.fu-berlin.de (Stefan Ram): Jun 18 01:46AM

>On 6/17/2015 7:57 PM, JiiPee wrote:
>>I would like to have a static integer member in a template class without
>There is no such thing as "a template class".
 
No. But there is a rule that whenever someone posts
»There is no ...«, you can find this »...« /somewhere/ in C++.
The is a side-effect of the sheer size of C++, one might
call it: size-effect.
 
23.3.1p1:
 
The headers <array>, <deque>, <forward_list>, <list>,
and <vector> define template classes«
 
14.6.5p2:
 
»As with non-template classes, the names of namespace ...«
 
14.7.3p7:
 
»member templates of non-template classes«
bleachbot <bleachbot@httrack.com>: Jun 18 02:46PM +0200

"MICHELE RAGAZZI. ODEY GIANO." <ginobusciarello@outlook.com>: Jun 18 05:46AM -0700

BASTARDI LAVA CASH MAFIOSO GERARDO SEGAT E PAOLO BARRAI (DI CRIMINALI T&F TAX AND FINANCE SA E WMO SA PANAMA) FAN PASSARE IL MILAN DAL PRESTANOME DI COSA NOSTRA, NAZISTRAGISTA PEDOFILO SILVIO BERLUSCONI AD ALTRO PRESTANOME MALAVITOSO: BEE TAECHAUBOL!
 

 
LA MAFIA COMPRO' IL MILAN VIA PROPRIO PRESTANOME PEDOFILO E SPAPPOLA MAGISTRATI SILVIO BERLUSCONI ( QUALSIASI COSA ABBIA LO SBAUSCIA MINORENNI A PAGAMENTO, SILVIO BERLUSCONI, E' TARGATO MASSONERIASSASSINA NAZIFASCISTA E MAFIA... DA SEMPRE)! ESSENDO CHE QUEST'ULTIMO E' ORMAI SEMPRE PIU' UN PAZZO DEPRAVATO ATTEMPATO CHE A SEGRATE VA' A RAGLIARE LE SUE MEGA BALLE PSEUDO POLITICHE, PURE, DALLA PARTE OPPOSTA A DOVE DOVREBBE ANDARE... ECCO CHE ORA... IL BOSS IN TUTTO E PER TUTTO DI SILVIO BERLUSCONI, IL MEGA SOCIO FINANZIATORE DI SILVIO BERLUSCONI, MATTEO MESSINA DENARO, PREOCCUPATO DA QUESTE MONTAGNE DI CHIARA DEMENZA SENILE, HA DECISO DI PASSARE IL MILAN AD ALTRO PROPRIO PRESTANOME: BEE TAECHAUBOL.
 
NEL FRATTEMPO, PERO'... MANDEREMO STA SPAZZATURA FASCIOCAMORRISTA DI SQUADRA IN SERIE B. ANZI, SERIE BBBEEEEEEEE!
 
COMPLIMENTI AD ANDREA AGNELLI: UNO DEI MIGLIORI MANAGER E UOMINI CHE VI SIANO ANCORA NELLA CLOACA NAZINDRANGHETISTA DI RENZUSCONIA ( " VI E'" PER MODO DI DIRE: PER UNICO E PRIMISSIMO, NEL 2007, QUIANDO NESSUNO A COSA DEL GENERE, PENSASSE, SCRISSI CHE LA FIAT SE NE SAREBBE ANDATA NEGLI STATI UNITI VIA OLANDA ED INGHILTERRA... CON NON POCHI ANNI DI ANTICIPO... FACEMMO LA STORIA... COME SEMPRE: IAMM E STRA IAMM BEEE).
 
HA DETTO CHE NON CAPISCE DA DOVE VENGONO I SOLDI DI BEE BEE TAECHAUBOL. E CHE CAPISCE ANCOR MENO CHE CALCOLI STRA COLMI DI CRIMINI SI SIAN STATI FATTI PER DIRE CHE LA SQUADRA CHE AMMAZZO' STEFANO BORGONOVO ( E PARECCHI ALTRI UOMINI), A BOTTE DI DROGHE FOLLI DATEGLI, POSSA VALERE UN MILIARDO DI EURO ( ULLALA'... ECCO PERCHE' IL TRECARTISTAVANZODIGALERA SILVIO BERLUSCONI NON SOPPORTI DA SEMPRE, E CON TUTTE LE PROPRIE FORZE, LEGGI ANTI FALSO IN BILANCIO...
http://www.lastampa.it/2015/02/18/economia/falso-in-bilancio-forza-italia-si-impunta-tempi-pi-lunghi-2Y14UKWH5YVVyMG72aivzI/pagina.html
http://www.repubblica.it/2008/01/sezioni/cronaca/prescrizione-sme/prescrizione-sme/prescrizione-sme.html )
 
INIZIAMO A RISPONDERE AL PRIMO PUNTO. IAMM E STRA IAMM, IA'!
 
UOMO CHIAVE E' IL BANCHIERE MAXIMO DI COSA NOSTRA, ORA IN CARCERE AD OPERA ( DOPO ESSER SCAPPATO PRECEDENTEMENTE, NON PER NIENTE, IN UNA MAREA DI PAESI, E PER DECENNI): VITO ROBERTO PALAZZOLO
http://it.wikipedia.org/wiki/Vito_Roberto_Palazzolo
 
VICINISSIMO AI PADRONI DI SEMPRE DI SILVIO BERLUSCONI: TOTO RIINA, BERNARDO PROVENZANO E SPECIALMENTE MAFIA ITALO AMERICANA ( QUINDI, VICINISSIMIO AL NOTO COMPARE DI P2 DI SILVIO BERLUSCONI STESSO... MANDANTE DI MOLTI OMICIDI COME SILVIO BERLUSCONI: TALE MICHELE SINDONA)! NON SCORDATEVI CHE LA LEUCEMIASSASSINA DEL MONDO INTERO, SILVIO BERLUSCONI, DEVE TUTTO E STRA TUTTO, IN STRAGISTA E PEDOFILA VITA SUA, AI CAMION STRA COLMI DI TONNELLATE DI EROINA, COCAINA, HASCISH, E MILIARDI DI LIRE CASH DEGLI ANNI 70 DA INSAPONARE ( MILIARDI DI LIRE CASH DEGLI ANNI 70... QUINDI, VALENTI, QUASI ALLA PARI, MILIARDI DI EURO DI ORA, SE ATTUALIZZIAMO IL TUTTO AD OGGI), CHE IL PIU' RICCO MAFIOSO DI TUTTI I TEMPI, STEFANO BONTATE, FACEVA ARRIVARE DA PALERMO ALL'ORTOMERCATO DI MILANO INSIEME AD UN PO' DI CASSETTE DI ARANCE E LIMONI ATTE A COPRIRE LA VISIONE DEL "VERO CARICUZZEDDU DA PORTARE A MILANUZZEDDU, AAA".
http://it.wikipedia.org/wiki/Banca_Rasini
http://www.antimafiaduemila.com/200805044344/articoli-arretrati/le-mani-sulla-madonnina.html
http://www.ilfattoquotidiano.it/2012/04/24/la-storia-di-rapisarda-lamico-dei-mafiosi-per-il-quale-lavorava-dellutri/206872/
POI, LO SPAPPOLA MAGISTRATI.... IL MANDANTE DI DOZZINE DI STRAGI E CENTINAIA DI OMICIDI MASCHERATI DA FINTI INFARTI, MALORI ED INCIDENTI, L'ASSASSINO PEDERASTA FASCIOCAMORRISTA SILVIO BERLUSCONI, FECE RIEMPIRE DI PALLOTTOLE STEFANO BONTATE... E SI PAPPO' IL TUTTO.
https://s-media-cache-ak0.pinimg.com/236x/a7/92/fa/a792fac4916bf4495a3154340f0326db.jpg
FECE RIEMPIRE DI PALLOTTOLE STEFANO BONTATE DA COLUI CHE POI FU IL VERO PADRONE DI SILVIO BERLUSCONI. DA INZIO ANNI 80, FIN,DI FATTO, AI GIORNI NOSTRI: TOTO RIINA.
http://www.repubblica.it/cronaca/2014/08/30/news/mafia_riina_berlusconi-94686226/
CHE COME POTETE NOTARE, PARLA IN TUTTO E PER TUTTO COME SILVIO BERLUSCONI.
https://www.youtube.com/watch?v=RQ_FwDgcklo
https://www.youtube.com/watch?v=ZqLwoKSgaPU
E CHE FU, NON PER NIENTE, QUASI DIPINTO COME UN EROE DA UNA FICITION PRODOTTA DA CANALE MAFIOSO 5
http://paolofranceschetti.blogspot.be/2009/09/chi-e-veramente-il-capo-dei-capi.html
OO CHE CASO, OO!
VITO ROBERTO PALAZZOLO, GESTIVA FIUMI DI SOLDI DELLA MAFIA DI TOTO RIINA E BERNARDO PROVENZANO, QUINDI, ANCHE DI SILVIO BERLUSCONI E DI ENNIO DORIS ( LA CUI BANCA, A WALL STREET E NELLA CITY, ORMAI NICKIAMO TUTTI: BANCA MAFIOLANUM CAMORRANUM NDRANGOLANUM NAZISTANUM MEDIOLANUM)
http://isegretidellacasta.blogspot.be/2012/02/la-banca-del-tesoro-di-berlusconi-e-dei.html
http://espresso.repubblica.it/palazzo/2008/05/15/news/vado-riciclo-e-torno-1.8408
GUARDATE BENE IL LINK DI WIKIPEDIA CHE HO PRIMA POSTO A PROPOSITO DI VITO ROBERTO PALAZZOLO, PLS. OVE FACEVA "BUSSINESSUZZEDDU" NEGLI ULTIMI ANNI, LO STESSO? AD HONG KONG ED IN THAILANDIA!! DA DOVE VERREBBERO I FONDI DEL PRESTANOME THAI DI COSA NOSTRA? DA HONG KONG E THAILANDIA, AGAIN AND AGAIN!
OO CHE CASO, OO E STRA OOO.
AVREI ALTRE CENTO PROVE, INDIZI, NOMI E COGNOMI DA AGGIUNGERE A TUTTO QUESTO ( TIPO QUELLO DI UN MEGA RICICLA SOLDI MAFIOSI, EX MORGAN STANLEY, ORA RICICLANTE CASH KILLER A GO GO, AD HONG KONG, PER TRIADE, MALA RUSSA DI PUTIN ED ORGANIZZAZIONI ASSASSINE DI MEZZO MONDO: EXTREMELY CRIMINAL BASTARD DANIEL HEGGLIN... O TIPO QUELLO DI UN ALTRO SCAGNOZZO USATO TANTO DALLA LEUCEMIASSASSINA SILVIO BERLUSCONI A FINI DI LERCISSIMO RICICLAGGIO: NOTO AVANZO DI GALERA, IN CARCERE GIA' 3 VOLTE, PAOLO BARRAI NATO A MILANO IL 28.6.1965).
MA
A) LAVORANDO IN VITA MIA, DALLE 14 ALLE 20 ORE AL GIORNO, ALIAS DALLE 5AM ALLE 21-23 PM, NON HO ORA IL TEMPO PER RIUSCIRE A SCRIVERE OLTRE.
B) NE FARO' SAPERE AD AUTORITA' COMPETENTI SENZA FARE ULTERIORI ASSISTS AL CANCRO MA-F-ASCISTA DEL MONDO INTERO, SILVIO BERLUSCONI!
 
 
 
.. E A PROPOSITO DI CHI SIA IL NOTO PEDOFILOMOSESSUALE, AVANZO DI GALERA PAOLO BARRAI...
 
 
 
OCHO AL PIU' PUZZONE AVANZO DI GALERA DELLA FINANZA NEONAZISTA MONDIALE: PAOLO BARRAI DI CRIMINALISSIME WMO SA PANAMA, CRIMINALISSIMA BSI ITALIA SRL DI VIA SOCRATE 26 A MILANO E CRIMINALISSIMO BLOG MERCATO "MERDATO" LIBERO ( NOTO PER FARE AZZERARE I RISPARMI DI TUTTI E TUTTE LE VOLTE)! MINACCIA DI MORTE CHI LO FOTOGRAFA E SE "COSTUI" INSISTE, L'OMICIDA PAOLO BARRAI FA UCCIDERE O "SUICIDARE" DAVVERO! COME CON DAVID ROSSI DI MONTE PASCHI ( E NE SCRIVEREMO NON POCO, QUI A SEGUITO)!
 
ASSASSIN & MAFIA MONEY LAUNDERER PAOLO BARRAI WMO SA PANAMA (MANDANTE DI OMICIDI, MEGA RICICLA CASH MAFIOSO, PEDOFILOMOSESSUALE SODOMIZZA BIMBI, GIA' 3 VOLTE IN GALERA, TERRORISTA, LADRO, TRUFFATORE, AZZERARISPARMI, FALSONE, ESTORTORE)! A VOI CHI E'!

-NAZIRAZZISTA, MEGA RICICLA CASH MAFIOSO PAOLO BARRAI DI CRIMINALISSIMA WMO SA PANAMA (IN COMBUTTA CON BESTIA MALAVITOSA GERARDO SEGAT DI DELINQUENTISSIMA FIDUCIARIA T&F TAX AND FINANCE SA LUGANO... NON PER NIENTE USATA DA NOTO NAZINDRANGHETISTA TIRANNO PEDOFILO STRAGISTA SILVIO BERLUSCONI: DETTO QUESTO, DETTO TUTTO... DIREI).

-LADRO, TRUFFATORE, AZZERA RISPARMI DI OGNUNO E SEMPRE, TUTTE LE VOLTE FALSISSIMO, TRUFFATORE, LADRO, MANDANTE DI OMICIDI, TERRORISTA NERO "ED IN NERO", GIA' VARIE VOLTE CONDANNATO AL CARCERE": PAOLO BARRAI (NATO A MILANO IL 28.06.1965)! DI CRIMINALISSIMA WMO SA PANAMA E CRIMINALISSIMA BSI ITALIA SRL DI VIA SOCRATE 26 MILANO (OLTRE CHE, COME DETTO, MEGALAVA CASH DI COSA NOSTRA, CAMORRA, NDRANGHETA, NARCOS COLOMBIANI, MESSICANI E RUSSI.... NONCHE' POLITI-C-RIMINALE, CONNESSO A FASCIOPORCI SILVIO BERLUSCONI, MARINA BERLUSCONI, MASSIMO DORIS, ENNIO DORIS, DAVIDE SERRA, UMBERTO BOSSI E MATTEO SALVINI)! STALKA A MORTE CHI LO FOTOGRAFA E SE "UNO" INSISTE, L'ASSASSINO PAOLO BARRAI FA "SUICIDARE" DAVVERO!!!
 
- FREQUENTISSIMO MANDANTE DI BERLUSCONIANI E LEGHISTI OMICIDI MASCHERATI DA FINTI INCIDENTI, MALORI, PIU' SPESSO ANCORA, "SUICIDATE", PAOLO BARRAI DI CRIMINALISSIMA WMO SA PANAMA ( ALLA DAVID ROSSI DI MONTE PASCHI O CORSO BOVIO O ALBERTO CAPERNA O PIETRO SAVIOTTI O GIORGIO PANTO O PAOLO ALBERTI O ADAMO BOVE O MICHELE LANDI O ANDREA PININFARINA O VINCENZO PARISI O ANTONIO MANGANELLI O MIKE BONGIORNO O.... ALLA GENITORI DI CLEMENTINA FORLEO O .... ALLA GERARDO DAMBROSIO.. PER NON DIRE DEGLI ETERNI GIOVANNI FALCONE E PAOLO BORSELLINO... TUTTA GRANDE GENTE FATTA AMMAZZARE IN MILLE DIVERSI MODI DAGLI ASSASSINI, FINANCO STRAGISTI, SILVIO BERLUSCONI, MARINA BERLUSCONI, ENNIO DORIS, MASSIMO DORIS, UMBERTO BOSSI, ROBERTO MARONI, MATTEO SALVINI E I TERRORISTI NERI E SPECIALMENTE " IN NERO", PAOLO BARRAI E MAURIZIO BARBERO, NOTO PEDERASTA ASSASSINO DI TECHNOSKY: POTETE STARNE STRA CERTI)

-NOTO NAZIPEDERASTA PAOLO BARRAI (28.06.1965) DI MALAVITOSE WMO, PROF:IT E BSI ITALIA SRL DI VIA SOCRATE 26 A MILANO, CHE PER DIFENDERE IL SUO MANDANTE FASCIOCAMORRISTA, STRAGISTA E NOTO PEDOFILO COME LUI, SILVIO BERLUSCONI ( NOTARE BENE, PLEASE, CHE STO SODOMIZZA BAMBINI DI FIAMMA TRICOLORE, FORZA NUOVA, CASA POUND, FORZA ITALIA E LL - LEGA LADRONA, PAOLO BARRAI, E' IN POSSESSO DA ANNI DELLA REPELLENTE, VOMITEVOLISSIMA TESSERA DI ORGOGLIO PEDOFILO:
http://en.wikipedia.org/wiki/North_American_Man/Boy_Love_Association ) HA SPESSO DETTO E SCRITTO: " CHE LA PEDOFILIA NON E' UN REATO, IN QUANTO NEL TERZO MONDO, TANTE BAMBINE DI 10, 11, 12 ANNI, RIMANGONO IN CINTA"! PER AGGIUNGERE IN PRIVATO E SPESSISSIMO, FRASI DA FAR MEGA SUPER STRA ACCAPONARE LA PELLE, OSSIA, CHE E' FIERO DI AVER SODOMIZZATO I SUOI FIGLI RICCARDO BARRAI E COSTANZA BARRAI FIN DALLA NASCITA! MOSTRANDO ANCHE DELLE FOTO PEDOPORNOMOSESSUALI, IN CUI "ATTORE" ERA LO STESSO NAZIPEDERASTA PAOLO BARRAI! FOTO DI FILM PER PEDOFILI OMOSESSUALI O PEDOFILI IN GENERE ( COME PAOLO BARRAI E SUO PAPPONE NAZIMAFIOSO SILVIO BERLUSCONI) DEGLI ANNI 2000, 2001, 2002 (OSSIA, APPENA DOPO CHE LO STESSO AVANZO DI GALERA PAOLO BARRAI VENIVA CACCIATO MALISSIMAMENTE DA CITIBANK PER CRIMINI EFFERATI CHE LO STESSO, LI, COMMETTEVA, PER POI VENIR CONDANNATO AL CARCERE SU DENUNCIA DI CITIBANK: COSA DI CUI PRESTO SCRIVEREMO). IN CUI '" LA STAR" ERA PROPRIO DETTO PPP PUZZONE PERVERTITO PAZZO DI PAOLO BARRAI. RAFFIGURATO A FARE FILM PORNO CON RAGAZZINI DI 12-14-16 ANNI! O, SCIOCCANTISSIMAMENTE, MENTRE FACENTE SESSO ORALE E NON SOLO, CON CAVALLI ( FOTO CHE ERANO IN INTERNET E CHE, APPENA IL TUTTO INIZIO' A VENIRE A GALLA, LO STESSO FALLITO DEPRAVATO PAOLO BARRAI, PER POTER PIU' FACILMENTE "SPENNARE POLLI IN RETE" VIA SUE TRUFFE FINANZIARIO-NAZI-MEDIATICHE, FECE CANCELLARE))! QUI MI FERMO O LA MIA BILE O PANCREAS O FEGATO O STOMACO O CUORE O TUTTO QUESTO INSIEME, FAN CRACK, E MI MANDAN ALL' ALTRO MONDO SUBITO!
TORNIAMO SU TERRENI PIU' "NORMALI", PLEASE, PER QUANTO LE COSE ESTREMAMENTE ORRIDE APPENA DESCRITTE, SONO SUPER STRA VERE!!!

-FASCIONDRANGHETISTA, LADRO, TRUFFATORE, SPENNA POLLI DEL WEB, PERICOLOSISSIMO AZZERARISPARMI, MEGA LAVA SOLDI DI COSA NOSTRA, CAMORRA, NDRANGHETA, O SOLDI POLITI-C-RIMINALISSIMI, ESATTAMENTE FRUTTI DI MEGA MAZZETTE O RUBERIE DI LL LEGA LADRONA ED EX PDL, POPOLO DI LADRONI. PLURI PREGIUDICATO, DIVERSE VOLTE FINITO IN CARCERE: PAOLO BARRAI NATO A MILANO IL 28.06.1965
https://it.linkedin.com/pub/dir/?first=PAOLO&last=BARRAI&search=Search
(RICICLANTE CASH CHE COLA ANCHE SANGUE DI MORTI AMMAZZATI; NON SOLO PER PRIMA CITATE MALAVITE ORGANIZZATE O AL CAPONE MISTI AD ADOLF HITLER DELLA POLITICA, COME SILVIO BERLUSCONI E MATTEO SALVINI; MA ANCHE PER VIA DI SUOI CAMERATA KILLER QUALI MASSIMO CARMINATI E GENNARO MOKBEL; COME, AI TEMPI, TANTO QUANTO, PER ALTRI SUOI CAMERATA DELINQUENTISSIMI QUALI WALTER LAVITOLA, ALESSANDRO PROTO, FRANCO FIORITO E FRANCESCO BELSITO; O PER PICCIOTTINCRAVATTATI QUALI IL PERICOLOSISSIMO MEGARICICLA SOLDI MAFIOSI: GIOVANNI RAIMONDI DI DI PIA PARTECIPAZIONI 20121 MILANO FORO BUONAPARTE 12; GIA' DI MALAVITOSA BANCA SAI, MALAVITOSA GIOVANNI RAIMONDI SIM E MALAVITOSO GIOVANNI RAIMONDI AGENTE DI CAMBIO; DA SEMPRE, QUEST'ULTIMO, FACENTE OGNI TIPO DI DELITTO FINANZIARIO, CON O PER, SUOI PAPPONI MA-F-ASCISTI ENNIO DORIS, MASSIMO DORIS, SILVIO BERLUSCONI, PAOLO LIGRESTI ED IGNAZIO LA RUSSA). COLLETTO ARCI FETIDO PAOLO BARRAI DI CRIMINALISSIMO WMOGROUP, CRIMINALISSIMA BSI ITALIA SRL DI VIA SOCRATE 26 MILANO E PRECIPITANTE BLOG MERCATO 'MERDATO' LIBERO ( TALMENTE PRECIPITANTE CHE DALLA VERGOGNA ESTREMA DI MOSTRARE CHE GLI VI SONO RIMASTI, AL MASSIMO, 3 LETTORIDIOTI AL GIORNO, HA LEVATO DALLO STESSO IL CONTATORE: IAMM E STRA IAMM BEEE). PRIMA DI CONTINUARE A DESCRIVERE QUESTO UGO FANTOZZI ( OSSIA SEMPRE PERDENTISSIMO) MISTO A RENATO VALLANZASCA ( OSSIA SEMPRE CRIMINALISSIMO), DELLA FINANZA, CHE E' IL COLLETTO LERCIO PAOLO BARRAI, VORREI, PER INIZIARE, SOTTOLINEARE COME MAI E POI MAI SI SIAN VISTI DEI CAGNACCI BRUCIA AVERI ALTRUI COME L'AVANZO DI GALERA PAOLO BARRAI STESSO, UNITO AL NOTO LADRO, TRUFFATORE, SEMPRE SBAGLIANTE IN BORSA, FEDERICO IZZI CONOSCIUTO A TUTTI COME 'ER ZIO ROMOLO DELLA CAMORRA'. UNA PROVA? ALTRO CHE UNA, VE NE SONO MILIARDI DI PROVE! IAMM BELL, IA! INIZIAMO SOLO CON 2 'PROVETTE' SU MILIONI DI MILIONI ( PRESTO CENTINAIA DI MIGLIAIA DI BLOGS CHE LE MOSTRERANNO TUTTE, LE CANNATE DISTRUGGI RISPARMI DI MIGLIAIA DI PERSONE, DI PAOLO BARRAI DI ESTREMISSIMAMENTE MALAVITOSA WMO)! IL 5.9.14 DICEVAN DI VENDERE, CHE IL DOW JONES A GIORNI SAREBBE CROLLATO SOTTO 15.000 DA 17200 CIRCA OVE ERA
http://www.mercatoliberonews.com/2014/10/dow-jones-atteso-in-area-15000.html
"INFATTI".... AAAH, SIAMO SCHIZZATI IN SU FINO AI MASSIMI DI TUTTI I TEMPI! QUASI 18.000! SIAM SCHIZZATI IN SU E TANTISSIMO! MILIARDESIMA, "ENNESISSIMA" LORO CANNATA!
DA SCHIATTARE DAL RIDERE! GUARDATE QUI, PLS, COSA, L'ESCREMENTO NAZISTA, LAVA SOLDI MAFIOSI, LADRO, TRUFFATORE FEDERICO IZZI (AGAIN AND AGAIN AND AGAIN: NOTO A TUTTI COME "ER ZIO ROMOLO DELLA CAMORRA" IN QUANTO CAMPA SOLO E SEMPRE DI RICICLAGGIO DI SOLDI ASSASSINI), RAGLIAVA IL 5.9.14:
 
http://www.mercatolibero.info/zio-romolo-i-mercati-esagerato/
 
ESATTAMENTE DA QUELLA DATA, IL DOW JONES E' SCHIZZATO IN SU COME UN RAZZO
 
https://es.finance.yahoo.com/echarts?s=%5EDJI
 
GIUSTO... COSI'... PER MENZIONARNE UN ALTRA, UNA SU MILIONI DI MILIONI, LA PRIMA CHE MI VIENE IN MENTE... FACEVA VENDERE AZIONI AD INIZIO 1.2012 E TUTTO E' SALITO PER 3 MESI!
 
http://mercatoliberotraderpergioco.blogspot.fr/2012/01/ci-attende-un-gennaio-di-ribassi.html
 
FACEVA POI COMPRARE, OVVIAMENTE, AI MASSIMI, IN PIENA PRIMAVERA 2012, E SIAM CROLLATI DA 13270 A 12115!!! FRA L'ALTRO STO SCHIFOSO PEZZO DI ME.DA DI FEDERICO IZZI NOTO COME "ER ZIO ROMOLO DELLA CAMORRA", COME LO E' OGNI ESCREMENTO BERLUSCONICCHIO, E' UN TUTT'UNO CON MALAVITE DI TUTTO IL MERIDIONE DI FECCIA DITTATORIALE DI "RENZUSCONIA". E, TENTEVI DURO, DELLA BANDA DELLA MAGLIANA. OLTRE CHE CON PRIMA CITATI VERMI DEI GIRI DI MASSIMO CARMINATI E GENNARO MOKBEL! COME UN ESTRATTO DI RECENTE VINCENTISSIMO TESTO CHE GIRA PER LA RETE, STRA DIMOSTRA: "...BESTIA CHE MEGA TRUFFA VIA WEB E FA SEMPRE PERDERE TUTTI I RISPARMI DI TUTTI, PUZZONE CRIMINALE FEDERICO IZZI DI ROMA. NOTO COME ZIO ROMOLO! VICINISSIMO AD ENRICO NICOLETTI, NOTO MALAVITOSO BANCHIERE DELLA BANCA DELLA MAGLIANAhttp://www.agoravox.it/Arrestato-Enrico-Nicoletti-il.html , VICINISSIMO A TERRORISTI NAZISTI COME MASSIMO CARMINATI E GENNARO MOKBEL! VICINISSIMO AI CRUDELI ASSASSINI "CASALESI", VIA, NOTORIAMENTE, MEGA OMICIDA FAMIGLIA CAMORRISTA DEI BARDELLINO
 
http://www.ilfattoquotidiano.it/2011/12/10/affari-politici-camorra-formia-avamposto-laziale-casalesi/176674/ PRESSO FORMIA E LATINA ...."
 
....D'ALTRONDE....
 
STO VERMINOSO AVANZO DI GALERA IN QUANTO PIU' VOLTE ARRESTATO, PAOLO BARRAI DI CRIMINALISSIMA WMO,
JiiPee <no@notvalid.com>: Jun 18 12:57AM +0100

I would like to have a static integer member in a template class without
the need to call it with template parameters:
 
template <typename T>
class A
{
public:
A(const T& data, int nID = ID_NOT_IN_USE) : // copy constructor
m_data(data), m_ID(nID)
{ }
 
static const int ID_NOT_IN_USE = -1;
 
T data;
int m_ID;
};
 
This works, but to call ID_NOT_IN_USE I have to give a type even though
I just want to know the value of ID_NOT_IN_USE:
cout<<A<int>::ID_NOT_IN_USE;
Is it possible to create a static member which does require the type
when it is used? I know A::ID_NOT_IN_USE does not work, but is there any
other way? What is the best way to solve this as I would like to keep
ID_NOT_IN_USE to be a member of A or at least dependent of it somehow
because it obviously belongs to class A. I know I can make it a global :
 
const int ID_NOT_IN_USE = -1;
template <typename T>
class A
{ ...
 
but now its not anymore dependent of A.
Sam <sam@email-scan.com>: Jun 17 07:41PM -0500

JiiPee writes:
 
> class A
> { ...
 
> but now its not anymore dependent of A.
 
Right. And if it's dependent on A, you have to reference it as a class
member.
 
This looks like an XY problem. What actual problem are you trying to solve.
No, not what you wrote, but the real problem that you think this is a
solution for.
Victor Bazarov <v.bazarov@comcast.invalid>: Jun 17 08:48PM -0400

On 6/17/2015 7:57 PM, JiiPee wrote:
> I would like to have a static integer member in a template class without
 
There is no such thing as "a template class".
 
> class A
> { ...
 
> but now its not anymore dependent of A.
 
You keep writing "class A", "belongs to class A", but there is no such
thing! "A" is not a class! It's a class *template*. There is no
class, there is no member, until you *instantiate* that template, i.e.
give it a certain set of arguments.
 
What prevents me from doing
 
template<> class A<std::string> {
unsigned ID_NOT_IN_USE = 666;
};
 
? Nothing! It's called "specialization" and you have no control over
what I stick into that *class* and how.
 
I strongly recommend defining an actual *class* (not a template),
putting your important static constant in it, and then deriving your
template from that class and bringing your const name into it by means
of the 'using' declaration:
 
struct HasSpecialConst {
static const int ID_NOT_IN_USE = -1;
};
 
template<class T> class A : HasSpecialConst {
...
using HasSpecialConst::ID_NOT_IN_USE;
};
 
(let us know if it doesn't work for you, and why).
 
V
--
I do not respond to top-posted replies, please don't ask
Ed Anson <EdAnson@comcast.net>: Jun 17 08:56PM -0400

On 6/17/15 7:57 PM, JiiPee wrote:
> class A
> { ...
 
> but now its not anymore dependent of A.
 
When creating a template class having members that do not depend on a
template parameter, I typically put those members in a non-template
class that is inherited by the template. Although that might be a bit
verbose in this case, it would work. Of course, you still have to refer
to a class name (when referencing it outside the class) but at least you
don't need to specify a template parameter. Of course, ANY reference to
a member from outside the class requires mention of either an instance
or a class name, depending on whether the member is static.
Victor Bazarov <v.bazarov@comcast.invalid>: Jun 18 07:36AM -0400

On 6/17/2015 9:46 PM, Stefan Ram wrote:
 
> »As with non-template classes, the names of namespace ...«
 
> 14.7.3p7:
 
> »member templates of non-template classes«
 
Those are glaring defects in the Standard. Good that you've found them.
 
V
--
I do not respond to top-posted replies, please don't ask
legalize+jeeves@mail.xmission.com (Richard): Jun 18 04:19AM

[Please do not mail me a copy of your followup]
 
Victor Bazarov <v.bazarov@comcast.invalid> spake the secret code
 
>You're likely right, and I wasn't reading the Standard carefully. I am
>guessing it mostly differs for the members that *don't have* an
>initializer specified for them.
 
Yeah, if you don't specify an initializer for a member of a class,
then it is default initialized. On the github assimp project someone
pointed out to me the difference between default initialization and
value initialization:
 
class A {
public:
A() {}
int f[10];
};
 
A g;
 
Here g is default initialized and A::A() is called.
Member f is not mentioned in any initializer list for A::A() and
therefore is also default initialized.
Default initialization of an array means that each element is default
initialized.
Default initialization of an int does nothing special. The int will
have some storage, so its contents are undefined.
 
However, if we write:
 
class A {
public:
A() : f() {}
int f[10];
};
 
A g;
 
Then everything is as before, but f is now value initialized and allt
he ints in f will be initialized to zero.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
"Lőrinczy Zsigmond" <zsiga@nospam.for.me>: Jun 18 11:48AM +0200

On 2015-06-12 22:54, Noob wrote:
 
> Will this work as expected?
 
> Regards.
 
Yes; also you can complicate it a little:
 
if (development) memset (*this, 0xff, sizeof *this);
else memset (*this, 0, sizeof *this);
Noob <root@127.0.0.1>: Jun 18 11:57AM +0200

On 18/06/2015 11:48, Lőrinczy Zsigmond wrote:
 
> also you can complicate it a little:
 
> if (development) memset (*this, 0xff, sizeof *this);
> else memset (*this, 0, sizeof *this);
 
If the code depends on all fields being 0, I don't see how
setting all bytes to 0xff will help ;-)
 
Regards.
"Lőrinczy Zsigmond" <zsiga@nospam.for.me>: Jun 18 12:49PM +0200

> If the code depends on all fields being 0, I don't see how
> setting all bytes to 0xff will help ;-)
 
It helps finding the un-initialized fields.
That's why I added the "development" as the opposite of "production"
legalize+jeeves@mail.xmission.com (Richard): Jun 18 04:27AM

[Please do not mail me a copy of your followup]
 
Christopher Pisz <nospam@notanaddress.com> spake the secret code
>_Kty,std::vector<_Ty,std::allocator<_Ty>>>>>' (or there is no
>acceptable conversion) c:\users\christopher.pisz\documents\visual
>studio 2013\projects\test\test\main.cpp 12 1 Test
 
There is no std::map::operator[] that is a const method. This is
because operator[] *creates* an entry in the map for the given key if
it doesn't already exist. If you want to find the value associated
with a key on a constant map, then use std::map::find.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
legalize+jeeves@mail.xmission.com (Richard): Jun 18 04:24AM

[Please do not mail me a copy of your followup]
 
Doug Mika <dougmmika@gmail.com> spake the secret code
 
>Why can't I do the following:
 
Because nested type declarations in an object are not members of an
instance of an object.
 
>}
 
>Instead what I must do in line xx is decltype(c1)::value_type x;?
>Is value_type a member of c1? (just as is name)
 
c1 is an instance of a class, it is not a type. You declare variables
using a type. You can't say 'c1.value_type x' any more than you can
say 'c1 x;'.
 
C<int> is the type of c1. C<int>::value_type is the nested type.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
legalize+jeeves@mail.xmission.com (Richard): Jun 18 04:13AM

[Please do not mail me a copy of your followup]
 
Victor Bazarov <v.bazarov@comcast.invalid> spake the secret code
>> The original poster didn't specify this, but in general, this is NOT
>> how C style callback APIs work when they use a void* context pointer.
 
>"All generalizations are wrong". Think about it.
 
But it is simply pointless to raise these "what if?" questions that
arise from the realm of a "hostile API" when the normal case is not a
hostile API. If you have a hostile API, then you've got bigger fish
to fry.
 
There is an infinite number of hostile APIs we can imagine where doing
something sane is difficult or impossible, but it is a waste of time
discussion them.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
"Jason C. McDonald" <indeliblebluepen@nospam.invalid>: Jun 17 05:23PM -0700

On 06/17/2015 12:20 AM, Christian Gollwitzer wrote:
> repeated div/mod apporach shown here. "pow" is a floating point
> function. Your algorithm does repeated conversion between integer and
> double, which is not going to help either accuracy or speed.
 
Thanks for that, I appreciate the input. That's a much cleaner method
than my determine place value, and frankly it WOULD run faster.
 
> addition to printing the normalized value. I wouldn't recommend to roll
> your own unless you implement the string library (and let me ask, why)
 
> Christian
 
I wound up using the built-in in my project, but I still wanted to wrap
my own for most of the reasons outlined in my follow-up to Christopher
Pilz. The only of those reasons that no longer stands is avoidance of
STL in the specific context of Glib (but not the intentional avoidance
in the case of a custom class.)
 
Thanks for the feedback!
 
 
--
The number of ways in which code can be potentially screwed up is
theoretically infinite.
www.indeliblebluepen.com
"Jason C. McDonald" <indeliblebluepen@nospam.invalid>: Jun 17 05:28PM -0700

On 06/17/2015 12:20 AM, Christian Gollwitzer wrote:
 
>> Glib::ustring text = Glib::ustring::format(123456);
 
> for sure you are not the first person wanting to print data to ustring,
> so I'm not very surprised you found a ready-made number formatter already.
 
Actually, I was surprised NOT to initially. The Stack Overflow poster
was the first person I found online to mention it, even on the Glib
mailing list! Everyone suggested to use stringstream, which just didn't
feel right.
 
> repeated div/mod apporach shown here. "pow" is a floating point
> function. Your algorithm does repeated conversion between integer and
> double, which is not going to help either accuracy or speed.
 
Well, I knew something could be cleaned up. Thanks for that. The funny
thing about algorithms like this is that they are often considered so
obvious that no one writes them down anywhere anymore. That's one of the
problems with "just use X library": we wind up training an entire
generation of programmers that, if tasked with rebuilding any basic
functionality such as this, would be at a total loss. That's one of the
reasons I try to wrap my own so often, even if I DO use the library in
the end.
 
> with floating point numbers. Then you'll have to handle NaN, Inf etc. in
> addition to printing the normalized value. I wouldn't recommend to roll
> your own unless you implement the string library (and let me ask, why)
 
I tend to go with the implementation built into a library I'm using, if
it is available. I am wary of using YET ANOTHER class, however, for
several reasons. I am extremely selective, even with STL. Full
explanation in my initial followup to Christopher Pilz's response.
 
Thanks for the feedback.
 
 
--
The number of ways in which code can be potentially screwed up is
theoretically infinite.
www.indeliblebluepen.com
"Jason C. McDonald" <indeliblebluepen@nospam.invalid>: Jun 17 05:31PM -0700

Ignore this reply...it said it failed, so I resubmitted a revised one. Meh.
 
--
The number of ways in which code can be potentially screwed up is
theoretically infinite.
www.indeliblebluepen.com
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: