text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Anyone written or know of a decent PHP helper class written for Constant Contact's new REST API? I've looked at their sample application... has a bunch of inline examples... helpful, but I'm thinking I want to either find or write a helper class to fully encapsulate the API so that all one has to do is interact with t...
[ 0.11766864359378815, -0.13477008044719696, 0.5125744938850403, 0.12375438213348389, -0.09759297221899033, -0.16792677342891693, 0.3596411645412445, 0.18465186655521393, -0.08009342104196548, -0.7182049751281738, 0.035668645054101944, 0.635130763053894, -0.044586438685655594, -0.05559734255...
I have a pretty simple SQL query but something is missing and I didn't find an answer for this problem yet. The thing is that I select some fields with several ids and I want the result to be ordered in this particular order. The query is the following ``` SELECT `content`.* FROM `content` WHERE (user_id = "1" A...
[ 0.23359818756580353, 0.2021653652191162, 0.6375259757041931, 0.04453530162572861, -0.13383938372135162, -0.1169702410697937, -0.14623892307281494, -0.2341015487909317, -0.05364593118429184, -0.3033260107040405, -0.24916428327560425, 0.5037744641304016, -0.30828943848609924, 0.1991244703531...
do what you want: ``` select * from myTable order by field(myID, 8, 7, 6) desc; ``` You can set the order of whatever ID's (or whatever) youwant to appear, and any others will follow after that. Hope that helps. More on this @ <http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_field>
[ 0.2699752151966095, -0.038069844245910645, 0.5406304001808167, -0.3114248514175415, 0.07210918515920639, -0.044764794409275055, 0.007063301745802164, -0.302339643239975, -0.24586959183216095, -0.308759868144989, -0.4487319588661194, 0.7582135200500488, -0.17530840635299683, -0.234883382916...
In Report Builder 2008 I use code such as ``` =Chr(224) ``` in textbox expressions to get Wingdings chars such as the up, down, straight arrows, etc. I run the report and it looks fab on screen, as well as exported to Excel. But if I export to PDF, I've noticed any Wingdings with character values above 127 do not ...
[ -0.18654301762580872, 0.2599019408226013, 0.38934066891670227, -0.13160109519958496, -0.43525075912475586, -0.04465269669890404, 0.2030952125787735, -0.5070909857749939, 0.06522863358259201, -0.4330503046512604, 0.09427718073129654, 0.640621542930603, -0.3466426730155945, -0.27202808856964...
their excellent PDF export feature, the encoding says "Built in" and the Wingdings characters all look great.) Wingdings under Chr(127) look fine on the SSRS reports. Any idea if I can do anything about the higher chars? Thanks, Bill I got an answer over at the official Sql Server Reporting Service [forum](http://soc...
[ 0.13979308307170868, 0.42070767283439636, 0.42427316308021545, 0.20116858184337616, 0.026006801053881645, -0.33520978689193726, 0.03832920640707016, 0.12684878706932068, -0.4551931321620941, -0.5081357359886169, -0.10952608287334442, 0.37680163979530334, 0.013809103518724442, -0.0157451312...
When I use an XML example file to generate an XSD, using both Visual Studio and Oxygen, it generates a file using tons of `<xs:element ref="ELEMENTNAME" />`, where elementname is an actual element name. Later in the file, it has an element `<xs:element name="ELEMENTNAME" type="xs:string" />` where it defines what that ...
[ 0.2947867810726166, 0.1019400879740715, 0.44334277510643005, -0.11908829212188721, -0.18545082211494446, 0.03527197986841202, -0.10606198757886887, -0.5228038430213928, 0.005247131921350956, -0.7990881204605103, -0.1575905829668045, 0.34311503171920776, -0.21281707286834717, -0.13933382928...
<xs:element ref="BillerShortName" /> <xs:element ref="FileIndicator" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="VersionNumber" type="xs:string" /> <xs:element name="BillerGroupID" type="xs:string" /> <xs:element name="BillerGroupShortName" type="xs:string" /> <xs:element name="...
[ -0.15504151582717896, 0.1631695181131363, 0.28600290417671204, -0.17932681739330292, 0.016533251851797104, -0.0712013691663742, 0.1500493437051773, -0.49487796425819397, -0.2269016057252884, -0.566317081451416, -0.22138500213623047, 0.3128226101398468, -0.41757407784461975, 0.0209519937634...
obvious solution seems to be to manually edit my file to look like this, manually removing the REF statements: ``` <xs:element name="Header"> <xs:complexType> <xs:sequence> <xs:element name="VersionNumber" type="xs:string" /> <xs:element name="BillerGroupID" type="xs:string" /> <xs:element na...
[ 0.10393872112035751, 0.10111382603645325, 0.5773453116416931, -0.26763594150543213, 0.09309638291597366, -0.09363412111997604, 0.32670435309410095, -0.3453907072544098, -0.2606187164783478, -0.7144547700881958, 0.049030788242816925, 0.39778628945350647, -0.0973159521818161, 0.1975579559803...
of elements, this isn't really feasable. Is there a way to tell my tool to generate the file without using REFs, but instead just placing a copy of the element where it ought to be instead of at the root level? If you have a Visual Studio BizTalk project you can choose "Add generated items.." and then "Generate schemas...
[ 0.6498048305511475, -0.16562260687351227, 0.5316386222839355, 0.18070927262306213, -0.24981698393821716, -0.2522262632846832, 0.14351661503314972, -0.34507471323013306, -0.3183957040309906, -0.6793741583824158, -0.05149885639548302, 0.572016179561615, -0.41011661291122437, -0.0688292086124...
VS guessed wrong :) See this person's sample [Add generated schemas](http://www.codeproject.com/KB/biztalk/AutoGenSchema.aspx)
[ 0.324838787317276, -0.17383785545825958, -0.10674227774143219, 0.26802825927734375, -0.21244002878665924, 0.2012297362089157, 0.25248825550079346, -0.3866344690322876, -0.32646259665489197, -0.20424413681030273, -0.186151385307312, 0.31388059258461, -0.23441626131534576, -0.171104580163955...
How do I get the filename without the extension from a path in Python? ``` "/path/to/some/file.txt" → "file" ``` Getting the name of the file without the extension: ``` import os print(os.path.splitext("/path/to/some/file.txt")[0]) ``` Prints: ``` /path/to/some/file ``` [Documentation for `os.path.splitext`](...
[ 0.2587342858314514, 0.0745374858379364, 0.6305436491966248, -0.1461566686630249, 0.2458374798297882, -0.2162139117717743, -0.09924409538507462, -0.39327341318130493, -0.2655794322490692, -0.7786552309989929, -0.2573676109313965, 0.5557263493537903, -0.032612916082143784, 0.1887001991271972...
I have a CSS class that makes my links look like nice looking buttons. I would like to be able to apply the same style to Submit buttons and make them look the same as well. The trickiest part is that the anchor tags need to have a span inside them, I don't think that is possible with form submit buttons. So does anyon...
[ 0.4036496877670288, 0.10471994429826736, 0.5597259998321533, 0.12669676542282104, -0.32593798637390137, -0.13136714696884155, -0.0012382445856928825, -0.13341525197029114, -0.19826236367225647, -0.5314006805419922, -0.017033403739333153, 0.36560630798339844, -0.39711013436317444, -0.093607...
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:16px; font-weight:bold; height: 24px; margin-right: 6px; padding-right: 18px; /* sliding doors padding */ text-decoration: none; } a.button span { background: transparent url('images/all_pages/bg_button_span.jpg') no-repeat; d...
[ -0.25317156314849854, 0.046719253063201904, 0.7018643617630005, -0.06465180963277817, -0.3336949050426483, 0.6890282034873962, 0.22552093863487244, -0.3071978986263275, -0.2547874450683594, -0.7093433737754822, -0.36496883630752563, 0.223677858710289, -0.2446213960647583, -0.01574127189815...
gives you much more styling freedom. Once you have switched your forms' submit buttons to use the `<button>` tag, you can then apply the same CSS to both your links and your buttons: ``` a.button, button { /* ... */ } a.button span, button span { /* ... */ } a.button:hover, a.button:focus, button:hover, button:fo...
[ 0.14598266780376434, -0.3670283854007721, 0.8536795377731323, -0.14835169911384583, -0.4056170880794525, 0.3842276632785797, -0.03467759117484093, -0.24073724448680878, -0.2593342959880829, -0.8198729753494263, -0.04502495750784874, 0.44245779514312744, -0.10374831408262253, -0.32772225141...
Currently after I create a release branch, but when we have some time before we release, I sometimes open the entire branch for edit and then lock all files in order to prevent anybody from modifying anything during "code-freeze" period in the release branch. Is there a better way? Doing it my current way seems possi...
[ 0.476958692073822, 0.027654115110635757, 0.4677046537399292, 0.14284367859363556, 0.13543623685836792, -0.4709834158420563, 0.34802618622779846, -0.21784859895706177, -0.3299035429954529, -0.4051609933376312, -0.23461459577083588, 0.6983315944671631, 0.07165420800447464, 0.1439312398433685...
file at potentially 100s of lines would get cumbersome as well. Any ideas? P4 protect is probably the right answer for most people as explained in other answers. However in my organization I can't be the admin so way of doing this is to have a trigger script in perforce that reads a text file that non-admins have wr...
[ 0.11074043065309525, 0.11424832791090012, 0.480058491230011, 0.057733722031116486, -0.11241671442985535, -0.15549902617931366, 0.4752022325992584, 0.02030017599463463, -0.1893927901983261, -0.6005844473838806, -0.14042545855045319, 0.685320258140564, -0.13557614386081696, -0.10782899707555...
I am trying to install the javax.comm api on a machine (I already installed on another machine and it is working fine) but when I run the sample "BlackBox" application I get a message that says "No serial ports found!". I have followed the instructions and put win32com.dll in the bin directory of the jdk, comm.jar in t...
[ 0.27818989753723145, 0.349457710981369, 0.1702534556388855, -0.3403761684894562, -0.13539783656597137, -0.2467317283153534, 0.46449002623558044, 0.07162593305110931, -0.20075340569019318, -0.9473514556884766, 0.21642079949378967, 0.7446412444114685, -0.423089861869812, 0.3888062834739685, ...
find any serial ports. Can anybody help me with this? There's a `jre` directory in your JDK directory. Use `<jdk>/jre/lib`, not `<jdk>/lib`. Also, if you've added another copy of `comm.jar`, located elsewhere, explicitly to your classpath, take it out. You might want to add a `System.out.println(System.getProperty("ja...
[ 0.009077386930584908, 0.2761794626712799, 0.15637585520744324, -0.16395124793052673, 0.2962745130062103, -0.19122174382209778, 0.25371935963630676, 0.22558732330799103, -0.39810803532600403, -0.9765901565551758, 0.0662960633635521, 0.43113481998443604, -0.23296698927879333, 0.2230914384126...
I know about the PDF report generator, but I need to use RTF instead. There is [PyRTF](http://pypi.python.org/pypi/PyRTF/0.45) but it hasn't been updated in a while. If that doesn't work and you are willing to do some hacking then I can also point you to the [GRAMPS Project](http://www.gramps-project.org/wiki/index.ph...
[ 0.6619682312011719, -0.07423927634954453, 0.18570174276828766, 0.31714770197868347, -0.1700533628463745, -0.34501203894615173, 0.026080090552568436, -0.24452076852321625, -0.2799108922481537, -0.6226867437362671, 0.17569103837013245, 0.3223557472229004, -0.3161657154560089, -0.155614972114...
Can anyone suggest a regex to match the underscore in the following examples: ``` test_test test[_test test_] ``` But NOT match this: ``` test[_]test ``` This is using the .Net Regular Expression library. I'm using this RegEx tester to check: <http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-exp...
[ 0.06015738472342491, -0.028323723003268242, 0.09166402369737625, -0.026832105591893196, -0.1396075040102005, 0.07444937527179718, 0.2602962553501129, -0.2942860424518585, 0.07483979314565659, -0.29622596502304077, -0.07665646821260452, 0.7318066954612732, -0.30454835295677185, -0.316745012...
Is there a quick way to prevent insertion of repeated data into a table? I mean, the key will always be different but the rest of the entry could be repeated and by so, there would be 2+ different keys identifying the same data. I could search the whole table but i am afraid of the performance lost when doing this. N...
[ 0.2104610800743103, 0.03446274250745773, 0.19019804894924164, 0.2687341570854187, 0.0576210580766201, -0.14202909171581268, 0.15641795098781586, 0.04513513296842575, -0.563176691532135, -0.45608919858932495, 0.1516605168581009, 0.31489184498786926, -0.19052191078662872, 0.11994103342294693...
I am trying to iterate through the range(750, 765) and add the non-sequential numbers 769, 770, 774. If I try adding the numbers after the range function, it returns the range list, then the individual numbers: ``` >>> for x in range(750, 765), 769, 770, 774: print x ... [750, 751, 752, 753, 754, 755, 756, 757, 758,...
[ 0.2694248855113983, 0.3546082377433777, 0.40258198976516724, -0.24777793884277344, -0.05120009183883667, 0.6291148066520691, 0.3072018325328827, -0.49584415555000305, -0.2275225967168808, -0.4844869077205658, -0.11533673852682114, 0.6139572262763977, -0.4259701371192932, -0.029644113034009...
I have a TSQL SELECT that can return a null. I tried using ISNULL to replace it with 0 but for some reason it is not working. The table selecting from has the following columns: * storeID --> int * penaltyPercent --> decimal(9,2) * penaltyDate --> dateTime ```sql SELECT ISNULL(penaltyPercent, 0.0) AS penaltyPercent ...
[ 0.0640396997332573, -0.35177165269851685, 0.4558764100074768, -0.28959038853645325, 0.06837238371372223, 0.17995434999465942, -0.037292446941137314, -0.2505645751953125, -0.012419445440173149, -0.2793613374233246, 0.1487514227628708, 0.0022967513650655746, -0.15415318310260773, 0.154809147...
dbo.Penalty AS Penalty_1 WHERE (penaltyDate <= @date) AND (storeID = @storeID))) AND (storeID = @storeID) ``` When the date is before the first penalty date (when there should be 0 penalty), no result is returned. Not sure why this doesn't work. I have a work around but it is b...
[ 0.15450438857078552, -0.24849170446395874, 0.2600998878479004, -0.3050805926322937, -0.11212700605392456, -0.09995908290147781, 0.32245340943336487, -0.5409643054008484, -0.12050089985132217, -0.5018678307533264, -0.08400184661149979, 0.1194838210940361, -0.47840893268585205, 0.20492351055...
penaltyPercent 182 10/1/2008 12:00:00 AM 0.020000 182 11/1/2008 12:00:00 AM 0.040000 182 12/1/2008 12:00:00 AM 0.070000 ``` When you say "When the date is before the first penalty date", do you mean when the value of `@date` is less than the value returned from this query? ``` SELECT MIN(...
[ -0.11538928747177124, -0.4363083243370056, 0.41794437170028687, -0.12977147102355957, -0.3081405460834503, -0.014406751841306686, 0.2693202495574951, -0.24966788291931152, -0.17309942841529846, -0.4280414283275604, 0.07736814767122269, 0.4920383095741272, -0.27590712904930115, -0.060412235...
return false, ``` WHERE (penaltyDate = ... ``` Because comparisons with null always return null. So instead of selecting one row with a null value, you're selecting no rows. Addendum: To confirm this is the problem, change your outer query's first line to ``` SELECT ISNULL(MAX(penaltyPercent),0.0) AS penaltyPerc...
[ 0.0075809466652572155, -0.3172900080680847, 0.3149435222148895, -0.03243321552872658, 0.17161181569099426, 0.04356412962079048, 0.26016977429389954, -0.19645385444164276, 0.14760525524616241, -0.4350343644618988, 0.15924778580665588, 0.43316927552223206, -0.3920849561691284, 0.071777604520...
I have a try catch block to handle an error I am getting with my application. I would like a simple way of setting the response to status code 403 or forbidden and then either redirect the user to the login page or to a custom error page. I am having some issue with once setting the status code and the redirect. Anyo...
[ 0.16714054346084595, 0.11350256949663162, 0.2157246172428131, 0.03041049651801586, 0.13416138291358948, -0.08498241752386093, 0.45349663496017456, -0.05492696911096573, -0.25290653109550476, -0.4178954064846039, -0.2108370065689087, 0.408656507730484, -0.33978506922721863, 0.14042066037654...
In my application I have students, professors and staff. Staff members do not need a profile but professors and students each need a different profile. I'd rather not implement it all myself (middleware and whatnot), so is there anyway to just have get\_profile() return a different profile depending on a user's role? W...
[ 0.06015603244304657, 0.26469188928604126, 0.3827318549156189, -0.17718291282653809, -0.08854297548532486, -0.031270019710063934, 0.18141846358776093, -0.15035904943943024, -0.04557320848107338, -0.7988842129707336, -0.08926258236169815, 0.48327693343162537, -0.15313464403152466, 0.13600456...
return StudentProfile._default_manager.get(user_id__exakt=self.id) else: # staff return None ``` get\_profile needs the caching code from the original and so on. But essentially you could do something like that. With Django 1.0.x you could implement derived classes based on User, but this might break...
[ 0.39833366870880127, 0.06223932281136513, 0.17400595545768738, -0.02131880447268486, -0.2244890183210373, -0.28209564089775085, 0.15673856437206268, -0.027401532977819443, 0.0058226389810442924, -0.7535107731819153, -0.013410218991339207, 0.5339691638946533, -0.14137451350688934, -0.008815...
I need to capture the first frame of a video uploaded on an asp.net website. I really would like to do this with WPF (if it's even possible), but if anyone knows an easier way, I am open to that too. I have seen examples of this using MediaPlayer and RenderTargetBitmap in WPF, but each example assumes the video is ac...
[ 0.39530566334724426, -0.24311648309230804, 0.482646644115448, 0.15892384946346283, -0.17518708109855652, -0.1783452033996582, -0.0725778341293335, -0.17532265186309814, -0.5058178305625916, -0.7438485622406006, -0.03553875535726547, 0.36487534642219543, -0.08958465605974197, 0.012830661609...
first frame of videos uploaded to my site. This probably isn't the most ideal solution, but I don't have any DirectShow experience and, in my opinion, this solution is much simpler than other suggestions mentioned. I was not able to get around saving the file to the file system, so I simply wrote the uploaded bytes o...
[ 0.4609498977661133, -0.04054607078433037, 0.523594319820404, 0.18594913184642792, -0.14552123844623566, 0.05707532539963722, -0.08193512260913849, -0.047699857503175735, -0.3319615125656128, -0.5487614870071411, 0.10503995418548584, 0.3819921016693115, -0.37280580401420593, 0.1430804580450...
I have a separate Windows service that I can offload the work to with no problem. The syntax for obtaining a single frame is as follows: ``` FFMpeg.exe -i "c:\MyPath\MyVideo" -vframes 1 "c:\MyOutputPath\MyImage%d.jpg" ``` The %d is very important. If you do not include this, FFMpeg will throw an error. The %d will ...
[ 0.4055010676383972, 0.3158878684043884, 0.30617594718933105, 0.13959521055221558, -0.1911974400281906, 0.23410958051681519, 0.014050142839550972, -0.3043760061264038, -0.1806154102087021, -0.6500811576843262, -0.005800079554319382, 0.37249690294265747, -0.4919208288192749, 0.02170466817915...
Is YUI3 ready mature enough? What are its advantages and disadvantages compared to YUI? @Corwin is incorrect about files changing on the yui.yahooapis.com servers -- if you use the YUI 3 PR 2 release from our servers, those files will remain there even when subsequent releases come out. It's true that the API will cha...
[ 0.35622498393058777, -0.19883662462234497, 0.6971991062164307, -0.11795523017644882, -0.2898528277873993, -0.20838643610477448, 0.1524021178483963, -0.35407108068466187, 0.31482401490211487, -0.43862688541412354, -0.2059047967195511, 0.4588491916656494, 0.0354892760515213, 0.06696791201829...
current release in the 2.x codeline) -- is the primary reason to hold off right now. You can learn more about YUI 3 and how it's different from 2.7.0 here: <http://video.yahoo.com/watch/3711767/10207432> We're using YUI 3 on the next version of Yahoo's homepage. You can read about that here: <http://yuiblog.com/blo...
[ 0.20887845754623413, -0.057769905775785446, 0.6314176321029663, -0.44492945075035095, -0.6178170442581177, -0.41044870018959045, 0.4743219017982483, -0.19475935399532318, 0.0376853309571743, -0.450620174407959, -0.40185776352882385, 0.5403215289115906, -0.21819323301315308, -0.024535275995...
I am trying to do a request that accepts a compressed response ``` var request = (HttpWebRequest)HttpWebRequest.Create(requestUri); request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate"); ``` I wonder if when I add the second line I will have to handle the decompression manually. I found the answer. ...
[ -0.24995459616184235, 0.06811679154634476, 0.6704302430152893, -0.12188313156366348, -0.12022117525339127, 0.17067760229110718, 0.6841925382614136, -0.4344968795776367, -0.24548973143100739, -0.7552754282951355, -0.6701809167861938, 0.568473756313324, -0.48707839846611023, 0.06022454798221...
I've been a Visual Studio user since 1997, and used VB 3.0 before that. My whole professional life has been spent inside the Microsoft development environments. Now I would like to branch out into Ruby on Rails to try something different, and it doesn't have the kind of vendor support that C# does (for very obvious re...
[ 0.5989137887954712, 0.3214113414287567, 0.0074499077163636684, -0.33475321531295776, -0.3382885456085205, -0.009889946319162846, 0.16441792249679565, 0.46327757835388184, -0.14976733922958374, -0.44039928913116455, 0.2891741394996643, 0.9301408529281616, 0.07334448397159576, 0.146855294704...
[Ruby in Steel](http://SapphireSteel.Com/Ruby-In-Steel-Developer-Overview) plugin by [Sapphire Steel](http://SapphireSteel.Com/). The best traditional IDE for Ruby is probably [NetBeans](http://NetBeans.Org/), it even has a special stripped-down [Ruby Edition](http://NetBeans.Org/features/ruby/). However, note that un...
[ 0.16809768974781036, -0.023667993023991585, -0.46197912096977234, 0.13008122146129608, -0.623974621295929, -0.01665269210934639, 0.44605553150177, 0.006053766701370478, -0.09757896512746811, -0.16511854529380798, -0.11240862309932709, 0.2389601320028305, -0.16751109063625336, -0.2516103684...
want to read. While I don't agree with everything he writes (mostly because I don't use Rails), it is a pretty good introduction of how you might want to setup a development environment specifically for Rails.
[ 0.5287646055221558, 0.24115349352359772, -0.08170171082019806, 0.38681745529174805, 0.17713959515094757, -0.21904700994491577, 0.15226095914840698, 0.3303486406803131, -0.013736319728195667, -0.6652984023094177, 0.11223525553941727, 0.5740845799446106, -0.25757089257240295, 0.0112372189760...
In which cases to you need to watch out for Concurrency problems (and use lock for instance) in ASP.NET? * Are there 'best practices' around on this topic * Documentation? * Examples? * 'worst practices...' or things you've seen that can cause a disaster...? I'm curious about for instance singletons (even though the...
[ 0.39108017086982727, 0.18786922097206116, -0.17938296496868134, 0.026014912873506546, -0.19009368121623993, -0.3413079082965851, 0.37896260619163513, 0.30474257469177246, -0.6877738833427429, -0.6215962171554565, -0.027069639414548874, 0.5666556358337402, -0.2218102216720581, 0.06393747776...
with is managing application cache but this is easily done with a cache-management type that wraps the .NET caching mechanisms.
[ -0.2451675534248352, -0.018906844779849052, -0.14292611181735992, -0.11835260689258575, -0.08303060382604599, -0.6163498163223267, 0.26876139640808105, -0.2442024052143097, -0.22006545960903168, -0.5385645627975464, -0.20120909810066223, 0.4288758635520935, -0.5276570916175842, 0.093695595...
I have a function defined in AS3 that's gonna be called from client side via JavaScript. The AS3 functions simply print some value on SWF screen when it's called. It works fine when I set an onclick event handler to a button and call the AS3 function. However I want to call this AS3 function as soon as the page loads....
[ 0.5229225158691406, -0.04280245304107666, 0.4906398355960846, -0.2830636203289032, -0.06691652536392212, -0.1629742532968521, 0.39633429050445557, -0.24251465499401093, -0.2031933069229126, -0.6077497005462646, -0.11040174216032028, 0.7924625873565674, -0.2777887284755707, 0.09356094896793...
event handler on the , but that also does not work - produces the same error. So, my question is, how do I call an AS3 function automatically once page loads? In my project, I need to pass some client side initialization information to the flash once page loads. You'll need to have your flash call a function in the p...
[ -0.1224643886089325, -0.07942511886358261, 0.290317177772522, -0.3109191358089447, -0.12089964747428894, -0.1417219042778015, 0.14347748458385468, -0.2145945131778717, -0.09992550313472748, -0.5844107270240784, -0.32559409737586975, 0.7321780323982239, -0.38169145584106445, -0.228637933731...
I have been asked recently to produced the MIPS (million of instructions per second) for an algorithm we have developed. The algorithm is exposed by a set of C-style functions. We have exercise the code on a Dell Axim to benchmark the performance under different input. This question came from our hardware vendor, but ...
[ 0.48730114102363586, -0.02161216177046299, 0.1336248368024826, 0.4439529478549957, 0.019022269174456596, -0.05318598449230194, 0.11038676649332047, 0.09676706790924072, -0.13379737734794617, -0.6035826206207275, -0.06984011828899384, 0.1717161238193512, -0.164446622133255, 0.27674436569213...
simply quote the total number of assembly instructions? 2. If 1 is true, how do you do this (ie. how to measure the number of assembly instructions) either in general or specifically for ARM/XScale? 3. Can 2 be performed on a WM device or via the Device Emulator provided in VS2005? 4. Can 3 be automated? Thanks a lot ...
[ 0.8786306977272034, -0.046256303787231445, 0.11460709571838379, 0.15662728250026703, -0.18977291882038116, -0.04658770188689232, 0.6047792434692383, -0.31265103816986084, -0.3012557029724121, -0.25724872946739197, 0.11188306659460068, 0.3596731126308441, -0.18436257541179657, 0.02014940604...
benchmark to calculate MIS. 6 Since the algorithm does not need to be run in real time, is MIPS really a useful measure? (eg. factorial(N)) What are other ways to quantity the processing requirements? (I have already measured the runtime performance but it was not a satisfactory answer.) 7 Finally, I assume MIPS is a...
[ 0.31916680932044983, -0.15627679228782654, 0.3255685567855835, 0.2612724006175995, 0.12251701951026917, 0.23340357840061188, 0.31547003984451294, -0.11602199822664261, -0.3702297806739807, -0.6097371578216553, -0.1125716045498848, 0.674426257610321, 0.018488222733139992, 0.0184730514883995...
MIPS. Software consumes MIPS. You have two degrees of freedom. * The processor's inherent MIPS offering. * The number of seconds during which you consume that many MIPS. If the processor doesn't have enough MIPS, your algorithm will be "slow". if the processor has enough MIPS, your algorithm will be "fast". I put ...
[ 0.302992045879364, -0.07292300462722778, 0.27395328879356384, 0.1985592544078827, 0.1935492306947708, -0.1469501554965973, 0.577558159828186, -0.25522735714912415, -0.3370916247367859, -0.6077720522880554, -0.2880914807319641, 0.6476139426231384, -0.2932884693145752, -0.08546876162290573, ...
seconds. --- How many MIPS do you need? 1. Get the official MIPS for your processor. See <http://en.wikipedia.org/wiki/Instructions_per_second> 2. Run your algorithm on some data. 3. Measure the exact run time. Average a bunch of samples to reduce uncertainty. 4. Report. 3 seconds on a 750 MIPS processor is -- well ...
[ 0.4309869408607483, -0.19301852583885193, 0.3009328842163086, 0.22493202984333038, 0.052747536450624466, -0.038629062473773956, 0.5454279780387878, -0.11907074600458145, -0.3508867025375366, -0.7785671949386597, -0.14601169526576996, 0.4485437273979187, 0.022721795365214348, -0.26520842313...
I have a user control that contains a 2-column TableLayoutPanel and accepts commands to dynamically add rows to display details of an item selected in a separate control. So, the user will select a row in the other control (a DataGridView), and in the SelectedItemChanged event handler for the DataGridView I clear the d...
[ -0.060160212218761444, -0.17893895506858826, 0.6253848075866699, 0.1815880984067917, 0.15391092002391815, 0.18139882385730743, -0.05077820643782616, -0.09511067718267441, -0.2771088778972626, -0.8028790950775146, 0.12570562958717346, 0.30905023217201233, -0.05826931819319725, 0.24786405265...
time, the refreshes become VERY slow (3-5 seconds each). That makes it sound like I'm not disposing everything properly, but I can't figure out what I'm missing. Here's my code for clearing the TableLayoutPanel: ``` private readonly List<Control> controls; public void Clear() { detailTable.Visible = false; de...
[ 0.1490330547094345, -0.10358072072267532, 0.7422491312026978, -0.19971293210983276, 0.5678050518035889, -0.024994051083922386, 0.26937323808670044, -0.43934255838394165, -0.2101818323135376, -0.5570768117904663, -0.3471788763999939, 0.6844431757926941, 0.011861409060657024, 0.1736102253198...
} controls.Clear(); } ``` And once I get finished loading up all the controls I want into the TableLayoutPanel for the next detail display here's what I call: ``` public void Render() { detailTable.ResumeLayout(false); detailTable.PerformLayout(); ResumeLayout(false); detailTable.Visible = true; ...
[ 0.061667099595069885, 0.03977551683783531, 0.7284709811210632, -0.19675053656101227, 0.37955620884895325, 0.05761287361383438, 0.16356559097766876, -0.22208695113658905, -0.12231869995594025, -0.6948578953742981, -0.0700463205575943, 0.8279935717582703, -0.10442116856575012, -0.04959512129...
(determined by stepping through it in the debugger). This way I know I get them all. I'd be interested in any suggestions to improve drawing performance, but particularly what's causing the degradation over multiple selections. I changed the containing form to just construct a new version of my user control on each se...
[ 0.3312222957611084, -0.07656596601009369, 0.455350399017334, 0.18107715249061584, -0.1258087456226349, 0.21157217025756836, -0.2382296323776245, -0.33093345165252686, -0.1991620510816574, -0.6659449338912964, 0.16338840126991272, 0.3222067654132843, -0.2681816518306732, 0.02767130546271801...
new one. Unfortunate that the TableLayoutPanel leaks like that, though.
[ -0.0008995425887405872, 0.1133713573217392, 0.3050364851951599, 0.26349154114723206, 0.17639732360839844, -0.37048500776290894, -0.1888325810432434, -0.008908714167773724, -0.427886426448822, -0.6706538796424866, 0.10130303353071213, 0.27586913108825684, 0.16994135081768036, 0.060443919152...
[Best Practices for Speeing Up Your Web Site](http://developer.yahoo.com/performance/rules.html) from Yahoo includes the following recommendation: > When users request a page, it can take anywhere from 200 to 500ms for the backend server to stitch together the HTML page. During this time, the browser is idle as it wai...
[ 0.5045996904373169, -0.23146088421344757, 0.4890296459197998, 0.029089588671922684, -0.4066193699836731, -0.1504838466644287, 0.25417476892471313, -0.3938281238079071, -0.45755940675735474, -0.4686454236507416, 0.005807117093354464, 0.4193047881126404, -0.034133415669202805, -0.33399593830...
or light frontends. > > > A good place to consider flushing is right after the HEAD because the HTML for the head is usually easier to produce and it allows you to include any CSS and JavaScript files for the browser to start fetching in parallel while the backend is still processing. > > > Example: ``` ... <!-- c...
[ 0.07377710193395615, -0.23317155241966248, 0.8170637488365173, -0.060433804988861084, -0.30901941657066345, -0.0864260196685791, -0.05073140934109688, -0.14448699355125427, -0.3481423556804657, -0.7407763600349426, -0.12096463143825531, 0.4001109004020691, -0.11480213701725006, -0.29929757...
is rendered and served. Is there a way to flush after the head (or any other part of the page) explicitly using ASP.NET? You should be able to put the following in your page between the end of the head and the beginning of the body statement: ``` <% Response.Flush(); %> ``` However, be careful here in the event tha...
[ 0.13299518823623657, -0.16379885375499725, 0.7817369699478149, -0.2860410809516907, -0.14415985345840454, -0.11861243098974228, 0.24359235167503357, -0.02092714235186577, 0.08291623741388321, -0.7524687647819519, -0.48411354422569275, 0.3767769932746887, 0.030091343447566032, -0.2515248954...
There are a few ways to do this in javascript. Foremost and most readable and flexible is probably: ``` if (a){ //b } else { //c } ``` Something else that only\* works with assigning and is less readable is: ``` var foo = 'c'; if (a){ foo = 'b'; } ``` My main question, though, is about the last two m...
[ 0.01582040637731552, -0.034515876322984695, 0.09496805816888809, -0.15527577698230743, -0.3862934708595276, 0.006890454795211554, 0.17235572636127472, -0.3028539717197418, -0.1065431609749794, -0.5685762763023376, -0.12348969280719757, 0.6315758228302002, -0.4711441993713379, -0.4052567481...
after the if statement. Suppose: ``` var a = false, b = '', c = 'bar'; ``` Then: ``` var foo = a ? b : c; // foo == '' var foo = a && b || c; // foo == 'bar' ``` The two are not equivalent; you should never use the boolean operators in place of the conditional operator. Like other answerers, I also am of the opin...
[ -0.01781657338142395, 0.1929207295179367, 0.003495721146464348, -0.4819396138191223, -0.12595829367637634, -0.1378609538078308, 0.33607587218284607, 0.062446724623441696, 0.20893757045269012, -0.1337890774011612, -0.5515788793563843, 0.6769422888755798, -0.46366968750953674, -0.03946343809...
I want to hide a form input field. But calling setVisible('inputID', false) causes my liquid layout to collapse. I don't want that. Is there some easy workaround here? I thought about trying to render the input field's foreground color, background color, and border color to be all white. But that's getting unnecessari...
[ 0.3213759958744049, 0.009197842329740524, 0.14468514919281006, -0.005499838385730982, 0.11212998628616333, -0.03392263501882553, 0.41140016913414, -0.08181139081716537, -0.031917981803417206, -0.7214407920837402, 0.006814844906330109, 0.31979942321777344, -0.4219224452972412, 0.14243760704...
first option and you want to use the second option instead. Example: ``` document.getElementById('inputID').style.visiblity = 'hidden'; ```
[ -0.026362942531704903, -0.5735033750534058, 0.22770288586616516, 0.03080986998975277, 0.312344491481781, -0.377160906791687, 0.2443970888853073, 0.08894484490156174, -0.10154419392347336, -0.6850639581680298, -0.6851811408996582, 0.7592324614524841, -0.2686992585659027, 0.04293848574161529...
I want to make an archive\_index page for my django site. However, the date-based generic views really aren't any help. I want the dictionary returned by the view to have all the years and months for which at least one instance of the object type exists. So if my blog started in September 2007, but there were no posts ...
[ 0.25644955039024353, 0.4205700159072876, 0.5484932065010071, -0.1478634923696518, -0.34170830249786377, -0.06838826835155487, 0.09855856001377106, 0.3800770342350006, -0.5264695882797241, -0.41611889004707336, 0.2684231400489807, 0.1009119302034378, -0.1052153930068016, 0.33116063475608826...
might not need the draft filter, and change 'post\_date' to your field name, etc.
[ 0.3164762258529663, -0.139672189950943, -0.02760755456984043, 0.033329933881759644, 0.3648507595062256, -0.3421582281589508, -0.023796847090125084, 0.2862020432949066, -0.13006149232387543, -0.6154905557632446, -0.226880744099617, -0.15003111958503723, 0.19368009269237518, 0.24610039591789...
i like to make very simple 3d/2d game for pc/mac/linux what is the best free 3d/2d engine for this ? i have no experience in game programming so i guess it have to be easy to learn please in c++ thanks While 'best' can very much depend on your situation, one I have used in the past to great success is [OGRE 3D](http:/...
[ 0.2740451395511627, 0.2233147919178009, 0.16963611543178558, 0.14349915087223053, -0.3110063970088959, -0.024748709052801132, 0.0878642201423645, 0.48678264021873474, -0.11293255537748337, -0.6846780776977539, 0.2881052792072296, 0.697616457939148, -0.0360354483127594, 0.3058045506477356, ...
on their forum/wiki. The documentation is also very good. It's well worth checking out. Hrmm, upon reading that it almost sounds like I have a vested interest - I don't! I just really like it from past experience!
[ 0.9316495060920715, 0.26610636711120605, 0.10005244612693787, -0.005710001103579998, 0.2123541384935379, -0.4089788794517517, 0.15755683183670044, 0.6674042344093323, -0.19711855053901672, -0.13120435178279877, 0.08859584480524063, 0.3629836440086365, 0.45213499665260315, 0.452067255973815...
Me again.. I hear the phrase 'decorating / decorate' a method being thrown about a lot in tutorials I have read / watched. But I just don't understand what it means AND what it actually does?? Can anyone point me in the direction of some information on beginning to use them (Very novice tutorial would be good) .NET doe...
[ 0.8729106783866882, -0.020905282348394394, 0.1953703910112381, 0.3264662027359009, -0.08769417554140091, -0.012644115835428238, 0.17327246069908142, -0.2247120440006256, -0.2737627327442169, -0.6294441819190979, 0.1258263736963272, 0.549372673034668, 0.2951466143131256, 0.1708437204360962,...
I am having a strange problem with boolean logic. I must be doing something daft, but I can't figure it out. In the below code firstMeasure.isInvisibleArea is true and measureBuffer1 is nil. Even though test1 is evaluating to NO for some reason it is still dropping into my if statement. It works ok if I use the comment...
[ -0.15162202715873718, -0.19146116077899933, -0.08790656179189682, -0.3906470835208893, -0.3024958670139313, -0.09760458767414093, 0.4163351058959961, -0.4494566321372986, 0.11231060326099396, -0.45561736822128296, -0.3313871920108795, 0.2850154638290405, -0.29534175992012024, -0.1130067259...
some action } ``` --- Update 1: I isolated the problem to !firstMeasure.isInVisibleArea as I've entirely taken on the measureBuffer bit. Inside isInVisible area is a small calculation (it doesn't modify anything though), but the calculation is using self.view.frame. I am going take this out of the equation as well ...
[ 0.0674668401479721, -0.19469936192035675, 0.2698175311088562, -0.2304151952266693, -0.27745896577835083, -0.0983433648943901, 0.22039933502674103, -0.3583383560180664, -0.23611903190612793, -0.4929335117340088, 0.045912399888038635, 0.5305789113044739, -0.4139726459980011, -0.1825781464576...
moving. I think I need to grab the value of firstMeasure.isInVisibleArea at the start of the method and use that value throughout. Phew. Boolean logic isn't broken. All is right with the world. Thanks for all your input
[ 0.05566426366567612, -0.20172259211540222, 0.49616768956184387, 0.41105228662490845, 0.0565933883190155, 0.0859653502702713, 0.11089464277029037, 0.19685553014278412, -0.1946021467447281, -0.5757280588150024, 0.18671290576457977, 0.26025253534317017, -0.0026994154322892427, 0.0476327799260...
I'm trying to implement something like Google suggest on a website I am building and am curious how to go about doing in on a very large dataset. Sure if you've got 1000 items you cache the items and just loop through them. But how do you go about it when you have a million items? Further, suppose that the items are no...
[ 0.5988044142723083, -0.07427691668272018, -0.2722785472869873, 0.5347964763641357, -0.263383150100708, 0.14750012755393982, 0.5029791593551636, 0.4535718560218811, -0.6431983113288879, -0.43536433577537537, 0.2082362174987793, 0.4757038652896881, -0.19518093764781952, 0.2381633222103119, ...
first idea was to group the items by the first two letters, so you would have something like: ``` Dictionary<string,List<string>> ``` where the key is the first two letters. That's OK, but what if I want to do something similar to Pandora and allow the user to see results that match the middle of the string? With my...
[ 0.5259595513343811, -0.28719234466552734, -0.023980606347322464, 0.2827243506908417, -0.47284135222435, 0.25995105504989624, 0.2689956724643707, -0.5044642090797424, -0.22338375449180603, -0.17672273516654968, 0.20279887318611145, 0.6125300526618958, -0.34966418147087097, 0.160800814628601...
the word "THE"), but when you're talking about a million entries which may have to say a few words each possibly, that seems like you'd quickly start using up a lot of memory. Ok, that was a long question. Thoughts? As I pointed out in [How to implement incremental search on a list](https://stackoverflow.com/questions/...
[ 0.13396263122558594, -0.042601462453603745, 0.07878951728343964, 0.18292129039764404, -0.16419415175914764, 0.20020417869091034, 0.11825738847255707, -0.04146495833992958, -0.324407696723938, -0.7721920609474182, -0.07402428984642029, 0.22779393196105957, 0.012648188509047031, 0.1313594877...
I insert some new text into the Trie, I just insert it, then remove the first character, insert again, remove the second character, insert again ... and so on until the whole text is consumed. Then you can discover every substring of every inserted text by just one search from the root. That resulting structure is call...
[ 0.09973905980587006, 0.09680809825658798, 0.2962685823440552, 0.018477724865078926, -0.035538386553525925, 0.33819299936294556, 0.2726840376853943, -0.10961474478244781, 0.12190346419811249, -0.7232574224472046, -0.1058296337723732, 0.32993972301483154, -0.06556124240159988, 0.390279382467...
of children for every node. Depending on the implementation (array, list, binary tree, skip list) of the child node collection, you might be able to identify the required child node with as few as 5 search steps assuming case insensitive latin letters only. Interpolation sort might be helpful for large alphabets and no...
[ -0.0966496467590332, -0.340789794921875, -0.07473094761371613, 0.2681138515472412, 0.3185610771179199, 0.5535911321640015, 0.1998034119606018, -0.19098593294620514, -0.3322157561779022, -0.5453979969024658, -0.2355557084083557, 0.05208195000886917, -0.1609848141670227, -0.18002274632453918...
I have an Action method in an ASP.NET MVC Controller class that handles form posts from a fairly basic "create/edit a user" page. I'm new to MVC so I've been following code samples from various Microsoft tutorials, this is how the method looks currently: ``` [AcceptVerbs(HttpVerbs.Post)] public ViewResult Save([Bind(P...
[ 0.13351452350616455, -0.09280118346214294, 0.7483580708503723, -0.4769946038722992, -0.23971551656723022, 0.056489892303943634, 0.5022090673446655, -0.2710922658443451, -0.3056297302246094, -1.0340460538864136, -0.21291838586330414, 0.17794498801231384, -0.3243647515773773, 0.3085108697414...
using (ProjectDataContext db = DatabaseHelper.CreateContext()) { this.UpdateModel(db.ServiceUsers.Single(su => su.ServiceUserId == SUser.ServiceUserId), "ServiceUser"); db.SubmitChanges(); } } //return a confirmation view } ``` This works fine; ...
[ 0.24026097357273102, -0.22262635827064514, 0.582329511642456, -0.07311848551034927, 0.09668061882257462, -0.04870378598570824, 0.7008991837501526, -0.4383241534233093, 0.047007448971271515, -0.8653391003608704, -0.34587815403938293, 0.4288388192653656, -0.30630841851234436, 0.2511551678180...
the 'ProjectDataContext...' code doesn't belong in the controller. If I were to move the Update functionality to an other class (in the way I have done with the Insert method), I'd lose the convenience of the Controller's UpdateModel() method, and probably end up having to do something quite verbose to read the existin...
[ 0.17388252913951874, -0.22181272506713867, 0.35897332429885864, 0.4166853427886963, -0.044931039214134216, -0.33584150671958923, 0.13685248792171478, 0.026596762239933014, 0.08222822844982147, -0.5897193551063538, -0.17190887033939362, 0.5029833912849426, -0.3254430592060089, 0.24458478391...
Pattern" to move that data access code out of the controller (and to enable unit testing with mock objects instead of the real database). Here are some places to read more: * [Implementation example for Repository pattern with Linq to Sql and C#](https://stackoverflow.com/questions/125453/implementation-example-for-r...
[ 0.2511279582977295, -0.20511244237422943, 0.31518852710723877, 0.17600560188293457, 0.07228286564350128, -0.21803583204746246, 0.1187327429652214, -0.3619385361671448, -0.442644327878952, -0.6465286016464233, 0.12454111874103546, 0.40212687849998474, -0.29953834414482117, -0.05697943270206...
the form, it generally feels cleaner to have different URLs for POSTing an edit vs POSTing a new record. So, here is what the repository pattern in use looks like in a controller's update action: ``` [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(int id, FormCollection formValues) { //get the current objec...
[ 0.15791526436805725, -0.36015039682388306, 0.7155681252479553, 0.08736234903335571, -0.08043403178453445, -0.1917850822210312, 0.08766669780015945, -0.2735968232154846, -0.3797457814216614, -0.5172137022018433, -0.2177719920873642, 0.46618738770484924, -0.32484352588653564, 0.3391890227794...
changes dinnerRepository.Save(); //redirect the user back to the read-only action for what they just edited return RedirectToAction("Details", new { id = dinner.DinnerID }); } catch { //exception occurred, probably from UpdateModel, so handle the validation errors // ...
[ -0.032223112881183624, -0.2858737111091614, 0.7588344812393188, -0.1882917433977127, 0.29801955819129944, 0.0811496153473854, 0.18167297542095184, -0.2546985447406769, -0.27826425433158875, -0.6345980167388916, -0.28467559814453125, 0.6911424994468689, -0.14549724757671356, 0.0180413275957...
//render a view that re-shows the form with the validation rules shown return View(dinner); } } ``` Here is the "Add" example: ``` [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create() { //create a new empty object Dinner dinner = new Dinner(); try { //populate it with the va...
[ 0.10922195762395859, -0.08162961900234222, 0.5980477333068848, -0.35828566551208496, -0.02137373946607113, 0.19726313650608063, 0.16526052355766296, -0.38839903473854065, -0.195998877286911, -0.5265350937843323, -0.21058891713619232, 0.5197356343269348, -0.2755296230316162, 0.1887230277061...
dinnerRepository.Add(dinner); //save the changes dinnerRepository.Save(); //redirect the user back to the read-only action for what they just added return RedirectToAction("Details", new { id = dinner.DinnerID }); } catch { //exception occurred, probably from UpdateMo...
[ 0.04809951409697533, -0.22793729603290558, 0.5748923420906067, -0.2351299226284027, 0.20432880520820618, 0.32115882635116577, 0.2895255386829376, -0.3061450719833374, -0.3030485212802887, -0.5619935393333435, -0.20392462611198425, 0.7859377861022949, -0.13802236318588257, -0.06069621443748...
this extention method is) ModelState.AddRuleViolations(dinner.GetRuleViolations()); //render a view that re-shows the form with the validation rules shown return View(dinner); } } ``` For both examples above, the DinnerRepository looks like this: ``` public class DinnerRepository { pr...
[ -0.12960071861743927, -0.1593518853187561, 0.8045889139175415, -0.24083419144153595, -0.18575967848300934, 0.0333162359893322, -0.0014672649558633566, -0.45015040040016174, -0.2696758210659027, -0.704220712184906, -0.13577015697956085, 0.7252302169799805, 0.029034383594989777, 0.3227329254...
IQueryable<Dinner> FindUpcomingDinners() { return from dinner in db.Dinners where dinner.EventDate > DateTime.Now orderby dinner.EventDate select dinner; } public Dinner GetDinner(int id) { return db.Dinners.SingleOrDefault(d => d.DinnerID == ...
[ -0.25631198287010193, -0.21028172969818115, 0.3201083242893219, -0.22407221794128418, -0.159821018576622, 0.09993743896484375, 0.476911723613739, -0.48031026124954224, 0.03989795967936516, -0.778727114200592, -0.25685638189315796, 0.556932806968689, -0.24725404381752014, 0.4642795324325561...
// // Insert/Delete Methods public void Add(Dinner dinner) { db.Dinners.InsertOnSubmit(dinner); } public void Delete(Dinner dinner) { db.RSVPs.DeleteAllOnSubmit(dinner.RSVPs); db.Dinners.DeleteOnSubmit(dinner); } // // Persistence public void Save() { ...
[ 0.2989186644554138, 0.21035461127758026, 0.27028435468673706, -0.40020623803138733, 0.1713067889213562, 0.31919604539871216, 0.21645191311836243, -0.42573097348213196, -0.31254586577415466, -0.5772293210029602, -0.3916627764701843, 0.6264864206314087, -0.39117753505706787, 0.36686050891876...
I'm looking for a CPAN module that will take a short string: ``` my $hash_value = hash_this('short string not too long'); ``` And hash it into an integer key: ``` say $hash_value; 12345671234 # an integer key ``` Make sure you're not using the Application level cache in your app to store the contents of your I...
[ 0.18392735719680786, 0.36403679847717285, 0.3946080207824707, 0.0034729682374745607, 0.377864807844162, -0.013635321520268917, 0.21963080763816833, -0.011568521149456501, -0.23856887221336365, -0.6225970387458801, -0.05526276305317879, 0.45512381196022034, -0.2787312865257263, 0.3186371326...
I haven't really seen any examples, but I assume that they are saved inside the containing entity table within the database. Ie. If I have a Person entity/aggregate root and a corresponding Person table, if it had a Value Object called Address, Address values would be saved inside this Person table! Does that make se...
[ 0.33063653111457825, 0.1900007277727127, -0.08704087883234024, 0.2381373941898346, -0.05187873914837837, -0.02042711339890957, 0.16698908805847168, 0.16459208726882935, -0.39633888006210327, -0.6512970924377441, 0.32671305537223816, 0.2811912000179291, 0.01884600706398487, 0.39860123395919...
you're misunderstanding Entities vs VOs - it's not a persistence related concern. Here's an example: Assume that a **Company** and **Person** both have the same mail **Address**. Which of these statements do consider valid? 1. "If I modify Company.Address, I want Person.Address to automatically get those changes" 2....
[ 0.018073391169309616, 0.05858466029167175, 0.3996336758136749, 0.06308398395776749, -0.009552277624607086, -0.1135232001543045, 0.06525275111198425, -0.06795810163021088, -0.18388769030570984, -0.5461182594299316, -0.1439882069826126, 0.4679824411869049, -0.29370948672294617, 0.27581804990...
is persisted has nothing to do with Entity/VO semantics.
[ 0.053258612751960754, -0.18539807200431824, 0.36891472339630127, 0.10682972520589828, 0.06999864429235458, -0.20755422115325928, 0.33523932099342346, 0.1793072372674942, 0.005998213775455952, -0.07628682255744934, -0.2691873013973236, 0.25992611050605774, -0.2639780640602112, 0.37145197391...
After years of using the big ugly MFC ASSERT macro, I have finally decided to ditch it and create the ultimate ASSERT macro. I am fine with getting the file and line number, and even the expression that failed. I can display a messagebox with these in, and Abort/Retry/Cancel buttons. And when I press Retry the VS deb...
[ 0.013538888655602932, 0.011401104740798473, 0.22248737514019012, -0.361882746219635, -0.24028612673282623, 0.14653760194778442, 0.42386239767074585, 0.11113455146551132, 0.20427829027175903, -0.6414545178413391, 0.057362478226423264, 1.1174709796905518, -0.02944626659154892, 0.261944502592...
whether to debug it without trying to guess what function it's in from the filename. e.g. if I have the following function: ``` int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { ASSERT(lpCreateStruct->cx > 0); ... } ``` Then when the ASSERT fires, the messagebox would show something like: ``` Functio...
[ 0.11688634008169174, 0.11580470204353333, 0.5328227877616882, -0.21514850854873657, 0.3736337423324585, -0.14591413736343384, -0.15045508742332458, -0.07943543791770935, -0.3284127116203308, -0.5917791724205017, -0.19329068064689636, 0.6903601288795471, -0.3913782238960266, 0.1174683198332...
time**, but it will be the correct function name for each call to your macro. So it "seems like" it happens in run-time ;) e.g. ``` #define THROW_IF(val) if (val) throw "error in " __FUNCTION__ int foo() { int a = 0; THROW_IF(a > 0); // will throw "error in foo()" } ```
[ 0.09351866692304611, -0.06556101888418198, 0.17830230295658112, -0.5760631561279297, 0.24290743470191956, 0.11295408010482788, 0.4365670680999756, -0.34761953353881836, -0.17684094607830048, -0.7810166478157043, -0.08334548026323318, 0.7471551895141602, -0.42840486764907837, 0.098159983754...
I want a Web Service in C# that returns a Dictionary, according to a search: ``` Dictionary<int, string> GetValues(string search) {} ``` The Web Service compiles fine, however, when i try to reference it, i get the following error: "is not supported because it implements IDictionary." ¿What can I do in order to get...
[ 0.2763490676879883, 0.1292700171470642, 0.3923225402832031, 0.0648990198969841, -0.12038545310497284, -0.23368123173713684, 0.2874700725078583, -0.05075892060995102, -0.07369525730609894, -0.6590796113014221, -0.05244619771838188, 0.6091848611831665, -0.24140006303787231, 0.139297932386398...
I'm extending the functionality of a semaphore. I ran into a roadblock when I realized I don't know the implementation of an actual semaphore and to make sure my code ran correctly, I needed to know this. I know a semaphore works by blocking threads that are waiting on it when they call sem\_wait() and another thread...
[ 0.7492290139198303, 0.07526993751525879, 0.37492620944976807, -0.18035967648029327, 0.3001667559146881, 0.0789632797241211, 0.20419271290302277, -0.20298734307289124, -0.11245334148406982, -0.3222702741622925, -0.07768406718969345, 0.057673241943120956, -0.46690627932548523, 0.395853489637...
to be unblocked? Or is the scheme for posting completely different? Thanks! [Semaphores](http://en.wikipedia.org/wiki/Semaphore_(programming)) have two operations: 1. `P()` To acquire the semaphore (you seem to call this `sem_wait`) 2. `V()` To release the semaphore (you seem to call this `sem_post`) Semaphores al...
[ 0.24775761365890503, -0.37123870849609375, 0.5156883597373962, 0.10931023955345154, -0.02961244434118271, 0.030718104913830757, 0.02295435033738613, -0.04788853973150253, -0.33455872535705566, -0.41936254501342773, -0.6296067237854004, 0.04321086034178734, -0.552651047706604, 0.40788903832...
only one thread is allowed at a time, when it calls V(), another (possibly random) thread will then return from its P() call and continue.
[ 0.21711944043636322, -0.4162732660770416, 0.45523545145988464, 0.0616924874484539, 0.16815681755542755, 0.043053094297647476, 0.2948457598686218, -0.008870585821568966, -0.3066214621067047, -0.26436275243759155, -0.42559003829956055, 0.17004220187664032, -0.40209370851516724, 0.41534301638...
Coming from a desktop client background, with no real data-driven web design experience, I am studying ASP.NET UI design to determine the best UI pattern for Parent/Children data. I always tend to experiment with Parent/Child presentation when learning a new UI platform, so that is where I have started here. Thinking ...
[ 0.4021405279636383, 0.12059786915779114, 0.17015722393989563, 0.1578982025384903, -0.09833409637212753, 0.021634913980960846, -0.004474392160773277, 0.19140157103538513, -0.3556847870349884, -1.0467445850372314, 0.12110507488250732, 0.2083190530538559, 0.1574026197195053, 0.496326923370361...
parents to other children, so I'll need to deal with that also. Think: Customers with Open Orders / Open Orders for Selected Customer / Line Items on Selected Open Order... like this screen where I built the same thing in WPF: <http://www.twitpic.com/26w26> Some of techniques I've seen simply creates a plain old-shco...
[ 0.3945187032222748, 0.029752155765891075, 0.044793128967285156, 0.4260096251964569, 0.13080337643623352, 0.10558903217315674, -0.028048792853951454, 0.14709140360355377, -0.17403660714626312, -0.7092054486274719, 0.04519713297486305, 0.43198084831237793, 0.061258066445589066, 0.05968186631...
controls, or do they output their own HTML so they can have more control? Also, it seems like ASP.NET MVC is all the rage right now, so I though I should consider that. When I looked at a few intro's about it, it seems to take a step back in time as it looks like you have to manually create much the HTML to present li...
[ 0.510201632976532, -0.02210964821279049, 0.5381864905357361, 0.28214555978775024, -0.28024470806121826, 0.022266369313001633, -0.03301170840859413, -0.18326011300086975, -0.3755784034729004, -0.5505475401878357, -0.11820612847805023, 0.09701672196388245, -0.32314538955688477, 0.01760514639...
`sem_wait`) 2. `V()` To release the semaphore (you seem to call this `sem_post`) Semaphores also have an integer associated to them, which is the number of concurrent threads allowed to pass P() without blocking. Other calls to P() will block until V() is called to free up spots. That is the classic definition of a s...
[ 0.2874605655670166, -0.25063425302505493, 0.6120439171791077, -0.0821271538734436, 0.07029740512371063, -0.05674748495221138, 0.030002404004335403, -0.04907475784420967, -0.36775776743888855, -0.47725796699523926, -0.483949214220047, -0.06629573553800583, -0.5915421843528748, 0.47926178574...
``` NSData *data; data = [self fillInSomeStrangeBytes]; ``` My question is now how I can write this `data` on the easiest way to an file. (I've already an NSURL `file://localhost/Users/Coding/Library/Application%20Support/App/file.strangebytes`) `NSData` has a method called `writeToURL:atomically:` that does exactl...
[ -0.09408817440271378, 0.18037205934524536, 0.2595619857311249, 0.005140507593750954, -0.04441499337553978, -0.3664611876010895, 0.36629411578178406, 0.02762284316122532, -0.19603224098682404, -0.8913863897323608, -0.1995394229888916, 0.3429062068462372, -0.17844077944755554, -0.25926735997...
I am trying to move an OpenGL app to Windows. It was my understanding that Windows had a decent OpenGL implementation. But I'm starting to think that it doesn't... Specifically, I use array buffers and [glDrawArrays](http://msdn.microsoft.com/en-us/library/dd318837(VS.85).aspx). When I tried to compile my code in Vi...
[ -0.2611628472805023, -0.008817137219011784, 0.49537307024002075, -0.10038762539625168, -0.21617703139781952, 0.45223268866539, 0.45545944571495056, -0.23676685988903046, -0.3167239725589752, -0.7197346091270447, -0.30257561802864075, 0.5953368544578552, -0.8029282093048096, -0.144155845046...