text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
-r option to recursively compare directories:
```
diff -r /develop /main
``` | [
-0.12828557193279266,
-0.025119872763752937,
0.07925225794315338,
0.01860162429511547,
-0.11352086067199707,
0.2508379817008972,
0.06761318445205688,
0.0904698446393013,
0.22588787972927094,
-0.4911217987537384,
-0.7892805933952332,
0.7468327879905701,
-0.26003578305244446,
-0.058329805731... | |
I have a class that I wish to expose as a remote service using pythons SimpleXMLRPCServer. The server startup looks like this:
```
server = SimpleXMLRPCServer((serverSettings.LISTEN_IP,serverSettings.LISTEN_PORT))
service = Service()
server.register_instance(service)
server.serve_forever()
```
I then have a Servic... | [
0.016496220603585243,
0.1581684798002243,
0.6289995312690735,
-0.41854628920555115,
-0.1055198535323143,
0.05361885949969292,
0.3230415880680084,
-0.2625719904899597,
-0.14907009899616241,
-0.6722476482391357,
-0.15412549674510956,
0.41352301836013794,
-0.3750472962856293,
0.69117087125778... | |
pass
```
The @useDb decorator wraps the function, creating the db before the call and opening it, then closing it after the call is done before returning the result.
When I call this method, I get the error "**call**() got an unexpected keyword argument 'name'". So, is it possible to call methods taking variable nam... | [
0.4064321517944336,
0.252748966217041,
0.4774060547351837,
-0.2092825323343277,
-0.3653336465358734,
0.08492666482925415,
0.4613925516605377,
-0.4201749563217163,
0.15705136954784393,
-0.5261755585670471,
0.19334322214126587,
0.4281983971595764,
-0.311174601316452,
0.2766401171684265,
-0... | |
implement positional arguments and support remote invocation. I think a combination of Thomas and praptaks approaches would be good. Turning kwargs into positional args on the client through xmlrpclient, and having a wrapper on methods serverside to unpack positional arguments.
You can't do this with plain xmlrpc since... | [
-0.036478977650403976,
-0.0541556216776371,
0.37879034876823425,
0.10759075731039047,
-0.2537587285041809,
-0.07769775390625,
-0.03289347514510155,
-0.2628706097602844,
0.012544580735266209,
-0.632087767124176,
-0.14105726778507233,
0.6229443550109863,
-0.3137548863887787,
-0.0743108317255... | |
Server(object):
def __init__(self, hostport):
self.server = SimpleXMLRPCServer(hostport)
def register_function(self, function, name=None):
def _function(args, kwargs):
return function(*args, **kwargs)
_function.__name__ = function.__name__
self.server.register_functi... | [
-0.11781422048807144,
-0.03284585848450661,
0.4260820150375366,
-0.35565584897994995,
0.05006059631705284,
0.2751105725765228,
0.43999654054641724,
-0.06047184392809868,
-0.2793876826763153,
-0.9394121766090393,
-0.0042303805239498615,
0.2939651608467102,
-0.3804437518119812,
0.39216300845... | |
return 0
server.register_function(test)
server.serve_forever()
```
Client
------
```
import xmlrpclib
class ServerProxy(object):
def __init__(self, url):
self._xmlrpc_server_proxy = xmlrpclib.ServerProxy(url)
def __getattr__(self, name):
call_proxy = getattr(self._xmlrpc_server_proxy, name)
... | [
-0.17202810943126678,
0.05653752386569977,
0.7238548994064331,
-0.27559494972229004,
0.004040592350065708,
0.269051730632782,
0.14169958233833313,
-0.178323432803154,
0.080190010368824,
-0.7638087272644043,
-0.2670639753341675,
0.13082602620124817,
-0.41938892006874084,
0.422331839799881,
... | |
I need to write a java script. This is supposed to validate if the checkbox is selected in the page or not. The problem here is that the check box is inside a grid and is generated dynamically. The reason being the number of check box that need to be rendered is not know at design time. So the id is know only at the se... | [
0.4388673007488251,
0.045061416923999786,
0.11549071222543716,
0.021089375019073486,
-0.08317024260759354,
-0.29456979036331177,
0.279228538274765,
-0.2445869892835617,
0.07843360304832458,
-0.8731015920639038,
0.2901623845100403,
0.3815152943134308,
-0.21808657050132751,
-0.05854159966111... | |
generate, a javascript function that takes in a checkbox as a parameter and add an onClick attribute to your checkbox definition that calls your function and passes itself as the parameter
```
function TrackMyCheckbox(ck)
{
//keep track of state
}
<input type="checkbox" onClick="TrackMyCheckbox(this);".... />
`... | [
0.2756826877593994,
-0.1369258016347885,
-0.13768160343170166,
0.23205138742923737,
0.10275982320308685,
0.058631960302591324,
-0.013020976446568966,
-0.2585825026035309,
0.10273770987987518,
-0.3446902632713318,
0.2063223123550415,
0.2854629158973694,
-0.41418132185935974,
0.2601316869258... | |
Please suggest some good resources to start writing Java Web services.
The standard way in Java to write a web service is to use Apache Axis.
If you are generating a web service client, then you need the WSDL (.xsd, .wsdl, etc) of the foreign web service, and then you can use wsdl2java (or preferably, the ANT task pro... | [
0.21113912761211395,
0.02083946205675602,
0.02080891653895378,
0.044937197118997574,
-0.27318716049194336,
-0.24337340891361237,
0.12293419241905212,
-0.10934827476739883,
-0.22974853217601776,
-0.8047088384628296,
0.05569110065698624,
0.24748486280441284,
-0.3715624511241913,
0.1208896711... | |
to code the server side within the Impl class it generates. You can then easily deploy on Tomcat, etc, using the axis.war and the generated deploy.wsdd script.
There's plenty of documentation out there that will help. | [
0.5080236792564392,
-0.20578597486019135,
0.015873100608587265,
0.2106236070394516,
-0.2564643621444702,
-0.24921658635139465,
0.11471463739871979,
0.11103636771440506,
-0.17577800154685974,
-0.6366045475006104,
-0.1689024567604065,
0.7741670608520508,
-0.25709816813468933,
0.0885882973670... | |
Is there a javascript function I can use to detect whether a specific silverlight version is installed in the current browser?
I'm particularly interested in the Silverlight 2 Beta 2 version. I don't want to use the default method of having an image behind the silverlight control which is just shown if the Silverlight... | [
0.3899657428264618,
0.2217658907175064,
0.1856987625360489,
-0.15432026982307434,
-0.17836420238018036,
-0.3995949327945709,
0.15100155770778656,
-0.11252807825803757,
-0.19029943645000458,
-0.5139088034629822,
-0.17895454168319702,
0.37701669335365295,
-0.5312788486480713,
-0.064376629889... | |
I am selecting rows from a table, but some of the columns are a text type, but they always have numeric data in them. How can I format them as numbers?
e.g. column quantity heading 'Quantity' format 999,999
However, since the column in the table is text, the numeric formatting is ignored.
You will need to TO\_NUMBER ... | [
0.2098339945077896,
0.21621859073638916,
0.652283787727356,
0.21883241832256317,
-0.20036812126636505,
0.2618119418621063,
-0.1535881757736206,
-0.27106326818466187,
-0.24228857457637787,
-0.6143760085105896,
0.04878457635641098,
0.3914662003517151,
-0.11508742719888687,
0.2499987483024597... | |
I am releasing a database build to SQL Server 2000 via a batch file using isql. The batch file is used so multiple files are released consistently to different SQL Servers (development, test, live).
The SQL Server uses ANSI code page 1252 (from sp\_helpsort) but isql is an OEM client using code page 437. This means th... | [
0.22694531083106995,
0.3176671266555786,
0.6047919988632202,
-0.318604975938797,
-0.2093878835439682,
0.023569222539663315,
0.21184611320495605,
-0.3215316832065582,
0.1820535957813263,
-0.626266360282898,
-0.13142509758472443,
0.0016900069313123822,
-0.14346176385879517,
0.233267545700073... | |
and
use osql.
* Turn off the AutoAnsiToOem setting using the SQL Server Client Network Utility (that writes a registry key).
Both these options rely on various people doing things consistently. All have to select the same code page option when saving a file OR all people performing the builds have to have the same opt... | [
0.4062769114971161,
-0.0852188989520073,
0.2833584249019623,
0.09025245159864426,
0.03760724142193794,
-0.14364071190357208,
0.24038179218769073,
-0.06898918747901917,
-0.15246327221393585,
-0.6287961006164551,
-0.0994698628783226,
0.9706509709358215,
-0.07890139520168304,
-0.1240835487842... | |
whoever performs the release?
`isql` is obsolete. It isn't included in SQL Server 2005 or later, because it uses the DB-Library connections, which are also obsolete. For the reasons why, and the effects this has, see [Connecting Early Version Clients to SQL Server 2000](http://msdn.microsoft.com/en-us/library/aa174595(... | [
-0.10077725350856781,
0.22870931029319763,
0.5905979871749878,
-0.11192513257265091,
-0.09105944633483887,
-0.4046837389469147,
0.19599859416484833,
0.12525585293769836,
-0.21738757193088531,
-0.3880600333213806,
-0.3975766897201538,
0.5711421966552734,
-0.6756886839866638,
0.1150762587785... | |
I try to fetch a Wikipedia article with Python's urllib:
```
f = urllib.urlopen("http://en.wikipedia.org/w/index.php?title=Albert_Einstein&printable=yes")
s = f.read()
f.close()
```
However instead of the html page I get the following response: Error - Wikimedia Foundation:
```
Request: GET http://en.wik... | [
-0.021489307284355164,
0.3787582814693451,
0.45811522006988525,
0.005876169539988041,
-0.3763708174228668,
0.026512883603572845,
0.4988788962364197,
-0.36721548438072205,
-0.35692673921585083,
-0.38611462712287903,
-0.36876827478408813,
0.3568228781223297,
-0.5778301358222961,
0.2879891991... | |
urllib2
opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
infile = opener.open('http://en.wikipedia.org/w/index.php?title=Albert_Einstein&printable=yes')
page = infile.read()
``` | [
0.18934355676174164,
0.4139675498008728,
0.3786068260669708,
-0.20730708539485931,
-0.367387056350708,
-0.012565520592033863,
0.33758753538131714,
-0.5164090991020203,
-0.10135523974895477,
-0.6435680985450745,
-0.6661956310272217,
0.17987626791000366,
-0.7108645439147949,
0.46412545442581... | |
I have a string of arbitrary length, and starting at position p0, I need to find the first occurrence of one of three 3-letter patterns.
Assume the string contain only letters. I need to find the count of triplets starting at position p0 and jumping forward in triplets until the first occurrence of either 'aaa' or 'bb... | [
0.4540577828884125,
0.5269002318382263,
0.31151720881462097,
-0.31148067116737366,
-0.09389089792966843,
0.1581019014120102,
0.5938628911972046,
-0.26581433415412903,
-0.4133252501487732,
-0.5446528196334839,
-0.28701579570770264,
0.04355509951710701,
-0.46671631932258606,
0.25524163246154... | |
my $string = "alsdhfaaasccclaaaagalkfgblkgbklfs";
my $pos = 9;
my $length = 3;
my $regex = qr/^(aaa|bbb|ccc)/;
while( $pos < length $string )
{
print "Checking $pos\n";
if( substr( $string, $pos, $length ) =~ /$regex/ )
{
print "Found $1 at $pos\n";
last;
... | [
-0.14540192484855652,
0.31774553656578064,
0.6272740960121155,
-0.4883524179458618,
0.3057198226451874,
0.17721165716648102,
0.3983183801174164,
-0.02954365685582161,
-0.0655042752623558,
-0.2343267798423767,
-0.2362966537475586,
0.349823921918869,
-0.12528850138187408,
0.2332732081413269,... | |
$length;
}
``` | [
0.2075067162513733,
0.3643987476825714,
-0.05296367406845093,
-0.18055221438407898,
0.13808809220790863,
-0.20148521661758423,
0.32322534918785095,
0.09216360747814178,
0.08507712930440903,
-0.3071267008781433,
-0.22164598107337952,
0.6872867941856384,
-0.28697216510772705,
0.4083749949932... | |
Is there a way to alter the precision of an existing decimal column in Microsoft SQL Server?
```
ALTER TABLE Testing ALTER COLUMN TestDec decimal(16,1)
```
Just put `decimal(precision, scale)`, replacing the precision and scale with your desired values.
I haven't done any testing with this with data in the table, bu... | [
0.2638978660106659,
0.33745843172073364,
0.3040478527545929,
0.12249254435300827,
0.05016711354255676,
-0.09137249737977982,
-0.1044902428984642,
-0.14642272889614105,
-0.19442090392112732,
-0.31320446729660034,
0.4809044301509857,
0.4990036189556122,
-0.15867646038532257,
0.07777789235115... | |
I'm implementing a **email newsletter sender service** using .NET and Windows Server technologies. Are there comprehensive guidelines which could help **avoiding emails being trapped by spam filters** and other mechanisms?
They should cover all aspects of (legal) bulk mail sending: SMTP configuration, DNS, HTML conten... | [
0.6496277451515198,
0.018268117681145668,
0.28097888827323914,
0.07326529175043106,
-0.09265800565481186,
-0.4349922835826874,
0.18830467760562897,
0.018702305853366852,
-0.32275500893592834,
-0.7301759123802185,
0.09363923966884613,
0.3113047778606415,
-0.2232671082019806,
-0.002139159012... | |
I know about it
1. Choose a clean hosting/smtp server. IP addresses of spamming SMTP servers are often black-listed by other ISPs.
2. Send a simple introductory email to every subscriber, asking them to add your sender address to their safe list.
3. Be very prudent in sending to only those people who are actually expe... | [
0.8156810998916626,
-0.05222341790795326,
0.4508983790874481,
0.07436133921146393,
-0.11549388617277145,
-0.5838080644607544,
0.19141465425491333,
0.21312890946865082,
0.0018773413030430675,
-0.311827152967453,
0.026887059211730957,
0.11791666597127914,
-0.08801481872797012,
0.135887116193... | |
large batches or continuous activity. | [
0.22475501894950867,
-0.3148535490036011,
-0.0705830305814743,
-0.024077964946627617,
-0.11681711673736572,
0.002384755527600646,
0.33931103348731995,
0.20846617221832275,
-0.7829906344413757,
-0.4317854642868042,
-0.4706869125366211,
-0.014035385102033615,
-0.3245432674884796,
0.075152166... | |
I am using following PHP code to connect to MS Access database:
```
$odb_conn = new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". $db_path.";";
$odb_conn->open($connstr);
```
How can I retrieve database catalog/metadata from the mdb file?
**FOUND THE SOLUTION**
```
$rs_meta ... | [
-0.04018813371658325,
0.3203795850276947,
0.6512503027915955,
-0.09391819685697556,
-0.026593975722789764,
0.02493036910891533,
0.3041614592075348,
-0.3174518644809723,
-0.29995036125183105,
-0.7849012017250061,
-0.030712762847542763,
0.4693449139595032,
-0.4491347372531891,
0.582893729209... | |
I'm considering the following: I have some data stream which I'd like to protect as secure as possible -- does it make any sense to apply let's say AES with some IV, then Blowfish with some IV and finally again AES with some IV?
The encryption / decryption process will be hidden (even protected against debugging) so i... | [
0.6429405808448792,
0.2639506161212921,
0.38169634342193604,
0.283799409866333,
0.16842715442180634,
-0.24647749960422516,
0.15603703260421753,
-0.31608688831329346,
-0.004635168239474297,
-0.459681898355484,
0.16437041759490967,
0.4145977795124054,
-0.24981063604354858,
0.1901178061962127... | |
power for this (that amount of data isn't that big) so the question only is if it's worth of implementation. For example, TripleDES worked very similarly, using three IVs and encrypt/decrypt/encrypt scheme so it probably isn't total nonsense. Another question is how much I decrease the security when I use the same IV f... | [
0.5256897211074829,
-0.09823940694332123,
0.42809146642684937,
0.36367565393447876,
-0.27408459782600403,
-0.15203717350959778,
0.2383992224931717,
-0.4841259717941284,
-0.2943112552165985,
-0.39110636711120605,
0.2202131450176239,
0.5179091691970825,
-0.25960683822631836,
0.18928320705890... | |
the mathematical transformations would actually counteract one another and the end result would be easier to hack. A single pass of either AES or Blowfish should be more than sufficient.
UPDATE: From my comment below…
Using TripleDES as an example: think of how much time and effort from the world's best cryptographer... | [
0.16767382621765137,
-0.0075722807087004185,
-0.13998296856880188,
0.1319277137517929,
-0.16091206669807434,
0.025782329961657524,
0.4347462058067322,
-0.37669530510902405,
-0.15605133771896362,
-0.5683954358100891,
-0.14584846794605255,
0.51301109790802,
-0.413371741771698,
-0.21661704778... | |
aspect of your system is more likely to be compromised than AES.
UPDATE 3: Depending on what you're doing with the stream, you may want to just use [TLS](http://en.wikipedia.org/wiki/Secure_Sockets_Layer) (the successor to SSL). I recommend [Practical Cryptography](http://www.schneier.com/book-practical.html) for more... | [
0.4560557007789612,
0.022077590227127075,
-0.042816780507564545,
-0.06696948409080505,
0.03522242233157158,
-0.4046317934989929,
0.5084278583526611,
-0.21228842437267303,
-0.09053614735603333,
-0.5817248821258545,
-0.28786683082580566,
0.5416755676269531,
-0.16566619277000427,
-0.248572766... | |
I'm doing some testing on Firefox toolbars for the sake of learning and I can't find out any information on how to store the contents of a "search" drop-down inside the user's profile.
Is there any tutorial on how to sort this out?
Since it's taking quite a bit to get an answer I went and investigate it myself.
Here i... | [
0.23493969440460205,
0.3228208124637604,
0.2227582335472107,
0.044391319155693054,
0.041136469691991806,
-0.18764683604240417,
0.186744824051857,
-0.05688531696796417,
-0.3259603679180145,
-0.8255656957626343,
0.07584009319543839,
0.3126484453678131,
-0.1643996685743332,
0.0601929202675819... | |
autocompletesearchparam="Search-History-Name"
ontextentered="Search_Change(param);"
enablehistory="true"
/>
```
This gives you the minimum to enable a history on that textbox.
For some reason, and here is where my ignorance shows, the onTextEntered event function has to have the param to it called "param"... | [
-0.028742605820298195,
0.13812243938446045,
0.12182802706956863,
-0.04311544448137283,
0.03496992960572243,
0.03762976825237274,
0.4684915840625763,
-0.4070596992969513,
-0.32287517189979553,
-0.6865040063858032,
-0.2093142867088318,
0.676700234413147,
-0.42699259519577026,
-0.078926138579... | |
);
// The above line was broken into 4 for clearness.
// If you encounter problems please use only one line.
// This function is the one called upon the event of pressing <enter>
// on the text box
function Search_Change(event) {
var terms = document.getElementById('search_with_history').value;
HistoryObject.a... | [
0.08269065618515015,
-0.019102785736322403,
0.7295985221862793,
-0.34130755066871643,
0.37536874413490295,
-0.0823979601264,
0.3492136299610138,
-0.3271980881690979,
-0.2809516191482544,
-0.5382445454597473,
-0.43053221702575684,
0.5780501961708069,
-0.28936323523521423,
0.3768741488456726... | |
I am using VMware Server 1.0.7 on Windows XP SP3 at the moment to test software in virtual machines.
I have also tried Microsoft Virtual PC (do not remeber the version, could be 2004 or 2007) and VMware was way faster at the time.
I have heard of Parallels and VirtualBox but I did not have the time to try them out. A... | [
0.17619432508945465,
-0.1868484765291214,
0.31217092275619507,
0.40450289845466614,
-0.1521407812833786,
-0.12435569614171982,
0.05816706642508507,
0.3801104724407196,
-0.4296310245990753,
-0.6766685247421265,
0.50984787940979,
0.5725396871566772,
0.1422826200723648,
0.09049434214830399,
... | |
pay for it.
Also, if you are using (or know of) a good virtualization software but have no benchmarks for it, please let me know.
Use `/dev/random` (requires user input, eg mouse movements) or `/dev/urandom`. The latter has an entropy pool and doesn't require any user input unless the pool is empty.
You can read from... | [
0.3876449763774872,
-0.10441291332244873,
0.667449951171875,
0.05016613006591797,
0.09615848958492279,
0.24205364286899567,
-0.14268314838409424,
-0.5424690842628479,
0.014719462022185326,
-0.567862868309021,
-0.19883835315704346,
0.8058356642723083,
-0.1294451355934143,
-0.232208713889122... | |
I'm trying to put together a selector in SASS that will operate on the visted, hovered state of a link, but I can't quite seem to get the markup right, can someone enlighten me?
I was writing it like this:
```
&:visited:hover
attribute: foo
```
```
a
&:visited:hover
attribute: foo
```
Nowadays, this is ... | [
-0.03458469361066818,
0.2558984160423279,
0.6084316968917847,
-0.23843251168727875,
-0.16331671178340912,
-0.00403217226266861,
0.23043292760849,
0.15188629925251007,
-0.14332525432109833,
-0.39825013279914856,
-0.05688800290226936,
0.2372051179409027,
-0.26242130994796753,
0.2085278779268... | |
I am putting together a proposal for a large multinational company for our licenced solution. Problem is I've never put together something this big before and so I don't know what is acceptable. Ignoring hosting or support (or even the functionality of the app) for the moment and just concentrating the licence - do you... | [
0.6332224011421204,
0.06363082677125931,
0.4943593144416809,
0.17114825546741486,
-0.002377925906330347,
0.380603551864624,
-0.10379814356565475,
0.09541929513216019,
-0.2092563807964325,
-0.20950935781002045,
0.055371955037117004,
0.22793804109096527,
-0.05168779566884041,
0.2523751556873... | |
100k+ (probably maximum usage). Does anyone know of any good links about this kind of thing? Has anyone here procured a complex, multilingual web app for 30000 users and how much is acceptable?
With big deals it's usually discounted on each unit of whatever you're selling so that you can scale with their volume. Probab... | [
0.6574740409851074,
-0.017242318019270897,
0.3111901879310608,
0.30213114619255066,
-0.22296185791492462,
-0.02942771464586258,
0.09663522243499756,
-0.02039693109691143,
-0.3240576684474945,
-0.11512704938650131,
0.06713098287582397,
0.5464948415756226,
0.2817366123199463,
-0.097153738141... | |
with that in mind. This a pretty good article by Joel Spolsky:
<http://www.joelonsoftware.com/articles/CamelsandRubberDuckies.html>
If you never took an econ course then this will help a lot. | [
0.01697005145251751,
-0.31402522325515747,
-0.0952732190489769,
0.12921921908855438,
-0.052800096571445465,
-0.08868096023797989,
0.21009357273578644,
0.8488354682922363,
0.06629893183708191,
-0.6218976974487305,
0.10113967955112457,
0.5527944564819336,
0.3033212125301361,
0.12585954368114... | |
My application is preparing a cover-sheet for submitting documents by fax. I identify the batch by printing a [Code39](http://en.wikipedia.org/wiki/Code_39) on it.
The incoming faxes are received as tif files and my small c# service is polling for new faxes and calling a decoding function.
Currently I use a Win32 d... | [
0.5944478511810303,
0.3585253953933716,
0.5272210240364075,
-0.0686430111527443,
-0.01444095466285944,
-0.11659195274114609,
0.09979115426540375,
-0.07544095069169998,
-0.03448043391108513,
-0.4960545599460602,
0.03738941252231598,
0.21251489222049713,
-0.24328242242336273,
0.0021159888710... | |
answers!
[BarBara](http://sourceforge.net/projects/barbara/) is an open source barcode recognition library. It certainly isn't perfect, but I have gotten it to work (if I remember it needed some twiddling to get it to compile in VS2008) pretty well. | [
0.1101611852645874,
-0.16442649066448212,
0.1532393842935562,
0.1272038072347641,
-0.08538444340229034,
-0.06587290018796921,
0.4240424633026123,
-0.3976675570011139,
-0.25631994009017944,
-0.3455642759799957,
-0.13060104846954346,
0.12013184279203415,
0.0004162418481428176,
-0.19459418952... | |
I would like to confirm that the following analysis is correct:
I am building a web app in RoR. I have a data structure for my postgres db designed (around 70 tables; this design may need changes and additions during development to reflect Rails ways of doing things. EG, I designed some user and role tables - but if i... | [
0.2556244432926178,
0.22207002341747284,
0.13660112023353577,
0.11060120165348053,
-0.1561947464942932,
-0.0871342271566391,
0.44194990396499634,
-0.12125202268362045,
-0.04641185700893402,
-0.6316758990287781,
0.07317604124546051,
0.43589723110198975,
-0.10432693362236023,
-0.166297957301... | |
with post towns) as well as test data (eg, Companies gets a few dummy companies so I have data to play with).
for example:
```
CREATE TABLE towns (
id integer PRIMARY KEY DEFAULT nextval ('towns_seq'),
county_id integer REFERENCES counties ON DELETE RESTRICT ON UPDATE CASCADE,
country_id integer REFER... | [
0.08145347982645035,
0.4038734436035156,
0.6913871169090271,
0.14947625994682312,
-0.028579453006386757,
-0.08222281187772751,
0.5111767053604126,
-0.12490148842334747,
-0.08146585524082184,
-0.3412526249885559,
-0.3794906437397003,
-0.042214225977659225,
-0.26092106103897095,
0.1712217479... | |
the DB level as well as validations in my RoR models, despite the lack of DRYNESS.
Proposition 1: If I replace the script and sql files with Migrations, it is currently impossible to tell my Postgres database about the Foreign Key and other constraints I currently set in SQL DDL files within the migration code.
Prop... | [
0.04928570240736008,
0.16073361039161682,
0.3682399094104767,
-0.1329014152288437,
0.03659581393003464,
0.0018520483281463385,
0.34653881192207336,
-0.5079793334007263,
-0.11177971959114075,
-0.7398431301116943,
-0.17398442327976227,
0.609317421913147,
-0.22888079285621643,
0.2263856083154... | |
want, and provide benefits I can replicate, there is little reason for me to consider using them. So I should --skipmigrations at script/generate model time.
My question: If Proposition 0 is accepted, are Propositions 1,2,3 true or false, and why?
Thanks!
Proposition 1 is false in at least two situations - you can u... | [
0.1967654675245285,
0.18532241880893707,
0.26886528730392456,
0.04781375080347061,
0.07018720358610153,
-0.051681023091077805,
0.11424525082111359,
-0.2804934084415436,
-0.017827950417995453,
-0.6289573907852173,
-0.2669079601764679,
0.7966143488883972,
-0.037144944071769714,
0.05172587186... | |
which case the second situation becomes more compelling: you're not forced to use the Ruby DSL in migrations. Try the `execute` method, instead:
```
def self.up
execute 'YOUR SQL HERE'
end
```
With that, you can keep the contents of your SQL scripts in migrations, gaining the benefits of the latter (most prominent... | [
0.006356509868055582,
-0.21169821918010712,
0.13291959464550018,
-0.020173124969005585,
0.06545289605855942,
-0.09780266135931015,
0.22810904681682587,
-0.25161856412887573,
-0.39435431361198425,
-0.6106966733932495,
-0.2616090476512909,
0.45299577713012695,
-0.23704160749912262,
0.1490472... | |
I'm using nhibernate to store some user settings for an app in a SQL Server Compact Edition table.
This is an excerpt the mapping file:
```
<property name="Name" type="string" />
<property name="Value" type="string" />
```
Name is a regular string/nvarchar(50), and Value is set as ntext in the DB
I'm trying to wri... | [
-0.16329781711101532,
0.18757905066013336,
0.6312479376792908,
-0.10449215024709702,
-0.2834859788417816,
0.1958514153957367,
0.0744275227189064,
-0.3473471701145172,
0.06793516874313354,
-0.8539936542510986,
-0.0009065891499631107,
0.4337938725948334,
-0.1950126737356186,
0.13851702213287... | |
of "StringClob". Those configurations that don't throw mapping exceptions still throw the string truncation exception.
Is this a problem ("feature") with SQL CE? Is it possible to put more than 4000 characters into a SQL CE database with nhibernate? If so, can anyone tell me how?
Many thanks!
Okay, with many thanks t... | [
-0.2422029823064804,
0.037648461759090424,
0.4015328586101532,
0.013092855922877789,
-0.21562078595161438,
0.1381455659866333,
0.2834179103374481,
-0.3812519311904907,
-0.1893785446882248,
-0.5265586972236633,
0.16245137155056,
0.4506191611289978,
-0.234882652759552,
0.19283942878246307,
... | |
4000 characters
/// </summary>
public class MySqlServerCeDriver : SqlServerCeDriver
{
protected override void InitializeParameter(
IDbDataParameter dbParam,
string name,
SqlType sqlType)
{
base.InitializeParameter(dbParam, name, sqlType); | [
-0.1626192331314087,
-0.10184483975172043,
0.3874495029449463,
0.11552779376506805,
0.04611916095018387,
0.5678095817565918,
0.11168507486581802,
-0.39292111992836,
0.23985719680786133,
-0.5971442461013794,
0.18749259412288666,
0.2050935924053192,
-0.11889433860778809,
0.19925837218761444,... | |
if (sqlType is StringClobSqlType)
{
var parameter = (SqlCeParameter)dbParam;
parameter.SqlDbType = SqlDbType.NText;
}
}
}
}
```
Then, use this driver instead of NHibernate's in your app.config
```
<nhibernateDriver>MySqlServerCeDriverNamespace.MySq... | [
-0.2735242247581482,
0.016068510711193085,
0.7251126766204834,
-0.02220637910068035,
-0.1847938746213913,
0.16190367937088013,
0.310644268989563,
-0.017247984185814857,
-0.07629447430372238,
-0.8774896860122681,
0.26232030987739563,
0.6751098036766052,
-0.34705233573913574,
0.4297263026237... | |
problem, and solved it by just changing the sql-type attribute to "StringClob" - as attempted in this thread.
I'm not sure why it wouldn't work for me, but I suspect it is the fact that I'm using SQL CE and not some other DB. But, there you have it! | [
-0.00955859012901783,
0.24154426157474518,
0.3168668746948242,
0.04871928319334984,
-0.04945196956396103,
-0.23448137938976288,
0.24957887828350067,
0.07776638865470886,
-0.3123784363269806,
-0.12387491762638092,
0.17589637637138367,
0.5219502449035645,
-0.24584005773067474,
0.404478371143... | |
I'm using Hibernate for ORM of my Java app to an Oracle database (not that the database vendor matters, we may switch to another database one day), and I want to retrieve objects from the database according to user-provided strings. For example, when searching for people, if the user is looking for people who live in '... | [
0.5208004713058472,
0.05403011292219162,
0.5701873898506165,
0.04840847849845886,
-0.22223220765590668,
-0.07062386721372604,
0.09783843159675598,
-0.09305671602487564,
-0.15071702003479004,
-0.38904187083244324,
0.05876566097140312,
0.1808425486087799,
-0.21097616851329803,
-0.02193674631... | |
in code, and if impossible, how the hard-coded SQL should look like?
Thanks,
Yuval =8-)
For the simple case you describe, look at Restrictions.ilike(), which does a case-insensitive search.
```
Criteria crit = session.createCriteria(Person.class);
crit.add(Restrictions.ilike('town', '%fran%');
List results = crit.li... | [
0.28080877661705017,
0.07354047149419785,
0.2819138765335083,
0.03643536940217018,
-0.15503112971782684,
-0.12197292596101761,
0.19561931490898132,
-0.2772082984447479,
-0.18855129182338715,
-0.34320348501205444,
-0.2481546700000763,
0.38102537393569946,
-0.39753225445747375,
0.20112915337... | |
I am trying to separate some asp logic out into a separate page.
For now, I am trying to call a simple function.
Here is the simple index page that I am using
```
<html>
<head>
<title>Calling a webservice from classic ASP</title>
</head>
<body>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
%>
<!--... | [
-0.06424625217914581,
-0.14513370394706726,
0.6567502021789551,
-0.05484900251030922,
-0.1681651473045349,
-0.2710692286491394,
0.38855597376823425,
-0.47510677576065063,
-0.12202778458595276,
-0.5708027482032776,
-0.369346022605896,
0.42360177636146545,
-0.14628548920154572,
-0.2406123429... | |
could be doing wrong?
Any help is greatly appreciated
Thanks
Damien
Type mismatch: 'doStuff'
/uat/damien/index.asp, line 15
`aspfunctions.asp` should be inside tags so the asp is "executed", e.g.
aspfunctions.asp file:
```
<%
sub doStuff()
Response.Write("In Do Stuff")
end sub
%>
```
Otherwise the asp in `as... | [
0.539015531539917,
-0.013288453221321106,
0.23461849987506866,
-0.07484836131334305,
-0.0394403375685215,
-0.2169392853975296,
0.7971705794334412,
-0.2607019245624542,
-0.1782456338405609,
-0.42446935176849365,
-0.2360493242740631,
0.2564062774181366,
-0.3858267664909363,
-0.11514519155025... | |
I got this error when I checked out my database from source control. It might sounds weird to check in the sql server database, but this was what I have done because this is just a personal project.
Anyone knows how to fix this?
Here's my finding.
As mentioned by other posters, you really don't want to check database... | [
0.3965120315551758,
0.10489032417535782,
0.06372666358947754,
0.33027923107147217,
0.19789718091487885,
-0.14786408841609955,
0.14950326085090637,
-0.005136968567967415,
-0.35974425077438354,
-0.5727312564849854,
0.3124969005584717,
0.6871749758720398,
-0.2466818392276764,
0.06080346554517... | |
reattach the database again.
This is how I solved my problem. | [
0.07977750897407532,
0.2932109534740448,
0.2679014801979065,
0.06492335349321365,
0.018653588369488716,
-0.15199948847293854,
0.35701340436935425,
-0.1239485889673233,
-0.41863927245140076,
-0.43182626366615295,
0.10959157347679138,
0.2626436650753021,
-0.14405913650989532,
0.1271212249994... | |
I would like to replace the default malloc at link time to use a custom malloc. But when I try to redefine malloc in my program, I get this error:
```
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in test.lib(test.obj)
```
This works perfectly on any Unix, and it works on Windows with most functio... | [
0.0387805737555027,
0.15695028007030487,
0.2719956040382385,
0.01606675423681736,
0.19466078281402588,
-0.10986469686031342,
0.3245666027069092,
0.11795319616794586,
-0.24907414615154266,
-0.7842497229576111,
-0.14332738518714905,
0.8481257557868958,
-0.3540303409099579,
0.0489944480359554... | |
really good discussion of how hard this is here:
<http://benjamin.smedbergs.us/blog/2008-01-10/patching-the-windows-crt/>
~~Apparently, you need to patch the CRT~~
Edit: actually, a MS employee gave the technique in the discussion. You need to move your malloc to a lib, and then link it before the CRT
"he also ment... | [
-0.0068335882388055325,
-0.052001457661390305,
0.4967897832393646,
-0.11264428496360779,
0.08123251050710678,
-0.07807943224906921,
0.0011492783669382334,
0.20633655786514282,
-0.421382874250412,
-0.6593614220619202,
-0.49797993898391724,
0.7184193134307861,
-0.12092048674821854,
-0.036221... | |
I'm trying to run SQuirreL SQL.
I've downloaded it and installed it, but when I try to run it I get this error message:
> Java Virtual Machine Launcher.
>
> Could not find the main class.
>
> Program will exit.
I get the gist of this, but I have not idea how to fix it. Any help?
### more info:
* I'm on... | [
0.35700148344039917,
0.42797502875328064,
0.1711401492357254,
-0.27487677335739136,
-0.11609476059675217,
0.008175748400390148,
0.8413616418838501,
0.31196337938308716,
-0.2932327687740326,
-0.7336779832839966,
0.06909617781639099,
0.6219627857208252,
-0.3026067912578583,
-0.20318503677845... | |
**squirrel-sql.bat** file.
### Update
This question: ["Could not find the main class: XX. Program will exit."](https://stackoverflow.com/questions/1417328/could-not-find-the-main-class) gives some background on this error from the point of view of a java developer.
Is Java installed on your computer? Is the path to i... | [
-0.14587955176830292,
0.012574764899909496,
-0.28404563665390015,
-0.015143529511988163,
0.12490065395832062,
-0.17323340475559235,
0.6609212756156921,
0.07047295570373535,
-0.3305979073047638,
-0.5378292202949524,
0.10774613916873932,
0.2890315353870392,
-0.3554535210132599,
-0.2078106552... | |
I have the .net framework 3.5 on my development machine and also am using the AJAX toolkit in my code. In order to publish this code to a server for my users, do I need anything on the server in order for my AJAX code to operate correctly?
You need only the .NET framework 3.5.
If you publish your project, the AJAX Too... | [
0.6767855882644653,
0.20561537146568298,
0.2894356846809387,
0.10532566159963608,
0.0564986914396286,
-0.4829205274581909,
0.2904559373855591,
0.21304234862327576,
-0.04895671084523201,
-0.8209117650985718,
-0.08040190488100052,
0.899958610534668,
-0.2976128160953522,
0.018572211265563965,... | |
Are there any decent tutorials for setting up F# in Visual Studio 2005? Everything I have found points at VS2008.
ie: 'F# projects' under projects, etc.
Unfortunately the CTP release of F# doesn't support VS 2005. Two options:
1. Use 1.9.4.19, the most recent pre-CTP release
2. Download the free [VS2008](http://www.m... | [
0.11953400820493698,
-0.10568869858980179,
0.33387091755867004,
0.12205380201339722,
-0.24949994683265686,
-0.16679905354976654,
0.3467617630958557,
0.024703389033675194,
-0.09738761186599731,
-0.44579142332077026,
-0.2578994631767273,
0.7879058718681335,
-0.325588196516037,
-0.18331584334... | |
I have several <li> elements with different id's on ASP.NET page:
```
<li id="li1" class="class1">
<li id="li2" class="class1">
<li id="li3" class="class1">
```
and can change their class using JavaScript like this:
```
li1.className="class2"
```
But is there a way to change <li> element class using ASP.NET? It c... | [
-0.14540226757526398,
-0.07509934902191162,
0.4070931673049927,
0.17779189348220825,
-0.00846746563911438,
0.004877783823758364,
-0.006519506685435772,
-0.4615408778190613,
-0.08905453234910965,
-0.8647251725196838,
0.0695786252617836,
0.24469323456287384,
-0.3840005695819855,
-0.021722462... | |
ClientScript.RegisterStartupScript to include some client side script to manipulate the class, e.g.
```
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<script language=\"javascript\">");
sb.Append("document.getElementById(\"li1\").className=\"newClass\";")
sb.Append("</script>");
ClientScri... | [
-0.16313683986663818,
-0.060109060257673264,
0.605603039264679,
-0.3773035407066345,
-0.09102153033018112,
0.15504899621009827,
0.5077957510948181,
-0.4382035434246063,
-0.20523889362812042,
-0.920478105545044,
-0.20930851995944977,
0.2587379515171051,
-0.6748184561729431,
0.02812436968088... | |
Currently I have this (edited after reading advice):
```
struct Pair<T, K> : IEqualityComparer<Pair<T, K>>
{
readonly private T _first;
readonly private K _second;
public Pair(T first, K second)
{
_first = first;
_second = second;
}
public T First { get { return _first; } }
... | [
-0.31556445360183716,
-0.30940818786621094,
0.5337164998054504,
-0.17705117166042328,
-0.12530489265918732,
-0.07219575345516205,
0.23480236530303955,
-0.18083204329013824,
0.012972280383110046,
-0.9236065149307251,
-0.1940600574016571,
0.4166678488254547,
-0.12789379060268402,
0.516802251... | |
Equals(Pair<T, K> x, Pair<T, K> y)
{
return x.GetHashCode(x) == y.GetHashCode(y);
}
public int GetHashCode(Pair<T, K> obj)
{
int hashCode = obj.First == null ? 0 : obj._first.GetHashCode();
hashCode ^= obj.Second == null ? 0 : obj._second.GetHashCode();
return hashCode... | [
-0.4292425513267517,
-0.04326842352747917,
0.6475301384925842,
-0.12498447299003601,
0.0139499232172966,
0.1084550991654396,
0.5345103740692139,
-0.3074718117713928,
0.201798677444458,
-0.6941759586334229,
-0.1507146805524826,
0.3104168474674225,
-0.6743983030319214,
0.019216937944293022,
... | |
return this.GetHashCode(this);
}
public override bool Equals(object obj)
{
return (obj != null) &&
(obj is Pair<T, K>) &&
this.Equals(this, (Pair<T, K>) obj);
}
}
```
The problem is that First and Second may not be reference types (VS actually warns me about this), but the code stil... | [
0.007730665151029825,
0.22925344109535217,
0.33961421251296997,
-0.17428728938102722,
0.03582743927836418,
-0.012189937755465508,
0.6616196036338806,
-0.5292362570762634,
0.07491597533226013,
-0.6186981201171875,
-0.021770687773823738,
0.565798282623291,
-0.38159552216529846,
0.05613069608... | |
that I *want* this struct to support value and reference types (in other words, constraining by class is not a valid solution)
Edit 2:
As to what I'm trying to achieve, I want this to work in a Dictionary. Secondly, SRP isn't important to me right now because that isn't really the essence of this problem - it can alwa... | [
-0.06146929785609245,
0.0406242311000824,
0.009932927787303925,
-0.30102333426475525,
-0.2838686406612396,
0.041076481342315674,
0.3590732514858246,
-0.22619296610355377,
0.2831914722919464,
-0.681780219078064,
-0.02983529306948185,
0.7319870591163635,
-0.448663592338562,
-0.08120991289615... | |
public Pair(T first, K second)
{
_first = first;
_second = second;
}
public T First
{
get { return _first; }
}
public K Second
{
get { return _second; }
}
public bool Equals(Pair<T, K> obj)
{
return Equals(obj._first, _first) && Equals(obj._second, _second);
}
public over... | [
-0.3734263777732849,
-0.1792377382516861,
0.27391672134399414,
-0.21593572199344635,
-0.23899252712726593,
0.16888681054115295,
0.507665753364563,
-0.28821608424186707,
0.16094711422920227,
-0.7547520399093628,
-0.42952239513397217,
0.37466683983802795,
-0.5299035310745239,
-0.078063122928... | |
{
unchecked
{
return (_first != null ? _first.GetHashCode() * 397 : 0) ^ (_second != null ? _second.GetHashCode() : 0);
}
}
}
``` | [
-0.19663549959659576,
-0.013599016703665257,
0.20937085151672363,
-0.062068454921245575,
0.09113624691963196,
-0.11830391734838486,
0.4416097104549408,
-0.1675550490617752,
-0.24956552684307098,
-0.39177870750427246,
-0.5748155117034912,
0.29455554485321045,
-0.38373079895973206,
0.4366120... | |
Many times, a Java app needs to connect to the Internet. The most common example happens when it is reading an XML file and needs to download its schema.
I am behind a proxy server. How can I set my JVM to use the proxy ?
From the Java documentation (*not* the javadoc API):
<http://download.oracle.com/javase/6/docs/t... | [
0.08140933513641357,
0.15804274380207062,
0.42618799209594727,
-0.07246869057416916,
0.05573146790266037,
-0.10338738560676575,
0.25509485602378845,
-0.1544853150844574,
-0.29005593061447144,
-0.996863842010498,
-0.18518638610839844,
0.3069600760936737,
-0.1780887395143509,
0.1691215038299... | |
is to edit the start-up scripts supplied by the vendor.
Many developers are familiar with the Java API (javadocs), but many times the rest of the documentation is overlooked. It contains a lot of interesting information: <http://download.oracle.com/javase/6/docs/technotes/guides/>
---
**Update :** If you do not want... | [
0.021681809797883034,
0.12406550347805023,
0.21236552298069,
-0.017013737931847572,
0.08293644338846207,
-0.30870816111564636,
0.4036608338356018,
0.07969525456428528,
-0.18138301372528076,
-0.9533393979072571,
-0.265775203704834,
0.4707289934158325,
-0.22378931939601898,
0.182367399334907... | |
I am going through John Resig's excellent [Advanced javascript tutorial](http://ejohn.org/apps/learn/#47) and I do not thoroughly understand what's the difference between the following calls: (please note that 'arguments' is a builtin javascript word and is not exactly an array hence the hacking with the Array.slice in... | [
0.15384946763515472,
0.3742745816707611,
0.23356463015079498,
-0.20872128009796143,
-0.12653475999832153,
0.21374459564685822,
0.59572434425354,
-0.5052813291549683,
0.12909474968910217,
-0.5956085920333862,
0.0027435622178018093,
0.7345390915870667,
-0.3380109965801239,
0.0918902754783630... | |
to the difference between Array.slice and Array().slice. What exactly is the difference between these two and why does not Array.slice.call behave as expected? (which is giving back all but the first element of the arguments list).
Not quite.
Watch what happens when you call String.substring.call("foo", 1) and String(... | [
0.11226727068424225,
-0.22378095984458923,
0.1176101565361023,
-0.2193852961063385,
-0.1718704104423523,
-0.11350306123495102,
0.4023834764957428,
-0.3376682996749878,
-0.0739302858710289,
-0.5992609262466431,
-0.02498614601790905,
0.6849606037139893,
-0.38026878237724304,
-0.0825813338160... | |
in IE and you'll get an error that Array.slice is null**.
This is why Array.slice does not behave correctly (nor does String.substring).
Proof (the following is something one should never expect based on the definition of slice()...just like substring() above):
```
>>> Array.slice.call([1,2], [3,4])
3,4
```
Now, i... | [
0.20799872279167175,
0.022520197555422783,
0.1714254766702652,
-0.225545734167099,
-0.23905664682388306,
-0.3821145296096802,
0.4680555462837219,
-0.476372629404068,
0.1829601675271988,
-0.9234920144081116,
-0.12378185242414474,
0.6126755475997925,
-0.2809135317802429,
-0.06793156266212463... | |
How can one load custom (not an image, nor a sound file) resource file from /res within .jar using MIDP 2.0?
I'm working with MIDP 2.1, but I hope this is in 2.0 too.
Class.getResource(path\_to\_resource) should give you an InputStream to the file. | [
0.3240986466407776,
-0.21281325817108154,
0.25316306948661804,
0.06680874526500702,
0.23837731778621674,
-0.11578439176082611,
0.24746829271316528,
-0.15355123579502106,
-0.2170669138431549,
-0.9475274682044983,
-0.10864205658435822,
0.8129659295082092,
-0.013479162007570267,
0.32639491558... | |
We are creating an XBAP application that we need to have rounded corners in various locations in a single page and we would like to have a WPF Rounded Corner container to place a bunch of other elements within. Does anyone have some suggestions or sample code on how we can best accomplish this? Either with styles on a ... | [
0.22817067801952362,
-0.1133730560541153,
0.5878077745437622,
0.31531471014022827,
-0.02264932543039322,
-0.11051440984010696,
-0.34403616189956665,
-0.17276431620121002,
-0.30914488434791565,
-0.7783160209655762,
0.28331151604652405,
0.061793822795152664,
-0.37276017665863037,
-0.02185954... | |
Is it possible to, for instance, replace and free a TEdit with a subclassed component instantiated (conditionally) at runtime? If so, how and when it should be done? I've tried to set the parent to nil and to call free() in the form constructor and AfterConstruction methods but in both cases I got a runtime error.
---... | [
0.16952793300151825,
-0.1587708741426468,
0.13509248197078705,
0.3134923279285431,
-0.048767171800136566,
-0.1309521645307541,
0.43825310468673706,
-0.4348146915435791,
-0.2349521815776825,
-0.5818049907684326,
-0.16716641187667847,
0.6967524290084839,
-0.36835718154907227,
-0.024908594787... | |
the new control):
```
function ReplaceControlEx(AControl: TControl; const AControlClass: TControlClass; const ANewName: string; const IsFreed : Boolean = True): TControl;
begin
if AControl = nil then
begin
Result := nil;
Exit;
end;
Result := AControlClass.Create(AControl.Owner);
CloneProperties(ACont... | [
-0.10601317882537842,
-0.34119299054145813,
0.6640105247497559,
0.23708350956439972,
0.4842100441455841,
0.18073521554470062,
0.0855778306722641,
-0.4672355651855469,
0.014434562996029854,
-0.40039288997650146,
-0.41325756907463074,
0.6271054148674011,
-0.4031972587108612,
0.43983763456344... | |
: Boolean = True): TControl;
begin
if AControl = nil then
Result := nil
else
Result := ReplaceControlEx(AControl, TControlClass(AControl.ClassType), ANewName, IsFreed);
end;
```
using this routine to pass the properties to the new control
```
procedure CloneProperties(const Source: TControl; const Dest:... | [
0.12227246910333633,
-0.0716317817568779,
0.5985562205314636,
-0.0863678827881813,
0.5937255620956421,
0.14439328014850616,
0.5008891820907593,
-0.5567291975021362,
0.1462080031633377,
-0.4167490005493164,
-0.4219936430454254,
0.640712320804596,
-0.42104673385620117,
0.5647044777870178,
... | |
finally
ms.Free;
end;
finally
Source.Name := OldName;
end;
end;
```
use it like:
```
procedure TFrame1.AfterConstruction;
var
I: Integer;
NewEdit: TMyEdit;
begin
inherited;
NewEdit := ReplaceControlEx(Edit1, TMyEdit, 'Edit2') as TMyEdit;
if Assigned(NewEdit) then
begin
NewEdit.Text ... | [
-0.06844709813594818,
-0.08935270458459854,
0.9296209812164307,
-0.07953409850597382,
0.10418548434972763,
-0.015196696855127811,
0.5708209872245789,
-0.48244529962539673,
-0.31972479820251465,
-0.6509664058685303,
-0.524115800857544,
0.3847043812274933,
-0.30513396859169006,
0.38103598356... | |
Controls there, might cause a lot of problems as you're messing up with Form controls housekeeping.
See what you get if you try to read the new Edit Caption to display in the ShowMessage...
In that case you would want to use
...ReplaceControl(Edit1, 'Edit2', **False**)
and then do a
...FreeAndNil(Edit1... | [
0.1949293613433838,
-0.07262405008077621,
0.5328512787818909,
0.2825011610984802,
0.007175756618380547,
-0.39181628823280334,
0.1730595976114273,
-0.4533553123474121,
-0.2881946265697479,
-0.47961950302124023,
-0.24060583114624023,
0.5333081483840942,
-0.3846939504146576,
0.065126843750476... | |
I want to put beautiful charts in a report that is available via html and pdf.
I'd prefer to use just one API and that all processing occur server-side.
I want to embed Flash charts in the html version of reports. I want to embed a static image (preferably vector-based format) in the pdf version.
**What is the best ... | [
0.15243268013000488,
-0.09509511291980743,
0.7279406189918518,
0.21199007332324982,
-0.4669640362262726,
-0.32907697558403015,
0.1462235301733017,
-0.03264005854725838,
-0.1458611637353897,
-0.7147198915481567,
0.04005500674247742,
0.37042322754859924,
-0.2404555380344391,
0.14042155444622... | |
Princexml doesn't render embedded flash. It does render embedded images and SVG. Another option is [flying saucer](http://code.google.com/p/flying-saucer//), which is less feature-full but free.
[Corda](http://www.corda.com) - They make mapping, and graphing software that supports some amount of interactivity. They su... | [
0.137772798538208,
-0.19679555296897888,
0.6619107127189636,
0.2660289704799652,
-0.4088316559791565,
-0.45067015290260315,
-0.03256818652153015,
0.29308950901031494,
-0.13221698999404907,
-0.5458475351333618,
-0.16565510630607605,
0.2025078535079956,
-0.13265201449394226,
0.00466116284951... | |
at [Degrafa](http://www.degrafa.com/) for charting in Flex. It's very good, and the underlying code is actually being folded into Adobe's next release! | [
0.3461694121360779,
-0.39532870054244995,
0.3417000472545624,
0.2701113522052765,
-0.06769835203886032,
-0.3710443377494812,
-0.09802474826574326,
-0.26856985688209534,
-0.25519248843193054,
-0.6474303603172302,
0.05372565984725952,
0.8035786747932434,
0.0986461490392685,
-0.43696865439414... | |
Suppose we have an iterator (an infinite one) that returns lists (or finite iterators), for example one returned by
```
infinite = itertools.cycle([[1,2,3]])
```
What is a good Python idiom to get an iterator (obviously infinite) that will return each of the elements from the first iterator, then each from the secon... | [
-0.0943927988409996,
-0.34489426016807556,
0.3256866931915283,
-0.17973129451274872,
-0.10982494056224823,
0.17542541027069092,
0.04809245467185974,
-0.4472762942314148,
-0.2901375889778137,
-0.38678741455078125,
-0.07046682387590408,
0.9311357736587524,
-0.28007277846336365,
-0.0954586640... | |
for elem in iterable)
``` | [
-0.3116282522678375,
0.470601350069046,
0.13274450600147247,
-0.47667914628982544,
-0.09143203496932983,
0.20149891078472137,
0.3640371859073639,
-0.48412638902664185,
0.16697533428668976,
-0.4133976399898529,
-0.3541663885116577,
0.62138432264328,
0.08931975066661835,
0.32478761672973633,... | |
Consider a normal customer-orders application based on MVC pattern using WinForms.
The view part has grown too much (over 4000 files) and it needs to be split into smaller ones.
---
For this example we are going to use 3 projects for the view part:
* **Main** - has dependencies to the other 2 projects. Instantiates ... | [
0.15805144608020782,
-0.16650791466236115,
0.5215420126914978,
-0.06772523373365402,
-0.20823433995246887,
0.3434959053993225,
-0.031119927763938904,
0.1700735092163086,
-0.24232293665409088,
-0.6326197981834412,
-0.1504306048154831,
0.5112110376358032,
-0.13005460798740387,
-0.09425906836... | |
so it's no problem getting it. When the user selects an order, the list will get it's guid and pass it as reference to the Order Details form.
*This would mean that we need to have a reference to Orders Project in the Customers Project.* **(1)**
But also on the order details form there is a link to the customer that ... | [
0.48780444264411926,
-0.020100463181734085,
0.38347890973091125,
-0.0842464417219162,
-0.11328381299972534,
0.277005672454834,
-0.09047747403383255,
0.019543761387467384,
-0.4673314094543457,
-0.5612965822219849,
-0.0908937007188797,
0.4484623074531555,
-0.18242588639259338,
0.072863496840... | |
projects.**
---
**How can this be avoided?** Some kind of plug-in architecture? The project is already developed and the best solution would involve as little code change as possible.
Change at least one of the types to an interface.
For example have a ICustomer interface and a Customer type that implements this int... | [
0.4719763994216919,
0.037133749574422836,
0.30696630477905273,
0.30052149295806885,
-0.0314192920923233,
0.029819661751389503,
-0.05752762034535408,
-0.22135336697101593,
-0.3754962980747223,
-0.8068618774414062,
-0.10710860043764114,
0.3806721270084381,
-0.3595938980579376,
0.021503709256... | |
IOrder interface and add them to a third library project. And reference this project from the other two and only work with the interfaces, never with the implemenation. | [
0.20548845827579498,
0.06749626249074936,
0.4843984842300415,
0.1430465131998062,
-0.4514923095703125,
-0.3020549714565277,
0.08527684211730957,
0.10908614099025726,
-0.04949231073260307,
-1.0525137186050415,
-0.008494192734360695,
0.4769115149974823,
-0.24222050607204437,
-0.1793774962425... | |
I want my WPF application to be skinnable, by applying a certain XAML template, and the changes to be application wide, even for dynamic controls or controls that aren't even in the visual/logical tree.
What can I use to accomplish this type of functionality? Are there any good resources or tutorials that show how th... | [
0.2750406265258789,
-0.18854831159114838,
0.2687501609325409,
-0.06317707151174545,
0.15233425796031952,
-0.19171996414661407,
0.1743144690990448,
-0.2243381142616272,
-0.3819650411605835,
-0.624208390712738,
0.026936965063214302,
0.5992584824562073,
-0.23476988077163696,
-0.13013021647930... | |
I see on Stack Overflow and [PEP 8](http://www.python.org/dev/peps/pep-0008/) that the recommendation is to use spaces only for indentation in Python programs. I can understand the need for consistent indentation and I have felt that pain.
Is there an underlying reason for spaces to be preferred? I would have thought ... | [
0.2206353098154068,
0.4770635962486267,
-0.024954959750175476,
-0.15633177757263184,
-0.2591453194618225,
-0.17228436470031738,
0.14109361171722412,
0.10367852449417114,
-0.34762489795684814,
-0.33290305733680725,
-0.3326217234134674,
0.4961913526058197,
-0.3160233497619629,
-0.15062080323... | |
of the PEP as stated in the very first paragraph:
> This document gives coding conventions for the Python code comprising the standard library in the main Python distribution.
The intention is to make *all code that goes in the official python distribution* consistently formatted (I hope we can agree that this is uni... | [
0.6533810496330261,
0.01961100846529007,
0.141801118850708,
0.1565847098827362,
-0.4425840377807617,
-0.2284879833459854,
-0.35053399205207825,
-0.06264239549636841,
-0.05037673935294151,
-0.3299075961112976,
-0.3398403823375702,
0.7177721261978149,
-0.2666628658771515,
-0.3978751301765442... | |
He didn't even have to give a reason, but he still did by referring to empirical data.
For all other purposes you can either take this PEP as a recommendation, or you can ignore it -- your choice, or your team's, or your team leaders.
But if I may give you one advice: don't mix'em ;-) [ed: Mixing tabs and spaces is n... | [
0.8346982002258301,
0.2776884138584137,
0.10234426707029343,
0.31645363569259644,
0.21645568311214447,
-0.06900385022163391,
0.15840847790241241,
0.07590170949697495,
0.11113332957029343,
-0.5107361078262329,
0.1274285614490509,
0.26192140579223633,
-0.4366956651210785,
-0.1134864836931228... | |
After reading the Test-and-Set [Wikipedia entry](http://en.wikipedia.org/wiki/Test-and-set), I am still left with the question "What would a Test-and-Set be used for?"
I realize that you can use it to implement Mutex (as described in wikipedia), but what other uses does it have?
You use it any time you want to write d... | [
0.6227125525474548,
0.1839146614074707,
-0.1908354014158249,
0.06202176585793495,
-0.1191638633608818,
-0.10574806481599808,
-0.03803763538599014,
-0.39869704842567444,
-0.18361325562000275,
-0.2544986605644226,
0.11925651878118515,
0.3328191637992859,
-0.2860260307788849,
0.13769374787807... | |
What features of C++ should be avoided in embedded systems?
Please classify the answer by reason such as:
* memory usage
* code size
* speed
* portability
EDIT: Lets' use an ARM7TDMI with 64k ram as a target to control the scope of the answers.
**RTTI and Exception Handling:**
* Increases code-size
* Decreases perf... | [
0.21077804267406464,
0.14827249944210052,
0.01687745936214924,
0.2918522357940674,
-0.224026158452034,
-0.01838369108736515,
0.3355666995048523,
-0.3570457100868225,
-0.2546877861022949,
-0.5691440105438232,
-0.24079684913158417,
0.4857946038246155,
-0.2501456141471863,
-0.4434723556041717... | |
decrease the code-size as well. There is no clear cut answer on his.
**Virtual functions and inheritance:**
* These are fine for me. I write almost all of my embedded code in C. That does not stop me from using function-pointer tables to mimic virtual functions. They never became a peformance problem. | [
0.41657230257987976,
0.1973680555820465,
0.3345438838005066,
-0.012884397991001606,
-0.1775238960981369,
0.058988966047763824,
0.19370269775390625,
0.32454776763916016,
-0.19617599248886108,
-0.6756316423416138,
0.15415115654468536,
0.727554202079773,
0.08425115048885345,
-0.00425459910184... | |
I understand the mantra of "don't roll your own" when it comes to site security frameworks.
For most cases anyway.
I'm going to be collaborating on a site that integrates text-messaging into the system.
I'd like to use an existing, well-tested security framework to protect the users data, but I need it to also prote... | [
0.9405409693717957,
0.31133994460105896,
0.13384586572647095,
0.07353851944208145,
-0.040910642594099045,
-0.24534723162651062,
0.028088614344596863,
0.2601383328437805,
-0.16133548319339752,
-0.45929154753685,
0.17887403070926666,
0.33911967277526855,
0.05788302421569824,
0.04631299898028... | |
value of doing so can be disputed), but that doesn't work for phone numbers.
If someone jacks your server, they can do anything the server can. This must include recovering the phone number, but doesn't include recovering the password if it's hashed well. So the phone number is just a particular case of protecting con... | [
0.19320902228355408,
-0.1172768697142601,
0.34573063254356384,
0.40104472637176514,
0.47035813331604004,
-0.27221348881721497,
0.45163699984550476,
-0.1530415415763855,
-0.2722928822040558,
-0.2858310043811798,
-0.21546867489814758,
0.679124653339386,
-0.13381096720695496,
-0.1945570707321... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.