text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
user that they might have a slower experience than usual.
Just turn it off when you don't need it.
> UPDATE Am developing a web-app which
> will be primarily used by developers.
**EDIT**: Based on what you edited, I remembered that article concerning firebug : <http://blog.getfirebug.com/?p=124>
> In the new model... | [
0.36320629715919495,
0.07070683687925339,
0.6327324509620667,
-0.19198410212993622,
-0.1448543816804886,
-0.28275197744369507,
0.26823338866233826,
0.23611417412757874,
-0.17981481552124023,
-0.7089946866035461,
-0.2354867160320282,
0.7385464310646057,
-0.441036581993103,
-0.22630999982357... | |
is opened and display an error message.
This chunk of code could also help :
```
if (window.console && window.console.firebug) {
/* firebug found! */
}
```
There is also a way to disable some functionnalities :
```
if (! ('console' in window) || !('firebug' in console)) {
var names = ['log', 'debug', 'info... | [
-0.10699152946472168,
-0.1141955554485321,
0.4776175916194916,
-0.11658155918121338,
0.4330650866031647,
-0.19906863570213318,
0.5133829712867737,
-0.2201194018125534,
0.3711107075214386,
-0.6974654793739319,
-0.31092017889022827,
0.6434327363967896,
-0.23467420041561127,
0.070568054914474... | |
What is the best way to find the most recurring values in a set? I'd like to use a one-pass algorithm, assuming that values are from the 1,2,3,4,..,m domain?
If I had to write an algorithm to do that, how would I do that?
Store them in a hash table, with a count of how many times each one was stored (O(n)).
Then loo... | [
0.044617779552936554,
-0.23444953560829163,
0.15002676844596863,
0.07989992946386337,
0.0752030611038208,
0.34084391593933105,
0.29892462491989136,
-0.1931696981191635,
-0.4416640102863312,
-0.35632944107055664,
0.21807754039764404,
0.29234468936920166,
-0.5270703434944153,
0.3521943390369... | |
Further to [this question](https://stackoverflow.com/questions/784474/feedback-on-my-first-objective-c-code-a-quicklook-plugin) I've fixed a bunch of memory leaks in [BEncoding.m](http://github.com/dbr/qltorrent/blob/00748acfcc8b3a999248d608e2d9fa3b64ba8a5a/BEncoding.m#L1) (originally from [here](http://www.stupendous.... | [
-0.18781913816928864,
0.11709865182638168,
0.695656418800354,
-0.09168287366628647,
-0.05664839223027229,
0.08963437378406525,
0.4668399691581726,
-0.40671873092651367,
-0.5207529664039612,
-0.2920345664024353,
-0.061218954622745514,
0.6519743204116821,
-0.3417794704437256,
0.0877686142921... | |
transferred to caller)
OK, so to expand the answer above (thanks for setting me on the right track) ...
```
return [data autorelease]
```
You have allocated some object, "data", and are about to return this object back to the caller. The way this works in Obj-C is that at some level up the call stack, there is an NS... | [
0.11333653330802917,
-0.18306280672550201,
0.8566155433654785,
0.1183202937245369,
0.25997602939605713,
-0.11443702131509781,
0.1937575489282608,
-0.25475409626960754,
-0.32256320118904114,
-0.3779045045375824,
-0.23368893563747406,
0.6757477521896362,
-0.28690922260284424,
0.0593810528516... | |
pool "pops", data will be deallocated (unless someone calls "retain"). That's rather clever.
Sweet. I think I just earned my green belt in Obj-C memory management. | [
0.15875686705112457,
-0.21414366364479065,
0.22705279290676117,
0.437863290309906,
0.3567560315132141,
-0.2897109091281891,
-0.2803747355937958,
0.2995366156101227,
-0.5688292384147644,
-0.23302538692951202,
0.19221599400043488,
0.28750836849212646,
0.39233678579330444,
0.01426530070602893... | |
When trying to update the web reference to a deployed asp.net webservice from a windows forms app, I get an error.
```
Unable to download following files from .
https://webserver/webservices/myservice.asmx?wsdl
```
For some reason it is looking at a host called webserver, but that isn't what it needs to look for fo... | [
0.14281025528907776,
0.24274690449237823,
0.2039460986852646,
0.08116219192743301,
-0.17315001785755157,
-0.20959965884685516,
0.4286690652370453,
0.017946777865290642,
-0.4013606905937195,
-0.8506332039833069,
-0.13190051913261414,
0.3786681294441223,
-0.30406686663627625,
0.3814268708229... | |
What are the strategies and tools to be used, if an Application that is being developed needs to have Web Client and Smart client. Does Smart Client Software Factory or related applications blocks ease such developmental path? The environment is .Net 3.5
Please suggest the direction based on these priorities
1. Reuse... | [
0.1263609379529953,
0.36785346269607544,
0.025899475440382957,
0.07807043194770813,
-0.09339011460542679,
-0.010520351119339466,
0.4565650224685669,
-0.449916809797287,
-0.19581176340579987,
-0.411980003118515,
-0.23952125012874603,
0.2730756998062134,
-0.4339474141597748,
-0.1697108447551... | |
& Eclipse](http://www.slashdev.ca/2007/05/30/blackberry-development-with-ant-eclipse/)
**UPDATE:**[Tutorial: How To Use 3rd Party Libraries in your Applications](http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=22441)
* for debug you have to add [kXML sources](http://sourceforge.net... | [
0.10455076396465302,
0.25451329350471497,
0.47081997990608215,
-0.11704054474830627,
-0.14671668410301208,
0.17577719688415527,
0.27966806292533875,
-0.15105223655700684,
-0.7573415637016296,
0.09196591377258301,
-0.08264917135238647,
0.2626377046108246,
-0.5591878294944763,
-0.33396577835... | |
Since Rails is already an effective Rich Internet Application framework because of the way it makes Ajax so easy, what is the argument for combining Rails with Flex and using Flex as the front end instead of HTML? A programmer friend of mine said he uses this combination because Flex is great for RIAs. My argument is t... | [
0.2405243217945099,
-0.0205959752202034,
-0.09125592559576035,
0.24905163049697876,
-0.4216659963130951,
-0.33281221985816956,
-0.006645346526056528,
0.13193334639072418,
-0.2977571487426758,
-0.8792078495025635,
0.2032172828912735,
0.4344770610332489,
-0.35910648107528687,
-0.105607457458... | |
high price to pay for whatever benefits this combination of technologies offers.
It all depends on your definition of what a RIA (Rich Internet Application) really is. To some, an AJAX enable web application might fit the bill. To others, a RIA includes highly stylized elements, a high level of interactivity, and a goo... | [
0.2600993812084198,
-0.15837709605693817,
0.25379642844200134,
0.6523728370666504,
0.11962419748306274,
-0.06495404988527298,
-0.11457151919603348,
0.04320536181330681,
-0.044903967529535294,
-0.5194536447525024,
-0.22041136026382446,
0.7661681175231934,
0.031959764659404755,
-0.1376440972... | |
the data backend for a RIA that uses Flex/Flash for it's presentation.
Personally, I believe that RoR combined with Flex is going to give you a much richer, dynamic, and engaging RIA than a standard AJAX enabled web application. | [
0.05038264021277428,
-0.2196989357471466,
0.42539772391319275,
0.337590754032135,
-0.43097957968711853,
-0.4651942253112793,
-0.0947020947933197,
0.016831178218126297,
-0.2713111937046051,
-0.7045741677284241,
-0.28766241669654846,
0.8507358431816101,
0.11381517350673676,
-0.18490108847618... | |
I'm looking for a way to properly comment my stored procedure code so that I can extract the information into useful documentation ala something like XDOC (or C# equivalent). Something that's preferably lightweight would be ideal.
It all depends on your definition of what a RIA (Rich Internet Application) really is. To... | [
0.4790749251842499,
-0.034151267260313034,
0.17393186688423157,
0.43032902479171753,
0.04388618841767311,
-0.27204811573028564,
-0.09960798174142838,
0.12150149792432785,
-0.15432511270046234,
-0.5880517959594727,
-0.0940774455666542,
0.49229153990745544,
-0.04931767284870148,
-0.123669981... | |
app is going to be enough for your RIA. For those who belong to the second group, RoR is yet another way to provide the data backend for a RIA that uses Flex/Flash for it's presentation.
Personally, I believe that RoR combined with Flex is going to give you a much richer, dynamic, and engaging RIA than a standard AJAX... | [
0.14078167080879211,
-0.2541857957839966,
0.5853182673454285,
0.3585347533226013,
-0.264464795589447,
-0.13908381760120392,
-0.09301238507032394,
0.04362339898943901,
-0.48746567964553833,
-0.8319434523582458,
-0.13247521221637726,
1.002278447151184,
0.056967854499816895,
-0.35967344045639... | |
I am basically a newbie whose starting work on a new webapp. The webapp is mostly your basic CRUD operations. For this, I have decided to use JPA with Hibernate as the Persistence provider and will be developing on Apache Derby for development and testing purposes. I am using GlassFish v2 as the App Server to deploy my... | [
0.631827712059021,
0.38891178369522095,
0.3033965528011322,
-0.1941167414188385,
-0.413666307926178,
-0.2233685702085495,
0.3588005602359772,
0.245849609375,
-0.19853372871875763,
-0.7333685755729675,
0.0924941822886467,
0.5228575468063354,
-0.059777528047561646,
-0.03405085951089859,
0.... | |
to generate my entity classes and ejb session beans. What I do is, I create a new table in Apache Derby, say XXX. Then I use the "Entity Classes from Database" to generate the XXX Entity class which contains all the necessary annotations and getter and setter methods.
Next, I run the "JPA Controller Classes from Entit... | [
0.21316181123256683,
-0.0034288938622921705,
0.48754823207855225,
0.05697926506400108,
-0.11428119987249374,
-0.01056028064340353,
0.5488458871841431,
-0.47522640228271484,
0.10460329800844193,
-0.6321934461593628,
-0.03527430072426796,
0.6289013624191284,
-0.30752718448638916,
0.304675102... | |
RollbackFailureException, Exception{}
4. void destroy(Long id) throws NonexistentEntityException, RollbackFailureException, Exception {}
5. List<XXX> findXXXEntities(){}
6. List<XXX> findXXXEntities(int maxResults, int firstResult) {}
7. List<XXX> findXXXEntities(boolean all, int maxResults, int firstResult){}
8. XXX ... | [
-0.09511134773492813,
-0.043580058962106705,
0.7016546130180359,
-0.2230725735425949,
0.12265485525131226,
0.021816764026880264,
0.14806140959262848,
-0.3804636001586914,
0.06728649139404297,
-0.5361607670783997,
-0.18824385106563568,
0.8328030109405518,
-0.34738263487815857,
0.28456678986... | |
these methods with better support for try and catch and transactions, I decided to call that in XXXFacade.java instead as shown below:
```
XXXJpaController XXXController = new XXXJpaController();
1. public void create(XXX xxx) throws PreexistingEntityException, RollbackFailureException, Exception {
XXXControll... | [
0.1234419196844101,
-0.10719436407089233,
0.41375336050987244,
-0.21849888563156128,
-0.01227085292339325,
0.13595625758171082,
0.22685323655605316,
-0.5011082291603088,
0.040488243103027344,
-0.5667305588722229,
-0.3405330181121826,
0.6303797960281372,
-0.3742969334125519,
0.2812389433383... | |
return XXXController.findXXXEntities(); }
```
So here is my first question. Is this a right way of doing things in the world of JEE or is there a better way of doing it? Am I introducing some sort of redundancy here? This is the pattern that I have been pretty much following for all the Entity classes: Create entity ... | [
0.26968011260032654,
-0.4512687921524048,
0.09231448918581009,
-0.04150507226586342,
-0.11373645812273026,
-0.21436356008052826,
0.0407363623380661,
0.11128156632184982,
-0.04233270511031151,
-0.6835052967071533,
-0.00971895270049572,
0.6184976100921631,
-0.38315001130104065,
0.11800091713... | |
So in order to get rid of this redundancy, I decided to go with a helper class along the lines of the HibernateUtil.java that is commonly seen in Hibernate tutorials (which acts as a singleton for the sessionfactory). So I have created a PersistenceUtil.java which has getEntityManager() and getUserTransaction() methods... | [
0.1157565787434578,
-0.14541466534137726,
0.25535327196121216,
0.07340390235185623,
-0.0031036182772368193,
-0.03549511358141899,
0.2085558921098709,
-0.026711994782090187,
-0.05512915924191475,
-0.6439100503921509,
0.21082882583141327,
0.6746483445167542,
-0.3566291928291321,
0.2537804841... | |
class (if I have to, though in my case I dont) and in the XXXJpaController helper class (through the jndi lookup). After reading up online, thats what I found out. Helper classes need to use the JNDI lookup on the bean's component environment (java:comp/env) as the injection gets done only for container managed beans a... | [
0.010472079738974571,
-0.29216110706329346,
0.2538328170776367,
0.03906622529029846,
-0.046561434864997864,
-0.18914830684661865,
0.046516839414834976,
0.20738224685192108,
-0.10451950877904892,
-0.6721321940422058,
0.026856668293476105,
0.6930499076843262,
-0.38734710216522217,
0.11093756... | |
a helper's helper class. What can I do to get around this and access the container managed entitymanager and usertransaction in PersistenceUtil helper class? One option that comes to my mind is to instantiate the Persistence class in each XXXFacade class also (I dont like the sound of that).
Only other option that I c... | [
-0.10915922373533249,
-0.19339652359485626,
0.5710878372192383,
0.2950725853443146,
0.00020475788915064186,
-0.20910516381263733,
0.2040548324584961,
0.18207627534866333,
-0.15559911727905273,
-0.6789370179176331,
0.22637104988098145,
0.6715447306632996,
-0.3914600610733032,
0.272074848413... | |
beginning, I am a newbie. I am looking to hear from all you seasoned and highly experienced java/jee veterans for guidance on this issue. Is there any particular pattern that I can employ here?
I am sorry if any of this doesn't make sense to you. Please feel free to go ahead and ask me for any clarifications and I wil... | [
0.5492069125175476,
0.24285078048706055,
-0.07821152359247208,
0.14614903926849365,
0.011969233863055706,
-0.4744740426540375,
0.058030564337968826,
0.18622885644435883,
-0.18872463703155518,
-0.7012900114059448,
0.10327504575252533,
0.23796066641807556,
0.33305245637893677,
0.050751753151... | |
I have tried to post better questions.
Anyways, I have found the answers to my questions. I decided not to use the controller classes and to just go with the session facade beans for entities. And I used container managed persistence. So no more need for the getEntityManager() methods or helper classes. Instead use DI... | [
0.2792413532733917,
0.02924787998199463,
0.41061586141586304,
0.21996968984603882,
-0.1898965686559677,
-0.2095482051372528,
0.40355172753334045,
0.34252217411994934,
-0.2188083678483963,
-0.7563350796699524,
0.13008145987987518,
0.787224292755127,
-0.21924765408039093,
0.26292502880096436... | |
I have this regular expression that extracts meta tags from HTML documents but it gives me errors while I incorporate it in my web application.
the expression is
```
@"<meta[\\s]+[^>]*?name[\\s]?=[\\s\"\']+(.*?)[\\s\"\']+content[\\s]?=[\\s\"\']+(.*?)[\"\']+.*?>" ;
```
is there anything wrong with it?
You're using... | [
0.5367978811264038,
0.06526732444763184,
0.4030130207538605,
-0.029103105887770653,
-0.24457284808158875,
0.030542850494384766,
0.43229615688323975,
-0.1607021689414978,
-0.053446996957063675,
-0.49589481949806213,
0.1797126680612564,
0.5254550576210022,
-0.6242402195930481,
-0.09164664894... | |
[RegExBuddy](http://www.regexbuddy.com/).) | [
0.30865827202796936,
-0.008781666867434978,
0.5888403058052063,
0.03701960667967796,
0.14874792098999023,
0.18683651089668274,
0.3341531455516815,
0.411613792181015,
-0.5550177097320557,
-0.21178768575191498,
-0.42499929666519165,
0.2780095934867859,
-0.25992077589035034,
0.401851624250412... | |
I have an ASP.NET webservice (.asmx) with a simple method that reads something from the DB with a sync call (ExecuteReader) and returns the result. There is any way to optimize the Thread Pool usage (ie. by calling an async call (BeginExecuteReader)) without changing the method's signature?
The intention is to not blo... | [
0.49515172839164734,
-0.04502459615468979,
0.2593754529953003,
0.06995590776205063,
-0.2369096577167511,
-0.19512125849723816,
0.12932035326957703,
-0.21185259521007538,
-0.21545933187007904,
-0.7885718941688538,
0.07589144259691238,
0.12194033712148666,
-0.23390145599842072,
0.13914574682... | |
will only create a single operation in the WSDL. This is obvious if you think about it - what would a Java client do with an `IAsyncResult`?
The client can call the operation synchronously or asynchronously. | [
0.24477529525756836,
0.06658140569925308,
-0.09982810914516449,
0.017405854538083076,
-0.11753671616315842,
-0.27603158354759216,
0.3323015570640564,
0.06582903861999512,
-0.0011372213484719396,
-0.38438230752944946,
-0.05655564367771149,
0.4632241427898407,
-0.7619156241416931,
0.10969100... | |
Im following the approch outlined [here](http://blog.codeville.net/2009/01/10/xval-a-validation-framework-for-aspnet-mvc/) to do this.
Im having a problem with validating a dropdown selection with xval, the MVC binding seems to infer the wrong thing an allowing the operation to pass validation, but the modelstate stor... | [
0.22229160368442535,
0.23546065390110016,
0.4123605489730835,
-0.35875776410102844,
-0.4092472493648529,
-0.24352581799030304,
0.1270504742860794,
-0.3623369634151459,
-0.26575931906700134,
-0.37987977266311646,
-0.02924857661128044,
0.5802339315414429,
-0.3683541715145111,
-0.063412882387... | |
<select name="Favourites.Cheese">
<option>Please Select</option>
<option value="1">Yes</option>
<option value="0">No</option>
</select>
<%=Html.ValidationMessage("Favourites.Cheese")%>
```
This is the Controller action the from posts too, MVC maps the value false to fav.cheese,
``... | [
0.18186970055103302,
-0.475953608751297,
0.8133353590965271,
-0.41925302147865295,
-0.23904898762702942,
-0.07279191166162491,
0.08256387710571289,
-0.33496570587158203,
-0.35532447695732117,
-0.22127145528793335,
-0.07959466427564621,
0.5464683175086975,
-0.22996044158935547,
0.2909562885... | |
_favTask.Create(fav);
}
catch (RulesException ex)
{
ex.AddModelStateErrors(ModelState, "Favourites");
}
if(!ModelState.IsValid)
{ | [
-0.08538028597831726,
-0.7447628974914551,
0.7021951675415039,
-0.04026656597852707,
0.35833629965782166,
-0.08621582388877869,
0.2740049362182617,
-0.5947614908218384,
-0.20553231239318848,
-0.4154984652996063,
-0.2270796298980713,
0.5851119756698608,
-0.3609568774700165,
0.10843339562416... | |
//redirect back
}
//other stuff
}
```
The property has been attributed
```
pulic class Favourites
{
[Required]
public bool Cheese{get;set;}
}
```
No exceptions are throw because fav.cheese has a value
```
public int Create(Favourites fav)
{
var errors = Dat... | [
0.2472330927848816,
-0.13363918662071228,
0.40157458186149597,
-0.37574514746665955,
-0.04495997726917267,
-0.06942246109247208,
0.3327229917049408,
-0.272825688123703,
-0.2749564051628113,
-0.5065800547599792,
-0.22931040823459625,
0.5983781814575195,
-0.11219482123851776,
0.1789182871580... | |
new RulesException(errors);
//create fav
}
```
But when focus returns to the controller ModelState.Isvalid comes out as false, so the from is reloaded with the message **The value 'Please Select' is invalid.** How do I stop this, from happening and how do I xVal driven validation method of "Please select ... | [
0.2316158413887024,
-0.09121810644865036,
0.5689488649368286,
0.05442369356751442,
0.09776964783668518,
-0.34575068950653076,
0.3308335244655609,
-0.29838067293167114,
-0.3038245141506195,
-0.8159890174865723,
-0.20952093601226807,
0.5537383556365967,
-0.480410099029541,
0.4661493897438049... | |
There seems to be quite a lot of [confusion](http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/791832a0e177e87e/6ece1fcd60b4824f?hl=en&ie=UTF-8&q=maven+plugin+gwt+1.6) regarding integrating **Maven** with **GWT 1.6,** as Google has changed the layout to "exploded war" format. Which plugin are *you*... | [
0.15073935687541962,
-0.004853174090385437,
0.09578204154968262,
0.07016810774803162,
-0.2991234064102173,
-0.15604229271411896,
0.11232012510299683,
-0.1284145712852478,
-0.30486321449279785,
-0.5874078273773193,
-0.27035632729530334,
0.7230443954467773,
-0.30357497930526733,
-0.186439961... | |
Notice in the code below that `foobar()` is called if any Exception is thrown. Is there a way to do this without using the same line in every Exception?
```
try:
foo()
except(ErrorTypeA):
bar()
foobar()
except(ErrorTypeB):
baz()
foobar()
except(SwineFlu):
print 'You have caught Swine Flu!'
foobar()
excep... | [
0.43753764033317566,
0.3285840153694153,
0.26394394040107727,
-0.48693138360977173,
0.35195180773735046,
0.005484678782522678,
0.6177031397819519,
-0.13461390137672424,
-0.6314060688018799,
-0.36099857091903687,
-0.22707337141036987,
0.46452778577804565,
-0.4347686469554901,
0.075565129518... | |
I know about `passwd(1)` and `crypt(3)`. What I'm looking for is a C API to call which will set the user's password in the passwd/shadow files, without having to programatically walk the files and overwrite the entry for the user in question. Application runs as root.
Does such an API exist?
EDIT: Guess I should spec... | [
0.6375395655632019,
-0.10607524961233139,
0.12336637824773788,
0.08251313120126724,
0.17120958864688873,
-0.03138251602649689,
0.39237210154533386,
-0.18200919032096863,
0.0033694885205477476,
-0.47967424988746643,
0.024109983816742897,
0.5553602576255798,
-0.39333704113960266,
0.060578465... | |
8jean commented above, looks like /usr/sbin/chpasswd might be the easiest way. Otherwise I'd have gone with noha's comment of using functions like fgetpwent() -- or fgetspent() for dealing with the shadow file -- to walk the list of users and modify the record(s) I need to change. Thanks, everyone! | [
0.37850433588027954,
0.14552387595176697,
0.5565648078918457,
0.23626118898391724,
0.024649642407894135,
-0.0826210007071495,
0.28854137659072876,
0.26821669936180115,
-0.48694032430648804,
-0.380916565656662,
0.03826887905597687,
0.620681881904602,
-0.0971381813287735,
-0.0104942088946700... | |
I am aware of this other [post](https://stackoverflow.com/questions/753841/how-to-catch-exceptions-from-a-threadpool-queueuserworkitem), but it doesn't seem to apply to my situation.
First off, here is my environment:
Windows XP 64-bit SP3; Visual Studio 2008 w/ SP; .NET 3.5 SP1; WPF application.
My problem is tha... | [
0.16351306438446045,
0.2197704315185547,
0.5115057826042175,
-0.28125497698783875,
-0.1420893520116806,
-0.25229543447494507,
0.48230835795402527,
-0.1248198002576828,
-0.5004457235336304,
-0.3446787893772125,
-0.10055241733789444,
0.3668520450592041,
-0.4331608712673187,
0.062322184443473... | |
ThreadPool.QueueUserWorkItem(SetTcpChannel, 1);
```
Then in that `SetTcpChannel` method:
```
try
{
int channel = (int)state;
EnsureTcpSocket();
// more logic to do stuff with channel
// that we don't care about for SO
...
}
catch (Exception e)
{
//... | [
0.10376250743865967,
-0.37339603900909424,
0.581872284412384,
-0.070859394967556,
0.3815978169441223,
-0.0405040979385376,
0.28813013434410095,
-0.03701883554458618,
-0.45985472202301025,
-0.4787302315235138,
0.046219199895858765,
0.49806034564971924,
-0.49305495619773865,
0.23595818877220... | |
// this is where I expected the code to return
...
}
```
And finally, in the place where the exception actually happens (inside `EnsureTcpSocket`):
```
if (_tcp == null)
{
// this is not a valid ip/port since the
// target machine is not running (test condition)
// but th... | [
0.17743036150932312,
0.18466311693191528,
0.44299042224884033,
0.0797511413693428,
0.4644066095352173,
-0.40926989912986755,
0.4721513092517853,
0.06506238877773285,
-0.15763887763023376,
-0.4197140038013458,
-0.04727889597415924,
0.5598495006561279,
-0.21113933622837067,
0.168740287423133... | |
// and continue debugging...right?
_tcp = new TcpClient(ip, port);
}
```
Here is what I have been doing:
1. I set a breakpoint at the
`EnsureTcpSocket` line inside
`SetTcpChannel`,
2. F11 (step-into) `EnsureTcpSocket`
so I can see the `_tcp` piece of
code
3. Try to F10 (step-over) the
`TcpClient` constr... | [
0.2512068748474121,
0.18363827466964722,
0.5753275156021118,
-0.1788700968027115,
0.3133496642112732,
-0.3609270751476288,
0.29465752840042114,
-0.11170128732919693,
-0.2574968934059143,
-0.46673622727394104,
0.04657161608338356,
0.8138411045074463,
-0.39570191502571106,
0.1179572790861129... | |
throwing the exception. (If the connection is refused, that's a different matter.) | [
0.44823741912841797,
-0.19971802830696106,
0.2638837695121765,
0.02685902826488018,
-0.2505697011947632,
-0.23564350605010986,
0.03914303705096245,
-0.16515466570854187,
-0.24629925191402435,
0.016947999596595764,
-0.1199638694524765,
0.355592280626297,
-0.39425691962242126,
0.164361536502... | |
When we install Web Deployment Projects tool, we also have an option to use it inside VS 2008. By selecting Property Pages we are presented with several options for configuring compilation options.One of Property Pages dialog boxed is named Output Assemblies. It presents us with the following options:
**\* Merge all o... | [
0.4778846800327301,
-0.11538899689912796,
0.2131226509809494,
0.06974084675312042,
-0.2943733334541321,
-0.10278021544218063,
0.2371816635131836,
-0.37791115045547485,
-0.2929851710796356,
-0.8974241018295288,
-0.021934734657406807,
0.34962916374206543,
-0.1784551441669464,
0.0021100395824... | |
contain aspx files, if they are already pre-compiled?!
**\* Create a separate assembly for each page and control output**
I thought this option also compiled aspx pages, but then why would would output also contain aspx files, if they were already pre-compiled?!
thanx
**Updated** Fixed type. Thanks `j_radom_hacker`... | [
0.13901320099830627,
-0.05620601773262024,
0.43464985489845276,
0.18632212281227112,
-0.06752309948205948,
-0.14949671924114227,
0.10105766355991364,
-0.32107463479042053,
-0.355428546667099,
-0.6168720722198486,
-0.3183528184890747,
0.38750508427619934,
-0.5029938817024231,
-0.22873324155... | |
I have two combo boxes on a SL page. When Combo 1 updates, a service is called and populates Combo 2.
On the first call, 3 results are returned. When the combo box is expanded, you can see all 3 options.
On the second call, 4 results are returned. When the combo box is expanded, you can see 3 options, with a vertica... | [
0.41123121976852417,
-0.5017439723014832,
0.7457364201545715,
-0.12922291457653046,
-0.346964567899704,
0.358808696269989,
0.31747132539749146,
-0.4140207767486572,
-0.15116235613822937,
-0.8404287695884705,
0.07310660183429718,
0.483748197555542,
-0.26816174387931824,
-0.01319791935384273... | |
selected.)
It appears that the drop down list size keeps the first generated height.
How can I refresh the combo box max items shown after each service call?
Thanks!
**Edit #1**
The code follows the M-V-VM pattern. When the page loads, the `Group1` populates the first combo box, and nothing is selected. When the u... | [
-0.0025888909585773945,
-0.5270026922225952,
0.574353039264679,
-0.027761276811361313,
0.0044037699699401855,
0.1989578902721405,
-0.06180863827466965,
-0.6490764021873474,
-0.22509028017520905,
-0.9542915225028992,
-0.20374846458435059,
0.29595711827278137,
-0.36690375208854675,
-0.059781... | |
group1Selection = value;
PopulateGroup2();
OnPropertyChanged("Group1Selection");
}
}
```
Where PopulateGroup2 performs my service call async, gets the data, and puts that data into the exposed property of `Group2`.
Under "normal" conditions, this isn't a problem, since most options have dozens of... | [
-0.08256272226572037,
-0.2635623514652252,
0.37674403190612793,
-0.12462335079908371,
0.35176345705986023,
0.22265209257602692,
-0.02629445679485798,
-0.4567667245864868,
-0.20638658106327057,
-0.6157304644584656,
-0.341941773891449,
0.4150293171405792,
-0.28715598583221436,
-0.14086304605... | |
maxing out at 8 shown items.
Following the M-V-VM pattern, there is no code in the code-behind.
This is a known bug in the ComboBox in Silverlight 2. I think its been fixed in SL 3.
You can fix this by doing the following:
1. Inherit from the ComboBox
public class MyComboBox : ComboBox
2. Get a reference to the "Po... | [
0.17883086204528809,
-0.1387597918510437,
0.695385754108429,
0.1916959434747696,
0.10153856128454208,
0.23549561202526093,
0.28103724122047424,
-0.2879165709018707,
-0.1602010279893875,
-0.5792438983917236,
-0.1343073546886444,
0.45392948389053345,
-0.41914764046669006,
0.0946783795952797,... | |
using the ClearValue(DP) method.
```
thePopupContent.ClearValue(FrameworkElement.WidthProperty);
thePopupContent.ClearValue(FrameworkElement.HeightProperty);
```
You can clear the Max and Min Height & Width properties if you are worried about those too. | [
0.047343894839286804,
-0.19199028611183167,
0.7398965954780579,
-0.048825450241565704,
0.09768908470869064,
0.32807794213294983,
0.10561196506023407,
-0.23853999376296997,
-0.08352163434028625,
-0.48395901918411255,
-0.7345976829528809,
0.6056681871414185,
0.05979260802268982,
-0.250707119... | |
I'm using gVim on Windows. My code shows `^M` characters at the end of lines. I used `:set ff=dos` to no avail. The `^M` characters remain for existing lines, but don't show up for newlines I enter. I've switched modes to mac (shows `^J` characters) and unix (also shows `^M` characters) and back to dos. Has anyone else... | [
0.09597107023000717,
-0.01743083819746971,
0.8107403516769409,
-0.10027539730072021,
0.031042171642184258,
0.11027687788009644,
0.4749361276626587,
0.19861769676208496,
-0.2660697102546692,
-0.9603251218795776,
-0.14375810325145721,
0.9280532002449036,
-0.25650879740715027,
0.2113722711801... | |
it. Or run dos2unix on the file. You can replace the Windows line endings with:
`:%s/\r\(\n\)/\1/g` | [
-0.0364980511367321,
-0.07890532910823822,
0.2095290571451187,
-0.02501777559518814,
0.15254928171634674,
-0.029422927647829056,
0.35350456833839417,
0.3946079611778259,
0.22176165878772736,
-0.8431298732757568,
-0.5113162994384766,
0.6626027822494507,
-0.2242334485054016,
0.17160889506340... | |
How can I use a regular expression to extract groups of html that will be formatted like this:
.
```
.
.irrelevant html...
<b>Question 6</b><br>
lots of text
<p>
lots of text
<p>
<br>
<b>Answer 6</b><br>
lots of text
<p>
lots of text
<p>
lots of text
<p>
more text
<p>
<HR>
<IMG SRC="/images/image.jp... | [
0.13652311265468597,
0.028450140729546547,
0.4743775427341461,
0.2094080001115799,
-0.12912137806415558,
0.09160328656435013,
0.05788932740688324,
-0.513582170009613,
-0.18699131906032562,
-0.7852307558059692,
-0.1242075115442276,
0.4666862487792969,
-0.1441584974527359,
-0.399847030639648... | |
happens when you have a mixture of Windows line endings and Unix ones. If you have 100 lines, 99 are \r\n and one is \n, you'll see 99 ^M characters. The fix is to find that one line and replace it. Or run dos2unix on the file. You can replace the Windows line endings with:
`:%s/\r\(\n\)/\1/g` | [
-0.19918203353881836,
-0.061653777956962585,
0.2802237272262573,
0.0350223071873188,
0.35525086522102356,
0.19966931641101837,
0.43861299753189087,
0.3934313654899597,
-0.23394083976745605,
-0.8902353048324585,
-0.41337844729423523,
0.5137473940849304,
-0.29283854365348816,
0.2049401402473... | |
If I run this where vote.created\_on is a python datetime:
```
import calendar
created_on_timestamp = calendar.timegm(vote.created_on.timetuple())*1000
created_on_timestamp = str(created_on_timestamp)
```
created\_on\_timestamp will be printed with encapsulating tick marks ('). If I do int() or something like that, ... | [
0.4756479561328888,
0.2154938131570816,
0.3121415972709656,
-0.2325173020362854,
0.02963103912770748,
0.03636790066957474,
0.24650456011295319,
-0.023033056408166885,
-0.2804054319858551,
-0.7082293033599854,
0.15699326992034912,
0.37582632899284363,
-0.35811272263526917,
0.023849355056881... | |
best way to deal with this is to convert the long into a string and when the template parses the string, use {{ created\_on\_timestamp|safe }} to render the quote marks as quote marks.
```
>>> i = 1240832864000L
>>> i
1240832864000L
>>> print i
1240832864000
>>>
>>> '<script type="text/javascript"> var num = %s; </scr... | [
0.2502578794956207,
-0.19373972713947296,
0.517794132232666,
-0.29662731289863586,
-0.237191841006279,
0.03436000645160675,
0.02950950339436531,
-0.23175056278705597,
-0.08906783163547516,
-0.7053731679916382,
-0.05179459974169731,
0.3437877595424652,
-0.21768969297409058,
-0.1030371487140... | |
Our company is facing some difficulties with our CMS web application. This application was part-built by a contractor and we have been confronting some stability issues (crashing, having to put them in front of load balancers or caching mechanisms) when we think the application should be able to handle it. We put toget... | [
0.3404054045677185,
0.3625960946083069,
0.22287294268608093,
0.1366080641746521,
0.32591965794563293,
0.07876145094633102,
-0.12145240604877472,
-0.08762865513563156,
-0.3955978751182556,
-0.3752025067806244,
0.14932039380073547,
0.17763611674308777,
-0.024725064635276794,
0.11547462642192... | |
to be built in .NET instead of Java (current) you will expect to perform the same.
The metrics that we came up with are:
* Number of concurrent requests/queue length: 100 Maximum
* Time to serve a request: 2 s Minimum
* Number of requests per hour: 150,000
* Minimum number of page views per hour: 5,000
Minimum HD Re... | [
0.24694596230983734,
-0.11910299211740494,
0.33692410588264465,
0.1891850233078003,
-0.011142442934215069,
-0.0723743736743927,
0.29429489374160767,
-0.07072261720895767,
0.031368155032396317,
-1.0866020917892456,
-0.287663072347641,
0.5739629864692688,
0.013613332062959671,
-0.03153964504... | |
"CMS" is very broad:
* What does your server farm look like?
* What are the terms of your SLA?
* What does your typical user look like? E.g. many brief users or fewer users with long sessions and many requests?
Other important questions to answer:
* Do you want to measure "time to first byte" (I hate this but it's f... | [
-0.05727890878915787,
0.03245536983013153,
0.21662795543670654,
0.17783983051776886,
0.0571308508515358,
-0.06993354856967926,
0.04920685663819313,
0.10844791680574417,
-0.610935389995575,
-0.6788123846054077,
-0.07423342019319534,
0.10051418840885162,
0.0306578166782856,
-0.03195814788341... | |
What kind of caching mechanism can you support? Can the content be stale for minutes/hours?
In our farm of several load-balanced 64-bit servers with ~32gb RAM (IIRC) and 4 CPUs each, we average just under 100k requests per hour with a peak load of several hundred requests/sec (uncommon). Total end-user load time (incl... | [
-0.13956207036972046,
0.2595578134059906,
0.3557361960411072,
0.28671693801879883,
-0.10125425457954407,
0.09254416823387146,
0.20846283435821533,
-0.08990571647882462,
-0.30984586477279663,
-0.7336292266845703,
-0.10377707332372665,
0.09910707920789719,
-0.0941271111369133,
0.225261569023... | |
My goal: Similarly the Intellisense dropdown in Visual Studio 2008, when the user presses CTRL, I want the entire application to become 40% opaque. How can I do that?
I want to use the regular window chrome, so my WindowStyle cannot be "None".
Thanks!
For WPF, one possible solution is the custom GlassWindow found in... | [
0.19544459879398346,
-0.057330671697854996,
0.7124086618423462,
-0.1247422844171524,
-0.31247594952583313,
-0.01614467054605484,
0.5161356925964355,
-0.1684737503528595,
-0.27653175592422485,
-0.8592388033866882,
0.06567387282848358,
0.6438754200935364,
-0.16324275732040405,
0.156187400221... | |
a number of reasons, so I am curious to see what others have tried or come up with. | [
0.764402449131012,
0.42385175824165344,
-0.4736226499080658,
0.0996798425912857,
0.09472887217998505,
0.22970756888389587,
0.04893254116177559,
0.008908817544579506,
-0.2192765772342682,
-0.23587191104888916,
0.16836152970790863,
0.32721295952796936,
0.11892545968294144,
0.3393988609313965... | |
Assume you have two web applications running in two different tabs/windows in your browser. Is there a predefined interface in IE, Firefox or Google Chrome to pass data between the two windows? If so it should be possible to implement drag'n drop, right?
Because I don't think this is possible I wonder if the same could... | [
0.37539851665496826,
-0.12251213937997818,
0.17677277326583862,
0.26145392656326294,
-0.10061095654964447,
0.00451252143830061,
0.06089198589324951,
-0.01940607838332653,
-0.12214791774749756,
-0.6848534941673279,
0.15879175066947937,
0.7070581912994385,
-0.4084848463535309,
-0.37561982870... | |
- but you'll see it's definitely possible.
Edit: I suppose I should make clear: you're very limited in what you can actually pass stuff between, and the browsers which are supported. What it seems like you're actually trying to accomplish may be impossible, but the general concept of passing between multiple windows i... | [
0.6151185035705566,
-0.03576981648802757,
0.3131161034107208,
0.4063965082168579,
-0.001341997878625989,
-0.07613761723041534,
0.4166041612625122,
0.27777063846588135,
-0.3377605378627777,
-0.5520017743110657,
-0.13840870559215546,
0.06895221024751663,
0.06207941472530365,
0.02658357843756... | |
i have never used JSON and want to find more about it as people keep referring to it as a better version of XML for sending data from client to server.
can someone please suggest a good resource
[JSON for the masses](http://www.dustindiaz.com/json-for-the-masses/) is pretty straightforward.
If you understand XML, you... | [
0.6235374808311462,
-0.2232578992843628,
0.2407437264919281,
0.058884210884571075,
-0.265431672334671,
-0.07819601893424988,
-0.20612725615501404,
0.3124024271965027,
-0.21331638097763062,
-0.5289943814277649,
0.07235109061002731,
0.3363798260688782,
0.1569581776857376,
-0.3395918607711792... | |
I'm using the java.util.zip library and ZipOutputStream in order to create a zip file of a directory and all the files and directories under it. In my application, it is likely that another thread could be accessing these same files during the compression. I'm not an expert on file compression (or thread-safety, for th... | [
0.2519470155239105,
0.18258515000343323,
0.07011014223098755,
-0.15166716277599335,
0.36160892248153687,
-0.1272004395723343,
0.09638581424951553,
-0.16866181790828705,
-0.22481393814086914,
-0.8504744172096252,
-0.181852787733078,
0.27227747440338135,
-0.26357966661453247,
0.1709851026535... | |
So it's certainly possible, but it's not the common case. | [
0.49881500005722046,
0.3670481741428375,
-0.1964910328388214,
0.1249578520655632,
0.3873152732849121,
-0.07906228303909302,
0.14640675485134125,
0.23786848783493042,
-0.11081987619400024,
-0.12399768084287643,
0.07911989837884903,
0.15579131245613098,
0.13473936915397644,
0.355404078960418... | |
How do I get the external IP Address of a NAT using the windows library? I am trying to find any information on INATExternalIPAddressCallback, but have only found one example in C++ using unavailable interfaces to C#. Any guidance would be much appreciated.
-Karl
Sorry, that I don't answer with an existing API from Wi... | [
0.3115323781967163,
-0.006140830460935831,
0.17378050088882446,
0.2089817225933075,
-0.6669121384620667,
0.024336252361536026,
0.5160694718360901,
0.029720906168222427,
-0.393337607383728,
-0.6741014719009399,
-0.007122508250176907,
0.45079922676086426,
-0.34761056303977966,
0.244665294885... | |
System.Security.Cryptography;
namespace xxx
{
class STUNPacket
{
static RNGCryptoServiceProvider m_rand=new RNGCryptoServiceProvider();
private byte[] m_requestid=new byte[16];
public STUNPacket()
{
m_rand.GetBytes(m_requestid);
}
public byte[] CreateRequest()
{
byte[] pa... | [
0.032926853746175766,
-0.3018369972705841,
0.22684931755065918,
-0.010899619199335575,
-0.03756219148635864,
0.13747194409370422,
0.2985178530216217,
-0.5252271294593811,
-0.3805612027645111,
-0.3641979992389679,
-0.28208598494529724,
0.5463463068008423,
-0.25887227058410645,
0.28284388780... | |
0x00,0x08, //Länge des Pakets ohne Header
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //Transkations-ID
//Message-Attribute:
0x00,0x03, //Typ: Change-Request
0x00,0x04, //Länge: 4 Bytes
0x00,0x00,0x00,0x00 //Weder IP, noch Port ändern | [
-0.0984494686126709,
0.0380311943590641,
0.6452669501304626,
-0.26121681928634644,
-0.04472444951534271,
0.8136458396911621,
0.35104817152023315,
-0.10162201523780823,
-0.30599406361579895,
-0.7101981043815613,
-0.24831520020961761,
0.08132446557283401,
-0.24404801428318024,
0.150598213076... | |
};
for(int i=0;i<16;i++)
packet[i+4]=m_requestid[i];
return packet;
}
public IPEndPoint ParseResponse(byte[] paket)
{
if (paket.Length<20)
throw new Exception("STUN-Response zu kurz, um einen Header zu haben");
if (paket[0]!=1||paket[1]!=1) | [
-0.47421154379844666,
-0.29633939266204834,
0.22553838789463043,
-0.16450326144695282,
-0.10748936235904694,
0.1442311406135559,
0.46613553166389465,
-0.45523759722709656,
-0.08104797452688217,
-0.511722207069397,
-0.3468134105205536,
0.10533203929662704,
-0.37575361132621765,
0.0772084221... | |
throw new Exception("STUN-Reposne hat falschen Typ, muss Binding-Response sein");
for (int i=0;i<16;i++)
if (paket[i+4]!=m_requestid[i])
throw new Exception("STUN-Antwort hat falsche Transkations-ID");
int size=paket[2]*256+paket[3];
int pos=20;
for(;;)
... | [
-0.2633739709854126,
-0.18941447138786316,
0.36161747574806213,
-0.3094213306903839,
-0.18262381851673126,
0.3590245246887207,
0.599320650100708,
-0.6445607542991638,
-0.30822429060935974,
-0.39242130517959595,
-0.35819193720817566,
0.1867491751909256,
-0.4253346025943756,
-0.1930724978446... | |
if (size<4)
throw new Exception("Verbleibende Nachricht zu kurz für weiteren Attributheader, "+
"Mapped-Adress-Attribut nicht gefunden");
int attrsize=paket[pos+2]*256+paket[pos+3];
if (pos+4+attrsize>paket.Length)
throw new Exception("Attribut... | [
-0.335933119058609,
0.14951898157596588,
0.24062009155750275,
-0.2402576357126236,
0.08327601104974747,
0.17008599638938904,
0.6252675652503967,
-0.38333338499069214,
-0.2841964662075043,
-0.3580930829048157,
-0.5985971093177795,
0.09260984510183334,
-0.23870328068733215,
-0.29905146360397... | |
passt");
//Wenn kein Mapped-Adress-Attribut, dann überspringen
if (paket[pos]!=0||paket[pos+1]!=1)
{
pos+=attrsize;
continue;
}
if (attrsize<8) | [
-0.5119854211807251,
-0.298775315284729,
0.7400831580162048,
-0.08529403060674667,
-0.0068339575082063675,
0.30394038558006287,
0.5603325963020325,
-0.33483171463012695,
-0.2587210536003113,
-0.40472251176834106,
-0.5861379504203796,
0.1608072966337204,
-0.48531574010849,
-0.19952754676342... | |
throw new Exception("Mapped-Adress-Attribut ist zu kurz");
if (paket[pos+5]!=1)
throw new Exception("Adreßfamilie von Mapped-Adress ist nicht IPV4");
int port=paket[pos+6]*256+paket[pos+7];
IPAddress adress=new IPAddress(new byte[4] { paket[pos+8],paket[pos+9],paket[p... | [
-0.5524381399154663,
0.026906615123152733,
0.5631627440452576,
-0.17920148372650146,
-0.05077144503593445,
0.35889843106269836,
0.4880110025405884,
-0.19086533784866333,
-0.47753509879112244,
-0.6538504958152771,
-0.46776798367500305,
-0.01449264120310545,
-0.39928948879241943,
-0.16866482... | |
IPEndPoint(adress,port);
}
}
}
```
}
The IP-address returned by ParseResponse should be your ip adress like the outside world sees it.
**Note that will not be able to get your external ip without either the help of an internet server or directly via upnp from your server** | [
-0.3158758282661438,
0.07631748169660568,
0.4243425726890564,
0.1028614267706871,
-0.04732520878314972,
-0.16384413838386536,
0.2885481119155884,
-0.027669666334986687,
0.005259860306978226,
-0.8342894911766052,
-0.16505371034145355,
0.34145599603652954,
-0.37193113565444946,
0.24946244060... | |
I wrote a file parser for a game I'm writing to make it easy for myself to change various aspects of the game (things like the character/stage/collision data). For example, I might have a character class like this:
```
class Character
{
public:
int x, y; // Character's location
Character* teammate;
}
```
I s... | [
0.02066347561776638,
-0.2696681618690491,
0.10923587530851364,
0.04911252483725548,
0.13699211180210114,
-0.13265612721443176,
-0.007021461613476276,
0.07796268910169601,
-0.00640568183735013,
-0.4621727764606476,
0.04317959398031235,
0.5065004825592041,
-0.14677397906780243,
-0.4896353483... | |
Teammate = Sidekick
}
```
This will create two data structures and put them in a map`<std::string, Character*>`, where the key string is whatever name I gave it (in this case Sidekick and AwesomeDude). When my parser sees a pointer to a class, like the teammate pointer, it's smart enough to look up in the map to fetc... | [
-0.20801199972629547,
-0.30880627036094666,
-0.01316850632429123,
-0.05240603908896446,
-0.23739318549633026,
-0.18841420114040375,
0.21424207091331482,
0.29024603962898254,
-0.045632001012563705,
-0.5737882256507874,
0.12345828860998154,
0.2755429744720459,
-0.10294611006975174,
-0.179582... | |
structures reference objects that haven't yet been added to the map. The two easiest solutions that I can think of are (a) add the ability to forward declare data structures or (b) have the parser read through the file twice, once to populate the map with pointers to empty data structures and a second time to go throug... | [
-0.11281809210777283,
0.21602091193199158,
0.2366056740283966,
0.029767928645014763,
-0.47149690985679626,
0.05972304940223694,
0.2332371026277542,
-0.38879722356796265,
-0.3157776892185211,
-0.5434425473213196,
-0.0876806303858757,
0.24237743020057678,
-0.29024356603622437,
0.304468482732... | |
could be confusing. The problem with (b) is that I might want to declare Sidekick and AwesomeDude in their own files. I'd have to make my parser be able to take a list of files to read rather than just one at a time (this isn't so bad I guess, although sometimes I might want to get a list of files to read from a file).... | [
0.3238813579082489,
0.08816084265708923,
0.08493350446224213,
0.18139593303203583,
-0.29594460129737854,
-0.2655261754989624,
0.3954865634441376,
0.2279360145330429,
-0.2656290829181671,
-0.359047532081604,
-0.06468074023723602,
0.3581825792789459,
-0.06401172280311584,
0.09761900454759598... | |
there a third option I haven't thought of? It seems like there ought to be some clever solution to this with pointer references or binding or something... :-/ I suppose this is somewhat subjective based on what features I want to give myself, but any input is welcome.
When you encounter the reference the first time, si... | [
0.09894014149904251,
-0.04744488745927811,
0.255887508392334,
0.26700758934020996,
0.09368634223937988,
0.047033604234457016,
-0.03665522113442421,
-0.024022340774536133,
-0.2304871678352356,
-0.6091536283493042,
0.02010371722280979,
0.8780031800270081,
-0.2629861831665039,
-0.065599739551... | |
By definition (at least from what I've seen) sargable means that a query is capable of having the query engine optimize the execution plan that the query uses. I've tried looking up the answers, but there doesn't seem to be a lot on the subject matter. So the question is, what does or doesn't make an SQL query sargable... | [
-0.30685850977897644,
0.34756729006767273,
0.2901076078414917,
-0.18353691697120667,
-0.07253874838352203,
-0.1483028382062912,
0.01965247094631195,
0.3632015287876129,
-0.4932911694049835,
-0.17949292063713074,
-0.24573436379432678,
0.12846490740776062,
0.05300009250640869,
0.420176774263... | |
on myDate, even if one exists. It will literally have to evaluate this function for every row of the table. Much better to use:
```
WHERE myDate >= '01-01-2008' AND myDate < '01-01-2009'
```
Some other examples:
```
Bad: Select ... WHERE isNull(FullName,'Ed Jones') = 'Ed Jones'
Fixed: Select ... WHERE ((FullName = ... | [
-0.18238258361816406,
0.32788869738578796,
0.6502167582511902,
-0.35801732540130615,
0.19162769615650177,
0.32076001167297363,
-0.004645165987312794,
0.24029140174388885,
-0.1655523031949997,
-0.7008373141288757,
0.10206206887960434,
0.7252181172370911,
-0.09268125891685486,
0.261352151632... | |
I am coding in AS3 and want to add a stroke to text that I'm displaying to the screen. My current code is:
```
format = new TextFormat("BN Elements", 14, 0xEEEEEE, false, false, false, null, null, "left");
format.font = "BN Elements"
scoreText = initText(starsleftText, format, "", 160,5, 545, 61);
scoreText = "Stroke ... | [
-0.06391509622335434,
0.16254229843616486,
0.5938861966133118,
-0.3959586024284363,
-0.07785036414861679,
0.28377190232276917,
0.27195239067077637,
-0.5233010649681091,
0.058924295008182526,
-0.9115557074546814,
0.09693830460309982,
0.5020418167114258,
-0.14727133512496948,
-0.102523781359... | |
properties within AS3 directly? Or is there an alternative "stroke" function I don't know about?
It's pretty easy:
<http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/filters/GlowFilter.html> (There's an example at the bottom of the page)
I'm not sure if they've added anything new as far as adding a real... | [
0.3856796622276306,
-0.22269031405448914,
0.5370239615440369,
-0.17042461037635803,
-0.6346443295478821,
0.02108433097600937,
0.30331018567085266,
-0.6554622054100037,
-0.028290946036577225,
-0.6319142580032349,
0.3302847743034363,
0.5664669871330261,
-0.20001159608364105,
-0.2435610592365... | |
I have used `FindControl` in the past, prior to .NET 2.0/3.0. It seems like now, for some reason, the ID's of my controls get a funky named assigned. For example I assigned an id "cbSelect" to a checkbox, but FindControl does not find it. When I view the HTML it was assigned `ctl00_bodyPlaceHolder_ctl02_cbSelect`.
I h... | [
0.23974476754665375,
-0.3620530366897583,
0.2748280167579651,
0.334683895111084,
-0.06109031289815903,
-0.5941902995109558,
0.21977369487285614,
0.2715586721897125,
-0.05398842319846153,
-0.7641051411628723,
0.17650048434734344,
0.3757556974887848,
-0.5030713677406311,
0.31828612089157104,... | |
or user controls (ascx) and this is the reason the for client ids change. Imagine you have a control in the master page with the same id as one in the page. This would result in clashes. The id changes ensures all ClientID properties are unique on a page.
FindControl needs some special attention when working with Mas... | [
-0.17104357481002808,
-0.27310910820961,
0.782514214515686,
0.18123821914196014,
-0.012851561419665813,
-0.12712188065052032,
-0.17007915675640106,
-0.20654964447021484,
-0.208326056599617,
-0.8265929222106934,
-0.17558330297470093,
0.31231042742729187,
-0.04101935401558876,
0.166904926300... | |
For custom rendering, I've created a class that extends JPanel and overrides the paintComponent method. In the custom paintComponent I rendering multiple shape objects held in a array. What I would like to add is the ability to drag and select 1 or more of the shapes. While dragging I would like to show a translucent r... | [
0.4828173518180847,
-0.007858888246119022,
0.3484572768211365,
-0.062169261276721954,
-0.38931211829185486,
0.35859477519989014,
-0.0565800704061985,
-0.029904402792453766,
-0.47690674662590027,
-0.865018367767334,
0.426779568195343,
0.5200592875480652,
-0.29158422350883484,
0.053381912410... | |
extends JPanel
{
Rectangle2D.Double selectionRect;
Point mouseDown, mouseHere;
...
protected void paintComponent(Graphics g)
{
AlphaComposite ta = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.1f);
g2d.setComposite(ta);
g2d.setColor(Color.BLUE);
g2d.fill(sele... | [
-0.053614262491464615,
-0.5882881879806519,
0.5467636585235596,
-0.34835752844810486,
0.026840271428227425,
0.04056767374277115,
0.4069705307483673,
-0.6296607255935669,
0.16172777116298676,
-0.5027646422386169,
-0.4878052771091461,
0.6096677184104919,
-0.5728694200515747,
-0.2526001930236... | |
@Override
public void mousePressed(MouseEvent e)
{
super.mousePressed(e);
// store the mouse down location
pnl.mouseDown = e.getPoint();
}
/**
* @see java.awt.event.MouseAdapter#mouseDragged(java.awt.event.MouseEvent)
*/
@Override
public void mouseDragg... | [
-0.1829015165567398,
-0.4105435311794281,
0.27038609981536865,
-0.34324806928634644,
0.5239599943161011,
0.061142440885305405,
0.4578641355037689,
-0.22827239334583282,
-0.08363897353410721,
-0.7293379902839661,
-0.1959780901670456,
0.8867719173431396,
-0.40778616070747375,
0.0235851816833... | |
// check for left mouse button
if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) == 0)
{
return;
}
// store the current location
pnl.mouseHere = e.getPoint();
// calculate the size of the selection rectangle
double downX = | [
-0.1486622542142868,
-0.4879235327243805,
0.5836553573608398,
-0.3910004496574402,
0.6397218704223633,
0.45276856422424316,
-0.16487820446491241,
-0.16925527155399323,
-0.23382703959941864,
-0.643306314945221,
-0.17964451014995575,
0.26315364241600037,
-0.2606176435947418,
-0.0034231171011... | |
pnl.mouseDown.getX();
double downY = pnl.mouseDown.getY();
double hereX = pnl.mouseHere.getX();
double hereY = pnl.mouseHere.getY();
double l = Math.min(downX, hereX);
double t = Math.min(downY, hereY);
double w = Math.abs(downX - hereX);
double h = Math.abs(down... | [
-0.23890908062458038,
-0.4385164678096771,
0.4642002582550049,
-0.38852211833000183,
0.03977376967668533,
0.6599048376083374,
0.08832219988107681,
-0.42354142665863037,
-0.46994757652282715,
-0.4087664783000946,
-0.6282708644866943,
0.5889014601707458,
-0.23575004935264587,
-0.158979684114... | |
// queue a repaint of the panel
pnl.repaint();
}
@Override
public void mouseReleased(MouseEvent e)
{
super.mouseReleased(e);
// clear the selection rectangle
pnl.selectionRect = null;
// queue a repaint of the panel
pnl.repaint(); | [
-0.13993655145168304,
-0.5424529910087585,
0.6337904930114746,
-0.36104679107666016,
0.41663745045661926,
0.4563259482383728,
0.27434179186820984,
0.03717441484332085,
-0.3522317111492157,
-0.6661311984062195,
-0.6385994553565979,
0.5431914329528809,
-0.5643473863601685,
0.1761444061994552... | |
}
}
}
``` | [
0.033695679157972336,
0.4034728407859802,
0.1949702352285385,
-0.15257494151592255,
0.4299153685569763,
-0.20141436159610748,
0.07711705565452576,
0.4467844069004059,
0.3091506361961365,
-0.5090379118919373,
-0.3048633635044098,
0.5600791573524475,
-0.33611243963241577,
0.3141762912273407,... | |
I'm a computer science student designing a project and I've started wondering what are good examples or software, or even hardware that are toeing the line between being feature rich with good usable features for regular users and being too intimidating for new users. Also could anyone recommend any good tips/books for... | [
0.12409988045692444,
0.2810852825641632,
-0.6598710417747498,
0.29501867294311523,
0.13819386065006256,
0.25304552912712097,
0.5847105979919434,
0.1904861032962799,
-0.26704469323158264,
-0.9542137384414673,
-0.2770777940750122,
0.2096630334854126,
-0.29643887281417847,
0.241231307387352,
... | |
Saint-Exupéry
---
I am not trying to be flippant but these quotes really are the best advice. Simplicity of design should be your goal. Not that achieving simplicity is easy! On the contrary, it is quite difficult but it is possible.
Try thinking about things a bit differently. Rather than
> How many things can I a... | [
0.46029889583587646,
0.43290969729423523,
-0.33964627981185913,
0.2522868514060974,
-0.17793983221054077,
0.6196969151496887,
0.8988232016563416,
0.11361093074083328,
0.06784038990736008,
-0.9785844683647156,
0.25957953929901123,
0.7621214389801025,
-0.14874610304832458,
0.0949941352009773... | |
The property `HttpContext.Current.Request.ApplicationPath` represents the virtual directory in IIS or WebDev.WebServer.
```
HttpContext.Current.Request.ApplicationPath evaluates to "/virtualdirectory"
```
This can be used in conjunction with `VirtualPathUtility` to make a path root relative :
```
VirtualPathUtili... | [
-0.5694989562034607,
-0.12309597432613373,
0.6203809380531311,
0.07210291177034378,
0.20517414808273315,
-0.006765895988792181,
0.259398877620697,
-0.04623863101005554,
-0.16902251541614532,
-0.887787401676178,
-0.18326091766357422,
0.5423287749290466,
-0.2412067949771881,
0.23723933100700... | |
is I need to access the virtual directroy name within `global.asax.cs`. I need it to construct some paths that are used in dynamically created CSS. Is there an alternative way to access this value?
**Edit:** This is the error you get in IIS 7 for calling `HttpContext.Current.Request` in global.asax.cs under Applicatio... | [
-0.22300109267234802,
0.028166335076093674,
0.6592395901679993,
-0.14565187692642212,
0.06458278745412827,
0.049169231206178665,
0.31885507702827454,
0.05459199100732803,
0.037727758288383484,
-0.5644568800926208,
-0.1953214555978775,
0.3466596305370331,
-0.27264729142189026,
0.29496297240... | |
Assume an HTML page:
```
<html>
<body>
.. html content (outside of our control) ..
.. javascript block ..
.. some more html content (outside of our control) ..
</body>
</html>
```
Assume further that the only part of the HTML page that we're able to control is a javascript block in the middle of t... | [
0.22189857065677643,
-0.13818922638893127,
0.48685422539711,
0.1403251439332962,
-0.2828746438026428,
0.10928421467542648,
0.06814262270927429,
-0.5125275254249573,
-0.18536676466464996,
-0.6043296456336975,
-0.022153140977025032,
0.33871570229530334,
-0.28110721707344055,
-0.3823411762714... | |
.. html content (outside of our control) ..
.. javascript block ..
.. some more html content (outside of our control) ..
<div style="height: 150px; clear: both;"></div>
</body>
</html>
```
But how do I achieve this only by using the javascript block?
The ideal solution should be cross-browser compat... | [
0.12598060071468353,
-0.011743455193936825,
0.9699772596359253,
-0.007803013082593679,
-0.19102254509925842,
-0.08841957151889801,
0.40616217255592346,
-0.6883072853088379,
-0.25940054655075073,
-0.6900528073310852,
-0.2623470425605774,
0.503783106803894,
-0.15405988693237305,
-0.171427264... | |
javascript library (such as the otherwise excellent jQuery) can be used.
Updated code:
```
var space = document.createElement('div');
space.style.height = "150px";
space.style.clear = "both";
document.getElementsByTagName("body")[0].appendChild(space);
``` | [
0.259357213973999,
-0.041307058185338974,
0.3684961497783661,
-0.1421279013156891,
0.040152136236429214,
-0.0562155544757843,
0.28594592213630676,
-0.5042203068733215,
0.039109405130147934,
-0.8355659246444702,
-0.6583994626998901,
0.4340985417366028,
-0.3717556595802307,
-0.17906329035758... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.