text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
workaround for this problem:
* Set the Command type to "Text"
* Specify the procedure name *and* parameters:
EXEC procname @param1, @param2, @param3
"EXEC" *and* specifying the parameters are both requirements for it to work. The parameters can be named anything as long as they are prefixed with the "@" symbol. All... | [
0.11549109220504761,
-0.03537750989198685,
0.4900273382663727,
-0.10320428758859634,
0.1104883924126625,
0.018659790977835655,
0.3332071006298065,
-0.4897802472114563,
-0.2955508232116699,
-0.3806721866130829,
-0.3698243796825409,
0.8738940358161926,
-0.12811703979969025,
-0.27641540765762... | |
be specified for the proc to run and return a result set. | [
0.15593306720256805,
-0.03380337730050087,
0.14874984323978424,
-0.0822676569223404,
0.12909983098506927,
-0.1640917956829071,
-0.12210112065076828,
-0.19323381781578064,
0.10542373359203339,
-0.3069836497306824,
-0.5013307929039001,
0.35312575101852417,
-0.2191791832447052,
-0.31616058945... | |
When trying to use a custom JSP tag library, I have a variable defined in JSP that I would like to be evaluated before being passed to the tag library. However, I cannot seem to get it to work. Here's a simplified version of my JSP:
```
<% int index = 8; %>
<foo:myTag myAttribute="something_<%= index %>"/>
```
The ... | [
0.07402236014604568,
0.019927576184272766,
0.48911887407302856,
-0.30993524193763733,
-0.16177083551883698,
0.004627360496670008,
0.42408308386802673,
-0.12338230758905411,
0.1206308901309967,
-0.7096936106681824,
-0.24292969703674316,
0.7399594187736511,
-0.3145846128463745,
-0.1943736076... | |
want:
```
Foo: something_8
```
My tag library definition for the attribute is:
```
<attribute>
<name>myAttribute</name>
<required>true</required>
</attribute>
```
I have tried to configure the attribute with `rtexprvalue` both `true` and `false`, but neither worked. Is there a way I can configure the attr... | [
0.22281377017498016,
0.3295421898365021,
0.25320932269096375,
-0.3572304844856262,
-0.14825665950775146,
-0.03226904571056366,
0.19196078181266785,
-0.26746344566345215,
0.07381214946508408,
-0.5500423312187195,
0.09331667423248291,
0.7289902567863464,
-0.2523438334465027,
-0.2349658757448... | |
now.
**Edit:**
I have also tried:
```
<foo:myTag myAttribute="something_${index}"/>
```
which does not work either - it just outputs `something_${index}`.
I don't believe that you can use a `<%= ... %>` within an attribute in a custom tag, unless your `<%= ... %>` is the entire contents of the attribute value. Doe... | [
0.25961753726005554,
0.06036129966378212,
0.3771054446697235,
-0.42314034700393677,
0.06990788131952286,
-0.137659952044487,
0.42186596989631653,
0.01905660144984722,
-0.3176528811454773,
-0.7904353141784668,
-0.13653519749641418,
0.6014520525932312,
-0.17275521159172058,
0.100982308387756... | |
I have a problem that is not uncommon when building a plug-in architecture.
1. Assembly A is the core code -- the framework.
2. Assembly B is a plugin to that code, expected to load dynamically at runtime and make code available for Assembly A to use.
In Visual Studio, Project B (which generates Assembly B) has a ref... | [
0.8391095399856567,
0.3302868604660034,
-0.009358270093798637,
-0.4610311686992645,
-0.18602265417575836,
-0.011253579519689083,
0.0786677822470665,
-0.26057207584381104,
0.10062333196401596,
-0.8280713558197021,
-0.15621624886989594,
0.35077568888664246,
-0.4247802793979645,
0.14022384583... | |
understand that a type defined in one project and referenced in another are considered different types at runtime, even if they resolve fine at compile time.
But, I thought this could be fixed by loading Assembly B into the correct context. So I switched from "Assembly.LoadFrom" to "Assembly.Load" and put Assembly B i... | [
0.40705767273902893,
-0.04762503132224083,
0.06180553138256073,
-0.24623636901378632,
0.14851969480514526,
-0.1333022266626358,
0.03146858513355255,
-0.14919395744800568,
-0.34108206629753113,
-0.6103880405426025,
-0.0016641125548630953,
0.12741246819496155,
-0.541789710521698,
0.239956438... | |
default load context.
So, I have ensured they are both loaded in the *same load context*.
Still, I can't share types between the two Assemblies. I get casting errors when I try to pass an object (whose type is defined in Assembly A) as a parameter from code in Assembly A to a method on an object in Assembly B.
To su... | [
0.13583001494407654,
0.059974171221256256,
0.09146828204393387,
-0.2972729802131653,
-0.2986149191856384,
-0.0441451370716095,
0.4204522967338562,
-0.24904823303222656,
0.0074754818342626095,
-0.7618645429611206,
0.0784359723329544,
0.506542444229126,
-0.5891621708869934,
-0.15144476294517... | |
this method an object of MyType as a parameter (which is expected, and which compiled just fine).
4. Fails with: 'MyType' cannot be converted to type 'MyType'
Here's the code I use to invoke the method, if that matters. This code executes in Assembly A:
```
TypeFromAssemblyB.GetMethod("MyMethod").Invoke(null, new obj... | [
0.20651639997959137,
0.18994876742362976,
0.3783282935619354,
-0.1904647797346115,
-0.012648520991206169,
0.041495732963085175,
0.42085936665534973,
-0.6040815711021423,
0.31675294041633606,
-0.6625379920005798,
0.0754898339509964,
0.5791620016098022,
-0.5220069885253906,
0.034654732793569... | |
}
}
}
```
And my plugin assembly is called Plugin. It references the PluginTest project in Visual Studio and only contains this class:
```
using System;
using PluginTest;
namespace Plugin
{
public class Class1
{
public static void ShowData(MyType input)
{
Console.WriteLine(in... | [
0.1680573672056198,
0.1392184942960739,
0.6228532195091248,
-0.5069345831871033,
0.11844034492969513,
0.06389787793159485,
0.024481363594532013,
0.025136996060609818,
0.04342471435666084,
-0.6835108995437622,
-0.19418969750404358,
0.6006812453269958,
-0.42986345291137695,
0.170314341783523... | |
{
Assembly pluginAssembly = Assembly.LoadFrom("Plugin.dll");
Type pluginType = pluginAssembly.GetType("Plugin.Class1");
MethodInfo mi = pluginType.GetMethod("ShowData");
mi.Invoke(null, new object[]
{
new MyType {Data = "Hello World"} | [
0.014818072319030762,
-0.18036885559558868,
0.41544875502586365,
-0.26625657081604004,
0.29934239387512207,
0.24349482357501984,
0.5598475337028503,
-0.1767587810754776,
-0.0286415945738554,
-0.646195113658905,
-0.30205968022346497,
0.29679566621780396,
-0.6683438420295715,
0.5025686025619... | |
});
Console.ReadLine();
}
```
As expected this pops up a console window and writes "Hello World" to it. So, in principle, what you are trying to do *should* work...
(On preview I like Jonathan's idea that it may be a version mismatch - do a clean build of the entire solution and make sure that ... | [
-0.21729788184165955,
-0.002662960672751069,
0.16770188510417938,
-0.27351394295692444,
0.19086642563343048,
-0.38146284222602844,
0.66910719871521,
0.4238397181034088,
0.06554702669382095,
-0.7388917803764343,
-0.24239833652973175,
0.5248977541923523,
-0.470421701669693,
0.394290745258331... | |
From a usability perspective, is it better to integrate admin section on the main website or have a separate section to manage content?
Any thoughts are greatly appreciated.
EDIT: the application is a CMS for very non-techno friendly staff.
It depends on the project and part you want to administer, imho.
For example... | [
0.4238690435886383,
0.1912262886762619,
0.3836689293384552,
0.26662641763687134,
-0.3001087009906769,
-0.35659897327423096,
0.23028475046157837,
-0.19852501153945923,
-0.08944946527481079,
-0.4790287911891937,
-0.29377099871635437,
0.47687864303588867,
-0.19096268713474274,
-0.111792132258... | |
your client. You'd want them to see the site as a normal user would see it. | [
0.61136394739151,
0.004597118124365807,
0.14385393261909485,
0.12542091310024261,
-0.04865104332566261,
0.17417599260807037,
-0.03688593953847885,
0.45031437277793884,
-0.2892497479915619,
-0.39716386795043945,
-0.11383896321058273,
0.677738606929779,
0.06337212026119232,
-0.12556576728820... | |
Environment:
SQL Server 2005 SP2 (9.0.3077)
Transactional Publications (Production and Beta)
I have a situation where I have two different Replication Publications setup that use some of the same Articles. Each of these Publications feeds a subscriber on a different machine. One of these shared Articles is a table. At... | [
0.26541802287101746,
0.28626227378845215,
0.19345924258232117,
-0.07051044702529907,
-0.18003375828266144,
-0.3490543067455292,
0.16624188423156738,
-0.07987651228904724,
-0.22567033767700195,
-0.35438740253448486,
0.18234726786613464,
0.49639543890953064,
-0.4696258306503296,
0.1841091662... | |
stored procedure” instead of the default “Stored procedure definition only”. This way when the stored procedure deletes 2,000,000+ records these don’t replicate down to the subscribers. Instead the execution of the stored procedure is replicated and the same replicated stored procedure on the subscribers is executed an... | [
0.1974058598279953,
0.13530059158802032,
0.5603312849998474,
0.30579477548599243,
0.021025972440838814,
0.029828671365976334,
0.23424671590328217,
-0.12945063412189484,
-0.5142020583152771,
-0.6122916340827942,
0.2099025398492813,
0.5285757184028625,
-0.49104976654052734,
0.425702691078186... | |
The table at the subscriber just kept gaining records. So to fix it I set the Article Property to "Execution..." and called it good. Which is probably the best solution so beta matches production, but it still feels like a kludge as the publication properties should work independently of each other.
Question: Why does... | [
0.6521123051643372,
0.5674024820327759,
0.23664751648902893,
0.04305689409375191,
0.022381020709872246,
0.010931877419352531,
-0.020783090963959694,
0.023202113807201385,
-0.15879790484905243,
-0.4344902038574219,
0.1900031715631485,
0.4922267198562622,
-0.3126143217086792,
0.4887248277664... | |
back to our primary server in London.
Firstly, your replication filters should use Views, even the simple ones. That way, if you need to adjust the filter (read WHERE clause), you just need to alter the view and your done. Otherwise you have to re-publish your data, and re-subscribe everyone which can be a real pain.
... | [
0.48833775520324707,
0.10645721852779388,
0.43783649802207947,
0.0067222462967038155,
-0.17302849888801575,
-0.16927635669708252,
-0.1410668045282364,
0.20804332196712494,
-0.31155896186828613,
-0.3901022970676422,
-0.09523917734622955,
-0.020360274240374565,
-0.05421270430088043,
0.110456... | |
Server 2005, replication is very fast and efficient now. SQL 2000 was and is quite slow for replication. If your using SQL 2005/2008, just make sure your compatibility level (right click on db, properties, options) is set to 90 (2005) or 100 (2008). This switches sql server over to the fast and efficient replication me... | [
-0.18198055028915405,
0.20911012589931488,
0.5524638295173645,
0.003111858619377017,
-0.4173719882965088,
-0.4240978956222534,
0.16959477961063385,
-0.14538262784481049,
-0.35316652059555054,
-0.27480751276016235,
0.23585525155067444,
0.3982122540473938,
-0.13390858471393585,
0.27627769112... | |
what is the correct syntax to create a new instance of the object as opposed to a pointer to the original? Here is my example:
```
var oItem = { element: null, colIndex: 0 };
var oInputs = { Qty: oItem, Tare: oItem, Rate: oItem, Total: oItem };
for (var oTitle in oInputs) {
oInputs[oTitle].element = ...
```
when... | [
-0.08509600907564163,
0.11005722731351852,
0.15571317076683044,
-0.21135132014751434,
-0.11021973192691803,
0.37273696064949036,
0.34514564275741577,
-0.14966297149658203,
-0.2432200014591217,
-0.46907320618629456,
-0.17467865347862244,
0.44536978006362915,
-0.347513884305954,
-0.000732712... | |
obviously wrong.
```
var oInputs = { Qty: new oItem, Tare: new oItem, Rate: new oItem, Total: new oItem };
```
Thanks in advance.
Do the following:
```
function OItem() {
this.colIndex = 0;
}
var oInputs = { Qty: new OItem(), Tare: new OItem(), Rate: new OItem(), Total: new OItem() };
```
and then set your pro... | [
-0.2549069821834564,
0.2037193924188614,
0.45754575729370117,
-0.08857805281877518,
0.1159757673740387,
0.4046785235404968,
0.2158684879541397,
-0.25489526987075806,
-0.12581802904605865,
-0.616086483001709,
-0.20256133377552032,
0.7718449234962463,
-0.0849781185388565,
0.04118522256612778... | |
In C#, if a class *has all the correct methods/signatures for an Interface*, but **doesn't** explicitly implement it like:
```
class foo : IDoo {}
```
Can the class still be cast as that interface?
No, it's not like Objective-C and some other languages. You should explicitly declare interface implementation. | [
0.2504250407218933,
0.07078393548727036,
0.032037898898124695,
-0.10957852751016617,
-0.24131877720355988,
-0.4150070250034332,
0.04500234127044678,
0.09333157539367676,
0.008579743094742298,
-0.3092889189720154,
-0.03809003531932831,
0.5434672832489014,
-0.6577730774879456,
-0.17021819949... | |
i was wondering how to use those phobos modules to use networking?
Or you can give a reference to how to use sockets (in a way similar or almost similar to D)
std.socket.Socket is essentially a semi-thin wrapper around your operating system's native socket functions. For that reason, I recommend understanding the basi... | [
0.545793890953064,
0.007106043864041567,
0.14856396615505219,
0.20506052672863007,
-0.05967967212200165,
-0.19048510491847992,
-0.2594825029373169,
0.24371342360973358,
-0.24759243428707123,
-0.4402417838573456,
-0.13256853818893433,
0.5836211442947388,
-0.0689370259642601,
0.0247189011424... | |
I am writting a winforms c# 2.0 application that needs to put an XML file into a document library on SharePoint.
I want to use a WebService instead of using the object model (no sharepoint.dll to reference here)
I am currently using the <http://webserver/site/_vti_bin/copy.asmx> webservice.
Here is some code:
``... | [
0.330660343170166,
0.015226364135742188,
0.8877919912338257,
-0.19585482776165009,
0.017683852463960648,
-0.03178666532039642,
0.15515534579753876,
-0.270658016204834,
-0.21266117691993713,
-0.7331652045249939,
-0.27949267625808716,
0.4526262879371643,
0.13373982906341553,
0.34887868165969... | |
copyService.Timeout = 600000;
uint documentId = copyService.CopyIntoItems("", destinationUrlArray, fields, xmlByteArray, out resultsArray);
}
```
When this code runs, I get a single result in the resultsArray out parameter:
```
DestinationURL: "http://webserver/site/Doclib/UploadedDocument.xml"
ErrorCode: UnKn... | [
-0.09373548626899719,
0.3565714359283447,
0.39497262239456177,
0.3157099187374115,
0.14777833223342896,
-0.008666177280247211,
0.1611473709344864,
-0.0537002794444561,
-0.37882959842681885,
-0.8569645285606384,
-0.1455526500940323,
0.6744261384010315,
-0.29336220026016235,
0.19463133811950... | |
property."
This leads me to believe my source url should be set to something, but what? This is originating from a client workstation and does not have a source URL.
Any help would be appricated.
hank you,
Keith
Here is what is currently working:
```
WebRequest request = WebRequest.Create(“http://webserver/site... | [
0.3823411166667938,
-0.08196626603603363,
0.5769373178482056,
0.28052622079849243,
0.17353320121765137,
-0.2305264174938202,
0.31724733114242554,
-0.45653316378593445,
-0.1884712427854538,
-0.6356106400489807,
0.023895973339676857,
0.6581019759178162,
0.002626406727358699,
0.44307804107666... | |
buffer.Length); i > 0;
i = memoryStream.Read(buffer, 0, buffer.Length))
{
stream.Write(buffer, 0, i);
}
}
}
WebResponse response = request.GetResponse();
response.Close();
```
So... Does anyone have an opinion as to if this "PUT" method is better in the SharePoint environm... | [
0.2691029906272888,
-0.19376811385154724,
0.41932979226112366,
-0.31728339195251465,
0.08771295845508575,
0.00679056579247117,
0.3853479027748108,
-0.17005011439323425,
-0.1599224954843521,
-0.7597377300262451,
-0.09235407412052155,
0.4724070429801941,
-0.31635594367980957,
0.2671052515506... | |
WebService to work.
Keith | [
0.5146041512489319,
0.10459290444850922,
0.04569774121046066,
0.05173775181174278,
-0.1606946885585785,
-0.32544010877609253,
0.38653564453125,
0.14418287575244904,
-0.2194630205631256,
-0.7381007671356201,
-0.06622796505689621,
0.30631929636001587,
-0.04705763980746269,
-0.306601643562316... | |
How can I force a section of code to be executed on my main thread?
This is why I'd like to know:
I have a custom created message box that at times gets shown from a thread that is not the main thread. However, when the message box constructor is called I get an InvalidOperationException saying "The calling thread m... | [
0.47367581725120544,
-0.11733376234769821,
0.12263418734073639,
-0.13227474689483643,
-0.18968626856803894,
-0.08823069930076599,
0.3735085427761078,
-0.16623571515083313,
-0.2751845419406891,
-0.5393860936164856,
-0.020194681361317635,
0.3075799345970154,
-0.4991491138935089,
0.3750511407... | |
there a something I could put in ShowMessage that would force the message box to be created and shown on the main thread? Elsewhere in my code I use the Control.BeginInvoke to handle similar issues, but since it is a static function there is no already existing UI element for me to call BeginInvoke on.
Do I have to c... | [
0.16425910592079163,
-0.33115777373313904,
0.13768069446086884,
-0.2606620788574219,
-0.21653872728347778,
-0.06369756162166595,
0.2015862911939621,
-0.04356921836733818,
-0.13731145858764648,
-0.6059997081756592,
-0.05558034032583237,
0.4480781853199005,
-0.4209299087524414,
0.16177180409... | |
`ThreadPool` threads) - via `.SetApartmentState(ApartmentState.STA);`
* see if [`SynchronizationContext.Current`](http://msdn.microsoft.com/en-us/library/system.threading.synchronizationcontext.current.aspx) is non-null; if so, use `Send`/`Post`
* pass the form/control in as an [`ISynchronizeInvoke`](http://msdn.micros... | [
0.057331714779138565,
-0.15019892156124115,
0.5063884258270264,
0.22823210060596466,
0.30208727717399597,
0.014323009178042412,
0.348682701587677,
-0.20417140424251556,
-0.10543758422136307,
-0.5042065978050232,
-0.33289405703544617,
0.2073569893836975,
-0.354238361120224,
0.46554630994796... | |
I have a one-to-one relationship but hibernatetool complains when generating the schema. Here's an example that shows the problem:
```
@Entity
public class Person {
@Id
public int id;
@OneToOne
public OtherInfo otherInfo;
rest of attributes ...
}
```
Person has a one-to-one relationship with Ot... | [
-0.23362819850444794,
-0.19920527935028076,
0.1135856881737709,
-0.13746410608291626,
0.16580118238925934,
-0.2709552049636841,
-0.37601718306541443,
-0.24803383648395538,
0.07023973017930984,
-0.4410368800163269,
0.1053556278347969,
0.49051815271377563,
-0.1138724833726883,
0.259194165468... | |
Person.
I get the following error when using hibernatetool to generate the database schema:
```
org.hibernate.MappingException: Could not determine type for: Person, at table: OtherInfo, for columns: [org.hibernate.mapping.Column(person)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)
... | [
-0.3905359208583832,
0.07882791757583618,
0.30211353302001953,
-0.1739697903394699,
-0.23602581024169922,
0.1270281821489334,
0.5962313413619995,
-0.42457783222198486,
-0.06916341185569763,
-0.7133450508117676,
0.014804444275796413,
0.5529342293739319,
-0.3018244206905365,
-0.0124345878139... | |
or *ManyToOne* mapping. What you are trying to do is one-to-one entity association **with shared primary key**. The simplest case is unidirectional one-to-one with shared key:
```
@Entity
public class Person {
@Id
private int id;
@OneToOne
@PrimaryKeyJoinColumn
private OtherInfo otherInfo;
re... | [
-0.3562217056751251,
-0.21597182750701904,
0.17693080008029938,
-0.0815594419836998,
-0.1566002517938614,
-0.17551566660404205,
0.00303306570276618,
-0.2724646031856537,
-0.029552381485700607,
-0.5236591100692749,
0.025976398959755898,
0.7262869477272034,
-0.4062274098396301,
0.10178770869... | |
OtherInfo {
@Id @GeneratedValue(generator = "customForeignGenerator")
@org.hibernate.annotations.GenericGenerator(
name = "customForeignGenerator",
strategy = "foreign",
parameters = @Parameter(name = "property", value = "person")
)
private Long id;
@OneToOne(mappedBy="other... | [
-0.07688137143850327,
-0.49549493193626404,
0.17998106777668,
-0.11964753270149231,
0.310932457447052,
-0.2514823079109192,
-0.4024856686592102,
-0.23891782760620117,
-0.12388396263122559,
-0.34047216176986694,
-0.08600439876317978,
0.37612253427505493,
-0.3656648099422455,
-0.070427618920... | |
Where would one find information or just rather good ideas on what is considered proper programming ethics or methodology of how to format the code, comments, or even variable names so that it is easier to read the code at a later time?
Thanks!
The book [Code Complete 2](http://www.cc2e.com/) is a timeless reference f... | [
0.7995386123657227,
0.05169519782066345,
-0.2582034170627594,
0.24259638786315918,
-0.10113155096769333,
-0.8035863637924194,
0.0034054976422339678,
-0.03190116211771965,
-0.27766117453575134,
-0.3742852210998535,
-0.0349164642393589,
0.37292906641960144,
0.11856944859027863,
-0.2123323529... | |
I'm switching from MySQL to PostgreSQL and I was wondering how can I have an `INT` column with `AUTO INCREMENT`. I saw in the PostgreSQL docs a datatype called `SERIAL`, but I get syntax errors when using it.
Yes, SERIAL is the equivalent function.
```
CREATE TABLE foo (
id SERIAL,
bar varchar
);
INSERT INTO ... | [
0.19059988856315613,
0.19513647258281708,
0.5291910767555237,
-0.19545137882232666,
-0.1888992041349411,
0.10646684467792511,
0.12014156579971313,
-0.06477911025285721,
-0.34168845415115356,
-0.37081238627433777,
-0.01187190692871809,
0.5545122623443604,
-0.735613226890564,
0.2625423669815... | |
Any recommendations for a CSS minifier?
I’ll be rooting around Google and trying some out, but I suspected that the smart, proficient and curiously handsome StackOverflow community might have already evaluated the pros and cons of the heavyweights.
The [YUI Compressor](http://yui.github.io/yuicompressor/) is fantastic... | [
0.4070294499397278,
-0.05260038375854492,
-0.07278840988874435,
0.2724669873714447,
-0.2166920155286789,
0.015885865315794945,
-0.16209517419338226,
0.41784974932670593,
0.05520517751574516,
-0.7046483159065247,
0.04182137921452522,
0.5737927556037903,
0.0917939618229866,
-0.01986524462699... | |
I have a partial view/user control called LogOnUserControl which I display in a side bar on my site (defined in Site.Master). I also have a separate LogOn view, which also renders the LogOnUserControl.
I don't want two instances of the LogOnUserControl in the LogOn view, because it's just plain confusing, so my curre... | [
0.1951839178800583,
0.07214508950710297,
0.6711333990097046,
-0.24551206827163696,
0.13969303667545319,
-0.09427241235971451,
0.3500806987285614,
0.20791111886501312,
0.11824442446231842,
-0.8577719330787659,
-0.14700651168823242,
0.566063642501831,
-0.3051089644432068,
0.2640496790409088,... | |
something wrong! :-)
**Edit:** There is the further complication that the same partial view is used for both the LogOn view and the sidebar in Site.Master.
On the master page wrap the content of the sidebar area with content area tags and give it an id like SideBarContentArea or something. What this does is create a n... | [
0.5636422634124756,
-0.14210687577724457,
0.39114153385162354,
0.04475358501076698,
0.00873331818729639,
-0.24918532371520996,
0.4358130097389221,
0.11134696006774902,
-0.3677637577056885,
-0.6290990710258484,
-0.002254101214930415,
0.33078625798225403,
-0.29808661341667175,
0.385908842086... | |
SideBarContentArea and not include the login control this time.
Bada Bing! | [
-0.03055795468389988,
-0.2525554895401001,
0.5349169373512268,
-0.010464277118444443,
-0.1984195113182068,
-0.3804587721824646,
0.32920968532562256,
0.42755305767059326,
-0.1849903166294098,
-0.16176030039787292,
0.02711557410657406,
0.379487007856369,
-0.33070507645606995,
-0.061961524188... | |
I know that you can use the ctypes library to perform case insensitive comparisons on strings, however I would like to perform case insensitive replacement too. Currently the only way I know to do this is with Regex's and it seems a little poor to do so via that.
Is there a case insensitive version of replace()?
You c... | [
0.32579249143600464,
0.13511349260807037,
0.42612165212631226,
-0.14569711685180664,
0.03126409277319908,
0.18106891214847565,
0.2713463306427002,
-0.3695465624332428,
-0.10274706780910492,
-0.4972957968711853,
-0.12980853021144867,
0.8849683403968811,
-0.7620892524719238,
0.03020772337913... | |
How much memory and/or other resources does Apache web server use?
How much more are lightweight servers efficient?
Say appache vs. Mongoose Web Server
Neil Butterworth you out there?
Thanks.
Yes, lightweight servers are more efficient with memory and resources, as the term 'lightweight' would indicate. nginx is a... | [
0.3465779721736908,
0.2169322818517685,
-0.2975688576698303,
0.16677314043045044,
-0.48388686776161194,
-0.08003989607095718,
0.015809960663318634,
-0.017886223271489143,
-0.5579453110694885,
-0.1768229901790619,
0.15706166625022888,
0.17662951350212097,
-0.07585172355175018,
-0.1938619166... | |
I am just learning python on my ubuntu 8.04 machine which comes with
python 2.5 install. Is 2.5 too dated to continue learning? How much
of 2.5 version is still valid python code in the newer version?
Basically, python code, for the moment, will be divided into python 2.X code and python 3 code. Python 3 breaks many ch... | [
0.550067126750946,
0.3468204736709595,
0.11153113096952438,
-0.2368563860654831,
-0.32378530502319336,
-0.49272412061691284,
0.5624892115592957,
-0.1252203732728958,
-0.10026618093252182,
-0.6481746435165405,
-0.08549032360315323,
0.5950769782066345,
-0.15387867391109467,
-0.01637012511491... | |
Python 3, which can be run with the command `python3`, at least on my 8.10 install.
To answer your question, learning with 2.5 is fine, just keep in mind that 3 is a significant change, and learn the changes - ask yourself as you code, "how would this be different in 3, if at all?".
(As an aside, I do wish Ubuntu wou... | [
0.14055471122264862,
0.012449558824300766,
0.11213888227939606,
-0.35099467635154724,
-0.5628105998039246,
-0.2777586281299591,
0.58103346824646,
-0.08343398571014404,
-0.3618695139884949,
-0.3576517105102539,
-0.0006937898579053581,
0.9396275877952576,
-0.6029698252677917,
-0.375166177749... | |
describing 2.6 -> 3's changes](http://docs.python.org/3.0/whatsnew/3.0.html) | [
0.09847354143857956,
0.0004455824091564864,
0.5154670476913452,
-0.23494172096252441,
-0.07839751988649368,
0.11943549662828445,
0.46236345171928406,
-0.6881580352783203,
-0.31822264194488525,
-0.49243301153182983,
0.03315252065658569,
0.5588107109069824,
-0.5018231868743896,
-0.2154922038... | |
I noticed an unusual issue today while throwing together a quick "under construction" type page where I'm moving text onto an image using relative positioning. (This page was "inspired" by SO's offline page, if you care)
```
<html>
<head>
<title>Bronco Marching Band</title>
</head>
<body style="background-co... | [
0.07104789465665817,
0.1332927942276001,
0.4737621545791626,
0.08925821632146835,
-0.000022475553123513237,
-0.2581479847431183,
-0.057397451251745224,
-0.14506903290748596,
-0.05938047170639038,
-0.5351780652999878,
0.3174862265586853,
0.8902269601821899,
0.49965140223503113,
-0.112067140... | |
0.8;" />
<div style="color: #C69C6D; font-size: 397%; font-weight: bold; font-family: sans, arial, helvetica; position: relative; top: -300px; left: 0px;">
PLEASE STAND BY
</div>
</div>
</body>
</html>
```
It seems to be that the area where the relatively positioned div used to be is still t... | [
0.05752459913492203,
0.08000835031270981,
0.7141491174697876,
-0.1006583645939827,
-0.10508335381746292,
0.25644731521606445,
0.07996959984302521,
-0.03266063332557678,
0.0033182722982019186,
-0.3771221339702606,
-0.492798388004303,
0.2725135087966919,
-0.16604715585708618,
-0.136913135647... | |
it to be positioned absolutely relative to the container!
```
<div style="text-align: center;position:relative; zoom: 1;">
<img src="standby.jpg" width="799px" height="600px" alt="Please Stand By" title="The Bronco Band website is down for a major upgrade. Please check back later." style="width: 620px; height: 465p... | [
-0.0981311947107315,
-0.06069641932845116,
0.9036754965782166,
0.15579375624656677,
0.41115492582321167,
-0.3409034311771393,
-0.16384875774383545,
0.08001212030649185,
0.0874692052602768,
-0.2792869806289673,
-0.094432033598423,
0.9746477603912354,
0.22381803393363953,
-0.0601581484079360... | |
coordinates *within the parent*.
* I position relative to the top of the parent, and make the positioned `div` full-width to allow `text-align: center` to work.
**Edit:**
In order for IE6 to position correctly, I've used a hack to force layout for the container DIV: the `zoom: 1` style. If you don't need to support IE... | [
0.13999706506729126,
-0.05864933133125305,
0.6415636539459229,
0.13036690652370453,
0.14540494978427887,
0.017053147777915,
-0.02198314107954502,
-0.21307790279388428,
0.06733420491218567,
-0.9677022099494934,
-0.14178678393363953,
0.2470960170030594,
-0.1325656920671463,
-0.03840684518218... | |
I am attempting to use form\_for to implement a search form that works with a table-less Search model I created. The search form keeps triggering the 'index' action. I assume I should use 'new' to create the form and 'create' the process the search query. Looking at the log, my POST is getting changed into a GET. Here'... | [
0.4398428499698639,
0.15561234951019287,
0.7354118824005127,
-0.12373758107423782,
-0.009131848812103271,
-0.15710313618183136,
0.3995911180973053,
-0.3554827868938446,
-0.040040090680122375,
-0.7872998118400574,
-0.17538391053676605,
0.35588687658309937,
-0.2641284465789795,
0.24879476428... | |
"Submit" %></p>
<% end %>
```
What's the standard way for triggering the 'create' action with form\_for?
Relative-positioned elements still take up space. You actually want an absolutely-positioned element... you just want it to be positioned absolutely relative to the container!
```
<div style="text-align: center;p... | [
0.19636531174182892,
0.1681915521621704,
0.6101301908493042,
0.1299041360616684,
0.04249501973390579,
-0.23846524953842163,
0.02930522710084915,
-0.3888203501701355,
0.20043687522411346,
-0.15025585889816284,
-0.08925975859165192,
0.80357426404953,
0.12488877028226852,
-0.2730464041233063,... | |
</div>
</div>
```
Key changes:
* Container `div` has `position: relative` style set
* Child `div` has `position: absolute` style set, causing it to be positioned at absolute coordinates *within the parent*.
* I position relative to the top of the parent, and make the positioned `div` full-width to allow `text-ali... | [
0.0470324344933033,
-0.06231716275215149,
0.6094491481781006,
0.025828059762716293,
0.1898641288280487,
0.12454833835363388,
0.05244191363453865,
-0.10803815722465515,
0.16211985051631927,
-0.9056678414344788,
-0.30914953351020813,
0.47596147656440735,
0.08434172719717026,
0.06267713010311... | |
1. I want to send a message to userID=3 by going to /MyController/Message/3
2. This executes `Message()` [get] action, I enter some text in the text area and click on Save to post the form
3. `Message()` [post] action saves the changes, resets the value of SomeText to empty string and returns to the view.
At this poin... | [
0.005987714976072311,
-0.2494519203901291,
0.594001293182373,
-0.5215698480606079,
-0.1522490680217743,
0.20907995104789734,
0.4931475520133972,
-0.479764848947525,
-0.14491412043571472,
-0.6646871566772461,
-0.3104807734489441,
0.5746678113937378,
-0.4254315197467804,
-0.1704353392124176,... | |
// save Text to database
SaveToDB(ID, SomeText);
// set the value of SomeText to empty and return to view
ViewData["SomeText"] = string.Empty;
return View();
}
```
And the corresponding view:
```
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPag... | [
-0.2702487111091614,
-0.19972394406795502,
0.7364819049835205,
0.05888991430401802,
0.17326749861240387,
0.04982702434062958,
0.24742168188095093,
-0.35462865233421326,
-0.24299488961696625,
-0.5410325527191162,
-0.43240103125572205,
0.5437424182891846,
-0.18922637403011322,
0.157040521502... | |
posted data. Rather than hacking round this by resetting the ModelState, why not redirect back to the [get] action. The [post] action could also set a temporary status message like this:
```
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Message(int ID, string SomeText)
{
// save Text to database
SaveToDB(ID, S... | [
0.1496414989233017,
-0.39811497926712036,
0.42920058965682983,
-0.004290470853447914,
-0.17189496755599976,
-0.08471831679344177,
0.47049733996391296,
-0.05772126466035843,
-0.46637463569641113,
-0.583056628704071,
-0.24291899800300598,
0.5675559043884277,
-0.45343518257141113,
0.047935232... | |
I have a dir called `foo`, and in that I have `lib` and `bin`. The scripts in `bin` need stuff in `lib`. I do something like this:
```
#!perl
use strict;
use warnings;
use lib '../lib';
use Foo; # <-- comes from lib
```
But that means I have to be in the `bin` dir to run the script. Surely there is a better way. Wha... | [
0.2119976431131363,
0.061063602566719055,
0.3074932098388672,
-0.20685820281505585,
-0.08434760570526123,
-0.33900707960128784,
0.27069759368896484,
0.00820151623338461,
0.09236904978752136,
-0.5233107805252075,
-0.03901360556483269,
0.7875176668167114,
-0.31479719281196594,
-0.05971873551... | |
Am trying to move an antique C++ code base from gcc 3.2 to gcc 4.1, as I have run into a few issues. Of all the issues, the following is left me clueless (I guess I spent too much time with Java or I might have forgotten the basics of C++ :-P ).
I have a template class
```
template < class T > class XVector < T >
{
... | [
0.44104138016700745,
0.19396434724330902,
0.20062409341335297,
-0.21415464580059052,
0.013835704885423183,
-0.056495800614356995,
0.0844624936580658,
-0.23139382898807526,
-0.1038001999258995,
-0.7314888834953308,
-0.2046685516834259,
0.47898733615875244,
-0.09408139437437057,
0.3085512220... | |
template < class T > int
XVector < T >::getValue (size_t index, T& value)
{
...
//The problematic line
value = (T) (first_value + getIncrement())
* (long) (index - first_index);
....
}
}
```
This class is based on the STL std::vector. I have a second class TypeValue ... | [
0.16087689995765686,
-0.5939781665802002,
0.30554962158203125,
0.045238640159368515,
-0.010225155390799046,
0.039105623960494995,
0.03458573296666145,
-0.4990179240703583,
0.008120069280266762,
-0.7862401008605957,
-0.05729765072464943,
0.5267585515975952,
-0.7548478245735168,
0.1415840387... | |
long and their unsigned variants, float, double, std::string. Also overloads almost all possible operators.
```
class TypeValue
{
union
{
long* _int_value;
double* _real_value;
string* _text_value;
} _value;
TypeValue();
explicit TypeValue(long _long);
explicit TypeValu... | [
0.12321324646472931,
-0.2120516449213028,
0.36343109607696533,
-0.2768770754337311,
0.22442375123500824,
0.10805255174636841,
0.09385135769844055,
-0.2849635183811188,
0.08753953874111176,
-0.21838514506816864,
-0.2849302589893341,
0.7121241688728333,
-0.6096445918083191,
0.192713782191276... | |
virtual TypeValue& operator=(const TypeValue &rhs);
TypeValue& operator+ (TypeValue& )const;
TypeValue& operator* (TypeValue& )const;
...
//For all the basic operators
operator long() const;
operator int() const;
operator unsigned long() const;
operator unsigned int() const;
...
}
... | [
0.21339696645736694,
-0.10541557520627975,
0.5323683619499207,
-0.13366682827472687,
-0.029920881614089012,
-0.08100507408380508,
0.5397482514381409,
-0.35898709297180176,
-0.002699850359931588,
-0.4974254369735718,
-0.10302110761404037,
0.8408358097076416,
-0.14078505337238312,
0.41879048... | |
try compiling this on gcc 4.1 I get errors saying ambigous overload for `operator*` in the class `XVector` and the candidates being
```
operator*(long int, long int)
operator*(int, long int)
operator*(long unsigned int, long int)
operator*(unsigned int, long int)
operator*(double, long int)
operator*(float, long... | [
-0.041412353515625,
-0.06251122802495956,
0.03357555344700813,
-0.17887212336063385,
-0.2260272353887558,
-0.16991083323955536,
0.2810317873954773,
-0.21642278134822845,
0.0795227661728859,
-0.6269410252571106,
-0.0057134428061544895,
0.6403998732566833,
-0.6115490794181824,
-0.13461612164... | |
is no operator`*` that takes those two exact types. There are lots of other type combinations for that operator, though, which the compiler can select by doing an implicit conversion on the first operand. The language allows the compiler to do that to try to find a match.
But which of the many conversions should it ch... | [
0.10070754587650299,
0.10786042362451553,
-0.19926536083221436,
-0.14462216198444366,
-0.10701221972703934,
-0.10042989999055862,
0.32271525263786316,
-0.08392912894487381,
0.21932955086231232,
-0.6915088891983032,
-0.1722130924463272,
0.778914213180542,
-0.3834465742111206,
-0.22113345563... | |
so many implicit conversions. Since the class can only hold `long`, `double`, and `string`, those are the only three conversions I'd supply. That alone probably won't solve your problem, but it may reduce the size of the error output and make other things more manageable.
Instead of converting `(index - first_index)` ... | [
0.022924907505512238,
-0.21241338551044464,
-0.18311049044132233,
-0.07661791145801544,
-0.079112708568573,
0.3184985816478729,
0.45694684982299805,
-0.2587313950061798,
0.19401569664478302,
-0.5261677503585815,
0.20126530528068542,
0.7425551414489746,
-0.40038391947746277,
0.0051505593582... | |
I have a JComboBox which contains an MRU list combo-box and a for a directory tree panel. Together, the two form the left hand panel of my GUI (the MRU is above the tree panel) which is a JSplitPane, so the left panel is resizeable.
It has a problem in that the directory text is always longer than the required width t... | [
0.1062803864479065,
-0.2193845957517624,
0.4841136336326599,
-0.15482625365257263,
-0.08112216740846634,
0.30156558752059937,
0.056523751467466354,
-0.09646561741828918,
-0.3052312433719635,
-0.8691242337226868,
-0.011413659900426865,
0.5101972222328186,
-0.2628197968006134,
-0.03055312298... | |
useful with the end of the filename truncated, but making the left-pane wide enough for the filename very often makes it obtrusively too wide for the overall window, esp. if not running maximized. And it's usually only the trailing part of the filename which is of interest. If I could only cause JComboBox to somehow **... | [
0.36786922812461853,
-0.14822936058044434,
0.3269481360912323,
-0.03994433209300041,
0.16276606917381287,
-0.2442048043012619,
0.4144487679004669,
-0.035690370947122574,
-0.28765931725502014,
-0.6856825351715088,
0.12226962298154831,
0.410308301448822,
-0.0958208292722702,
-0.2690785825252... | |
a ListCellRenderer, I have come up with something that almost works... The component value is rendered correctly, but the list's values require an ugly hack.
The hack is needed because for the list items the renderer's size (from getSize()) reflects the text width of the longest item, not the width of the space availa... | [
0.23621506989002228,
-0.3387053608894348,
0.7610620856285095,
0.09850835800170898,
-0.20385484397411346,
-0.1269056648015976,
0.19904860854148865,
-0.23819217085838318,
-0.2934268116950989,
-0.6326802968978882,
0.008721748366951942,
0.5569396615028381,
-0.1729428917169571,
-0.0547406524419... | |
combo-box and use the stored width if the renderer's width is greater than the width of the combo box. This has a corner case where the renderer's width is between that of the internal JLabel and the width of the combo-box.
Since the rendering space will be the width of the combo-box, less the width of a scroll bar an... | [
0.2916938066482544,
-0.18746331334114075,
0.6133506894111633,
0.052521999925374985,
-0.14224763214588165,
-0.02591843344271183,
0.40929993987083435,
-0.47691255807876587,
0.04129018262028694,
-0.8900882601737976,
0.07995077222585678,
1.1523607969284058,
0.07024237513542175,
-0.228924185037... | |
it to be a JScrollPane (either the JComboBox or JList doco does state that it uses a scroll pane).
Other suggestions to do this better are welcome.
Code follows:
```
recentDirs.setRenderer(new ComboTextRenderer(recentDirs));
...
static private class ComboTextRenderer
extends DefaultListCellRenderer
implements Swin... | [
0.10298654437065125,
-0.519473671913147,
0.8108972311019897,
-0.41884806752204895,
0.09912995994091034,
0.03167816251516342,
0.3893008828163147,
-0.6077548861503601,
0.05936432257294655,
-0.561789870262146,
-0.42203548550605774,
0.41761651635169983,
-0.24943479895591736,
0.0439955815672874... | |
parent=par;
renderWidth=-1;
}
public void paint(Graphics gc) {
String txt=getText();
int len=txt.length();
int | [
0.35473060607910156,
-0.3630823493003845,
0.38953346014022827,
-0.30684521794319153,
-0.049976129084825516,
0.4941309094429016,
0.3695295751094818,
0.06283167004585266,
0.06677219271659851,
-0.5966365933418274,
-0.32869982719421387,
0.8729833960533142,
-0.3125981390476227,
0.00980465672910... | |
wid=getSize().width;
Insets ins=getInsets();
FontMetrics met=gc.getFontMetrics();
if(renderWidth==-1 || wid<parent.getSize().width) { renderWidth=wid; }
else | [
-0.4043046534061432,
-0.39566540718078613,
0.7280526757240295,
-0.27036869525909424,
-0.2009856104850769,
0.3279258608818054,
0.6827896237373352,
-0.2654619812965393,
0.034823380410671234,
-0.9001514315605164,
-0.5370783805847168,
0.41458630561828613,
-0.06988883763551712,
0.03025431372225... | |
{ wid=renderWidth; }
wid-=(ins.left+ins.right);
if(met.stringWidth(txt)>wid) {
String rpl=null;
for(int xa=0,pfx=Math.min(15,((len/2)-1)),sfx=(pfx+2); pfx>0 && sfx<len; xa++) {
rpl=(txt.substring(0,pfx)+" ... "+txt.substring(sfx));
if(met.stringWidth(rpl)<=wid) { break; ... | [
-0.09996796399354935,
-0.3323950171470642,
0.7265467643737793,
-0.38280466198921204,
0.05835467949509621,
0.30859580636024475,
0.4502354562282562,
-0.5970694422721863,
-0.1994876116514206,
-0.3636845350265503,
-0.6028979420661926,
0.3299853503704071,
-0.16305853426456451,
-0.15177311003208... | |
if ((len-sfx)>15) { sfx++; }
else if((xa%2)==0 ) { pfx--; }
else { sfx++; }
}
if(rpl!=null) { setText(rpl); } | [
0.11539939790964127,
-0.3489660918712616,
0.4009072482585907,
-0.40054309368133545,
-0.08397901058197021,
0.16392754018306732,
0.05505907163023949,
-0.43379610776901245,
-0.1439678966999054,
-0.1351475715637207,
-0.5431638956069946,
0.5592002868652344,
-0.4951609969139099,
-0.3729316890239... | |
}
super.paint(gc);
}
}
``` | [
0.2052968293428421,
0.05660276859998703,
0.20474223792552948,
-0.48855695128440857,
0.08713284879922867,
-0.1625053882598877,
0.2773698568344116,
0.2638310194015503,
-0.06271208077669144,
-0.6460375189781189,
-0.3528970777988434,
0.9829102754592896,
-0.6377333998680115,
0.1492496132850647,... | |
I have the following simulation in C for cars in a traffic circle
[alt text http://dl.getdropbox.com/u/175564/cars.png](http://dl.getdropbox.com/u/175564/cars.png)
For example,
```
7 <space> <enter>
```
gives more cars to the simulation, while
```
s1 <enter>
```
puts a top sign to the incoming road #1.
I want... | [
0.6514073014259338,
0.319456547498703,
0.39098188281059265,
0.15449096262454987,
-0.18863706290721893,
0.04241609573364258,
-0.06473910808563232,
0.1224881112575531,
-0.24361595511436462,
-0.591380774974823,
0.29160580039024353,
0.4511653184890747,
0.025890741497278214,
0.13826362788677216... | |
it was made for that purpose. Then perhaps embedding a few more options with PHP and HTML will let the user acutally input data into the program via the web. It should not be too hard.
Take a look here for more info: <http://www.cs.tut.fi/~jkorpela/perl/cgi.html>
I think that is a good pointer in the right direction.... | [
0.6247063875198364,
-0.04587608203291893,
0.4444766640663147,
0.12428523600101471,
-0.15797270834445953,
-0.013111649081110954,
0.14456766843795776,
0.3116382658481598,
-0.38335540890693665,
-0.3693659007549286,
0.15750235319137573,
0.3262529671192169,
0.0870080515742302,
0.076164349913597... | |
I am trying to implement PayPal IPN functionality. The basic protocol is as such:
1. The client is redirected from my site to PayPal's site to complete payment. He logs into his account, authorizes payment.
2. PayPal calls a page on my server passing in details as POST. Details include a person's name, address, and pa... | [
0.18010163307189941,
0.1968129277229309,
0.671210527420044,
-0.04384974017739296,
-0.065813347697258,
0.10272742807865143,
0.1504254788160324,
-0.1727803349494934,
-0.25520452857017517,
-0.6272240877151489,
-0.20880888402462006,
0.1545870155096054,
-0.1543750911951065,
0.4146970212459564,
... | |
sent to me, I get a:
```
While calling send_response_to_paypal. Traceback (most recent call last):
File "<snip>/account/paypal/views.py", line 108, in process_paypal_ipn
verify_result = send_response_to_paypal(params)
File "<snip>/account/paypal/views.py", line 41, in send_response_to_paypal
params = urlli... | [
0.09667917340993881,
0.22621573507785797,
0.7277076840400696,
0.04739139974117279,
-0.15400023758411407,
0.4198871850967407,
0.008032282814383507,
-0.34687480330467224,
-0.4754955470561981,
-0.29611679911613464,
-0.15891319513320923,
0.05658687278628349,
-0.22270432114601135,
0.34685206413... | |
using urllib2.urlopen(req) (or other method)
**Details:**
I read the params in PayPal's original request as follows (the GET is for testing):
```
def read_ipn_params(request):
if request.POST:
params= request.POST.copy()
if "ipn_auth" in request.GET:
params["ipn_auth"]=request.GET... | [
0.2943052649497986,
0.1070721447467804,
0.6107643246650696,
0.11429597437381744,
-0.1727023720741272,
0.21671494841575623,
0.0656977966427803,
-0.4985337555408478,
-0.2952432930469513,
-0.5093609690666199,
-0.10713030397891998,
0.312060683965683,
-0.2717818319797516,
0.3739183247089386,
... | |
page is:
```
def send_response_to_paypal(params):
params['cmd']='_notify-validate'
params = urllib.urlencode(params)
req = urllib2.Request(PAYPAL_API_WEBSITE, params)
req.add_header("Content-type", "application/x-www-form-urlencoded")
response = urllib2.urlopen(req)
status = response.r... | [
-0.14422720670700073,
0.15131378173828125,
0.7936269640922546,
0.21510061621665955,
-0.18850576877593994,
-0.1242918074131012,
0.2971656620502472,
-0.24745191633701324,
-0.34381842613220215,
-0.5963268876075745,
-0.5085567235946655,
0.041783805936574936,
-0.423115998506546,
0.2099614292383... | |
for the PayPal payment does not fall into the ASCII range.
Try converting the params dictionary to utf-8 first... urlencode seems to like that better than unicode:
```
params = urllib.urlencode(dict([k, v.encode('utf-8')] for k, v in params.items()))
```
Of course, this assumes your input is unicode. If your input i... | [
-0.020171813666820526,
0.08588608354330063,
0.7097879648208618,
0.18099409341812134,
-0.2093571573495865,
0.5460537075996399,
-0.13227175176143646,
-0.46268677711486816,
-0.3219367563724518,
-0.49884891510009766,
-0.1704549938440323,
0.42034560441970825,
-0.20893988013267517,
-0.0775474980... | |
At work, I want to create a WCF Windows Service that runs on a network server. Then I want to create a WPF application that can be installed on various machines on the network. This WPF application needs to be able to communicate with the WCF Windows Service on the network server.
Is this feasible? Is there a better ... | [
0.6056290864944458,
0.19970135390758514,
0.27524879574775696,
0.10389473289251328,
0.05883665755391121,
-0.14248314499855042,
0.1132768839597702,
-0.20355941355228424,
-0.26397639513015747,
-0.8540409207344055,
0.21353130042552948,
0.5018989443778992,
-0.15852972865104675,
0.18172766268253... | |
it over a network.
Thanks for any advice!
Yes, a WPF application can host a WCF client just as well as (and in the same way as) any other .NET application. You may run into security limitations if your application is packaged as an XBAP for browser delivery, but otherwise it should all just work.
Similarly, a Windows... | [
0.43994513154029846,
-0.21603213250637054,
0.5075247883796692,
0.039858076721429825,
-0.22535958886146545,
-0.3965749144554138,
0.26027020812034607,
-0.215770423412323,
-0.5053203105926514,
-0.8203493356704712,
-0.09166748821735382,
0.3088870048522949,
-0.323440819978714,
0.141484305262565... | |
use the Visual Studio Add Service Reference command. | [
0.7903562188148499,
-0.027159418910741806,
-0.24464966356754303,
-0.22278448939323425,
0.0863640084862709,
-0.5633910894393921,
-0.06143729016184807,
0.18177099525928497,
0.09326235949993134,
-0.4921008050441742,
-0.5183925628662109,
0.6986110210418701,
-0.15106415748596191,
-0.32265731692... | |
Let's assume I have a table with a CreatedBy Datetime column with a default value of GETDATE()...
Enter LinqToSql
From what I understand so far, I have two options:
* Insert DateTime.Now manually in the linkToSql "insert" statement
* Set the "Auto Generated Value" to True, and now Linq2Sql will ignore a value I su... | [
0.48097115755081177,
-0.238821342587471,
0.5319586396217346,
-0.1555943489074707,
0.15971824526786804,
-0.24420639872550964,
0.27127084136009216,
0.046274103224277496,
-0.07353982329368591,
-0.5303288102149963,
0.11560187488794327,
0.7534564137458801,
-0.17460434138774872,
0.14557375013828... | |
I have a problem. I've been trying to tackle it for a while now and I'm ready to explode. Here's my requirement:
I have an external toolbar (not part of YUI) above the editor that I want to use to insert HTML tags. The user should be able to click a link on the toolbar after which a few things may happen:
1. If the... | [
0.16761760413646698,
-0.1330493688583374,
0.6561810374259949,
0.059488799422979355,
-0.12054665386676788,
-0.23599602282047272,
0.10844834893941879,
-0.3079368770122528,
-0.03747132420539856,
-0.3921222686767578,
-0.13108080625534058,
0.5001089572906494,
-0.2845774292945862,
-0.18473489582... | |
new element, so that when the user enters more text, it resides in the new element
The functionality is very similar to that of pressing "B" or "U" buttons on the editor's toolbar (now that I'm using this editor, it also does it well :-)). It preserves everything nicely. So far I'm able to do 1 or 2, but not 3. Step 3... | [
-0.055803410708904266,
-0.1543453335762024,
0.5460999011993408,
-0.06040632724761963,
-0.07703979313373566,
0.23082272708415985,
0.11945372819900513,
-0.4353117346763611,
-0.08200852572917938,
-0.5306155681610107,
-0.041445594280958176,
0.7323336601257324,
-0.15992321074008942,
-0.26047304... | |
this.\_oEditor - local instance of YUI Editor:
```
this._insertElement = function() {
var sSelection = this._oEditor._getSelection(); // Attempt to get selected text from the editor
if (sSelection == '') sSelection = ' '; // If nothing was selected, insert a non-breaking space
var sNewElt = '<div>' + sSelection ... | [
-0.5010756254196167,
0.022692689672112465,
0.7894863486289978,
-0.07152892649173737,
0.02652832120656967,
-0.058922648429870605,
0.16974376142024994,
-0.013257537968456745,
-0.055413566529750824,
-0.819358229637146,
-0.6873319149017334,
0.5928961038589478,
-0.33941450715065,
-0.15468807518... | |
= this._oEditor._getSelection();
if (sSelection == '') sSelection = ' ';
var sNewElt = '<div>' + sSelection + '</div>';
this._oEditor.execCommand('inserthtml', sNewElt);
var pos = 1000; //pos determines where to place the cursor. if greater than the length of characters, it will place at the end.
if(this... | [
-0.5421350002288818,
-0.1427224725484848,
0.8973772525787354,
-0.29508739709854126,
0.12321560829877853,
0.36105164885520935,
0.10690846294164658,
-0.41409817337989807,
-0.12579910457134247,
-0.6144269108772278,
-0.47025805711746216,
0.3544558584690094,
-0.35848504304885864,
-0.03036642447... | |
//Works with Firefox and other browsers
this._oEditor.focus();
this._oEditor.setSelectionRange(pos, pos);
}
this._oEditor.focus();
}
``` | [
0.18206575512886047,
-0.1418280154466629,
0.4911007285118103,
-0.15029677748680115,
0.3487260341644287,
-0.2628917992115021,
0.06914512813091278,
0.013232145458459854,
-0.23244819045066833,
-1.0233803987503052,
-0.5460252165794373,
0.6055955290794373,
-0.7045088410377502,
-0.33706882596015... | |
Is a CI server required for continous integration?
In order to facilitate continous integration you need to automate the build, distribution, and deploy processes. Each of these steps is possible without any specialized CI-Server. Coordinating these activities can be done through file notifications and other low level ... | [
0.3335658311843872,
-0.10597475618124008,
0.34999752044677734,
0.44512441754341125,
0.38774096965789795,
-0.39055120944976807,
-0.4792405664920807,
0.06888061761856079,
-0.21485376358032227,
-0.7709673643112183,
-0.3738645017147064,
0.48485514521598816,
-0.6385554075241089,
0.1583751589059... | |
I see many web development tools that let me change this thing called the **user agent**. What is it?
The user agent doesn't change how Safari renders a page, it just changes what browser Safari pretends to be when making the HTTP request, and when calling `navigator.userAgent` in JavaScript. Some web servers and some ... | [
0.31402748823165894,
-0.010397937148809433,
0.2180062085390091,
-0.11230552196502686,
-0.3558972477912903,
-0.17619244754314423,
0.350223183631897,
0.2889578342437744,
-0.06374412029981613,
-0.978458821773529,
0.033174555748701096,
0.5703437924385071,
-0.5169726014137268,
0.024437092244625... | |
to see if it actually works even though they don't support it. | [
0.9406818747520447,
0.26120471954345703,
0.3115791976451874,
0.2206519991159439,
0.4588596820831299,
-0.09136408567428589,
0.4041892886161804,
-0.17750251293182373,
0.02808290906250477,
0.060875922441482544,
0.05193197354674339,
0.4169054925441742,
0.11441031843423843,
-0.22866812348365784... | |
This is my first post on this rather spiffing website so go easy on me if this has been discussed elsewhere (I can't find it if it has).
I'm using the JQuery URL parser plugin found here: <http://projects.allmarkedup.com/jquery_url_parser/>
I can get it to do what I want but the code is rather inefficient. I have a c... | [
0.29977476596832275,
0.01702287048101425,
0.558738112449646,
0.0935593917965889,
-0.3680623769760132,
-0.3197524845600128,
0.015193752013146877,
0.27236273884773254,
-0.20633554458618164,
-0.5281766653060913,
-0.04134511947631836,
0.10756969451904297,
-0.2799123227596283,
0.245721861720085... | |
== 'question2'){
$('#answer2').show();
}
else if
(jQuery.url.attr('anchor') == 'question3'){
$('#answer3').show();
}
else if
(jQuery.url.attr('anchor') == 'question4'){
$('#answer4').show();
}
else if
(jQuery.url.attr('anchor') == 'question5'){
$('#answer5').show();
}
else if
(jQuery.url.attr('anchor') ... | [
-0.1732059121131897,
-0.02178714983165264,
0.7917107939720154,
-0.07148034870624542,
-0.0014399356441572309,
0.07543572038412094,
-0.30062878131866455,
-0.11032550036907196,
-0.4400765597820282,
-0.17948219180107117,
-0.2627427875995636,
0.4176533818244934,
-0.15402747690677643,
0.29877910... | |
I'm having a bit of trouble accomplishing this. Any help would be greatly appreciated!
```
var match = jQuery.url.attr('anchor').match(/^question([0-9]+)$/);
if (match && match.length > 0) {
$('#answer' + match[1] ).show();
}
```
Updated. | [
0.10103980451822281,
0.131123349070549,
0.7027254700660706,
-0.1745363026857376,
0.08490893244743347,
-0.29714322090148926,
0.13354848325252533,
-0.17383532226085663,
0.01216837763786316,
-0.5189945697784424,
-0.21154271066188812,
0.49691635370254517,
-0.259627103805542,
0.0996803194284439... | |
I need to build a web site with the following features:
1) user forum where we expect light daily traffic
2) database backend for users to create profiles, where they can log in
and upload media (pictures)
3) users can uses their profile to buy content from an online inventory
4) create web pages, shopping carts etc fo... | [
0.5593987107276917,
0.32041749358177185,
0.06184567138552666,
0.13362129032611847,
-0.10854398459196091,
-0.4486005902290344,
0.11539027839899063,
-0.0655740350484848,
-0.13706372678279877,
-0.6076712608337402,
0.2818819284439087,
0.5851312279701233,
-0.1047978550195694,
-0.138703152537345... | |
hosting with a domain
name for an application like this?
[Django](http://www.djangoproject.com/) was made for this kind of thing. Check it out.
As far as hosting, [djangofriendly.com](http://www.djangofriendly.com) is a great resource. I have used [WebFaction](http://www.webfaction.com/?affiliate=paolob) before and I ... | [
0.4554823637008667,
0.36562398076057434,
0.35077521204948425,
-0.012470115907490253,
-0.4146970212459564,
-0.4470815360546112,
-0.005337200593203306,
0.42843034863471985,
-0.5065309405326843,
-0.43945807218551636,
0.31713199615478516,
0.5819225311279297,
-0.006528926081955433,
0.2076996713... | |
to plug an application into your project. | [
0.684486448764801,
0.062093865126371384,
-0.21469806134700775,
0.33295804262161255,
0.23976801335811615,
-0.08094102144241333,
-0.030450891703367233,
0.06896749138832092,
0.039337508380413055,
-0.49087053537368774,
-0.133042573928833,
0.3334561884403229,
-0.06911177933216095,
-0.1496963948... | |
I have a Windows Service that communicates with a server and acts as a proxy between clients and the real server. The client data is sent to the server and server's data back to the client. The above two are totally independent as they run on separate thread.
Following are the steps:-
1. Socket accepted by listener
2... | [
0.5507136583328247,
0.09227430075407028,
0.6334707140922546,
-0.11832282692193985,
-0.10869741439819336,
-0.08156685531139374,
0.066515251994133,
-0.06780384480953217,
0.008382707834243774,
-0.7962657809257507,
0.07673034071922302,
0.22679658234119415,
-0.0037243464030325413,
0.52018922567... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.