text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
only has 39 columns.
Has anyone run into this problem? And if so, do you have a work around / solution?
This is a MFC project using Visual Studio 6.0 if it makes any difference.
Here's the query (formatted here so wold show up without a scrollbar):
```
SELECT `id`, `member_id`, `member_id_last_four`, `card_n... | [
-0.10413471609354019,
0.25792354345321655,
0.6935904026031494,
0.21863193809986115,
0.1477973908185959,
0.40304866433143616,
-0.038287002593278885,
-0.1235365942120552,
-0.25507351756095886,
-0.5006711483001709,
-0.06511924415826797,
0.04341806098818779,
-0.166700080037117,
0.0883634239435... | |
`mobile_phone`, `fax`, `email`,
`emergency_name`, `emergency_phone`, `job_title`, `mail_code`,
`comments`, `contract_unit`, `contract_length`, `start_date`,
`end_date`, `head_of_household`, `parent_id`, `added_by`, `im_active`,
`ct_active`, `organization`, `allow_members`... | [
0.04419947788119316,
0.29963764548301697,
0.6959851384162903,
0.09164219349622726,
0.4634172320365906,
0.30516472458839417,
-0.07198809832334518,
-0.34843528270721436,
-0.4085424244403839,
-0.6436439156532288,
-0.2557084262371063,
0.31120970845222473,
-0.039920076727867126,
0.3310182690620... | |
info:
Commented out each column in the select statement except for id. Ran the query and no exception.
Then I systematically went through and uncommented each column, one at a time, and re-ran query in between each uncomment.
When I uncomment the comment column then I get the error.
This is defined as the following... | [
0.17888030409812927,
-0.22978630661964417,
0.11235133558511734,
0.08139056712388992,
-0.13164615631103516,
0.3546416759490967,
0.131446972489357,
-0.016668761149048805,
0.00884405430406332,
-0.3687141537666321,
-0.06347104161977768,
0.7772952318191528,
-0.5557697415351868,
-0.1797222346067... | |
size the data in the field and not the max size (thereby causing the error).
So, if there is a case where you absolutely have to have these large fields. Here is a potential solution:
1. Give the field a default value in the database. (ie. `'<blank>'`)
2. Then when displaying the value; you pass NULL/empty if you fin... | [
0.07475534081459045,
-0.33735841512680054,
0.2509252429008484,
0.06959856301546097,
-0.02086871676146984,
-0.30259382724761963,
0.0727904886007309,
-0.2625713348388672,
-0.355214387178421,
-0.5629598498344421,
-0.29079753160476685,
0.7361647486686707,
-0.4317704141139984,
-0.00715143885463... | |
I'm trying to figure out if Haskell uses dynamic or static scoping.
I realize that, for example, if you define:
```
let x = 10
```
then define the function
```
let square x = x*x
```
You have 2 different "x's", and does that mean it is dynamically scoped? If not, what scoping does it use, and why?
Also, can Hask... | [
0.07643648982048035,
-0.23686833679676056,
0.021404331550002098,
0.11802337318658829,
-0.29161232709884644,
-0.1548185497522354,
0.2587977349758148,
0.06282269954681396,
-0.2775488793849945,
-0.49169883131980896,
-0.03742991387844086,
0.5579507350921631,
-0.4830057919025421,
0.226215109229... | |
**not** 10 in the function is just a argument to square, that can take any value (you can specify the type later) in this case 10 but just in this case.
Here is an example of aliases provided by [Curt Sampson](https://stackoverflow.com/users/107294/curt-sampson):
```
import Data.IORef
main :: IO ()
main = do x <- ne... | [
0.17628778517246246,
-0.09910085052251816,
0.26529473066329956,
-0.21319085359573364,
0.14981085062026978,
0.3545593023300171,
0.35730746388435364,
-0.27808958292007446,
-0.41157013177871704,
-0.28051653504371643,
-0.09364483505487442,
0.4864661395549774,
-0.4191023111343384,
0.00006203283... | |
readIORef y >>= print -- y contains 0
writeIORef x 42 -- write 42 into x
readIORef y >>= print -- y contains 42
``` | [
-0.33027932047843933,
0.3648166060447693,
0.26768186688423157,
-0.3571769893169403,
-0.0916619822382927,
0.6864722967147827,
0.6596938371658325,
-0.43912482261657715,
0.26140081882476807,
-0.5316031575202942,
-0.39805930852890015,
0.43815410137176514,
-0.31574147939682007,
-0.1533880233764... | |
Is there a widely accepted class for dealing with URLs in PHP?
Things like: getting/changing parts of an existing URL (e.g. path, scheme, etc), resolving relative paths from a base URL. Kind of like a two-way [parse\_url()](http://php.net/parse_url), encapsulated with a bunch of handy functions.
Does something like t... | [
0.2270640879869461,
-0.06556414812803268,
0.0639098733663559,
0.04156316816806793,
-0.38725730776786804,
-0.1687791496515274,
0.04749060049653053,
0.18040812015533447,
-0.20757490396499634,
-0.5415986180305481,
0.07286300510168076,
0.18962876498699188,
-0.07739219814538956,
0.0061279842630... | |
Having recently come across [this introduction to Factor](http://elasticdog.com/2008/11/beginning-factor-introduction/), I've been a bit curious to learn more. Aside from the official FAQ mentioned there, do you have resources for learning the language (as well as the stack-based "paradigm," if that's the right word) t... | [
0.3438566327095032,
-0.3104962706565857,
0.2121407389640808,
-0.24562904238700867,
-0.44170045852661133,
-0.06626379489898682,
0.04518616199493408,
-0.048488058149814606,
-0.11688002198934555,
-0.5999780297279358,
0.31917938590049744,
0.8274098038673401,
-0.268791526556015,
-0.306129574775... | |
(It's the same as the one you get when you install Factor.)
Don't forget to subscribe to [planet-factor](http://planet.factorcode.org/). | [
0.3823342025279999,
-0.11713634431362152,
0.3332781195640564,
0.18555501103401184,
0.05149006471037865,
-0.4049338102340698,
0.14771553874015808,
0.2707962989807129,
-0.20397937297821045,
-0.9348670840263367,
-0.05430397018790245,
0.6918759942054749,
-0.30998632311820984,
-0.23000484704971... | |
Is it OK to use XSPF for video content?
If not, what else should be used?
I am targeting flash players, including Jeroen Wijering's JW FLV media player.
Yes, XSPF is suitable for "video playlists".
Let me invite you to the XSPF mailing list:
<http://lists.musicbrainz.org/mailman/listinfo/playlist>
See you,
Seba... | [
0.6070047616958618,
0.1412675827741623,
0.3607247769832611,
0.24707989394664764,
-0.12815511226654053,
-0.6921848654747009,
0.17393110692501068,
0.14117048680782318,
-0.5378504991531372,
-0.18031877279281616,
-0.1364438235759735,
0.39453476667404175,
-0.356555312871933,
0.06648379564285278... | |
My Java application is saving stuff in 'user.home' but on windows this does not seem to be the correct path to save application information (as a friend told me). An other option is using the preferences api but it's not possible to set up the hsqldb location using the preferences api. Also, I want all files to be avai... | [
0.03867319971323013,
0.41033080220222473,
0.03620663657784462,
-0.2775694727897644,
0.13098643720149994,
-0.05882270261645317,
0.31813132762908936,
0.1759086698293686,
-0.10720758885145187,
-1.0450043678283691,
0.10091095417737961,
0.42286092042922974,
-0.19983430206775665,
0.2652223706245... | |
(instead of this path + Application data, but some others go down to there), creating a directory in Unix style, ie. dot + application name (examples: .antexplorer, .sqlworkbench, .squirrel-sql, .SunDownloadManager, .p4qt, .gimp-2.4, etc.).
Looks like a decent, common practice... | [
0.23725195229053497,
-0.11538266390562057,
0.39786750078201294,
0.04202786833047867,
-0.11511874198913574,
-0.3269769549369812,
0.03565626218914986,
0.12808114290237427,
-0.29638850688934326,
-0.8027830719947815,
-0.21398676931858063,
0.33943113684654236,
-0.4232361614704132,
-0.1326622813... | |
I'm using caml query to select all documents which were modified or added by user. Query runs recursively on all subsites of specified site collection.
Now problem is I can't get rid of folders which are also part of result set. For now I'm filtering them from result datatable. But I'm wondering: Is it possible to fil... | [
-0.054391294717788696,
0.14885152876377106,
0.40028294920921326,
0.06781916320323944,
0.05468401685357094,
-0.34171655774116516,
-0.06691805273294449,
0.03202563151717186,
-0.21987520158290863,
-0.6444466710090637,
0.02548268996179104,
0.6453534960746765,
-0.3735722005367279,
0.01979637891... | |
you any folders. | [
0.3027244806289673,
0.3628028631210327,
0.0022150955628603697,
0.37289437651634216,
0.26982447504997253,
-0.2559680938720703,
-0.2028885781764984,
0.4208107590675354,
-0.5456199049949646,
-0.5024504661560059,
-0.15307025611400604,
0.7509884834289551,
-0.2180313766002655,
0.1524686217308044... | |
I need to read a properties files that's buried in my package structure in `com.al.common.email.templates`.
I've tried everything and I can't figure it out.
In the end, my code will be running in a servlet container, but I don't want to depend on the container for anything. I write JUnit test cases and it needs to wo... | [
0.28938183188438416,
0.052455052733421326,
0.23243993520736694,
0.0505249947309494,
0.050347574055194855,
-0.1994265913963318,
0.23271411657333374,
-0.3771790862083435,
-0.07427062839269638,
-0.9547420740127563,
-0.07081001251935959,
0.7770038843154907,
-0.2571021318435669,
0.3089731931686... | |
getClass().getResourceAsStream("/com/al/common/email/templates/foo.properties");
```
Relative paths (those without a leading '/') in `getResource()`/`getResourceAsStream()` mean that the resource will be searched relative to the directory which represents the package the class is in.
Using `java.lang.String.class.ge... | [
-0.2302217185497284,
-0.22006484866142273,
0.36684519052505493,
-0.23198166489601135,
0.1358107328414917,
-0.22239331901073456,
0.2612634301185608,
-0.01614280417561531,
-0.10712792724370956,
-0.618710994720459,
-0.47211596369743347,
0.6773352026939392,
-0.5255529284477234,
-0.038196075707... | |
Does anyone here know SVG? If so, how did you learn it?
Any books/tutorial pointer will be beneficial. Also I am a programmer, not a designer, so I want to pick up some skills there too.
I learned it developing [SVG Tiny](http://www.w3.org/TR/SVGMobile12/) software, mostly by reading the spec. SVG Tiny is basically a ... | [
0.7003470063209534,
-0.0874258279800415,
0.4318089783191681,
0.18259045481681824,
0.009970331564545631,
-0.4686833918094635,
0.09498649090528488,
0.0655047595500946,
-0.21304965019226074,
-0.254133939743042,
0.1385543793439865,
0.4069312810897827,
0.021014047786593437,
-0.0547681488096714,... | |
In my application, there are 10-20 classes that are instantiated once[\*]. Here's an example:
```
class SomeOtherManager;
class SomeManagerClass {
public:
SomeManagerClass(SomeOtherManager*);
virtual void someMethod1();
virtual void someMethod2();
};
```
Instances of the classes are contained in one obj... | [
0.03475463390350342,
-0.1497340053319931,
0.17139269411563873,
-0.05329604819417,
-0.20175676047801971,
0.1523730754852295,
0.3543682098388672,
-0.01580985076725483,
-0.3046846389770508,
-0.6860770583152771,
-0.17864693701267242,
0.3636605739593506,
-0.1459130495786667,
0.1860753297805786,... | |
replace the implementation, 2 steps are needed:
1. Define a class DerivedSomeManagerClass, which inherits SomeManagerClass [plugin]
2. Create the new class (DerivedSomeManagerClass) instead of the default (SomeManagerClass) [application]
I guess I need some kind of object factory, but it should be fairly simple since... | [
0.33007508516311646,
-0.3335152566432953,
0.09142020344734192,
0.13959239423274994,
-0.046834979206323624,
-0.1576123833656311,
0.30170539021492004,
-0.2004113793373108,
-0.18439753353595734,
-0.8105272054672241,
0.16180779039859772,
0.621452808380127,
-0.39955803751945496,
0.1722716689109... | |
more than two objects that are contained in TheManager.
I think there are two separate problems here.
One problem is: how does TheManager *name* the class that it has to create? It must keep some kind of pointer to "a way to create the class". Possible solutions are:
* keeping a separate pointer for each kind of clas... | [
0.2312220335006714,
-0.17556023597717285,
-0.17789395153522491,
0.21373292803764343,
-0.18239596486091614,
0.05848364904522896,
0.031132373958826065,
0.05712360888719559,
-0.3421710431575775,
-0.5206254720687866,
0.11300721764564514,
0.09064982086420059,
-0.36828264594078064,
0.50225746631... | |
parameters (of course if the key is an enum you can use a vector instead of a map)
The other problem is: what is this "way to create a class"? Unfortunately we can't store pointers to constructors directly, but we can:
* create, as others have pointed out, a factory for each class
* just add a static "create" functio... | [
0.49859991669654846,
-0.26790958642959595,
-0.10400006920099258,
0.45410045981407166,
-0.1242002621293068,
0.0763450413942337,
0.3271602690219879,
-0.31159260869026184,
-0.2164495289325714,
-0.6015081405639648,
0.34735843539237976,
0.6363971829414368,
-0.26785388588905334,
0.18152490258216... | |
I'm a C programmer trying to understand C++. Many tutorials demonstrate object instantiation using a snippet such as:
```
Dog* sparky = new Dog();
```
which implies that later on you'll do:
```
delete sparky;
```
which makes sense. Now, in the case when dynamic memory allocation is unnecessary, is there any reaso... | [
0.32686570286750793,
0.20249304175376892,
-0.04440288618206978,
-0.12662112712860107,
-0.15962350368499756,
-0.2086724489927292,
0.1163775622844696,
0.04839580878615379,
-0.16386406123638153,
-0.3228791058063507,
-0.13336527347564697,
0.656794548034668,
-0.4380594491958618,
0.1370076090097... | |
destructor is automatically called when it goes out of scope, which is your main tool for tracking resource lifetime and avoiding leaks.
So in general, every time you need to allocate a resource, whether it's memory (by calling new), file handles, sockets or anything else, wrap it in a class where the constructor acqu... | [
0.4648224711418152,
-0.33885088562965393,
0.07989867776632309,
0.3295491337776184,
0.09186996519565582,
-0.1545800268650055,
0.2658105492591858,
-0.21585628390312195,
-0.42052486538887024,
-0.7343823909759521,
-0.4221263825893402,
0.7864117622375488,
-0.22347137331962585,
0.404587835073471... | |
avoid memory leaks.
The most common name for this idiom is [RAII](http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization)
Also look into smart pointer classes which are used to wrap the resulting pointers on the rare cases when you do have to allocate something with new outside a dedicated RAII object. Y... | [
0.38910120725631714,
-0.3403024673461914,
-0.030548829585313797,
0.11777186393737793,
-0.08810443431138992,
-0.1834019273519516,
0.07904557138681412,
-0.37006160616874695,
-0.2839469015598297,
-0.5615392923355103,
-0.4322237968444824,
0.4465249180793762,
-0.20542027056217194,
0.22119015455... | |
snippet such as ...
So what you've discovered is that most tutorials suck. ;)
Most tutorials teach you lousy C++ practices, including calling new/delete to create variables when it's not necessary, and giving you a hard time tracking lifetime of your allocations. | [
0.4301533102989197,
0.08225033432245255,
-0.172124445438385,
0.4574172794818878,
0.019337087869644165,
-0.17919452488422394,
0.4776168763637543,
0.4669017791748047,
-0.07514336705207825,
-0.37851011753082275,
-0.1276259869337082,
0.6703477501869202,
-0.12243503332138062,
-0.023612001910805... | |
I have a MOSS 2007 test site, its not public facing, instead its on our intranet, I am looking for an uptime monitoring component thats free and easy to install, any suggestions?
Update: I don't need graphs or anything fancy, I just need to make sure that I get a notification via email if the site goes down.
[Nagios](... | [
0.07773949205875397,
-0.1101032942533493,
0.09979131817817688,
0.012909092009067535,
0.10435833036899567,
-0.5222614407539368,
0.4703977704048157,
0.236678808927536,
-0.4650692939758301,
-0.49599191546440125,
0.10909060388803482,
0.2905887961387634,
0.1268635392189026,
0.11542946845293045,... | |
I'm struggling here with a problem:
I have a controller *questions* which has action *new*.
Whenever I need to create new question, I'm typing
```
/questions/new
```
What changes to routes.rb should I make to change the URI to
```
/questions/ask
```
---
Thank you.
Valve.
Try this:
```
map.ask_question '/que... | [
-0.10092809796333313,
-0.08527428656816483,
0.533585786819458,
0.3427112400531769,
-0.04682714864611626,
-0.17897208034992218,
0.11658240854740143,
-0.13082487881183624,
-0.43919816613197327,
-1.0866085290908813,
0.2015078365802765,
0.2670794129371643,
-0.28467777371406555,
0.4656412899494... | |
I have a GridView control on my page that I have defined a number of BoundFields for. Each row of the databound GridView has a CommandField (Select), for which I want to send the PostBack to a new page.
Of course I could easily send the NewSelectedIndex in a QueryString, but I'd rather keep that information hidden fro... | [
0.4655863642692566,
-0.10104972124099731,
0.5299787521362305,
-0.0218997560441494,
-0.28308936953544617,
0.09392095357179642,
0.045769378542900085,
-0.013511458411812782,
-0.08370254933834076,
-0.8092595934867859,
-0.06750386208295822,
0.32383841276168823,
-0.24210615456104279,
0.289418250... | |
PostBackUrl="~/Default.aspx" OnClientClick='form1.ActivityId.value = this.Tag;' Tag='<%# Eval("ActivityId") %>' Text="Edit"/>
</ItemTemplate>
</asp:TemplateField>
```
In this sample code, I added a TemplateColumn to the GridView. I use a dynamically added Tag attribute for the button to pass the Id, then I use Ja... | [
-0.10333672165870667,
-0.15749549865722656,
0.6758067607879639,
-0.23835930228233337,
-0.21528668701648712,
0.15147942304611206,
0.23271502554416656,
-0.36235666275024414,
0.24280929565429688,
-0.5662205219268799,
-0.2492707073688507,
0.2295452058315277,
-0.29673951864242554,
0.07051488012... | |
I am using VS 2008 to write my Javascript code ( mostly in JQuery). However the js file was not updated when I was done with the editing and pressed F5 to call out the debugger. I need to close my vs2008 and reopen it in order to see the latest changes in js file.
Any idea on how to fix this?
Do a CTRL-F5 in the brows... | [
0.2953803241252899,
0.1952071636915207,
0.5970628261566162,
-0.016825011000037193,
-0.19310584664344788,
-0.3170967400074005,
0.5377150177955627,
0.1962060183286667,
-0.2570042908191681,
-0.6856937408447266,
-0.0014457341749221087,
0.5636366605758667,
-0.05453874543309212,
0.14669938385486... | |
If host my WCF services in IIS7 or WPAS, is it possible to load up two or more services into the same AppDomain so that they can share static variables?
Sure you can expose as many Endpoints within a **Web Application** as you want (even of different WCF Services). This should not be limited to either IIS or WPAS.
Doi... | [
0.4506090581417084,
-0.0015760353999212384,
0.4713107645511627,
0.013245001435279846,
-0.11188483238220215,
-0.1932360827922821,
0.2014298141002655,
-0.01957339234650135,
-0.5249565243721008,
-0.8266173601150513,
-0.0785314291715622,
0.3793209493160248,
-0.3560973107814789,
0.3102217018604... | |
I need to add user roles and permission system into my web application built using PHP/MySQL. I want to have this functionality:
1. One root user can create sub-roots, groups, rules and normal users( all privileges) .
2. Sub-roots can create only rules, permissions and users for his/her own group ( no groups).
3. A u... | [
0.07686540484428406,
0.15061335265636444,
0.25592541694641113,
0.12340076267719269,
-0.05824843421578407,
-0.06554701924324036,
0.35248351097106934,
-0.22907665371894836,
-0.1488124579191208,
-0.5550380349159241,
-0.1090848296880722,
0.122745580971241,
-0.17589440941810608,
0.1961481720209... | |
other information. Currently I am using two feilds in each content table i.e. `createdBy` and `CreatedByGroup`, and using that as the point whether a certain user has permissions. But its not flexible enough, because for every new content, I have to go throug all data updates and permission updates. Please help me by d... | [
0.27124345302581787,
-0.16846825182437897,
0.34506696462631226,
0.1827220767736435,
-0.28012776374816895,
-0.20169422030448914,
-0.21124939620494843,
-0.17146185040473938,
-0.2550097405910492,
-0.4329637587070465,
-0.09173765778541565,
0.3790583312511444,
-0.24033385515213013,
-0.052454311... | |
roll your own, it'll help you to review well factored solutions such as those. | [
0.4577994644641876,
0.19195452332496643,
0.5129793286323547,
0.43311807513237,
0.14989762008190155,
0.21277540922164917,
-0.6229162216186523,
0.20592786371707916,
-0.09877340495586395,
-0.479870468378067,
0.17733269929885864,
0.4289984703063965,
0.20019757747650146,
-0.22736544907093048,
... | |
UDP doesnot sends any ack back, but will it send any response?
I have set up client server UDP program. If I give client to send data to non existent server then will client receive any response?
My assumption is as;
Client -->Broadcast server address (ARP)
Server --> Reply to client with its mac address(ARP)
Client... | [
-0.22088496387004852,
-0.20085857808589935,
0.6404797434806824,
-0.266370952129364,
-0.4194737672805786,
-0.137203648686409,
-0.12807749211788177,
-0.12860001623630524,
-0.4452057182788849,
-0.5516104102134705,
0.02932392619550228,
0.4889834523200989,
-0.627981424331665,
0.2516947686672210... | |
when client doesn't get any response.
Error code can be get from WSAGetLastError.
I tried to send data to non existent host and sendto call succeeded . As per documentation it should fail with return value SOCKET\_ERROR.
Any thoughts??
You can never receive an error, or notice for a UDP packet that did not reach dest... | [
0.24042321741580963,
-0.10343576967716217,
0.3035460114479065,
-0.09931574761867523,
-0.291655957698822,
0.03742465004324913,
0.5785254836082458,
0.4766209125518799,
-0.38613492250442505,
-0.5338050127029419,
0.2048686146736145,
0.5886461138725281,
-0.17913474142551422,
0.30352240800857544... | |
I need an up to date and easy to use .net wrapper for google maps.
[Googlemap Control](http://www.codeplex.com/googlemap)
Wraps Google Maps API as ASP.NET custom control.
Offers extremely easy and fast way of adding Google Maps API support on your ASP.NET pages. | [
0.5244570374488831,
-0.10443668067455292,
0.5838210582733154,
0.2579463720321655,
-0.04893435165286064,
-0.25006982684135437,
0.09019218385219574,
-0.15319636464118958,
-0.013321218080818653,
-0.6301131248474121,
-0.12191073596477509,
0.28691530227661133,
-0.14471593499183655,
0.0170784443... | |
I've alluded to this project before, in this question, but the scope of redesign has been slightly tightened, i.e. I can't redesign the whole thing, so I 'd like some general advice on how to structure the existing artefacts in the application as an incremental step in improving the design.
1. The site has two areas o... | [
0.9353436827659607,
0.09268587827682495,
0.5701014399528503,
-0.056797634810209274,
-0.18149082362651825,
-0.3964866101741791,
0.12817952036857605,
-0.4077039062976837,
-0.19464407861232758,
-0.4982335567474365,
-0.11418547481298447,
0.6303160190582275,
0.2044881284236908,
0.09539458900690... | |
I have decided against a rich, complex DAL in favour of the Enterprise Library DAAB and plain vanilla datasets.
2. Each report is an isolated page that uses results of a dynamic SQL query to explicitly render HTML table rows for the report. In order to not maintain one set of queries for both mySQL and MSSQL for each r... | [
0.081003338098526,
0.182096466422081,
0.36658206582069397,
-0.1485322117805481,
-0.5108440518379211,
-0.002934575779363513,
-0.03956431522965431,
-0.47626054286956787,
-0.0015375016955658793,
-0.5027933716773987,
-0.05388416349887848,
0.15582367777824402,
-0.4268689453601837,
0.03819075226... | |
structure in classes, as telerik reporting does, but have yet to look at other reporting tools.
4. All reports share a common filter page that is presented on choosing a report from a menu, which redirects to the chosen report once the user is happy with their filter selections. Is there any guidance available for this... | [
0.24082830548286438,
-0.15411986410617828,
-0.025647299364209175,
0.29472169280052185,
-0.3487800657749176,
-0.3684401512145996,
0.1338684856891632,
-0.004964097868651152,
-0.20767544209957123,
-0.6761245727539062,
-0.1700885146856308,
0.0005130524514243007,
0.0308977197855711,
0.008618566... | |
not looking for others to do my work, and will in due course have implemented many improvements of my own making, but I would appreciate general opinions on how other people would handle a project like this.
I'm going to go with a management system for metadata on reports, with a simple directory structure for a page-p... | [
0.5671221613883972,
0.07405571639537811,
0.3960607647895813,
0.33852165937423706,
-0.09684114903211594,
-0.39723363518714905,
-0.042482320219278336,
-0.2611653208732605,
-0.315702885389328,
-0.6761280298233032,
0.05875115469098091,
0.7017098665237427,
-0.19801180064678192,
-0.2216963768005... | |
be no runtime maintenance of reports, as adding a report requires adding a page. This is acceptable as maintenance will be infrequent. | [
0.3122347891330719,
0.1780882477760315,
0.3345821499824524,
0.2110244184732437,
0.023032914847135544,
-0.5603500604629517,
0.44547995924949646,
-0.13619501888751984,
-0.2065758854150772,
-0.7192214727401733,
-0.4937668442726135,
0.6482212543487549,
-0.39139434695243835,
-0.3701638579368591... | |
I can find lots of information on how Long Polling works (For example, [this](http://jfarcand.wordpress.com/2007/05/15/new-adventures-in-comet-polling-long-polling-or-http-streaming-with-ajax-which-one-to-choose/), and [this](http://en.wikipedia.org/wiki/Comet_(programming)#Ajax_with_long_polling)), but no *simple* exa... | [
0.014599381014704704,
-0.19830875098705292,
0.33503055572509766,
0.3798617720603943,
-0.45634979009628296,
-0.43408241868019104,
0.1539698988199234,
-0.039946433156728745,
-0.06647256761789322,
-0.36838605999946594,
0.10186614841222763,
0.22883377969264984,
-0.28900593519210815,
-0.3484151... | |
until the data you want to send is available (say, a new message arrives).
Here is a really basic example, which sends a simple string after 2-10 seconds. 1 in 3 chance of returning an error 404 (to show error handling in the coming Javascript example)
`msgsrv.php`
```php
<?php
if(rand(1,3) == 1){
/* Fake an err... | [
0.34204673767089844,
-0.30261874198913574,
0.29975754022598267,
-0.18235404789447784,
0.09461042284965515,
-0.2280893474817276,
0.6083197593688965,
-0.46156078577041626,
-0.2447877824306488,
-0.6539384126663208,
-0.3469386100769043,
0.4255828261375427,
-0.13228076696395874,
0.0847761183977... | |
all the "worker threads" and leave it unable to respond to other requests.. There are ways around this, but it is recommended to write a "long-poll server" in something like Python's [twisted](http://twistedmatrix.com/trac/), which does not rely on one thread per request. [cometD](http://cometdproject.dojotoolkit.org/)... | [
0.3633456826210022,
-0.42597025632858276,
0.34514617919921875,
0.06485985219478607,
-0.16914741694927216,
-0.04586474224925041,
0.20479261875152588,
0.01209946908056736,
-0.3632809519767761,
-0.37660619616508484,
0.03414212167263031,
0.16444477438926697,
-0.4284205138683319,
-0.06795300543... | |
to be running them locally)
Then, in Javascript, you request the above file (`msg_srv.php`), and wait for a response. When you get one, you act upon the data. Then you request the file and wait again, act upon the data (and repeat)
What follows is an example of such a page.. When the page is loaded, it sends the init... | [
0.3154463469982147,
-0.3805355131626129,
0.6510987281799316,
-0.11376859247684479,
-0.11624281108379364,
-0.09801404178142548,
0.37598124146461487,
-0.1660294085741043,
-0.35989317297935486,
-0.5917100310325623,
-0.18335527181625366,
0.5672799944877625,
-0.31480634212493896,
-0.03228464722... | |
this, but if `msgsrv.php` *always* returns instantly (with a syntax error, for example) - you flood the browser and it can quickly freeze up. This would better be done checking if the file contains a valid JSON response, and/or keeping a running total of requests-per-minute/second, and pausing appropriately.
If the pa... | [
0.004807510878890753,
-0.2510251998901367,
0.6224857568740845,
0.1592053920030594,
-0.21992255747318268,
-0.16703908145427704,
0.7007395029067993,
0.03664419427514076,
-0.34098199009895325,
-0.7273231148719788,
-0.15005239844322205,
0.4428044855594635,
-0.179348424077034,
0.005037395283579... | |
this is inherent in how long polling works, no complicated error-handling is required
Anyway, the `long_poller.htm` code, using the jQuery framework:
```html
<html>
<head>
<title>BargePoller</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript" charset="u... | [
-0.2691612243652344,
-0.20528705418109894,
0.7030999660491943,
0.3190910816192627,
-0.1484898179769516,
0.32198822498321533,
0.12332988530397415,
-0.7699080109596252,
-0.021501660346984863,
-0.3650795519351959,
-0.239017054438591,
0.20693251490592957,
-0.4034498631954193,
-0.23811428248882... | |
to add a div.
type is the name of a CSS class (old/new/error).
msg is the contents of the div */
$("#messages").append(
"<div class='msg "+ type +"'>"+ msg +"</div>"
);
}
function waitForMsg(){
/* This requests the url "msgsrv.php"
When it | [
0.15049071609973907,
-0.30591049790382385,
0.7690728306770325,
-0.2856071889400482,
-0.14270882308483124,
0.17240314185619354,
0.17354264855384827,
-0.03329819068312645,
-0.12429406493902206,
-0.41505491733551025,
-0.4656842350959778,
0.046258099377155304,
-0.5740875005722046,
0.3652064502... | |
complete (or errors)*/
$.ajax({
type: "GET",
url: "msgsrv.php",
async: true, /* If set to non-async, browser shows page as "Loading.."*/
cache: false,
timeout:50000, /* Timeout in ms */ | [
-0.17878617346286774,
-0.15663541853427887,
0.5603529214859009,
-0.06506618857383728,
0.15090273320674896,
-0.018918219953775406,
0.6925278902053833,
-0.02154105342924595,
-0.3059428632259369,
-0.6745113134384155,
-0.46383893489837646,
0.49683380126953125,
-0.23167107999324799,
0.183461427... | |
success: function(data){ /* called when request to barge.php completes */
addmsg("new", data); /* Add response to a .msg div (with the "new" class)*/
setTimeout(
waitForMsg, /* Request next message */
1000 | [
-0.08528666198253632,
-0.28303930163383484,
0.8240908980369568,
0.04471025615930557,
0.10419730097055435,
0.3132258355617523,
0.35699862241744995,
-0.509739100933075,
-0.5065544247627258,
-0.5490031242370605,
-0.07365333288908005,
0.6008654236793518,
0.00985689740628004,
0.0708536431193351... | |
/* ..after 1 seconds */
);
},
error: function(XMLHttpRequest, textStatus, errorThrown){
addmsg("error", textStatus + " (" + errorThrown + ")");
setTimeout( | [
-0.06028185784816742,
-0.26987823843955994,
0.49495744705200195,
-0.1828416883945465,
0.1768847107887268,
0.11279824376106262,
0.5321735143661499,
-0.44791755080223083,
0.09171044081449509,
-0.5179596543312073,
-0.40715909004211426,
0.4336319863796234,
-0.2699850797653198,
-0.1105719879269... | |
waitForMsg, /* Try again after.. */
15000); /* milliseconds (15seconds) */
}
});
};
$(document).ready(function(){
waitForMsg(); /* Start the inital request */
});
</script>
</head>
<body>
<div id="messages">
<div | [
0.19719211757183075,
-0.6198511719703674,
0.9319186210632324,
-0.2716764509677887,
0.11061965674161911,
0.2549154758453369,
0.4074038863182068,
-0.3728971779346466,
0.045169711112976074,
-0.8195516467094421,
-0.4804552495479584,
0.4967730641365051,
-0.15998390316963196,
-0.0198514126241207... | |
class="msg old">
BargePoll message requester!
</div>
</div>
</body>
</html>
``` | [
0.011290895752608776,
-0.2344178706407547,
0.3878059983253479,
-0.1651102602481842,
-0.03973475098609924,
0.12263045459985733,
0.28751346468925476,
0.009963678196072578,
-0.4670983552932739,
-0.6860883831977844,
-0.3662108778953552,
0.026446713134646416,
-0.4593566656112671,
0.477478533983... | |
Every tutorial or explanation of REST just goes too complicated too quickly - the learning curve rises so fast after the initial explanation of CRUD and the supposed simplicity over SOAP. Why can't people write decent tutorials anymore!
I'm looking at Restlet - and its not the best, there are things missing in the tut... | [
-0.010880588553845882,
0.10451413691043854,
0.17563816905021667,
0.1274857074022293,
-0.3394753038883209,
-0.12807916104793549,
0.3730527460575104,
0.058366816490888596,
-0.0785660669207573,
-0.5221035480499268,
-0.0803867056965828,
0.39951181411743164,
0.09502334892749786,
-0.242175549268... | |
of assumed knowledge all round, so coming into REST and Restlet framework cold leaves you with a lot of 'catchup work' to do, and re-reading paragraphs over and over again.
1. We had difficulty working out that the jars had to be in copied into the correct lib folder.
2. Problems with web.xml creating a HTTP Status 50... | [
0.14749182760715485,
0.10164407640695572,
0.39390018582344055,
-0.04945051670074463,
0.06022127345204353,
-0.23346243798732758,
0.36346036195755005,
-0.39119505882263184,
0.06922124326229095,
-0.5971567034721375,
-0.04954078420996666,
0.40649139881134033,
-0.22974207997322083,
-0.049881137... | |
classes in."
This means that your fully qualified name for your class **FirstStepsApplication** is **com.firstStepsServlet.FirstStepsApplication**, so we had to alter web.xml to refer to the correct class e.g:
original:
```
<param-value>
firstStepsServlet.FirstStepsApplication
</param-value>
```
should be... | [
0.061147917062044144,
-0.46978291869163513,
0.037557657808065414,
0.241668239235878,
-0.31570443511009216,
-0.12204565852880478,
0.2245752364397049,
-0.1256794035434723,
-0.30392709374427795,
-0.7143626809120178,
-0.2846248149871826,
0.13964442908763885,
-0.1242237314581871,
-0.15773051977... | |
for that I *highly* recommend [RESTful Web Services](https://rads.stackoverflow.com/amzn/click/com/0596529260) by Leonard Richardson and Sam Ruby. I provides a great introduction to REST: what it is and how to implement a (practical) RESTful web service.
Most of the example code in the book is actually Ruby, but it's ... | [
0.42144495248794556,
0.2068694531917572,
-0.09282399713993073,
-0.040902309119701385,
0.10308429598808289,
-0.05718567967414856,
0.4404623806476593,
-0.17080643773078918,
0.1395193189382553,
-0.610681414604187,
-0.12058226019144058,
0.656345009803772,
-0.23319599032402039,
-0.1352230906486... | |
what you need at this stage. | [
0.0996021255850792,
-0.08878010511398315,
-0.18012890219688416,
0.1224692240357399,
0.36897775530815125,
0.057404592633247375,
0.0528479740023613,
0.05731264874339104,
0.03209974989295006,
-0.5333764553070068,
0.08281677216291428,
0.5670468211174011,
0.03916839137673378,
-0.130006492137908... | |
I have the following five tables:
* ISP
* Product
* Connection
* AddOn
* AddOn/Product (pivot table for many-to-many relationship).
Each Product is linked to an ISP, each Connection is listed to a Product. Each product can have a number of add-ons, through the use of the pivot table (which simply has 2 fields, one fo... | [
0.09855776280164719,
0.07553531229496002,
0.613558292388916,
-0.1657526046037674,
-0.08346809446811676,
0.36857083439826965,
-0.2854754328727722,
-0.08968815952539444,
-0.13263432681560516,
-0.6600251197814941,
0.019250739365816116,
-0.1130155548453331,
-0.31342941522598267,
0.255773603916... | |
like this:
```
SELECT i.name AS ispname, i.img_link, c.download, c.upload, c.monthly_price, c.link,
GROUP_CONCAT(a.name) AS addons, SUM(pa.monthly_fee) AS addon_price
FROM isp i JOIN product p ON i.id = p.isp_id
JOIN `connection` c ON p.id = c.product_id LEFT JOIN product_addon pa ON pa.product_id = p.id AND pa.force... | [
0.24205465614795685,
-0.0013666617451235652,
0.6532920598983765,
-0.11182637512683868,
-0.1814584881067276,
0.44770538806915283,
-0.39476364850997925,
-0.500588059425354,
-0.43081361055374146,
-0.5612977147102356,
-0.15602143108844757,
0.2427898496389389,
-0.1444426029920578,
0.58623778820... | |
additional condition in the JOIN statements (*AND pa.addon\_id IN (...)*), it will return all connections that have just one of the listed addons, but not necessarily all of them.
Is there some way to return all connections that as a **minimum** have all the addons (they can have additional as well) via SQL?
```
GROUP... | [
-0.12249251455068588,
-0.05265699699521065,
0.46994051337242126,
0.002337609650567174,
0.18017005920410156,
0.2265748381614685,
0.08035077154636383,
-0.3834235966205597,
-0.4013019800186157,
-0.6144440770149231,
-0.12660342454910278,
0.3031691014766693,
-0.41427671909332275,
0.052153676748... | |
Is there some smart way to retreive the installation path when working within a dll (C#) which will be called from an application in a different folder?
I'm developing an add-in for an application. My add-in is written in C#. The application that will use is written in C and needs to compile some stuff during evaluati... | [
0.35502898693084717,
0.04432219639420509,
0.0560004897415638,
-0.06736905127763748,
0.06367863714694977,
-0.0681607574224472,
-0.13991935551166534,
-0.0419919528067112,
-0.03531790152192116,
-0.827216625213623,
-0.15948797762393951,
0.7251803874969482,
-0.3348516821861267,
-0.2751768827438... | |
part (sometimes static binding will be necessary).
When trying out the setup and printing out the current directory info from the C# dll with:
```
Console.WriteLine(Directory.GetCurrentDirectory());
```
or:
```
Console.WriteLine(System.Environment.CurrentDirectory);
```
I get the executables pat... | [
0.041876185685396194,
-0.15698865056037903,
0.5846365690231323,
-0.006868985015898943,
0.18072675168514252,
0.010572490282356739,
0.21067696809768677,
-0.25689372420310974,
0.11702487617731094,
-0.33515769243240356,
-0.37273815274238586,
0.5931371450424194,
-0.2942294776439667,
0.168601423... | |
I want to link to a page which contains multiple support topics.
When the user clicks on the link while being on an external site, the topic should be expanded as soon as the user arrives on the support page.
Example:
I link to this page
```
http://www.nintendo.de/NOE/de_DE/support/nintendo_ds_lite_159_142.html
```... | [
0.2960992157459259,
-0.11390439420938492,
0.8918241262435913,
0.1719559133052826,
-0.22857682406902313,
-0.4853243827819824,
-0.12483898550271988,
0.278665691614151,
-0.2045760303735733,
-0.3217577040195465,
-0.45656877756118774,
0.2966139614582062,
-0.13416747748851776,
0.3652069568634033... | |
place. | [
0.04343557730317116,
0.05019491910934448,
0.3075079917907715,
0.217716246843338,
0.04108332842588425,
-0.30263659358024597,
-0.2719462513923645,
-0.10810423642396927,
-0.16335749626159668,
-0.8330098390579224,
-0.33328282833099365,
-0.21754227578639984,
0.05215255171060562,
0.5249087810516... | |
I've built a small application which has User Management, a frontend console to enter data and a backend console to control parts of the frontend. The frontend adds rows to a MySQL database which are timestamped. The backend needs to be able to select rows from the database between X and Y dates.
Everything works so f... | [
-0.24465540051460266,
-0.08210808038711548,
0.5817161798477173,
0.07017157971858978,
0.1417018175125122,
-0.07645035535097122,
-0.0574042871594429,
0.007492274045944214,
0.04995572939515114,
-0.5476246476173401,
0.02996155433356762,
0.11133787781000137,
-0.20175319910049438,
0.337882161140... | |
"id, top_level_category, sub_level_category, "
. "agent_name, date, ticket_id, company"
. ") VALUES ("
. "NULL, '$top_level_category', '$sub_level_category', "
. "'$agent_name', FROM_UNIXTIME('$date'), '$ticket_id', '$company'"
. ")"
;
$result = mysql_query($sql) or die (mysql_erro... | [
-0.06800118833780289,
0.007794645149260759,
0.7147360444068909,
0.1981961727142334,
0.23010538518428802,
0.0037830325309187174,
-0.1117030456662178,
-0.0218296367675066,
-0.3702529966831207,
-0.4929363429546356,
-0.05225545912981033,
0.31115591526031494,
-0.3075065314769745,
0.387392818927... | |
this the right way to do it?
The second question being, what sort of SQL statement would I need to pull out an array of rows between X and Y date.
Apologies if this is rambling a bit, hope it's clear but if you need more information let me know.
MySQL datetime should be formatted with dashes:
YYYY-MM-DD HH:MM:SS
<h... | [
0.1683715432882309,
-0.13200244307518005,
0.7325558662414551,
0.07919242978096008,
0.02003277651965618,
-0.019710201770067215,
-0.02489609085023403,
-0.05797898396849632,
-0.2639581263065338,
-0.5734913349151611,
-0.004197840113192797,
0.4312203526496887,
-0.05373360961675644,
0.0790535584... | |
of your datetime field.* | [
0.4197821319103241,
0.02531157247722149,
0.1516585499048233,
-0.2314198911190033,
0.42839759588241577,
-0.01960471272468567,
-0.0035627768374979496,
0.20474454760551453,
-0.5266128182411194,
-0.31065213680267334,
-0.17394015192985535,
0.2624903619289398,
-0.21319417655467987,
0.03851328790... | |
In .NET, a value type (C# `struct`) can't have a constructor with no parameters. According to [this post](https://stackoverflow.com/questions/203695/structure-vs-class-in-c#204009) this is mandated by the CLI specification. What happens is that for every value-type a default constructor is created (by the compiler?) wh... | [
-0.06695640832185745,
-0.1596706360578537,
0.20210987329483032,
0.06513071060180664,
-0.12665966153144836,
-0.2763645648956299,
0.097073495388031,
-0.1307944804430008,
0.012642482295632362,
-0.1941315233707428,
-0.27948400378227234,
0.5218448638916016,
-0.5768298506736755,
0.16560667753219... | |
public Rational(long num)
{
numerator = num;
denominator = 1;
}
public Rational() // This is not allowed
{
numerator = 0;
denominator = 1;
}
}
```
Using current version of C#, a default Rational is `0/0` which is not so cool.
**PS**: Will default parameters help s... | [
-0.15425050258636475,
-0.2228206992149353,
0.2225675731897354,
0.3001282513141632,
0.038579780608415604,
-0.01982993260025978,
0.29253989458084106,
-0.29148536920547485,
0.07992490381002426,
-0.08250606805086136,
-0.11802881956100464,
0.5457472801208496,
-0.4023679494857788,
0.049426130950... | |
answered:
> To use your example, what would you want to happen when someone did:
>
>
>
> ```
> Rational[] fractions = new Rational[1000];
>
> ```
>
> Should it run through your constructor 1000 times?
Sure it should, that's why I wrote the default constructor in the first place. The CLR should use the *default ... | [
0.23867684602737427,
0.07092063128948212,
0.306613564491272,
0.34647446870803833,
0.041957173496484756,
0.17727313935756683,
-0.062032755464315414,
-0.3395143151283264,
-0.16284126043319702,
-0.23835547268390656,
0.1343042552471161,
0.5288205742835999,
-0.28487884998321533,
-0.024118660017... | |
in my mind, is not strong enough to prevent definition of a default constructor.
**Note:** the answer below was written a long time prior to C# 6, which is planning to introduce the ability to declare parameterless constructors in structs - but they still won't be called in all situations (e.g. for array creation) (in ... | [
-0.0043641249649226665,
0.1843734234571457,
0.37220415472984314,
-0.10138566046953201,
-0.09670136868953705,
-0.23899830877780914,
0.22207820415496826,
-0.12972111999988556,
-0.03308167681097984,
-0.21698546409606934,
-0.1545812040567398,
0.6890607476234436,
-0.31912457942962646,
-0.213851... | |
would be called when it wouldn't. For instance, consider this:
```
MyStruct[] foo = new MyStruct[1000];
```
The CLR is able to do this very efficiently just by allocating the appropriate memory and zeroing it all out. If it had to run the MyStruct constructor 1000 times, that would be a lot less efficient. (In fact,... | [
-0.06358085572719574,
0.1262393593788147,
0.4070160686969757,
-0.2131660133600235,
0.027732204645872116,
-0.22619476914405823,
0.13383346796035767,
-0.0822044387459755,
-0.003081210423260927,
-0.3594427704811096,
-0.10956425219774246,
0.6734642386436462,
-0.3399396538734436,
-0.11053165793... | |
parameterless constructors to be defined, but then not required that constructor to be executed in all cases - but that would have led to more confusion. (Or at least, so I believe the argument goes.)
EDIT: To use your example, what would you want to happen when someone did:
```
Rational[] fractions = new Rational[10... | [
0.06918123364448547,
-0.06630463153123856,
0.011654520407319069,
0.2568068504333496,
-0.12950997054576874,
0.015830324962735176,
0.17913615703582764,
-0.08179663121700287,
-0.2436308115720749,
-0.5503372550010681,
0.23627956211566925,
0.6968474984169006,
-0.397599995136261,
0.0863062217831... | |
isn't created by the compiler. Value types don't have to have constructors as far as the CLR is concerned - although it turns out it *can* if you write it in IL. When you write "`new Guid()`" in C# that emits different IL to what you get if you call a normal constructor. See [this SO question](https://stackoverflow.com... | [
0.4264245927333832,
0.06449487060308456,
0.06894324719905853,
-0.010989878326654434,
-0.1707434505224228,
-0.2823069095611572,
0.20784670114517212,
0.03414030373096466,
-0.27326053380966187,
-0.4904730021953583,
-0.24858903884887695,
0.48691168427467346,
-0.5004326105117798,
0.008400963619... | |
for me to think it's probably a bad idea. | [
0.26848670840263367,
0.2741352617740631,
0.055029112845659256,
-0.107718326151371,
0.20200636982917786,
-0.024760881438851357,
0.13864301145076752,
0.04031897336244583,
-0.1353939324617386,
-0.06808925420045853,
0.18811635673046112,
0.08404359221458435,
0.0029241880401968956,
0.16895805299... | |
Is it possible to get a report of the records that are updated using a update query, without using a recordset?
Ex:
`sqltext = update table employees set bonus = 0 where salary > 50000
DoCmd.RunSQL sqltext`
After this query runs, is it possible to get the name of the employees for whom this update query was perfo... | [
0.45207470655441284,
-0.016898615285754204,
0.35398373007774353,
0.08666235208511353,
0.16048549115657806,
-0.2306022197008133,
0.15156987309455872,
0.0000022945723685552366,
-0.2980598509311676,
-0.46182355284690857,
0.15214715898036957,
0.644195556640625,
-0.24065637588500977,
0.13125044... | |
a function that executes the same SQL:
```
Public Function SQLRun(strSQL As String) As Boolean
On Error GoTo errHandler
CurrentDB.Execute strSQL, dbFailOnError
SQLRun= True
exitRoutine:
Exit Function
errHandler:
MsgBox err.Number & ": " & err.Description, vbExclamation, "Error in SQLRun()"
Resume exitRout... | [
-0.28754714131355286,
-0.057036351412534714,
0.36030471324920654,
0.026796827092766762,
-0.1210770532488823,
-0.07240702956914902,
0.580161452293396,
-0.19822478294372559,
-0.4714655876159668,
-0.31247493624687195,
-0.16429315507411957,
0.6796884536743164,
-0.44363173842430115,
0.409772217... | |
Is there some way to determine what file currently is being rendered by Rails (2.2) in a helper method. An example result would be "/sessions/new.html.erb" or something similar.
I am trying to write a helper function that does something based on the file name that is being rendered, so I need a reliable way to obtain ... | [
0.5099374055862427,
-0.062121253460645676,
0.2771682143211365,
0.07319652289152145,
0.03870135918259621,
-0.3933728039264679,
0.31794673204421997,
0.21656370162963867,
-0.20466348528862,
-0.8063664436340332,
0.040515586733818054,
0.8006302118301392,
-0.2523937523365021,
-0.1321289837360382... | |
report the errors. Much better is to replace it with a function that executes the same SQL:
```
Public Function SQLRun(strSQL As String) As Boolean
On Error GoTo errHandler
CurrentDB.Execute strSQL, dbFailOnError
SQLRun= True
exitRoutine:
Exit Function
errHandler:
MsgBox err.Number & ": " & err.Description,... | [
-0.13922464847564697,
0.11293801665306091,
0.2604149281978607,
0.09348256886005402,
-0.20681282877922058,
-0.06039884313941002,
0.5050923824310303,
-0.1321137547492981,
-0.47760725021362305,
-0.24643296003341675,
0.02155684120953083,
0.6823105812072754,
-0.36954355239868164,
0.287347227334... | |
Does anyone have metrics on the utility of formal Unit Testing? I see a lot of attention being paid to unit testing tools and I was curious why?
I stopped formal unit testing over 5 or 6 years ago and the net gain in productivity seems quite high. I stopped unit testing because I noticed that it never caught anything ... | [
0.5233011841773987,
0.8716733455657959,
0.04341810941696167,
-0.01817001961171627,
-0.1753319948911667,
-0.14111699163913727,
0.6407995820045471,
0.13976450264453888,
-0.2268267273902893,
-0.4812605082988739,
0.3752553462982178,
0.3313440978527069,
0.2855817377567291,
0.18094316124916077,
... | |
by allowing the developer to think that there is some safeguard to catch their mistakes.
I do test to ensure that the code works as it should, but I do not use any tools. I test based on the changes being made. My production error rate for new code is approximately zero. My error rate for changes to code is about 2-3 ... | [
0.4311503469944,
0.3955439627170563,
0.09421586245298386,
-0.08535068482160568,
-0.007115629035979509,
0.19081276655197144,
0.34381410479545593,
-0.34548673033714294,
-0.19738668203353882,
-0.37441787123680115,
-0.009112025611102581,
0.8548492789268494,
-0.1401313692331314,
0.0948017686605... | |
I'm building a traditional ASP.NET Web Service -- the style built using asmx. It's a pretty simple service. I started using the new Ado.NET Entity Framework for my persistence layer, and I'm running into some problems:
1) I don't like the WSDL that gets automatically generated -- the complex types were getting defined... | [
0.41570621728897095,
0.1743641495704651,
0.33926981687545776,
-0.1326107680797577,
-0.12483985722064972,
-0.21598921716213226,
0.1851709932088852,
-0.27584925293922424,
0.051589421927928925,
-0.6610956788063049,
0.25187280774116516,
0.5672715306282043,
-0.4076823592185974,
0.33275699615478... | |
the WSDL looks like, which I feel is a more cross-platform design:
```
<xsd:complexType name="TestObject">
<xsd:sequence>
<xsd:element minOccurs="0" name="created" type="xsd:dateTime"/> ...
```
I now have the ASPX generating a nice WSDL file. But now I'm not sure where I should take this. I have two types of b... | [
0.45744195580482483,
-0.29334503412246704,
0.5130573511123657,
-0.04514499381184578,
-0.23078231513500214,
-0.4308951795101166,
-0.08621509373188019,
-0.35352492332458496,
-0.0635908991098404,
-0.815584659576416,
0.40610137581825256,
0.3859407901763916,
-0.2364615947008133,
0.2796647846698... | |
Ado.NEt Entity framework, as it seems like it might get over-written.
Anyone with much experience with the Ado.Net entity experience think it's worth using? While I like the idea of how quickly I was able to build persistence to my data layer, I need to define in a very custom manner how the entity object is transfere... | [
0.4471493065357208,
0.06643503159284592,
0.256496399641037,
-0.030699366703629494,
-0.39527687430381775,
-0.22121495008468628,
0.20679253339767456,
-0.23872829973697662,
-0.07921392470598221,
-0.6739369034767151,
0.4270208179950714,
0.6211913824081421,
-0.3578488230705261,
0.25148218870162... | |
trying to use the Entity Framework in an SOA style architecture.
Version 1.0 of the Entity Framework doesn't work very well in the scenario you've described, as you end up in a world of hurt trying to manage object contexts (and likely
having to cache them).
I'd recommend a thorough read-through of the following (1... | [
0.0860256627202034,
0.0006377063691616058,
0.07683044672012329,
0.051899999380111694,
0.08550070971250534,
-0.05274682119488716,
0.48787957429885864,
-0.12144257128238678,
-0.12513911724090576,
-0.6057599782943726,
0.11287195235490799,
0.6469026803970337,
-0.21389099955558777,
-0.013706085... | |
no "clean" solution in handling EF entities across the wire (or outside service boundaries) at this stage.
Others may beg to differ...
P.S You're right about being wary of hand editing the generated code - any updates to the data model will overwrite any modifications (although you can extend it as they are within a... | [
0.20152394473552704,
-0.15631505846977234,
0.39957195520401,
-0.042578861117362976,
-0.03388087451457977,
-0.31708595156669617,
0.4422396123409271,
-0.2736276090145111,
-0.2759411931037903,
-0.5952008366584778,
-0.15654504299163818,
0.45126762986183167,
-0.22302596271038055,
0.058944027870... | |
Based on the response to this question: [Why does C++ have header files and CPP](https://stackoverflow.com/questions/333889/in-c-why-have-header-files-and-cpp-files)
I have seen the responses and understand the answers - so why didn't this catch on? C# Java?
Because it's a quick, dirty and inelegant solution to the pr... | [
0.12035030126571655,
0.14636865258216858,
0.01635124906897545,
0.1280195116996765,
-0.30032408237457275,
0.05965723842382431,
0.14603827893733978,
-0.3308802545070648,
-0.06914761662483215,
-0.6668676137924194,
-0.12469813972711563,
0.4829886257648468,
-0.40681400895118713,
-0.222549274563... | |
more...
[Dviljoen](https://stackoverflow.com/users/29021/dviljoen) thinks I'm being quite hard on it, and he's right. It is almost a [40-year old design](http://en.wikipedia.org/wiki/C_(programming_language)#Early_developments), from the era of punch cards and paper tape. There's an incredible amount of high-quality s... | [
0.37537699937820435,
0.13402611017227173,
0.21018573641777039,
0.35069966316223145,
0.4737021028995514,
-0.2070624977350235,
-0.4554021656513214,
-0.1253490000963211,
-0.40405797958374023,
-0.3032492399215698,
0.03877030685544014,
0.4694209098815918,
0.0588693767786026,
0.12027858197689056... | |
How would you write ToUpper() if it didn't exist? Bonus points for i18n and L10n
Curiosity sparked by this: <http://thedailywtf.com/Articles/The-Long-Way-toUpper.aspx>
1. I download the Unicode tables
2. I import the tables into a database
3. I write a method upper().
Here is a sample implementation ;)
```
public st... | [
-0.1070774495601654,
-0.0127852912992239,
0.5541806817054749,
-0.11919252574443817,
-0.21498391032218933,
0.1958455592393875,
0.5273222327232361,
-0.7880076169967651,
0.01209110114723444,
-0.5028592944145203,
-0.28261256217956543,
0.25072044134140015,
-0.16021911799907684,
-0.2662192583084... | |
ResultSet rsSmall = null;
StringBuilder buffer = new StringBuilder (N); // Much faster than StringBuffer!
try {
conn = DBFactory.getConnection();
stmtName = conn.prepareStatement("select name from unicode.chart where codepoint = ?");
// TODO Optimization: Maybe move this in the if() so w... | [
-0.2926435172557831,
-0.32954850792884827,
0.5679724812507629,
-0.22432051599025726,
-0.02756478637456894,
0.0718928799033165,
0.6303402185440063,
-0.6691296100616455,
0.020363379269838333,
-0.720046877861023,
-0.22051720321178436,
0.16086694598197937,
-0.19185377657413483,
-0.017853422090... | |
codepoint from unicode.chart where name = ?");
for (int i=0; i<N; i++) {
int c = s.charAt(i);
stmtName.setInt(1, c);
rsName = stmtName.execute();
if (rsName.next()) {
String name = rsName.getString(1); | [
-0.051595427095890045,
-0.36386802792549133,
0.600858211517334,
-0.3917361795902252,
0.037567928433418274,
0.15296770632266998,
0.3780154287815094,
-0.6574896574020386,
-0.13903936743736267,
-0.49209702014923096,
-0.46881479024887085,
-0.008736871182918549,
-0.34806281328201294,
0.12153998... | |
if (name.contains(" SMALL ")) {
name = name.replaceAll(" SMALL ", " CAPITAL ");
stmtSmall.setString(1, name);
rsSmall = stmtSmall.execute(); | [
0.19030353426933289,
-0.11913705617189407,
0.4778740406036377,
-0.40485143661499023,
0.3375003933906555,
-0.023501811549067497,
0.41809162497520447,
-0.7317749261856079,
-0.22686539590358734,
-0.08837579190731049,
-0.4448266625404358,
0.37540292739868164,
-0.4831763207912445,
0.26069894433... | |
if (rsSmall.next()) {
c = rsSmall.getInt(1);
}
rsSmall = DBUtil.close(rsSmall);
} | [
-0.160593643784523,
-0.23159722983837128,
0.7264615893363953,
-0.38210156559944153,
0.13960817456245422,
-0.08391068130731583,
0.3233462870121002,
-0.5508118271827698,
0.0019271887140348554,
-0.41024044156074524,
-0.5150145888328552,
0.3252605199813843,
-0.4532683491706848,
0.2401754558086... | |
}
rsName = DBUtil.close(rsName);
}
}
finally {
// Always clean up
rsSmall = DBUtil.close(rsSmall);
rsName = DBUtil.close(rsName);
stmtSmall = DBUtil.close(stmtSmall);
stmtName = DBUtil.close(stmtName);
}
// TODO Optimization: Maybe read the ta... | [
-0.13601888716220856,
0.12487778067588806,
0.7056202292442322,
-0.26750046014785767,
0.04763985425233841,
-0.11176829785108566,
0.626396119594574,
-0.36903703212738037,
-0.11978470534086227,
-0.6155514717102051,
-0.2961648106575012,
0.4637930393218994,
-0.3978273272514343,
0.14183379709720... | |
into RAM at the start
// Would waste a lot of memory, though :/
return buffer.toString();
}
```
;)
Note: The unicode charts which you can find on [unicode.org](http://unicode.org/) contain the name of the character/code point. This string will contain " SMALL " for characters which are uppercase (mind the bl... | [
-0.027611257508397102,
0.3016825020313263,
0.02488516829907894,
-0.17603346705436707,
0.21963216364383698,
0.3528115153312683,
0.4756229519844055,
0.016479715704917908,
-0.3476724922657013,
-0.4894305467605591,
-0.3492701053619385,
0.40465012192726135,
-0.1577778309583664,
0.16764977574348... | |
After reading an introductory book on algorithms and data structures I am now craving for examples on how to combine these for optimal efficiency.
For instance, you can combine hashmaps with specific sorting algorithms to create a simple text search program.
Is there any good book or online resource for this?
(I hav... | [
0.07624410092830658,
-0.08802172541618347,
-0.21193906664848328,
0.21503275632858276,
0.06715703755617142,
0.04782896488904953,
0.10529311746358871,
-0.25946030020713806,
-0.5328132510185242,
-0.7267756462097168,
0.005676888860762119,
0.4219454824924469,
-0.2645573914051056,
-0.17127819359... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.