text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
contentPanel1.Attributes["src"] = "http://www.clis.com";
```
But it didn't help.
i am using a MasterPage.
---
**Update 2**
Changing the aspx file to:
```
<iframe id="contentPanel1" name="contentPanel1" runat="server" />
```
also didn't help
---
**Answer**
The answer is obvious, and unworthy of even asking t... | [
0.15639664232730865,
0.32431942224502563,
0.47844672203063965,
-0.01247488334774971,
0.0493512898683548,
-0.09753343462944031,
0.021482156589627266,
0.024743299931287766,
-0.2621913552284241,
-0.8581751585006714,
-0.18075457215309143,
0.14200787246227264,
-0.1757100373506546,
-0.1522637009... | |
use the brute-force method of writing a recursive version of FindControl(). | [
-0.08812116086483002,
-0.18541082739830017,
-0.26408353447914124,
0.0535924956202507,
0.058889128267765045,
-0.42543908953666687,
0.16826146841049194,
-0.07533658295869827,
0.4416690170764923,
-0.5821051001548767,
-0.47590962052345276,
0.5847720503807068,
-0.3660901188850403,
-0.5521551370... | |
Is it possible to connect PHP to a SQL Server Compact Edition database? What would be the best driver?
---
I need it for a desktop application where SQL Server Express is too heavy.
Short Answer : **No.**
Long Answer : To my knowledge, unlike PostgreSQL / MySQL / MS-SQL, there is no native driver to connect PHP to S... | [
0.010655591264367104,
0.13102413713932037,
0.18708494305610657,
0.4507295787334442,
-0.213444322347641,
-0.16157016158103943,
0.1623413860797882,
0.13931506872177124,
-0.11097070574760437,
-0.4810361862182617,
0.2833453416824341,
0.4067256450653076,
-0.06724098324775696,
0.1817860603332519... | |
of thing for anything remotely important.
If you are worried about SQL Server Express being too heavy, use MySQL with MyISAM tables. It's pretty fast and lightweight. [Emergent has a good checklist of things to configure / disable](http://emergent.urbanpug.com/?p=61) to make MySQL even faster and use less resources.
... | [
-0.17121165990829468,
-0.2966409921646118,
0.23909254372119904,
0.2569419741630554,
-0.08027968555688858,
-0.18619193136692047,
0.28538885712623596,
-0.08952144533395767,
-0.04676001891493797,
-0.5908973217010498,
-0.11811838299036026,
0.22468191385269165,
-0.23823557794094086,
0.029285268... | |
I've been unable to build [P4Python](http://www.perforce.com/perforce/loadsupp.html#api) for an Intel Mac OS X 10.5.5.
These are my steps:
1. I downloaded p4python.tgz (from
<http://filehost.perforce.com/perforce/r07.3/tools/>) and expanded
it into "P4Python-2007.3".
2. I downloaded p4api.tar (from
<http://filehost.p... | [
0.29671651124954224,
0.05975092574954033,
0.49085959792137146,
-0.09598512947559357,
-0.12165506184101105,
0.3142397105693817,
0.3546902537345886,
-0.22436557710170746,
-0.07563893496990204,
-0.30968794226646423,
-0.2625865042209625,
0.6467021703720093,
-0.2853291630744934,
0.0449177920818... | |
-DID_REL="2007.3" -DID_PATCH="151416" -DID_API="2007.3" -DID_Y="2008" -DID_M="04" -DID_D="09" -I./p4api-2007.3.143793 -I./p4api-2007.3.143793/include/p4 -I/build/toolchain/mac32/python-2.4.3/include/python2.4 -c P4API.cpp -o build/temp.darwin-9.5.0-i386-2.4/P4API.o -DOS_MACOSX -DOS_MACOSX104 -DOS_MACOSXX86 -DOS_MACOSX1... | [
-0.1780579537153244,
0.14358490705490112,
0.3472733497619629,
0.009351767599582672,
0.08461935073137283,
0.21573905646800995,
0.7209410071372986,
-0.3992863595485687,
-0.1042979285120964,
-0.4283595681190491,
-0.12076873332262039,
0.4668988883495331,
-0.48632198572158813,
-0.10720339417457... | |
with: /var/tmp/gcc/gcc-5465~16/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tu... | [
0.39098718762397766,
0.32772013545036316,
0.4503655731678009,
-0.33143338561058044,
-0.012493928894400597,
0.015075585804879665,
0.6105409264564514,
-0.4111829996109009,
-0.2827743589878082,
-0.348355770111084,
-0.17359524965286255,
0.6372827291488647,
-0.343456506729126,
-0.02343158610165... | |
I want to allow an Excel report to be viewed embedded in a WebPage... is there a way?
* I don't want to use an ActiveX, or OWC (Office Web Components), I just want to open an existing file from the internet explorer application.
* I don't want users to download and then open it.
Using an iframe wouldn't be a problem,... | [
0.6800427436828613,
0.3487650156021118,
0.13674110174179077,
0.13835784792900085,
-0.04034114256501198,
-0.1624523401260376,
0.17113853991031647,
0.3716885447502136,
0.03360069915652275,
-0.8820022344589233,
0.13112521171569824,
0.2993611693382263,
-0.2757897973060608,
0.11641327291727066,... | |
the browser determines if it wants to open it itself or in a new window.
Here 2 microsoft pages on how to change these settings:
[http://support.microsoft.com/.../how-to-configure-internet-explorer-to-open-office-documents-in-the-app](https://support.microsoft.com/en-us/help/162059/how-to-configure-internet-explorer-... | [
-0.05468559265136719,
0.2558263838291168,
0.6953273415565491,
-0.0459226630628109,
0.021755708381533623,
-0.005157077684998512,
0.14125104248523712,
0.026028180494904518,
-0.16546957194805145,
-0.8886440396308899,
-0.6439195275306702,
0.4461888372898102,
-0.21579061448574066,
-0.2054294645... | |
Will learning C++ help me build native applications with good speed? Will it help me as a programmer, and what are the other benefits?
The reason why I want to learn C++ is because I'm disappointed with the UI performances of applications built on top of JVM and .NET. They feel slow, and start slow too. Of course, a r... | [
0.14944647252559662,
-0.056051261723041534,
-0.06114928051829338,
0.17131897807121277,
-0.08673528581857681,
-0.2733176052570343,
0.056114375591278076,
0.4678006172180176,
-0.20063117146492004,
-0.6346189975738525,
0.1539258360862732,
0.5315326452255249,
-0.10840834677219391,
-0.0205658450... | |
the first C++ release. As I became frustrated with C#’s large
> .NET framework requirements and users
> lack of desire to install it, I
> decided to switch back to the faster
> language.
I totally agree with the author of Launchy about the .NET framework requirement or even a JRE requirement for desktop applicatio... | [
-0.1962597817182541,
-0.09867004305124283,
0.10543356835842133,
-0.020322242751717567,
-0.4738689064979553,
-0.19994930922985077,
-0.054261643439531326,
0.26726898550987244,
-0.18633966147899628,
-0.4987907111644745,
0.10223302990198135,
0.7748751640319824,
-0.6739175915718079,
-0.39374440... | |
based applications?
And, I'm also very interested in hearing the other benefits of learning C++.
If you want to build Windows applications that will run without frameworks such as .NET or virtual machines/interpreters, then your only really viable choices are going to be Visual Basic or C/C++
I've written some small ... | [
0.5513996481895447,
0.12628063559532166,
0.17098580300807953,
0.2493458241224289,
-0.1841265708208084,
-0.09233196824789047,
-0.07200344651937485,
0.08365420997142792,
-0.11434097588062286,
-0.4866302013397217,
-0.1105944961309433,
0.6930818557739258,
-0.20866858959197998,
-0.4693163633346... | |
you'll need to write more code in certain situations, or seek out libraries like [Boost](http://www.boost.org/) that provide the functionality you're after.
As a programmer, working in C++ and especially in C is good experience for helping you understand something just a tad closer to the machine than say, .NET, Java ... | [
0.49170637130737305,
0.09344234317541122,
-0.03156508505344391,
0.3113098740577698,
-0.10988713055849075,
-0.2872263491153717,
0.16253627836704254,
0.02130531705915928,
-0.3276311159133911,
-0.5191245675086975,
-0.04985122010111809,
0.7700797319412231,
0.08412251621484756,
-0.2481005638837... | |
on are written in pure C, so it will never hurt you to understand the foundations. C++ is a different animal from straight C, but if you develop in C++ for Windows you'll likely find yourself working in a mix of C and C++ to work with Windows APIs, so it will have a trickle-down effect. | [
0.7826744914054871,
0.02150757610797882,
0.0029609668999910355,
-0.08681412786245346,
0.19991062581539154,
0.2362450361251831,
-0.015231747180223465,
-0.03529489040374756,
-0.04665640741586685,
-0.42791420221328735,
-0.19224682450294495,
0.6537277698516846,
-0.12660937011241913,
-0.0747053... | |
In a recent project the "lead" developer designed a database schema where "larger" tables would be split across two separate databases with a view on the main database which would union the two separate database-tables together. The main database is what the application was driven off of so these tables looked and felt... | [
0.42173436284065247,
0.0967959612607956,
-0.0001876477908808738,
0.3436010479927063,
0.07683803141117096,
-0.08283550292253494,
-0.03770436346530914,
-0.06664765626192093,
-0.4533291459083557,
-0.4656149744987488,
0.09444800764322281,
0.29309457540512085,
-0.3876611888408661,
0.22824144363... | |
if it is even worth doing?
I don't think that you are really going to gain anything by partitioning the table across multiple databases in a single server. All you have essentially done there is increased the overhead in working with the "table" in the first place by having several instances (i.e. open in two different... | [
0.42850586771965027,
0.17505669593811035,
0.15030406415462494,
0.19072183966636658,
0.07536156475543976,
-0.13867035508155823,
-0.25876256823539734,
-0.1649203896522522,
-0.5254773497581482,
-0.42288896441459656,
0.308102011680603,
0.3857071101665497,
0.11217311769723892,
0.453213542699813... | |
any noticiable speed problems.
Tuning the indexes and choosing the correct clustered index is crucial to performance of course.
If your dataset is really large and you are looking to partition, you will get more bang for your buck partitioning the table across physical servers. | [
-0.19341537356376648,
-0.1399022787809372,
0.5098187327384949,
0.459896981716156,
-0.07808244228363037,
-0.41897353529930115,
-0.16295219957828522,
-0.031218580901622772,
-0.8093180060386658,
-0.7300801277160645,
-0.11501865088939667,
0.5623087286949158,
-0.13430774211883545,
0.19508573412... | |
It looks like I had a fundamental misunderstanding about C++ :<
I like the polymorphic container solution. Thank you SO, for bringing that to my attention :)
---
So, we have a need to create a relatively generic container type object. It also happens to encapsulate some business related logic. However, we need to st... | [
0.26442649960517883,
0.15604257583618164,
-0.3325749337673187,
0.2124074548482895,
-0.13841170072555542,
-0.407583624124527,
-0.12982526421546936,
0.10214409977197647,
-0.22912020981311798,
-0.38591691851615906,
-0.10766959190368652,
0.4038196802139282,
-0.43321850895881653,
0.254615634679... | |
some complex logic that we are going to have to work, I would rather just stick with either templates OR polymorphism, and not try to fight C++ by making it do both.
Finally, given that I want to do one or the other, I would prefer polymorphism. I find it much easier to represent constraints like "this container conta... | [
0.08045898377895355,
0.004868907388299704,
-0.029057199135422707,
0.07615815848112106,
-0.06595071405172348,
-0.2273041307926178,
0.12859748303890228,
0.10235288739204407,
-0.238026961684227,
-0.6535974740982056,
0.12310327589511871,
0.652509868144989,
-0.2914181351661682,
0.05135381966829... | |
not actually trying to implement a stack).
However, I don't really like void\* at the top level, not to mention the signature is going to change every time I want to add a constraint to the type of data a concrete container can work with.
Summarizing: We have relatively complex containers that have various ways to re... | [
0.17734116315841675,
-0.10796691477298737,
-0.023916983976960182,
0.33144792914390564,
0.09465640038251877,
-0.12464038282632828,
0.3089422285556793,
-0.06367309391498566,
-0.4075746238231659,
-0.5291997194290161,
0.0509779192507267,
0.46278128027915955,
-0.3778984248638153,
-0.19142852723... | |
themselves need to be polymorphic. That is my primary reason for not wanting to use templated C++.
So - should I drop my love for Java type interfaces and go with templates? Should I use void\* and statically cast everything? Or should I go with an empty class definition "Element" that declares nothing and use that as... | [
0.18541622161865234,
0.2357000857591629,
-0.042633093893527985,
0.12042200565338135,
-0.27491384744644165,
-0.048649512231349945,
0.37019678950309753,
-0.28092464804649353,
-0.33841148018836975,
-0.623026967048645,
-0.1419084519147873,
0.3020651638507843,
-0.6014811396598816,
-0.1984902322... | |
and comments.
Can you not have a root Container class that contains elements:
```
template <typename T>
class Container
{
public:
// You'll likely want to use shared_ptr<T> instead.
virtual void push(T *element) = 0;
virtual T *pop() = 0;
virtual void InvokeSomeMethodOnAllItems() = 0;
};
template <typen... | [
0.16447973251342773,
-0.18998992443084717,
0.4176865220069885,
-0.027881097048521042,
0.2030719518661499,
0.24405209720134735,
0.022759249433875084,
-0.398944228887558,
-0.2810649871826172,
-0.49188607931137085,
-0.2896571159362793,
0.671079695224762,
-0.24131543934345245,
0.39545160531997... | |
= begin(); currItem != end(); ++currItem)
{
T* item = *currItem;
item->SomeMethod();
}
}
};
```
These containers can then be passed around polymorphically:
```
class Item
{
public:
virtual void SomeMethod() = 0;
};
class ConcreteItem
{
public:
virtual void SomeMethod()... | [
0.4030420184135437,
-0.2956433594226837,
0.623065710067749,
-0.3410741984844208,
0.0004138641816098243,
0.3805420994758606,
0.2676904499530792,
-0.4009605348110199,
-0.31608885526657104,
-0.4213084280490875,
-0.35459402203559875,
0.38883569836616516,
-0.2513120472431183,
0.3105850219726562... | |
new ConcreteItem());
listInstance.InvokeSomeMethodOnAllItems();
```
This gives you the Container interface in a type-safe generic way.
If you want to add constraints to the type of elements that can be contained, you can do something like this:
```
class Item
{
public:
virtual void SomeMethod() = 0;
typedef int... | [
0.16502328217029572,
-0.2822483777999878,
0.47982317209243774,
-0.10718490928411484,
0.07305476069450378,
0.01935485377907753,
0.3686842918395996,
-0.4776112139225006,
-0.28265684843063354,
-0.6236351728439331,
0.05855695903301239,
0.5574357509613037,
-0.5096109509468079,
0.313679248094558... | |
For my current project, I need to request XML data over a tcp/ip socket connection. For this, I am using the TcpClient class:
```
Dim client As New TcpClient()
client.Connect(server, port)
Dim stream As NetworkStream = client.GetStream()
stream.Write(request)
stream.Read(buffer, 0, buffer.length)
// Output buffer an... | [
0.22780834138393402,
-0.22051946818828583,
0.8213903903961182,
0.015256272628903389,
-0.09209378808736801,
-0.24356479942798615,
-0.04013616219162941,
-0.1664673089981079,
-0.25155341625213623,
-0.7988986372947693,
-0.08776064217090607,
0.664084255695343,
-0.12775716185569763,
0.2513157427... | |
Initially I tried to just loop until I had a valid XML document, but I found that in between stream.Read calls the underlying stream would sometimes get shut down and I would miss out on the last portion of the data.
You create a loop for reading.
Stream.Read returns int for the bytes it read so far, or 0 if the end o... | [
0.26907098293304443,
-0.15902124345302582,
0.14809422194957733,
-0.07639919966459274,
-0.19325312972068787,
0.030945898965001106,
0.0802726224064827,
-0.213245689868927,
-0.21721255779266357,
-0.4287117123603821,
0.08353685587644577,
0.1965470314025879,
-0.30218276381492615,
0.310754776000... | |
that's ok, you can use the above snippet. But if you have to read until the server closes the connection, then you have to use try/catch (which is good idea even if you know the size), and use bytes\_read to determine what you received.
```
int bytes_read = 0;
try
{
int i = 0;
while ( 0 < (i = stream.Read(buffer... | [
-0.008324472233653069,
-0.28361740708351135,
0.5434576272964478,
-0.0967126116156578,
0.08954381942749023,
-0.1035207211971283,
0.36767175793647766,
-0.21464546024799347,
-0.19022536277770996,
-0.5582860112190247,
-0.24689756333827972,
0.4714556932449341,
-0.24835273623466492,
0.1936936974... | |
I have a personal wiki that I take notes on. The wiki's pages are in a subversion working copy directory, "pages", and I set their permissions to 664, owned by www-data:www-data. My username is in the "www-data" group, so I can checkin and mess with the pages manually.
For a while, I had an issue because every time I ... | [
0.4362730085849762,
0.2113359272480011,
0.7695562243461609,
0.16698792576789856,
-0.0678233653306961,
-0.039680059999227524,
0.19414199888706207,
-0.11255966126918793,
-0.2152908444404602,
-0.43577635288238525,
0.07109520584344864,
0.2523195445537567,
-0.1684824824333191,
0.354796856641769... | |
but I'm still confused as to why this happened in the first place:
Every time I check something into subversion, it appears as if svn deletes it and recreates it. Why? Does this behavior support some functionality that I'm not aware of? Is there a way to change it?
Thanks!
Set the "sticky" permissions bit.
```
find... | [
0.49833914637565613,
0.037356097251176834,
0.5552524328231812,
0.2306959331035614,
0.08890461921691895,
-0.4793238341808319,
0.22371737658977509,
0.07244344800710678,
-0.43742820620536804,
-0.5047066807746887,
-0.1403573900461197,
0.34404027462005615,
-0.23708803951740265,
0.34284499287605... | |
and other readers. | [
0.18416139483451843,
0.1746203750371933,
0.13955742120742798,
0.02349182218313217,
0.43394821882247925,
0.24284757673740387,
-0.024266641587018967,
0.10603401064872742,
-0.1678754836320877,
-0.17746935784816742,
-0.3661254048347473,
0.46001380681991577,
0.21426554024219513,
0.0500557683408... | |
How do you post data to an iframe?
Depends what you mean by "post data". You can use the HTML `target=""` attribute on a `<form />` tag, so it could be as simple as:
```
<form action="do_stuff.aspx" method="post" target="my_iframe">
<input type="submit" value="Do Stuff!">
</form>
<!-- when the form is submitted, th... | [
0.4311715364456177,
-0.10627410560846329,
0.3504955470561981,
0.06434497982263565,
-0.1964210420846939,
-0.031872812658548355,
0.02136930264532566,
-0.15132904052734375,
-0.06991644948720932,
-0.6167863607406616,
-0.09341681003570557,
-0.036855559796094894,
-0.2722363770008087,
-0.00281807... | |
using ordinary HTML markup, you're fine. The target attribute and frame names isn't some clever ninja hack; although it was deprecated (and therefore won't validate) in HTML 4 Strict or XHTML 1 Strict, it's been part of HTML since 3.2, it's formally part of HTML5, and it works in just about every browser since Netscape... | [
0.5484254956245422,
-0.1827591359615326,
0.40357089042663574,
-0.1152748391032219,
-0.11469846218824387,
-0.2855314612388611,
0.5619105696678162,
-0.22809039056301117,
-0.24958956241607666,
-0.6817395687103271,
-0.07724025845527649,
0.6913390755653381,
-0.29223793745040894,
-0.257520973682... | |
on IIS 6; they're reproduced here in full so you can verify this behaviour for yourself.
**default.asp**
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Form Iframe Demo</title>
</... | [
-0.016261771321296692,
-0.042734354734420776,
0.6318042278289795,
-0.06475196778774261,
-0.10606309026479721,
-0.005037338472902775,
0.28561583161354065,
-0.6981463432312012,
-0.2791786789894104,
-0.7652108073234558,
-0.38752269744873047,
0.5282930135726929,
-0.2175023853778839,
-0.0959029... | |
<% } else { %>
(not submitted)
<% } %>
</body>
</html>
```
I would be very interested to hear of any browser that doesn't run these examples correctly. | [
0.5423293709754944,
0.26666340231895447,
0.2212720662355423,
0.005480160936713219,
-0.4421248733997345,
-0.2244793325662613,
0.30503061413764954,
0.09004411101341248,
0.02944883517920971,
-0.7187432646751404,
-0.13189095258712769,
0.2612560987472534,
-0.14596104621887207,
0.003829885507002... | |
For my customer I occasionally do work in their live database in order to fix a problem they have created for themselves, or in order to fix bad data that my product's bugs created. Much like Unix root access, it's just dangerous. What lessons should I learn ahead of time?
What is the #1 thing you do to be careful abo... | [
0.7160316705703735,
0.2156044989824295,
0.14424489438533783,
0.05044567957520485,
0.4353887140750885,
-0.15193326771259308,
0.3192451298236847,
0.12159381806850433,
-0.14023415744304657,
-0.3826231360435486,
0.12456832826137543,
0.9442972540855408,
-0.004649147856980562,
-0.066804520785808... | |
it's correct. Then prepend the UPDATE/DELETE statement to the known working WHERE clause.
You never want to have
```
DELETE FROM Customers
```
sitting in your query analyzer waiting for you to write the WHERE clause... accidentally hit "execute" and you've just killed your Customer table. Oops.
Also, depending on... | [
-0.02546164207160473,
0.23013737797737122,
0.3863151967525482,
0.08868824690580368,
0.16980884969234467,
-0.3840983211994171,
0.358015775680542,
-0.0750388354063034,
-0.12934838235378265,
-0.3120485246181488,
-0.09516504406929016,
0.7358812093734741,
-0.4218143820762634,
0.1082554310560226... | |
lot easier to restore missing data from this table than to try and restore last night's backup from disk or tape.
Finally, be wary of cascade deletes getting rid of stuff you didn't intend to delete - check your tables' relationships and key constraints before modifying anything. | [
-0.04058601334691048,
0.00868263654410839,
0.21988412737846375,
0.39795243740081787,
0.27628520131111145,
-0.06347593665122986,
0.48140251636505127,
-0.1356242299079895,
-0.5461028218269348,
-0.4328617751598358,
0.19130538403987885,
0.5676751732826233,
0.0462220199406147,
-0.19268062710762... | |
Scrum is quite popular dev.process these days and often Project Manager suddenly gets new title (Scrum Master). However it should be not just a new title, but new habits and new paradigm. What are the bad habits of your Scrum master?
The big bad habit our Scrum Master had at first was thinking we would take care of our... | [
0.5933127403259277,
0.10737257450819016,
-0.06425058096647263,
-0.21714738011360168,
-0.40694770216941833,
-0.2935483455657959,
0.40333667397499084,
-0.06127305328845978,
-0.33866631984710693,
-0.22119949758052826,
0.5967624187469482,
0.63103187084198,
-0.22075513005256653,
0.2407374680042... | |
backs until tasks were taken care of. This creates a bad atmosphere on the team since they're supposed to be self-managing.
To me and our team, the Scrum Master's job is to be a shield and assistant for the team, blocking impediments and doing what they can to help expedite things. Ken Schwaber's **Agile Software Deve... | [
0.4359799027442932,
0.10162322223186493,
-0.05362962186336517,
-0.417585164308548,
-0.24881881475448608,
0.1360711008310318,
0.10948361456394196,
-0.426187127828598,
-0.08913896232843399,
-0.6703153252601624,
-0.2009926587343216,
0.5868244767189026,
0.3230974078178406,
-0.4662482738494873,... | |
I found this via google: <http://www.mvps.org/access/api/api0008.htm>
```vb
'******************** Code Start **************************
' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided... | [
0.16612985730171204,
0.043274275958538055,
0.7674993872642517,
-0.213440403342247,
-0.02564048208296299,
0.007764910347759724,
0.206288143992424,
0.014028776437044144,
-0.15286386013031006,
-0.4537401497364044,
-0.12426581233739853,
0.18231838941574097,
-0.5305745005607605,
0.4178662598133... | |
= 255
lngX = apiGetUserName(strUserName, lngLen)
If ( lngX > 0 ) Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = vbNullString
End If
End Function
'******************** Code End **************************
```
Is this the best way to do it?
You could also use Environ... | [
0.06849920749664307,
-0.05300373584032059,
0.7505404353141785,
-0.4049089252948761,
-0.0012187729589641094,
0.023618977516889572,
0.2997746467590332,
-0.08038794994354248,
-0.27837735414505005,
-0.6774455308914185,
-0.20577865839004517,
0.5618675947189331,
-0.535728394985199,
0.10553169250... | |
How would you go about introducing acceptance tests into a team using the .NET framework? What tools are available for this purpose?
Thanks!
You might want to take a look at FitNesse, which is meant to be a way for Acceptance tests to look like a wiki document (so that they can be read and written by QA or project man... | [
0.7534970045089722,
-0.1138928234577179,
-0.4029799997806549,
0.18643374741077423,
-0.04239487275481224,
-0.4011009633541107,
0.42123135924339294,
-0.1496409773826599,
0.15319858491420746,
-0.45462021231651306,
0.273643434047699,
0.5318898558616638,
0.1032237559556961,
-0.350734144449234,
... | |
I have a table on SQL2000 with a numeric column and I need the select to return a 01, 02, 03...
It currently returns 1,2,3,...10,11...
Thanks.
Does this work?
```
SELECT REPLACE(STR(mycolumn, 2), ' ', '0')
```
From <http://foxtricks.blogspot.com/2007/07/zero-padding-numeric-value-in-transact.html> | [
0.3038838505744934,
0.15606148540973663,
0.39220136404037476,
0.06448584794998169,
0.06840284168720245,
0.14678329229354858,
0.09856878966093063,
0.051113687455654144,
0.0006417479016818106,
-0.3183688819408417,
0.5437405109405518,
0.43178099393844604,
-0.3185327351093292,
0.35029339790344... | |
I'm looking for recommendations on books about MVC on the desktop. If they use Java, that is a bonus.
Some background:
I'm writing a desktop application in Java. It's an audio application that has a number of views and a central model called a Library with playlists, effects lists and a folder structure to organize th... | [
0.35811087489128113,
0.21811845898628235,
0.19602985680103302,
0.19812995195388794,
0.08742751181125641,
-0.2000875622034073,
-0.16914808750152588,
-0.1410338282585144,
-0.2113027423620224,
-0.5102706551551819,
0.18890593945980072,
0.8157402276992798,
-0.2644737660884857,
-0.04801168665289... | |
own classes. Now I need to start using listeners and observers to handle messages between the views and the controller. This led to me creating a number of interfaces and looping through my listeners in several places to fire off various messages. But that loop code keeps getting repeated (not DRY), so I'm assuming tha... | [
0.44252723455429077,
-0.2420424222946167,
0.4173338711261749,
0.2655976712703705,
-0.5702763199806213,
0.0016940105706453323,
0.25385624170303345,
-0.06986081600189209,
-0.24705417454242706,
-0.5892717242240906,
0.27884072065353394,
0.58668053150177,
0.25494685769081116,
-0.145696476101875... | |
problem: it really takes a lot of discipline to write a (non trivial) swing app, because all the listeners and events and asynchronous processing make up really fast for a big pile of unmaintainable code.
I found that classic MVC isn't enough, you have to look into more specific patterns like [Presentation Model](htt... | [
0.2655709683895111,
0.1964942067861557,
-0.044343214482069016,
0.06479650735855103,
-0.3046984076499939,
0.23048913478851318,
0.3367374539375305,
-0.45854219794273376,
-0.3537991940975189,
-0.33586519956588745,
-0.14108119904994965,
0.16189341247081757,
-0.3650270402431488,
-0.687629818916... | |
...), Delap's book will help you architect a medium-sized swing application, best practices, etc. | [
0.5798664093017578,
-0.06053747981786728,
0.44202920794487,
0.30851876735687256,
0.11933836340904236,
-0.4444880485534668,
-0.3474772274494171,
-0.22610704600811005,
-0.04559691622853279,
-0.5210828185081482,
-0.1222086176276207,
0.24078960716724396,
0.23434630036354065,
-0.302157998085022... | |
Is there a way to produce a diagram showing existing tables and their relationships given a connection to a database?
This is for SQL Server 2008 Express Edition.
Yes you can use SQL Server 2008 itself but you need to install SQL Server Management Studio Express (if not installed ) . Just right Click on Database Diagr... | [
-0.2044692188501358,
0.21771210432052612,
0.44605886936187744,
0.14972731471061707,
-0.47443434596061707,
-0.13514766097068787,
0.1292857676744461,
-0.2108578383922577,
-0.44313713908195496,
-0.5014429092407227,
0.3320479691028595,
0.24887816607952118,
-0.28213581442832947,
0.0212143640965... | |
I've exposed several web services in our product using Java and WS-Security. One of our customers wants to consume the web service using ColdFusion. Does ColdFusion support WS-Security? Can I get around it by writing a Java client and using that in ColdFusion?
(I don't know much about ColdFusion).
I'm assuming you mea... | [
0.48106327652931213,
0.36704087257385254,
0.03944296017289162,
-0.13238073885440826,
0.008951705880463123,
-0.295841783285141,
0.2153356671333313,
-0.11442668735980988,
-0.06026296317577362,
-0.6685971617698669,
0.06336802244186401,
0.4667118191719055,
-0.21380500495433807,
0.0484859757125... | |
"xsd:string">
<cfset local.soapHeader.TheSoapHeader = xmlElemNew(local.soapHeader, "http://webserviceUrl.com/", "TheSoapHeader")>
<cfset local.soapHeader.TheSoapHeader.Password.XmlText = "bar">
<cfset local.soapHeader.TheSoapHeader.Password.XmlAttributes["xsi:type"] = "xsd:string">
<cfset theWebService = createObject... | [
0.17892421782016754,
0.13129675388336182,
0.42839646339416504,
-0.2233256697654724,
-0.05821838602423668,
-0.16126905381679535,
0.0945996642112732,
-0.11819472163915634,
-0.2895315885543823,
-0.8132545351982117,
-0.10948149859905243,
0.3063258230686188,
-0.16554751992225647,
0.089356809854... | |
I wish to perform an experiment many different times. After every trial, I am left with a "large" set of output statistics -- let's say, 1000. I would like to store the outputs of my experiments in a table, but what's the best way...?
### Option 1
Have a table with 1000 columns. Seems like a bad idea. What if the num... | [
0.26583191752433777,
-0.0048724012449383736,
0.2653157711029053,
0.41251590847969055,
-0.14195778965950012,
0.48553669452667236,
-0.03021024912595749,
-0.34787407517433167,
-0.1751554012298584,
-0.8479113578796387,
0.32147035002708435,
0.26365798711776733,
-0.3371911644935608,
-0.045938137... | |
becomes more complicated. Moreover, what if different statistics are different data types??
Any suggestions?
Option 2, with ID, TrialID, StatisticID, StatisticValue
With proper indexing, it will perform fairly well (you can use PIVOT to get the values out on columns fairly easily in SQL Server 2005).
When the statis... | [
-0.0928020030260086,
-0.12134340405464172,
0.43995562195777893,
0.28415563702583313,
-0.2923209071159363,
0.1751338541507721,
-0.006766552105545998,
-0.37114831805229187,
-0.31111085414886475,
-0.6961745619773865,
0.4059566259384155,
0.5979228019714355,
-0.11325154453516006,
-0.13553144037... | |
Is it more performant to have a bidimensional array (`type[,]`) or an array of arrays (`type[][]`) in C#?
Particularly for initial allocation and item access
Of course, if all else fails... test it! Following gives (in "Release", at the console):
```
Size 1000, Repeat 1000
int[,] set: 3460
int[,] get: 4036 (c... | [
-0.07731375098228455,
-0.19433298707008362,
0.08784186840057373,
-0.0944230780005455,
-0.07820645719766617,
-0.07214978337287903,
0.3506324887275696,
-0.5159981846809387,
-0.06705637276172638,
-0.48634734749794006,
-0.0592898391187191,
0.54509037733078,
-0.01852508634328842,
-0.36674541234... | |
(high CPU/processing) scenarios, readability / maintainability should trump a small performance gain. Up to you, though.
Note that this test assumes you access the array much more often than you create it, so I have not included timings for creation, where I would *expect* rectangular to be slightly quicker unless mem... | [
0.14983239769935608,
-0.3162405490875244,
0.1401321142911911,
-0.17336057126522064,
-0.08017133176326752,
0.13488654792308807,
0.10057283937931061,
-0.1487865000963211,
-0.22939959168434143,
-0.6157101392745972,
-0.25617825984954834,
0.4758443534374237,
-0.17269954085350037,
0.064718477427... | |
Test(1000,1000);
Console.ReadLine();
}
static void Test(int size, int repeat)
{
Console.WriteLine("Size {0}, Repeat {1}", size, repeat);
int[,] rect = new int[size, size];
int[][] jagged = new int[size][];
for (int i = 0; i < size; i++)
{ // don't count this... | [
0.2731701731681824,
-0.3795270025730133,
0.14804154634475708,
-0.2784891724586487,
0.11257871985435486,
0.29133617877960205,
0.5143880248069763,
-0.3619654178619385,
0.13483454287052155,
-0.7277135252952576,
-0.019911961629986763,
0.3535296320915222,
-0.01093610841780901,
0.322841972112655... | |
jagged[i] = new int[size];
}
Stopwatch watch = Stopwatch.StartNew();
for (int cycle = 0; cycle < repeat; cycle++)
{
for (int i = 0; i < size; i++)
{ | [
-0.14095191657543182,
-0.611479640007019,
0.3158303201198578,
-0.425409734249115,
0.024248173460364342,
0.41204634308815,
0.47507503628730774,
-0.15955215692520142,
-0.40877529978752136,
-0.41551074385643005,
0.21453212201595306,
0.5327586531639099,
-0.29232341051101685,
0.1491856426000595... | |
for (int j = 0; j < size; j++)
{
rect[i, j] = i * j;
}
}
}
watch.Stop(); | [
0.32661575078964233,
-0.45286956429481506,
0.40098318457603455,
-0.4263152480125427,
0.4369778633117676,
0.13869506120681763,
0.6445869207382202,
0.13036465644836426,
-0.2695806324481964,
-0.3172866702079773,
-0.27267640829086304,
0.7423643469810486,
-0.47496846318244934,
0.044578060507774... | |
Console.WriteLine("\tint[,] set: " + watch.ElapsedMilliseconds);
int sum = 0;
watch = Stopwatch.StartNew();
for (int cycle = 0; cycle < repeat; cycle++)
{
for (int i = 0; i < size; i++)
{ | [
0.22319629788398743,
-0.3455698490142822,
0.9558621048927307,
-0.29806676506996155,
0.3800514042377472,
0.3051343262195587,
0.2653759717941284,
-0.37271398305892944,
-0.11476873606443405,
-0.5839107632637024,
-0.039581298828125,
0.7108414769172668,
-0.2201051265001297,
0.23136551678180695,... | |
for (int j = 0; j < size; j++)
{
sum += rect[i, j];
}
}
}
watch.Stop(); | [
0.25078850984573364,
-0.4542447328567505,
0.41316425800323486,
-0.44830626249313354,
0.37300512194633484,
0.1262984722852707,
0.5978249907493591,
-0.018619529902935028,
-0.26958799362182617,
-0.2660391926765442,
-0.2512478530406952,
0.6706801056861877,
-0.48414576053619385,
0.0809083059430... | |
Console.WriteLine("\tint[,] get: {0} (chk={1})", watch.ElapsedMilliseconds, sum);
watch = Stopwatch.StartNew();
for (int cycle = 0; cycle < repeat; cycle++)
{
for (int i = 0; i < size; i++)
{
for (int j = 0; j < size; j++) | [
0.126729354262352,
-0.34952986240386963,
0.9444014430046082,
-0.19076289236545563,
0.39287829399108887,
0.25627896189689636,
0.23842917382717133,
-0.24092991650104523,
-0.0448385551571846,
-0.6296650767326355,
0.0468248650431633,
0.6541574001312256,
-0.18997067213058472,
0.2475735247135162... | |
{
jagged[i][j] = i * j;
}
}
}
watch.Stop();
Console.WriteLine("\tint[][] set: " + watch.ElapsedMilliseconds);
sum | [
-0.2275061458349228,
-0.4951036870479584,
0.6162711977958679,
-0.29531732201576233,
0.2959436774253845,
0.11283182352781296,
0.7044517993927002,
-0.11152735352516174,
-0.051090989261865616,
-0.4212305545806885,
-0.07240887731313705,
0.653382420539856,
0.02841523475944996,
0.155403405427932... | |
= 0;
watch = Stopwatch.StartNew();
for (int cycle = 0; cycle < repeat; cycle++)
{
for (int i = 0; i < size; i++)
{
for (int j = 0; j < size; j++) | [
0.41044941544532776,
-0.47036367654800415,
0.6193028688430786,
-0.47354891896247864,
0.189258873462677,
0.4011574983596802,
0.43408477306365967,
-0.25695550441741943,
-0.40049684047698975,
-0.4754861891269684,
-0.11755718290805817,
0.4240260422229767,
-0.466966837644577,
0.0696955695748329... | |
{
sum += jagged[i][j];
}
}
}
watch.Stop();
Console.WriteLine("\tint[][] get: {0} (chk={1})", watch.ElapsedMilliseconds, sum);
}
}
``` | [
0.022560512647032738,
-0.2881627678871155,
0.6597359776496887,
-0.15567506849765778,
0.24878434836864471,
0.062420982867479324,
0.5660407543182373,
-0.19233156740665436,
-0.19446416199207306,
-0.37679818272590637,
-0.12765370309352875,
0.4886620044708252,
-0.029700007289648056,
0.344451248... | |
Ok, I'm using the term "Progressive Enhancement" kind of loosely here but basically I have a Flash-based website that supports deep linking and loads content dynamically - what I'd like to do is provide alternate content (text) for those either not having Flash and for search engine bots. So, for a user with flash they... | [
0.5809212327003479,
-0.08384198695421219,
0.031973738223314285,
0.1370406299829483,
-0.18977090716362,
-0.08652801811695099,
-0.03742057457566261,
0.13879044353961945,
-0.3158494234085083,
-0.5227149724960327,
0.2105184644460678,
0.6862893104553223,
-0.4006291925907135,
0.06524581462144852... | |
swf is also using dynamic data. The question is, does something out there that does this already exist?
Looking at the solutions you linked... it is actually as simple as my frivolous comment!
Here's a version of the Zach Leatherman code that prepends "In " for future dates for you. As you can see, the changes are ver... | [
0.5030600428581238,
-0.40755563974380493,
0.699495792388916,
-0.20149168372154236,
0.5548056364059448,
-0.15578491985797882,
0.19928666949272156,
0.03954267501831055,
-0.06081453338265419,
-0.6748771071434021,
-0.09912614524364471,
0.3399055600166321,
-0.26204052567481995,
0.21357583999633... | |
[3600, 'Minutes', 60], // 60*60, 60
[5400, '1 Hour'], // 60*60*1.5
[86400, 'Hours', 3600], // 60*60*24, 60*60
[129600, '1 Day'], // 60*60*24*1.5
[604800, 'Days', 86400], // 60*60*24*7, 60*60*24
[907200, '1 Week'], // 60*60*24*7*1.5
[2628000, 'Weeks', 604800], ... | [
0.3105529546737671,
-0.1011485680937767,
0.20138230919837952,
0.0885055661201477,
0.11534503102302551,
0.8675654530525208,
0.30174657702445984,
-0.08184166252613068,
-0.5375945568084717,
-0.48821520805358887,
-0.2912999987602234,
0.014856578782200813,
-0.004404181148856878,
0.4450548589229... | |
[3942000, '1 Month'], // 60*60*24*(365/12)*1.5
[31536000, 'Months', 2628000], // 60*60*24*365, 60*60*24*(365/12)
[47304000, '1 Year'], // 60*60*24*365*1.5
[3153600000, 'Years', 31536000], // 60*60*24*365*100, 60*60*24*365
[4730400000, '1 Century'], // 60*60*24*365*100*1.5
]... | [
0.1443992257118225,
-0.027886059135198593,
0.421396404504776,
-0.11278695613145828,
0.08368994295597076,
0.6228870153427124,
0.28531402349472046,
-0.08083155751228333,
-0.4051506519317627,
-0.5913693308830261,
-0.2820420563220978,
-0.02212907373905182,
0.029960019513964653,
0.7042376995086... | |
seconds = ((dt - new Date(time) + (dt.getTimezoneOffset() * 60000)) / 1000),
token = ' Ago',
prepend = '',
i = 0,
format;
if (seconds < 0) {
seconds = Math.abs(seconds);
token | [
0.06804535537958145,
-0.5419591069221497,
0.12798303365707397,
-0.10142868757247925,
0.2549494504928589,
0.24269504845142365,
0.18961787223815918,
-0.006635628640651703,
-0.23169593513011932,
-0.5198591947555542,
-0.34780606627464294,
-0.1144099235534668,
0.23247148096561432,
0.36424285173... | |
= '';
prepend = 'In ';
}
while (format = time_formats[i++]) {
if (seconds < format[0]) {
if (format.length == 2) {
return (i>1?prepend:'') + format[1] + (i > 1 ? token : ''); // Conditional so we don't return Just Now | [
0.18087105453014374,
-0.5630322694778442,
0.14517275989055634,
-0.2090919464826584,
0.07929294556379318,
0.07535336911678314,
0.3370184898376465,
-0.46639296412467957,
-0.047148238867521286,
-0.36617565155029297,
-0.3693419098854065,
0.2935079336166382,
0.19962510466575623,
0.0982923358678... | |
Ago
} else {
return prepend + Math.round(seconds / format[2]) + ' ' + format[1] + (i > 1 ? token : '');
}
}
}
// overflow for centuries
if(seconds > 4730400000) | [
-0.08155224472284317,
-0.19645459949970245,
0.46437662839889526,
0.026170210912823677,
0.21937276422977448,
-0.09763520956039429,
-0.03944142162799835,
-0.2173142284154892,
-0.21224260330200195,
-0.4979783892631531,
-0.23722659051418304,
0.1384955644607544,
0.2132207453250885,
0.5172634720... | |
return Math.round(seconds / 4730400000) + ' Centuries' + token;
return date_str;
};
``` | [
0.018567951396107674,
-0.07020208984613419,
0.22742444276809692,
-0.2987233102321625,
0.2531929314136505,
0.07902918756008148,
0.10916097462177277,
0.014889759942889214,
-0.22832687199115753,
-0.2895246148109436,
-0.3154507875442505,
0.15825898945331573,
0.04340679943561554,
0.757153391838... | |
---
**The [HttpRequestPool](http://docs.php.net/manual/en/class.httprequestpool.php) class provides a solution. Many thanks to those who pointed this out.**
A brief tutorial can be found at: <http://www.phptutorial.info/?HttpRequestPool-construct>
---
**Problem**
I'd like to make concurrent/parallel/simultaneous H... | [
0.18215890228748322,
0.015206725336611271,
0.4528208374977112,
0.24832488596439362,
-0.17897753417491913,
-0.08901049941778183,
0.45762959122657776,
-0.07701762765645981,
-0.3978426158428192,
-0.6177036166191101,
0.03338105231523514,
0.613656222820282,
-0.11724639683961868,
0.0590962655842... | |
if at all possible.
Specifically, I need to POST data concurrently to a set of URLs. The URLs to which data are posted are beyond my control; they are user-set.
I don't mind if I need to wait for all requests to finish before the responses can be processed. If I set a timeout of 30 seconds on each request and request... | [
0.5686623454093933,
-0.03856760263442993,
0.5508014559745789,
0.18350335955619812,
0.059639908373355865,
-0.09532109647989273,
0.3830174505710602,
0.058458998799324036,
-0.4316830635070801,
-0.537168562412262,
-0.1626676470041275,
0.15066830813884735,
0.04432981088757515,
0.205819144845008... | |
the PHP manual of PHP5+ being able to handle concurrent HTTP requests - I intended to make a note of it at the time, forgot, and cannot find it again.
**Single request example (works fine)**
```
<?php
$request_1 = new HttpRequest($url_1, HTTP_METH_POST);
$request_1->setRawPostData($dataSet_1);
$request_1->send();
?>
... | [
0.11057275533676147,
0.10494382679462433,
0.6621861457824707,
0.05886773765087128,
-0.33778876066207886,
-0.014792077243328094,
0.4031042158603668,
-0.41153040528297424,
-0.0045258160680532455,
-0.6768248677253723,
-0.17105677723884583,
0.6374812126159668,
-0.2603807747364044,
-0.276018887... | |
in use should be beneficial from a maintenance perspective
* I generally have to write fewer lines of code to make an HTTP request using the PECL HTTP functions compared to using cURL - fewer lines of code should also be beneficial from a maintenance perspective
**Clarification 2**: I realise PHP's HTTP functions aren... | [
0.3921321630477905,
0.0834575667977333,
0.4337215721607208,
-0.12685900926589966,
-0.21219363808631897,
-0.3990466892719269,
0.5248498916625977,
-0.19936633110046387,
0.06561239808797836,
-0.5975922346115112,
0.053236786276102066,
0.5564096570014954,
-0.18376728892326355,
-0.30815479159355... | |
happy if someone authoritatively states that the PECL HTTP cannot do this.
I'm pretty sure [HttpRequestPool](http://docs.php.net/manual/en/class.httprequestpool.php) is what you're looking for.
To elaborate a little, you can use forking to achieve what you're looking for, but that seems unnecessarily complex and not v... | [
0.2523365318775177,
-0.019211169332265854,
0.7743757963180542,
-0.2548963725566864,
0.09242156893014908,
-0.05875128507614136,
0.03168850392103195,
-0.2635989785194397,
-0.3859403133392334,
-0.5899868607521057,
-0.2827722728252411,
0.7651277184486389,
-0.6425365805625916,
-0.22783219814300... | |
I'm trying to add the lucene sandbox contribution called [term-highlighter](http://lucene.apache.org/java/docs/lucene-sandbox/index.html#Term%20Highlighter) to my pom.xml.
I'm not really that familiar with Maven, but the code has a [pom.xml.template](http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/highlighter... | [
-0.037980809807777405,
-0.09186818450689316,
0.37903913855552673,
-0.09191108494997025,
-0.1984698325395584,
-0.08873053640127182,
-0.3477148413658142,
0.19965387880802155,
-0.17963764071464539,
-0.6915639638900757,
-0.09845713526010513,
0.2842673361301422,
-0.05349775776267052,
-0.0817998... | |
version number, but you only have to do it once in a project structure. That is, if the version number is defined in a parent pom, you don't have to give the version number again. (But you don't even have to provide the dependency in this case since the dependency will be inherited anyways.) | [
0.2985578179359436,
-0.12121278792619705,
0.05520639941096306,
0.020590905100107193,
0.12576889991760254,
-0.3779248297214508,
0.15159350633621216,
0.1564129739999771,
-0.41819480061531067,
-0.49824631214141846,
-0.400208055973053,
0.22713080048561096,
-0.05981433019042015,
0.2009671777486... | |
When I try to bind port 80 to a socket in c, i always get the error, that I don't have permission to use this port. is there an easy way to get this permission?
Usually only the superuser (root) can bind to 'privileged' ports (i.e. those port numbers below 1024).
This means that you either have to run your program as ... | [
0.10400695353746414,
0.15486034750938416,
0.07994159311056137,
-0.05571511387825012,
-0.010674295015633106,
-0.1959385871887207,
0.627502977848053,
0.08478239178657532,
-0.39459991455078125,
-0.5717362761497498,
-0.27546101808547974,
0.591733992099762,
-0.27962765097618103,
0.4273582398891... | |
I'm getting an unexpected T\_CONCAT\_EQUAL error on a line of the following form:
```
$arg1 .= "arg2".$arg3."arg4";
```
I'm using PHP5. I could simply go an do the following:
```
$arg1 = $arg1."arg2".$arg3."arg4";
```
but I'd like to know whats going wrong in the first place. Any ideas?
Thanks,
sweeney
This woul... | [
-0.018934836611151695,
0.26278963685035706,
0.09923525899648666,
-0.26756617426872253,
-0.044940169900655746,
-0.08472509682178497,
0.5961429476737976,
-0.13264404237270355,
-0.35370248556137085,
-0.40546926856040955,
0.09315595775842667,
0.6482107043266296,
-0.3876431882381439,
-0.0084345... | |
I am using SetCursor to set the system cursor to my own image. The code looks something like this:
```
// member on some class
HCURSOR _cursor;
// at init time
_cursor = LoadCursorFromFile("somefilename.cur");
// in some function
SetCursor(_cursor);
```
When I do this the cursor does change, but on the first mouse... | [
0.21206019818782806,
-0.17175941169261932,
0.6228059530258179,
-0.1378706842660904,
-0.09180311113595963,
0.19073480367660522,
-0.3483419418334961,
-0.17463810741901398,
-0.3765479326248169,
-0.7589056491851807,
0.3352011740207672,
0.501691460609436,
-0.5946760773658752,
-0.061014991253614... | |
which is to respond to the windows `WM_SETCURSOR` message and call SetCursor at that time based on where the mouse is. Normally windows will only send you `WM_SETCURSOR` when the cursor is over your window, so you would only set the cursor in your window.
The other option is to set the default cursor for the window ha... | [
-0.10702204704284668,
-0.23889335989952087,
0.8577368259429932,
-0.13334998488426208,
-0.32954296469688416,
-0.13036610186100006,
0.14733481407165527,
-0.22660811245441437,
-0.2884378135204315,
-0.7212439179420471,
-0.38057583570480347,
0.7979016900062561,
-0.5580706596374512,
-0.008272034... | |
and `SetClassLong` or your cursor will not update until the next mouse move. | [
0.18507330119609833,
-0.12238647043704987,
0.7311258912086487,
-0.06343492120504379,
0.06592828035354614,
-0.3455534279346466,
0.3306996822357178,
0.18966913223266602,
-0.15237249433994293,
-0.5823770761489868,
-0.3603513240814209,
0.6963763236999512,
-0.3246084153652191,
0.06477090716362,... | |
I have an RFID reader connected to an Arduino board. I'd like to connect to it over its serial interface, and whenever the RFID reader omits a signal ( when it has read an (RF)ID ), I'd like to retrieve it in my C++ program.
I already have the code for simply printing the RFID to serial from the Arduino.
What I don't... | [
0.33089718222618103,
-0.005884432699531317,
0.5485723614692688,
0.0077705117873847485,
-0.11018329113721848,
-0.04995221272110939,
-0.16386336088180542,
0.02106466330587864,
-0.22229519486427307,
-0.7012447118759155,
0.08300137519836426,
0.9274042844772339,
-0.27510520815849304,
-0.0083264... | |
Is this necessary?
EDIT: In most examples I have read, the (c++) program sends input, and recieves output. I just want to listen and recieve output from the Arduino.
I found the Boost::Asio library, which reads from serial interfaces asynchronously. [Boost::Asio Documentation](http://www.boost.org/doc/libs/1_36_0/doc/... | [
0.25158461928367615,
0.1513480842113495,
0.30980536341667175,
-0.1333659589290619,
0.03747604414820671,
-0.12138380855321884,
0.044775091111660004,
-0.28827425837516785,
-0.19251985847949982,
-0.21133291721343994,
-0.12952406704425812,
0.7684400677680969,
-0.35600319504737854,
-0.515485763... | |
<http://thedailywtf.com/Articles/The-Hot-Room.aspx>
You see how at the bottom there're links to the next and previous articles ("Unprepared For Divide\_By\_Zero" and "A Completely Different Game")? How do I do that, but selecting the next and previous non-private articles? This works for selecting the next article:
`... | [
0.09731492400169373,
0.08595052361488342,
0.23429732024669647,
0.22621704638004303,
-0.06727568060159683,
0.005290614906698465,
0.196231871843338,
-0.0561574287712574,
-0.08767286688089371,
-0.4468008279800415,
0.07636246085166931,
0.5681604743003845,
-0.1751420497894287,
0.295523345470428... | |
UNION
(SELECT * FROM articles WHERE id < ?
AND private IS NULL
ORDER BY id DESC LIMIT 1)
``` | [
0.1734745055437088,
0.08938109129667282,
0.06442771106958389,
0.023204870522022247,
0.013506755232810974,
-0.09052605926990509,
0.16870348155498505,
-0.4563645124435425,
-0.13319407403469086,
-0.5380640625953674,
-0.5231553316116333,
0.23568622767925262,
-0.42813971638679504,
0.57616376876... | |
Is there a Generics Friendly way of using Collection.EMPTY\_LIST in my Java Program.
I know I could just declare one myself, but I'm just curious to know if there's a way in the JDK to do this.
Something like `users = Collections<User>.EMPTY_LIST;`
By doing the following:
```
List<User> users = Collections.emptyList... | [
0.06480468809604645,
-0.06507093459367752,
0.055418647825717926,
-0.1307103931903839,
-0.16722725331783295,
-0.2070058435201645,
0.2569938004016876,
-0.023822255432605743,
-0.26072826981544495,
-0.5861313343048096,
0.04211656376719475,
0.4844842851161957,
-0.6402014493942261,
0.20342981815... | |
fact, I've seen very little code out in the wild that makes use of explicit type arguments), however for a method with the signature: `void doStuff(List<String> users)` it would be perfectly clean for one to invoke `doStuff()` with an explicit type argument as follows:
```
doStuff(Collections.<String>emptyList());
``... | [
0.24356403946876526,
0.14106722176074982,
0.03579137846827507,
-0.1513824164867401,
-0.033585187047719955,
-0.16484762728214264,
0.48329800367355347,
-0.23541466891765594,
0.09006287157535553,
-0.37878698110580444,
-0.12375805526971817,
0.7472133040428162,
-0.3473384976387024,
0.0427647531... | |
I want to be able to run unstrusted ruby code. I want to be able to pass variables to said untrusted code that it may use. I also want said code to return a result to me. Here is a conceptual example of what I am thinking
```
input = "sweet"
output = nil
Thread.start {
$SAFE = 4
#... untrusted code goes here, it... | [
0.48298534750938416,
0.2508467435836792,
0.026718279346823692,
-0.051882557570934296,
-0.05898310989141464,
-0.09138377010822296,
0.3494373559951782,
0.04406796768307686,
0.01441155094653368,
-0.4705183804035187,
0.1872434765100479,
0.6123798489570618,
-0.321063369512558,
0.389849334955215... | |
I want to
provide its some inputs, and then allow it to write to the output. That is all I really want, I don't care how it is done, I just want the ability to use untrusted Ruby code as a sort of function. The solution does not have to look anything like the code I wrote above, I am just using it to illustrate what I... | [
0.4659499228000641,
0.09575353562831879,
0.07938016206026077,
0.061668794602155685,
-0.025002721697092056,
-0.025582008063793182,
0.4936676621437073,
-0.025828661397099495,
-0.059688083827495575,
-0.503982663154602,
0.14109058678150177,
0.5907950401306152,
-0.40759363770484924,
0.298319011... | |
machine, using some sort of os virtualization software like vmware or Xen or something.
I am wondering if anyone has any recommendations for running untrusted ruby code in a functional way? What option would you recomend? How would you go about it? Thanks.
$SAFE is not enough; you need to be at least at the level of W... | [
0.5332016348838806,
0.27253255248069763,
-0.1174887865781784,
0.5447993278503418,
0.24086511135101318,
-0.08512619137763977,
0.7624959945678711,
0.19680583477020264,
-0.11239050328731537,
-0.5116766691207886,
0.31110331416130066,
0.8852714896202087,
-0.3512303829193115,
0.15108712017536163... | |
app, you might get away with sandboxing in Ruby. It's not really a first-class scenario in the language design.
Even with that, though, you probably don't need to go to the machine level of separation. I'd feel pretty safe using a sandbox in a separately spawned process, with your app functioning as a process manager ... | [
0.30100056529045105,
0.18020670115947723,
-0.10241013020277023,
0.13464583456516266,
-0.25605690479278564,
-0.1845308542251587,
0.7617930173873901,
-0.03103925846517086,
-0.20255957543849945,
-0.5445159673690796,
-0.07494010776281357,
0.7962652444839478,
-0.3937831223011017,
-0.15316000580... | |
I want to use a timer in my simple [.NET](http://en.wikipedia.org/wiki/.NET_Framework) application written in C#. The only one I can find is the Windows.Forms.Timer class. I don't want to reference this namespace just for my console application.
Is there a C# timer (or timer like) class for use in console application... | [
0.2702121436595917,
-0.09531944990158081,
0.348693311214447,
-0.0032298772130161524,
0.012965601868927479,
0.04119065776467323,
-0.07740812003612518,
-0.1484232395887375,
-0.3085455596446991,
-0.8254451155662537,
0.2951965034008026,
0.5265706181526184,
-0.2633429765701294,
0.00229660677723... | |
I'd like to package a C# windows service project so it can be easily installed by anyone without having to use installutil command prompt utility? Is there an easy way to configure a Visual Studio setup project to do that similar to how winforms applications are installed?
I like to create a install project to get a ni... | [
0.8981896042823792,
-0.27869221568107605,
0.0574725940823555,
0.11594796925783157,
-0.10986229032278061,
0.026603123173117638,
0.12101022899150848,
-0.09599054604768753,
-0.22757302224636078,
-0.7600553035736084,
0.13569456338882446,
0.6116468906402588,
-0.358928918838501,
0.05157665163278... | |
How can I view the intermediate translation done to JSP and JSPX pages by WTP? I'm getting weird syntax errors in my Problems tab of Eclipse in a project that has plenty of .jspx pages. They don't affect anything in the running application (Tomcat 6.0) and they appeared only over the last 2 weeks, after an update.
The... | [
0.2665415108203888,
0.059235040098428726,
0.4197791814804077,
-0.016350645571947098,
-0.23546990752220154,
0.011811555363237858,
0.5110433101654053,
0.30922314524650574,
-0.262355238199234,
-0.9141013622283936,
0.29262053966522217,
0.4981783926486969,
-0.3525979816913605,
-0.05657316371798... | |
only appeared after I did recent fresh install of Eclipse at work, but then an update of Eclipse at home shortly therafter. I'd like to see the output to determine whose problem this should be (WTP, Stripes, or maybe just me :).
Remember that this issue is somewhat cosmetic, as it doesn't affect anything functionally.... | [
0.2687959372997284,
0.1767907589673996,
0.3273795545101166,
0.1438208520412445,
-0.3246322274208069,
-0.24860575795173645,
0.40702641010284424,
0.34217995405197144,
0.031186886131763458,
-0.6617828011512756,
-0.14684635400772095,
0.5861009359359741,
-0.3363051116466522,
-0.0026095993816852... | |
Ctrl+Shift+9. Beware that the translation generated isn't 100% the same as the server would create at runtime--it's not intended to be executed. Also, the most recent 3.0.3 builds contain fixes to the translator that should clear up these kinds of problems (NESTED variables + self-closing tags). 3.0.3 is due in Novembe... | [
-0.08924852311611176,
-0.14675529301166534,
1.135196328163147,
-0.16822431981563568,
-0.4034896790981293,
-0.11777930706739426,
0.09296718239784241,
0.24022050201892853,
0.036662228405475616,
-0.24945062398910522,
-0.15557335317134857,
0.4634596109390259,
-0.45099836587905884,
0.1657178401... | |
I have an ISAm table in mySql that was created similar to this:
```
create table mytable (
id int not null auto_increment primary key,
name varchar(64) not null );
create unique index nameIndex on mytable (name);
```
I have multiple processes inserting rows into this table. If two processes try to insert the same... | [
-0.0918113961815834,
0.20461873710155487,
0.24092736840248108,
0.010199279524385929,
0.007764765992760658,
-0.035002294927835464,
-0.10221274197101593,
-0.14584070444107056,
-0.37702053785324097,
-0.7501927614212036,
0.30213093757629395,
0.4092506766319275,
-0.39144885540008545,
0.31213629... | |
the processes that try to insert a value that already exists in the unique indexed field?
I'm a bit hesitant to use a lock because I don't want to get into a deadlock situation.
Do not bother locking, your index will prevent duplicates. You should handle the error code from your application.
MySQL should return an er... | [
0.22012287378311157,
0.3964523673057556,
0.11789482086896896,
0.1527429074048996,
0.17570260167121887,
-0.11196376383304596,
0.08254770189523697,
0.008074813522398472,
-0.32319000363349915,
-0.5436874628067017,
0.16695448756217957,
0.672789454460144,
-0.20179161429405212,
0.280415564775466... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.