text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
How do I get a list of the active IP-addresses, MAC-addresses and [NetBIOS](http://en.wikipedia.org/wiki/NetBIOS) names on the LAN?
I'd like to get NetBIOS name, IP and [MAC addresses](http://en.wikipedia.org/wiki/MAC_address) for every host on the LAN, preferably not having to walk to every single PC and take note of... | [
-0.05485045909881592,
0.3536299169063568,
0.17837436497211456,
0.18497850000858307,
0.23079122602939606,
-0.18704017996788025,
0.2929275333881378,
-0.2859727144241333,
-0.31590351462364197,
-0.9159852862358093,
-0.15727832913398743,
0.6368469595909119,
-0.19321048259735107,
0.0710982829332... | |
I'm currently using ImageMagick to determine the size of images uploaded to the website. By calling ImageMagick's "identify" on the command line it takes about 0.42 seconds to determine a 1MB JPEG's dimensions along with the fact that it's a JPEG. I find that a bit slow.
Using the Imagick PHP library is even slower as... | [
-0.042734529823064804,
-0.06295400112867355,
0.5563853979110718,
0.01600686088204384,
-0.39765700697898865,
-0.1828482449054718,
-0.010338598862290382,
-0.28292205929756165,
-0.17096832394599915,
-0.8527036905288696,
0.14571283757686615,
0.21341989934444427,
-0.066622793674469,
0.233852252... | |
has? I can live with it only supporting JPEG and PNG. It's important to me that the file type is determined by looking at the file's headers and not simply the extension.
**Edit: The solution can be a command-line tool UNIX called by PHP, much like the way I'm using ImageMagick at the moment**
Sorry I can't add this a... | [
0.7671302556991577,
-0.07862773537635803,
0.580766499042511,
0.24535124003887177,
-0.2770700454711914,
-0.27043652534484863,
0.02843819558620453,
-0.12428171932697296,
-0.2295849621295929,
-0.7480383515357971,
0.13825108110904694,
0.3547666072845459,
-0.12268444150686264,
-0.02236587926745... | |
still.
So I would say getimagesize() is the faster method. I only tested on jpg and not on png.
the test is just
```
$files = array('2819547919_db7466149b_o_d.jpg', 'GP1-green2.jpg', 'aegeri-lake-switzerland.JPG');
foreach($files as $file){
$size2 = array();
$size3 = array();
$time1 = microtime();
$size = ge... | [
0.05685263127088547,
-0.3154450058937073,
0.6165012717247009,
0.27924633026123047,
0.4586326479911804,
0.32726842164993286,
0.09685179591178894,
-0.35142767429351807,
-0.16275013983249664,
-0.5328580737113953,
-0.05479960888624191,
0.3864351212978363,
-0.141009122133255,
-0.056534860283136... | |
I am having a bit of a problem.
I get a RAW char\* buffer from a camera and I need to add this tags before I can save it to disk. Writing the file to disk and reading it back again is not an option, as this will happen thousands of times.
The buffer data I receive from the camera does not contain any EXIF information... | [
0.5139073729515076,
0.09089387208223343,
0.3463679254055023,
-0.09689325094223022,
0.16648048162460327,
0.17160774767398834,
0.1414756029844284,
-0.13475114107131958,
-0.3433689475059509,
-0.7305524945259094,
0.2766532301902771,
0.3393344581127167,
-0.3622177243232727,
0.017649132758378983... | |
a file on disk ?
Does the JPEG buffer of your camera contain an EXIF section already ? | [
0.45494842529296875,
0.14018818736076355,
0.0468137226998806,
0.3704814314842224,
0.3260284662246704,
-0.09767409414052963,
-0.18827050924301147,
-0.029235191643238068,
-0.43556979298591614,
-0.0027817105874419212,
-0.11394651979207993,
0.4163737893104553,
-0.11167164146900177,
-0.17406263... | |
I am looking for a PHP blog engine which needs to be easy to redesign (CSS, HTML). It also needs to be free and have simple user interface so that the client doesn't struggle to add posts. Any suggestions?
[Wordpress](http://www.wordpress.org) - I keep trying other blogs and I keep going back to wordpress. It's definit... | [
0.6281719207763672,
0.14860256016254425,
0.10219193994998932,
0.2002582550048828,
-0.23020635545253754,
-0.13226160407066345,
0.05579744651913643,
0.34995943307876587,
-0.04381478577852249,
-0.7775097489356995,
0.2273569107055664,
0.47955718636512756,
-0.12654954195022583,
0.13097445666790... | |
I'd like to offer my users correct links to an upgraded version of my program based on what platform they're running on, so I need to know whether I'm currently running on an x86 OS or an x64 OS.
The best I've found is using `Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")`, but I would think there would ... | [
0.2249811440706253,
0.22207607328891754,
0.4431643486022949,
0.0267306100577116,
0.33495742082595825,
-0.07125550508499146,
0.014037469401955605,
0.05604414641857147,
-0.327085018157959,
-0.9210299849510193,
-0.25333207845687866,
0.6013763546943665,
-0.24669478833675385,
0.0825929194688797... | |
Continuing from my [previous question](https://stackoverflow.com/questions/90751/double-and-floats-in-c), is there a comprehensive document that lists all available differences between debug and release modes in a C# application, and particularly in a web application?
What differences are there?
"Debug" and "Release" ... | [
0.45237717032432556,
-0.18805377185344696,
0.3212687075138092,
-0.15440364181995392,
0.03347698971629143,
-0.007662462070584297,
0.15954922139644623,
-0.2840942442417145,
-0.23091965913772583,
-0.5043453574180603,
-0.0010211168555542827,
0.9572182893753052,
-0.187269389629364,
-0.120738372... | |
and Release configurations in Project Propeties / Build
* Create your own custom configurations by right-clicking on the solution in Solution Explorer and selecting Configuration Manager
I think the behaviour of the DEBUG constant is fairly clear (can be referenced in the #if preprocessor directive or in the Condition... | [
0.3392772078514099,
-0.13442738354206085,
0.17346175014972687,
0.09658385068178177,
0.23102539777755737,
0.037710852921009064,
0.16833840310573578,
-0.07597167044878006,
-0.18066641688346863,
-0.769291877746582,
-0.265847384929657,
0.6210432648658752,
-0.2758314311504364,
-0.00265638530254... | |
How can I get all items from a specific calendar (for a specific date).
Lets say for instance that I have a calendar with a recurring item every Monday evening. When I request all items like this:
```
CalendarItems = CalendarFolder.Items;
CalendarItems.IncludeRecurrences = true;
```
I only get 1 item...
Is there a... | [
0.38944774866104126,
0.0644267350435257,
0.42507216334342957,
0.14424365758895874,
0.07416233420372009,
-0.07377112656831741,
0.37283599376678467,
0.09795843809843063,
-0.35042524337768555,
-0.7230541706085205,
-0.016078226268291473,
0.2763391137123108,
0.009919468313455582,
0.275014638900... | |
you must Restrict or Find in order to get recurring appointments, otherwise Outlook won't expand them. Also, you must Sort by Start *before* setting IncludeRecurrences. | [
0.30854350328445435,
0.13465768098831177,
0.5896113514900208,
0.0822378396987915,
0.5350319147109985,
-0.3420434594154358,
0.005935907829552889,
0.3625037670135498,
-0.24302269518375397,
-0.8162881135940552,
-0.1448938548564911,
0.424445241689682,
-0.029094217345118523,
0.27891266345977783... | |
Could somebody please name a few. I could given time, but this is for somebody else, and I'd also like some community input.
Some differences:
* CLR (.NET) stored procedures
* SSIS instead of DTS
* Management Studio instead of Enterprise Manager, with more functions (2008 version is even better)
* VS integration
* bet... | [
0.21596917510032654,
0.10702592134475708,
0.2776450514793396,
0.05891937017440796,
-0.18114034831523895,
-0.08330205827951431,
-0.0295656006783247,
0.16037078201770782,
-0.6582693457603455,
-0.7447428703308105,
0.16060033440589905,
0.23682978749275208,
0.043247614055871964,
-0.160134926438... | |
name more. | [
0.33623021841049194,
0.02614772878587246,
-0.20596830546855927,
0.14695078134536743,
-0.20714221894741058,
0.0884617492556572,
0.026798686012625694,
0.14133605360984802,
-0.31090736389160156,
-0.13825058937072754,
0.16555185616016388,
0.09649448841810226,
-0.24178940057754517,
0.5835822224... | |
I'm writing the memory manager for an application, as part of a team of twenty-odd coders. We're running out of memory quota and we need to be able to see what's going on, since we only appear to be using about 700Mb. I need to be able to report where it's all going - fragmentation etc. Any ideas?
You can use existing ... | [
0.11902158707380295,
0.14077848196029663,
0.12198100984096527,
0.1642330288887024,
0.10423558205366135,
-0.0017779760528355837,
-0.09459590911865234,
-0.22584061324596405,
-0.3679153323173523,
-0.5960364937782288,
0.11056426167488098,
0.5045514702796936,
-0.051234349608421326,
0.1488329023... | |
also found very usefull is to be able to dump a map of the whole virtual space based on VirtualQuery function. My code for this looks like this:
```
void PrintVMMap()
{
size_t start = 0;
// TODO: make portable - not compatible with /3GB, 64b OS or 64b app
size_t end = 1U<<31; // map 32b user space only - kernel ... | [
-0.23885947465896606,
-0.17529736459255219,
0.6605708003044128,
0.028454894199967384,
0.06590501964092255,
0.050214070826768875,
0.062444787472486496,
-0.14180278778076172,
-0.25726574659347534,
-0.9292700886726379,
-0.1927550733089447,
0.474785715341568,
-0.1906827986240387,
0.15242449939... | |
SIZE_T retSize = VirtualQuery((void *)addr,&buffer,sizeof(buffer));
if (retSize==sizeof(buffer) && buffer.RegionSize>0)
{
// dump information about this region
printf(.... some buffer information here ....);
// track longest feee region - usefull fragmentation indicator
if (buffer.State&... | [
-0.10020841658115387,
-0.4420293867588043,
0.7600417733192444,
-0.1407986432313919,
0.2899414896965027,
0.05350641533732414,
0.2232493758201599,
-0.13491903245449066,
-0.5317223072052002,
-0.8522539138793945,
-0.4540877938270569,
0.20155149698257446,
-0.17925108969211578,
0.480430781841278... | |
}
else
{
// always proceed
addr += pageSize;
index++;
}
}
printf("Longest free VM region: %d",longestFreeApp);
}
``` | [
0.019721899181604385,
-0.31103068590164185,
0.6996574401855469,
-0.03863057494163513,
0.15876591205596924,
-0.3390434682369232,
0.07786872982978821,
-0.11850033700466156,
-0.3611049950122833,
-0.5335891842842102,
-0.5622248649597168,
0.17244111001491547,
-0.27230072021484375,
0.45159408450... | |
Let's say I have a class:
```
class Foo
{
public string Bar
{
get { ... }
}
public string this[int index]
{
get { ... }
}
}
```
I can bind to these two properties using "{Binding Path=Bar}" and "{Binding Path=[x]}". Fine.
Now let's say I want to implement INotifyPropertyChanged:
```
class Foo ... | [
-0.12020213901996613,
0.23677434027194977,
0.4122876822948456,
-0.24281077086925507,
-0.010344043374061584,
-0.02870977483689785,
0.15375946462154388,
-0.13552391529083252,
-0.10783439129590988,
-0.4881170988082886,
0.11669637262821198,
0.7336632609367371,
-0.4609783887863159,
0.2119203358... | |
{
PropertyChanged( this, new PropertyChangedEventArgs( "Bar" ) );
}
}
}
public string this[int index]
{
get { ... }
set
{
...
if( PropertyChanged != null )
{
PropertyChanged( this, new PropertyChangedEventArgs( "????" ) );
}
}
} | [
0.03376482427120209,
-0.1098419651389122,
0.7001845836639404,
-0.18261253833770752,
0.2127843052148819,
0.009302212856709957,
0.021794956177473068,
-0.38837453722953796,
-0.006710282992571592,
-0.44709131121635437,
-0.3267185389995575,
0.8388275504112244,
-0.26839569211006165,
0.1416545957... | |
public event PropertyChangedEventHandler PropertyChanged;
}
```
What goes in the part marked ????? (I've tried string.Format("[{0}]", index) and it doesn't work). Is this a bug in WPF, is there an alternative syntax, or is it simply that INotifyPropertyChanged isn't as powerful as normal binding?
Thanks to Cameron's ... | [
-0.1264464408159256,
-0.25227072834968567,
0.2641216218471527,
0.18735817074775696,
-0.07303415238857269,
-0.4372100532054901,
0.05638708174228668,
-0.15315410494804382,
-0.10385192185640335,
-0.3659457564353943,
-0.27918335795402527,
0.5811640024185181,
-0.15869633853435516,
0.27192163467... | |
I'm looking for a good, clean way to go around the fact that PHP5 still doesn't support multiple inheritance. Here's the class hierarchy:
Message
-- TextMessage
-------- InvitationTextMessage
-- EmailMessage
-------- InvitationEmailMessage
The two types of Invitation\* classes have a lot in common; i... | [
-0.07584980130195618,
-0.16509777307510376,
0.12103266268968582,
0.24879977107048035,
-0.3189558684825897,
-0.15981213748455048,
0.25011715292930603,
0.16158224642276764,
-0.27646923065185547,
-0.6472921967506409,
0.22789758443832397,
0.09449173510074615,
0.1432081013917923,
0.342542529106... | |
you need multiple inheritance is a signal your object structure is somewhat incorrect. In situation you outlined I see you have class responsibility simply too broad. If Message is part of application business model, it should not take care about rendering output. Instead, you could split responsibility and use Message... | [
0.34358277916908264,
-0.1720062792301178,
0.3964761793613434,
0.06711912900209427,
-0.18382935225963593,
-0.08356412500143051,
0.2076595574617386,
-0.5279364585876465,
-0.47364944219589233,
-0.5043522119522095,
-0.09466361254453659,
0.6958506107330322,
-0.5657941699028015,
-0.0100948149338... | |
= new InvitationHTMLMessage(); // html type, subject and body configuration in constructor
$textIM = new InvitationTextMessage(); // text type, subject and body configuration in constructor
$d = new MessageDispatcher();
$d->dispatch($htmlIM);
$d->dispatch($textIM);
```
Note that MessageDispatcher would make a decisi... | [
-0.4365597665309906,
-0.320468008518219,
0.6836008429527283,
-0.305461049079895,
-0.2761026918888092,
0.18529967963695526,
0.4732767939567566,
-0.5907748937606812,
-0.22772519290447235,
-0.6965757012367249,
-0.5407049059867859,
0.45434698462486267,
-0.6434245705604553,
0.06779823452234268,... | |
throw new Exception("MIME type {$m->type} not supported");
}
}
```
To sum it up, responsibility is split between two classes. Message configuration is done in InvitationHTMLMessage/InvitationTextMessage class, and sending algorithm is delegated to dispatcher. This is called Strategy Pattern, you can read more on ... | [
-0.12262424826622009,
-0.2465735226869583,
0.1888922154903412,
-0.09040005505084991,
-0.17811338603496552,
-0.09075301885604858,
0.2991737127304077,
-0.536820650100708,
-0.2228139042854309,
-0.6416890621185303,
-0.39896464347839355,
0.28017523884773254,
-0.32326972484588623,
0.090160600841... | |
I am fairly comfortable with standalone Java app development, but will soon be working on a project using a Java EE application server.
Does anyone know of a straightforward how-to tutorial to getting a hello-world type application working in an application server? I'm (perhaps naievly) assuming that the overall appro... | [
0.36546483635902405,
0.3729132115840912,
-0.17625032365322113,
0.11217664927244186,
-0.09985633194446564,
-0.19053110480308533,
0.39258769154548645,
0.017784247174859047,
-0.12072048336267471,
-0.6478473544120789,
-0.02231261134147644,
0.6053832769393921,
-0.14064918458461761,
-0.149277508... | |
to do YY
3. Change file ZZ
4. Other steps...
Note: Just because I have a windows machine at home, I would prefer to run if this could be run on windows, but in the interest of a better answer, linux/mac based implementations are welcome.
I would choose JBoss AS or GlassFish for a start. However I'm not sure what you m... | [
0.44514158368110657,
0.13556760549545288,
0.28484511375427246,
-0.19975540041923523,
-0.056959282606840134,
-0.3472023904323578,
0.5408875942230225,
0.1373077630996704,
-0.06491270661354065,
-0.6485304236412048,
-0.2382889688014984,
0.6371573805809021,
-0.25975877046585083,
-0.192009299993... | |
Guide](http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.3/doc/Installation_Guide/html/index.html)
[Getting started](http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.3/doc/Getting_Started/html/index.html)
[Configuration Guide](http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.3/doc/Server_Configuration_Guid... | [
0.4219001829624176,
-0.05497535690665245,
0.465406596660614,
-0.06913181394338608,
-0.024357328191399574,
-0.4018215835094452,
0.12741757929325104,
-0.41141819953918457,
-0.18831628561019897,
-0.8208714127540588,
-0.052112698554992676,
0.9443897604942322,
-0.10945797711610794,
-0.246913835... | |
How to match a single quote in sed if the expression is enclosed in single quotes:
```
sed -e '...'
```
For example need to match this text:
```
'foo'
```
You can either use:
```none
"texta'textb" (APOSTROPHE inside QUOTATION MARKs)
```
or
```none
'texta'\''textb' (APOSTROPHE text APOSTROPHE, then REVERSE SOLI... | [
-0.14709942042827606,
0.4597141742706299,
0.6048984527587891,
-0.06256528198719025,
-0.45622438192367554,
0.21512365341186523,
0.31828761100769043,
-0.25736236572265625,
0.3527791202068329,
-0.39887240529060364,
-0.4687091112136841,
0.42812347412109375,
-0.1820886880159378,
-0.285721749067... | |
I need to write code in python language for comparing the text of document using fingerprint techniques. I do not know to take fingerprint of a document or to generate fingerprint of a document. I'm asking if anyone knows the method or has source code for generating fingerprints of documents which is stored in bits for... | [
0.6325434446334839,
0.025334959849715233,
-0.19062727689743042,
0.25286662578582764,
0.18865232169628143,
0.0016318567795678973,
0.463776171207428,
-0.1568506807088852,
-0.12009288370609283,
-0.5226128101348877,
0.15785059332847595,
0.33031517267227173,
-0.28875434398651123,
0.263173103332... | |
project but I think you can still achieve all the same functionality.
That way you can pick up your obfuscated assemblies from whatever staging directory your obfuscation tool is dumping them into. | [
0.8970441222190857,
-0.16883908212184906,
-0.026040837168693542,
0.3526676595211029,
0.018343940377235413,
-0.06361224502325058,
0.13245390355587006,
-0.09334751963615417,
-0.2724725008010864,
-0.5383361577987671,
0.2355029135942459,
0.1118791475892067,
0.09280893951654434,
0.1095333173871... | |
I've been wanting to program for the Plan 9 operating system for a while. I'd really like to play around with a web app there. Of course, the only language I know for Plan 9 is C, and that doesn't seem ideal for web development. I also understand that it doesn't run apache or mysql either.
What is the best way to star... | [
0.5561828017234802,
-0.004106446634978056,
-0.32180365920066833,
0.11838756501674652,
-0.27117064595222473,
0.2962363660335541,
0.010484923608601093,
0.05266519635915756,
-0.1627705693244934,
-0.4388977289199829,
-0.23965761065483093,
0.374296098947525,
-0.5104575753211975,
-0.715456366539... | |
[Contrib Index](http://plan9.bell-labs.com/wiki/plan9/Contrib_index/index.html) for the code.
Finally, start reading the Plan 9 [white papers](http://plan9.bell-labs.com/wiki/plan9/Documentation/index.html) so that you can understand its philosophy. If you want to do net-related things, the file protocol [9p](http://p... | [
0.5711291432380676,
0.08884245157241821,
0.5178995728492737,
0.20076531171798706,
0.22742344439029694,
-0.3055928349494934,
-0.020823363214731216,
-0.1518024355173111,
-0.19652238488197327,
-0.32820820808410645,
-0.4967280924320221,
0.3707180619239807,
-0.36932873725891113,
0.0853655189275... | |
When I use quick documentaion lookup (Ctrl+Q) on j2ee classes or annotations in IDEA I only get an empty javadoc. It only contains the basics like class name.
How do I add the javadoc to the libs IDEA provides itself?
You can attach javadoc to any library you have configure in your module or project. Just access the p... | [
0.3840141296386719,
-0.010701059363782406,
0.16606588661670685,
0.011936956085264683,
0.12722796201705933,
-0.2432636320590973,
-0.022465649992227554,
-0.18035432696342468,
-0.118426114320755,
-0.8557818531990051,
0.0012522805482149124,
0.4042775630950928,
-0.22828422486782074,
0.182186797... | |
see two buttons "Add" and "Specify Javadoc URL". If you have the javadoc in a jar file select the first one, if you want to point to a web site that contains the javadoc select the latest.
That's it. | [
0.2192242294549942,
-0.18077054619789124,
0.49936509132385254,
-0.19002991914749146,
-0.04096316546201706,
-0.34757861495018005,
-0.3750557005405426,
0.10526882857084274,
-0.04728125408291817,
-0.6357817649841309,
0.012593320570886135,
0.6265782713890076,
-0.24761730432510376,
-0.016783259... | |
I would like to upgrade my team from VS2005 to VS2008 without touching the version of Team Server which is 2005.
Is that possible?
And if so, how do I tell VS to recognize TFS?
Currently in my VS2008 options menu, I don't have any source control to choose from.
Yes, you can... (We're doing that here too)
* Tool... | [
0.24216893315315247,
-0.3193727433681488,
0.2847525179386139,
-0.024882258847355843,
-0.08730049431324005,
-0.28483426570892334,
0.2299187034368515,
-0.03785686194896698,
-0.1815321147441864,
-1.297574520111084,
0.11679033190011978,
0.6106266379356384,
-0.06547832489013672,
-0.076770365238... | |
From a shell script, how do I check if a directory contains files?
Something similar to this
```sh
if [ -e /some/dir/* ]; then echo "huzzah"; fi;
```
but which works if the directory contains one or several files (the above one only works with exactly 0 or 1 files).
The solutions so far use `ls`. Here's an all bash... | [
0.2555720806121826,
-0.04646182805299759,
0.052709247916936874,
-0.42923516035079956,
0.06812446564435959,
-0.1973486989736557,
0.4401763379573822,
-0.3679375946521759,
-0.29141664505004883,
-0.48051348328590393,
-0.23879285156726837,
0.9305441379547119,
-0.23932209610939026,
-0.0933524742... | |
I'm working on a large c++ system that is has been in development for a few years now. As part of an effort to improve the quality of the existing code we engaged on a large long-term refactoring project.
Do you know a good tool that can help me write unit tests in C++? Maybe something similar to Junit or Nunit?
Can ... | [
0.6863829493522644,
0.22326192259788513,
-0.044969066977500916,
-0.03218747675418854,
0.17367209494113922,
0.006408762186765671,
0.0909465029835701,
-0.26491841673851013,
-0.13064248859882355,
-0.31412753462791443,
0.0429048091173172,
0.29773685336112976,
0.2384905070066452,
-0.07381211221... | |
is the author - as mentioned in other answers, he was involved in the creation of both [CppUnit](http://sourceforge.net/projects/cppunit) and [CppUnitLite](http://www.objectmentor.com/resources/downloads.html).
 | [
0.2577210068702698,
0.2677471935749054,
0.38642650842666626,
0.3917408585548401,
-0.015972580760717392,
-0.07855947315692902,
-0.1809428483247757,
0.4249526560306549,
-0.5178950428962708,
0.11255183070898056,
-0.20162387192249298,
0.010065645910799503,
0.09679979830980301,
0.09099362045526... | |
I'm interested in the Presentation-Abstraction-Control? (aka Hierarchical-Model-View-Controller (HMVC)) Architectural Pattern for constructing complex user interfaces (GUI or web) and was wondering if anyone was aware of any examples in the wild where I could read the code?
I'm aware of the JavaWorld article and assoc... | [
0.521975040435791,
-0.16542237997055054,
0.17068931460380554,
0.10187928378582001,
-0.21676017343997955,
-0.06679891794919968,
0.03111196868121624,
-0.19679754972457886,
-0.3872534930706024,
-0.4736945331096649,
-0.04354261979460716,
0.6330010890960693,
-0.06199874356389046,
0.038512717932... | |
- HMVC](http://codeigniter.com/forums/viewthread/73177/)
* Kohana: 3rd party [Component](http://forum.kohanaphp.com/comments.php?DiscussionID=1170) Edit: Kohana 3 now natively supports HMVC | [
-0.30711692571640015,
0.15799467265605927,
0.6130213737487793,
-0.3549082279205322,
-0.4016857147216797,
0.02286132052540779,
0.29657405614852905,
-0.501814067363739,
-0.23047639429569244,
-0.09234815835952759,
-0.33697378635406494,
0.527772068977356,
-0.2072017788887024,
0.115165024995803... | |
I have a memory buffer corresponding to my screen resolution (1280x800 at 24-bits-per-pixel) that contains my screen contents at 24bpp. I want to convert this to 8-bpp (ie. Halftone color palette in Windows).
I currently do this:
1. Use CreateDIBSection to allocate a new 1280x800 24-bpp buffer and access it as a DC, as... | [
0.44058147072792053,
-0.1749383509159088,
0.6314342021942139,
-0.007956981658935547,
-0.058406054973602295,
0.1717061847448349,
0.15137381851673126,
-0.281970739364624,
-0.007760502863675356,
-0.8599696755409241,
0.01449200976639986,
0.5706793069839478,
-0.1875993311405182,
0.2837921082973... | |
Wrap my original mem buf in a DC to perform BitBlt directly from it
b. Write my own 24-bpp to 8-bpp color conversion. I can't find any info on how Windows implements this halftone color conversion. Besides even if I find out, I won't be using the accelerated features of GDI that BitBlt has access to.
So how do I do e... | [
0.528131902217865,
-0.1490708887577057,
0.36682894825935364,
-0.16316871345043182,
-0.2268894761800766,
0.017905505374073982,
0.2323032021522522,
-0.31509536504745483,
-0.258018434047699,
-0.4881628155708313,
0.21181829273700714,
0.5130410194396973,
-0.4533969759941101,
0.04159465432167053... | |
bitmap of the correct size and format, open it up, copy over your data and you then have a bitmap object with your data:
```
private void LockUnlockBitsExample(PaintEventArgs e)
{
// Create a new bitmap.
Bitmap bmp = new Bitmap("c:\\fakePhoto.jpg");
// Lock the bitmap's bits.
Rectangle rect = new Recta... | [
0.408823162317276,
-0.3324410617351532,
0.8616021871566772,
-0.009237149730324745,
-0.07739648222923279,
0.21707531809806824,
0.1661044806241989,
-0.45328831672668457,
-0.1355382800102234,
-0.5983713269233704,
-0.24387705326080322,
0.3745086193084717,
-0.6341956257820129,
-0.05429653823375... | |
// Declare an array to hold the bytes of the bitmap.
int bytes = bmpData.Stride * bmp.Height;
byte[] rgbValues = new byte[bytes];
// Copy the RGB values into the array.
System.Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0, bytes);
// Set every third value to 255. A 24bpp bitmap will look red.... | [
0.35631468892097473,
0.03113989345729351,
0.5274629592895508,
-0.10692398995161057,
-0.11813098937273026,
0.35419976711273193,
0.35752400755882263,
-0.7917839288711548,
-0.5463196039199829,
-0.3835011422634125,
-0.12194874882698059,
0.2801305055618286,
-0.4689617156982422,
0.13499569892883... | |
bytes);
// Unlock the bits.
bmp.UnlockBits(bmpData);
// Draw the modified image.
e.Graphics.DrawImage(bmp, 0, 150);
}
```
To convert the contents to 8bpp you'll want to use the System.Drawing.Imaging.ColorMatrix class. I don't have at hand the correct matrix values for half-tone, but this example graysc... | [
0.23373569548130035,
-0.00508989067748189,
0.5759875178337097,
-0.25274422764778137,
-0.10220639407634735,
0.44726982712745667,
-0.12506453692913055,
-0.48010551929473877,
-0.2310839593410492,
-0.5051338076591492,
-0.08637987822294235,
0.5615490674972534,
-0.3167596459388733,
0.07676727324... | |
new float[] {1, 0, 0, 0, 0},
new float[] {0, 1, 0, 0, 0},
new float[] {0, 0, 1, 0, 0}, | [
-0.21152949333190918,
-0.11255832016468048,
0.49102744460105896,
0.14039625227451324,
0.15286538004875183,
0.32612383365631104,
-0.11503451317548752,
-0.45132747292518616,
-0.022851595655083656,
-0.3698151707649231,
-0.2529502511024475,
0.33642134070396423,
-0.10388629138469696,
0.29636785... | |
new float[] {0, 0, 0, 0.6f, 0},
new float[] {0, 0, 0, 0, 1}};
ColorMatrix colorMatrix = new ColorMatrix(matrixItems);
// Create an ImageAttributes object and set its color matrix
ImageAttributes imageAtt = new ImageAttributes();
imageAtt.SetColorMatrix(colorMatrix, ColorMatrixFlag.Default,... | [
-0.09189023822546005,
-0.3605348467826843,
0.9814573526382446,
-0.15000317990779877,
-0.052590593695640564,
0.44055747985839844,
-0.025284482166171074,
-0.5099015235900879,
-0.2093893587589264,
-0.6730762720108032,
-0.0640353411436081,
0.6718683838844299,
-0.4435831904411316,
0.03133634850... | |
GraphicsUnit.Pixel, imageAtt);
imageAtt.Dispose();
```
I shall try and update later with the matrix values for half-tone, it's likely to be lots 0.5 or 0.333 values in there! | [
0.2019730806350708,
0.08589690178632736,
0.4497290849685669,
-0.17898613214492798,
-0.13721436262130737,
0.45758914947509766,
-0.0512942411005497,
-0.17539840936660767,
-0.10582417994737625,
-0.8020689487457275,
0.1715748906135559,
0.7799094915390015,
-0.07959795743227005,
-0.0115936258807... | |
Suppose I have a simple XHTML document that uses a custom namespace for attributes:
```
<html xmlns="..." xmlns:custom="http://www.example.com/ns">
...
<div class="foo" custom:attr="bla"/>
...
</html>
```
How do I match each element that has a certain custom attribute using jQuery? Using
```
$("div[cust... | [
0.1786871701478958,
-0.1869163066148758,
0.5078669190406799,
-0.1576043665409088,
-0.14448723196983337,
0.11818990111351013,
0.002472844673320651,
-0.4627985954284668,
-0.06666816025972366,
-0.6898011565208435,
0.0686800628900528,
0.5623111128807068,
-0.41436532139778137,
-0.17588730156421... | |
What is the easiest cross platform widget toolkit? I'm looking for one that minimally covers Windows, OSX, and Linux with a C or C++ interface.
I don't know of any I've personally used with a C API, but [wxWidgets](http://www.wxwidgets.org/) is C++. It runs on Windows, Linux, and Mac OS X. And if you're looking for eas... | [
0.12456429749727249,
-0.0966470018029213,
0.18363523483276367,
0.14746826887130737,
-0.12868377566337585,
-0.26555076241493225,
-0.05250224471092224,
0.21483676135540009,
-0.14197608828544617,
-0.8632294535636902,
-0.028424112126231194,
0.5213133096694946,
-0.36727380752563477,
-0.34074494... | |
I would like to automatically increment a field named `incrementID' anytime any field in any row within the table named 'tb\_users' is updated.
Currently I am doing it via the sql update statement.
i.e "UPDATE tb\_users SET name = @name, incrementID = incrementID + 1 .....WHERE id = @id;
I'm wondering how I can do thi... | [
0.30153846740722656,
0.20654596388339996,
0.5530235767364502,
-0.04108758270740509,
0.1383741945028305,
-0.09604377299547195,
0.18689674139022827,
-0.15323594212532043,
-0.15676777064800262,
-0.6588605642318726,
0.1856348216533661,
0.7287313938140869,
-0.43078020215034485,
0.27743497490882... | |
the db.
This trigger should do the trick:
```
create trigger update_increment for update as
if not update(incrementID)
UPDATE tb_users SET incrementID = incrementID + 1
from inserted WHERE tb_users.id = inserted.id
``` | [
0.23975422978401184,
-0.11970143020153046,
0.46738743782043457,
-0.059086233377456665,
0.035796307027339935,
-0.15118463337421417,
0.13963322341442108,
-0.6665043830871582,
0.0815517008304596,
-0.4409784972667694,
0.013275823555886745,
0.6913732290267944,
-0.5627047419548035,
0.20752465724... | |
I'm trying to match elements with a name that is `'container1$container2$chkChecked'`, using a regex of `'.+\$chkChecked'`, but I'm not getting the matches I expect when the element name is as described. What am I doing wrong?
my guess, by your use of quotes, is you did something like
```
re = new RegExp('.+\$chkCheck... | [
0.16013649106025696,
0.1777639240026474,
0.20551586151123047,
-0.04848458245396614,
0.09205269813537598,
-0.09131769090890884,
0.3351217210292816,
-0.10495737940073013,
0.00412815622985363,
-0.3113413155078888,
-0.027375144883990288,
0.5095546245574951,
-0.48007360100746155,
0.133221104741... | |
I believe strongly in using unit-tests as part of building large multi-platform applications. We currently are planning on having our unit-tests within a separate project. This has the benefit of keeping our code base clean. I think, however, that this would separate the test code from the implementation of the unit. W... | [
0.4681539535522461,
0.05910167843103409,
-0.14329440891742706,
0.06031937897205353,
-0.14947451651096344,
-0.23929034173488617,
0.05993124842643738,
-0.17021292448043823,
-0.10741985589265823,
-0.5400260090827942,
0.21638984978199005,
0.6112289428710938,
-0.12490744888782501,
-0.0969463661... | |
redundant lines of codes).
So far, my preferred framework is [CxxTest](http://cxxtest.sf.net/), and I plan on evaluating [Fructose](http://fructose.sourceforge.net/) some day.
Any way, there are a few "papers" that evaluate C++ TU frameworks :
* [*Exploring the C++ Unit Testing Framework Jungle*](http://gamesfromwit... | [
0.31130626797676086,
0.11644793301820755,
-0.16563710570335388,
0.019159186631441116,
-0.009465538896620274,
0.14720970392227173,
0.1869184821844101,
-0.28748267889022827,
-0.49923887848854065,
-0.49218428134918213,
-0.39245280623435974,
0.25410163402557373,
-0.19083736836910248,
-0.601596... | |
What are the differences between a `clustered` and a `non-clustered index`?
Clustered Index
* Only one per table
* Faster to read than non clustered as data is physically stored in index order
Non Clustered Index
* Can be used many times per table
* Quicker for insert and update operations than a clustered index
Bo... | [
-0.2842934727668762,
-0.15440437197685242,
0.4082050919532776,
0.3267696797847748,
-0.10720466077327728,
-0.08911742269992828,
-0.23485882580280304,
-0.07045254856348038,
-0.21795468032360077,
-0.7592517733573914,
0.16133323311805725,
0.32877546548843384,
-0.28054293990135193,
0.0174043904... | |
index if its selectivity is above 95%. | [
-0.12139809876680374,
-0.17665374279022217,
0.7161733508110046,
0.2688812017440796,
-0.02376401424407959,
-0.2661619186401367,
-0.018616845831274986,
-0.34886956214904785,
0.27016159892082214,
-0.45500701665878296,
-0.41491132974624634,
0.4562351703643799,
0.010350496508181095,
-0.04243841... | |
Can anyone recommend a framework for templating/formatting messages in a standalone application along the lines of the JSP EL (Expression Language)?
I would expect to be able to instantiate a an object of some sort, give it a template along the lines of
```
Dear ${customer.firstName}. You order will be dispatched on ... | [
0.23305769264698029,
0.07261712849140167,
0.2506014406681061,
0.00935591571033001,
-0.11324920505285263,
0.02928192727267742,
-0.05177246406674385,
0.03421076759696007,
-0.03888878971338272,
-0.5095868706703186,
-0.08691982179880142,
0.35973867774009705,
-0.2005721777677536,
-0.00767010543... | |
the web application context, but I do not see this as a big heavyweight templating framework. Just a better version of the basic Message Format functionality Java already provides
For example, I can accomplish the above with java.text.MessageFormat by using a template (or a 'pattern' as they call it) such as
```
Dea... | [
0.3345893621444702,
-0.01629171147942543,
0.5627498626708984,
-0.23605677485466003,
-0.0904715359210968,
-0.08879333734512329,
0.24932022392749786,
-0.02281416952610016,
-0.12459766119718552,
-0.8538070321083069,
-0.12614788115024567,
0.3303074538707733,
-0.3373233377933502,
0.200413942337... | |
file, the code and the pattern need to know intimate details about each other. With an EL-like system, the contract between the code and the pattern would be at a much higher level (e.g. customer and order, rather then customer.firstName and order.estimatedDispatchDate), making it easier to change the structure, order ... | [
0.27194589376449585,
-0.3207949995994568,
0.5748748183250427,
0.15518726408481598,
0.08983417600393295,
0.10848202556371689,
-0.23494374752044678,
-0.26306676864624023,
-0.048434872180223465,
-0.6201173067092896,
-0.044699277728796005,
0.7122589945793152,
-0.42078399658203125,
0.0026924782... | |
EL outside J2EE](http://illegalargumentexception.blogspot.com/2008/04/java-using-el-outside-j2ee.html). | [
0.047543346881866455,
0.06901619583368301,
0.06844200193881989,
-0.3494189381599426,
0.04765542596578598,
-0.427891343832016,
0.2709346115589142,
-0.15039560198783875,
-0.20985376834869385,
0.2261069416999817,
0.09448405355215073,
0.6586593389511108,
-0.3685172498226166,
-0.267885416746139... | |
Python's convention is that variables are created by first assignment, and trying to read their value before one has been assigned raises an exception. PHP by contrast implicitly creates a variable when it is read, with a null value. This means it is easy to do this in PHP:
```
function mymodule_important_calculation(... | [
0.050550445914268494,
0.05748889222741127,
-0.011738278903067112,
-0.23315687477588654,
-0.2415168732404709,
-0.16679976880550385,
0.34471648931503296,
-0.010689904913306236,
-0.2980423867702484,
-0.10383828729391098,
-0.14468546211719513,
0.5090862512588501,
-0.5651677846908569,
-0.055042... | |
`resukt` is being used before it is assigned.
So... is there a way to configure PHP to be stricter with variable assignments?
**PHP** doesn't do much forward checking of things at parse time.
The best you can do is crank up the warning level to report your mistakes, but by the time you get an E\_NOTICE, its too late... | [
0.43272238969802856,
-0.09252606332302094,
0.1928662359714508,
0.07829325646162033,
-0.27960461378097534,
-0.33852922916412354,
0.8123152852058411,
-0.14981822669506073,
-0.21781215071678162,
-0.5227624177932739,
0.2262105941772461,
0.7278035283088684,
-0.10525796562433243,
0.0119477203115... | |
mailing-list this week and I think its just the tool you want. Its more a lint-checker, but it adds scope to the current lint checking PHP does.
[**PHP-Initialized Google Project**](http://code.google.com/p/php-initialized/wiki/Features)
There's the hope that with a bit of attention we can get this behaviour impleme... | [
0.7545494437217712,
-0.04826801270246506,
0.24139727652072906,
0.21415340900421143,
-0.293992280960083,
-0.24240949749946594,
0.3578873872756958,
0.20396959781646729,
-0.37955620884895325,
-0.45508602261543274,
0.28320685029029846,
0.483072429895401,
-0.13068898022174835,
-0.20202210545539... | |
I am looking for a good way to consistently test my web applications from the end users point of view. I have all kinds of ways to check to make sure my code is working behind the scenes. I can't count the number of times that I make a change to a piece of code, test it and it works fine and then deploy it only to have... | [
0.827922523021698,
0.32070374488830566,
-0.12404176592826843,
0.1383519470691681,
0.18748699128627777,
-0.12185785919427872,
0.49235236644744873,
0.17672689259052277,
-0.10294286906719208,
-0.539976179599762,
0.21452802419662476,
0.395398885011673,
-0.09297588467597961,
0.1179838478565216,... | |
I make a change to assure me I did not break something somewhere else.
It needs to be able to input correct and incorrect entries so that client side validation can be tested also.
Thank you,
Scott and the Dev Team
Have you seen [this](http://gojko.net/2007/05/20/automating-web-tests-with-fitnesse-and-selenium/) tec... | [
0.7773550152778625,
0.017336223274469376,
-0.1140957623720169,
0.1964813619852066,
0.011281301267445087,
-0.2949053943157196,
0.3733113408088684,
-0.5116316676139832,
0.05178317427635193,
-0.6702695488929749,
0.24827614426612854,
0.3813215494155884,
0.0025387767236679792,
-0.10895631462335... | |
I'm a little blockheaded right now…
I have a date string in european format **dd.mm.yyyy** and need to transform it to **mm.dd.yyyy** with classic ASP. Any quick ideas?
If its always in that format you could use split
```
d = split(".","dd.mm.yyyy")
s = d(1) & "." & d(0) & "." & d(2)
```
this would allow for dates ... | [
0.703214168548584,
0.01987846940755844,
0.6351739168167114,
-0.04912048205733299,
0.14491325616836548,
-0.0949309840798378,
0.034440767019987106,
0.11136242747306824,
-0.08674704283475876,
-0.5454632639884949,
-0.21107494831085205,
0.2622908353805542,
-0.16634130477905273,
0.29226857423782... | |
I am building a table using the DataGridView where a user can select items from a dropdown in each cell. To simplify the problem, lets say i have 1 column. I am using the DataGridViewComboBoxColumn in the designer. I am trying to support having each row in that column have a different list of items to choose from.
Is ... | [
0.039368536323308945,
0.034022826701402664,
0.5907732248306274,
-0.11910877376794815,
-0.061677586287260056,
0.21600358188152313,
-0.08218836784362793,
-0.2811877429485321,
-0.3238199055194855,
-0.8624159097671509,
0.07304123044013977,
0.14488430321216583,
-0.5757184624671936,
0.2874826490... | |
dataGrid.Rows[rowIndex].Cells[colIndex];
// You might pass a boolean to determine whether to clear or not.
dgvcbc.Items.Clear();
foreach (object itemToAdd in itemsToAdd)
{
dgvcbc.Items.Add(itemToAdd);
}
}
``` | [
-0.2384534776210785,
-0.2474166601896286,
0.41245731711387634,
-0.16410644352436066,
0.07982982695102692,
0.039771806448698044,
0.17173346877098083,
-0.0945914089679718,
-0.36538317799568176,
-0.3107837438583374,
-0.4026936888694763,
0.1903320550918579,
-0.3709968030452728,
0.4512690305709... | |
How can I set the background color of a specific item in a *System.Windows.Forms.ListBox*?
I would like to be able to set multiple ones if possible.
Probably the only way to accomplish that is to draw the items yourself.
Set the `DrawMode` to `OwnerDrawFixed` and code something like this on the DrawItem event:
```
p... | [
0.1769135296344757,
-0.35279929637908936,
0.7274547219276428,
-0.2074258178472519,
-0.004949888680130243,
0.13536806404590607,
0.02895212173461914,
-0.3583223223686218,
-0.1599629670381546,
-0.8201934695243835,
-0.05020301416516304,
0.5624275207519531,
-0.34528279304504395,
-0.017336118966... | |
bound, but more flexible in way of columns). | [
-0.6407926678657532,
-0.15111912786960602,
0.6795908808708191,
0.0589267797768116,
-0.3878440260887146,
0.13526462018489838,
0.21247075498104095,
-0.6224253177642822,
-0.46248674392700195,
-0.44528377056121826,
-0.4982345700263977,
-0.14272622764110565,
-0.4182858467102051,
-0.169486567378... | |
I have a table with say 3 columns. There's no primary key so there can be duplicate rows. I need to just keep one and delete the others. Any idea how to do this is Sql Server?
I'd SELECT DISTINCT the rows and throw them into a temporary table, then drop the source table and copy back the data from the temp.
**EDIT:** n... | [
-0.09622978419065475,
0.2764686048030853,
0.44632285833358765,
-0.02165391854941845,
-0.07046578824520111,
0.20889288187026978,
-0.029311636462807655,
-0.23190847039222717,
-0.361410528421402,
-0.8678539395332336,
0.19077515602111816,
0.25966522097587585,
-0.3139893114566803,
0.45587551593... | |
When doing shell scripting, typically data will be in files of single line records like csv. It's really simple to handle this data with `grep` and `sed`. But I have to deal with XML often, so I'd really like a way to script access to that XML data via the command line. What are the best tools?
I've found xmlstarlet to... | [
0.2905687093734741,
-0.02288234606385231,
0.14053775370121002,
-0.06404063105583191,
0.14931906759738922,
-0.2983930706977844,
-0.07319071143865585,
0.1727495789527893,
0.04959971457719803,
-0.6083998680114746,
-0.15496738255023956,
0.932597815990448,
0.026243137195706367,
-0.2900895476341... | |
I am setting up a few Wordpress blog sites. I have created a user in mysql that wordpress will use to access its database. The docs say to give this user all privileges on the database.
Does it really need full privileges? I expect not, so does anyone know the min set of privileges that it really needs?
I grant:
* AL... | [
0.4423648416996002,
0.11832179874181747,
0.4537210762500763,
0.16474589705467224,
0.21052686870098114,
-0.07619071751832962,
-0.02131757140159607,
0.2635382115840912,
-0.06764046102762222,
-0.8046384453773499,
0.16861285269260406,
0.17444899678230286,
-0.12262754887342453,
0.21586823463439... | |
Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.)
The default way to display them is just one massive linear dump which just wraps over and over and you have to parse carefully to read it.
Is there som... | [
0.12381528317928314,
0.04100792855024338,
-0.16648851335048676,
0.04525332897901535,
-0.13210903108119965,
-0.264892578125,
0.1207154244184494,
-0.11779353022575378,
-0.42163124680519104,
-0.6083358526229858,
-0.1295594871044159,
0.5627177953720093,
-0.4854031205177307,
-0.2778103649616241... | |
the idea.
```
from pprint import pprint
a = [0, 1, ['a', 'b', 'c'], 2, 3, 4]
pprint(a)
```
Note that for a short list like my example, pprint will in fact print it all on one line. However, for more complex structures it does a pretty good job of pretty printing data. | [
-0.07881425321102142,
0.08681569248437881,
0.7712664604187012,
-0.18103276193141937,
-0.39703238010406494,
0.033967025578022,
-0.010162115097045898,
-0.2006898820400238,
-0.32793062925338745,
-0.3656938672065735,
-0.20134566724300385,
0.3492666184902191,
-0.492798388004303,
-0.268942475318... | |
Say I have the following web.config:
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authentication mode="Windows"></authentication>
</system.web>
</configuration>
```
Using ASP.NET C#, how can I detect the Mode value of the Authentication tag?
Try `Context.User.Identity.Auth... | [
0.2885498106479645,
0.30925440788269043,
0.6908246278762817,
-0.07142271101474762,
0.06849008053541183,
0.030890407040715218,
0.03916948288679123,
-0.32653096318244934,
-0.03803708031773567,
-0.340449720621109,
-0.10678653419017792,
0.35333162546157837,
-0.29823318123817444,
-0.00487588625... | |
How many people actually write an SDD document before writing a single line of code?
How do you handle large CSCI's?
What standard do you use for SDD content?
What tailoring have you done?
I certainly have. Historically and on recent projects.
Years ago I worked in organisations where templates were everything.
... | [
1.0023311376571655,
0.14465780556201935,
-0.14835861325263977,
0.015358483418822289,
-0.18669390678405762,
-0.14503809809684753,
0.1002148985862732,
-0.09600057452917099,
-0.008160975761711597,
-0.7772881388664246,
0.3576349914073944,
0.4286225140094757,
-0.03402092680335045,
-0.0385868139... | |
single line of code" there wouldn't be a a lot of detail. The documents I produce before I start coding are meant to get the idea of what we need to build across to the affected teams and senior management so they introduce high level architecture, functionality, technologies, risks and scope. Those last two are really... | [
0.8928980231285095,
0.06898815929889679,
0.10068721324205399,
0.4519497752189636,
0.05764202028512955,
-0.13474193215370178,
0.34408318996429443,
0.1721488982439041,
0.11431204527616501,
-0.6948032379150391,
-0.26382210850715637,
0.30104726552963257,
-0.057231828570365906,
-0.1865542083978... | |
Looking for an open source library, for C++, Java, C# or Python, for reading the data from Quicken **.qdf** files.
@Swati: Quicken **.qif** format is for transfer only and is not kept up to date by the application like the .qdf file is.
QDF is proprietary and not really meant for reading other than my Quicken, probabl... | [
0.46395784616470337,
-0.33551716804504395,
0.1119881272315979,
0.3623282313346863,
-0.20096337795257568,
-0.25349000096321106,
-0.07539945095777512,
0.18344566226005554,
-0.053586479276418686,
-0.7724010348320007,
-0.014053359627723694,
0.3742623031139374,
-0.15574654936790466,
0.042732454... | |
export to an exchange format, each version differs and strange things happen for many conditions that since they aren't documented (QDF) it becomes a bad situation for the programmer.
OFX is what allows online banking, brokerages and apps like mint.com securely get financial data. It is a standard and consistent. Find... | [
0.40631338953971863,
0.14838284254074097,
0.203377366065979,
0.4468717873096466,
0.1511387974023819,
-0.4415643811225891,
-0.32623180747032166,
0.3802683651447296,
-0.22894753515720367,
-0.5527163147926331,
-0.04843156039714813,
0.17354944348335266,
-0.10870310664176941,
0.0901049524545669... | |
How does it work, what is it used for and when should one use it?
Let's explain the strategy pattern the easy way:
You have a class `Car()` with a method `run()`, so you use it this way in a pseudo language:
```
mycar = new Car()
mycar.run()
```
Now, you may want to change the `run()` behavior on the fly, while the... | [
0.519397497177124,
-0.09232576936483383,
-0.026025807484984398,
0.22796383500099182,
0.08996398746967316,
0.06053470820188522,
-0.00040715720388107,
-0.07267645001411438,
-0.0691952109336853,
-0.3399907648563385,
0.2658323645591736,
0.7775092720985413,
-0.1670028567314148,
0.06292565912008... | |
is another: it delegates the behavior of the `run()` method to another class:
```
Class Car()
{
this.motor = new Motor(this)
// passing "this" is important for the motor so it knows what it is running
method run()
{
this.motor.run()
}
method changeMotor(motor)
{
this.mot... | [
0.3714907169342041,
-0.2755691111087799,
0.22149713337421417,
0.019929422065615654,
-0.0453060008585453,
0.03084965981543064,
-0.0694880411028862,
-0.39627474546432495,
-0.20809710025787354,
-0.3903183937072754,
0.07283584773540497,
0.8321822285652161,
-0.399326354265213,
0.255284398794174... | |
a program than in real life, right? ;-) )
It's very useful if you have a lot of complex states: you can change and maintain them much more easily. | [
0.21085508167743683,
-0.23577193915843964,
-0.05964483320713043,
0.5946246385574341,
0.17782269418239594,
-0.1480601578950882,
0.3666016459465027,
-0.0365908108651638,
-0.15154775977134705,
-0.54411780834198,
-0.19643370807170868,
0.48389527201652527,
-0.020921798422932625,
-0.048040077090... | |
How do I use groovy to search+replace in XML?
I need something as short/easy as possible, since I'll be giving this code to the testers for their SoapUI scripting.
More specifically, how do I turn:
```
<root><data></data></root>
```
into:
```
<root><data>value</data></root>
```
Some of the stuff you can do with ... | [
-0.04319758340716362,
-0.08535631000995636,
0.6026816964149475,
0.15918642282485962,
-0.24626263976097107,
0.07960517704486847,
0.0054524121806025505,
-0.31318578124046326,
0.09011632204055786,
-0.7386865019798279,
0.17611736059188843,
0.6937409043312073,
-0.33889833092689514,
-0.238994225... | |
faster than using regular expressions which is again faster than using a fullblown XSLT transformation (makes sense actually). | [
-0.3560853898525238,
-0.2926596403121948,
0.24980148673057556,
0.3443366289138794,
-0.33140212297439575,
-0.1814853698015213,
0.30779212713241577,
-0.15743549168109894,
0.08605402708053589,
-0.7788555026054382,
-0.18513920903205872,
0.643917441368103,
-0.2882027328014374,
-0.59211719036102... | |
I am working on the issue of testing my GUI and I am not entirely sure of the best approach here. My GUI is built using a traditional MVC framework so I am easily able to test the logic parts of the GUI without bringing up the GUI itself. However, when it comes to testing the functionality of the GUI, I am not really s... | [
0.452310174703598,
0.4310208559036255,
-0.08993604779243469,
0.09943678975105286,
-0.3262661099433899,
0.016508331522345543,
0.19328419864177704,
-0.14802365005016327,
0.01910373382270336,
-0.43231403827667236,
0.19606028497219086,
0.9501257538795471,
-0.060089465230703354,
0.0075396127067... | |
a message to the server and then observing the response on the GUI. My initial thoughts are that functional testing is the way to go here since I need a whole system running to really test the UI. Comments on this issue would be appreciated.
You have (at least) 2 issues - the complexity of the environment (the server) ... | [
0.33906933665275574,
0.12744849920272827,
0.14527885615825653,
0.10210327804088593,
-0.13784047961235046,
0.008916551247239113,
0.34094303846359253,
0.05030907317996025,
-0.22960016131401062,
-0.651949942111969,
0.06260883063077927,
0.7093526721000671,
-0.30121710896492004,
-0.143785223364... | |
but it's a long term benefit.
The environment, on the other hand, is an area that can be tamed. If your application is architected using the Dependency Injection/Inversion technique (where you 'inject' the server component into the application), then you can use a 'mock' of the relevant server interfaces to enable you... | [
0.3934905230998993,
0.13035212457180023,
-0.2019975632429123,
0.3393200635910034,
0.0510244220495224,
-0.05128534138202667,
0.3649602234363556,
-0.1750681847333908,
0.11225581914186478,
-0.5443055629730225,
-0.0024989598896354437,
0.730713963508606,
-0.24814249575138092,
0.0136294132098555... | |
What are the typical average bytes-per-character rates for different unicode encodings in different languages?
E.g. if I wanted the smallest number of bytes to encode some english text, then on average UTF-8 would be 1-byte per character and UTF-16 would be 2 so I'd pick UTF-8.
If I wanted some Korean text, then UTF-... | [
-0.17600396275520325,
0.30831199884414673,
0.05717300623655319,
0.03978864103555679,
-0.22856123745441437,
0.43849894404411316,
0.3258989155292511,
0.21112507581710815,
-0.12721660733222961,
-0.6963171362876892,
-0.2162550389766693,
0.15861786901950836,
-0.049331966787576675,
-0.1384334564... | |
allocated to contiguous code pages. The big exception is accented Latin characters, which are allocated higher in the code space than the unaccented forms. I don't have hard numbers for these.
For languages with contiguous character allocation, there is a [table with detailed numbers for various languages](http://en.w... | [
-0.12678194046020508,
-0.11447644233703613,
0.10118331760168076,
0.07227912545204163,
-0.1736234724521637,
0.26832640171051025,
-0.040465690195560455,
-0.10983581095933914,
-0.26383692026138306,
-0.7803186178207397,
-0.3914978504180908,
0.06156646087765694,
-0.2608914077281952,
0.031893748... | |
for a variety of languages. But these techniques aren't especially common. | [
0.57985919713974,
0.21258041262626648,
-0.26360031962394714,
0.17711809277534485,
0.4374661147594452,
0.14319148659706116,
0.41499054431915283,
0.10788225382566452,
-0.1316453218460083,
-0.41778767108917236,
-0.13258609175682068,
0.509621798992157,
0.2612757682800293,
-0.2931850552558899,
... | |
Is it possible to set code behind a resource dictionary in WPF. For example in a usercontrol for a button you declare it in XAML. The event handling code for the button click is done in the code file behind the control. If I was to create a data template with a button how can I write the event handler code for it's but... | [
0.16459296643733978,
-0.1364601105451584,
-0.031270142644643784,
0.1803566813468933,
0.04547403007745743,
-0.28351327776908875,
-0.031526368111371994,
-0.12617453932762146,
-0.24350187182426453,
-0.6372350454330444,
0.14296256005764008,
0.6754592657089233,
-0.11143414676189423,
-0.19956339... | |
have a ResourceDictionary called MyResourceDictionary. In your MyResourceDictionary.xaml file, put the x:Class attribute in the root element, like so:
```
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
... | [
-0.284931480884552,
0.11972829699516296,
0.30553582310676575,
-0.1379595398902893,
0.20311373472213745,
0.07530041038990021,
0.06411518901586533,
0.060952987521886826,
-0.1863533854484558,
-0.5682812333106995,
-0.3708360195159912,
0.18256880342960358,
-0.16591905057430267,
0.23298449814319... | |
{
public MyResourceDictionary()
{
InitializeComponent();
}
... // event handlers ahead..
}
}
```
And you're done. You can put whatever you wish in the code behind: methods, properties and event handlers.
**== Update for Windows 10 apps ==**
And just in case you are pl... | [
0.39392879605293274,
0.09817636013031006,
0.529637336730957,
0.10016871988773346,
0.3393954634666443,
-0.05190223455429077,
0.15764842927455902,
-0.27382487058639526,
-0.4098033308982849,
-0.6287103295326233,
-0.3464430570602417,
0.6072608828544617,
-0.11361003667116165,
-0.138930469751358... | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:rd="using:MyCompany.MyProject">
<!-- no need in x:ClassModifier="public" in the header above -->
<Application.Resources>
<ResourceDictionary>
... | [
-0.42494121193885803,
0.2593025863170624,
0.3141419589519501,
-0.09821091592311859,
-0.0588909350335598,
-0.033832892775535583,
0.07456876337528229,
-0.058930784463882446,
-0.21540963649749756,
-0.5190966725349426,
-0.4957681894302368,
0.2781161665916443,
-0.22331030666828156,
0.0992371588... | |
<!-- <ResourceDictionary Source="/MyResourceDictionary.xaml" />-->
<!-- Create instance of your custom dictionary instead of the above source reference -->
<rd:MyResourceDictionary />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.R... | [
0.13513733446598053,
0.2668653726577759,
0.368216335773468,
0.03480919450521469,
0.27606675028800964,
0.00536319287493825,
0.315731942653656,
-0.03767674043774605,
-0.3153010606765747,
-0.9163134694099426,
-0.3412042260169983,
0.4088006317615509,
-0.29754069447517395,
0.20261959731578827,
... | |
What do you find is the optimal setting for mysql slow query log parameter, and why?
I recommend these three lines
```
log_slow_queries
set-variable = long_query_time=1
log-queries-not-using-indexes
```
The first and second will log any query over a second. As others have pointed out a one second query is pretty fa... | [
-0.09699001163244247,
-0.046981144696474075,
0.39942437410354614,
0.2807520925998688,
-0.04834282025694847,
-0.08487305045127869,
-0.13337941467761993,
0.012970902025699615,
-0.39375850558280945,
-0.7328248620033264,
0.14918793737888336,
0.4093303978443146,
-0.31769394874572754,
-0.0219841... | |
data warehousing any common query should have the best index you can find so pay attention to its output.
Although its certainly not for production, this last option
```
log = /var/log/mysql/mysql.log
```
will log all queries, which can be useful if you are trying to tune a specific page or action. | [
0.2214420735836029,
0.04940549284219742,
0.521718442440033,
0.3870847821235657,
-0.1366984248161316,
-0.5516765117645264,
0.08612751960754395,
-0.16073518991470337,
-0.23298165202140808,
-0.4635264277458191,
-0.1993834227323532,
0.46277791261672974,
-0.3382277190685272,
-0.0420380719006061... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.