text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
speed on what technology to use, when and what you need to know prior to using it.
Sometimes the best way to learn is to just dig in to a framework. Sure, you could use someones wrapper API around something, but if there is something wrong w/ hibernate, then you wouldn't know what's happening.
And to answer "how do i ... | [
0.40784624218940735,
0.12240388989448547,
0.07941482216119766,
0.2802678942680359,
-0.08235779404640198,
-0.15731503069400787,
0.2204902321100235,
0.06439396739006042,
-0.009104485623538494,
-0.810454785823822,
0.1744806468486786,
0.6226276159286499,
0.03383932262659073,
-0.288466781377792... | |
got there. Just gotta jump in and start playing around. | [
0.29921817779541016,
-0.08847511559724808,
0.2558586299419403,
0.2934536337852478,
0.24715293943881989,
-0.36870265007019043,
0.5878475904464722,
0.7350926399230957,
-0.40384605526924133,
-0.17928825318813324,
0.4512418508529663,
0.04219888895750046,
-0.16049522161483765,
-0.24936527013778... | |
First let me say that I really feel directionless on this question. I am using windows integrated security, and I can use vb.net to look up information about a user from AD. I also have other information about users I can look up from a MS SQL 2005 server by getting the logon identity name.
What I would like to do is ... | [
0.5074421167373657,
0.26919829845428467,
0.36082956194877625,
-0.06309715658426285,
-0.11908004432916641,
-0.26165300607681274,
0.06788398325443268,
-0.026980536058545113,
-0.1937313973903656,
-0.6460847854614258,
0.28716036677360535,
0.627223551273346,
0.026298241689801216,
0.092957377433... | |
has been using SQL to store when the user first loads the page. I am stuck not knowing how to show when the user *leaves* the page. I tried using an ajax timer to update a timestamp for the user's visit every one second that also triggers the table to change the status to inactive of any record that has not been update... | [
0.28274285793304443,
0.10330483317375183,
0.42175740003585815,
-0.12564043700695038,
-0.08238445222377777,
-0.3264428675174713,
0.5011495351791382,
0.25234952569007874,
-0.4524179697036743,
-0.6094690561294556,
0.15275435149669647,
0.24639715254306793,
-0.08665125072002411,
0.2268902659416... | |
when the user minimizes the page. This sometimes stops the updates from the ajax timer and kicks the user off the list while they are still viewing the page.
This feature is not important to the function of the site it would be on, so I'd given up on it over a year ago. Since then it has really been a pain to me that ... | [
0.4809291660785675,
0.04653462395071983,
0.29896607995033264,
-0.09846104681491852,
-0.10086672753095627,
-0.2553611695766449,
0.709322988986969,
0.4650440812110901,
-0.06510288268327713,
-0.4619516134262085,
0.3852711319923401,
0.3515934348106384,
-0.21395470201969147,
0.29429566860198975... | |
in the correct direction.
The answer probably depends on how accurate you need the display to be. If it's just to give users a sense of the other people using the site I'd suggest something similar to what you've described, but backing off on the update frequency:
* on a page request associate the user with the page (... | [
0.48064616322517395,
-0.05839809775352478,
0.5848544836044312,
0.16659307479858398,
-0.10533034056425095,
-0.2560921907424927,
0.35444560647010803,
0.34982600808143616,
-0.29495424032211304,
-0.7878764867782593,
-0.1318928301334381,
0.2474675327539444,
-0.18219809234142303,
0.1792643070220... | |
ways people leave a page, but it's never bullet proof. And with regards to the minimised page, I guess it's debatable whether they're actually viewing the page ;) | [
0.6316339373588562,
0.23215846717357635,
0.11281681805849075,
0.33501726388931274,
0.2665852904319763,
-0.045081596821546555,
0.5594266057014465,
-0.09473749995231628,
-0.48361945152282715,
-0.28260865807533264,
0.041777268052101135,
0.42487776279449463,
-0.11752457171678543,
-0.4618943929... | |
Given this class
```
class Foo
{
// Want to find _bar with reflection
[SomeAttribute]
private string _bar;
public string BigBar
{
get { return this._bar; }
}
}
```
I want to find the private item \_bar that I will mark with a attribute. Is that possible?
I have done this with prope... | [
0.030661698430776596,
0.23171861469745636,
0.23054549098014832,
-0.1962805688381195,
-0.11089148372411728,
-0.008518291637301445,
0.1996283084154129,
-0.22972401976585388,
-0.09917905181646347,
-0.47706669569015503,
-0.12108325958251953,
0.4094989597797394,
-0.4871184527873993,
0.146393477... | |
`BindingFlags.NonPublic` and `BindingFlags.Instance` flags
```
FieldInfo[] fields = myType.GetFields(
BindingFlags.NonPublic |
BindingFlags.Instance);
``` | [
0.08569371700286865,
0.3502892255783081,
0.48698005080223083,
-0.27947258949279785,
-0.055193644016981125,
-0.2987707555294037,
0.34766826033592224,
-0.24276582896709442,
0.03704452887177467,
-0.41603922843933105,
-0.4191611111164093,
0.30443453788757324,
-0.6594545245170593,
0.15481767058... | |
Let's say I have two models, Classes and People. A Class might have one or two People as instructors, and twenty people as students. So, I need to have multiple relationships between the models -- one where it's 1->M for instructors, and one where it's 1->M for students.
Edit: Instructors and Students *must* be the sa... | [
0.40644538402557373,
-0.0491313636302948,
-0.12517644464969635,
0.35227543115615845,
0.0425431989133358,
0.3586469888687134,
0.05227646231651306,
0.2531009614467621,
-0.37945008277893066,
-0.638146698474884,
0.07632018625736237,
0.43862810730934143,
0.3054581880569458,
0.07364299893379211,... | |
students, you can use inheritance:
```
class Person < ActiveRecord::Base; end # btw, model names are singular in rails
class Student < Person; end
class Instructor < Person; end
```
then
```
class Course < ActiveRecord::Base # renamed here because class Class already exists in ruby
has_many :students
has_many... | [
0.05415695160627365,
0.11372895538806915,
0.17677916586399078,
0.1660381257534027,
-0.004738244228065014,
-0.09782227873802185,
0.2035098671913147,
-0.2862246334552765,
-0.1637539267539978,
-0.5898308753967285,
-0.15547709167003632,
0.3134884536266327,
-0.06687536835670471,
0.2681811153888... | |
:course
belongs_to :student, :class_name => "Person", :foreign_key => "student_id"
end
class Instructorship < ActiveRecord::Base
belongs_to :course
belongs_to :instructor, :class_name => "Person", :foreign_key => "instructor_id"
end
``` | [
-0.0337226577103138,
0.2790565490722656,
0.25286710262298584,
0.04956166073679924,
0.1698649674654007,
-0.0635954812169075,
0.12529070675373077,
-0.11558525264263153,
0.18166857957839966,
-0.28596341609954834,
-0.5680031180381775,
0.22802233695983887,
0.09716326743364334,
0.305463284254074... | |
I have the feeling that is easy to find samples, tutorials and simple examples on Flex.
It seems harder to find tips and good practices based on real-life projects.
Any tips on how to :
* How to write maintainable actionscript code
* How to ensure a clean separation of concern. Has anybody used an MVC framework ... | [
0.3646673858165741,
-0.0131621602922678,
0.30989962816238403,
-0.006666158325970173,
-0.17390339076519012,
-0.3647439777851105,
0.13181614875793457,
-0.09897584468126297,
-0.5020058155059814,
-0.5008618831634521,
-0.05184430256485939,
0.6313228607177734,
0.11688628792762756,
-0.28838211297... | |
to help.. but your questions deserve an article for each one :) I'll try some short answer.
Maintenable code: I think that the same rules of any other OO languages apply. Some flex-specific rules I'm use to follow: use strong typed variables, always consider dispatching events as the way for your UI components talk ea... | [
0.17367655038833618,
-0.08258143812417984,
0.3888496458530426,
0.25122183561325073,
-0.16017696261405945,
-0.2542351484298706,
0.2069513499736786,
0.1594197154045105,
-0.1823081225156784,
-0.6861950159072876,
-0.017789360135793686,
0.5670716166496277,
-0.17858166992664337,
-0.2914713919162... | |
Right now I'm using BlazeDS, it works very well.. there are many tutorials on the subject out there, if you find any trouble setting up it I would be happy to help.
Latency: Do you mean in client/server comunications? If so, you should explore the various type of channels BlazeDS implements.. pull-only, two-way http p... | [
0.3553521931171417,
-0.4037598967552185,
0.248638316988945,
0.4192342758178711,
-0.41026362776756287,
-0.278092622756958,
0.11369995027780533,
-0.12907159328460693,
-0.388313889503479,
-0.7228739261627197,
-0.08162155747413635,
0.48041802644729614,
-0.13922908902168274,
-0.3866090178489685... | |
(there is a free closed-source version of LCDS). I use the standard http channels in intranet environments, and found no real performance problems even with large datasets.
Well.. quite a lot of stuff, can't be more specific now on each of this points, ask you if need :) | [
0.5417425036430359,
-0.21801869571208954,
0.3808702826499939,
0.03470141068100929,
-0.07792527973651886,
0.16909177601337433,
0.07838895171880722,
0.42213860154151917,
-0.21287570893764496,
-0.8164342045783997,
0.06682635098695755,
0.4653162658214569,
-0.1016092300415039,
-0.06310115009546... | |
I'm working on the creation of an ActiveX EXE using VB6, and the only example I got is all written in Delphi.
Reading the example code, I noticed there are some functions whose signatures are followed by the **safecall** keyword. Here's an example:
```
function AddSymbol(ASymbol: OleVariant): WordBool; safecall;
```... | [
0.07305696606636047,
-0.0799122154712677,
0.40180474519729614,
-0.2361697256565094,
0.006826198194175959,
0.06361893564462662,
0.3986242711544037,
-0.06369442492723465,
0.04659925773739815,
-0.5168213248252869,
-0.24605640769004822,
0.5426136255264282,
-0.711466372013092,
-0.16806966066360... | |
Win32, this implements interprocess COM error notification. It would otherwise be identical to stdcall (the other calling convention used with the win api) | [
-0.34335172176361084,
-0.1740923821926117,
-0.061057351529598236,
-0.2074425220489502,
-0.07856059074401855,
-0.16339625418186188,
0.1042589321732521,
0.14334599673748016,
0.13055133819580078,
-0.6197769045829773,
-0.17746073007583618,
0.6185322403907776,
-0.556486189365387,
-0.02853673137... | |
I have huge 3D arrays of numbers in my .NET application. I need to convert them to a 1D array to pass it to a COM library. Is there a way to convert the array without making a copy of all the data?
I can do the conversion like this, but then I use twice the ammount of memory which is an issue in my application:
```
... | [
0.19461552798748016,
-0.14932401478290558,
0.5084943771362305,
-0.17822030186653137,
-0.15773077309131622,
0.25414320826530457,
0.32199084758758545,
-0.4437966048717499,
-0.24438729882240295,
-0.7687164545059204,
-0.03678566962480545,
0.6180313229560852,
-0.45760294795036316,
0.01911150291... | |
for (k = 0; k < input.GetLength(2); k++)
result[i * input.GetLength(1) * input.GetLength(2) + j * input.GetLength(2) + k)] = input[i,j,l];
return result;
```
I don't believe the way C# stores that data in memory would make it feasible the same way a simple cast in C would. Why not use a 1d array to begin wi... | [
0.04577888175845146,
-0.1668940782546997,
0.2874889671802521,
-0.10556595027446747,
-0.026437489315867424,
0.06049156188964844,
0.33609333634376526,
-0.511280357837677,
-0.024724043905735016,
-0.47531023621559143,
-0.19587185978889465,
0.5110944509506226,
-0.37811511754989624,
0.0145858228... | |
I'm trying to incorporate some JavaScript unit testing into my automated build process. Currently JSUnit works well with JUnit, but it seems to be abandonware and lacks good support for Ajax, debugging, and timeouts.
Has anyone had any luck automating (with [Ant](https://en.wikipedia.org/wiki/Apache_Ant)) a unit testi... | [
0.3467349410057068,
-0.22954605519771576,
-0.21288691461086273,
0.11337565630674362,
-0.45487889647483826,
-0.12389498949050903,
0.16466931998729706,
-0.27042028307914734,
0.13010579347610474,
-0.7762415409088135,
0.19743047654628754,
0.6099960803985596,
0.16311444342136383,
-0.28433442115... | |
JSUnit is the only one I know that may be used with an automated build.
If you are doing 'true' unit test you should not need AJAX support. For example, if you are using an [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) Ajax framework such as DWR, you can easily write a mock function:
```
function moc... | [
0.3116235136985779,
-0.16446098685264587,
0.18095409870147705,
-0.06990735977888107,
-0.1281784474849701,
-0.08104293048381805,
0.5844995379447937,
-0.36743462085723877,
0.09562583267688751,
-0.75859135389328,
0.08011456578969955,
0.7128947377204895,
-0.11483991146087646,
-0.04118895903229... | |
);
}
```
And yes, JSUnit does handle timeouts: *[Simulating Time in JSUnit Tests](http://googletesting.blogspot.com/2007/03/javascript-simulating-time-in-jsunit.html)* | [
-0.03838121518492699,
-0.1274624466896057,
-0.023798488080501556,
0.007886601611971855,
0.133745014667511,
0.1668829321861267,
0.4269765317440033,
-0.17967553436756134,
-0.02488582395017147,
-0.5041269063949585,
-0.0710316002368927,
0.4443168640136719,
-0.047236762940883636,
-0.07021651417... | |
I've had a lot of trouble trying to come up with the best way to properly follow TDD principles while developing UI in JavaScript. What's the best way to go about this?
Is it best to separate the visual from the functional? Do you develop the visual elements first, and then write tests and then code for functionality?... | [
0.6727610230445862,
0.005969841033220291,
0.1690368801355362,
0.04162900522351265,
-0.18004097044467926,
0.09352964162826538,
0.08896517753601074,
-0.41311556100845337,
0.21336676180362701,
-0.7129590511322021,
0.20260795950889587,
0.7006028294563293,
0.008039865642786026,
-0.1723015308380... | |
But for unit testing, none of that is important.
What you want is just the UI you are going to be interacting with, and your script. The tool you'll use for this is basically [JsUnit](https://github.com/pivotal/jsunit), which takes an HTML document, with some Javascript functions on the page and executes them in the c... | [
0.219760000705719,
-0.0005196520942263305,
0.20050637423992157,
0.17988981306552887,
-0.26562386751174927,
-0.17364849150180817,
-0.08187521249055862,
-0.08114451915025711,
0.09346158802509308,
-0.700301468372345,
0.12505364418029785,
0.3939562141895294,
0.04823172837495804,
-0.16602148115... | |
a bit confusing so lets see if we can do a little test. Lets to some TDD to assume that after a component is loaded, a list of elements is colored based on the content of the LI.
**tests.html**
```
<html>
<head>
<script src="jsunit.js"></script>
<script src="mootools.js"></script>
<script src="yourcontrol.js"></scri... | [
0.29814720153808594,
-0.22706077992916107,
0.5516959428787231,
-0.010612055659294128,
0.08587753027677536,
0.1283230185508728,
0.2991945147514343,
-0.6887605786323547,
0.06377413868904114,
-0.6678922772407532,
0.03347775712609291,
0.7047197222709656,
-0.23349922895431519,
-0.31585398316383... | |
"mockList" );
assertEqual( $$("#mockList li")[0].getStyle("background-color", "red") );
}
</script>
</html>
```
Obviously TDD is a multi-step process, so for our control, we'll need multiple examples.
**yourcontrol.js (step1)**
```
function ColorCtrl( id ) {
/* Fail! */
}
```
**yourcontrol.js ... | [
0.12066690623760223,
0.008380159735679626,
0.7348937392234802,
-0.3021569848060608,
-0.24758046865463257,
0.3631230294704437,
0.6512727737426758,
-0.4625614583492279,
-0.010207109153270721,
-0.5945881009101868,
-0.19548644125461578,
0.8639948964118958,
-0.2985224425792694,
-0.0044518266804... | |
your server controls will be. But it does get you a nice system for TDD'ing with JavaScript. | [
0.13895347714424133,
-0.05189964175224304,
0.29981714487075806,
0.4176735281944275,
-0.02302645891904831,
-0.27384841442108154,
0.167909175157547,
0.29771095514297485,
-0.030112333595752716,
-0.7083249688148499,
0.21585442125797272,
0.5306013226509094,
-0.12884263694286346,
-0.205535084009... | |
I have uncovered another problem in the effort that we are making to port several hundreds of ksh scripts from AIX, Solaris and HPUX to Linux. See [here](https://stackoverflow.com/questions/74372/how-to-overcome-an-incompatibility-between-the-ksh-on-linux-vs-that-installed-o) for the previous problem.
This code:
```
... | [
0.22391211986541748,
0.34368208050727844,
0.16730815172195435,
-0.1093054786324501,
-0.0064616212621331215,
-0.10584933310747147,
0.5013731718063354,
0.13000796735286713,
-0.05345411226153374,
-0.6828626394271851,
-0.41119584441185,
0.48677513003349304,
-0.26828473806381226,
0.505706131458... | |
question are:
* Is there an environment variable that will cause pdksh to behave like ksh93? Failing that:
* Is there an option on pdksh to get the required behavior?
Well after one year there seems to be no solution to my problem.
I am adding this answer to say that I will have to live with it...... | [
0.2275746911764145,
0.2534468173980713,
0.28750014305114746,
-0.06835111975669861,
-0.10672596096992493,
0.057428404688835144,
0.5799260139465332,
0.2760356366634369,
-0.30353158712387085,
-0.4320194721221924,
0.06547629833221436,
0.2353532612323761,
-0.23699504137039185,
0.252217233180999... | |
Adding an element to the head of an alist (Associative list) is simple enough:
```
> (cons '(ding . 53) '((foo . 42) (bar . 27)))
((ding . 53) (foo . 42) (bar . 27))
```
Appending to the tail of an alist is a bit trickier though. After some experimenting, I produced this:
```
> (define (alist-append alist pair) `(,... | [
0.20177236199378967,
0.03331189230084419,
0.5388111472129822,
-0.40799668431282043,
-0.2364451289176941,
-0.053136855363845825,
0.40749984979629517,
-0.46589896082878113,
0.22422130405902863,
-0.07099083065986633,
-0.31679996848106384,
0.3044099807739258,
-0.9105217456817627,
-0.0136570036... | |
to an a-list. You cons onto an a-list.
An a-list is logically a set of associations. You don't care about the order of elements in a set. All you care about is presence or absence of a particular element. In the case of an a-list, all you care about is whether there exists an association for a given tag (i.e., a pair ... | [
0.265816867351532,
0.013057408854365349,
-0.15955978631973267,
0.2858828902244568,
-0.12940962612628937,
-0.11414574086666107,
0.024437561631202698,
-0.31788983941078186,
-0.1900857388973236,
-0.3055737018585205,
-0.34197092056274414,
0.2851870656013489,
-0.7305001616477966,
0.140034571290... | |
General
-------
* Follow the same standards for all tests.
* Be clear about what each test state is.
* Be specific about the expected behavior.
Examples
--------
1) MethodName\_StateUnderTest\_ExpectedBehavior
```
Public void Sum_NegativeNumberAs1stParam_ExceptionThrown()
Public void Sum_NegativeNumberAs2ndParam_... | [
0.320402055978775,
0.24369719624519348,
0.045494984835386276,
0.25449034571647644,
-0.20827697217464447,
-0.009528080001473427,
0.37260907888412476,
-0.6156333088874817,
-0.2170301228761673,
-0.5482758283615112,
0.0852060467004776,
0.5199972987174988,
0.16707751154899597,
0.171549811959266... | |
to [Ray's answer](https://stackoverflow.com/questions/96297/naming-conventions-for-unit-tests#96476) I don't think the *Test* prefix is necessary. It's test code, we know that. If you need to do this to identify the code, then you have bigger problems, **your test code should not be mixed up with your production code.*... | [
0.8086550831794739,
0.08876334875822067,
0.2227182537317276,
0.2522420883178711,
-0.22466233372688293,
-0.2944350242614746,
0.22551146149635315,
-0.19007152318954468,
0.100636787712574,
-0.3777305781841278,
0.13230693340301514,
0.6605022549629211,
-0.10523748397827148,
0.229873389005661,
... | |
We have a suite of interlinked .Net 3.5 applications. Some are web sites, some are web services, and some are windows applications. Each app currently has its own configuration file (app.config or web.config), and currently there are some duplicate keys across the config files (which at the moment are kept in sync manu... | [
0.5508010387420654,
0.20889340341091156,
0.674659788608551,
0.40582650899887085,
0.29160234332084656,
0.1506987363100052,
-0.23674248158931732,
-0.07832873612642288,
-0.32221388816833496,
-0.9079384803771973,
-0.06479328125715256,
0.5371120572090149,
-0.2832949459552765,
-0.028940640389919... | |
apps if required? We would also like to have separate configs for each environment (so when deploying you don't have to manually change certain config values that are environment specific such as conenction strings), but at the same time don't want to maintain multiple large config files (one for each environment) as k... | [
0.48193487524986267,
0.1862078458070755,
0.3424317240715027,
0.20295704901218414,
0.08785606175661087,
0.04513200744986534,
0.03545750305056572,
-0.08599038422107697,
-0.19638046622276306,
-1.0300889015197754,
-0.1497453898191452,
0.6263551115989685,
-0.7433669567108154,
-0.305438309907913... | |
<WebServiceUri uri="${WebServiceUri}" />
</MyAppConfig>
```
During a build we generate all the configs for the different environments by just looping through each environment in a NAnt script, changing the value of the NAnt properties ${DbConnString} and ${WebServiceUri} for each environment (in fact these are all se... | [
0.5282537937164307,
0.05706356465816498,
0.2684638798236847,
0.09082884341478348,
-0.0963275209069252,
-0.07174305617809296,
0.46840882301330566,
-0.20600353181362152,
-0.08818385750055313,
-0.688300371170044,
0.11903036385774612,
0.529960572719574,
-0.06303922832012177,
0.0741685852408409... | |
Is there a tool to automatically search through my site and test all the links? I hate running across bad urls.
[Xenu link sleuth](http://home.snafu.de/tilman/xenulink.html) is excellent (and free) | [
0.3828180134296417,
0.09364667534828186,
0.15595993399620056,
0.44898054003715515,
-0.08379599452018738,
-0.6266457438468933,
0.5435152649879456,
0.4211583137512207,
-0.17124788463115692,
-0.7328796982765198,
0.09194736182689667,
0.217520073056221,
0.10736030340194702,
0.28266337513923645,... | |
I have a SQL statement that looks like:
```
SELECT [Phone]
FROM [Table]
WHERE
(
[Phone] LIKE '[A-Z][a-z]'
OR [Phone] = 'N/A'
OR [Phone] LIKE '[0]'
)
```
The part I'm having trouble with is the where statement with the "LIKEs". I've seen SQL statements where authors used `like` statements in the way I'm u... | [
0.42484426498413086,
0.30940723419189453,
0.2540837228298187,
0.05735550448298454,
-0.2435622364282608,
-0.3045736849308014,
0.2124767005443573,
0.15908120572566986,
0.07118851691484451,
-0.34201666712760925,
0.2293023020029068,
0.5064774751663208,
-0.3469303846359253,
0.126760333776474,
... | |
have characters. Or phone numbers which contain nothing but zero.
Check [here](http://technet.microsoft.com/en-us/library/aa933232(v=sql.80).aspx).
[] matches a range of characters.
I think you want something like this:
```
SELECT [Phone]
FROM [Table]
WHERE
(
[Phone] LIKE '%[A-Z]%'
OR [Phone] LIKE '%[a-z]%'
... | [
0.31747186183929443,
0.32193124294281006,
0.08068475872278214,
0.03532404452562332,
0.24288126826286316,
0.19072017073631287,
0.23835702240467072,
0.060569144785404205,
0.06249197944998741,
-0.5612319111824036,
-0.24443559348583221,
0.332731157541275,
-0.1762218475341797,
-0.01544194668531... | |
Sessions in PHP seemed to have changed since the last time I used them, so I'm looking for a simple way of using sessions but at the same time for it to be relatively secure and a good common practice.
Session management changed some time back (I think it was around 4.4). The old mechanism still works, but is deprecate... | [
0.22560694813728333,
-0.03873532637953758,
0.20268447697162628,
0.08861297369003296,
-0.407846599817276,
-0.20470018684864044,
0.44564542174339294,
0.22142775356769562,
-0.439742773771286,
-0.48831918835639954,
0.33836236596107483,
0.5453888773918152,
-0.2447623759508133,
0.101534098386764... | |
before starting the session on the next page. Using [autoload](http://docs.php.net/manual/en/language.oop5.autoload.php) can help you out here.
You must [start a session](http://docs.php.net/manual/en/function.session-start.php) before you can use $\_SESSION. Since starting the session sends headers, you can't have an... | [
0.36072880029678345,
-0.036581650376319885,
0.3462231457233429,
0.020485175773501396,
-0.15849223732948303,
-0.560359001159668,
0.6444770693778992,
-0.04979954659938812,
-0.5096350312232971,
-0.6052453517913818,
-0.38680195808410645,
0.7426409125328064,
-0.3356208801269531,
0.2330814749002... | |
[regenerate the session-id](http://docs.php.net/manual/en/function.session-regenerate-id.php) whenever a users privileges changes though. In general that means, whenever they log in. This is to prevent session-fixation (A form of session-hijacking). See [this recent thread @ Sitepoint](http://www.sitepoint.com/forums/s... | [
0.1199927106499672,
-0.15582185983657837,
0.2947534918785095,
0.007953433319926262,
0.02955475077033043,
-0.528449296951294,
0.7594953775405884,
0.07610217481851578,
-0.6747323870658875,
-0.5484440326690674,
-0.4778013527393341,
0.48739296197891235,
-0.3056776225566864,
0.4745069444179535,... | |
How do you access the response from the Request
object in MooTools? I've been looking at the documentation and the MooTorial, but
I can't seem to make any headway. Other Ajax stuff I've done with
MooTools I haven't had to manipulate the response at all, so I've just
been able to inject it straight into the document, bu... | [
0.3393760025501251,
-0.23159514367580414,
0.3641171455383301,
0.4402293562889099,
-0.06344518810510635,
-0.07452206313610077,
0.0764581635594368,
0.14517848193645477,
-0.369798481464386,
-0.7220885753631592,
-0.11217653751373291,
0.5290246605873108,
0.020358672365546227,
-0.101536899805068... | |
already been made, preferably
outside of the Request object. It's for an RSS reader, so I need to do
some parsing and Request is just being used to get the feed from a
server file. This function is a method in a class, which should return
the response in a string, but it isn't returning anything but
undefined:
```
... | [
0.7734056115150452,
-0.42014279961586,
0.7284544110298157,
-0.09349886327981949,
-0.008693084120750427,
-0.07386048138141632,
0.05814367160201073,
-0.1324319839477539,
-0.2085612267255783,
-0.5216947793960571,
0.05052018165588379,
0.5059938430786133,
-0.4074079692363739,
0.3264176845550537... | |
method: this.options.method,
url: this.options.rssFetchPath,
data: { 'url' : site },
onRequest: function() { | [
-0.22318755090236664,
-0.20823684334754944,
0.4462166726589203,
-0.01977366954088211,
0.045414552092552185,
0.07919689267873764,
0.15861742198467255,
-0.04546623304486275,
-0.3319631814956665,
-0.4160432815551758,
-0.21448960900306702,
0.19877688586711884,
-0.40199515223503113,
0.360889226... | |
if (this.options.targetId) { $
(this.options.targetId).setProperty('html',
this.options.onRequestMessage); }
}.bind(this),
onSuccess: function(responseText) { | [
-0.32847344875335693,
-0.4993528723716736,
0.5774210095405579,
-0.3104401230812073,
0.11709430813789368,
0.24742767214775085,
0.3111875057220459,
-0.2369517982006073,
0.04837839677929878,
-0.6860132813453674,
-0.5898244976997375,
0.453708291053772,
-0.5351062417030334,
-0.04051868245005607... | |
feed = responseText;
}
});
req.send();
return feed;
}
```
I was able to find my answer | [
0.10895361006259918,
-0.377866268157959,
0.6015276908874512,
-0.20955757796764374,
-0.12183845043182373,
0.10154405981302261,
0.514909029006958,
-0.19979634881019592,
0.24106372892856598,
-0.6441962718963623,
-0.34271901845932007,
0.4068790376186371,
-0.6664056777954102,
0.1549689769744873... | |
on the [MooTools Group at Google](http://groups.google.com/group/mootools-users/browse_thread/thread/7ade43ef51c91922). | [
-0.15980826318264008,
-0.04077437147498131,
0.4979971647262573,
0.2267952710390091,
0.5147841572761536,
-0.04942859709262848,
0.20726294815540314,
0.6021292805671692,
-0.42835524678230286,
-0.44182655215263367,
-0.6152849197387695,
0.5454245805740356,
-0.07666231691837311,
0.12296768277883... | |
Suppose I have the following code:
```
class some_class{};
some_class some_function()
{
return some_class();
}
```
This seems to work pretty well and saves me the trouble of having to declare a variable just to make a return value. But I don't think I've ever seen this in any kind of tutorial or reference. Is t... | [
0.2624918520450592,
0.16479547321796417,
-0.05014212056994438,
-0.28429239988327026,
-0.07815511524677277,
-0.20386140048503876,
0.23678727447986603,
0.2723461389541626,
0.04577989876270294,
-0.4519473910331726,
0.006015687715262175,
0.5648863315582275,
-0.2916688024997711,
0.0967071428894... | |
Is it particularly bad to have a very, very large SQL query with lots of (potentially redundant) WHERE clauses?
For example, here's a query I've generated from my web application with everything turned off, which should be the largest possible query for this program to generate:
```
SELECT *
FROM 4e_magic_items
INN... | [
0.11761888861656189,
-0.006252858322113752,
0.5814999341964722,
0.00552362622693181,
-0.039522942155599594,
0.1751745045185089,
0.322369247674942,
-0.3732684552669525,
-0.39258891344070435,
-0.3855507969856262,
0.029967796057462692,
0.6862991452217102,
-0.2529478967189789,
0.08677589148283... | |
source!=14 AND source!=11 AND source!=10
AND source!=8 AND source!=1 AND source!=6
AND source!=9 AND type!='Arms' AND type!='Feet'
AND type!='Hands' AND type!='Head'
AND type!='Neck' AND type!='Orb'
AND type!='Potion' AND type!='Ring'
AND type!='Rod' AND type!='Staff'
AND type!='Symbol' AND type!=... | [
0.04810049757361412,
0.5498954057693481,
0.585564374923706,
-0.06574495136737823,
-0.18114052712917328,
0.47931841015815735,
0.4482404291629791,
-0.7813555002212524,
0.050578661262989044,
-0.2876443564891815,
-0.29119187593460083,
0.3258366286754608,
-0.03229499235749245,
-0.01530054863542... | |
itemlevel ASC, name ASC
```
It seems to work well enough, but it's also not particularly high traffic (a few hundred hits a day or so), and I wonder if it would be worth the effort to try and optimize the queries to remove redundancies and such.
Reading your query makes me want to play an RPG.
This is definitely not... | [
0.2725474536418915,
-0.25082868337631226,
0.816195011138916,
0.34818369150161743,
-0.3525807559490204,
0.012662515975534916,
0.03959141671657562,
-0.03596227988600731,
-0.28922978043556213,
-0.45939621329307556,
0.06453469395637512,
0.3375757932662964,
0.3035466969013214,
-0.01677694730460... | |
that's hard to debug.
By the way, may I suggest a reformatted version? This is mostly to demonstrate the importance of formatting; I trust this will be easier to understand.
```
select *
from
4e_magic_items mi
,4e_magic_item_levels mil
,4e_monster_sources ms
where mi.id = mil.itemid
and mi.source = ms.id
an... | [
-0.04807465150952339,
0.1726205199956894,
0.5589667558670044,
0.14758145809173584,
0.11004519462585449,
0.30506083369255066,
0.4397173225879669,
-0.26150384545326233,
-0.4785659611225128,
-0.5505459308624268,
-0.11254604160785675,
0.18824778497219086,
-0.0748245045542717,
0.171105608344078... | |
'Potion' ,'Ring' ,'Rod' ,'Staff' ,'Symbol' ,'Waist' ,
'Wand' ,'Wondrous Item' ,'Alchemical Item' ,'Elixir' ,
'Reagent' ,'Whetstone' ,'Other Consumable' ,'Companion' ,
'Mount'
)
and ((type != | [
-0.027214061468839645,
0.45279622077941895,
0.5204599499702454,
0.07287734746932983,
-0.17536607384681702,
0.5727121829986572,
0.4329666495323181,
-0.43729400634765625,
0.11943123489618301,
-0.049289483577013016,
-0.4313094913959503,
0.33191031217575073,
-0.1555679440498352,
0.580295205116... | |
'Armor') or (false))
and ((type != 'Weapon') or (false))
order by
type asc
,itemlevel asc
,name asc
/*
Some thoughts:
==============
0 - Formatting really matters, in SQL even more than most languages.
1 - consider selecting only the columns you need, not "*"
2 - use of table aliases makes it short & clear ("MI"... | [
0.3475283682346344,
0.07446322590112686,
0.3301730751991272,
0.2106165885925293,
-0.17586544156074524,
-0.1011292114853859,
0.2791273593902588,
-0.2309541553258896,
-0.1348859667778015,
-0.36833223700523376,
-0.4411796033382416,
0.34706196188926697,
-0.17938381433486938,
-0.301166325807571... | |
but I'll assume some good reason
and leave them here.
*/
``` | [
0.9179834127426147,
0.9113982319831848,
0.2391672134399414,
-0.1799064427614212,
0.40847399830818176,
-0.3553517162799835,
0.1994585543870926,
0.12417254596948624,
0.08475028723478317,
-0.7280728816986084,
-0.4145815670490265,
0.6183918714523315,
-0.16920030117034912,
0.09267330914735794,
... | |
My development server (CentOS 5) is running Subversion 1.4.2, and I wish to upgrade it to 1.5. I have read in various blogs and documents scattered around the web that this may be done by using RPMForge. I have followed the instructions found on [CentOS Wiki](http://wiki.centos.org/AdditionalResources/Repositories/RPMF... | [
0.3572961986064911,
0.00008443239494226873,
0.5454546809196472,
-0.06891763210296631,
-0.04337695613503456,
0.08508264273405075,
0.22189518809318542,
0.021966509521007538,
-0.08559516817331314,
-0.6382092237472534,
-0.2216506153345108,
0.6714044213294983,
0.1540561467409134,
0.064929567277... | |
like to find a package-managed solution for ease of future upgrades.
Any thoughts?
What you are trying to do is to replace a "core" package (one which is
contained in the CentOS repository) with a newer package from a "3rd
party" repository (RPMForge), which is what the priorities plugin is
designed to prevent.
The R... | [
0.682037353515625,
0.00471966527402401,
0.1563120186328888,
0.31638196110725403,
0.06655748188495636,
-0.29089832305908203,
0.32772940397262573,
0.2475401759147644,
-0.17186741530895233,
-0.7675077319145203,
0.0177164226770401,
0.9154078960418701,
-0.3671725392341614,
0.2953159511089325,
... | |
edge,
possibly unstable and less well supported) packages from RPMForge.
Therefore, the recommended way to use repos like RPMForge is to use them
only together with a yum plugin like "priorites", which prevents
packages from "high" priority repos to overwrite those from "low"
priority repos (the name of the "priority"... | [
0.2284575253725052,
-0.3660276532173157,
0.1773083508014679,
0.26737087965011597,
-0.06185021623969078,
-0.015335566364228725,
0.2861584722995758,
-0.17565563321113586,
-0.35722148418426514,
-0.5041815638542175,
-0.33620864152908325,
0.8322039842605591,
-0.14322569966316223,
0.136023893952... | |
`enabled = 0` in `/etc/yum.repos.d/rpmforge.repo`). You can
then selectively enable it on the command line:
```
yum --enablerepo=rpmforge install subversion
```
will install the latest subversion and dependencies from RPMForge.
The problem with this approach is that if there is an update to the
subversion package i... | [
0.1254635602235794,
-0.02940662018954754,
0.7081943154335022,
-0.19590720534324646,
0.02161559835076332,
-0.16092486679553986,
0.42471909523010254,
-0.10674358904361725,
-0.3023330867290497,
-0.6346157193183899,
-0.47516098618507385,
0.8384259939193726,
-0.35015881061553955,
0.021562179550... | |
package named "subversion" in
the core repository and happily install the latest version from
RPMForge. Plus, you will always get the latest subversion updates
when running `yum update`. | [
0.3118600845336914,
-0.42902401089668274,
0.38719120621681213,
0.1802801638841629,
-0.1615559607744217,
-0.5552851557731628,
0.4272102117538452,
0.49568891525268555,
-0.2772892415523529,
-0.4787633419036865,
-0.25576651096343994,
0.520959734916687,
0.06500323116779327,
0.04642612859606743,... | |
So if I'm using branches that are remote (tracked) branches, and I want to get the lastest, I'm still unclear if I should be doing `git pull` or `git rebase`. I thought I had read that doing `git rebase` when working on a branch with other users, it can screw them up when they pull or rebase. Is that true? Should we al... | [
0.21463724970817566,
-0.6758630275726318,
0.6271101236343384,
0.17024950683116913,
0.07005912810564041,
0.12005842477083206,
0.10341549664735794,
0.01942656747996807,
-0.2988797724246979,
-0.3786350190639496,
0.052409615367650986,
0.6826600432395935,
-0.4029972553253174,
0.0620348788797855... | |
local tracking branch)
git rebase is only a rough equivalent to git merge. It doesn't fetch anything remotely. In fact it doesn't do a proper merge either, it replays the commits of the branch you're standing on after the new commits from a second branch.
Its purpose is mainly to let you have a cleaner history. It d... | [
0.3368600904941559,
-0.5069324970245361,
0.44688957929611206,
0.10536392033100128,
-0.2787221670150757,
-0.10575482249259949,
0.3208088278770447,
0.015471471473574638,
-0.36333268880844116,
-0.45579227805137634,
0.2785968780517578,
0.45151346921920776,
-0.3488489091396332,
-0.0173494033515... | |
on mybranch I can run
```
git rebase master
```
and I'll get anything new in master inserted before my most recent commits in mybranch. This is perfect, because if I now merge or rebase the stuff from mybranch in master, my new commits are added linearly right after the most recent commits.
The problem you refer t... | [
0.44076207280158997,
0.1946052461862564,
0.44394823908805847,
-0.12142646312713623,
0.4068574905395508,
-0.155504509806633,
0.31462931632995605,
-0.018759464845061302,
-0.25968286395072937,
-0.699661910533905,
0.01707814633846283,
0.7072286009788513,
-0.31392431259155273,
0.324815571308136... | |
past. The main line of commits has changed. And due to the way git works with commit ids, all the commits (from master) that were just replayed over my new changes have new ids.
Well, it's a bit hard to explain just in words... Hope this makes a bit of sense :-)
Anyway, my own workflow is this:
* 'git pull' new chan... | [
0.3858488202095032,
0.05384859815239906,
0.2226400077342987,
-0.429948627948761,
-0.05547570064663887,
0.13081331551074982,
0.031100193038582802,
-0.08103373646736145,
-0.5472198724746704,
-0.6779484748840332,
0.25153088569641113,
0.4713204801082611,
-0.15194104611873627,
0.604924261569976... | |
problem on a public branch)
* 'git push'
One last word. I strongly recommend using rebase when the differences are trivial (e.g. people working on different files or at least different lines). It has the gotcha I tried to explain just up there, but it makes for a much cleaner history.
As soon as there may be signific... | [
-0.03701326996088028,
-0.3309229016304016,
0.2650335133075714,
0.13255493342876434,
0.018172821030020714,
-0.10108615458011627,
0.5841497778892517,
0.27905479073524475,
-0.5271450281143188,
-0.692893922328949,
-0.3565036952495575,
0.30385762453079224,
-0.37952691316604614,
0.33958187699317... | |
conflicts. The down side is that your history may become hard to follow if a lot of people do merges all the time :-)
Good luck! | [
0.1464354693889618,
-0.21396400034427643,
0.23934845626354218,
0.31389889121055603,
0.10780826210975647,
-0.12319321185350418,
0.07712230086326599,
0.3959740996360779,
-0.41704538464546204,
-0.6041440367698669,
-0.00026030855951830745,
0.35179367661476135,
0.012642321176826954,
0.218605563... | |
I've got a situation where I have a DLL I'm creating that uses another third party DLL, but I would prefer to be able to build the third party DLL into my DLL instead of having to keep them both together if possible.
This with is C# and .NET 3.5.
The way I would like to do this is by storing the third party DLL as an... | [
0.33728137612342834,
0.018625888973474503,
0.18834617733955383,
-0.0232646856456995,
-0.006738803815096617,
-0.3357873260974884,
-0.07818251103162766,
0.09998974949121475,
-0.10204726457595825,
-0.8524435758590698,
0.09911401569843292,
0.5631207823753357,
-0.30787354707717896,
0.1130367517... | |
location specified by `System.Reflection.Assembly.GetExecutingAssembly().Location.ToString()`
minus the last `/nameOfMyAssembly.dll`. I can successfully save the third party `.DLL` in this location (which ends up being
> C:\Documents and Settings\myUserName\Local Settings\Application
> Data\assembly\dl3\KXPPAX6Y.ZC... | [
0.1729738563299179,
0.17489393055438995,
0.6271324157714844,
-0.08380207419395447,
0.5142636895179749,
-0.1004675030708313,
0.30554917454719543,
-0.2198084592819214,
-0.28129899501800537,
-0.6329416036605835,
-0.36639732122421265,
0.38225871324539185,
-0.21700885891914368,
0.39771476387977... | |
the probing (policies) in effect. In the event handler for `AppDomain.AssemblyResolve`, load the resource using [`Assembly.GetManifestResourceStream`](http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getmanifestresourcestream.aspx) and feed its content as a byte array into the corresponding [`Assembly... | [
-0.12753041088581085,
-0.28478968143463135,
0.5834618806838989,
-0.2908255159854889,
-0.04909341409802437,
0.051736656576395035,
0.315557599067688,
-0.6488064527511597,
-0.4004283547401428,
-0.5743265151977539,
-0.291057825088501,
0.5196295380592346,
-0.5298585891723633,
0.5057842135429382... | |
? Assembly.Load(StreamToBytes(input))
: null;
}
};
```
where `StreamToBytes` could be defined as:
```
static byte[] StreamToBytes(Stream input)
{
var capacity = input.CanSeek ? (int) input.Length : 0;
using (var output = new MemoryStream(capacity))
{
int readLength;
var ... | [
-0.022530678659677505,
-0.26282766461372375,
0.3079005777835846,
-0.2393389493227005,
0.07388343662023544,
0.3353992700576782,
0.11023058742284775,
-0.16955137252807617,
-0.4490780234336853,
-0.3847397565841675,
-0.2713513970375061,
0.6520616412162781,
-0.36587491631507874,
0.1259680241346... | |
readLength = input.Read(buffer, 0, buffer.Length);
output.Write(buffer, 0, readLength);
}
while (readLength != 0);
return output.ToArray();
}
}
```
Finally, as a few have already mentioned, [ILMerge](http://research.microsoft.com/~mbarnett/ILMerge.aspx) may be another option t... | [
-0.1036980003118515,
-0.1333773136138916,
0.2801099419593811,
-0.2416331171989441,
0.02604016661643982,
0.004445723257958889,
0.24150322377681732,
-0.15278352797031403,
-0.3850601315498352,
-0.47233426570892334,
-0.2576000690460205,
0.6652055382728577,
-0.44621774554252625,
0.0555742159485... | |
I am using Oracle 9 and JDBC and would like to encyrpt a clob as it is inserted into the DB. Ideally I'd like to be able to just insert the plaintext and have it encrypted by a stored procedure:
```
String SQL = "INSERT INTO table (ID, VALUE) values (?, encrypt(?))";
PreparedStatement ps = connection.prepareStatement(... | [
0.08872532099485397,
0.29138851165771484,
0.4782157242298126,
-0.13723041117191315,
0.1637062281370163,
-0.11142139881849289,
0.45311418175697327,
-0.49616390466690063,
0.19290220737457275,
-0.5320268869400024,
-0.39622366428375244,
0.5408531427383423,
-0.2058677226305008,
-0.0294146351516... | |
v_string CLOB;
BEGIN
dbms_lob.createtemporary(encrypted_string, TRUE);
v_string := p_clob;
dbms_obfuscation_toolkit.DESEncrypt(
input_string => v_string,
key_string => key_string,
encrypted_string => encrypted_string );
RETURN UTL_RAW.CAST_TO_RAW(encrypted_string);
END;
```
I'm conf... | [
0.10653863847255707,
0.37659791111946106,
0.7946028113365173,
-0.3503112494945526,
-0.015646258369088173,
-0.026877984404563904,
0.3948884904384613,
-0.15949884057044983,
0.08568013459444046,
-0.400238573551178,
-0.44252246618270874,
0.7044175267219543,
-0.5345174670219421,
0.2839269340038... | |
code does not deal with clobs which is where my specific problem lies; encrypting varchars (smaller than 2000 chars) is straightforward.
I note you are on Oracle 9, but just for the record in Oracle 10g+ the dbms\_obfuscation\_toolkit was deprecated in favour of dbms\_crypto.
[dbms\_crypto](http://68.142.116.68/docs/c... | [
-0.14114753901958466,
0.46425825357437134,
0.35779961943626404,
-0.009954444132745266,
-0.024657780304551125,
-0.10468351095914841,
0.6913917660713196,
-0.0033610688988119364,
-0.08284001052379608,
-0.32636451721191406,
-0.2684836685657501,
0.635762631893158,
-0.5245195627212524,
-0.006565... | |
IN RAW,
iv IN RAW DEFAULT NULL);
DBMS_CRYPT.DECRYPT(
dst IN OUT NOCOPY CLOB CHARACTER SET ANY_CS,
src IN BLOB,
typ IN PLS_INTEGER,
key IN | [
-0.17724141478538513,
-0.0753086730837822,
0.07284539937973022,
-0.0405471995472908,
0.2904745042324066,
0.03786010667681694,
0.28123828768730164,
-0.16557885706424713,
-0.07232528924942017,
-0.45404279232025146,
-0.589188814163208,
0.18708306550979614,
-0.12563985586166382,
0.249423146247... | |
RAW,
iv IN RAW DEFAULT NULL);
``` | [
0.005634148605167866,
-0.032878145575523376,
0.222631573677063,
-0.255353182554245,
-0.18138282001018524,
0.18714766204357147,
0.29608097672462463,
0.0021715224720537663,
0.025279050692915916,
-0.43380409479141235,
-0.5444157719612122,
0.5034713745117188,
-0.20637471973896027,
0.3398494124... | |
What mysql functions are there (if any) to trim leading zeros from an alphanumeric text field?
Field with value "00345ABC" would need to return "345ABC".
You are looking for the [trim() function](http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_trim).
Alright, here is your example
```
SELECT TR... | [
-0.30818700790405273,
-0.1513877809047699,
0.15926863253116608,
-0.20815114676952362,
0.01124278362840414,
-0.011778021231293678,
-0.061295364052057266,
-0.2369309663772583,
0.02161724492907524,
-0.2786030173301697,
-0.03184858709573746,
0.6131910681724548,
-0.1621015965938568,
-0.23252308... | |
Business Objects Web Services returns error codes and I have yet to find a good resource where these are listed and what they mean. I am currently getting an "The resultset was empty. (Error: WBP 42019)". Any ideas on where these might be listed? I've called Business Objects support and the tech couldn't even tell me. ... | [
0.20978589355945587,
0.3324625790119171,
0.18593120574951172,
0.04873077571392059,
-0.1795777976512909,
-0.16973675787448883,
0.42051437497138977,
0.26253533363342285,
-0.3943197429180145,
-0.48348698019981384,
-0.19965998828411102,
0.45532113313674927,
-0.08903354406356812,
0.082240328192... | |
that will help.
2. Check the logs on the server, local machine if DeskI.
3. See if the [BOB Forum](http://forumtopics.com/busobj/index.php) has the answer in its search.
The example you have listed appears to be that no data was retrieved. Double check that the query that was generated is correct and should no... | [
0.35533443093299866,
-0.11648517102003098,
0.38541746139526367,
0.2572740912437439,
-0.0022705267183482647,
-0.4342679977416992,
0.44313985109329224,
-0.08625487983226776,
-0.6267613172531128,
-0.6035947799682617,
0.03174108639359474,
0.44480881094932556,
-0.13302890956401825,
-0.007467255... | |
What is the C# version of VB.net's InputBox?
Add a reference to `Microsoft.VisualBasic`, `InputBox` is in the `Microsoft.VisualBasic.Interaction` namespace:
```
using Microsoft.VisualBasic;
string input = Interaction.InputBox("Prompt", "Title", "Default", x_coordinate, y_coordinate);
```
Only the first argument for ... | [
-0.0988619327545166,
-0.21598336100578308,
0.37881168723106384,
-0.12920105457305908,
-0.1460176557302475,
0.11135516315698624,
-0.16124698519706726,
0.25300031900405884,
-0.08600162714719772,
-0.5563763380050659,
-0.10317855328321457,
0.6124628782272339,
-0.6115191578865051,
-0.1557556837... | |
I have the following string:
```
cn=abcd,cn=groups,dc=domain,dc=com
```
Can a regular expression be used here to extract the string after the first `cn=` and before the first `,`? In the example above the answer should be `abcd`.
```
/cn=([^,]+),/
```
most languages will extract the match as $1 or matches[1]
I... | [
-0.13642407953739166,
0.24597379565238953,
0.5718382596969604,
0.010567975230515003,
-0.05678075551986694,
0.006335914134979248,
0.05009767785668373,
-0.30745822191238403,
0.1781182885169983,
-0.5496475100517273,
-0.061212800443172455,
0.5562593936920166,
-0.24725916981697083,
0.0133597264... | |
lines ) | [
0.14273622632026672,
-0.26791250705718994,
0.3252670466899872,
-0.0765448808670044,
0.09916189312934875,
0.6932731866836548,
0.4570515751838684,
-0.06458208709955215,
-0.3320713937282562,
-0.1382504105567932,
-0.44791656732559204,
0.20894232392311096,
-0.4366765320301056,
0.326469689607620... | |
We're in an early stage of a new web project. The project will grow and become complex over time. From the beginning we will have unit and integration tests using JUnit and system tests using HtmlUnit. We might also add some static code analysis tools to the build process if they prove to be of value to us.
If you're ... | [
0.48538094758987427,
-0.03858908265829086,
-0.08692403882741928,
-0.03302802890539169,
0.4094228446483612,
-0.12433619052171707,
-0.04573191702365875,
-0.17905190587043762,
-0.16701728105545044,
-0.6374541521072388,
0.27474281191825867,
0.48138681054115295,
0.17087315022945404,
-0.08034744... | |
I learned Java in college, and then I was hired by a C# shop and have used that ever since. I spent my first week realizing that the two languages were almost identical, and the next two months figuring out the little differences. For the most part, was I noticing the things that Java had that C# doesn't, and thus was ... | [
0.1506107598543167,
0.09681538492441177,
-0.37264829874038696,
-0.23965536057949066,
-0.39174461364746094,
-0.14350534975528717,
0.2097225934267044,
0.3027735650539398,
-0.19345557689666748,
-0.611890435218811,
0.23887480795383453,
0.5665766000747681,
0.005403210874646902,
-0.3841424882411... | |
the two so I'm curious to get a community cross-section.
What are the relative merits and weaknesses of C# and Java? This includes everything from language structure to available IDEs and server software.
Comparing and contrasting the languages between the two can be quite difficult, as in many ways it is the associat... | [
0.3240898847579956,
0.055867522954940796,
-0.3947643041610718,
0.09357917308807373,
-0.3783719539642334,
-0.09945832192897797,
-0.07527675479650497,
-0.001532769645564258,
-0.28407981991767883,
-0.8765323758125305,
0.10822516679763794,
1.0077874660491943,
-0.085996612906456,
-0.15950110554... | |
C# combined with .NET is currently the better choice.
2. Automated data source binding. C# has a strong lead with LINQ, also a wealth of 3rd part libraries also gives the edge
3. SQL connections. Java
4. Auto-boxing. Both languages provide it, but C# Properties provides a better design for it in regards to setters and ... | [
-0.06863181293010712,
0.07122768461704254,
0.2948339581489563,
0.17001351714134216,
-0.5301784873008728,
-0.2604258060455322,
0.1489686816930771,
-0.2256476879119873,
-0.33287325501441956,
-0.6843957901000977,
0.10675095021724701,
0.6762936115264893,
-0.22096627950668335,
-0.29795315861701... | |
when working with GUI's.
8. Generics - I believe the two languages are basically tied here... I've seen good points showing either side being better. My gut feeling is that Java is better, but nothing logic to base it on. Also I've used C# generics ALLOT and Java generics only a few times...
9. Enumerations. Java all t... | [
0.2492857426404953,
0.00794380996376276,
0.09465646743774414,
0.20029686391353607,
-0.5228841304779053,
-0.13671106100082397,
0.13270756602287292,
-0.11877389997243881,
-0.37273719906806946,
-0.580388069152832,
0.11464348435401917,
0.7891080379486084,
-0.26053377985954285,
-0.1137195751070... | |
to help with XML... I've tried a few and was never really happy with any of them. I've stuck with native C# XML combined with some custom libraries I made on my own and I'm used to it, so hard to give this a far comparison at this point...
11. IDE - Eclipse is better than Visual Studio for non-GUI work. So Java wins fo... | [
0.17905379831790924,
0.05569964647293091,
0.12934981286525726,
0.12527823448181152,
-0.528795599937439,
-0.05255206301808357,
-0.07658355683088303,
-0.1030937060713768,
-0.33668839931488037,
-0.742993175983429,
0.10855952650308609,
0.9289347529411316,
-0.008871005848050117,
-0.239725336432... | |
is a cross section of the more commonly used features... | [
0.4904358685016632,
0.1322622299194336,
0.11028844118118286,
-0.0009074205299839377,
0.14655296504497528,
0.13974857330322266,
0.34699857234954834,
-0.0311321672052145,
-0.1296735405921936,
-0.8447523713111877,
-0.5479736924171448,
0.15636560320854187,
0.21388928592205048,
-0.0402085706591... | |
Ok, here's the breakdown of my project: I have a web project with a "Scripts" subfolder. That folder contains a few javascript files and a copy of JSMin.exe along with a batch file that runs the JSMin.exe on a few of the files. I tried to set up a post build step of 'call "$(ProjectDir)Scripts\jsmin.bat"'. When I perfo... | [
0.4575504958629608,
0.12914246320724487,
-0.06825783848762512,
-0.2514438331127167,
-0.15941913425922394,
-0.11425153911113739,
0.28345176577568054,
0.07449546456336975,
-0.09887439012527466,
-0.7827135920524597,
0.06353745609521866,
0.5717772841453552,
0.052606187760829926,
-0.00829515699... | |
I'm not sure what the issue here is. The $(ProjectDir)Scripts\jsmin.bat call is in quotes because $(ProjectDir) could have spaces (and in fact does on my machine). I'm not sure what to do at this point. I've tried removing the contents of the batch file as the post build step but that doesn't seem to work either.
Idea... | [
0.6145638823509216,
0.22786851227283478,
0.023578613996505737,
-0.06745573878288269,
0.007569354493170977,
-0.003424515249207616,
0.26409152150154114,
0.1251944750547409,
-0.21547849476337433,
-0.7795616388320923,
0.1351626068353653,
0.6171165108680725,
-0.07587993144989014,
0.358195453882... | |
add:
```
exit 0
```
as the last line of your build step. This will stop the build from failing. | [
0.2604944407939911,
0.3578037619590759,
0.48351654410362244,
-0.09251070022583008,
0.4352959990501404,
0.0940169170498848,
0.4605827331542969,
-0.07049939036369324,
0.3825704753398895,
-0.7866148948669434,
-0.27572116255760193,
0.5672651529312134,
0.027830474078655243,
-0.1107192263007164,... | |
I'm using GCC to generate a dependency file, but my build rules put the output into a subdirectory. Is there a way to tell GCC to put my subdirectory prefix in the dependency file it generates for me?
```
gcc $(INCLUDES) -E -MM $(CFLAGS) $(SRC) >>$(DEP)
```
The answer is in the [GCC manual](http://gcc.gnu.org/onlined... | [
0.18486334383487701,
0.25558745861053467,
0.7792282700538635,
-0.044646766036748886,
0.15255087614059448,
-0.07666271179914474,
-0.1370774507522583,
-0.3766358196735382,
-0.22667598724365234,
-0.2800673842430115,
-0.49407079815864563,
0.539801836013794,
-0.4439866840839386,
0.0575022250413... | |
the target.
>
>
> An `-MT` option will set the target to be exactly the string you specify. If you want multiple targets, you can specify them as a single argument to `-MT`, or use multiple `-MT` options.
>
>
> For example, `-MT '$(objpfx)foo.o'` might give
>
>
>
> ```
> $(objpfx)foo.o: foo.c
>
> ``` | [
0.22153915464878082,
-0.09402753412723541,
0.47950270771980286,
-0.013507815077900887,
-0.01950448751449585,
0.41111209988594055,
-0.047817688435316086,
-0.07556608319282532,
-0.021608810871839523,
-0.4943837821483612,
-0.19842684268951416,
0.5684047341346741,
-0.5666981339454651,
-0.17417... | |
I have a macro which refreshes all fields in a document (the equivalent of doing an `F9` on the fields). I'd like to fire this macro automatically when the user saves the document.
Under options I can select "update fields when document is printed", but that's not what I want. In the VBA editor I only seem to find eve... | [
0.06796914339065552,
0.1968286633491516,
0.5301820635795593,
-0.41982030868530273,
0.14390000700950623,
-0.16813348233699799,
0.26608991622924805,
-0.018951235339045525,
-0.4109790325164795,
-0.7146767377853394,
0.02830592356622219,
0.9257825613021851,
-0.4759502112865448,
-0.0159441921859... | |
the standard
Save button on the toolbar with a
button to run my custom macro.
Replacing the button on the toolbar
applies to all documents and I only
want it to affect this one document.
To understand why I need this, the document contains a "SaveDate" field and I'd like this field to update on the screen when th... | [
0.4738372564315796,
-0.06481444090604782,
0.31529951095581055,
-0.02757715806365013,
0.13221319019794464,
-0.34016984701156616,
0.3976653814315796,
-0.12322018295526505,
-0.09580890834331512,
-0.7966424822807312,
-0.18952211737632751,
0.888145923614502,
-0.1965111643075943,
-0.296870261430... | |
control. This is performed by the build agent before the build agent calls MSBuild.exe telling it to run TFSBuild.proj.
If you move your targets file from under SolutionRoot and place it in your configuration folder alongside the TFSBuild.proj file you will then be able to import it in your TFSBuild.proj file using a ... | [
0.013313505798578262,
-0.2590528130531311,
0.556338906288147,
0.024243168532848358,
0.13178925216197968,
0.0710906833410263,
0.3354772925376892,
-0.19932159781455994,
-0.23753686249256134,
-0.7766724824905396,
-0.270339697599411,
0.4477795362472534,
-0.49420222640037537,
0.2113010436296463... | |
being under $/TeamProject/TeamBuildTypes however, it does not have to be there. It can actually live in a folder that is inside your solution - and can even be a project in your solution dedicated to Team Build. This has several advantages including making branching of the build easier. Therefore I typically have my bu... | [
0.40028655529022217,
-0.03605867177248001,
0.23892326653003693,
-0.09060139209032059,
0.03957824409008026,
-0.37512075901031494,
0.4116292893886566,
-0.1441112607717514,
-0.05303845554590225,
-0.6581430435180664,
-0.1570083349943161,
0.5885857343673706,
0.07018446922302246,
-0.219256550073... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.