text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
)
or die "$file: Unable to open: $!\n";
for my $msg ( sort { $a->timestamp <=> $b->timestamp } $folder->messages)
{
my $to = join( ', ', map { $_->format } $msg->to );
my $from = join( ', ', map { $_->format } $msg->from );
my $date = localtime( $msg->timestamp );
my $subject ... | [
0.4575270414352417,
-0.16630655527114868,
0.8352562785148621,
-0.03152714669704437,
0.3407577872276306,
0.4533900022506714,
0.4435623288154602,
-0.3148232698440552,
-0.15938705205917358,
-0.7306348085403442,
-0.44175398349761963,
0.39912906289100647,
-0.29635030031204224,
0.482368707656860... | |
= $msg->decoded->string;
# Strip all quoted text
$body =~ s/^>.*$//msg;
print MYFILE <<"";
From: $from
To: $to
Date: $date
$body
}
```
However I get the same problem that I am unable to open the file with gedit, even though it works with vi or such. If there are non unicode characters in the file, woul... | [
0.26288703083992004,
0.2541666626930237,
0.5145062804222107,
-0.21210941672325134,
-0.35527142882347107,
-0.017771940678358078,
0.6122093200683594,
-0.0810994878411293,
-0.15545031428337097,
-0.619268000125885,
-0.2884387671947479,
0.35224851965904236,
-0.2692546844482422,
0.32887291908264... | |
for the content type (`$message->contentType`) and convert everything to UTF-8. | [
0.06427912414073944,
-0.08457215875387192,
0.24594318866729736,
-0.32366707921028137,
-0.08964070677757263,
-0.2941095530986786,
0.3197745084762573,
0.1787647157907486,
0.04881926253437996,
-0.7457674741744995,
-0.5767700672149658,
0.539497971534729,
-0.6221532821655273,
0.1110624819993972... | |
I can not distinguish the difference between aggregating and holding. What does it mean in terms of, let`s say, C++?
I suppose when the object of class A holds (or instantiates) objects of class B, it uses it to perform some functions by itself.
For example:
```
class A {
int state;
public:
A(int s): state(... | [
0.23097026348114014,
-0.09918183088302612,
0.39981958270072937,
-0.17241767048835754,
-0.19005133211612701,
0.21234695613384247,
0.15106230974197388,
-0.4204103350639343,
-0.10574742406606674,
-0.06129340082406998,
-0.4029513895511627,
0.5197052955627441,
-0.5573266744613647,
0.36552172899... | |
""; }
};
void B::f(int p)
{
A mA(p);
app = mA.inc();
}
```
And the aggregation of object of class A would be like this:
```
class B{
A t;
//...
}
```
Please give me a link to a web-site or to a place in a book where I can find clear definitions in terms of OO language what exactly each kind of relationship... | [
0.006924146320670843,
-0.05999438837170601,
0.178020641207695,
0.07586761564016342,
-0.06987766921520233,
0.2173103243112564,
0.05332227796316147,
-0.15036842226982117,
-0.47400057315826416,
-0.3761183023452759,
-0.4689001441001892,
0.1020028293132782,
-0.23634643852710724,
0.4819161891937... | |
parent of the individual points.
Aggregating means taking different classes and putting them behind a interface so they appear as one class. For example a FileDialog will have several button class, a text input class, a listview/treeview class and so on. But to the rest of the system it just had methods to be activate... | [
-0.17731952667236328,
-0.4586701989173889,
0.25763288140296936,
0.4638417065143585,
-0.07675325870513916,
0.18901118636131287,
-0.024926142767071724,
0.17595864832401276,
-0.04257583245635033,
-0.6125636696815491,
0.05142159387469292,
0.1945612132549286,
-0.4770233929157257,
0.336702316999... | |
I need a font that shows letters and function keys on a keyboard, so that I can show Ctrl+Alt+S as 3 separate keys on a keyboard, not as the text.
I've looked at two, and one of them had lots of missing keys (among other things, the Win key), the other one cost over $100.
Any good ideas?
Oh, and this needs to be a t... | [
0.6439877152442932,
0.3015158772468567,
0.3502172529697418,
0.14704011380672455,
0.010394027456641197,
0.10849040746688843,
0.1888689547777176,
-0.3639233708381653,
0.09710540622472763,
-0.6971017718315125,
0.1290644407272339,
0.5924725532531738,
-0.2604134678840637,
0.11842124909162521,
... | |
was hoping for a free download as well, but I'll settle for cheap, as I can always use the font for documentation in other projects. So if anyone knows some non-free, non-royalty-based, complete, keyboard fonts, that are cheap, I'll settle for that as well.
This looks like it meets your requirements:
<http://www.webpag... | [
0.22069041430950165,
0.03954384848475456,
0.3253138065338135,
0.11906659603118896,
-0.11246993392705917,
0.03527632728219032,
-0.02773408778011799,
0.1812700480222702,
-0.4561140537261963,
-0.5589418411254883,
-0.008149226196110249,
0.4103736877441406,
0.08671871572732925,
-0.0153227774426... | |
font is not free and that this site has a number of fonts for download which are not to be redistributed. | [
0.3987235426902771,
0.348287969827652,
-0.03066881000995636,
0.1718735545873642,
-0.11920987069606781,
-0.05678730830550194,
0.28750282526016235,
0.12934204936027527,
-0.20759963989257812,
-0.4731296896934509,
-0.026629948988556862,
-0.0607340931892395,
-0.2712055742740631,
0.3811545372009... | |
I am writing a program that does a lot of writes to a Postgres database. In a typical scenario I would be writing say 100,000 rows to a table that's well normalized (three foreign integer keys, the combination of which is the primary key and the index of the table). I am using PreparedStatements and executeBatch(), yet... | [
-0.08018103986978531,
0.490454763174057,
0.3503115773200989,
-0.42605647444725037,
-0.13756024837493896,
0.021591782569885254,
0.3734489679336548,
-0.30138638615608215,
-0.0411820262670517,
-0.770355224609375,
0.025248205289244652,
0.3386707305908203,
-0.05481681972742081,
0.11294195801019... | |
expect it to beat a custom embedded DB, but I was hoping it to be only 2-3x slower, not 7x. Anything obvious that I maybe missing? does the order of the writes matter? (i.e. say if it's not the order of the index?). Things to look at to squeeze out a bit more speed?
This is an issue that I have had to deal with often o... | [
0.28163278102874756,
-0.11344186961650848,
0.2971559166908264,
0.24545703828334808,
-0.16548267006874084,
-0.06890056282281876,
0.2840713858604431,
0.049662329256534576,
-0.14187142252922058,
-0.6416237950325012,
0.21471931040287018,
0.7856561541557312,
-0.0540340393781662,
-0.081721216440... | |
that there are more resources dealing with that issue.
So here are a few solutions that we have come up with:
First, all solutions involve using the postgres [COPY command](http://www.postgresql.org/docs/8.3/static/sql-copy.html). Using COPY to import data into postgres is by far the quickest method available. Howeve... | [
0.28820469975471497,
0.27304375171661377,
0.2361479103565216,
0.07557766139507294,
0.15027126669883728,
-0.2231583446264267,
0.0862862840294838,
0.030197011306881905,
-0.33861151337623596,
-0.764007031917572,
-0.07379654794931412,
0.7201369404792786,
-0.5168285369873047,
0.2894801497459411... | |
can write the data out to a file on the filesystem and then use the COPY command to import the data in bulk.
Other options for increasing speed are using JNI to hit the postgres api so you can talk over the unix socket, removing indexes and the [pg\_bulkload project](http://pgfoundry.org/projects/pgbulkload/). However... | [
0.24085907638072968,
-0.10033559054136276,
0.2608335018157959,
0.5031189918518066,
0.005622636526823044,
-0.1696079969406128,
-0.09486996382474899,
0.11190564185380936,
-0.44493159651756287,
-0.6342920660972595,
-0.21024072170257568,
0.5545411705970764,
-0.22165481746196747,
0.138220682740... | |
Any thoughts on why this isn't working? I really thought 'ignore' would do the right thing.
```
>>> 'add \x93Monitoring\x93 to list '.encode('latin-1','ignore')
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
UnicodeDecodeError: 'ascii' codec can't decode byte 0x93 in position 4: ordinal ... | [
0.06265777349472046,
0.09748019278049469,
0.15480823814868927,
0.10723221302032471,
0.16938111186027527,
0.2768915593624115,
0.16226178407669067,
0.014122862368822098,
-0.2480793297290802,
-0.7515172958374023,
-0.32346972823143005,
0.13356736302375793,
-0.34401735663414,
-0.045541636645793... | |
straightforward *encoding* of Unicode is UCS-4; every character occupies 4 bytes, and all ~1000000 characters are available. The 4 bytes contain the number of the character in the Unicode tables as a 4-byte integer. Another very useful encoding is UTF-8, which can encode any Unicode character with one to four bytes. Bu... | [
-0.10372300446033478,
0.2030184268951416,
0.2260516881942749,
-0.016684640198946,
-0.2332340031862259,
0.26620665192604065,
0.11080750823020935,
-0.09404779225587845,
-0.307047575712204,
-0.7372713088989258,
-0.3334119915962219,
0.1656343936920166,
-0.19524726271629333,
-0.2278366237878799... | |
came quite late, so all of us that grew up using an 8-bit *character set* learned too late that all this time we worked with *encoded* strings. The encoding could be ISO8859-1, or windows CP437, or CP850, or, or, or, depending on our system default.
So when, in your source code, you enter the string "add “Monitoring“ ... | [
0.48758265376091003,
-0.1796254962682724,
0.3950487971305847,
0.12059085816144943,
0.42715129256248474,
-0.01708027347922325,
0.22637948393821716,
0.13507264852523804,
-0.4132951498031616,
-0.5862922668457031,
-0.12750226259231567,
0.4454077482223511,
-0.4304579794406891,
0.010042728856205... | |
you want to get Unicode from that, you need to *decode* the string from the "cp1252" encoding.
So, what you meant to do, was:
```
"add \x93Monitoring\x94 to list".decode("cp1252", "ignore")
```
It's unfortunate that Python 2.x includes an `.encode` method for strings too; this is a convenience function for "special... | [
0.0000796885578893125,
0.15032215416431427,
0.059519145637750626,
-0.12402955442667007,
-0.12790024280548096,
-0.07216157019138336,
0.2670045793056488,
-0.21441935002803802,
-0.2185744047164917,
-0.6939220428466797,
-0.28358879685401917,
0.5512483716011047,
-0.43556708097457886,
-0.2261310... | |
need to specify the *encoding* that will be used.
I'm not very clear, I'm sleepy, but I sure hope I help.
PS A humorous side note: Mayans didn't have Unicode; ancient Romans, ancient Greeks, ancient Egyptians didn't too. They all had their own "encodings", and had little to no respect for other cultures. All these ci... | [
0.30110204219818115,
0.5517773628234863,
-0.062485042959451675,
0.1571207046508789,
-0.16047906875610352,
0.04626068100333214,
0.11971770226955414,
0.8152325749397278,
-0.1991855800151825,
-0.8266852498054504,
-0.2818410396575928,
0.1297789365053177,
-0.2898724675178528,
-0.250972151756286... | |
is populated mostly by chinese ideograms, ergo Chinese is the basis of Unicode. I can go on inventing outrageous lies, as long as people develop Unicode-aware applications. Cheers! | [
0.42465558648109436,
0.4795415997505188,
0.1005159318447113,
-0.032651446759700775,
-0.3109850287437439,
-0.16095681488513947,
0.2183493673801422,
0.48328956961631775,
-0.09017649292945862,
-0.06666813045740128,
-0.49036237597465515,
0.13538309931755066,
0.16364997625350952,
-0.58975654840... | |
What do you do with classes that have no member data, only methods?
Do you make them static?
In my case it is an repository class that executes queries against the database. Maybe I got the repository pattern wrong... (It does implement an interface)
Inherit from an Interface mean that you cannot use static. Simply c... | [
0.22375130653381348,
-0.3182283043861389,
-0.4505418539047241,
0.3860436677932739,
-0.43476077914237976,
-0.2461787313222885,
0.2616003453731537,
0.16651366651058197,
-0.3566109836101532,
-0.177434042096138,
0.1351635754108429,
0.4484354257583618,
-0.529241681098938,
0.4208761751651764,
... | |
I've been working with [Microsoft SQL Server](http://www.microsoft.com/Sqlserver/) with many years now but have only just recently started to use [MySQL](http://www.mysql.com/) with my web applications, and I'm hungry for knowledge.
To continue with the long line of ["hidden feature" questions](https://stackoverflow.c... | [
0.7618122100830078,
0.15415365993976593,
0.05275237560272217,
0.3015570342540741,
0.07546316832304001,
-0.1972176879644394,
0.013939562253654003,
0.3997112810611725,
-0.3892778754234314,
-0.2838224172592163,
0.36348265409469604,
0.47369009256362915,
0.40488913655281067,
0.3422624170780182,... | |
my reading on MySQL tuning makes me conclude that MySQL is behind Oracle in terms of optimizing queries.
While the simple queries required for most B2C applications may work well for MySQL, most of the aggregate reporting type of queries needed for Intelligence Reporting seems to require a fair bit of planning and re... | [
0.0166719201952219,
-0.017934594303369522,
0.4042913317680359,
0.19196641445159912,
-0.1484842449426651,
0.05900879204273224,
0.2671104967594147,
-0.10773123800754547,
-0.4020208418369293,
-0.7369176149368286,
0.1775842159986496,
0.45537084341049194,
-0.1493004709482193,
0.2569167315959930... | |
for Linux/x86 allow you to have up to 4096 concurrent connections, but self compiled binaries often have less of a limit.
Set table\_cache to match the number of your open tables and concurrent connections. Watch the open\_tables value and if it is growing quickly you will need to increase its size.
Note:
The 2 pre... | [
0.03257305920124054,
-0.25724896788597107,
0.5272099375724792,
0.04619505628943443,
-0.020452307537198067,
-0.010327806696295738,
0.1604166328907013,
-0.1630650907754898,
-0.5125860571861267,
-0.8747910857200623,
-0.09783110022544861,
0.5932358503341675,
-0.4352909326553345,
0.089399904012... | |
and available resources, but 4Mb and 32Mb, respectively are recommended starting points.
Note: These are "per connection" values, among read\_buffer\_size, read\_rnd\_buffer\_size and some others, meaning that this value might be needed for each connection. So, consider your load and available resource when setting th... | [
-0.13840794563293457,
-0.20707982778549194,
0.47400084137916565,
-0.11497797071933746,
0.21632161736488342,
0.05498707666993141,
0.07369101792573929,
-0.16059817373752594,
-0.6292422413825989,
-1.0317453145980835,
-0.006975668948143721,
0.25400328636169434,
-0.09179677814245224,
0.51087957... | |
your threads\_created do not grow very quickly.
PRIMARY KEY:
============
There can be only one AUTO\_INCREMENT column per table, it must be indexed, and it cannot have a DEFAULT value
KEY is normally a synonym for INDEX. The key attribute PRIMARY KEY can also be specified as just KEY when given in a column definiti... | [
0.06236032769083977,
-0.14883950352668762,
0.48222798109054565,
0.26104843616485596,
0.20759597420692444,
0.1228877604007721,
0.13596464693546295,
0.222779780626297,
-0.3415217995643616,
-0.685012698173523,
0.06938627362251282,
0.41026800870895386,
-0.42619842290878296,
0.6180181503295898,... | |
"\_rowid" in SELECT statements.
In MySQL, the name of a PRIMARY KEY is PRIMARY
Currently, only InnoDB (v5.1?) tables support foreign keys.
Usually, you create all the indexes you need when you are creating tables.
Any column declared as PRIMARY KEY, KEY, UNIQUE, or INDEX will be indexed.
NULL means "not having a v... | [
-0.37729769945144653,
-0.06647473573684692,
0.40698933601379395,
-0.17879514396190643,
-0.16432945430278778,
0.07330986112356186,
0.1253705769777298,
0.004061160609126091,
-0.20657825469970703,
-0.43579307198524475,
-0.3059346079826355,
0.4235605299472809,
-0.38448357582092285,
0.474466443... | |
stored in a table's AUTO\_INCREMENT column. (Storing 0 is not a recommended practice, by the way.)
To change the value of the AUTO\_INCREMENT counter to be used for new rows:
```
ALTER TABLE mytable AUTO_INCREMENT = value;
```
or
SET INSERT\_ID = value;
Unless otherwise specified, the value will begin with: 1000... | [
-0.031118785962462425,
-0.03789953514933586,
0.6948825716972351,
-0.04029771685600281,
0.349287211894989,
0.3145911693572998,
0.1163008064031601,
-0.11858991533517838,
-0.2471797615289688,
-0.7220197916030884,
-0.11557889729738235,
0.30194416642189026,
-0.23784476518630981,
0.0591138973832... | |
to watch out for when using one of these types in a WHERE clause, it is best to do
WHERE datecolumn = FROM\_UNIXTIME(1057941242)
and not
WHERE UNIX\_TIMESTAMP(datecolumn) = 1057941242.
doing the latter won't take advantage of an index on that column.
<http://dev.mysql.com/doc/refman/5.1/en/date-and-time-function... | [
0.3123120069503784,
-0.07320360839366913,
0.49512165784835815,
-0.18798454105854034,
0.3619849979877472,
-0.1350705325603485,
0.08812558650970459,
0.15471118688583374,
-0.32240429520606995,
-0.6852749586105347,
-0.045184437185525894,
0.6435642838478088,
-0.1533917933702469,
0.0265908930450... | |
just so happens that between the 28th and the 29th of October 2006 we went off daylight savings time and lost an hour.
Beginning with MySQL 4.1.3, the CURRENT\_TIMESTAMP(), CURRENT\_TIME(), CURRENT\_DATE(), and FROM\_UNIXTIME() functions return values in the connection's *current time zone*, which is available as the... | [
-0.010006553493440151,
-0.04310542717576027,
0.8078387379646301,
-0.02482779510319233,
0.2973935008049011,
0.005972189828753471,
0.4074641764163971,
0.3841097056865692,
-0.39341792464256287,
-0.40849828720092773,
-0.15185505151748657,
0.5342528820037842,
0.011231542564928532,
0.52579152584... | |
is changed If an UPDATE results in no fields being changed then the DateTime is NOT updated!
Addtionally, the First TIMESTAMP is always AUTOUPDATE by default even if not specified
When working with Dates, I almost always convet to Julian Date becuase Data math is then a simple matter of adding or subtracing integers,... | [
0.12720228731632233,
-0.031948596239089966,
0.6637945771217346,
-0.13251450657844543,
0.05348949879407883,
0.23489095270633698,
-0.16748154163360596,
-0.1228821650147438,
-0.39837631583213806,
-0.49104493856430054,
0.07598982751369476,
0.5644375085830688,
-0.0035070113372057676,
0.10042164... | |
unsigned integer which will be good till around 2106 as:
' secs in 24Hrs = 86400
' Signed Integer max val = 2,147,483,647 - can hold 68 years of Seconds
' Unsigned Integer max val = 4,294,967,295 - can hold 136 years of Seconds
Binary Protocol:
================
MySQL 4.1 introduced a binary protocol that allows n... | [
-0.05043700709939003,
-0.06316952407360077,
0.6669487953186035,
-0.07195960730314255,
-0.1652909517288208,
0.19987377524375916,
0.47569361329078674,
0.041361868381500244,
-0.2533544898033142,
-0.29874736070632935,
-0.17226076126098633,
0.38825705647468567,
-0.007262084633111954,
0.21902832... | |
values in native format. The binary protocol underwent quite a bit of revision during the earlier releases of MySQL 4.1.
You can use the IS\_NUM() macro to test whether a field has a numeric type.
Pass the type value to IS\_NUM() and it evaluates to TRUE if the field is numeric:
One thing to note is that binary dat... | [
0.1597275584936142,
0.16702662408351898,
0.23932893574237823,
0.2427234947681427,
-0.2088795155286789,
-0.19519288837909698,
0.19518139958381653,
-0.21291212737560272,
-0.20822195708751678,
-0.29531624913215637,
0.04612474516034126,
0.38008707761764526,
-0.12650714814662933,
0.465153247117... | |
SLAVE ON *.* to slave\_user IDENTIFIED BY 'slave\_password'
```
#Master Binary Logging Config STATEMENT causes replication
to be statement-based - default
log-bin=Mike
binlog-format=STATEMENT
server-id=1
max_binlog_size = 10M
expire_logs_days = 120
#Slave Config
master-host=master-ho... | [
0.08085788786411285,
-0.08519788086414337,
0.24944192171096802,
0.0023147915489971638,
0.06685614585876465,
0.02966468781232834,
0.5159421563148499,
-0.3533226251602173,
-0.3115848898887634,
-0.6162394285202026,
-0.5661762952804565,
0.6665077209472656,
-0.3444552421569824,
0.48036071658134... | |
the CHAR's to VARCHAR's
RecNum integer\_type UNSIGNED NOT NULL AUTO\_INCREMENT, PRIMARY KEY (RecNum)
MySQL always represents dates with the year first, in accordance with the standard SQL and ISO 8601 specifications
Misc:
=====
Turing off some MySQl functionality will result in smaller data files
and faster access.... | [
-0.16830602288246155,
0.12144090235233307,
0.5020913481712341,
0.12571671605110168,
0.020265616476535797,
0.10444189608097076,
0.13227351009845734,
0.1466488540172577,
-0.2950473427772522,
-0.37731829285621643,
-0.1423591822385788,
-0.04594775661826134,
0.09139768034219742,
0.3048855960369... | |
which occur because:
there is no transaction overhead:
Much faster
Lower disk space requirements
Less memory required to perform updates
Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type. An .frm file stores the ... | [
-0.08922263979911804,
0.23576347529888153,
0.7335081100463867,
0.5184347033500671,
0.04572458937764168,
0.1101878210902214,
-0.0654323548078537,
0.05942198261618614,
-0.4216885566711426,
-0.8382124304771423,
-0.2408406287431717,
0.25457409024238586,
-0.0761299729347229,
0.16217418015003204... | |
files then DROP the table. When you put the files back
MySQl will recognize them and update the table tracking.
If you must Backup/Restore,
Restoring a backup, or importing from an existing dump file can takes a long time depending on the number of indexes and primary keys you have on each table. You can speed this p... | [
0.2370804250240326,
0.16421572864055634,
0.550848662853241,
0.024360766634345055,
0.2807508111000061,
-0.09551630169153214,
0.1941128820180893,
-0.12841178476810455,
-0.3465019166469574,
-0.42689570784568787,
-0.4116198718547821,
0.661196231842041,
-0.4120102822780609,
0.19956566393375397,... | |
beginning of the dump file, and add the COMMIT; command to the end.
By default, autocommit is on, meaning that each and every insert command in
the dump file will be treated as a separate transaction and written to disk before the next one is started. If you don't add these commands, reloading a large database into ... | [
-0.047599390149116516,
-0.1349778175354004,
0.6941068768501282,
-0.1731204092502594,
0.008840992115437984,
-0.026582296937704086,
0.1117015928030014,
-0.18555815517902374,
-0.2299858182668686,
-0.26443272829055786,
-0.01762774959206581,
0.6273899078369141,
-0.21902647614479065,
0.139389887... | |
spaces are retained when
values are stored and retrieved, in conformance with standard SQL.
CHAR and VARCHAR values in MySQL are compared without regard to trailing spaces.
Using CHAR will only speed up your access if the whole record is fixed size. That is,
if you use any variable size object, you might as well ma... | [
-0.370275616645813,
-0.034983158111572266,
0.79116290807724,
0.11682546138763428,
-0.24693237245082855,
0.5483959317207336,
0.28989043831825256,
-0.09718327224254608,
-0.3368645906448364,
-0.5241036415100098,
-0.11582506448030472,
0.2369404286146164,
-0.1539013534784317,
0.1870879679918289... | |
character set, and sorting and comparison are based on the
numeric values of the bytes in column values
If strict SQL mode is not enabled and you assign a value to a BLOB or TEXT column that
exceeds the column's maximum length, the value is truncated to fit and a warning is generated.
Useful Commands:
=============... | [
-0.19131243228912354,
-0.34194913506507874,
0.7050923109054565,
0.10690100491046906,
0.2188357710838318,
0.1846223622560501,
0.037073973566293716,
-0.11767669767141342,
-0.40393346548080444,
-0.4999205470085144,
-0.32016822695732117,
0.4252478778362274,
-0.25226715207099915,
0.092965513467... | |
is empty max(pkcolname) returns 1 mysql\_insert\_id() converts the return type of the native MySQL C API function mysql\_insert\_id() to a type of
long (named int in PHP).
If your AUTO\_INCREMENT column has a column type of BIGINT, the value returned by
mysql\_insert\_id() will be incorrect. Instead, use the intern... | [
-0.0411585234105587,
-0.12137769162654877,
0.5478572249412537,
-0.21357397735118866,
0.13776738941669464,
-0.013673027977347374,
0.0048865810967981815,
-0.17638978362083435,
-0.07611173391342163,
-0.4572809040546417,
-0.08455710113048553,
0.531181812286377,
-0.3939618170261383,
-0.02397783... | |
because you’ve not got any apostrophes around the values you’re trying to stick into the table. So you should change your code to:
```
INSERT INTO table (this, that) VALUES ('$this', '$that')
```
reminder that `` are used to define MySQL fields, databases, or tables, not values ;)
Lost connection to server during ... | [
0.040158044546842575,
0.1634533703327179,
0.22963349521160126,
0.06159461289644241,
0.2278258353471756,
0.09638246148824692,
0.2788010537624359,
-0.02769644185900688,
-0.45196545124053955,
-0.33854320645332336,
-0.09363459795713425,
0.6980348825454712,
-0.1455063372850418,
0.32629844546318... | |
database nightmare](https://stackoverflow.com/questions/101333/the-ultimate-mysql-legacy-database-nightmare)
This required a series of appplications to process the tables into something usefull using many of the tricks mentioned here.
If you found this astoundingly helpfull, express your thanks by voting it up.
Also... | [
0.22114737331867218,
0.051260169595479965,
0.31935763359069824,
0.35369640588760376,
0.20738019049167633,
-0.25998255610466003,
0.2796021103858948,
0.008878445252776146,
-0.26586392521858215,
-0.5027126669883728,
0.3248884975910187,
0.6847451329231262,
0.20740148425102234,
0.16548453271389... | |
Does anyone know any resources (books/websites/whatever) related to parsing. I'm not so much interested in specific technologies such as yacc, XML or regular expressions, but something more general about best practices, stream vs. pull, error reporting and recovery, gotchas to look out for etc.
There a nice book on par... | [
0.44918695092201233,
-0.13237470388412476,
-0.38959869742393494,
0.3589688241481781,
-0.1878378838300705,
-0.09015202522277832,
0.2592216730117798,
0.3680734932422638,
-0.5736666917800903,
-0.3170698583126068,
0.1777597963809967,
0.34254440665245056,
-0.07367303222417831,
-0.28061988949775... | |
I have a classic 3-tier ASP.Net 3.5 web application with forms that display business objects and allow them to be edited. Controls on the form correspond to a property of the underlying business object. The user will have read/write, readonly, or no access to the various controls depending on his/her role. Very convent... | [
0.21007764339447021,
0.048112012445926666,
0.1196565106511116,
0.25329825282096863,
-0.07845582067966461,
-0.1940225064754486,
-0.031706303358078,
-0.12969425320625305,
-0.07879692316055298,
-0.6321618556976318,
-0.031721632927656174,
0.5627565383911133,
-0.23519250750541687,
-0.0474309995... | |
increasing order:
NONE, VIEW, REQUIRED, EDIT.
Note that REQUIRED is NOT the top level as you may think it would be since EDIT (both populate & de-populate permission) is a greater privilege than REQUIRED (populate-only permission).
The enum would look like this:
```
/** NO permissions.
* Presentation: "hidden"
... | [
0.0101801548153162,
0.02561112865805626,
0.6089667677879333,
0.0863085463643074,
0.05523524433374405,
-0.08801745623350143,
-0.004161689896136522,
-0.22638309001922607,
-0.3556517958641052,
-0.6963045001029968,
-0.6930586099624634,
0.353439599275589,
-0.26448842883110046,
0.395865589380264... | |
Presentation: "editable"
* Database: "nullable"
*/
EDIT(3);
```
From the bottom layer (database constraints), create a map of fields-to-access. This map then gets updated (further restrained) at the next layer up (business rules + user permissions). Finally, the top layer (presentation rules) can then further r... | [
-0.21097898483276367,
0.014211702160537243,
0.5939111709594727,
0.11939110606908798,
0.091898113489151,
-0.22050492465496063,
-0.07566537708044052,
-0.06042620167136192,
-0.49220919609069824,
-0.7563323378562927,
-0.46343913674354553,
0.31644800305366516,
-0.43868476152420044,
0.2163041979... | |
the access should look like. In essence, the subsequent layering of access levels as mentioned above can happen in any order since it will result in an access-level low-water-mark for each field once all layers have voted.
Ramifications:
1) The presentation layer CAN hide a field (set access to NONE) for a database-s... | [
0.11056791245937347,
0.010076308622956276,
0.5986566543579102,
0.27367690205574036,
0.15553885698318481,
-0.27644604444503784,
0.14709307253360748,
-0.07705151289701462,
-0.10151591897010803,
-0.6327860951423645,
-0.4724040627479553,
0.4891095459461212,
-0.21943148970603943,
0.384174823760... | |
be made (custom display tags) to render the fields by reading the access map without the need for any "if" statements.
The same access map that is used for setting up the display can also be using during the submit validations. A generic validator can be written to read any form and its access map to ensure that all t... | [
0.8723328113555908,
-0.01918434165418148,
0.49194613099098206,
0.2176440805196762,
-0.0794171616435051,
-0.3402591347694397,
-0.08946224302053452,
-0.539218544960022,
-0.01602775976061821,
-0.4890289902687073,
-0.3894384205341339,
0.5068562030792236,
-0.07561328262090683,
0.048675857484340... | |
Say I want to design a database for a community site with blogs, photos, forums etc., one way to do this is to single out the concept of a "post", as a blog entry, a blog comment, a photo, a photo comment, a forum post all can be thought as a post. So, I could potentially have one table named Post [PostID, PostType, Ti... | [
0.7926447987556458,
0.3720802962779999,
0.0410664863884449,
0.28010624647140503,
-0.35416439175605774,
-0.0584772564470768,
-0.1231326088309288,
0.16220121085643768,
-0.11276934295892715,
-0.6145524382591248,
0.3960376977920532,
0.07788796722888947,
-0.20149149000644684,
0.3442289233207702... | |
column.
Or have a Post table for all types of post, but have a separate Comment table.
To be complete I'm using ADO.NET Entity Framework to implement my DAL.
Now the question what are some of the implications if I go with any route described above that will influence on my DB performance and manageability, middle t... | [
0.5423599481582642,
0.18651500344276428,
0.6030176281929016,
0.041047580540180206,
-0.32002073526382446,
-0.16060210764408112,
-0.11734639108181,
0.06028179079294205,
-0.09994150698184967,
-0.6149104833602905,
0.1902734339237213,
0.32238641381263733,
-0.2867685854434967,
0.3773635625839233... | |
application to integrate it? Or would you rather log on to your blog admin panel, add a blog type in a drop-down box called 'Music', and be on your merry way?
In this case, less tables! | [
0.16532282531261444,
-0.06749944388866425,
0.39654698967933655,
0.5158501267433167,
0.15557056665420532,
-0.38527795672416687,
0.1211189329624176,
0.1595163196325302,
-0.4739268720149994,
-0.6971842646598816,
0.1749604195356369,
0.6014230251312256,
-0.16767330467700958,
-0.1385294795036316... | |
I'm trying to do query result pagination with hibernate and displaytag, and Hibernate `DetachedCriteria` objects are doing their best to stand in the way. Let me explain...
The easiest way to do pagination with displaytag seems to be implementing the `PaginatedList` interface that has, among others, the following meth... | [
-0.1927386373281479,
-0.1824493259191513,
0.5084241628646851,
-0.03529230132699013,
-0.4868776798248291,
0.1547960638999939,
0.19323405623435974,
-0.3325725793838501,
-0.2753469944000244,
-0.7135927081108093,
-0.2670827805995941,
0.2813620865345001,
-0.48475098609924316,
-0.142838150262832... | |
theese lines...
```
getFullListSize() {
criteria.setProjection(Projections.rowCount());
return ((Long) criteria.uniqueResult()).intValue();
}
getList() {
if (getSortDirection() == SortOrderEnum.ASCENDING) {
criteria.addOrder(Order.asc(getSortCriterion());
} else if (getSortDirection() == SortO... | [
-0.04644419997930527,
-0.32098299264907837,
0.9298825263977051,
-0.33362168073654175,
0.14494511485099792,
0.2033221572637558,
0.36959901452064514,
-0.930124819278717,
-0.025253603234887123,
-0.8015248775482178,
-0.39002931118011475,
0.5399359464645386,
-0.2185577005147934,
0.0141288014128... | |
rendering it in-usable for the successive calls. I'm not entirely sure of the order of the calls, but the db throws an error on `getFullListSize()` trying to do a "`select count(*) ... order by ...`" which is obviously wrong.
I think I could fix this by creating an object of my own to keep track of query conditions an... | [
0.004833015147596598,
-0.21016305685043335,
0.39150452613830566,
-0.060740161687135696,
-0.11117321252822876,
-0.08891373872756958,
0.46209096908569336,
-0.38729649782180786,
-0.05332868546247482,
-0.6838563680648804,
-0.1442832499742508,
0.6182860136032104,
-0.5093210339546204,
0.22505891... | |
multiple times after, so, as soon as there's an ordering passed in, `getFullListSize` will fail. It would make sense to hit the db only once (in `getList` I'd say) and cache the results, with no need to copy/reset the `Criteria` object, but still...
***Update (again)***:
Forget about that, once I've done the `count` I... | [
0.3143423795700073,
-0.3530593514442444,
0.15697385370731354,
0.05918525904417038,
0.07566910237073898,
-0.034529779106378555,
0.31995898485183716,
-0.16338619589805603,
-0.14600075781345367,
-0.5345526933670044,
-0.12118685245513916,
0.5382562875747681,
-0.29329654574394226,
0.29241421818... | |
I have an abstract class defining a pure virtual method in c++:
```
class Base
{
Base();
~Base();
virtual bool Test() = 0;
};
```
I have subclassed this with a number of other classes (which provide an implementation for Test()), which I'll refer to as A, B, C, etc. I now want to create an array of any of these typ... | [
0.39190205931663513,
-0.040560513734817505,
0.1361730396747589,
-0.25593918561935425,
-0.04878484085202217,
0.07013484090566635,
0.3563057780265808,
-0.41182032227516174,
0.07478493452072144,
-0.18203702569007874,
0.03200758621096611,
0.5845253467559814,
-0.36294034123420715,
0.18395198881... | |
size; i++)
{
Base* base = bases[i];
base->Test();
}
}
```
(Excuse any errors I might have made, I'm writing this on the fly to provide a simple example).
The problem is I can't instantiate the array as it would require creating an instance of the Base class (which it can't do as it's abstract... | [
0.09903895854949951,
-0.08620589226484299,
0.18658433854579926,
-0.29042020440101624,
-0.20488980412483215,
-0.09476637840270996,
0.3854770064353943,
-0.5164692401885986,
-0.149674192070961,
-0.4946202337741852,
0.06381913274526596,
0.34029263257980347,
-0.2359422743320465,
0.1785057038068... | |
memory. I am under the impression that it's not good practice to mix new and delete with malloc and free.
It may be that I have confused the way this should be used and I should be attempting to use templates or some other mechanism to do this, but hopefully I've provided enough information to illustrate what I'm atte... | [
0.3649170696735382,
0.11532269418239594,
-0.3723208010196686,
0.44620752334594727,
0.014372426085174084,
0.17127200961112976,
0.23499232530593872,
-0.012592095881700516,
-0.18955299258232117,
-0.6571860909461975,
0.021901091560721397,
0.42272618412971497,
-0.09509963542222977,
0.2066400349... | |
pointers. A pointer can exist at any time. A pointer to a abstract class, to an incomplete type, and even to void is valid:
```
int main(int argc, char* argv[])
{
int size = 0;
Base** bases = new Base*[10];
bases[size++] = new A();
bases[size++] = new B();
for (int i = 0; i < size; i++)
{
... | [
0.18022005259990692,
0.15081259608268738,
0.3172132968902588,
-0.0945909395813942,
-0.07715973258018494,
-0.015164680778980255,
0.2901996970176697,
-0.3519122898578644,
-0.2622741162776947,
-0.48306989669799805,
-0.3115292191505432,
0.24915599822998047,
-0.5335410237312317,
0.2854862809181... | |
I want to debug my project in Zend Framework in Eclipse. Zend Debugger is already running bud now I have problem with Debug tool in Eclipse. It give an extra GET parametrs and the project in Zend don't like it.
I tried to google it and found [this](http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewr... | [
0.2733708620071411,
0.2029758244752884,
0.40734851360321045,
0.008965414017438889,
-0.2885552644729614,
-0.4010604918003082,
0.6738166809082031,
-0.6373595595359802,
0.22609253227710724,
-0.6032580733299255,
0.10630954802036285,
0.6676403284072876,
-0.2599610388278961,
0.302791029214859,
... | |
which is Eclipse making is
> <http://localhost/?debug_start_url=http://localhost/&debug_session_id=1007&start_debug=1&debug_host=127.0.0.1&debug_no_cache=1229359621130&debug_port=10000&send_sess_end=1&original_url=http://localhost/&debug_stop=1>
with actual Zend Framework 1.9.6 and Zend Debugger it works without any ... | [
0.20533894002437592,
-0.26546379923820496,
0.41650861501693726,
-0.12962844967842102,
-0.4406059980392456,
-0.30982401967048645,
0.27338725328445435,
-0.3081859350204468,
-0.1146945133805275,
-0.5637602210044861,
-0.11694442480802536,
0.4214530289173126,
-0.057003095746040344,
-0.130954131... | |
When I drag a link that is inside a draggable div over an iframe in IE7, I get very strange results. Try the code below and let me know if you have any suggestions about how to fix this.
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>... | [
0.2642810642719269,
-0.0584389790892601,
0.5290096998214722,
0.03736903890967369,
-0.2589564621448517,
0.03813536837697029,
0.029631411656737328,
-0.39925891160964966,
-0.19500744342803955,
-0.8102192282676697,
0.06523183733224869,
0.3470451831817627,
-0.3410367965698242,
-0.02337067946791... | |
<iframe>
</iframe>
</body>
<script>
function blah(){
//blackbird.debug("blah");
}
var dummy = new Draggable("test", {scroll:window,scrollSensitivity: 20,scrollSpeed: 25, revert: true, onStart: onDragStart, onEnd: onDragEnd });
var temp;
function onDragStart(drgObj,mouseEvent){
temp... | [
0.2607152760028839,
-0.1653895080089569,
0.6158057451248169,
-0.3594953715801239,
0.02831611968576908,
0.2684047520160675,
0.561467707157135,
-0.529411256313324,
-0.1581294983625412,
-0.5523619651794434,
-0.14420829713344574,
0.6231246590614319,
-0.4274914860725403,
-0.13006988167762756,
... | |
return false;
}
}
function onDragEnd(drgObj,mouseEvent){
}
</script>
</html>
```
I found the only way to handle this gracefully was to place a full size div, with transparency = 1% over the iframe, then drag my content over top of it.
PS the dragging issue is in IE6 and IE8 too. | [
-0.03359578177332878,
-0.17411306500434875,
0.540752649307251,
-0.12676477432250977,
-0.25179243087768555,
-0.18119269609451294,
0.17255447804927826,
0.0350080281496048,
-0.027784820646047592,
-0.9345476031303406,
-0.10512590408325195,
0.33999043703079224,
-0.36534595489501953,
0.064379885... | |
When I hit /// in Visual Studio, is it possible to change the resulting snippet from this:
```
/// <summary>
///
/// </summary>
```
to this?:
```
/// <summary></summary>
```
Here is the solution working in at least VS2010.
Save the bottom code as a file summ.snippet.
Visual Studio 2010 / Tools / Code Snippet ... | [
0.04237527400255203,
-0.2530449330806732,
0.7369805574417114,
0.04872764274477959,
-0.3988431692123413,
0.39558878540992737,
0.15677107870578766,
-0.4374277889728546,
-0.33479514718055725,
-0.7744075059890747,
-0.14057236909866333,
0.32202309370040894,
-0.036450132727622986,
-0.16155126690... | |
<Header>
<Title>Summary - inline</Title>
<Description>Created inline summary comment tag</Description>
<Author>Mike Vanderkley</Author>
<Shortcut>summ</Shortcut>
<SnippetTypes> | [
0.24334071576595306,
-0.21063832938671112,
-0.012371821328997612,
0.32460683584213257,
-0.40407201647758484,
0.1682606339454651,
-0.18524911999702454,
0.12960600852966309,
-0.25449395179748535,
-0.4405960738658905,
-0.16759786009788513,
0.23360426723957062,
-0.40514442324638367,
-0.1596528... | |
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="csharp">
<![CDATA[/// <summary> $end$ </summary>]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
``` | [
0.62409508228302,
-0.43847090005874634,
0.2815738618373871,
0.21042177081108093,
-0.05547725781798363,
0.32362332940101624,
-0.3177669942378998,
0.0275465976446867,
-0.7728365063667297,
-0.8875582814216614,
-0.5633945465087891,
-0.244634211063385,
-0.2905089557170868,
0.32140088081359863,
... | |
I have the following Clojure code and I'm not sure why it's not working:
```
(defn match (x y &optional binds)
(cond
((eql x y) (values binds t))
((assoc x binds) (match (binding x binds) y binds))
((assoc y binds) (match x (binding y binds) binds))
((var? x) (values (cons (cons x y) binds) t))
((var?... | [
-0.23193639516830444,
0.10110592097043991,
0.7333797216415405,
-0.07976533472537994,
0.06353774666786194,
-0.17530755698680878,
0.24468809366226196,
-0.5092039108276367,
-0.0962267816066742,
-0.33221063017845154,
-0.1024787500500679,
0.690567135810852,
-0.40247100591659546,
-0.036041781306... | |
(match (car x) (car y) binds)
(and yes (match (cdr x) (cdr y) b2)))))))
```
(The code is translated from Paul Graham's *ANSI Common Lisp* book.)
When I run it, I get the following error:
```
java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol
clojure.lang.Compiler$CompilerExceptio... | [
-0.22214548289775848,
0.43975675106048584,
0.15202230215072632,
0.10582759976387024,
0.217368021607399,
0.03283319249749184,
0.5209328532218933,
-0.15495139360427856,
-0.04298393800854683,
-0.3226103186607361,
-0.08478251844644547,
0.2923769950866699,
-0.7967296838760376,
-0.01755609735846... | |
at clojure.lang.Compiler.analyze(Compiler.java:3698)
at clojure.lang.Compiler.access$200(Compiler.java:37)
at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:343)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:3858)
at clojure.lang.Compiler.analyze(Compiler.java:3698)
... | [
-0.8366587162017822,
0.4214005768299103,
-0.06324510276317596,
0.10322611778974533,
-0.28877976536750793,
0.2456086277961731,
0.38782167434692383,
-0.4490090608596802,
-0.161282479763031,
-0.7951655387878418,
-0.12880104780197144,
0.023551618680357933,
-0.6461915373802185,
-0.3594642579555... | |
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.lang.RuntimeException: java.lang.RuntimeExceptio... | [
-0.3245807886123657,
0.0380060151219368,
0.2795485258102417,
-0.119571752846241,
0.3518507182598114,
0.1897018700838089,
0.7535081505775452,
-0.36571455001831055,
-0.11012972891330719,
-0.41083601117134094,
-0.29120996594429016,
0.22820349037647247,
-0.6114920377731323,
-0.0234015397727489... | |
more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol
at clojure.lang.LazyCons.first(LazyCons.java:44)
at clojure.lang.LazyCons.rest(LazyCons.java:59)
... 20 more
Caused by: java.lang.IllegalArgumentException: Don't know how to... | [
-0.1326705515384674,
0.1691756248474121,
0.26993054151535034,
-0.04885683208703995,
0.08056457340717316,
0.2314857840538025,
0.7765516042709351,
0.48032858967781067,
-0.5753799080848694,
-0.7295910120010376,
-0.021463124081492424,
0.006179021205753088,
-0.669894278049469,
0.174050256609916... | |
at clojure.map__602$fn__605.invoke(boot.clj:1214)
at clojure.lang.LazyCons.first(LazyCons.java:40)
... 21 more
```
What am I doing wrong here?
The problem is that I'm using parentheses ('(' and ')'), rather than square brackets ('[' and ']'), for the arguments list.
It should start out like this:
``... | [
-0.07734936475753784,
0.44402411580085754,
0.054918088018894196,
-0.07185458391904831,
0.053836528211832047,
-0.12446239590644836,
0.4637478291988373,
-0.41685399413108826,
-0.26184362173080444,
-0.2201409637928009,
0.06678912788629532,
0.5517199039459229,
-0.43902504444122314,
-0.18652538... | |
Everytime i retrieve data from a mysql stored procedure with a concat function an error will occur after binding the datagridview to the datatable that holds the returned rows.
I suppose you should make an alias for selected value:
```
select concat(column1, column2) as concatenated from table1
``` | [
-0.29220882058143616,
0.07182426750659943,
0.5210524201393127,
-0.1412307322025299,
0.15017013251781464,
-0.0739276260137558,
0.24871432781219482,
0.10983440279960632,
0.05960967391729355,
-0.6415107846260071,
0.06788641959428787,
0.5560662150382996,
-0.47244399785995483,
0.142708331346511... | |
**Background**
I have made a Web Service in Visual Studio, and I'm trying to consume it using the automatically generated proxy class. The Web Service returns a class that I have implemented, containing a List.
**Question**
The proxy class has automatically generated methods to send the SOAP to the web service. It u... | [
0.6783377528190613,
0.06742394715547562,
0.511650800704956,
-0.1057203859090805,
-0.17825959622859955,
0.29077792167663574,
0.17160087823867798,
-0.09296242892742157,
-0.18642766773700714,
-0.7548514604568481,
0.15561316907405853,
0.49443984031677246,
-0.09277109801769257,
-0.2786226570606... | |
route (any time the Web Service is rebuilt, the changes would have to be made again).
Is there a way to tell the generated class to be more specific, and actually use the correct data type? Or do I have to write a clunky set of deserialisers to get my data back into the correct shape?
**Example**
One method in my We... | [
0.21308517456054688,
0.04941590130329132,
0.4121544659137726,
-0.023639768362045288,
0.07360833138227463,
0.10934363305568695,
0.38815099000930786,
-0.17318862676620483,
-0.019493775442242622,
-0.8404505252838135,
-0.09660328924655914,
0.26460614800453186,
-0.38263797760009766,
0.304779767... | |
new object[] {
sessionID,
configurationVersion,
coreVersion,
researcherDBVersion});
return ((DataSet)(results[0]));
}
```
The DataSet I receive from this method is always empty (because you can't cast from my class to a DataSet).
Thanks in advance
Since Web References generate part... | [
0.2383231818675995,
-0.08419231325387955,
0.5379632115364075,
-0.06248220428824425,
0.016216840595006943,
-0.10971223562955856,
0.43787190318107605,
-0.12588848173618317,
-0.07676283270120621,
-0.7643386721611023,
-0.24876675009727478,
0.3761608302593231,
-0.34292444586753845,
0.4055289328... | |
the name, of course). If the method signature changes, you'll have to update your extension, but at least if that doesn't happen and you regenerate the proxy you won't have to reapply any changes (and you can still use any other generated classes/methods as is).
I've used this approach before to "fix" proxy classes (f... | [
0.3339114487171173,
-0.31492412090301514,
0.3072872459888458,
0.14493973553180695,
-0.04047035425901413,
-0.22861962020397186,
0.17348693311214447,
-0.021486321464180946,
-0.05343012511730194,
-0.6445677280426025,
-0.0050686015747487545,
0.44439810514450073,
-0.2198905199766159,
0.32918912... | |
(Note: I realize this is close to [How do you document your database structure?](https://stackoverflow.com/questions/186392/how-do-you-document-your-database-structure) , but I don't think it's identical.)
I've started work at a place with a database with literally hundreds of tables and views, all with cryptic names ... | [
0.47239693999290466,
0.42401355504989624,
0.09872328490018845,
0.06226309388875961,
0.14894479513168335,
-0.2081366628408432,
0.2727505564689636,
-0.03862515836954117,
-0.22442452609539032,
-0.5615981221199036,
0.32274129986763,
0.12716124951839447,
-0.08162792026996613,
0.1640926003456115... | |
for 48 hours straight it still hadn't produced anything visible and I needed my computer back. I was talking to some other recent hires and we all suggested that whenever we've puzzled out what a particular table or what some of its columns means, we should update it in the developers wiki.
So what's a good way to do ... | [
0.32095614075660706,
0.12278243154287338,
0.20750413835048676,
0.40541672706604004,
0.018330112099647522,
-0.037354059517383575,
-0.08621552586555481,
0.04768100380897522,
-0.23714366555213928,
-0.465129017829895,
0.11111694574356079,
0.7215514183044434,
0.10082435607910156,
-0.27507662773... | |
with a large number of tables, diagrams (especially reverse engineered ones) are often a big convoluted mess that nobody learns anything from.
For my money, some good human-readable documentation (perhaps supplemented with diagrams of smaller portions of the system) will give you the most mileage. This will include, f... | [
0.1910434365272522,
0.3757966160774231,
0.1314620077610016,
0.5961194038391113,
0.3198114335536957,
0.04987889155745506,
0.2532294988632202,
0.011932363733649254,
-0.3337780833244324,
-0.6770878434181213,
-0.15006819367408752,
0.22486840188503265,
0.018696287646889687,
-0.21494652330875397... | |
views & procs that touch the table, if they're not well documented already
With all of the above, don't document for the sake of documenting - documentation that restates the obvious just gets in people's way. Instead, focus on the stuff that confused you at first, and spend a few minutes writing really clear, concise... | [
0.21783046424388885,
0.22012971341609955,
0.3236919641494751,
0.11897775530815125,
-0.20465338230133057,
0.1099940836429596,
-0.19123171269893646,
-0.2374492883682251,
-0.31660759449005127,
-0.6106584072113037,
0.18831640481948853,
0.5230607986450195,
-0.00649414723739028,
0.07068102806806... | |
built-in tools from various vendors. But while tool support is helpful (and even critical, in bigger databases), doing the hard work of *understanding* and *explaining* the conceptual model of the database is the real win. From that perspective, you can even do it in a text file (though doing it in Wiki form would allo... | [
0.21056458353996277,
-0.01351541094481945,
-0.013618426397442818,
0.5858909487724304,
0.10732072591781616,
-0.32996436953544617,
-0.015191957354545593,
-0.16546791791915894,
-0.2689225673675537,
-0.8177125453948975,
-0.17628255486488342,
0.8652522563934326,
0.3084728419780731,
-0.062701776... | |
We've got a page in our asp.net web system that uses response.redirect to redirect the user directly to an excel file so it will download "automatically" without the user having to to a right click / save as.
This works great - except for files over about 100k in IE7. Other browsers just download the large file fine, ... | [
0.2121027410030365,
-0.1609669327735901,
0.4341151714324951,
0.2502419054508209,
-0.21319212019443512,
-0.1240573525428772,
0.35749873518943787,
0.006415008567273617,
-0.24990132451057434,
-0.8275454044342041,
-0.06266221404075623,
0.5623380541801453,
0.05841284245252609,
-0.24583695828914... | |
download size threshold thing I can override?
I prefer a different method for sending files. It works for me with all kinds of different types and sizes of files.
Instead of using Response.Redirect, allow the link to the file to do a postback where you modify the response, like so:
```
Public Shared Sub SendFileToBr... | [
-0.03967353329062462,
-0.46596550941467285,
0.8849954009056091,
0.0976526215672493,
-0.380837619304657,
-0.05396092310547829,
0.26654285192489624,
-0.32778769731521606,
-0.1908397227525711,
-0.6748513579368591,
-0.18316027522087097,
0.8296791911125183,
-0.0249679833650589,
0.28201231360435... | |
If String.IsNullOrEmpty(contentType) Then
If ext = "pdf" Then
contentType = "application/pdf"
Else
contentType = "application/file"
End If
End If
If String.IsNullOrEmpty(disposition) Then
disposition = "attachment"
End If
If String.IsNullOrEmpty(... | [
-0.4451778829097748,
-0.10779935866594315,
1.2445383071899414,
-0.2365095466375351,
0.321720153093338,
0.042471349239349365,
-0.33112454414367676,
-0.2453797608613968,
-0.09727103263139725,
-0.6937878131866455,
-0.6419182419776917,
0.4648441970348358,
-0.2632717788219452,
0.307853609323501... | |
''//Test for relative url path
Dim fileparts As String() = filepath.Split("/")
If fileparts.Length > 1 Then
filename = fileparts(fileparts.Length - 1)
Else
''//Test for absolute file path
Dim fileparts2 As String() = filepath.Split("\") ''//" SO: Fix synta... | [
-0.1302729994058609,
-0.3636692762374878,
0.4974459409713745,
-0.20431271195411682,
-0.18513719737529755,
0.0790613666176796,
0.4288443326950073,
-0.05907076597213745,
0.05048474669456482,
-0.49758198857307434,
-0.46508505940437317,
0.6495370864868164,
-0.2002802938222885,
-0.2998207807540... | |
If fileparts2.Length > 1 Then
filename = fileparts2(fileparts2.Length - 1)
Else
''//Just give it a temp name
filename = "temp." & ext
End If | [
0.1496635228395462,
-0.46338072419166565,
0.22708317637443542,
-0.1958475112915039,
-0.009799366816878319,
-0.08333021402359009,
0.4362311363220215,
0.15349437296390533,
-0.09130614995956421,
-0.4252687990665436,
-0.3628385066986084,
0.23660783469676971,
-0.20001959800720215,
-0.0488642007... | |
End If
End If
response.Clear()
response.AddHeader("content-disposition", disposition & ";filename=" & filename)
If Not String.IsNullOrEmpty(contentLength) Then
response.AddHeader("Content-Length", contentLength)
End If
response.ContentType = contentType
response.Cache.SetCacheabi... | [
-0.059520430862903595,
-0.2912801504135132,
0.8842376470565796,
-0.14757831394672394,
-0.14933624863624573,
-0.20470505952835083,
0.5140283703804016,
-0.3469999134540558,
-0.10082366317510605,
-0.7398733496665955,
-0.5795790553092957,
0.4193572700023651,
-0.32591721415519714,
0.09844394773... | |
Anticipating the day when multi-touch interfaces become more pervasive, are there libraries in Java that can be used for developing touch applications? I'm looking for interfaces similar to MouseListener / MouseMotionListener / MouseWheelListener.
The MT4j project has everything you need to develop multitouch applicati... | [
0.10866405814886093,
-0.19426661729812622,
0.44576719403266907,
0.2011214941740036,
-0.1428760588169098,
0.18146981298923492,
0.03468124940991402,
-0.325741708278656,
-0.4037964344024658,
-0.7859709858894348,
0.5602901577949524,
0.5362083315849304,
-0.38021019101142883,
-0.1656428873538971... | |
Is is possible to have a local variable in an anonymous c# methods, i.e. in the following code I would like to perform the count only once.
```
IQueryable<Enquiry> linq = db.Enquiries;
if(...) linq = linq.Where(...);
if(...) linq = linq.Where(e =>
(x <= (from p in db.Orders where p.EnquiryId == e.Id select p).C... | [
-0.20789840817451477,
-0.46052324771881104,
0.6317713260650635,
-0.2269817739725113,
0.05826253816485405,
0.006690330803394318,
0.20307892560958862,
-0.5313486456871033,
-0.08616660535335541,
-0.047032106667757034,
-0.365190327167511,
0.4143165349960327,
-0.5270771384239197,
-0.11067660897... | |
so I can't close with a select.
/Niels
I've run into a similar problem. The solution is to create a custom expression tree generating method.
I asked my question on MSDN-forums. Please see the question and answer here: [Reusing Where expressions](http://social.msdn.microsoft.com/forums/en-US/linqtosql/thread/7256f2a... | [
0.23889560997486115,
-0.00032947055296972394,
0.17262710630893707,
0.05464784801006317,
-0.05592119321227074,
0.10628676414489746,
0.4176587462425232,
0.018734877929091454,
-0.07793881744146347,
-0.4979248344898224,
-0.07353842258453369,
0.49328377842903137,
-0.2647241950035095,
0.11675163... | |
WinXP Pro
Oracle 10g Instant Client 10.2.0.1
MS Access 2003
When I link a table in MS Access, the pick list that appears shows me every table and view in the system I have access to. This list is quite large. Normally, I really only want to look at the tables that I own. Is there a way to filter the items displayed ba... | [
-0.313970685005188,
-0.10052520781755447,
0.42864832282066345,
-0.258507639169693,
-0.3424047529697418,
0.1400003880262375,
0.12484458833932877,
-0.14626120030879974,
-0.18530350923538208,
-0.3685174882411957,
-0.21517221629619598,
0.9766268730163574,
-0.592450737953186,
-0.060919124633073... | |
URL resource = Icons.class.getResource("/icons/" + path);
if (resource == null) {
// Log something...
return null;
}
return new ImageIcon(resource);
}
```
This way you have control whenever something fail, and you don't have to repeat yourself in the instantiation.
Also, I would make the ... | [
0.10573241114616394,
-0.21473805606365204,
0.523099422454834,
0.016506215557456017,
-0.28246554732322693,
-0.051538046449422836,
0.3726217746734619,
-0.11809101700782776,
-0.3182535469532013,
-0.6162821650505066,
-0.046367183327674866,
0.7106817960739136,
-0.3069165050983429,
0.17577251791... | |
declare a new Icon constant, and the corresponding resource would be loaded automatically based on the name of the constant. Leave a comment if you want more tips for doing this. | [
0.5518328547477722,
-0.258666455745697,
0.0238207820802927,
0.2071702778339386,
0.10627932846546173,
-0.08916836231946945,
0.12993432581424713,
0.20013736188411713,
-0.4666826128959656,
-0.2596184015274048,
-0.053779877722263336,
0.5277940034866333,
-0.4115540683269501,
-0.1394705176353454... | |
I have a table named categories, which contains ID(long), Name(varchar(50)), parentID(long), and shownByDefault(boolean) columns.
This table contains 554 records. All the shownByDefaultValues are 'false'.
When I execute 'select id, name from categories', pg returns me all the categories,
orderer by its id.
Then... | [
-0.2223701775074005,
0.1586979776620865,
0.46716320514678955,
0.009997744113206863,
-0.4015597105026245,
0.418470174074173,
0.16648413240909576,
-0.3651416301727295,
-0.31369107961654663,
-0.2659338414669037,
0.09305649995803833,
0.22710400819778442,
-0.14295139908790588,
0.447720855474472... | |
to get this values, anyone knows what the problem is or if there is a way to fix this?
That's not a problem. The order of rows returned by a SQL SELECT is undefined unless it has an `ORDER BY`. The order you get them is usually influenced by the order they are stored in the table and/or the indices that are used by the... | [
0.2638196647167206,
0.11086295545101166,
0.3304046094417572,
0.2334887832403183,
-0.005639203358441591,
-0.1313665807247162,
-0.04490932077169418,
-0.1992141604423523,
-0.36647719144821167,
-0.5616974234580994,
-0.11963069438934326,
0.29524457454681396,
-0.29199811816215515,
0.166894659399... | |
a [sequence](http://en.wikipedia.org/wiki/Sequence) of rows. | [
-0.40632110834121704,
0.2145823985338211,
0.21284730732440948,
-0.03414711356163025,
0.007534293457865715,
0.43455269932746887,
-0.306630939245224,
-0.12004227191209793,
-0.26861438155174255,
-0.4991844892501831,
-0.601026177406311,
-0.16479818522930145,
-0.43882980942726135,
0.14128515124... | |
I thought this was pretty straight forward but I don't get the same results as the tutorials I read. I have a button on an html page that calls a function in script tags. I also have a reference to the prototype.js file which I haven't even begun to implement yet. If I leave that reference in the page, my function call... | [
0.4735676050186157,
0.008478134870529175,
0.47594279050827026,
-0.057443805038928986,
-0.12528155744075775,
-0.27441349625587463,
0.5149277448654175,
-0.24024219810962677,
0.011926015838980675,
-0.6198015809059143,
0.17031067609786987,
0.6150225400924683,
-0.2037007361650467,
-0.0911650136... | |
once you're sure that your page is valid, add the prototype.js library as the first script reference on the page:
```
<script type="text/javascript" src="prototype.js"></script>
```
Notice that I didn't close it like this `<script ... />` Script blocks need to have an explicit closing tag (at least in XHTML 1.0 Tran... | [
0.11790183186531067,
-0.006299908272922039,
0.5187152028083801,
-0.18173371255397797,
-0.15007954835891724,
-0.1985284835100174,
0.027361823245882988,
-0.29142701625823975,
-0.029493337497115135,
-0.7566666007041931,
-0.24823009967803955,
0.20021405816078186,
-0.3866170644760132,
-0.138099... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.