text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
that could not be fixed in a few hours.
It really would be easier to CallByName a class - can't you just wrap the module(s) with a class that redirects the calls to the module?
It's possible to call routines in modules by name using a FunctionDelegator. This is explained in Matt Curland's excellent book [Advanced Visu... | [
0.09833040088415146,
0.012235083617269993,
0.3210037350654602,
-0.0686597153544426,
0.1391615867614746,
-0.06893707811832428,
0.4374285340309143,
-0.5439424514770508,
-0.2954649031162262,
-0.22086754441261292,
-0.3841361105442047,
0.7318587303161621,
-0.5752124786376953,
-0.087455093860626... | |
you will be able to use CallByName. This will work if your code is in a DLL rather than an EXE. RS Conley suggests in any case it is more flexible to have a minimal EXE with nearly all functionality in a DLL: this may well be true. | [
0.10913123935461044,
-0.28054219484329224,
0.2464473992586136,
-0.04694506153464317,
0.11288837343454361,
-0.3330496847629547,
0.16090482473373413,
0.05458412319421768,
-0.12038853764533997,
-0.5589939951896667,
-0.4426918923854828,
0.5416972637176514,
-0.5063621401786804,
0.10952617973089... | |
I am using `TransactionScope`s at a high level to wrap some high level code that makes a number of connections to the database.
One of the functions I call is a generic read that is used for read only functions where a `read uncommitted` isolation level is needed. But in some cases it is used as part of large update o... | [
0.23690371215343475,
0.1564120054244995,
0.15043100714683533,
-0.0582960769534111,
0.11443770676851273,
-0.3035559058189392,
-0.06504645198583603,
-0.09624993056058884,
-0.2918662130832672,
-0.41903817653656006,
0.12424666434526443,
0.6255194544792175,
-0.504052460193634,
0.158634573221206... | |
TransactionScope itself. Is that what you mean?
```
using (var txn = new TransactionScope(
TransactionScopeOption.Required,
new TransactionOptions
{
IsolationLevel = IsolationLevel.ReadUncommitted
}
))
{
// Your LINQ to SQL query goes here
}
```
(Code stolen from my blog post [here](http... | [
0.0368458591401577,
0.11286137998104095,
0.3269232511520386,
0.15740954875946045,
0.2867140471935272,
-0.20882649719715118,
-0.08470453321933746,
0.10525048524141312,
-0.2515035569667816,
-0.30613112449645996,
0.09291336685419083,
0.5233522057533264,
-0.6479902267456055,
0.2307238727807998... | |
What are the limitations or gotchas or antipatterns or pitfalls?
It seems pretty attractive, apparently you can create a search engine with almost no work. But it cannot be without its problems...
what are your experiences?
In my opinion, the greatest drawback is that the MySQL full text indexing is limited to MyISAM... | [
-0.3379570245742798,
0.1115776002407074,
0.2809446454048157,
0.4917878806591034,
-0.11303491145372391,
-0.3063673675060272,
0.08259069919586182,
0.4601500630378723,
-0.21762709319591522,
-0.4999598562717438,
-0.020932337269186974,
0.5426188707351685,
-0.12124235928058624,
-0.06732650101184... | |
In my custom aspx page in WSS I am using a DataFormWebPart with an xsl file to render some data. In order to pass values to the xsl I use parameter bindings. Specifically, I need to pass in the server host url like this:
```
<ParameterBinding
Name="HttpHost"
Location="CAMLVariable"
DefaultValue="http://... | [
0.013242133893072605,
-0.009998831897974014,
0.5796332359313965,
-0.005635788198560476,
-0.16273537278175354,
-0.2285759150981903,
0.15310776233673096,
0.14643223583698273,
-0.16831505298614502,
-0.8147212862968445,
-0.027096597477793694,
0.567816436290741,
-0.1975887268781662,
0.307809174... | |
Location="CAMLVariable"
DefaultValue='<%# SPContext.Current.Site.Url.Replace
(SPContext.Current.Site.ServerRelativeUrl, "") %>' />
```
Now to the problem. The code works as expected if used some other place in the page, but with the above code SharePoint reports:
> Web Part Error: The 'ParameterBindings... | [
0.06026279553771019,
0.031672071665525436,
0.6306196451187134,
0.2176293581724167,
0.348845899105072,
0.06307056546211243,
0.3264633119106293,
-0.3067251443862915,
-0.111343614757061,
-0.6331806778907776,
0.06320732831954956,
0.5027216672897339,
0.18877142667770386,
0.3053085505962372,
-... | |
the dynamic value in there using the Location attribute.
The `ParameterBinding` `Location` attribute refers to where to fetch the value from. Articles like [this](http://blogs.msdn.com/sharepointdesigner/archive/2007/03/05/asp-net-controls-filter-the-data-view.aspx) hints of the "Control()" option. So changing the par... | [
-0.43139952421188354,
-0.3252851068973541,
0.8890148997306824,
0.032214850187301636,
-0.17501236498355865,
0.15074419975280762,
0.14395231008529663,
-0.6680746078491211,
-0.24247775971889496,
-0.43571850657463074,
-0.140089213848114,
0.3291458189487457,
-0.34586283564567566,
-0.07739531248... | |
...
<xsl:param name="HttpHost"/>
```
The parameter can then be referenced as any other XSL variable. | [
0.09309947490692139,
0.014811201952397823,
0.7290425896644592,
-0.028417162597179413,
-0.2710822820663452,
0.08571126312017441,
0.04611518234014511,
-0.189339742064476,
-0.19514547288417816,
-0.2636661231517792,
-0.3705715537071228,
0.4420584440231323,
-0.3028997480869293,
0.13127525150775... | |
Me and a colleague are starting a new project and attempting to take full advantage of TDD. We're still figuring out all the concepts around unit testing and are thus far basing them primarily on other examples.
My colleague recently brought into question the point of the NUnit syntax helpers and I'm struggling to ex... | [
0.34299737215042114,
0.28157347440719604,
-0.20274551212787628,
-0.1355038434267044,
-0.42131155729293823,
-0.04197757691144943,
0.45813751220703125,
-0.25068551301956177,
0.21553564071655273,
-0.40186503529548645,
0.011439916677772999,
0.6667308211326599,
0.3766593635082245,
0.19291254878... | |
prefer us to simply write:
```
Assert.That(!product.IsValid());
```
He says to him this makes more sense and he can read it easier.
So far the only thing we can agree on is that you are likely to get more helpful output when the test is failing from the former, but I think there must be a better explanation. I've l... | [
0.32377487421035767,
0.2173541933298111,
0.009547349065542221,
0.05297718197107315,
-0.21714946627616882,
-0.0037123144138604403,
0.20554539561271667,
-0.3062932789325714,
0.02522699348628521,
-0.8227237462997437,
-0.07759296894073486,
0.7362673282623291,
0.03557838499546051,
-0.0177429877... | |
examples above?
Thanks.
I think it's mostly to do with the pure English reading of the statement.
The first reads
> Assert that product is valid is false
The second reads
> Assert that not product is valid
I personally find the first easier to process. I think it's all down to preference really. Some of the exten... | [
0.3317002058029175,
-0.010775820352137089,
0.03816552087664604,
-0.1570352017879486,
-0.3473222553730011,
-0.060112182050943375,
0.2454221099615097,
-0.3679720163345337,
0.05026651546359062,
-0.26165303587913513,
-0.08022630959749222,
0.5392442345619202,
-0.05845917761325836,
0.04791356995... | |
I am looking for CLI specification.
Where can I find it to download?
Why not ask google?
<http://www.ecma-international.org/publications/standards/Ecma-335.htm> | [
0.0974431186914444,
-0.008948642760515213,
0.6502219438552856,
0.2459026277065277,
0.014040502719581127,
-0.4748576879501343,
-0.017672261223196983,
0.1056896299123764,
-0.3871248662471771,
-0.1653493493795395,
-0.063033826649189,
0.18727554380893707,
-0.12000064551830292,
0.12937706708908... | |
What is better between JSP and velocity in
- Performance
- Ease of use
- Ease of creating reusable components
- Availability of open source 3rd parties
- IDE support
Advantages of Velocity:
* strict separation of view from business logic
* simple syntax that can be understood by graphic designers | [
-0.10925614833831787,
-0.2578571140766144,
0.41032829880714417,
0.5155136585235596,
-0.0904533863067627,
-0.2548004686832428,
-0.25297045707702637,
-0.08274930715560913,
0.06336291134357452,
-0.8106310367584229,
-0.0332149937748909,
0.5448503494262695,
-0.16418810188770294,
-0.499183803796... | |
The company I work for has taken on a support contract for a large order processing system. As part of the initial system audit I noticed that the passwords stored in the database were actually the hashcode of the password.
Essentially:
```
string pwd = "some pasword";
string securePwd = pwd.GetHashCode();
```
My q... | [
0.15142512321472168,
0.3936803340911865,
0.3464511036872864,
-0.2710776925086975,
0.05421574041247368,
-0.20927943289279938,
0.43164581060409546,
-0.12632350623607635,
0.035986170172691345,
-0.23660032451152802,
-0.18894760310649872,
0.3843629062175751,
-0.25123533606529236,
0.252639085054... | |
[birthday paradox](http://en.wikipedia.org/wiki/Birthday_paradox), it's not a long enough hash value due to the relatively high probability of collisions, even if it were explicitly designed to be collision resistant, which is not.
You should go for SHA256 or another cryptographically secure hash function designed to... | [
-0.3236391842365265,
0.12505269050598145,
0.021236078813672066,
0.18116751313209534,
-0.34663334488868713,
0.009792597964406013,
0.30060848593711853,
0.07241993397474289,
-0.46319451928138733,
-0.33680301904678345,
-0.0045834495685994625,
-0.02208765223622322,
0.0311795212328434,
0.2640687... | |
I am trying to install subversion on a centos 5 VPS.
I managed to install subversion but when I try to do `yum install mod_dav_svn` I get this error:
> Error: Missing Dependency: httpd-mmn =
> 20051115 is needed by package
> mod\_dav\_svn
After a lot of googling I read that you need Apache 2.2 (I previously had 2.0... | [
0.1323748528957367,
-0.062257423996925354,
0.46355536580085754,
-0.17614538967609406,
-0.46362608671188354,
-0.12180332839488983,
0.7727838158607483,
-0.03088231571018696,
-0.23550650477409363,
-0.7182525992393494,
0.0272267647087574,
0.47533029317855835,
-0.5468658208847046,
0.30940568447... | |
that http\* was in yum exclude list and it made yum think it wasn't installed. removing it from the exclude list solve the problem | [
0.33636951446533203,
0.18944405019283295,
0.2816048860549927,
0.10181166976690292,
-0.21817103028297424,
-0.32328057289123535,
0.434714674949646,
0.32594412565231323,
-0.12272068858146667,
-0.3802260458469391,
0.042178187519311905,
-0.05623714253306389,
-0.3260077238082886,
0.2824555039405... | |
I'm hosting IronPython in a c#-based WebService to be able to provide custom extension scripts. However, I'm finding that memory usage sharply increases when I do simple load testing by executing the webservice repeatedly in a loop.
IronPython-1.1 implemented IDisposable on its objects so that you can dispose of them ... | [
0.40883946418762207,
0.1930573284626007,
0.17835018038749695,
-0.2674197256565094,
-0.23843146860599518,
0.011917101219296455,
0.3789050281047821,
-0.06085797771811485,
-0.2780546247959137,
-0.6315780282020569,
0.0944351926445961,
0.44823721051216125,
-0.3987606167793274,
0.251866728067398... | |
the garbage collector kicks in and cleans out the mess. The memory usage then drops to about 20mb and steadily starts increasing again during load testing.
So there's no memory 'leak' as such. | [
0.23215720057487488,
0.28196853399276733,
0.3120470345020294,
0.15668071806430817,
0.23940134048461914,
-0.0999070256948471,
0.3334766924381256,
-0.01313405204564333,
-0.2605457305908203,
-0.3759007453918457,
-0.05227623134851456,
0.45382562279701233,
0.1367439478635788,
0.1495480835437774... | |
Is it possible to add a row to a gridview at runtime? I need to add a default row(sometimes) and then add an adhoc row after the bound row based on a value in the bound row.
```
gridView.DataSource = source;
/// Create a new Default Row here
gridview.DataBind();
```
AND
```
OnDataBound(object sender, DataGridEvent... | [
0.19381698966026306,
-0.01833954080939293,
0.6143611669540405,
-0.11519169807434082,
0.13223470747470856,
-0.10363094508647919,
0.11580648273229599,
-0.17043480277061462,
-0.1149681881070137,
-0.8469953536987305,
0.027670063078403473,
0.5919851660728455,
-0.3434812128543854,
0.076747037470... | |
I have created a small game, in which some blocks are move around a main div. The mouse which also holding a div (I had assigned the position of cursor to that div).
I just want to trace out, whether the cursor div is moving over the blocks(those are also div). If it comes like that then the game will be over.
How ca... | [
0.10560286045074463,
-0.0014112754724919796,
0.45485004782676697,
-0.07977129518985748,
-0.05901908501982689,
0.0026694016996771097,
-0.22677062451839447,
-0.2958403527736664,
-0.2397739440202713,
-0.6131677031517029,
-0.038426343351602554,
0.3957788944244385,
-0.04208505526185036,
-0.0416... | |
and bottom of each div. Then two divs overlap each other if:
```
left1 < right2 && left2 < right1 && top1 < bottom2 && top2 < bottom1
``` | [
-0.48258110880851746,
-0.11766340583562851,
0.5142936110496521,
-0.2638208866119385,
0.07607994973659515,
0.08436672389507294,
-0.08146592974662781,
-0.3055943250656128,
-0.08200971782207489,
-0.6488875150680542,
-0.2833116054534912,
0.37755170464515686,
-0.052101511508226395,
0.1115288957... | |
Recently i moved to office 2007. im trying to import excel file to sql server 2000 using import and export data tool ,the tool gave data source as excel 97 - 2000 but while importing xlsx file ,im getting error "Error source Microsoft Jet databse Engine", external table is not in the expected format. Can you tell me ho... | [
-0.07282717525959015,
0.34086593985557556,
0.44165027141571045,
-0.08591241389513016,
-0.37293222546577454,
-0.05242355167865753,
-0.06492019444704056,
0.03664613142609596,
-0.42065584659576416,
-0.26865389943122864,
0.28167101740837097,
0.7537490725517273,
0.14317984879016876,
0.191086515... | |
97-2003 format. | [
0.012800398282706738,
0.10265810787677765,
0.12109169363975525,
-0.031720120459795,
-0.24588918685913086,
-0.4153209924697876,
-0.257980078458786,
0.18016201257705688,
0.24925903975963593,
-0.32206788659095764,
-0.4095917344093323,
0.5560985207557678,
0.2861577570438385,
-0.009464199654757... | |
How should i design a login protocol to be more secure the way i have it right now is
1. the client connects and sends his username
2. the server sends the salt(always same) for the user
3. the client adds the salt to the password hashes it and sends it to the server
This way the password is hidden all the time but i... | [
0.11324363946914673,
0.22599786520004272,
0.3341142535209656,
-0.1797669529914856,
-0.08599113672971725,
-0.2595613896846771,
0.2275698482990265,
-0.33840131759643555,
0.005799431819468737,
-1.023301124572754,
0.3204646110534668,
0.1615835428237915,
-0.22378411889076233,
0.2801186442375183... | |
I'm trying to find a way to replace all instances of a string token in a file with another string.
How can I do this in C++ with the win32 API?
In other languages this is an easy thing to do, but in C++ I am just lost.
EDIT: For some context, this is for a WiX custom action. So portability is not a main priority, ... | [
0.11427371948957443,
-0.06121736392378807,
0.02315867878496647,
0.06652965396642685,
-0.0009087646030820906,
-0.0675540417432785,
0.2502528131008148,
0.01843608357012272,
-0.3675258755683899,
-0.8223883509635925,
0.020941689610481262,
0.4775049686431885,
-0.3815336227416992,
0.276528716087... | |
in memory (use strstr() or similar function), then again OpenFile(), WriteFile(), CloseFile().
If the file is large - create a temporary file and read the source file in chunks and write filtered text to the temporary file, then call DeleteFile() to delete the original file and MoveFile() to move the filtered file. | [
-0.2620300352573395,
-0.04573148861527443,
0.41610807180404663,
-0.09479950368404388,
0.1319347620010376,
0.07109037041664124,
-0.28683432936668396,
0.012062571942806244,
-0.31100156903266907,
-0.6635209321975708,
-0.49167007207870483,
0.23941712081432343,
-0.1919987052679062,
0.1499726921... | |
I'm a programmer, working with different languages/Formats (Java, Python, XML, HTML, Objective-C etc.). From time to I've to work on a Mac and I'm not very comfortable with the German keyboard layout for programming.
Is there somebody with the same problem and, if so, how did you solve it?
I recently did an internship... | [
0.2628367841243744,
0.44631990790367126,
0.048719052225351334,
-0.30373966693878174,
0.003965725656598806,
0.2338382452726364,
0.32618796825408936,
0.5174827575683594,
-0.018241019919514656,
-0.7774311900138855,
0.013383973389863968,
0.588745653629303,
0.0946659967303276,
-0.13751509785652... | |
Alt+s types “ß”).
The keys used for programming are much easier reachable, especially “`[]`” and “`{}`” (which are both on “`ü`” and “`+`”). Also, “`/`” and “`\`” better placed. The only think I absolutely **hate** is the placement of the “`+`” key because it requires the shift key! | [
0.03638288751244545,
0.012569096870720387,
0.5800818204879761,
-0.25316327810287476,
-0.32055193185806274,
0.21763984858989716,
0.41740474104881287,
-0.20800761878490448,
0.10289227962493896,
-0.8698458671569824,
-0.40944623947143555,
0.4287618100643158,
-0.31475260853767395,
-0.1445785313... | |
I have a rather simple web-service which exposes data from sql server. It will be used to synchronize data between 2 different databases (SQL Server and Lotus Notes). We're in the stage of testing the web-service and poll it with 20 req./min., the first 2 minutes it goes OK, but after the second, we're getting an excep... | [
0.5599796175956726,
0.2479519098997116,
0.24980787932872772,
0.22609661519527435,
-0.035183053463697433,
-0.1968112587928772,
0.08425112813711166,
-0.0022503563668578863,
0.08734652400016785,
-0.655367910861969,
0.35544174909591675,
0.22385317087173462,
0.04549553245306015,
0.1890446543693... | |
when the object is disposed.
I've considered using global.asax to "share" the connection but after some googling I found out most people find that a bad idea and I'm looking for a different solution.
ps. the service is pooled in a synchronous way, no 2 requests exist at the same time
-edit-
(after first 2 anwsers a... | [
0.039446067065000534,
-0.053029753267765045,
0.5626000165939331,
0.17265069484710693,
0.07868294417858124,
-0.034693751484155655,
-0.03952556848526001,
-0.20981664955615997,
-0.21443158388137817,
-0.698002278804779,
0.014320259913802147,
0.3331436812877655,
-0.23604810237884521,
0.35732358... | |
{
conn.Open();
}
catch (Exception dbconn)
{
throw new SoapException("Couldn't open connection to database:" + dbconn.Message + " More info at: " + dbconn.HelpLink, errorCode); | [
-0.007433600258082151,
-0.2380746304988861,
0.17990125715732574,
-0.1830245852470398,
-0.06382014602422714,
0.05042185261845589,
0.6049456000328064,
0.0026662626769393682,
0.15687239170074463,
-0.5637106895446777,
-0.0954676941037178,
0.36549821496009827,
-0.447783887386322,
0.311222285032... | |
}
//Uncomment the following line if using designed components
//InitializeComponent();
}
~DataService()
{
conn.Close();
}
[WebMethod(Description="Gets all Person changes(from last week)")]
public Person[] GetPerson()
{
Person[] Personen = null; | [
-0.3102298676967621,
-0.425138384103775,
0.40600451827049255,
-0.27293696999549866,
0.2945553660392761,
0.12137745320796967,
0.42507773637771606,
-0.15115229785442352,
-0.09643833339214325,
-0.5821412801742554,
-0.4732600450515747,
0.5137615203857422,
-0.2698463797569275,
0.288175702095031... | |
SqlCommand sqlcmd = conn.CreateCommand();
sqlcmd.CommandText = "SELECT * FROM Person";
SqlDataReader Rows = sqlcmd.ExecuteReader();
while (Rows.Read())
{
//doSomething | [
0.048115719109773636,
-0.2329462468624115,
0.3187834322452545,
-0.21598143875598907,
0.12550203502178192,
0.22143098711967468,
0.34921878576278687,
-0.5733186602592468,
0.029064815491437912,
-0.5130499005317688,
0.05387849733233452,
0.7202211022377014,
-0.3270629644393921,
0.19833452999591... | |
}
Rows.Close();
return Personen;
}
```
}
Sounds like you've exhausted the connection pool -- best option is to wrap you SQL calls with using blocks, loosely thus:
```
using( SqlConnection con = new SqlConnection( "MyConnectionString" ) )
{
con.Open();
using( SqlCommand cmd = new... | [
-0.2627668082714081,
0.0629013404250145,
0.4997256398200989,
-0.05084048956632614,
0.16209492087364197,
-0.05848177522420883,
0.27886250615119934,
-0.06907247006893158,
-0.12272286415100098,
-0.5906301140785217,
-0.25842395424842834,
0.6432650089263916,
-0.3086334764957428,
0.2184050679206... | |
you to serve concurrently the same number of requests as the size of your connection pool.
So, the code after your edit becomes:
```
public class DataService : System.Web.Services.WebService
{
[WebMethod(Description="Gets all Person changes(from last week)")]
public Person[] GetPerson()
{
Person[... | [
-0.11916237324476242,
-0.19798871874809265,
0.480772465467453,
0.017451055347919464,
0.24785216152668,
0.02081983909010887,
0.11419090628623962,
-0.19203069806098938,
-0.5944908261299133,
-0.6466704607009888,
-0.3150206208229065,
0.43586888909339905,
-0.3130654990673065,
0.3646818995475769... | |
{
sqlcmd.CommandText = "SELECT * FROM Person";
SqlDataReader Rows = sqlcmd.ExecuteReader( CommandBehavior.CloseConnection ); // This will close the DB connection ASAP
while (Rows.Read())
{ | [
-0.16928839683532715,
-0.06825382262468338,
0.40616053342819214,
-0.35609182715415955,
0.0712772086262703,
0.2070082277059555,
0.6183669567108154,
-0.39168787002563477,
0.18702785670757294,
-0.3989269435405731,
-0.17851130664348602,
0.5658195614814758,
-0.38162603974342346,
0.4646001756191... | |
//doSomething
}
Rows.Close();
}
}
return Personen;
}
}
``` | [
-0.429146945476532,
-0.0384247750043869,
0.1282033622264862,
-0.33052968978881836,
0.0627174898982048,
0.2614918053150177,
0.5503222942352295,
-0.11041334271430969,
0.004016140941530466,
-0.7381699681282043,
-0.1692156344652176,
0.8059415817260742,
-0.0037433586549013853,
0.205988049507141... | |
In the following:
```
<select id="test">
<option value="1">Test One</option>
<option value="2">Test Two</option>
</select>
```
How can I get the text of the selected option (i.e. "Test One" or "Test Two") using JavaScript
`document.getElementsById('test').selectedValue` returns 1 or 2, what property return... | [
0.023584287613630295,
-0.33650529384613037,
0.0034947083331644535,
-0.23939312994480133,
0.13079966604709625,
0.1063230112195015,
0.14984017610549927,
-0.6884918212890625,
0.15884484350681305,
-0.727925181388855,
-0.47780337929725647,
0.6680887341499329,
-0.25436222553253174,
-0.2623082399... | |
I created a `ListBox` that has a `DataTemplate` as `Itemtemplate`. However, is there an easy way to access the generated `UIElement` instead of the `SelectedItem` in codebehind?
When I access `SelectedItem`, I just get the selected object from my
`ItemsSource` collection. Is there a way to access the `UIElement` (ie. ... | [
0.057522132992744446,
-0.1966618448495865,
0.3484210968017578,
0.10601981729269028,
0.01559448428452015,
0.0012215255992487073,
-0.05245593190193176,
-0.12987086176872253,
-0.2924800515174866,
-0.6697487235069275,
-0.15852707624435425,
0.3103834390640259,
-0.0891183614730835,
0.14433589577... | |
Check out [Logical Tree Helper](http://msdn.microsoft.com/en-us/library/system.windows.logicaltreehelper.aspx) and [Visual Tree Helper](http://msdn.microsoft.com/en-us/library/system.windows.media.visualtreehelper.aspx).
Like Andy said in the comments, just because the item exists in your collection doesn't mean a con... | [
0.002815161133185029,
-0.17769138514995575,
-0.0055432808585464954,
0.44447818398475647,
0.08785596489906311,
-0.3518093526363373,
-0.07159285247325897,
0.011827304027974606,
-0.37575939297676086,
-0.7090736627578735,
-0.36858272552490234,
0.3333008587360382,
-0.2749060392379761,
-0.077794... | |
I have recently joined a project that is using multiple different projects. A lot of these projects are depending on each other, using JAR files of the other project included in a library, so anytime you change one project, you have to then know which other projest use it and update them too. I would like to make this ... | [
0.6000773906707764,
0.09542473405599594,
-0.374312162399292,
-0.08600201457738876,
-0.11302133649587631,
-0.25739428400993347,
0.1886873096227646,
-0.0716380774974823,
-0.3133629262447357,
-0.7379715442657471,
0.2548580467700958,
0.3367839753627777,
-0.2912868559360504,
0.22997690737247467... | |
part of it but have been sassked if this is possible.
Is there a better way to handle this?
### Approach 1: Using Hudson
If you use a continuous integration server like [Hudson](http://hudson-ci.org/), then you can configure upstream/downstream projects (see [Terminology](http://wiki.hudson-ci.org/display/HUDSON/Term... | [
0.03153404965996742,
-0.3764847218990326,
0.11424817144870758,
-0.09148242324590683,
0.2371147871017456,
-0.0041062491945922375,
-0.05755872651934624,
-0.23913651704788208,
-0.10774005949497223,
-0.3801835775375366,
0.026669098064303398,
0.5372520089149475,
-0.4333404004573822,
-0.11715590... | |
project, at least you would get early warning if it broke other builds.
### Approach 2: Using Maven
If the projects are not too complex, then perhaps you could create a main project, and make these sub-projects child modules of this project. However, mangling a project into a form that Maven likes can be quite tricky... | [
0.26656097173690796,
-0.3736491799354553,
-0.08162447810173035,
0.2728675305843353,
-0.2754141688346863,
0.02693880908191204,
0.3128640055656433,
-0.25697755813598633,
-0.16715918481349945,
-0.5379112362861633,
-0.12663082778453827,
0.8228585720062256,
0.08414144068956375,
-0.1839523762464... | |
I'm looking for a good JavaScript equivalent of the C/PHP `printf()` or for C#/Java programmers, `String.Format()` (`IFormatProvider` for .NET).
My basic requirement is a thousand separator format for numbers for now, but something that handles lots of combinations (including dates) would be good.
I realize Microsoft... | [
0.23787198960781097,
0.1500818431377411,
0.3263941705226898,
0.01693088747560978,
-0.07305676490068436,
-0.1794380396604538,
0.13806681334972382,
-0.18909350037574768,
-0.26098695397377014,
-0.7319461703300476,
0.013225582428276539,
0.4124901592731476,
0.04768291860818863,
0.03453946858644... | |
your own, don’t do the replacements successively but do them simultaneously.
Because most of the other proposals that are mentioned fail when a replace string of previous replacement does also contain a format sequence like this:
```
"{0}{1}".format("{1}", "{0}")
```
Normally you would expect the output to be `{1}{... | [
0.37639129161834717,
0.10778675228357315,
0.09846576303243637,
0.037791695445775986,
0.06898607313632965,
-0.13715265691280365,
0.35506176948547363,
-0.5139850378036499,
-0.3295022249221802,
-0.6462733745574951,
-0.011174754239618778,
0.6033470034599304,
-0.15425114333629608,
-0.1525104343... | |
VB has a function InputBox() that will prompt the user to enter a single value, then click OK.
Is there a parallel functionality in ASP.NET, that will get the browser to pop up some kind of input box to return a single value?
If not, how do you recommend I achieve this effect?
You can do this in JavaScript
```
var r... | [
0.6037397980690002,
-0.16793279349803925,
0.5517884492874146,
-0.27631664276123047,
-0.24656200408935547,
0.0031641745008528233,
0.38752707839012146,
-0.4101063311100006,
-0.052972014993429184,
-0.5936112403869629,
0.008979279547929764,
0.649425208568573,
-0.43175172805786133,
0.0284615904... | |
I there a method to allow me to use an array as an object?
I have the following code in my main class
```
function __construct()
{
require 'config.php';
$this->config = new PHPSO_Config();
}
```
where the PHPSO\_Config class looks something like this
```
class PHPSO_Config
{
/**
* The adm... | [
0.06131688505411148,
0.24247494339942932,
0.49837493896484375,
-0.19230172038078308,
-0.18409672379493713,
-0.07625115662813187,
0.23726321756839752,
-0.2584128677845001,
-0.17147177457809448,
-0.576816976070404,
0.17872993648052216,
0.34863579273223877,
-0.4471472203731537,
0.168152809143... | |
without creating a second class?
You can cast an array to an object using
```
$myObject = (object) $myarray;
```
thus the following should work (untested):
```
function __construct()
{
require 'config.php';
$this->config = (object) array("username" => "root");
}
```
then $class->config->username... | [
0.1417922079563141,
-0.12051292508840561,
0.15224620699882507,
-0.09460853040218353,
-0.12921035289764404,
-0.003925288561731577,
0.3454180955886841,
-0.430144727230072,
-0.01592964306473732,
-0.4296305477619171,
-0.10878973454236984,
0.5587557554244995,
-0.34458261728286743,
-0.0539031438... | |
I am trying to create a personal home page for myself to learn more about web design (JavaScript, using Photo Shop, etc). I plan on having a graphical menu on the left, a banner across the top and also a "Photos" section where I can display photos of various pictures I have taken.
However, when I look at other sites t... | [
0.8531672358512878,
0.20649151504039764,
0.15209664404392242,
0.009236243553459644,
-0.27027320861816406,
-0.07123423367738724,
-0.10931087285280228,
0.3352186381816864,
-0.2901334762573242,
-0.6898753046989441,
0.19515611231327057,
0.1188388466835022,
0.005042127333581448,
0.0905450880527... | |
Should I make everything PNGs?
---
**Exact Duplicate:**
* [PNG vs. GIF vs. JPEG vs. SVG - When best to use?](https://stackoverflow.com/q/2336522/199700)
* [Website Image Formats: Choosing the right format for the right task.](https://stackoverflow.com/questions/392635/website-image-formats-choosing-the-right-format-... | [
0.4423665702342987,
-0.28202539682388306,
0.3872956335544586,
0.25091975927352905,
0.03685764595866203,
-0.03314586356282234,
0.14768728613853455,
-0.2517894506454468,
-0.11490524560213089,
-0.4872402548789978,
-0.30004554986953735,
0.537236213684082,
0.0063631292432546616,
-0.211273312568... | |
the contrary, PNG outperforms GIF in most aspects. PNG is capable of every image mode of GIF apart from animation, and when using the same image mode, PNG will have better compression due to its superior DEFLATE algorithm compared to LZW. PNG is also capable of additional modes that GIF cannot do, such as 24 bit color,... | [
-0.07333677262067795,
-0.14853057265281677,
0.3913099765777588,
-0.02033853530883789,
-0.5048508644104004,
0.3429141044616699,
-0.0354381762444973,
-0.17138861119747162,
-0.15413042902946472,
-0.8395130634307861,
-0.21758104860782623,
0.4805775582790375,
-0.1960415095090866,
-0.36758774518... | |
Palette colour of 2 to 256 colors (like GIF)
* Palette colour of 2 to 256 colors, with transparent color (like GIF)
* True color (24 bit color)
* True color with alpha channel (24 bit color + 8 bit alpha transparency)
For best compression in PNG for the web, use a palette mode. If you find PNG files are larger than th... | [
-0.09893973916769028,
-0.2815282940864563,
0.4055461585521698,
0.06156228855252266,
-0.4189441204071045,
0.32361695170402527,
0.008600099943578243,
-0.38522955775260925,
-0.2949317991733551,
-0.7108321785926819,
-0.4273184835910797,
0.616990327835083,
-0.24329103529453278,
-0.3221800625324... | |
alpha transparency. Modes such as this cannot be created in Photoshop, but other applications can create them.
*Edit 2013: Removed a bunch of stuff about IE6 compatibility.* | [
0.2527603507041931,
-0.05504180118441582,
0.10950423032045364,
-0.08520811051130295,
-0.4685569107532501,
-0.3615846335887909,
0.52067631483078,
-0.2472676783800125,
-0.05541139468550682,
-0.2616751492023468,
-0.17240580916404724,
0.33219751715660095,
-0.8680395483970642,
-0.12740242481231... | |
I have a date value, which I'm told is 8 bytes, a single "long" (aka int64) value, and converted to hex:
```
60f347d15798c901
```
How can I convert this and values like this, using PHP, into a time/date?
Converting it to decimal gives me:
96 243 71 209 87 152 201 1
A little more info: the original value is a C# D... | [
0.28313082456588745,
0.25356632471084595,
0.7477464079856873,
0.052589017897844315,
0.24505561590194702,
0.09483343362808228,
0.05649116635322571,
0.1290893703699112,
-0.26471999287605286,
-0.2540486752986908,
0.04169289022684097,
-0.026126865297555923,
0.33034560084342957,
0.3901956379413... | |
quadword
01c99857d147f360
which as an integer is
128801567297500000
This is "the number of 100-nanosecond intervals
that have elapsed since 12:00 midnight, January 1,
1601 A.D. (C.E.) Coordinated Universal Time (UTC)"
After conversion, it gives
Thu, 26 February 2009 21:18:49 UTC
Sample code:
```
<?php
// strip... | [
0.1223558634519577,
-0.3374139368534088,
0.9197525978088379,
-0.040123872458934784,
0.0033628034871071577,
0.18900100886821747,
0.5299996733665466,
0.002057095291092992,
-0.2005949467420578,
-0.38185083866119385,
-0.17352083325386047,
0.3104076683521271,
-0.1952320635318756,
0.189848154783... | |
'8'=>'8', '9'=>'9',
'a'=>'a', 'b'=>'b', 'c'=>'c', 'd'=>'d', 'e'=>'e', 'f'=>'f',
'A'=>'a', 'B'=>'b', 'C'=>'c', 'D'=>'d', 'E'=>'e', 'F'=>'f'
);
$t = '';
$len = strlen($str);
for ($i=0; $i<$len; ++$i) { | [
-0.10535529255867004,
-0.07451608777046204,
0.3787825405597687,
-0.24209338426589966,
-0.012281483970582485,
0.7034212350845337,
0.5624484419822693,
-0.34773698449134827,
-0.20498153567314148,
-0.17402181029319763,
-0.7613091468811035,
0.41823282837867737,
-0.4012099504470825,
0.1483263522... | |
$ch = $str[$i];
if (isset($hex[$ch]))
$t .= $hex[$ch];
}
return $t;
}
// swap little-endian to big-endian
function flip_endian($str) {
// make sure #digits is even
if ( | [
-0.33708104491233826,
0.011246767826378345,
0.338438481092453,
-0.3406326174736023,
0.2402917891740799,
0.21224698424339294,
-0.11223306506872177,
-0.1527767926454544,
-0.29016757011413574,
0.041136905550956726,
-0.32069042325019836,
0.42700016498565674,
-0.28867217898368835,
-0.0635391771... | |
strlen($str) & 1 )
$str = '0' . $str;
$t = '';
for ($i = strlen($str)-2; $i >= 0; $i-=2)
$t .= substr($str, $i, 2);
return $t;
}
// convert hex string to BC-int
function hex_to_bcint($str) {
$hex = array( | [
0.1644875556230545,
-0.17408610880374908,
0.34118595719337463,
-0.504128098487854,
-0.019640261307358742,
0.3643937110900879,
0.3527619540691376,
-0.6476528644561768,
-0.030233625322580338,
-0.0854397863149643,
-0.21265648305416107,
0.4246594309806824,
-0.7093389630317688,
0.24314835667610... | |
'0'=>'0', '1'=>'1', '2'=>'2', '3'=>'3', '4'=>'4',
'5'=>'5', '6'=>'6', '7'=>'7', '8'=>'8', '9'=>'9',
'a'=>'10', 'b'=>'11', 'c'=>'12', 'd'=>'13', 'e'=>'14', 'f'=>'15',
'A'=>'10', 'B'=>'11', 'C'=>'12', 'D'=>'13', 'E'=>'14', 'F'=>'15'
); | [
0.08066624402999878,
0.1002187505364418,
0.2870958149433136,
-0.09898918867111206,
0.05800819769501686,
1.0415377616882324,
0.6228596568107605,
-0.411708801984787,
0.07701139897108078,
-0.31839123368263245,
-0.7628568410873413,
0.2817719578742981,
-0.0739128366112709,
0.3337770104408264,
... | |
$bci = '0';
$len = strlen($str);
for ($i=0; $i<$len; ++$i) {
$bci = bcmul($bci, '16');
$ch = $str[$i];
if (isset($hex[$ch]))
$bci = bcadd($bci, $hex[$ch]);
} | [
-0.005174648016691208,
0.09605950117111206,
0.1872243732213974,
-0.30150893330574036,
-0.08168977499008179,
0.4846535623073578,
0.14298087358474731,
-0.32351240515708923,
-0.1402362585067749,
-0.05523698031902313,
-0.4712311625480652,
0.07803662121295929,
-0.5682888031005859,
0.17823930084... | |
return $bci;
}
// WARNING! range clipping
// Windows date time has range from 29000 BC to 29000 AD
// Unix time only has range from 1901 AD to 2038 AD
// WARNING! loss of accuracy
// Windows date time has accuracy to 0.0000001s
// Unix time only has accuracy to 1.0s
function win... | [
0.20944204926490784,
0.2515445351600647,
0.3412662446498871,
-0.2598850727081299,
0.3522314131259918,
0.022555476054549217,
0.21958783268928528,
0.0029458431527018547,
-0.10277031362056732,
-0.22686278820037842,
-0.058054547756910324,
0.4524131715297699,
-0.25400683283805847,
0.36946666240... | |
// Unix epoch as a Windows file date-time value
$magicnum = '116444735995904000';
$t = bcsub($bci, $magicnum); // Cast to Unix epoch
$t = bcdiv($t, '10000000', 0); // Convert from ticks to seconds
return $t;
}
// get input
$dtval = isset($_GET["dt"]) ? strval($_GET["dt"]) : "0... | [
0.1432894915342331,
-0.2802984416484833,
0.36369413137435913,
-0.2380443960428238,
-0.08748562633991241,
0.6038491129875183,
-0.03467776998877525,
0.035504333674907684,
-0.11682295054197311,
-0.6341608166694641,
-0.11914905905723572,
0.45497241616249084,
-0.12721166014671326,
0.22884391248... | |
// clip overlength string
$dtval = str_pad($dtval, 16, '0'); // pad underlength string
$quad = flip_endian($dtval);
// convert to int
$win64_datetime = hex_to_bcint($quad);
// convert to Unix timestamp value
$unix_datetime = win64_to_unix($win64_datetime);
?><html>
<head>
<meta http-equiv="Content-Type" content="te... | [
0.10469405353069305,
-0.014987544156610966,
0.7789621949195862,
-0.14408674836158752,
-0.24101556837558746,
0.1546025276184082,
-0.21105679869651794,
-0.5241329669952393,
-0.15543735027313232,
-0.5184052586555481,
-0.19138182699680328,
0.6090137958526611,
-0.18804118037223816,
-0.059163201... | |
Int: <?php echo $win64_datetime; ?><br />
Unix timestamp: <?php echo $unix_datetime; ?><br />
Date: <?php echo date("D, d F Y H:i:s e", $unix_datetime); ?><br />
<body>
</body>
</html>
``` | [
0.05853863060474396,
-0.09067053347826004,
0.2610360085964203,
-0.36661529541015625,
-0.11151960492134094,
-0.005197769496589899,
0.10067947208881378,
-0.40831393003463745,
-0.15545395016670227,
-0.2353363335132599,
-0.3332394063472748,
0.046371590346097946,
-0.2860499918460846,
0.13484868... | |
I am using jQuery to call web service (\*.asmx) methods. The web service uses FormsAuthentication to determine whether the calling user is authenticated. I am unable to return a redirect status code from the web method, e.g.
```
[WebMethod(EnableSession=true)]
public Dictionary<string, object> GetArchivedFiles(int pag... | [
0.11235097795724869,
0.15464863181114197,
0.6404265761375427,
-0.07616408169269562,
0.13243483006954193,
-0.25848186016082764,
0.6383547782897949,
-0.314505010843277,
-0.043845921754837036,
-0.7375317811965942,
-0.2831302881240845,
0.5339572429656982,
-0.0874481052160263,
0.286896020174026... | |
redirect does not work, I always get 500 Internal Server Error when doing this. I tried different codes. What would be the recommended way to go here? I need to read the redirect information from JavaScript and load the new page (or maybe display a login control AJAX way).
I actually get a JSON object back, which look... | [
-0.2661568224430084,
0.004324502777308226,
0.6255565881729126,
-0.009974784217774868,
-0.29073816537857056,
0.031088007614016533,
0.6119746565818787,
-0.2590668499469757,
-0.2681332528591156,
-0.6327106952667236,
0.05808586627244949,
0.5788487195968628,
-0.35116544365882874,
0.123115122318... | |
ASP.NET Development Server/9.0.0.0
Date: Wed, 04 Mar 2009 14:46:02 GMT
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Content-Length: 1739
Connection: Close
System.NotSupportedException: The type System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.0... | [
-0.3241797983646393,
-0.3789980113506317,
0.6543794274330139,
0.16088035702705383,
-0.23263108730316162,
0.2750004827976227,
0.3528618812561035,
-0.3234114646911621,
-0.4181389808654785,
-0.5836114287376404,
-0.3628888726234436,
0.23066620528697968,
-0.17877374589443207,
0.06219482421875,
... | |
at System.Web.Services.Protocols.HttpServerType..ctor(Type type)
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.ServerProtoco... | [
-0.008395416662096977,
-0.0478496253490448,
0.6774049997329712,
-0.09613724797964096,
0.06047991290688515,
-0.04307447373867035,
0.3756455183029175,
-0.15480922162532806,
-0.19607846438884735,
-0.8338009119033813,
-0.3135237693786621,
0.2085409015417099,
-0.4171251654624939,
0.280773162841... | |
I see reference of ant a lot but I don't get exactly what its meant to do? from what i've heard its supposed to compile your projects but can't i just do that by clicking Run->Run in eclipse?
Edit : I guess I should rephrase my question. I already know that ant is a 'build automation software', my question is, what ex... | [
0.8647202253341675,
0.17243428528308868,
-0.017629332840442657,
0.01182380598038435,
-0.32793906331062317,
0.09629731625318527,
0.20722657442092896,
-0.008425602689385414,
-0.21037226915359497,
-0.45658963918685913,
0.40954694151878357,
0.38850826025009155,
-0.3297386169433594,
-0.07362014... | |
do you need to 'automate' this process?
> *I already know that ant is a 'build automation software', my question is, what exactly is build automation? I thought that you're supposed to test your app, and when it is running you click the 'build' button in eclipse or through command-line java, and it makes a .jar file ou... | [
0.3925769031047821,
0.4135403037071228,
-0.11920887231826782,
-0.2514994740486145,
-0.21476101875305176,
0.29753056168556213,
0.5001855492591858,
-0.13883036375045776,
-0.38385096192359924,
-0.48082610964775085,
0.19176125526428223,
0.667561948299408,
-0.32451313734054565,
-0.1882939338684... | |
may need additionally run test cases, unit tests, and many, many other process.
What ant does, is provide a mechanism to automate all this work ( so you don't have to do it every time ) and perhaps you may invoke this ant script each day at 6 p.m.
For instance, in some projects, a daily build is needed, the following... | [
0.6204742193222046,
0.21118485927581787,
0.046763598918914795,
0.0771295502781868,
0.10200325399637222,
0.01339635532349348,
0.3676183819770813,
-0.1768622249364853,
-0.18965761363506317,
-0.8764974474906921,
0.01795867271721363,
0.4897254705429077,
-0.06957445293664932,
-0.138967335224151... | |
or whatever )
* Commit this build binaries to subversion.
* Install the application in a remote server
* Restart the server
* Send an email with the summary of the job.
Of course for other projects this is overkill, but for some others is very helpful. | [
0.6360912919044495,
0.1563250571489334,
0.05253325402736664,
0.023651622235774994,
-0.14873497188091278,
-0.2988109886646271,
0.5613975524902344,
0.36993950605392456,
-0.022703872993588448,
-0.639278769493103,
-0.35005661845207214,
0.4507949650287628,
-0.2229810506105423,
0.070159845054149... | |
Is it possible to delete the folder from repository the way it wont be removed from each user's local repository?
In my case there is a directory named 'config' that was intended to be version-controlled. Now we decided to remove that directory from version-control but leave it on each person computer (and add it to s... | [
0.2821458876132965,
0.25777384638786316,
0.339354932308197,
-0.006091468036174774,
0.19512023031711578,
-0.3057485818862915,
0.2500932514667511,
0.3114486634731293,
-0.3731645345687866,
-0.3294944763183594,
-0.16409948468208313,
0.4942958950996399,
-0.35168230533599854,
0.47732609510421753... | |
ignore a version controlled file.
If it's *really* important and you use TortoiseSVN, then you could perform the operation in 2 phases - create a client-side pre-update hook to export the directory (or files), then in post-update (after svn:ignore has been added to working copy) copy the directory or files back again.... | [
0.15587322413921356,
-0.29878318309783936,
0.506703794002533,
-0.08772312104701996,
0.0917009487748146,
-0.20433875918388367,
0.4830129146575928,
0.03403792530298233,
-0.5742430090904236,
0.06316247582435608,
-0.2857634723186493,
0.7680635452270508,
-0.622859537601471,
0.048239074647426605... | |
I currently use 3 different regular expressions in one preg\_match, using the or sign | to separate them. This works perfectly. However the first and second regex have the same type of output. e.g. [0] Source Text [1] Number Amount [2] Name - however the last one since it uses a different arrangement of source text res... | [
-0.019740713760256767,
0.37915635108947754,
0.6269104480743408,
-0.047794852405786514,
-0.1432788223028183,
0.5987473726272583,
-0.06516221910715103,
-0.33883804082870483,
-0.056592218577861786,
-0.6635431051254272,
0.008205336518585682,
0.6052550077438354,
-0.03673712536692619,
0.45490649... | |
a way I can either switch the order in the regex or identify which regex it matched too. Speed is of the essence here so I didn't want to use 3 separate preg\_match statements (and more to come).
Three separate regular expressions don't have to be slower. One big statement will mean a lot of backtracing for the regular... | [
0.030155792832374573,
-0.2445426732301712,
0.09730572998523712,
0.24987824261188507,
-0.20955577492713928,
-0.012989942915737629,
0.2791435420513153,
-0.24191997945308685,
-0.12073802947998047,
-0.4325624406337738,
-0.05226673558354378,
0.8595592975616455,
-0.3543957471847534,
-0.489757388... | |
`\1`. I'm not 100% certain this works for `preg_replace`. I know `preg_match` correctly stores named captures for certain, though.
PCRE needs to be compiled with the `PCRE_DUPNAMES` option for that to be useful in your case (as in RoBorg's) post. I'm not sure if PHP's compiled PCRE DLL file has that option set. | [
-0.007155336439609528,
-0.23190945386886597,
0.06649257987737656,
0.01477174274623394,
-0.019576186314225197,
-0.22694049775600433,
0.06498183310031891,
0.12006524950265884,
-0.16054527461528778,
-0.5565237402915955,
0.0947314128279686,
0.5212901830673218,
-0.31864088773727417,
-0.04500101... | |
I'm just getting into Dojo and wanted to try a simple AJAX Post like the [examples](http://dojotoolkit.org/book/dojo-book-0-9/hello-world-tutorial) on
Dojo's website.
Here is the HTML/JS:
```
<form method="POST" id="addProjectForm">
<dl>
<dt>Project Name:</dt>
<dd><input dojoType="dijit.form.TextBox" id=... | [
0.21002088487148285,
-0.26609405875205994,
0.449137806892395,
-0.1465594321489334,
-0.45241329073905945,
-0.2120576649904251,
0.20409373939037323,
-0.17580266296863556,
0.262793630361557,
-0.668952465057373,
-0.18482714891433716,
0.14858147501945496,
0.12581539154052734,
-0.235811814665794... | |
load: function(data, ioArgs) {
alert(data);
},
error: function(data, ioArgs) {
alert('There was an error');
},
form: 'addProjectForm' | [
-0.010781104676425457,
-0.38683637976646423,
0.4037014842033386,
-0.2921866476535797,
-0.09385515749454498,
0.22859644889831543,
0.06152139976620674,
-0.21607975661754608,
-0.13524936139583588,
-0.3844700753688812,
-0.2053465098142624,
0.6934211850166321,
-0.5827479362487793,
-0.1039883345... | |
});
</script>
</button>
</form>
```
and on the backend I have the following:
```
class ProjectsController extends Zend_Controller_Action
{
public function addAction()
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
$projectName = $this->_request->getPar... | [
0.21117913722991943,
-0.17185479402542114,
0.5313208103179932,
-0.10260458290576935,
0.10815567523241043,
-0.19221574068069458,
0.40390315651893616,
-0.3630596101284027,
-0.18815939128398895,
-0.6939665675163269,
-0.19211073219776154,
0.5940132737159729,
-0.43385979533195496,
0.07192460447... | |
IDs. | [
0.6349205374717712,
-0.00862488429993391,
0.09465723484754562,
0.3383204936981201,
0.14043444395065308,
-0.27013376355171204,
-0.2558594346046448,
-0.03423571586608887,
-0.05577319487929344,
-0.44121748208999634,
0.0073952265083789825,
0.32961323857307434,
0.02708655409514904,
-0.119743674... | |
Is anyone familiar with a technique for removal of whitespace that results from the use of tag libraries such as JSTL? I know that you can do this [in Tomcat via a `trimSpaces` initialization parameter](http://forums.sun.com/thread.jspa?threadID=556549), but does anyone have similar experience doing this type of thing ... | [
0.3610439598560333,
0.1196802407503128,
0.053402405232191086,
-0.020446406677365303,
-0.00137498474214226,
-0.41339805722236633,
0.23812246322631836,
0.06639519333839417,
-0.4327244758605957,
-0.6089128255844116,
0.17109662294387817,
0.39219605922698975,
-0.3127337694168091,
0.093396037817... | |
We have an ASP.NET project (40 or so Web forms, 50 tables, pretty standard IO stuff with care taken to minimize when possible) that will soon need to be deployed. There will be about 100 concurrent users on the system, but only about 20 at any one time will be pounding on it it. We'll be deploying it on Windows Server ... | [
0.07807505875825882,
0.11303481459617615,
0.5594131946563721,
0.13624899089336395,
0.006618152372539043,
-0.11161495745182037,
0.17987892031669617,
-0.04695749655365944,
-0.5508643984794617,
-0.5727574825286865,
-0.12377368658781052,
0.4439429044723511,
-0.018456052988767624,
-0.2502667307... | |
Windows Server 64-bit help with memory utilization?
32-bit Windows Server can only address ~3gb of memory. Get 64-bit, 2 cores and 4gb. Or if money isn't an issue, get 8 cores and 24gb. The point is to never guess. If you guess you will be wrong. Monitor the memory pressure and cpu load, and buy more/upgrade as necessa... | [
-0.18553806841373444,
0.1463068127632141,
0.4904850721359253,
0.3806188404560089,
-0.09005569666624069,
0.15991076827049255,
0.2571151554584503,
0.12618757784366608,
-0.27303534746170044,
-0.762779951095581,
-0.08378139138221741,
0.5163519382476807,
-0.20503215491771698,
-0.159640744328498... | |
I have an old project that I'm resurrecting as it were, and it makes heavy use of a Javascript/moo tools event controller that I wrote, and also a few Javascript OOP components that I wrote. It's very heavily pattern and OOP based. Also the components are well decoupled.
Does jQuery have any features like these? And i... | [
0.06704716384410858,
-0.1841302067041397,
-0.15188191831111908,
0.3032698929309845,
0.08296612650156021,
-0.17757408320903778,
0.1579436957836151,
-0.01816530153155327,
-0.26151859760284424,
-0.6407043933868408,
-0.06976794451475143,
0.6907235980033875,
-0.25009459257125854,
-0.00232697953... | |
the jQuery prototype with your MooTools class. In other words, structure and organize your code with MooTools, manipulate the DOM with jQuery. | [
-0.059087470173835754,
-0.4231615662574768,
0.14582599699497223,
0.40546759963035583,
-0.0005557017866522074,
-0.14903037250041962,
0.09083147346973419,
-0.06364046782255173,
0.09910063445568085,
-0.5730826258659363,
-0.07230397313833237,
0.8515007495880127,
0.04294481873512268,
0.04569436... | |
I am trying to install subversion on a centos VPS.
I managed to install subversion and mod\_dav\_svn and now I am trying to configure them.
I edited httpd.conf and added the lines:
```
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
```
But this crashes apache o... | [
-0.08731654286384583,
-0.04867742210626602,
0.6604890823364258,
-0.18623659014701843,
-0.2888413667678833,
0.10515928268432617,
0.6513968706130981,
-0.10635992884635925,
-0.2892528772354126,
-0.5719417333602905,
-0.20213645696640015,
0.3916616141796112,
-0.5359939932823181,
0.2905530631542... | |
problem was with Berkeley DB package,
The solution i found is explained here:
[FIX UNDEFINED SYMBOL: DB\_CREATE ISSUE WITH MOD SVN DAV AND APACHE 2](http://www.orangecoat.com/how-to/fix-undefined-symbol-dbcreate-issue-with-mod-svn-dav-and-apache-2) | [
-0.10690508037805557,
-0.03088238090276718,
0.27423885464668274,
-0.3118867576122284,
-0.20379598438739777,
0.008545157499611378,
0.08741780370473862,
-0.07287200540304184,
-0.05567203462123871,
-0.30789220333099365,
0.06362879276275635,
0.5845807194709778,
-0.421373575925827,
-0.283967226... | |
I am working with django and having a hard time grasping how to do complex queries
Here is my model
```
class TankJournal(models.Model):
user = models.ForeignKey(User)
tank = models.ForeignKey(TankProfile)
ts = models.DateTimeField(auto_now=True)
title = models.CharField(max_length=50)
body = mode... | [
0.1485772281885147,
-0.026241125538945198,
0.5105916261672974,
-0.3217468857765198,
0.008019152097404003,
0.02690182626247406,
0.11017472296953201,
-0.14599491655826569,
-0.1302010416984558,
-0.7274924516677856,
0.0282606091350317,
0.5658779144287109,
-0.20849883556365967,
0.18750186264514... | |
pull out just the id.. and pull out everything in tankjournal and match it to the tank object
If you already have your *tank* object you should be able to do:
```
tank.user.username
```
To reduce the database queries you might want to consider the use of [select\_related()](http://docs.djangoproject.com/en/dev/ref/m... | [
0.13818487524986267,
0.016016758978366852,
0.1018817126750946,
0.10579150915145874,
-0.03423584997653961,
0.15977917611598969,
-0.274036169052124,
-0.3871457874774933,
-0.417876660823822,
-0.632338285446167,
-0.3041556775569916,
0.5683134198188782,
-0.44925376772880554,
0.15747378766536713... | |
I'm developing a procedurally-generated game world in Python. The structure of the world will be similar to the MUD/MUSH paradigm of rooms and exits arranged as a directed graph (rooms are nodes, exits are edges). (Note that this is *not* necessarily an acyclic graph, though I'm willing to consider acyclic solutions.) ... | [
0.02435179613530636,
-0.005550728645175695,
0.3739592432975769,
0.25058093667030334,
0.12641049921512604,
0.14600348472595215,
0.06895531713962555,
-0.08914662152528763,
-0.045728374272584915,
-0.6351048946380615,
-0.16020289063453674,
-0.006997402757406235,
-0.4106718897819519,
0.34956979... | |
system of template objects and factory methods--I don't think the details are important here, as the current implementation will probably change to match the chosen strategy. (For instance, it would be possible to add tags and tag-queries to the room template system.)
For an example, I will have rooms of these sorts: ... | [
0.6010257005691528,
0.3237304985523224,
0.3298376202583313,
0.2602171301841736,
0.22750459611415863,
0.08103672415018082,
0.12170203775167465,
-0.3191201984882355,
-0.46601128578186035,
-0.8571636080741882,
-0.17859862744808197,
-0.18980050086975098,
-0.5624864101409912,
0.2900865972042084... | |
`side_street`; `hotel` favors `main_street` or `plaza` connections, and receives further tags accordingly; etc.
Bonus points if a suggested strategy would enable a data-driven implementation.
First, you need some sense of Location. Your various objects occupy some amount of coordinate space.
You have to decide how re... | [
0.1366175264120102,
-0.18734444677829742,
0.2661938965320587,
0.4745051860809326,
0.07172974944114685,
0.012052377685904503,
0.03502817451953888,
0.03644387796521187,
-0.3844147324562073,
-0.9047479033470154,
-0.36164894700050354,
0.17168571054935455,
-0.09683585911989212,
0.18827992677688... | |
work with simple rectangles, then each location can have a (left, top, right, bottom) tuple.
Your Map will need methods to determine who is residing in a given space, and what's adjacent to the space, etc.
You can then unit test this with a fixed set of locations you've worked out that can all be dropped into the ma... | [
0.11479180306196213,
-0.29330065846443176,
0.23721401393413544,
0.511742889881134,
-0.002546269679442048,
-0.010433615185320377,
0.12960736453533173,
-0.30721551179885864,
-0.44664469361305237,
-0.7410070896148682,
-0.2470587193965912,
0.19216741621494293,
-0.27795445919036865,
0.174916654... | |
will be the center of the maze. Not necessarily the physical center of your space, but the root node will be the middle of the maze structure.
Ideally, one branch from this node contains one "entrance" to the entire space.
The other branch from this node contains one "exit" from the entire space.
Someone can wande... | [
0.0028574462048709393,
-0.23732495307922363,
0.5440714955329895,
0.4611123204231262,
0.34387391805648804,
0.06913363933563232,
0.2032063603401184,
0.2395336776971817,
-0.31845414638519287,
-0.8652348518371582,
-0.25908732414245605,
-0.44837191700935364,
-0.29836997389793396,
0.440498173236... | |
- *n* entrances. It's this multiple-entrance business that makes a tree a natural fit for this structure. Also a proper tree is always well-connected in that you never have isolated sections that can't be reached.
You'll -- recursively -- fan out from the root node, picking locations and dropping them into the availab... | [
0.40834367275238037,
-0.04616298899054527,
0.06331199407577515,
0.27800798416137695,
0.05296851694583893,
0.15623077750205994,
0.4103074371814728,
-0.21889004111289978,
-0.42716196179389954,
-0.4824584126472473,
-0.015773266553878784,
-0.26811909675598145,
-0.0043447366915643215,
0.1386927... | |
see which kind of location gets identified.
---
Your definition of space can be 2D or 3D -- both are pretty rational. For bonus credit, consider how you'd implement a 2D-space tiled with hexagons instead of squares.
This "geometry" can be a **Strategy** plug-in to the various algorithms. If you can replace square 2D... | [
0.05879243090748787,
0.021740343421697617,
0.029925402253866196,
0.4796399176120758,
-0.013273803517222404,
0.07880403846502304,
-0.16574420034885406,
-0.014367240481078625,
-0.11181055754423141,
-0.7682486176490784,
-0.20329202711582184,
0.20364826917648315,
-0.08128292858600616,
0.042690... | |
I've a WCF client communicating with an unknown server implementation which I have no control over. This client works fine it just doesn't like, what appears to be, incorrectly formed SOAP Fault messages. The messages I receive look like:
```
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
... | [
0.3668147623538971,
0.11127825826406479,
0.3133925497531891,
-0.23532165586948395,
-0.5461299419403076,
-0.21777324378490448,
0.4005415439605713,
-0.41925907135009766,
0.1476665437221527,
-0.7636250853538513,
0.18588405847549438,
0.31813517212867737,
-0.3844113349914551,
0.2939788699150085... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.