text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
= "/${mount_point}/${sub_dir}/input"; my $output_directory = "/${mount_point}/${sub_dir}/output"; my $log_directory = "/${mount_point}/${sub_dir}/log"; my $database_directory = "/db/${database_name}"; my $database_scripts = "${database_directory}/scripts"; #####################################################...
[ 0.5441773533821106, -0.023676704615354538, 0.08097133785486221, 0.1578517109155655, -0.02916719764471054, -0.16177862882614136, 0.3178819417953491, -0.4080115854740143, -0.017742253839969635, -0.5927979946136475, -0.18515880405902863, 0.7152788043022156, -0.3758118748664856, -0.25588053464...
this: ``` GetOptions( 'input_directory=s' => \$input_directory, 'output_directory=s' => \$output_directory, 'database_directory=s' => \$database_directory, 'log_directory=s' => \$log_directory, 'database_scripts=s' => \$database_scripts, 'input_file=s' => \$input...
[ -0.07881683111190796, 0.20245815813541412, 0.20147882401943207, -0.1043657660484314, -0.17075760662555695, 0.7172449231147766, 0.23093879222869873, -0.1948504000902176, -0.2591938376426697, -0.3815523684024811, -0.5035194754600525, 0.6162729859352112, -0.35851916670799255, -0.3177512288093...
first snippit are required, the last 7 directly above are optional. I think an ideal situation would be to setup the defaults as in my first code snippit, and then somehow override any of them that have been set if arguments were passed at the command line. I thought about storing all my options in a hash and then usin...
[ 0.13998419046401978, -0.5545268654823303, 0.32762792706489563, 0.07836896181106567, 0.02417938783764839, 0.15583014488220215, 0.23020915687084198, -0.11879947036504745, -0.2388000339269638, -0.4538732171058655, -0.2926645576953888, 0.880575954914093, -0.3950447738170624, -0.370516896247863...
the script? Not sure if that makes any sense. Thanks! Here's another approach. It uses arrays of names and a hash to store the options. It makes all options truly optional, but validates the required ones unless you include "--debug" on the command line. Regardless of whether you use "--debug", you can override any o...
[ 0.19442963600158691, -0.15041878819465637, -0.09036397933959961, 0.1365162432193756, -0.037264633923769, -0.07758700847625732, 0.1906587928533554, 0.28173351287841797, -0.10051770508289337, -0.41166403889656067, -0.046852536499500275, 0.9444072246551514, -0.17765527963638306, -0.1604335457...
that by keeping sets of option names in arrays, you can include logic checks against the groups with relatively little code. ``` use Getopt::Long; my @required_opts = qw( mount_point sub_dir database_name database_schema ); my @internal_opts = qw( input_directory output_directory log_dire...
[ 0.22910641133785248, -0.3739060163497925, 0.3584774136543274, -0.15758121013641357, 0.3376447856426239, 0.28556373715400696, 0.03475124016404152, -0.35011979937553406, -0.21470187604427338, -0.6029373407363892, -0.6244221329689026, 0.7772675156593323, -0.2720608711242676, -0.37465184926986...
! exists $opts{$_} } @required_options; if ( @errors && ! $opts{debug} ) { die "$0: missing required option(s): @errors\n"; } ################################################################################ # Directory variables ############################################################################### my $op...
[ -0.05290433391928673, 0.3661962151527405, 0.5366145968437195, 0.023817289620637894, 0.14847338199615479, 0.17640815675258636, 0.5614938139915466, -0.4100548326969147, -0.3073682487010956, -0.5241879224777222, -0.45918989181518555, 0.7054532170295715, -0.49695807695388794, 0.071996860206127...
Assuming following definition: ``` /// <summary> /// Replaces each occurrence of sPattern in sInput with sReplace. This is done /// with the CLR: /// new RegEx(sPattern, RegexOptions.Multiline).Replace(sInput, sReplace). /// The result of the replacement is the return value. /// </summary> [SqlFunction(IsDeterminis...
[ -0.031256090849637985, -0.03560775890946388, 0.5439176559448242, -0.18491508066654205, 0.004902759101241827, 0.12970028817653656, 0.21683882176876068, -0.39030128717422485, -0.14924195408821106, -0.29035982489585876, -0.08156359940767288, 0.6583688855171204, -0.23244790732860565, 0.1476197...
Replaces each occurrence of sPattern in sInput with sReplace. This is done /// with the CLR: /// new RegEx(sPattern, RegexOptions.Multiline).Replace(sInput, sReplace). /// The result of the replacement is the return value. /// </summary> [SqlFunction(IsDeterministic = true)] [return: SqlFacet(MaxSize = -1)] public s...
[ -0.038323745131492615, -0.02647002600133419, 0.49582964181900024, 0.0399523563683033, 0.05199715122580528, 0.15634438395500183, 0.14861883223056793, -0.471939355134964, -0.08306611329317093, -0.2902807593345642, 0.057812776416540146, 0.8384960889816284, -0.19176042079925537, 0.119760125875...
well as the method itself (quite obvious), but *also* to the return value with the `[return: AttributeName(Parameter=Value, ...)]` Syntax.
[ -0.11075062304735184, -0.1507117748260498, 0.09855981916189194, 0.04161405190825462, -0.02661934867501259, -0.3242230713367462, 0.1341836303472519, -0.13330776989459991, 0.09975920617580414, -0.06555679440498352, -0.14870554208755493, 0.6922010183334351, 0.04142134636640549, -0.06109660491...
Example: an Order object (aggregate root) has a collection of OrderLine objects (child entities). What's the URL add an OrderLine to an Order? Take into consideration the difference between using the aggregate roots' controller and having a separate controller for the child entity. 1: [http://example.com/orders/add-or...
[ -0.03265693411231041, 0.08826810121536255, 0.45918506383895874, -0.1465875804424286, -0.14809109270572662, 0.46799933910369873, 0.15013621747493744, -0.39848268032073975, -0.3143538534641266, -0.3162871301174164, -0.08878939598798752, 0.2539113759994507, -0.30452200770378113, 0.13966400921...
string sPattern, string sReplace) { return new Regex(sPattern, RegexOptions.Multiline).Replace(sInput, sReplace); } ``` The idea is to hint to SQL Server that the input and return values are not the default `nvarchar(4000)`, but have a different size. I learned a new trick regarding attributes: They can be added...
[ 0.03520848602056503, -0.12088759243488312, 0.4682978093624115, -0.03696941211819649, 0.01011971477419138, 0.18668293952941895, 0.20195123553276062, -0.49433913826942444, 0.00997354555875063, -0.26472166180610657, 0.029452258720993996, 0.8269680142402649, -0.20045554637908936, 0.03660007193...
I have a div with two nested divs inside, the (float:left) one is the menu bar, and the right (float:right) should display whatever content the page has, it works fine when the window is at a maximum, but when i resize it the content is collapsed until it can no longer has any space, at which it is forced to be display...
[ 0.2635546624660492, 0.04401887580752373, 0.5966632962226868, -0.1555904597043991, -0.2886931002140045, 0.1987079232931137, 0.08316881954669952, -0.14559273421764374, 0.0727190300822258, -0.7894704937934875, 0.08687499910593033, 0.36836695671081543, -0.1710183173418045, 0.28451791405677795,...
style="width:100%"> <div style="float:left; background:#f5f5f5; border-right:1px solid black; height:170%; width:120px;"></div> <div style="margin-right:2px;margin-top:15px; margin-bottom:5px; width:100%; border:1px solid #f5f5f5"></div> </div> ``` I only need to have this working on Interner Explorer for...
[ -0.2672966420650482, -0.14148497581481934, 0.8587651252746582, 0.12019810080528259, -0.08213163167238235, -0.02705496922135353, 0.23483197391033173, -0.41053465008735657, -0.16366572678089142, -0.8029090166091919, -0.10190679132938385, 0.4203689396381378, 0.1321181207895279, 0.038507182151...
I am looking for a way to localize properties names displayed in a PropertyGrid. The property's name may be "overriden" using the DisplayNameAttribute attribute. Unfortunately attributes can not have non constant expressions. So I can not use strongly typed resources such as: ``` class Foo { [DisplayAttribute(Reso...
[ -0.045650601387023926, 0.21991227567195892, 0.40031304955482483, -0.004702127538621426, 0.1535210758447647, -0.21034292876720428, 0.20972023904323578, -0.17589175701141357, 0.007323884405195713, -0.586886465549469, -0.03614469990134239, 0.7015340924263, -0.1626117080450058, 0.5109165310859...
lose strongly typed resource benefits which is definitely not a good thing. Then I came across [DisplayNameResourceAttribute](http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.modeling.design.displaynameresourceattribute.aspx) which may be what I'm looking for. But it's supposed to be in Microsoft.VisualSt...
[ -0.0007443916401825845, 0.08711657673120499, 0.4171571433544159, 0.15928496420383453, -0.30584830045700073, -0.0017622802406549454, -0.13548168540000916, -0.02885504439473152, -0.06640850752592087, -0.6674852967262268, 0.1714949905872345, 0.390817254781723, -0.07120423763990402, 0.32953646...
AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event)] public class DisplayNameLocalizedAttribute : DisplayNameAttribute { public DisplayNameLocalizedAttribute(Type resourceManagerProvider, string resourceKey) : base(Utils.LookupResource(resourceManagerProvider, resourceKey)...
[ -0.3364889323711395, -0.05390394851565361, 0.47240135073661804, -0.09412531554698944, 0.10470986366271973, 0.05580718070268631, 0.12824811041355133, -0.40156611800193787, -0.1394689828157425, -0.6473909616470337, -0.3708866238594055, 0.4921133518218994, -0.08078056573867798, 0.306185603141...
{ System.Resources.ResourceManager resourceManager = (System.Resources.ResourceManager)staticProperty.GetValue(null, null); return resourceManager.GetString(resourceKey); } } return resourceKey; // Fallback with the key name } ``` Typical usage would be: ``` class Foo { ...
[ 0.16807818412780762, -0.1302327662706375, 0.2666475176811218, -0.08879922330379486, 0.2663179636001587, 0.07099811732769012, 0.1013738214969635, -0.13175979256629944, -0.3542878329753876, -0.7161185145378113, -0.07910557091236115, 0.5950079560279846, -0.047671783715486526, 0.53966659307479...
get; set; } } ``` What is pretty much ugly as I use literal strings for resource key. Using a constant there would mean to modify Resources.Designer.cs which is probably not a good idea. Conclusion: I am not happy with that, but I am even less happy about Microsoft who can't provide anything useful f...
[ 0.23594291508197784, 0.08547630161046982, 0.0835363045334816, 0.03187433257699013, -0.1468687355518341, -0.20888373255729675, 0.39736196398735046, 0.25969138741493225, 0.10115120559930801, -0.7760559916496277, 0.07755772024393082, 0.5949200987815857, -0.15150612592697144, 0.489707976579666...
Have you used the Application Recovery APIs with vista? <http://msdn.microsoft.com/en-us/library/aa373347(VS.85).aspx> Do you find them to be reliable and easy to work with? I am reading through some of the docs and it seems rolling my own might be a better way to go because I can make my solution compatible with ...
[ 0.38237839937210083, 0.25457242131233215, 0.19564589858055115, 0.24433746933937073, -0.018678518012166023, -0.045911047607660294, 0.16849549114704132, -0.05699094384908676, -0.523563027381897, -0.41026806831359863, 0.18759958446025848, 1.0125179290771484, 0.15340204536914825, -0.1608501076...
health of my application, is this the only way? It would be helpful if you describe why you need to monitor it. Is it running unattended without a GUI? Then you might create a Windows Service instead. There are restart options for Services already in XP. Is it a GUI app, that provides some background services even i...
[ 0.3098541796207428, -0.0625545009970665, 0.3345896899700165, 0.289899080991745, 0.22231841087341309, -0.11198145151138306, 0.352196604013443, 0.12332344055175781, -0.11439252644777298, -0.5369705557823181, 0.18760211765766144, 0.9166218042373657, -0.009534047916531563, -0.1098170205950737,...
it? You could write a small "wrapper" application that simply launches your real application and waits for it to exit. When it exits, examine e.g. the exit code to decide whether it crashed or exited regularly. To monitor application hangs, have your real application "Ping" the wrapper in regular intervals (using a ...
[ 0.5447201728820801, -0.3172892928123474, 0.3852401077747345, 0.4278400242328644, 0.18001540005207062, -0.11059092730283737, 0.13197888433933258, 0.0036523877643048763, -0.31594711542129517, -0.24695010483264923, -0.10725025087594986, 0.4433591663837433, -0.33739838004112244, 0.048079829663...
the wrapper in reverse.
[ -0.16983608901500702, 0.06743660569190979, 0.08937768638134003, 0.16974157094955444, -0.2457212656736374, 0.0402987003326416, 0.034378115087747574, 0.21165689826011658, 0.0055874367244541645, -0.2010558843612671, 0.17031654715538025, 0.1310742348432541, 0.02838744781911373, 0.1991141885519...
I need a Java library to convert PDFs to TIFF images. The PDFs are faxes, and I will be converting to TIFF so that I can then do barcode recognition on the image. Can anyone recommend a good free open source library for conversion from PDF to TIFF? Disclaimer: I work for Atalasoft [We have an SDK that can convert PDF ...
[ 0.3681503236293793, -0.08390042185783386, 0.5581706166267395, -0.05324737727642059, -0.08363047242164612, 0.20304997265338898, 0.19629843533039093, -0.012713930569589138, 0.2502099275588989, -0.9362577795982361, 0.07841275632381439, 0.6560618281364441, -0.04075925052165985, 0.0410784184932...
I'm researching this for a project and I'm wondering what other people are doing to prevent stale CSS and JavaScript files from being served with each new release. I don't want to append a timestamp or something similar which may prevent caching on every request. I'm working with the Spring 2.5 MVC framework and I'm ...
[ 0.3553772270679474, 0.15141241252422333, 0.5889409780502319, -0.07321897894144058, -0.1905849575996399, -0.18999843299388885, 0.2651563286781311, -0.11318812519311905, -0.09929972887039185, -0.9466436505317688, -0.13728195428848267, 0.5526002645492554, -0.14294534921646118, 0.1286257356405...
each build (read from file, which the build updates). This makes sure the scripts are cached only for the current revision.
[ 0.3421563506126404, 0.2129920870065689, 0.4327840507030487, 0.009613136760890484, 0.17456093430519104, 0.03204850107431412, 0.485029399394989, -0.18068629503250122, -0.011761602945625782, -0.7312176823616028, -0.34220415353775024, 0.45491835474967957, 0.12893661856651306, -0.06168008595705...
What's the best way to authenticate and track user authentication state from page to page? Some say session state, some say cookies? Could I just use a session variable that has the ID of the user and upon authentication, instatiate a custom User class that has the User's information. Then, on every page, verify the ...
[ 0.3226115107536316, 0.0508558489382267, 0.43611636757850647, 0.3120137155056, 0.022975550964474678, 0.0266187135130167, 0.4872506558895111, -0.16021056473255157, -0.1824885457754135, -0.6282626986503601, 0.24436509609222412, 0.5982210636138916, 0.03933611512184143, -0.10193923860788345, ...
the session you'll take flak because sessions can be hijacked. Personally, I tend to think a session is a little more reliable because the only thing stored on the client is a session key. The actual data remains on the server. It plays the cards a little closer to the chest, if you will. However, that's just my pref...
[ 0.5480403900146484, 0.05467516928911209, 0.2431308776140213, 0.3508612811565399, 0.05505633354187012, -0.3124227821826935, 0.45244112610816956, 0.07421094179153442, -0.2951103150844574, -0.31377264857292175, 0.06439293920993805, 0.8141369819641113, 0.042177360504865646, -0.2583315074443817...
sure you have adequate security precautions protecting the authentication token.
[ 0.38394272327423096, 0.3295303285121918, -0.24671092629432678, -0.11483068019151688, 0.40648946166038513, -0.39647769927978516, 0.16099321842193604, 0.33526113629341125, -0.188566192984581, -0.34032580256462097, 0.053072407841682434, 0.28460824489593506, 0.19451536238193512, -0.45020946860...
I'm importing some data from another test/bug tracking tool into tfs, and I would like to convert it's description, which is in simple HTML, so a plain string, where the 'layout' of the HTML is preserved. For example: ``` <body> <ol> <li>Log on with user Acme &amp; Co.</li> <li>Navigate to the details tab</...
[ 0.13735665380954742, -0.007725545670837164, 0.5568839311599731, -0.10195914655923843, 0.05069626122713089, 0.05081157758831978, -0.0019595827907323837, -0.27805474400520325, -0.05265936627984047, -0.8168250322341919, -0.31675148010253906, 0.2958604097366333, -0.43947649002075195, -0.098844...
and HTML-entities translated like: ``` 1. Log on with user Acme & Co. 2. Navigate to the details tab 3. Check the official name Expected Result: official name is filled in Actual Result: The &-sign is not shown correctly See attachment ``` I can currently replace some tags with newlines using a regex and strip th...
[ 0.3161108195781708, 0.14937303960323334, 0.7633020281791687, 0.06094132363796234, -0.11928030848503113, -0.18316295742988586, 0.2182636260986328, -0.015488475561141968, -0.24294161796569824, -0.7028663158416748, -0.2372571974992752, 0.3365545868873596, -0.40798220038414, 0.0852648690342903...
and just copied the contents into that field. This solution was so much better, because we could now see the intended formatting of the field.
[ 0.38984233140945435, 0.176233172416687, -0.011657566763460636, 0.3184455931186676, 0.015797756612300873, -0.1880635768175125, -0.06414276361465454, 0.07973239570856094, -0.11548005789518356, -0.3136524558067322, -0.007932856678962708, 0.30108755826950073, 0.09407911449670792, -0.1186372786...
Anyone know of some tutorial material for how to use Interface Builder for iPhone development? I can find sample projects and stuff and that's extremely helpful, but they do not reveal how things where setup in Interface Builder. The Pragmatic Programmers book [iPhone SDK Development](http://pragprog.com/titles/amiphd/...
[ 0.18398252129554749, 0.09891273826360703, -0.3629680871963501, 0.19263216853141785, -0.11032981425523758, -0.24264879524707794, 0.4264456033706665, -0.010933716781437397, -0.0867578312754631, -0.2934761047363281, 0.044364988803863525, 0.7753766775131226, 0.17654234170913696, -0.27865421772...
I have a dynamic query that returns around 590,000 records. It runs successfully the first time, but if I run it again, I keep getting a `System.OutOfMemoryException`. What are some reasons this could be happening? The error is happening here: ``` public static DataSet GetDataSet(string databaseName,string ...
[ 0.0513811893761158, -0.04580346494913101, 0.28824836015701294, 0.3462531864643097, 0.0948256254196167, 0.010286258533596992, 0.3286999762058258, -0.12538854777812958, -0.6398926377296448, -0.46983250975608826, 0.018570030108094215, 0.4652351140975952, -0.4478234052658081, 0.528816580772399...
DataSet ds = null; try { //Creates database Database db = DatabaseFactory.CreateDatabase(databaseName); //Creates command to execute DbCommand dbCommand = db.GetStoredProcCommand(storedProcedureName); dbCommand.CommandTimeout = COMMAND_TIMEOUT...
[ -0.09694846719503403, -0.20025694370269775, 0.23426969349384308, -0.039171356707811356, 0.015662815421819687, 0.18034392595291138, 0.5085219740867615, -0.4086860418319702, 0.030117180198431015, -0.5401661396026611, -0.42613109946250916, 0.2851572632789612, -0.44345131516456604, 0.417591571...
//Returns the list of SQL parameters associated with that stored proecdure db.DiscoverParameters(dbCommand); int i = 1; //Loop through the list of parameters and set the values foreach (object parameter in parameters) {
[ -0.016068877652287483, -0.02717221900820732, 0.3430924117565155, -0.1573471873998642, 0.17092470824718475, 0.18580569326877594, 0.41316163539886475, -0.2708236575126648, 0.4177863299846649, -0.5849090218544006, 0.049685265868902206, 0.4425899386405945, -0.30727317929267883, 0.1401804834604...
dbCommand.Parameters[i++].Value = parameter; } //Retrieve dataset and set to ds ds = db.ExecuteDataSet(dbCommand); } //Check for exceptions catch (SqlException sqle) {
[ -0.03998516872525215, -0.3709595203399658, 0.26665374636650085, -0.15512394905090332, -0.23487204313278198, 0.08316586911678314, 0.31789442896842957, -0.6814026832580566, 0.035280752927064896, -0.2967061698436737, -0.20867137610912323, 0.11731035262346268, -0.5847319960594177, 0.2648745775...
throw sqle; } catch (Exception e) { throw e; // Error is thrown here. } //Returns dataset return ds; } ``` Here is the code the runs on the button click: ``` protected void btnSearchSBIDatabase_Click(object sender, EventArgs e) {
[ 0.008719498291611671, -0.05720830336213112, 0.07198454439640045, -0.2058289498090744, -0.15142619609832764, -0.2778843939304352, 0.35155734419822693, -0.16731205582618713, 0.014931885525584221, -0.37043386697769165, -0.19984844326972961, 0.4081697165966034, -0.26319652795791626, 0.28700542...
LicenseSearch ls = new LicenseSearch(); DataTable dtSearchResults = new DataTable(); dtSearchResults = ls.Search(); Session["dtSearchResults"] = dtSearchResults; Response.Redirect("~/FCCSearch/SearchResults.aspx"); } else lblResults.Visible = true; } ...
[ 0.07301200926303864, -0.18521611392498016, 0.7409055233001709, -0.11383484303951263, 0.2170422226190567, -0.3053496181964874, 0.57586669921875, -0.57962566614151, -0.1446724683046341, -0.5867900252342224, -0.3510785400867462, 0.9469925761222839, -0.3495534062385559, 0.22578361630439758, ...
What > are some reasons this could be > happening? Regardless of what the others have said, the error has nothing to do with forgetting to dispose your DBCommand or DBConnection, and you will not fix your error by disposing of either of them. The error has everything to do with your dataset which contains nearly 60...
[ 0.22967420518398285, 0.3628820776939392, 0.23499874770641327, 0.23819388449192047, 0.04821084067225456, -0.05893048271536827, 0.6148132681846619, -0.10721459239721298, -0.25821545720100403, -0.6242339611053467, 0.03844542056322098, 0.4389055669307709, -0.3064458966255188, 0.616549849510192...
this problem in a few ways: * Consider returning fewer records. I personally can't imagine a time when returning 600K records has ever been useful to a user. To minimize the records returned, try: + Limiting your query to the first 1000 records. If there are more than 1000 results returned from the query, inform the...
[ 0.14145255088806152, -0.03994471952319145, -0.0719757229089737, 0.6181739568710327, -0.13709774613380432, 0.07053636014461517, 0.4129399359226227, 0.19722190499305725, -0.6576768755912781, -0.6202288866043091, 0.04782068356871605, 0.2832784354686737, -0.34189707040786743, 0.361329942941665...
Google probably doesn't hold all 22 bajillion results in memory at once, it probably finds its more memory efficient to requery its database to generate a new page. * If you just need to iterate through the data and you don't need random access, try returning a datareader instead. A datareader only loads one record int...
[ 0.14310750365257263, -0.07312959432601929, 0.2885340750217438, 0.4884445071220398, -0.3061334490776062, 0.11242325603961945, 0.3081680238246918, 0.25922179222106934, -0.3131926357746124, -0.64110267162323, -0.014426516368985176, 0.3103913962841034, -0.4656975269317627, 0.27336230874061584,...
a refenence of your dataset will prevent it from being reclaimed by memory. * If you can't null all the references to your dataset, clear all of the rows from the dataset and any objects bound to those rows instead. This removes references to the datarows and allows them to be eaten by the garbage collector. I don't b...
[ 0.3585914671421051, -0.05022403597831726, 0.057197026908397675, 0.0771387591958046, -0.16867630183696747, -0.14030000567436218, 0.533661961555481, 0.012600082904100418, -0.3336338996887207, -0.8470394611358643, -0.08201911300420761, 0.7587366700172424, -0.39408963918685913, 0.4456610977649...
any memory, nor does it invoke the garbage collector, nor does it remove a reference to your dataset. Dispose is used to clean up unmanaged resources, but the DataSet does not have any unmanaged resources. It only implements IDispoable because it inherents from MarshalByValueComponent, so the Dispose method on the data...
[ 0.2078056037425995, 0.07046806067228317, -0.11221642047166824, 0.3671979308128357, 0.11183209717273712, -0.4975891411304474, 0.2588095963001251, -0.17407116293907166, -0.2171575427055359, -0.580497682094574, 0.05719367042183876, 0.4164528548717499, -0.13972170650959015, 0.22904178500175476...
I have a query which is meant to show me any rows in table A which have not been updated recently enough. (Each row should be updated within 2 months after "month\_no".): ``` SELECT A.identifier , A.name , TO_NUMBER(DECODE( A.month_no , 1, 200803 , 2, 200804 , 3, 2008...
[ -0.23888246715068817, 0.42243677377700806, 0.5804041028022766, -0.25583791732788086, 0.09829588234424591, 0.1939782351255417, 0.1126502975821495, -0.028852134943008423, -0.2700808644294739, -0.5699871182441711, -0.021139157935976982, 0.1490495651960373, -0.21872280538082123, 0.244460463523...
, 4, 200806 , 5, 200807 , 6, 200808 , 7, 200809 , 8, 200810 , 9, 200811
[ -0.2514953911304474, 0.28080761432647705, 0.07638499140739441, 0.2779932916164398, -0.29469338059425354, 0.7448723912239075, 0.23225857317447662, 0.024290170520544052, -0.4624638557434082, -0.3280928134918213, -0.33620381355285645, 0.4145522117614746, 0.09782276302576065, 0.281772077083587...
, 10, 200812 , 11, 200701 , 12, 200702 , NULL)) as MONTH_NO , TO_NUMBER(TO_CHAR(B.last_update_date, 'YYYYMM')) as UPD_DATE FROM table_a A , table_b B WHERE A.identifier = B.identifier AND MONTH_NO > UPD_DATE ``` The last line in the WHERE clause causes an "ORA-...
[ -0.09010980278253555, 0.14959770441055298, 0.5559734106063843, -0.2783176600933075, 0.014144804328680038, 0.4726383686065674, 0.07351581007242203, 0.12574748694896698, -0.44587084650993347, -0.12108629941940308, -0.25741782784461975, 0.08076498657464981, 0.08093707263469696, 0.504810035228...
want to repeat the entire DECODE function in my WHERE clause. Any thoughts? (Both fixes and workarounds accepted...) This is not possible directly, because chronologically, WHERE happens *before* SELECT, which always is the last step in the execution chain. You can do a sub-select and filter on it: ``` SELECT * FROM ...
[ 0.1524878591299057, -0.00883971806615591, 0.1790482997894287, -0.18613079190254211, 0.4069942831993103, 0.17013640701770782, 0.45635372400283813, 0.06760548055171967, -0.20030267536640167, -0.4481087028980255, -0.179300919175148, 0.19569693505764008, -0.20049378275871277, 0.162973761558532...
, 5, 200807 , 6, 200808 , 7, 200809 , 8, 200810 , 9, 200811 , 10, 200812 , 11, 200701 , 12, 200702 , NULL)) as MONTH_NO , TO_NUMBER(TO_CHAR(B.last_update_date, 'YYYYMM')) as UPD_DATE FROM table_a A , table_b B WHERE A.identifier =
[ -0.30918723344802856, -0.11442264914512634, 0.7069351077079773, -0.18619616329669952, -0.044348396360874176, 0.5918307304382324, -0.07114247977733612, 0.1731462925672531, -0.6347873210906982, -0.0401548407971859, -0.21617460250854492, -0.11303220689296722, 0.09537702053785324, 0.5535736083...
B.identifier ) AS inner_table WHERE MONTH_NO > UPD_DATE ``` Interesting bit of info moved up from the comments: > There should be no performance hit. > Oracle does not need to materialize > inner queries before applying outer > conditions -- Oracle will consider > transforming this query internally and > pus...
[ 0.3059048056602478, 0.37842246890068054, -0.06179926544427872, -0.01917504519224167, 0.08246801793575287, 0.034673918038606644, 0.4525719881057739, -0.41345229744911194, -0.2634301781654358, -0.2332693636417389, -0.13984568417072296, 0.35914522409439087, -0.3802039325237274, -0.05549807846...
I have a defunct process on my system: ``` abc 22093 19508 0 23:29 pts/4 00:00:00 grep ProcA abc 31756 1 0 Dec08 ? 00:00:00 [ProcA_my_collect] <defunct> ``` How can I kill the above process, without a reboot of the machine? I have tried with ``` kill -9 31756 sudo kill -9 31756 ``` You ha...
[ 0.3118450343608856, 0.16196808218955994, 0.24509672820568085, 0.1642751395702362, 0.07855910807847977, 0.19505666196346283, 0.27129384875297546, -0.28895679116249084, -0.5020026564598083, -0.3558744788169861, -0.06572826206684113, 0.3284677565097809, -0.3349599242210388, 0.4169150888919830...
to read its exit status). Dead processes that haven't been reaped are called "[zombie processes](http://en.wikipedia.org/wiki/Zombie_process)." The parent process id you see for 31756 is process id 1, which always belongs to `init`. That process should reap its zombie processes periodically, but if it can't, they will...
[ 0.24582824110984802, -0.19605520367622375, 0.15935088694095612, 0.2036149799823761, 0.3481791615486145, 0.13838239014148712, -0.08070128411054611, 0.23211060464382172, -0.3929937779903412, -0.5962655544281006, -0.1353885531425476, -0.047188494354486465, 0.09234527498483658, 0.4592258930206...
I've used Emacs for years on Linux, and I have lots of personally useful keybindings I've put under `Hyper` and `Super`. Nowadays I'm using Emacs on Windows and am missing those extra keybindings. Is there some way in Windows to get modifier keys other than `Ctrl` and `Meta`? There are some settings mentioned in [this...
[ -0.4507956802845001, 0.18315987288951874, 0.8022568821907043, 0.12589989602565765, -0.004715855233371258, 0.40451714396476746, 0.3716452121734619, -0.0010209133615717292, -0.33027923107147217, -0.5450507402420044, -0.24435119330883026, 0.6830555200576782, -0.37338000535964966, 0.1726724803...
Right Windows key w32-apps-modifier 'hyper) ;; Menu key ``` Update: so, I actually *tried* the above code in my own Win32 emacs setup. Lo, it works! awkward demo follows: ``` (defun super-test () (interactive) (message "Super")) (defun hyper-test () (interactive) (message "Hyper")) (global-set-key [(...
[ -0.33450865745544434, 0.05799061432480812, 0.6844886541366577, 0.2517014443874359, 0.40795040130615234, -0.14866548776626587, 0.6779293417930603, -0.15063177049160004, -0.38454195857048035, -0.636380672454834, -0.2813469171524048, 1.0636709928512573, -0.08764475584030151, -0.23366597294807...
I have a function that looks something like this: ``` //iteration over scales foreach ($surveyScales as $scale) { $surveyItems = $scale->findDependentRowset('SurveyItems'); //nested iteration over items in scale foreach ($surveyItems as $item) { //retrieve a single value from a result table an...
[ -0.10864730179309845, 0.006339539773762226, 0.3587658107280731, -0.05652455985546112, -0.36885103583335876, 0.38789263367652893, 0.16380740702152252, -0.5730955004692078, -0.15747149288654327, -0.6618263125419617, 0.19529059529304504, 0.3272506892681122, -0.1553298681974411, -0.00241902773...
all result values into an array and get the value from there? One query that returns a dozen pieces of data is almost 12x faster than 12 queries that return 1 piece of data. Oh, and NEVER EVER NEVER put a SQL inside a loop, it will always lead in a disaster. Depending on how your app works, a new connection might be...
[ 0.2088192105293274, -0.24425122141838074, 0.30026471614837646, 0.5049957036972046, -0.26038163900375366, -0.09212522953748703, 0.6929535865783691, -0.2743159234523773, -0.4268716275691986, -0.5670649409294128, 0.2647985517978668, 0.3806003928184509, -0.18283620476722717, 0.3374927341938019...
250 queries at any given moment. But even if all the queries do share just 1 connection, you're taxing the DB server X times more, slowing it down for everything else, every page, because users are hogging the DB server on this page, and everybody has to share. I've seen an entire application fail in the past because ...
[ 0.33733636140823364, 0.29510563611984253, 0.22623351216316223, 0.4238525331020355, -0.19867393374443054, -0.09966161102056503, 0.6047233939170837, -0.08311273902654648, -0.3337818682193756, -0.6702278852462769, 0.24801279604434967, 0.4301741421222687, -0.5230850577354431, 0.359038889408111...
I have a small form inside a table. POSTing that form creates a new entity. I then want users to see that new entity, but it should open in a new window so that the original view isn't lost. (How) can I open the result of the form submission in a new window? ``` <form ... target="windowName"> ``` or ``` <form ... t...
[ 0.26719728112220764, 0.1994597315788269, 0.6139611601829529, -0.09577354043722153, 0.06456812471151352, -0.17012310028076172, 0.10942228138446808, -0.370199978351593, -0.04770447313785553, -0.8516015410423279, -0.16511479020118713, 0.2760445773601532, 0.03511525318026543, 0.215582281351089...
I'm looking for an implementation of IDictionary with better performance of the standard BCL one. I'm looking for something with constant lookup time that performs really well with large number of elements (>10K) and is more GC friendly. Ps: No, I'm not able to write one by myself :) I have not been able to benchmark...
[ 0.3268655240535736, -0.057512715458869934, 0.05636905878782272, 0.1387823224067688, -0.375955194234848, 0.0752553716301918, 0.26177269220352173, -0.3553893268108368, -0.15898026525974274, -0.4591205418109894, -0.11215329170227051, 0.13318856060504913, -0.16017349064350128, -0.1928911209106...
Performance was a prime factor in the development of this class library. Of course, I'd recommend that you try the BCL generic Dictionary class first, as it will save you time and may suit your performance requirements just fine.
[ 0.2526654005050659, -0.04243937507271767, -0.17535202205181122, 0.26600173115730286, -0.10037847608327866, -0.16674990952014923, 0.2118017077445984, 0.2591068744659424, 0.07516937702894211, -0.663853645324707, 0.10146982967853546, 0.6420872211456299, 0.24853217601776123, -0.142532721161842...
I have been given a DLL ("InfoLookup.dll") that internally allocates structures and returns pointers to them from a lookup function. The structures contain string pointers: ``` extern "C" { struct Info { int id; char* szName; }; Info* LookupInfo( int id ); } ``` In C#, how can I declare the ...
[ 0.22524066269397736, 0.1110968291759491, 0.44597455859184265, -0.13361603021621704, 0.09700039029121399, -0.03662252798676491, -0.1571575105190277, -0.3113274872303009, 0.008991900831460953, -0.664447009563446, -0.23361612856388092, 0.4026589095592499, -0.3378605842590332, 0.12106854468584...
); if( info != 0 && info->szName != 0 ) DoSomethingWith( info->szName ); // NOTE: no cleanup here, the DLL is caching the lookup table internally } ``` Try the following layout. Code automatically generated using the [PInvoke Interop Assistant](http://www.codeplex.com/clrinterop/Release/ProjectReleases.asp...
[ -0.1257588416337967, -0.16649676859378815, 0.5641907453536987, -0.015430846251547337, 0.3333497941493988, 0.2127138376235962, 0.2551867961883545, -0.490000456571579, -0.37983375787734985, -0.7946434020996094, -0.30807721614837646, 0.544790506362915, -0.290603905916214, 0.2528935670852661, ...
extern System.IntPtr LookupInfo(int id) ; public static LoopInfoWrapper(int id) { IntPtr ptr = LookupInfo(id); return (Info)(Marshal.PtrToStructure(ptr, typeof(Info)); } } ```
[ 0.2305043637752533, -0.20206694304943085, 0.240384042263031, -0.010778406634926796, 0.3846185505390167, -0.03424542769789696, 0.3700995147228241, -0.40544986724853516, -0.13302703201770782, -0.34026169776916504, -0.2690771520137787, 0.4407995641231537, -0.5371545553207397, 0.12099484354257...
I've looked at every question so far and none seem to actually answer this question. I created a UITabBarController and added several view controllers to it. Most of the views are viewed in portrait, but one should be viewed in landscape. I don't want to use the accelerometer or detect when the user rotates the device...
[ 0.3068501055240631, -0.34018591046333313, 0.7021403312683105, 0.325596421957016, -0.06619232892990112, 0.2087549865245819, -0.20038791000843048, -0.10124217718839645, -0.11937182396650314, -0.6491467952728271, 0.15377701818943024, 0.5239570736885071, -0.03643902391195297, 0.153866559267044...
to happen when they choose a different view. Is there not a built-in property or method to tell the system what orientation to display the view as? Overriding the shouldautorotate... method does absolutely nothing so far as I can tell. The type of answer I would NOT appreciate is "RTFM" because I already have, and a...
[ 0.2501095235347748, -0.14447589218616486, 0.8001704216003418, -0.2737542986869812, 0.042959943413734436, -0.1355377435684204, 0.22957389056682587, -0.45092564821243286, -0.35402190685272217, -0.39882615208625793, -0.2311761975288391, 0.843372106552124, -0.18159404397010803, -0.257418721914...
landscapeTransform = CGAffineTransformMakeRotation(degreesToRadian(90)); landscapeTransform = CGAffineTransformTranslate (landscapeTransform, +80.0, +100.0); [[appDelegate navController].view setTransform:landscapeTransform]; ```
[ -0.025355465710163116, -0.11639153212308884, 0.9054346084594727, -0.08028263598680496, -0.2527323067188263, -0.05485000088810921, 0.05288257077336311, -0.25061845779418945, -0.053455550223588943, -0.6556419730186462, -0.32196366786956787, 0.5055841207504272, 0.2005375176668167, 0.318626612...
I'm using CFHTTP to post data to my payment gateway (Protx). Protx requires that I whitelist the IP that will send this request. I am hosted on a shared server running Windows 2008. This morning, my hosting company assigned a new IP to this server for a customer who required an SSL certificate. Since then, my CFHTTP...
[ 0.06885386258363724, 0.3635059595108032, 0.7249517440795898, -0.05954845994710922, -0.16860732436180115, 0.13640069961547852, 0.13812176883220673, 0.16502444446086884, -0.2734714448451996, -0.4879220724105835, 0.2762145400047302, 0.02638586051762104, -0.2621994614601135, 0.4417527019977569...
CFHTTP will use to post data? Here's something I put together in under 5 minutes to change the icon on a specific window. You could easily use this code to create a winform that would enumerate the currently open windows and allow you to assign arbitrary icons to them. (C# code below) ``` [DllImport("user32.dll", Char...
[ 0.254243403673172, -0.26873666048049927, 1.0394285917282104, -0.05599265918135643, -0.12234557420015335, -0.0822237879037857, 0.21087978780269623, -0.38345983624458313, -0.06310482323169708, -0.48908573389053345, -0.20107701420783997, 0.54874187707901, -0.5522763729095459, 0.11578818410634...
//Load an icon. This has to be a *.ico. System.Drawing.Icon i = new Icon("path\to\icon"); //Find the target window. The caption must be entered exactly //as it appears in the title bar IntPtr hwnd = FindWindow(null, "Caption of Target Window"); //Set the icon SendMessage(hwnd, WM_SETICON, (IntP...
[ 0.11272446066141129, -0.06972839683294296, 0.8109426498413086, 0.000014649915101472288, 0.2572311460971832, -0.16695791482925415, 0.47410598397254944, -0.30716052651405334, -0.20417635142803192, -0.6906457543373108, -0.5165768265724182, 0.6791126132011414, -0.2661074995994568, 0.0774707347...
//bar to also display the new icon DrawMenuBar((int)hwnd); } ```
[ 0.04038228467106819, 0.054232992231845856, 0.46821051836013794, -0.6543583273887634, 0.0015115324640646577, 0.19385667145252228, 0.10260279476642609, -0.06853677332401276, 0.0070403702557086945, -0.517609179019928, -0.43167948722839355, 0.7304414510726929, -0.2521825134754181, 0.0252478010...
I've read conflicting things on this. From Wikipedia: > Controller > Processes and responds to events, typically user actions, and may invoke > changes on the model. It's the word TYPICALLY that is confusing. If not just user input, then what else? I view the controller as a *Coordinator*, most of my code is usual...
[ 0.15398892760276794, -0.09893730282783508, 0.15710803866386414, 0.47750625014305115, -0.20802636444568634, -0.1276330053806305, -0.1050703227519989, 0.08379502594470978, -0.42498862743377686, -0.5492938756942749, -0.12772707641124725, 0.25537046790122986, -0.328086793422699, 0.326584070920...
my thoughts of it as a *coordinator*. A general 'test' one can apply to their application to see if they are following MVC enough: Is is very easy to re-skin your application? (Swap out the view without re-writing a whole bunch of code). Don't get caught up in all the religious debates and rigid 'rules' surrounding M...
[ 0.6588371992111206, 0.13656333088874817, -0.0012733341427519917, -0.041770901530981064, -0.23162372410297394, -0.06762275844812393, 0.3295431435108185, -0.009992992505431175, -0.15139728784561157, -0.19048207998275757, 0.11140265315771103, 0.5895624756813049, -0.11888618022203445, 0.002576...
Here's the basic idea: There is a java window (main) that opens another java window (child). When the child is created, part of the initialization sets the focus in the appropriate text field in the child window: ``` childTextField.requestFocusInWindow(); childTextField.setCaretPosition(0); ``` The child is general...
[ -0.11490705609321594, -0.013447914272546768, 0.41694769263267517, -0.2793322801589966, 0.5044780969619751, 0.28637954592704773, 0.1457277536392212, 0.0018277267226949334, 0.13918621838092804, -0.8640602827072144, -0.6002257466316223, 0.3529652953147888, 0.10587563365697861, 0.2329498827457...
typing before the new window is created, the text is correctly buffered and appears in the new textfield after the window opens. However, every once in a while when the user requests the child window to open and then starts typing, their text does NOT appear in the text field. Only after they click with the mouse in ...
[ 0.17031900584697723, 0.12202699482440948, 0.5986656546592712, 0.14641113579273224, 0.15996597707271576, 0.09677199274301529, 0.34696680307388306, 0.22073595225811005, -0.10951051115989685, -0.7745290994644165, 0.07460355013608932, 0.44621145725250244, -0.011220229789614677, 0.1520635634660...
not regularly enough to debug nicely. There is of course all kinds of other mojo going on behind the scenes, including communication with a server app, but I'm not convinced it's related. Any thoughts or ideas would be very much appreciated. On first look, that sounds like it might be a bug in the implementation; the...
[ 0.4016757011413574, -0.01515752449631691, 0.2780263125896454, 0.12430756539106369, 0.11321686208248138, -0.19249683618545532, 0.3793867230415344, 0.04603810980916023, -0.30010443925857544, -0.17150430381298065, 0.043263934552669525, 0.6102849841117859, -0.21738864481449127, 0.0185547359287...
event queue thread is getting blocked somehow. Actually, the difficulty you're having with reproducing it makes that sound even more likely. Debugging that case will require a little craft and trickery. If you're on Solaris 10 or OS/X, I'd recommend using dtrace; you can easily put a trace point on the event queue. I...
[ 0.331270694732666, -0.34597069025039673, 0.025887925177812576, 0.24190406501293182, 0.05178963765501976, -0.22688154876232147, 0.30123886466026306, 0.41426682472229004, -0.36887750029563904, -0.9845221042633057, -0.10794205218553543, 0.5038046836853027, -0.3278459906578064, -0.016281191259...
How do you format the date time to just date? For example, this is what I retrieved from the database: 12/31/2008 12:00:00 AM, but I just want to show the date and no time. Either use one of the [standard date and time format strings](http://msdn.microsoft.com/en-us/library/az4se3k1.aspx) which only specifies the dat...
[ 0.3081841468811035, -0.1214742586016655, 0.510111927986145, 0.2346905767917633, 0.03472263738512993, 0.007321421522647142, -0.05327344313263893, 0.03493441268801689, -0.2800334095954895, -0.5928899645805359, 0.06512123346328735, 0.23215730488300323, 0.12911875545978546, 0.3200593888759613,...
I have an Access Database that outputs a report in Excel format. The report is dependent on a date parameter chosen by the user. This parameter is selected via a textbox (text100) that has a pop up calendar. I would like to use the date in the text box (text100) in the filename. You have to take responsibility for as...
[ 0.2411591112613678, 0.1668522208929062, 0.6301898956298828, -0.027300981804728508, -0.2772808372974396, 0.04845687747001648, -0.06434731930494308, -0.2675945460796356, -0.22416914999485016, -0.4119357764720917, 0.014459697529673576, 0.6625266671180725, -0.13323424756526947, 0.1776302903890...
vParam1 as variant Public Sub ParameterSet(byval pParamName as String, byval pParamValue as variant) Select Case pParamName Case "Param1": vParam1 = pParamValue Case "Param2": vParam2 = pParamValue Case Else msgbox pParamName & " parameter not defined" End Select End Sub Public Function ParameterGet(by...
[ -0.6411453485488892, 0.12488225102424622, 0.5972089767456055, -0.16387802362442017, -0.4269912540912628, 0.7420617938041687, 0.5097680687904358, -0.802665650844574, -0.34596189856529236, -0.17908860743045807, -0.29648661613464355, 0.3101717531681061, -0.40086668729782104, 0.015839476138353...
export** ``` Private Sub Export_Click() dim vParam1 as variant vParam1 = inputbox("Enter the parameter:") ParameterSet "param1", vParam1 Transferspreadsheet blah, blah, FileName:= vParam1 & ".xls" End Sub ``` Obviously this code needs a little tweaking to compile... :-)
[ -0.21530033648014069, -0.020791778340935707, 0.5541955232620239, -0.24907435476779938, -0.05565899610519409, 0.21372200548648834, 0.40231984853744507, -0.4353468418121338, -0.36672064661979675, -0.15402403473854065, -0.2098671942949295, 0.4370977580547333, -0.4963279962539673, 0.0181960500...
i have a Sharepoint feature that essentially extends Lists with a new feature, using a List receiver. For each list the feature is attached to, i need to store some configuration. Now, the first thing that came into my mind is the obvious solution: Have a global list. That works of course, but I wonder if there is som...
[ 0.369446724653244, -0.05533820018172264, 0.32016655802726746, 0.1778898537158966, 0.13470089435577393, -0.24855495989322662, -0.005838294513523579, 0.3311610519886017, -0.49066710472106934, -0.8959209322929382, 0.29285651445388794, 0.48269784450531006, -0.21453404426574707, 0.2861514389514...
allows me to use it's database? I am not talking about just using ADO.net to access the db directly (which is a big no-no with Sharepoint), I am thinking about some officially supported mechanism. SPLists, unlike som other objects, do not have property bags, however all lists in a SharePoint site has a correlating SPF...
[ 0.8663921356201172, -0.13834291696548462, 0.2634129226207733, 0.044413160532712936, -0.32039371132850647, -0.4953361451625824, 0.19846667349338531, -0.33711427450180054, -0.28722286224365234, -0.5247811675071716, 0.2863968014717102, 0.20684044063091278, -0.5594865679740906, 0.1531484425067...
I have a simple email address sign up form as follows: ``` <form action="" id="newsletterform" method="get"> <input type="text" name="email" class="required email" id="textnewsletter" /> <input type="submit" id="signup" /> </form> ``` **Here's what I want to be able to do:** * Validate the form to look...
[ 0.4594731032848358, 0.43431559205055237, 0.5812920928001404, -0.280595988035202, -0.0018493403913453221, -0.2583608627319336, 0.40306833386421204, -0.3821773827075958, 0.19460941851139069, -0.8696805834770203, 0.014233577065169811, 0.42913392186164856, 0.032483503222465515, 0.0210671089589...
and hits submit (or enter) I want the form to send the email address to wherever I specify in the jQuery code and then generate a little "Thank you for signing up notice", all without reloading the browser. I have looked at too many tutorials and my eyes are pretty much aching at this stage, so please don't point me t...
[ 0.17279383540153503, 0.48786190152168274, 0.546929657459259, 0.028061291202902794, -0.26119866967201233, 0.03467138856649399, 0.14071473479270935, -0.011565589345991611, -0.027801616117358208, -0.603062093257904, 0.04874381050467491, 0.24737103283405304, 0.10269907116889954, 0.058689441531...
my forms working without any JavaScript whatsoever. I am assuming you have done that much. \*\*\*\*ORIGINAL ANSWER\*\*\* Then, change your "submit" element to a button element. On the OnClick of the button element, run a JavaScript function that validates. Lots of samples on how to do that as you know. If the valida...
[ 0.5238301157951355, -0.0026708729565143585, 0.495863139629364, 0.2325061410665512, -0.17361517250537872, -0.22627952694892883, 0.02585085667669773, -0.2303573489189148, -0.13539762794971466, -0.8973466157913208, -0.061787381768226624, 0.47021692991256714, -0.10921642184257507, -0.187377855...
code also does the AJAX submitting. ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Load JQuery on your page --> <script src="http://code.jquery.com/jquery-latest.js"></script> ...
[ 0.19147281348705292, 0.2654785215854645, 0.4608810842037201, 0.04250519722700119, -0.41576260328292847, -0.17754411697387695, 0.2045874148607254, -0.5566632747650146, 0.031580179929733276, -0.4128631055355072, -0.5000849962234497, 0.2735140919685364, 0.05474149435758591, -0.304969191551208...
loaded, then call the validation. Due to magic in JQuery or the plugin // this only happens when the form is submitted. $(document).ready(function(){ //When the submit button is clicked $("#signup").click(function() { //if the form is valid according to the fules if ($("#...
[ 0.41977593302726746, -0.2579028010368347, 0.7707552909851074, -0.15634813904762268, 0.04540059342980385, -0.491773396730423, 0.11139920353889465, -0.42635276913642883, -0.10470288246870041, -0.16387054324150085, -0.43465787172317505, 0.6624553799629211, -0.1322035789489746, -0.213179886341...
//Submit the form via AJAX $('#newsletterform').ajaxForm(function() { //this alert lets me know the submission was successfull alert("Thank you!"); }); }
[ 0.1146707609295845, -0.21000413596630096, 0.43576714396476746, -0.16020885109901428, -0.16689898073673248, -0.3237009346485138, 0.2909683883190155, -0.07360998541116714, 0.18381324410438538, -0.5596086382865906, -0.09284790605306625, 0.34721776843070984, 0.09341782331466675, -0.33599776029...
}) }); </script> <!-- Just some styles --> <style type="text/css"> * { font-family: Verdana; font-size: 96%; } label { width: 10em; float: left; } label.error { float: none; color: red; padding-left: .5em; vertical-align: top; } p { clear: both; }
[ -0.25589361786842346, 0.0037154194433242083, 0.6112866997718811, -0.22506536543369293, 0.27048686146736145, 0.524023175239563, 0.32911545038223267, -0.34057095646858215, -0.14562180638313293, -0.49163374304771423, -0.7325617074966431, 0.6036697626113892, -0.21606920659542084, -0.0491776838...
.submit { margin-left: 12em; } em { font-weight: bold; padding-right: 1em; vertical-align: top; } </style> </head> <body> <form action="" id="newsletterform" method="get"> <!-- The classes assigned here are where the validation rules come fome. This is required, and it must be an...
[ 0.3164031207561493, 0.2748619019985199, 0.8733881711959839, 0.23537372052669525, 0.0680777058005333, -0.1817811131477356, 0.05718183144927025, -0.8733295202255249, 0.06538102775812149, -0.6291133165359497, -0.29649442434310913, 0.2010444849729538, 0.10563642531633377, -0.22760049998760223,...
<input type="submit" id="signup" /> </form> </body> </html> ``` This isn't the tightest code you could write, but it will serve as an example.
[ 0.060377612709999084, 0.0040136766619980335, -0.0006360260304063559, 0.1859450787305832, 0.0047339037992060184, -0.3720906972885132, 0.1155228391289711, -0.11993716657161713, 0.049874935299158096, -0.8568545579910278, -0.27476760745048523, 0.3740086257457733, -0.18973931670188904, -0.37257...
I've been a .NET developer for several years now and this is still one of those things I don't know how to do properly. It's easy to hide a window from the taskbar via a property in both Windows Forms and WPF, but as far as I can tell, this doesn't guarantee (or necessarily even affect) it being hidden from the `Alt`+`...
[ 0.51212078332901, 0.043731801211833954, 0.23803293704986572, -0.1205311119556427, 0.0004632450290955603, -0.31971868872642517, 0.7135932445526123, 0.34256747364997864, -0.2567877471446991, -0.9604560732841492, -0.05108221620321274, 0.6084226369857788, -0.06838315725326538, 0.20337539911270...
I'm not allowed to mark my own answers as the solution, but so far it's the only one that works. **Update 2:** There's now a proper solution by Franci Penov that looks pretty good, but haven't tried it out myself. Involves some Win32, but avoids the lame creation of off-screen windows. **Update:** According to @donov...
[ 0.0876622423529625, -0.030642036348581314, 0.11531544476747513, -0.053639382123947144, -0.042222198098897934, 0.0713660791516304, 0.50543612241745, -0.3267225921154022, -0.22511883080005646, -0.651724636554718, -0.14153888821601868, 0.6052460670471191, -0.156712144613266, -0.22160652279853...
- that's the right approach. 2. to make it a child window of another window. Unfortunately, WPF does not support as flexible control over the window style as Win32, thus a window with `WindowStyle=ToolWindow` ends up with the default `WS_CAPTION` and `WS_SYSMENU` styles, which causes it to have a caption and a close b...
[ -0.20914219319820404, -0.16638962924480438, 0.4532248079776764, -0.03209502995014191, -0.06725416332483292, -0.19849218428134918, 0.25653931498527527, -0.20299269258975983, -0.17985643446445465, -0.6446413397789001, -0.2274080067873001, 0.47582685947418213, -0.22543567419052124, 0.06375323...
can either of two ways: * go with the sample code above and make the window a child window of a small hidden tool window * modify the window style to also include the `WS_EX_TOOLWINDOW` extended style. I personally prefer the second approach. Then again, I do some advanced stuff like extending the glass in the client...
[ -0.03983810916543007, 0.044890690594911575, 0.341260701417923, -0.14330735802650452, -0.33966583013534546, 0.16525903344154358, -0.036294642835855484, -0.4020693898200989, -0.15364114940166473, -0.586525559425354, -0.01849694550037384, 0.4823246896266937, -0.06208878010511398, -0.145266979...
Width="300" ShowInTaskbar="False" WindowStyle="None" Loaded="Window_Loaded" > ``` Nothing too fancy here, we just declare a window with `WindowStyle=None` and `ShowInTaskbar=False`. We also add a handler to the Loaded event where we will modify the extended window style. We can't do that work in the construct...
[ 0.0795680433511734, -0.21239624917507172, 0.5940295457839966, -0.3738339841365814, 0.05503290146589279, -0.15106530487537384, 0.29948776960372925, -0.2809123992919922, -0.03463553637266159, -0.6180903911590576, -0.12346740067005157, 0.7783704996109009, -0.21524493396282196, 0.0010148943401...
declarations. I've removed all unnecessary styles from the enums, just to keep the sample code here small. Also, unfortunately the `SetWindowLongPtr` entry point is not found in user32.dll on Windows XP, hence the trick with routing the call through the `SetWindowLong` instead. ``` #region Window styles [Flags] public...
[ 0.23901981115341187, -0.246607705950737, 0.8250507116317749, -0.17566539347171783, -0.019741376861929893, -0.05000779777765274, 0.3359573483467102, -0.38190343976020813, -0.236066997051239, -0.5081343650817871, -0.3485313355922699, 0.5959866046905518, -0.3342418074607849, 0.200093507766723...
= 0; IntPtr result = IntPtr.Zero; // Win32 SetWindowLong doesn't clear error on success SetLastError(0); if (IntPtr.Size == 4) { // use SetWindowLong Int32 tempResult = IntSetWindowLong(hWnd, nIndex, IntPtrToInt32(dwNewLong)); error = Marshal.GetLastWin32Error(); res...
[ -0.07643331587314606, 0.00848502479493618, 0.5541037321090698, -0.057105422019958496, 0.30790600180625916, -0.12290338426828384, 0.6243568658828735, -0.5993269085884094, -0.04044865071773529, -0.34327787160873413, -0.27882805466651917, 0.7366723418235779, 0.11055219918489456, 0.21039161086...
SetWindowLongPtr result = IntSetWindowLongPtr(hWnd, nIndex, dwNewLong); error = Marshal.GetLastWin32Error(); } if ((result == IntPtr.Zero) && (error != 0)) { throw new System.ComponentModel.Win32Exception(error); } return result; } [DllImport("user32.dll", EntryPoint = "Se...
[ -0.21535374224185944, -0.6468592286109924, 1.0713897943496704, -0.048638541251420975, 0.21451102197170258, 0.18679608404636383, 0.48813048005104065, -0.7258898019790649, -0.06991131603717804, -0.43438464403152466, -0.4407101273536682, 0.8127320408821106, -0.3702992796897888, 0.202326267957...
EntryPoint = "SetLastError")] public static extern void SetLastError(int dwErrorCode); #endregion ```
[ -0.3779049217700958, -0.12625154852867126, 0.7165443897247314, -0.16067807376384735, 0.5653285384178162, -0.26827237010002136, 0.04114919155836105, 0.2066083401441574, 0.13695773482322693, -0.5863026976585388, -0.43753573298454285, 0.4009521007537842, -0.3571628928184509, 0.304709553718566...
In my mock class, I'm mocking method foo(). For some test cases, I want the mock implementation of foo() to return a special value. For other test cases, I want to use the real implementation of foo(). I have a boolean defined in my mock class so that I can determine in the mock method whether I want to return the spec...
[ 0.11401719599962234, 0.4019984304904938, 0.07552887499332428, -0.13771861791610718, -0.33923035860061646, 0.27424943447113037, 0.4580809473991394, 0.20664934813976288, -0.11467849463224411, -0.14181290566921234, 0.030383704230189323, 0.44276225566864014, -0.31628239154815674, 0.08561231195...