text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
is it that using CGI is not the best way to use Python? What is the alternative?**
Is there some **totally other way** to set up a simple Python site? Is there some completely different paradigm I should be looking at outside of .htaccess and .py files?
### Related
* [Pros and Cons of different approaches to web pro... | [
0.09996858984231949,
0.15460340678691864,
0.05313541740179062,
-0.011993326246738434,
-0.3209928274154663,
-0.40594911575317383,
0.286781370639801,
-0.03416065499186516,
-0.23827950656414032,
-0.2641429901123047,
-0.2448304444551468,
0.7349622249603271,
-0.26944586634635925,
-0.37706580758... | |
to use anything at all. With classic CGI server has to **spawn a new process for every request**.
As for Python, you have few alternatives:
* [`mod_wsgi`](http://code.google.com/p/modwsgi/)
* [`mod_python`](http://modpython.org/)
* [fastcgi](http://pypi.python.org/pypi/python-fastcgi)
* standalone Python web server (... | [
0.3356263339519501,
-0.2870849370956421,
0.23162725567817688,
0.29364296793937683,
-0.31272029876708984,
-0.34462982416152954,
0.35284194350242615,
-0.046877797693014145,
-0.3779272735118866,
-0.6419459581375122,
-0.3155200183391571,
0.4772147238254547,
-0.4156927466392517,
-0.298652708530... | |
I assume that the basic setup for ASP.net web development today is:
1. Windows Vista (or XP)
2. Visual Studio 2008
3. SQL Server 2005
4. IIS 7
5. The .net Framework v3.5
So, what combination of tools, addons, libraries, etc do you always install to increase your productivity and support your development?
For me, it ... | [
0.2860603630542755,
-0.016929589211940765,
0.522574245929718,
-0.0730205550789833,
-0.3305228650569916,
-0.31058943271636963,
0.40037113428115845,
-0.01820763200521469,
-0.3252224028110504,
-0.7697091102600098,
-0.19134525954723358,
0.7218282222747803,
-0.10740161687135696,
-0.154410660266... | |
answers!
The basic, plus
* [TortoiseSVN](http://tortoisesvn.tigris.org/)
* [AnkhSVN](http://ankhsvn.open.collab.net/)
* [PowerCommands](http://code.msdn.microsoft.com/PowerCommands)
* [JQuery](http://jquery.com/)
* Some various JQuery Plugins
* The [FCKEditor](http://www.fckeditor.net/)
* AJAX Tool Kit
* MySQL I also ... | [
-0.20563076436519623,
-0.26568037271499634,
0.7269161343574524,
0.348502516746521,
-0.3390654921531677,
0.1514682173728943,
0.33972808718681335,
-0.46260741353034973,
-0.11940620094537735,
-0.3770761787891388,
-0.21973411738872528,
0.38614270091056824,
-0.15594373643398285,
-0.343453317880... | |
We are using a custom sitemap provider to populate an ASP.Net application's menu control from a recursive database table and therefore do not use the static xml web.sitemap file:
```
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" ... | [
0.35141414403915405,
-0.11611055582761765,
0.5543727278709412,
0.24984167516231537,
0.0742717757821083,
-0.07446709275245667,
0.050351642072200775,
-0.313228040933609,
-0.28666722774505615,
-0.4544583857059479,
-0.21289744973182678,
0.15235783159732819,
-0.3148210048675537,
-0.027894850820... | |
does impact positively on SEO, what approach to use to get the sitemapprovider items into the xml file in the correct format?
How would you go about doing that?
I'm not sure anything particularly cares about asp.net's sitemap beyond asp.net itself. As far as converting into the infinitely more SEO happy [(Google) Site... | [
0.2559027671813965,
-0.015441813506186008,
0.2983216345310211,
0.09020442515611649,
-0.4905818700790405,
-0.32204729318618774,
0.12563657760620117,
-0.014093193225562572,
0.015953289344906807,
-0.3624120354652405,
-0.06858504563570023,
0.5554282665252686,
-0.19211901724338531,
-0.482253611... | |
I'm using BeautifulSoup to scrape a website. The website's page renders fine in my browser:
> Oxfam International’s report entitled “Offside!
> <http://www.coopamerica.org/programs/responsibleshopper/company.cfm?id=271>
In particular, the single and double quotes look fine. They look html symbols rather than ascii,... | [
0.04546690732240677,
0.25825807452201843,
0.40608346462249756,
0.04964674636721611,
-0.32085856795310974,
0.1581752896308899,
0.2103109061717987,
0.11506785452365875,
0.09473317116498947,
-0.482333242893219,
0.06756514310836792,
0.350748747587204,
-0.048552267253398895,
-0.0657790601253509... | |
of the matter is that ™ has nothing to do with a single quote, and I can't seem to turn the unicode+htmlsymbol combo into the right ascii or html symbol--in my limited knowledge, which is why I'm seeking help.
I'd be happy with an ascii double quote, " or "
The problem the following is that I'm concerned there are ot... | [
0.7078539133071899,
0.048899587243795395,
0.5117416381835938,
0.011095589026808739,
-0.5638000965118408,
-0.16151444613933563,
0.37127140164375305,
-0.3430667519569397,
0.01229892298579216,
-0.3438686430454254,
-0.26638150215148926,
0.20078684389591217,
-0.4999202489852905,
-0.166079550981... | |
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in position 22: ordinal not in range(128)
>>> p.string
u'Oxfam International\xe2€™s report entitled \xe2€œOffside!<elided>\r\n'
```
<http://groups.google.com/group/comp.lang.pytho... | [
-0.5265400409698486,
0.11382035166025162,
0.3494116961956024,
-0.019589239731431007,
0.051440220326185226,
0.09018871933221817,
0.3060392141342163,
-0.25752848386764526,
-0.12315104156732559,
-0.38145512342453003,
-0.07667204737663269,
0.3426057696342468,
-0.3305412232875824,
0.29951101541... | |
X 4 with FF 3.0.7 and Firebug
Python 2.5 (wow, can't believe I didn't state this from the beginning)
That's one seriously messed up page, encoding-wise :-)
There's nothing really wrong with your approach at all. I would probably tend to do the conversion before passing it to BeautifulSoup, just because I'm persnickit... | [
0.2534771263599396,
0.38718223571777344,
0.6787546277046204,
-0.004851486533880234,
-0.5284371376037598,
-0.1092887818813324,
0.4606372117996216,
-0.13435524702072144,
-0.1433737725019455,
-0.48796045780181885,
-0.293628454208374,
0.5737999677658081,
-0.6880776882171631,
0.0163343008607625... | |
close
Date: Tue, 10 Mar 2009 13:14:29 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Set-Cookie: COMPANYID=271;path=/
Content-Language: en-US
Content-Type: text/html; charset=UTF-8
```
If you do the decode using 'utf-8', it will work for you (or, at least, is did for me):
```
import urllib
html = urllib.urlopen... | [
0.01975962147116661,
0.018731562420725822,
1.0095323324203491,
0.18889959156513214,
-0.12727102637290955,
0.11232510954141617,
0.6277204155921936,
0.0768238976597786,
-0.05522779002785683,
-0.45663905143737793,
-0.008972512558102608,
0.06460671871900558,
-0.016208386048674583,
-0.091608233... | |
I'm trying to implement a Facebook like toolbar on the bottom of the screen for a website I'm currently working on.
Currently, I have it 100% of the width of the screen but I'd like to have it look almost exactly like Facebook's toolbar, centered, bottom justified on top, around 80% of the current screen's width.
Her... | [
-0.062159355729818344,
0.15403710305690765,
0.7282163500785828,
-0.17423668503761292,
-0.1330874264240265,
0.32900285720825195,
0.25783151388168335,
0.08879955112934113,
-0.2930942177772522,
-0.7349902987480164,
0.0016428852686658502,
0.43546685576438904,
-0.027166320011019707,
-0.23453283... | |
I'm currently using a PHPBB2 forum for a section of one of my sites, and I would like to extend this site (add new pages, scripts, etc). I would like to restrict access to these pages to the users already logged in the PHPBB2 Forum.
In fact, if only members of a certain MemberGroup could access these pages, that woul... | [
0.6596052646636963,
0.1338987648487091,
-0.005438697524368763,
0.1963089108467102,
-0.16230681538581848,
-0.41316089034080505,
0.400633305311203,
0.3221261203289032,
-0.5771821141242981,
-0.3701229691505432,
0.16572979092597961,
0.2756478488445282,
0.02628396637737751,
0.03877044841647148,... | |
PHPBB, there's a good chance, though not always likely, that they will then have a cookie that you can read and help with checking who's who against the database.
In this case, you'll want to break the crumbs of the cookie below:
```
$_COOKIE["phpbb2mysql_data"]
```
Let's use an example and blow it out to find the... | [
0.10180435329675674,
0.20131587982177734,
0.46091362833976746,
-0.021664267405867577,
-0.019767800346016884,
-0.21853002905845642,
0.2690548896789551,
-0.31821882724761963,
-0.3348953425884247,
-0.2689816355705261,
-0.14380896091461182,
0.5938674807548523,
-0.49353620409965515,
-0.02834071... | |
$extracted_id = $goo["userid"];
```
(Thanks to [epochwolf](https://stackoverflow.com/users/16204/epochwolf) on pointing out the above serialized form of that cookie)
That number will be good to run against the database to check out which group the member belongs to. And you would run the check against the `phpbb_use... | [
-0.161531463265419,
-0.046887028962373734,
0.42795971035957336,
-0.15582041442394257,
-0.2312643826007843,
0.03395283967256546,
-0.09538096934556961,
-0.0841698944568634,
-0.45417410135269165,
-0.12675519287586212,
0.1575571745634079,
0.38942787051200867,
-0.4221443235874176,
0.00170800392... | |
AND g.group_name='Foo';
```
If you can pull a row out of that, then you've found yourself a logged in user who belongs to that Foo group. | [
0.0206278208643198,
0.47047460079193115,
0.2542310357093811,
-0.35397645831108093,
0.044757306575775146,
-0.2617274522781372,
-0.2749209403991699,
0.11297032982110977,
-0.2908429205417633,
-0.3606124520301819,
-0.3019039034843445,
0.5142116546630859,
-0.3503575623035431,
0.0579266212880611... | |
How can I drive the debugging session with some scripting language like ruby? Is there any easier options than using [Expect](http://en.wikipedia.org/wiki/Expect) or some similar module with a scripting language?
You may be able to use [JRuby](http://jruby.codehaus.org/) to drive your own debugger via the [JPDA](http:/... | [
0.5779305100440979,
0.05405927449464798,
-0.03675387054681778,
0.37645360827445984,
-0.21713846921920776,
-0.37610045075416565,
0.28655850887298584,
-0.29033932089805603,
0.012213937938213348,
-0.44849497079849243,
-0.3324715793132782,
0.7511126399040222,
-0.12637244164943695,
0.0430673509... | |
is there any way of checking with an ASP.NET webpage
if the client pc has the NET framework 2.0 installed?
string version = [Request.Browser.ClrVersion](http://msdn.microsoft.com/en-us/library/system.web.httpbrowsercapabilities.clrversion.aspx).ToString();
This I think will reveal the clr version. If this is not enou... | [
0.17901115119457245,
-0.1064983457326889,
0.464051753282547,
0.16060155630111694,
0.07398462295532227,
-0.4849057197570801,
0.2048274129629135,
0.018786700442433357,
-0.4879174828529358,
-0.2949275076389313,
-0.1209721714258194,
0.5748565793037415,
-0.28566187620162964,
0.03048240393400192... | |
I have in input box that can only contain numerical values (with use of [this](http://itgroup.com.ph/alphanumeric/) plugin).
Now I want the input to be below, say 90.
If a value is entered that exceeds this max cap or cannot be parsed, the previous value should be inserted.
By default, the box will contain "1".
```... | [
0.012557717971503735,
0.30276617407798767,
0.3325366675853729,
-0.23555690050125122,
0.16474561393260956,
0.09545490890741348,
0.07017673552036285,
-0.13477493822574615,
-0.10799488425254822,
-0.571630597114563,
0.02018553577363491,
0.5078269839286804,
-0.127442866563797,
-0.03395515307784... | |
what events are available to me and I find the documentation I found on the intarwebz rather confusing.
--EDIT--
I ended up using [Sergei's](https://stackoverflow.com/questions/630129/keep-value-in-html-input-box-below-set-amount/630228#630228) code and using [Aaron's](https://stackoverflow.com/questions/630129/kee... | [
-0.0926099494099617,
-0.03618910163640976,
0.3484136760234833,
0.05327659472823143,
-0.3418101668357849,
-0.1524786353111267,
0.5275928378105164,
-0.6288331747055054,
0.014158998616039753,
-0.5739310383796692,
-0.3336438536643982,
0.4261726140975952,
-0.41128411889076233,
-0.17502741515636... | |
If users view documents on my website (for example a pdf file that represents some confidential information), is there anyway I can prevent them from saving the document locally?
Once the user has downloaded your PDF (to the browser) they can do anything with it. They can save it to elsewhere in their hard drive. Even ... | [
0.6044481992721558,
0.19246837496757507,
0.33495402336120605,
0.3384920358657837,
0.055341869592666626,
-0.393513023853302,
0.16538776457309723,
0.1882304549217224,
-0.447976678609848,
-0.5496599078178406,
0.11157248169183731,
0.7008658647537231,
-0.008894415572285652,
0.19084234535694122,... | |
it. For example, [FileOpen](http://www.fileopen.com/) or Adobe Content Server. As you can see, such tools can (technically) prevent printing, force the content to expire, etc.
Note that this is most useful for users who are likely to *accidentally* download or distribute the data. *Malicious* users may be able to circ... | [
0.2962701916694641,
-0.31333598494529724,
0.39711275696754456,
0.3467631936073303,
-0.02832028456032276,
-0.7521929740905762,
-0.032279420644044876,
0.2648831009864807,
-0.4189051687717438,
-0.44892531633377075,
-0.5439249873161316,
0.7043230533599854,
-0.11886461079120636,
0.2481961995363... | |
I have a very simple app that processes touches on a UIImageView derived view.
The view has an array of rectangle coordinates that act as buttons.
Since this is a simple app I handle all the touch events right in my UIImageView derived class.
I need to init the array of image coordinates which is an instance variabl... | [
-0.07377148419618607,
-0.09482212364673615,
0.666622519493103,
0.07666982710361481,
-0.11379463225603104,
0.4181382656097412,
0.06468933075666428,
-0.04753700643777847,
0.10187400877475739,
-0.8124063014984131,
0.4100569784641266,
0.5698958039283752,
-0.24868179857730865,
0.112830221652984... | |
how you are loading the image view. If you are loading it from a NIB, try initWithCoder.
Alternatively, you could always use the viewDidLoad method in your controller, and have it call a custom initialization method on the view. I wouldn't recommend that though in this case unless you really had to do it that way. | [
0.31538647413253784,
-0.4835297167301178,
0.26429831981658936,
0.2547008991241455,
-0.20279724895954132,
-0.09442319720983505,
0.00889276247471571,
0.20168744027614594,
-0.30573570728302,
-0.7504801154136658,
0.1273094117641449,
0.7783024311065674,
-0.021669982001185417,
0.0774732977151870... | |
We are working on creating an installation package for a WCF-based web service. The service uses message-level encryption via an installed certificate. I am trying to come up with an automated way to both install the certificate and set its permissions.
Currently, we are manually installing the certificate via the MMC... | [
0.4286773204803467,
0.42462965846061707,
0.5349607467651367,
0.06630566716194153,
0.5805714130401611,
-0.17302724719047546,
0.2400384396314621,
-0.10639379173517227,
-0.27529916167259216,
-0.6114649772644043,
-0.2548375129699707,
0.6329667568206787,
-0.1272856742143631,
0.20458567142486572... | |
identify the file with the most recent modified date.
I'm thinking we'll use WIX to create the installation package. WIX has a specific feature for installing a certificate, but I assume permissions will still be an issue. Is there some utility or API or other means to get the physical path for an installed certificat... | [
0.45793676376342773,
0.06895890831947327,
0.25509363412857056,
-0.0026867168489843607,
0.32687485218048096,
-0.5467620491981506,
0.14830681681632996,
-0.005141707602888346,
-0.23489819467067719,
-0.8032193183898926,
-0.20618650317192078,
0.5061171650886536,
-0.02977229282259941,
0.23042558... | |
RSACryptoServiceProvider object from the certificate's PrivateKey property
3. Retrieve the UniqueKeyContainerName property.
4. Search for this file name in the various locations where keys are stored. Thats under ApplicationData for user keys and CommonApplicationData for machine keys
If you want to do this in a custo... | [
0.3968828022480011,
0.120455801486969,
0.5355995893478394,
0.09449638426303864,
-0.05148444324731827,
-0.4434523284435272,
0.3649379014968872,
-0.3168536126613617,
-0.397058367729187,
-0.49133822321891785,
0.021139517426490784,
0.5977545380592346,
-0.23865832388401031,
0.026791011914610863... | |
What is there to do when the lead developer is convinced the project will fail? This happened to me recently on a project, and I wound up losing my job, because I spoke up. In a little over a month, I had successfully improved a prototype, using a UI framework I had no prior experience with. So much so in fact, that wh... | [
0.5805677175521851,
-0.03812863305211067,
-0.011834968812763691,
0.2205493152141571,
-0.060303349047899246,
-0.07309093326330185,
0.13283462822437286,
-0.36862003803253174,
0.2169531136751175,
-0.5319089293479919,
0.4308124780654907,
0.2943911552429199,
-0.18761718273162842,
-0.05531188845... | |
so instead he went about porting the concepts from that technology to the existing project, and in a very effective manner I might add. Indeed, when the technical manager returned from the demo, he praised us both as having done a "great job", and the other developer was christened the lead, presumably because he had m... | [
0.20957401394844055,
0.2678922116756439,
-0.1449035406112671,
0.10655947029590607,
0.21766875684261322,
-0.07997666299343109,
0.14625723659992218,
0.1103130653500557,
-0.019383743405342102,
-0.37851279973983765,
-0.07337046414613724,
0.45380502939224243,
0.2699379324913025,
-0.001850681845... | |
project started to tank. Previously I had actually completed more user stories than were called for in the sprints, but now I was blocked on 3 or 4 stories/tasks with less than a week left in the sprint. One failed sprint may not be the end of the world, but I was a contractor (so was the other developer) with less tha... | [
0.4551284909248352,
-0.17365625500679016,
0.026651427149772644,
0.22621332108974457,
-0.06092728674411774,
0.15234582126140594,
0.4136977195739746,
0.06279776245355606,
-0.06592075526714325,
-0.3636628985404968,
0.33192628622055054,
0.6383844614028931,
0.19574081897735596,
-0.2030846327543... | |
to the recruiter(s). There is a lot of other "water under the bridge", but I decided to try to protect myself by re-activating my resume on dice.com, which by the way, the recruiters noticed. So, long story short, the recruiters brought my concern to the client, and the client terminated my contract.
Needless to say, ... | [
0.8004682064056396,
0.10668458044528961,
0.2601456642150879,
-0.02644093707203865,
0.22123652696609497,
0.24506627023220062,
-0.21141494810581207,
0.31643185019493103,
-0.3583623766899109,
-0.504895806312561,
0.38014787435531616,
0.6939752101898193,
0.28126558661460876,
0.10225281119346619... | |
in learning other approaches to my dilemna. Not to mention, job possibilities ;)
I don't ever "inactivate" my resume. If you keep it up to date as a living, breathing document then it's always up to date and no one can question your motives for updating it. Even if you're not really looking. | [
0.5364171266555786,
-0.05274828523397446,
0.2545672655105591,
0.010853470303118229,
0.25592514872550964,
-0.4545828402042389,
0.44166481494903564,
0.5546630620956421,
-0.2823035717010498,
-0.3806658387184143,
-0.0453580878674984,
0.5008750557899475,
0.22922532260417938,
-0.1140211895108223... | |
In C# Is there way to specify a class to be inherited only by a class present in the same assembly and for other assemblies should behave like a public sealed type.
I think Eric Lippert gets the defining quotes here:
* [Preventing third-party derivation part one](https://learn.microsoft.com/en-us/archive/blogs/ericlip... | [
-0.29913216829299927,
-0.13044477999210358,
-0.23264746367931366,
-0.23253417015075684,
-0.033659085631370544,
-0.38639500737190247,
0.35325998067855835,
-0.23439352214336395,
-0.3119868338108063,
-0.02736646682024002,
-0.30182376503944397,
0.5590715408325195,
-0.4276258647441864,
-0.00366... | |
Does anybody know is there any good library for iPhone SDK to call REST web service. I want to have something simple like [Heroku rest client](http://github.com/adamwiggins/rest-client/tree/master)
---
Thx everybody for help.
My server side is on Rails so looks like ObjectiveResource feet best of my needs.
In case y... | [
0.13536864519119263,
0.15254738926887512,
0.1905805468559265,
-0.002837673993781209,
-0.04658674821257591,
0.12065523862838745,
0.5011730790138245,
0.1834685504436493,
-0.5066424012184143,
-0.45380693674087524,
-0.12766805291175842,
0.7782004475593567,
-0.07061993330717087,
-0.320946484804... | |
The requirements for this web app include the following:
1- Need to interact with a couple other websites that don't necessarily have any type of API, so I'll basically have to build a server side web client. I've used HttpClient in Java and something similar in Ruby, but want to make sure it can handle downloads, coo... | [
0.38211509585380554,
0.18454746901988983,
0.6408079862594604,
0.1567862331867218,
-0.0025642833206802607,
-0.07666552811861038,
0.15312853455543518,
-0.13460861146450043,
0.10162006318569183,
-0.8423978090286255,
-0.17630252242088318,
0.6804687976837158,
-0.26296544075012207,
-0.1489949673... | |
Rails but at this moment Grails seems to be the best option because I know HttpClient and Apache's POI and HSSF libraries. Any advice or better options?
You might want to have a look at [Open Office Java Api](http://api.openoffice.org/)
In my company we successfully used it for generating documents based on templates ... | [
0.20768380165100098,
-0.1900169402360916,
-0.03405531495809555,
0.2125484198331833,
-0.11146800220012665,
-0.20844130218029022,
0.32088303565979004,
0.12200642377138138,
0.08411478251218796,
-0.6939515471458435,
0.06337571144104004,
0.685569167137146,
-0.09524998068809509,
-0.1911856085062... | |
Say a `DataGridView` has its `DataSource` property set to a `DataView` instance.
```
DataGridView dgv;
DataTable dt;
// ... dt gets populated.
DataView dv = dt.DefaultView;
dgv.DataSource = dv;
// ... dt gets modified
// The DataGridView needs to update to show these changes visually
// What goes here?
```
I kn... | [
0.3262937366962433,
0.04798925295472145,
0.38477829098701477,
-0.014312737621366978,
-0.11442157626152039,
-0.34101903438568115,
0.2581899166107178,
-0.08105355501174927,
-0.3353504240512848,
-0.49759262800216675,
-0.28917211294174194,
0.5706619620323181,
-0.4374968409538269,
0.16193294525... | |
I am using a Custom Attribute to define how a class's members are mapped to properties for posting as a form post (Payment Gateway). I have the custom attribute working just fine, and am able to get the attribute by "name", but would like to get the attribute by the member itself.
For example:
```
getFieldName("name"... | [
0.027862198650836945,
-0.06862112134695053,
0.46703293919563293,
-0.13829980790615082,
0.12424514442682266,
-0.13827301561832428,
0.26998892426490784,
-0.2504323422908783,
-0.13217724859714508,
-0.6898444294929504,
0.013061403296887875,
0.5756975412368774,
-0.12860293686389923,
0.293353587... | |
{
PropertyMapping map = at as PropertyMapping;
if (map != null)
{
ret += map.FieldName;
}
}
}
```
Thanks in advance!
You can't really do this, unless you're using C# 3.0 in which case you'll need to rely on LINQ (ehm, expression trees).
What you do is that you create a... | [
0.17980988323688507,
0.03155698627233505,
0.33689847588539124,
0.08369318395853043,
-0.014696330763399601,
-0.621847927570343,
0.23886169493198395,
-0.34522950649261475,
-0.2696194648742676,
-0.48703762888908386,
-0.3490643799304962,
0.9012652039527893,
0.020333770662546158,
-0.27194696664... | |
the compiler generate the expression tree (compiler does the type checking). Then you dig into that tree to get the member. Like so:
```
static FieldInfo GetField<TType, TMemberType>(
Expression<Func<TType, TMemberType>> accessor)
{
var member = accessor.Body as MemberExpression;
if (member != null)
{
... | [
-0.06120280548930168,
0.09207550436258316,
-0.05092870071530342,
-0.023206597194075584,
-0.21628835797309875,
-0.06428728252649307,
0.39167097210884094,
-0.4596351087093353,
0.0020655845291912556,
-0.34634843468666077,
-0.21691745519638062,
0.49571430683135986,
-0.49879327416419983,
-0.020... | |
'MyClass'
var f = GetField((MyClass c) => c.a);
```
With a reference to that field you can then dig up any attribute the usual way. i.e. reflection.
```
static TAttribute GetAttribute<TAttribute>(
this MemberInfo member ) where TAttribute: Attribute
{
return member.GetCustomAttributes( typeof( TAttribute )... | [
-0.11739625781774521,
0.22796370089054108,
0.41573306918144226,
-0.1991529017686844,
-0.22243748605251312,
-0.016728920862078667,
0.43209129571914673,
-0.17285120487213135,
0.04817529022693634,
-0.5490227937698364,
-0.18566085398197174,
0.6242576241493225,
-0.2967430651187897,
0.1405471116... | |
in that code there. | [
0.2127019613981247,
0.4747254550457001,
-0.12191927433013916,
0.007882240228354931,
-0.05896470323204994,
-0.20753726363182068,
0.2194724977016449,
0.1277819722890854,
-0.1860359013080597,
-0.3165922164916992,
-0.07172056287527084,
0.014370090328156948,
-0.10781455785036087,
0.131099209189... | |
My co-worker is having an issue managing customers in his data-base. The issue is when an order goes through the customer needs to be added to the data-base. But if the customer exists we don't want to make a duplicate customer we want to keep the same customer and just add to their sales history. He is having a hard t... | [
0.45637959241867065,
0.39419034123420715,
0.3814302086830139,
-0.03458700701594353,
0.3593892455101013,
0.34672245383262634,
-0.11005369573831558,
-0.21119341254234314,
-0.2598113417625427,
-0.49582281708717346,
0.5577484369277954,
0.5383270978927612,
-0.03583842143416405,
0.35356423258781... | |
new customer when in fact the customer already existed, but the info was entered slightly different.
Does anyone have any ideas about how to go about this?
Thanks.
Add one more step as part of the order completion process. This step should do a fuzzy search on the customer records to see if it can find a full or part... | [
0.7323330640792847,
0.09693519026041031,
0.1650700569152832,
0.27180400490760803,
0.20008358359336853,
-0.05181475728750229,
-0.040679462254047394,
0.2049756944179535,
-0.39869940280914307,
-0.5970995426177979,
0.30599120259284973,
0.4880487322807312,
0.19298064708709717,
-0.02569804154336... | |
they've ordered before and to put in their log in information. | [
0.6043574810028076,
0.3022884726524353,
0.29340660572052,
-0.005953025538474321,
0.3721734583377838,
-0.0968523919582367,
0.03514472022652626,
0.29724419116973877,
-0.23806165158748627,
-0.6125379204750061,
-0.028469063341617584,
0.5934091210365295,
0.0983491912484169,
-0.17439857125282288... | |
When I run my VB.NET Winforms app I do not want it to steal the focus from the other open apps. FYI, my app is started from the command line but that shouldn't make a difference. I've seen question [577076](https://stackoverflow.com/questions/577076/topmost-window-form-steal-focus) but that doesn't seem to work.
What ... | [
0.3448437452316284,
-0.20188938081264496,
0.44941604137420654,
-0.09162917733192444,
-0.14291006326675415,
-0.23601628839969635,
0.4432614743709564,
-0.21588070690631866,
0.14331509172916412,
-0.6783440709114075,
-0.23058174550533295,
0.8442260026931763,
-0.1551104038953781,
-0.04745410010... | |
End Property
```
But still no success.
Then I unchecked the Enable Application Framework checkbox on the Application tab of the project properties.
Success!!! | [
0.3666645288467407,
0.28270378708839417,
0.531686007976532,
-0.15650717914104462,
0.02420574426651001,
-0.10703561455011368,
0.748660683631897,
-0.43269869685173035,
0.19840076565742493,
-0.5267947912216187,
-0.06231117248535156,
0.7045882344245911,
-0.05920172482728958,
0.1492710560560226... | |
I'm trying find the best way to remove nonnumerical data from a varchar in SQL e.g.
```
'(082) 000-0000' to '0820000000' or
'+2782 000 0000' to '0820000000'
```
The difficulty is i'm not always sure what number formats are coming in, as shown above, so I'd like like everything that is not a number removed essentiall... | [
0.02751721814274788,
0.15139628946781158,
0.31949329376220703,
-0.0934324860572815,
-0.27279388904571533,
0.03937651216983795,
0.13369418680667877,
-0.11072253435850143,
-0.12550309300422668,
-0.4954434335231781,
-0.16376882791519165,
0.3855264186859131,
-0.1410878449678421,
0.216935247182... | |
'')
set @Num = replace(@Num, ')', '')
print @Num
```
Couldn't get the replace [^0-9] expression right though.
If you're using SQL Server 2005 or newer then your best option is to create a [user-defined CLR function](http://msdn.microsoft.com/en-us/library/ms189876.aspx) and use a regular expression to remove all non... | [
-0.2512802183628082,
0.10056003928184509,
0.5807511806488037,
-0.23581145703792572,
-0.180686354637146,
0.04839877039194107,
0.1627555936574936,
-0.31914010643959045,
-0.24757693707942963,
-0.11870960146188736,
-0.22293946146965027,
0.43924254179000854,
-0.44286850094795227,
0.139659881591... | |
= ''
WHILE (@in <> '')
BEGIN
IF (@in LIKE '[0-9]%')
SET @out = @out + SUBSTRING(@in, 1, 1)
SET @in = SUBSTRING(@in, 2, LEN(@in) - 1)
END
END
RETURN(@out)
END
```
And then select from your table like | [
-0.11199025809764862,
-0.2804315984249115,
0.5922752618789673,
-0.21531535685062408,
0.032567523419857025,
0.05873493477702141,
0.1668137013912201,
-0.36573919653892517,
-0.01750255562365055,
-0.4374070465564728,
-0.10703911632299423,
0.4037160575389862,
-0.45395225286483765,
0.06463184952... | |
so:
```
SELECT dbo.RemoveNonNumerics(your_column) AS your_tidy_column
FROM your_table
``` | [
-0.05840683355927467,
0.5734053254127502,
0.22387249767780304,
-0.26799699664115906,
0.19767418503761292,
-0.18657362461090088,
-0.06070339307188988,
-0.051031503826379776,
-0.15059739351272583,
-0.4088614881038666,
-0.32370641827583313,
0.07424721866846085,
-0.4829384684562683,
0.28599131... | |
Ok due to some client security something or other the DB tracking only works when there is a www in front of the subdomain. I want to prevent further support tickets from users going to thewebsite.com and finding out later the DB was not recording for them. I need it to redirect to www.thewebsite.com if they hit theweb... | [
0.7306056022644043,
-0.05849578604102135,
0.570723295211792,
0.21922828257083893,
-0.23759974539279938,
-0.2681804299354553,
0.772961437702179,
0.2293270379304886,
-0.3436224162578583,
-0.5828322172164917,
0.07608026266098022,
0.3515600264072418,
-0.12091967463493347,
0.23187953233718872,
... | |
you can Response.Redirect to the www. option.
Personally I would go into IIS rather, create a separate website which only accepts non www. requests and use the redirect options on the home tab to redirect it to the www. URL. This means no code changes are needed and any applications which handle 503 status messages wi... | [
0.5751475095748901,
-0.12349089235067368,
0.5442798733711243,
0.10658501088619232,
-0.15234628319740295,
0.08906584978103638,
0.6086429357528687,
-0.11731919646263123,
-0.306650847196579,
-0.9129644632339478,
-0.06518041342496872,
0.4748062193393707,
-0.14977674186229706,
0.297480225563049... | |
When I login to a sun box: SunOS domain.com 5.8 Generic\_117350-57 sun4u sparc SUNW,Sun-Fire-V240
I start in the sh shell: SHELL=/bin/sh
I type bash to start a bash shell, then have to type . .bash\_profile to load my profile. Is there a way it can be set to automatically load the profile?
`.bash_profile` is only use... | [
0.3649913966655731,
0.10021894425153732,
0.4191306233406067,
-0.2719445824623108,
-0.16558235883712769,
-0.3967161178588867,
0.501513659954071,
-0.21504656970500946,
-0.008225572295486927,
-0.9806594252586365,
-0.049723368138074875,
0.4940720200538635,
-0.14149515330791473,
0.3162706792354... | |
I am using XmlValidatingReader object to validat my object against a xsd schema but this class is obsolete in .NEt 2.0. Does any one have the right code to use the new Vaildation classes.
Yes:
```
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;
settings.Schemas.A... | [
0.4024069607257843,
0.08081164956092834,
1.0552603006362915,
-0.10665098577737808,
-0.06069198623299599,
-0.04699429124593735,
0.5381181836128235,
-0.575951337814331,
0.08189558982849121,
-0.8266887068748474,
-0.03237733989953995,
0.40014559030532837,
-0.2567589282989502,
0.363602817058563... | |
I have the following TSQL statement:
```
select
tblName "TblName",
structure "TblName/STRUCTURE",
sqlRetrieve "TblName/SQLRETRIEVE",
Identifier "TblName/IDENTIFIER",
'2' "TblName/OBJECTTYPE"
from
configTable
for xml path ('')
```
which outputs:
```
<TblName>PD_CODE_PRODUCTS
<STRUCTUR... | [
0.33953776955604553,
0.3249197006225586,
0.17693479359149933,
0.07822291553020477,
-0.27509182691574097,
0.08653908222913742,
-0.002250620862469077,
-0.373233437538147,
0.06010282784700394,
-0.9149312973022461,
0.14098027348518372,
0.3161545395851135,
-0.20158632099628448,
0.20170892775058... | |
be able to achieve this with T-SQL, unfortunately.
The closest you could get is this:
```
<TABLE Name="PD_CODE_PRODUCTS">
<TblName>
<STRUCTURE>PD_CODE_PRODUCTS</STRUCTURE>
<SQLRETRIEVE>BATCHSP</SQLRETRIEVE>
<IDENTIFIER>DATA_OWNER</IDENTIFIER>
<OBJECTTYPE>2</OBJECTTYPE>
</TblName>
</TABLE>
<TABLE N... | [
0.12043537199497223,
-0.4255538582801819,
0.13372300565242767,
0.021875638514757156,
0.022235965356230736,
0.22476044297218323,
0.23431015014648438,
-0.04564547911286354,
0.043232642114162445,
-0.8892106413841248,
-0.20877350866794586,
0.5146303176879883,
-0.33804288506507874,
0.3377475142... | |
of more help here - guess that's a feature Microsoft hasn't really considered (so far)! :-)
Marc | [
0.573079526424408,
0.3604753017425537,
-0.04359187185764313,
0.3550395667552948,
0.0063175298273563385,
-0.23248234391212463,
0.16793540120124817,
0.8073574900627136,
0.09293250739574432,
-0.608379065990448,
-0.1368611752986908,
0.7278450727462769,
0.294906884431839,
-0.19643652439117432,
... | |
I'm starting on a project to allow an existing web application to use active directory for authentication but leaving authorization within the application. I want to start off simple so I was thinking a user would type their AD username/password into my existing login form, I would then do an ldap bind against the AD s... | [
0.5682929158210754,
0.40145766735076904,
0.34652820229530334,
-0.12755471467971802,
-0.08106593787670135,
-0.24801690876483917,
-0.009729689918458462,
-0.40936511754989624,
0.3484625518321991,
-0.6090822219848633,
0.24054881930351257,
0.4674626588821411,
-0.5848549604415894,
0.080906569957... | |
table to make the association? In the past I've used username but after looking at some of the elements that AD returns I was wondering if I should use the security ID or GUID or something else?
I've been burned when a username changes like an employee gets married or divorced... so I know that is brittle.
I was ta... | [
0.2124311327934265,
0.34143516421318054,
0.5539477467536926,
-0.06088907644152641,
-0.15941327810287476,
0.010674779303371906,
-0.22711195051670074,
-0.2955385446548462,
-0.4403737485408783,
-0.571645200252533,
0.6428002119064331,
0.46032777428627014,
-0.47055092453956604,
0.35579940676689... | |
all Microsoft AD things use, security groups, permissions, etc.
If you're building on .Net you should seriously consider .Net 3.5, there's a new namespace [System.DirectoryServices.AccountManagement](http://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.aspx) that **greatly** simplifies co... | [
0.38281503319740295,
0.4037010371685028,
0.45021069049835205,
-0.0859479159116745,
-0.3030704855918884,
-0.02464207634329796,
0.04789082333445549,
0.023409506306052208,
-0.00016973416495602578,
-0.608168363571167,
0.07977565377950668,
0.18442879617214203,
-0.4877115786075592,
0.19509285688... | |
I know the following is not possible because the Enumeration's type has to be an int
```
enum GroupTypes
{
TheGroup = "OEM",
TheOtherGroup = "CMB"
}
```
From my database I get a field with incomprehensive codes (the `OEM` and `CMB`s). I would want to make this field into an `enum` or something else understan... | [
-0.11752869933843613,
0.13989582657814026,
0.08582030236721039,
0.1807297170162201,
-0.01968836411833763,
-0.14202407002449036,
0.21199515461921692,
-0.17675821483135223,
-0.02012992464005947,
-0.6235921382904053,
-0.12427085638046265,
0.47402456402778625,
-0.36037513613700867,
0.253094255... | |
{ Value = value; }
public string Value { get; private set; }
public static LogCategory Trace { get { return new LogCategory("Trace"); } }
public static LogCategory Debug { get { return new LogCategory("Debug"); } }
public static LogCategory Info { get { return new LogCategory("Info"); } }
p... | [
0.03384684771299362,
-0.28251421451568604,
0.16174395382404327,
-0.009038570336997509,
0.2623516917228699,
0.020906837657094002,
0.32018497586250305,
-0.08119397610425949,
-0.13418975472450256,
-0.49459370970726013,
-0.4061205983161926,
0.9614636301994324,
-0.29385221004486084,
0.299813747... | |
public override string ToString()
{
return Value;
}
}
```
Pass in **type-safe string values** as a parameter:
```
public static void Write(string message, LogCategory logCategory)
{
var log = new LogEntry { Message = message };
Logger.Write(log, logCategory.Value);
}
```
Usage:
```
Logger.... | [
-0.27741876244544983,
-0.13809239864349365,
0.32750245928764343,
-0.051237788051366806,
0.41874730587005615,
-0.3523845970630646,
0.3749920427799225,
-0.003421497531235218,
-0.10375075787305832,
-0.38117292523384094,
-0.5414921641349792,
0.6518564820289612,
-0.5138417482376099,
0.298854678... | |
Is there a resource out there which lists the features, functionality and potential release date of Silverlight 3 (currently called Alexandria)?
My group is currently building a product with Silverlight 2 as the deployment platform.
We need to research/be prepared for Alexandria, and see if it will resolve some of our... | [
0.6803871393203735,
0.03657927364110947,
0.0823531448841095,
-0.06437309086322784,
-0.32025912404060364,
-0.30043449997901917,
0.2684912085533142,
0.2479753941297531,
-0.32140037417411804,
-0.22526729106903076,
-0.023190367966890335,
0.01532598678022623,
-0.0967298075556755,
-0.05534704774... | |
I recently started a new development project in .net with an oracle db. I never used oracle before, and I wondered if there is a sqlprofiler like tool for oracle as well?
The best way to profile your application in Oracle is [sql tracing](http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#PFGRF... | [
0.6372476816177368,
-0.03810349106788635,
0.08066195249557495,
0.2095417082309723,
-0.22694887220859528,
-0.20687751471996307,
0.15378336608409882,
0.1514735370874405,
-0.23846769332885742,
-0.42044854164123535,
0.37476980686187744,
0.2454480081796646,
0.11359931528568268,
0.03346506133675... | |
I am interested on how to make a regular `HttpCookie` object into a cookie that expires at the end of a session. I am not interested in someone `showing me HttpContext.Session`. How does a session cookie look in the response headers compared to a normal cookie? How can I modify a `HttpCookie` to expire at the end of a ... | [
0.3001391887664795,
0.017694935202598572,
0.5950254201889038,
0.06404988467693329,
-0.17378108203411102,
-0.36350148916244507,
0.3679606318473816,
0.1393827646970749,
-0.11927331238985062,
-0.5413364768028259,
-0.0970015674829483,
0.38928380608558655,
-0.20709092915058136,
0.28260514140129... | |
Is it wrong to write:
```
class A {
public:
virtual ~A() = 0;
};
```
for an abstract base class?
At least that compiles in MSVC... Will it crash at run time?
Yes. You also need to implement the destructor:
```
class A {
public:
virtual ~A() = 0;
};
inline A::~A() { }
```
should suffice.
If you derive a... | [
0.2292020320892334,
0.11048147082328796,
0.13952139019966125,
-0.013708448968827724,
0.12568919360637665,
-0.1740039736032486,
0.6576278805732727,
-0.015283041633665562,
0.10999444127082825,
-0.3564743101596832,
-0.15984350442886353,
0.7948015928268433,
-0.7066171765327454,
0.3144275248050... | |
compiled with <http://www.comeaucomputing.com/tryitout/> | [
-0.06343243271112442,
-0.27692678570747375,
0.026311760768294334,
0.2934834957122803,
0.2577477991580963,
0.29492926597595215,
0.09468569606542587,
-0.009344801306724548,
0.12570291757583618,
-0.8664353489875793,
-0.4020901918411255,
-0.14907772839069366,
-0.046979792416095734,
-0.18771705... | |
The Framework Design Guidelines (2nd Ed., page 327) say:
> CONSIDER providing method `Close()`, in addition to the `Dispose()`, if close is standard terminology in the area.
>
>
> When doing so, it is important that you make the Close implementation identical to `Dispose` and consider implementing `IDisposable.Dispo... | [
0.2799440622329712,
-0.13036391139030457,
0.11225633323192596,
-0.2328266054391861,
0.05503205955028534,
-0.35671332478523254,
0.26344117522239685,
-0.3006826937198639,
0.1319999396800995,
-0.6556366086006165,
-0.09018838405609131,
0.6263687610626221,
-0.49193012714385986,
0.02438884973526... | |
this.Close();
}
public void Close() {
this.Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
if (disposing) {
this.someInnerDisposable.Dispose();
this.someInnerDisposable = null;
}
}
}
```
FxCop do... | [
0.4430541396141052,
-0.3042205572128296,
0.4668313264846802,
-0.3414098024368286,
0.36724236607551575,
-0.2508270740509033,
0.21088431775569916,
-0.20116300880908966,
-0.04106597229838371,
-0.3485963046550751,
-0.22016330063343048,
0.7444561123847961,
-0.4391345679759979,
0.308496266603469... | |
: 'SomeClass.Close()' calls 'GC.SuppressFinalize(object)', a method that is typically only called within an implementation of 'IDisposable.Dispose'. Refer to the IDisposable pattern for more information.
>
>
> CA1816 : Microsoft.Usage : Change 'SomeClass.IDisposable.Dispose()' to call 'GC.SuppressFinalize(object)'. T... | [
0.19400572776794434,
-0.11629892885684967,
0.15528114140033722,
-0.24196666479110718,
-0.07178189605474472,
-0.13074041903018951,
0.31235915422439575,
-0.2553938627243042,
-0.14545315504074097,
-0.5397189259529114,
-0.4153694808483124,
0.3223132789134979,
-0.45019498467445374,
-0.012854008... | |
declared as public and sealed.
* How do I implement the dispose pattern with close method correctly?
-or-
* How do I suppress the warnings?
I tried
```
[SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly",
Justification = "Framework Design Guidelines say it's ok.")]
void IDisposable.Disp... | [
0.2888059914112091,
0.10621494054794312,
0.35119014978408813,
-0.19703978300094604,
0.16423659026622772,
-0.39978107810020447,
0.4116264283657074,
-0.26815065741539,
-0.19247908890247345,
-0.5484550595283508,
-0.40876448154449463,
0.5447497367858887,
-0.4420037269592285,
0.1616087853908538... | |
edit ---------------
Also, changing the declaration to:
```
public void Dispose()
```
should get rid of the other error. Since you have it declared as:
```
void IDisposable.Dispose()
```
It's not marked as public and sealed, and FxCop complains. Personally, I prefer to get avoid the errors instead of suppressing... | [
0.313795804977417,
0.08375762403011322,
0.09843073785305023,
-0.10354579240083694,
0.06293380260467529,
-0.3498214781284332,
0.18381640315055847,
-0.02825228124856949,
-0.16126810014247894,
-0.5269908905029297,
-0.19246545433998108,
0.8527557849884033,
-0.3662068843841553,
0.37263491749763... | |
I am using the new jQuery 1.3.2 and jQuery-ui-1.7 libraries along with the UI Dialog. I have a div tag with several form elements (textbox, checkbox, etc.) in it. Upon page load, jQuery shows the div as a dialog. This works absolutely fine in FF, but in IE, the height of the div is wrong. It is just showing the title b... | [
0.46752339601516724,
0.043858837336301804,
1.072107195854187,
-0.17514586448669434,
-0.2265453040599823,
-0.2470555305480957,
0.1010969802737236,
-0.4171972870826721,
0.15476404130458832,
-0.8531171083450317,
-0.23679862916469574,
0.7215356826782227,
-0.06527354568243027,
-0.24675452709197... | |
a textbox). If I allow the dialog to be resizable, if you resize it in IE it works fine, but I don't want to force IE users to resize just to see the contents. Any ideas? Here is the code I use to create the dialog:
```
$('#dialogDiv').dialog({
bgiframe: true,
height: 400,
width: 620,
modal: true, ... | [
0.2548651099205017,
-0.17926277220249176,
0.9470937252044678,
-0.09804912656545639,
0.29564979672431946,
0.09673044830560684,
0.27496516704559326,
-0.25342559814453125,
0.13263045251369476,
-0.9342221021652222,
-0.2676087021827698,
0.8429562449455261,
-0.5134703516960144,
-0.18277427554130... | |
location.href = 'somepage.html';
}
});
```
I have answered my own question. I just had to play with the height properties of dialog and some of the elements within the dialog. Good call me! | [
0.47309744358062744,
0.2677343487739563,
0.7962656021118164,
-0.27609530091285706,
0.20446529984474182,
-0.3458043932914734,
0.26559561491012573,
0.20363081991672516,
-0.03520587459206581,
-0.6514094471931458,
0.017032330855727196,
0.41456714272499084,
0.2811165750026703,
0.001988520147278... | |
I'm building a simple udp lan chat application in vb.net and I'm wondering how I should split my packets. Each sent packet should have like an id, a username and ip address from where it's coming and maybe also a command part for like join or leave to update my userlist and a text message. I'd like to know what is the ... | [
0.808883011341095,
-0.05077183619141579,
0.27506187558174133,
0.15420524775981903,
-0.44228246808052063,
-0.354999303817749,
0.07657702267169952,
0.37399527430534363,
-0.5370704531669617,
-0.8771365880966187,
-0.06757846474647522,
0.33922040462493896,
-0.18089154362678528,
0.32640007138252... | |
for your answer Jon but I already know all that. What I want to know is what would be the most easy and powerful way to format my packets so they include a username , an id, a command and a text message, then the user receiving it decrypt it to show only the message written by which user or if it's a command like join ... | [
0.524572491645813,
0.15536655485630035,
0.5144076943397522,
0.2620217502117157,
-0.20383478701114655,
-0.3092586398124695,
-0.03261967748403549,
-0.014295822940766811,
-0.17043626308441162,
-0.4782894551753998,
0.23369185626506805,
0.36520954966545105,
-0.12118706852197647,
0.0700737535953... | |
to xml to pull it apart. You could also use JSON for the format but that might be slightly harder to parse. | [
0.3744792640209198,
-0.08297087997198105,
0.008658388629555702,
0.3751573860645294,
-0.4030192494392395,
-0.27091798186302185,
-0.31611883640289307,
0.05491955205798149,
-0.2480560690164566,
-0.5934637784957886,
-0.26018524169921875,
0.34168487787246704,
-0.3207782208919525,
-0.01145079080... | |
I am trying to get cc-tray to work instead of using the web dashboard. I'm not sure how I can get the correct url for the server that my cruisecontrol is running on and I can't find any useful documentations online. Can anyone help?
Thanks
It depends a bit on the version you use. It is always a good idea to use the ve... | [
0.8372765183448792,
0.18092156946659088,
0.47976821660995483,
0.1438508927822113,
-0.16224980354309082,
-0.20352476835250854,
-0.1714324951171875,
0.4033610224723816,
-0.5334315896034241,
-0.5440863966941833,
0.6736817955970764,
0.6404567956924438,
-0.013918130658566952,
0.2513771057128906... | |
Remoting connection that requires some ports open in your connection to CCNet. Nowadays, you can connect over HTTP. | [
0.33491450548171997,
-0.3869714140892029,
0.6867761611938477,
0.27456384897232056,
-0.3544415533542633,
-0.36239093542099,
0.15831169486045837,
-0.05433763936161995,
-0.7589708566665649,
-0.5836665630340576,
-0.07948646694421768,
0.5006847381591797,
-0.2968681752681732,
0.4235158860683441,... | |
I have some working reports that must be deployed on SSRS.
One more customization that I want to be added is to automatically select the FromDate as today - 1 month, and ToDate as today.
Specifically, I want to replace the fragment bellow with a piece that accomplish the requirements above:
```
<ReportParameter Nam... | [
0.2033361792564392,
-0.0939267948269844,
0.6492199897766113,
-0.03399774804711342,
-0.3891283869743347,
-0.09236619621515274,
0.14766111969947815,
-0.48750704526901245,
-0.020111365243792534,
-0.633276641368866,
0.24849924445152283,
0.05781064182519913,
0.22241774201393127,
0.3368957638740... | |
</DataSetReference>
</ValidValues>
</ReportParameter>
<ReportParameter Name="ToDate">
<DataType>String</DataType>
<Prompt>To Date</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>ToDate</DataSetName>
<ValueField>ParameterValue</ValueField>
<LabelField>ParameterCaption</LabelField>
... | [
-0.039250344038009644,
0.001812698319554329,
1.012951374053955,
-0.08133981376886368,
-0.04049595817923546,
0.07881997525691986,
0.053292401134967804,
-0.5106450319290161,
-0.019635967910289764,
-0.6711368560791016,
-0.11830464750528336,
0.36063069105148315,
0.14801128208637238,
0.21446758... | |
<Value>=DateAdd("m", -1, Now)</Value>
</Values>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>FromDate</Prompt>
</ReportParameter>
<ReportParameter Name="ToDate">
<DataType>DateTime</DataType>
<DefaultValue>
<Values>
<Value>=Now</Value>... | [
-0.23902486264705658,
-0.4263305962085724,
0.9188382625579834,
0.03620052710175514,
0.03720387816429138,
0.06799006462097168,
0.34131476283073425,
-0.4566899538040161,
0.05211016908288002,
-0.8883181810379028,
-0.13888511061668396,
0.11469811201095581,
0.013618096709251404,
0.2492122650146... | |
<AllowBlank>true</AllowBlank>
<Prompt>ToDate</Prompt>
</ReportParameter>
</ReportParameters>
```
***[UPDATE]***
It looks like I have forgotten to paste `<ReportParameters>` correctly for *ToDate*; it's updated.
Above RDL was generated by configuring *Report Parameter*.
This is how I have configured dat... | [
-0.08877573162317276,
0.007339430507272482,
0.8789095878601074,
-0.16040949523448944,
-0.11920803040266037,
-0.23336343467235565,
0.6658040881156921,
-0.4388650953769684,
0.000860343046952039,
-0.865103006362915,
-0.08085252344608307,
0.5808646082878113,
-0.27019432187080383,
0.10233008861... | |
Can somebody explain me why is this not working?
I'm executing
```
XmlNode xmlNode = xmlDocument.SelectSingleNode("//(artist|author)");
```
and I get
```
System.Xml.XPath.XPathException: Expression must evaluate to a node-set.
```
but this works and does not raise the exception even when there are many artist no... | [
0.06072494015097618,
-0.06535299867391586,
0.434662789106369,
0.1263199746608734,
-0.05562682822346687,
-0.10128451138734818,
0.21333624422550201,
-0.35655584931373596,
-0.12335456907749176,
-0.6989661455154419,
-0.06134699285030365,
0.49473369121551514,
-0.34723910689353943,
-0.1736989766... | |
expression. The expression returns the
> set of nodes selected by the path.
>
>
> The | operator computes the union of
> its operands, which must be node-sets.
That means whatever you write left and right of "|" needs to be usable as an xpath query on its own, the "|" then just creates the union from it.
Specific... | [
-0.13970336318016052,
-0.1587737500667572,
0.5067622065544128,
0.11996635794639587,
-0.03584063798189163,
-0.03050321340560913,
0.12750433385372162,
-0.18319766223430634,
0.10668742656707764,
-0.7217861413955688,
-0.4123115837574005,
0.7227997183799744,
-0.46788129210472107,
-0.36440533399... | |
I'm trying to generate a tree structure from a table in a database. The table is stored flat, with each record either having a parent\_id or 0. The ultimate goal is to have a select box generated, and an array of nodes.
The code I have so far is :
```
function init($table, $parent_id = 0)
{
$sql = "SELECT id, {... | [
0.0541367307305336,
0.09982078522443771,
0.3676554262638092,
-0.18467594683170319,
0.16766323149204254,
0.16993731260299683,
0.06054442748427391,
-0.2957329750061035,
0.08286037296056747,
-0.6536016464233398,
-0.1686842441558838,
0.24151945114135742,
-0.3002592623233795,
0.2931773066520691... | |
while($row = mysql_fetch_object($query))
{
/* Get node */
$this->nodes[$row->parent_category_id][$row->id] = $row;
/* Get select item */
$text = "";
if($row->parent_category_id != 0) {
$text .= " ";
} | [
-0.4354536235332489,
-0.34715893864631653,
0.617538332939148,
0.039262689650058746,
0.10094858705997467,
0.2883736193180084,
0.05542449280619621,
-0.15544898808002472,
-0.2793082594871521,
-0.32912173867225647,
-0.5337667465209961,
0.35502439737319946,
-0.3153879940509796,
0.20841142535209... | |
$text .= "$row->name";
$this->select[$row->id] = $text;
echo "$depth $text\n";
$sql = "SELECT id, parent_category_id, name FROM product_categories WHERE parent_category_id=".$row->id." ORDER BY display_order";
$nextQuery = mysql_query($sql);
$rows = mysql_num_rows($nextQuery);... | [
-0.09511098265647888,
-0.024314910173416138,
0.47633862495422363,
-0.269595205783844,
0.10828538239002228,
0.1569252908229828,
0.13025690615177155,
-0.37341025471687317,
-0.24225690960884094,
-0.25753676891326904,
-0.5579514503479004,
0.35916823148727417,
-0.29828765988349915,
0.1861424744... | |
}
}
```
It's almost working, but not quite. Can anybody help me finish it off?
I think it's this line here:
```
if($row->parent_category_id != 0) {
$text .= " ";
}
```
should be:
```
while ($depth-- > 0) {
$text .= " ";
}
```
You are only indenting it once, not the number of times it should be ind... | [
-0.22619694471359253,
0.09774775058031082,
0.6308850646018982,
-0.25309956073760986,
0.09526427090167999,
-0.03010522574186325,
0.20626306533813477,
-0.09941975027322769,
-0.34906235337257385,
-0.5224460959434509,
-0.26196959614753723,
0.5031455159187317,
-0.07349072396755219,
-0.208955168... | |
at once, and then process it at once, because in general you want to minimize round-trips to the database (there are a few use cases where the way you are doing it is more optimal, such as if you have a very large tree, and are selecting a small portion of it, but I doubt that is the case here) | [
0.09838761389255524,
-0.03224189206957817,
-0.262052983045578,
0.3391275703907013,
0.16930674016475677,
-0.01461434829980135,
0.0584777370095253,
-0.32023605704307556,
-0.37504565715789795,
-0.5079854726791382,
-0.032050181180238724,
0.044816792011260986,
-0.2057783305644989,
0.03545575588... | |
OK, I've got a long list (about 43,800 lines) of entries and I want to select a subset of this list. The list is in a database and the program that reads the database can use one or more regular expressions.
Is it better to use multiple (possibly up to 100 or so) regular expressions in one call to the database progra... | [
0.5546985268592834,
0.165591299533844,
0.04430195689201355,
0.09762290120124817,
0.08880013227462769,
0.37311092019081116,
0.23897013068199158,
-0.09467246383428574,
-0.2426905781030655,
-0.5192880630493164,
0.14496906101703644,
0.2952192425727844,
-0.19216835498809814,
-0.0867961272597312... | |
some simple if statements to filter out the data I'm not interested in?
I've read or heard that it's best to avoid overusing regular expressions as they are computationally expensive?
*Discl: I'm simplifying what really happens.*
The first serves to purge what the extraction operator (>>) hasn't consumed.
The second ... | [
0.19873031973838806,
-0.09185945987701416,
0.2080048769712448,
-0.17709411680698395,
0.04892813414335251,
-0.13398241996765137,
0.45706042647361755,
-0.13436511158943176,
-0.025206590071320534,
-0.43457937240600586,
-0.3671499192714691,
0.8174614906311035,
-0.5510309934616089,
-0.201085910... | |
Ok im trying to get a MVC example page working and basically query where a certain id is specified but i'm fairly new to it all and after an hour of trying to figure this out im hoping of you can help me!!
code below is a method from my taskController.cs that is called via /tasks/complete/2
```
//mark task as complet... | [
0.16262997686862946,
-0.19526082277297974,
0.3391825556755066,
-0.2012501209974289,
-0.17369191348552704,
-0.017847221344709396,
0.5697474479675293,
-0.4049399197101593,
-0.3864031732082367,
-0.7693969011306763,
-0.17165528237819672,
0.4605742394924164,
-0.12809355556964874,
0.038699138909... | |
tasks)
{
myTask.isComplete = true;
}
db.SubmitChanges();
return RedirectToAction("Index");
}
```
While the terms might sound similar, it's important to remember that LINQ is not SQL. Try using double equals for comparison:
```
IEnumerable<task> tasks = from t in db.ta... | [
0.061538491398096085,
-0.13700012862682343,
0.6070684194564819,
-0.07760942727327347,
-0.06776059418916702,
-0.03629118949174881,
0.3799479305744171,
-0.572909951210022,
-0.052481409162282944,
-0.6586728692054749,
-0.14381088316440582,
0.6596269607543945,
-0.1071963757276535,
0.02441286668... | |
I have an ActiveRecord array containing a list of shops.
```
shops = Shop.find(:all)
```
I want to delete a record from shops without deleteting it from the database.
`shops.delete(a_shop)` would result in a delete SQL query. I just want the shop to be deleted from the ActiveRecord array but not the database.
Can ... | [
0.5140334963798523,
0.1268155574798584,
0.49325206875801086,
-0.03642798960208893,
-0.3181643486022949,
0.11243956536054611,
0.4649274945259094,
-0.39205023646354675,
-0.15514014661312103,
-0.8184928894042969,
-0.2801964581012726,
0.551931619644165,
-0.4583025872707367,
0.464123010635376,
... | |
like so:
```
theshops = city.shops.compact
theshops.delete(ss[0])
```
**Will not** delete from the DB
Also, in all cases delete\_if **Will not** delete from the db:
```
city.shops.delete_if {|s| s.id == city.shops[0]}
```
Cheers!
Don't forget: If you are in doubt about these sort of things script/console is you... | [
-0.024850083515048027,
0.0982191190123558,
0.7747195959091187,
0.0369173139333725,
0.1240677535533905,
-0.25548332929611206,
0.34725189208984375,
-0.2289949208498001,
-0.17862817645072937,
-0.8703804612159729,
-0.4514085054397583,
0.9874299764633179,
-0.17918278276920319,
0.003911104984581... | |
I am accepting a POST request like so:
```
Socket connection = m_connection;
Byte[] receive = new Byte[1024];
int received = connection.Receive(receive);
Console.WriteLine(received.ToString());
string request = Encoding.ASCII.GetString(receive);
Console.WriteLine(request);
```
The post values end up being weird, i... | [
0.19015346467494965,
0.22590424120426178,
0.543600857257843,
0.049219343811273575,
-0.3898351192474365,
0.06995580345392227,
0.32586851716041565,
-0.12418452650308609,
0.060740575194358826,
-0.6690824627876282,
-0.17369012534618378,
-0.09959352016448975,
-0.3523143529891968,
0.566704154014... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.