text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I'm building a web application that uses LAMP and the Smarty template framework. The website will have plenty of static content (about us page, error alerts, confirmation emails etc...). The web application must support multiple languages. Is the following approach appropriate? 1) All static copy on Smarty template ...
[ 0.7411186099052429, 0.0953894704580307, 0.5468870401382446, 0.07043901830911636, 0.21881729364395142, -0.29278889298439026, -0.03993562236428261, -0.1055833175778389, 0.14542385935783386, -0.7582780718803406, -0.24236927926540375, 0.542575478553772, -0.2695763111114502, 0.21460530161857605...
value="title"> <en>&lt;a href=&quot;http://stackoverflow.com&quot;&rt;Stackoverflow&lt;/a&rt; is a great site</en> <fr>&lt;a href=&quot;http://stackoverflow.com&quot;&rt;Stackoverflow&lt;/a&rt; c'est website magnifique</fr> <ch>&lt;a href=&quot;http://stackoverflow.com&quot;&rt;Stackoverflow&lt;/a&rt; complex ...
[ 0.02990204468369484, 0.4405815303325653, 0.9242289662361145, -0.33003896474838257, 0.031185390427708626, -0.28258442878723145, 0.28281262516975403, -0.18549923598766327, -0.14897705614566803, -0.581051230430603, -0.41455963253974915, 0.5063085556030273, 0.022858211770653725, 0.092875920236...
will index both versions of the site. Is this a good approach? Is xml the best format for storing content of different languages even though it has htmlentity encoded html tags? Did I overlook anything? Not sure about the details of your question but you may want to take a look at [`Zend_Translate`](http://framework.z...
[ 0.4187670052051544, -0.12491191923618317, 0.23515728116035461, 0.3051038384437561, -0.14622515439987183, -0.4781426191329956, 0.35945507884025574, -0.15972061455249786, 0.01810726709663868, -0.7401289939880371, -0.15934164822101593, 0.3458330035209656, -0.019204551354050636, -0.16082127392...
I have quite a few simple functions that I had previously kept in my *.profile* but I decided to put them in Perl scripts and add aliases to the Perl scripts. I feel like this is a bad idea, but the functionality looks/is better in Perl than bash since it is fairly complex (involving floating point math etc.). Are the...
[ 0.6113355755805969, 0.14838039875030518, -0.03374554216861725, 0.03300326317548752, -0.16943925619125366, -0.46439099311828613, 0.3207393288612366, -0.086931973695755, -0.48355215787887573, -0.36446860432624817, 0.08474113047122955, 0.6542937755584717, -0.19241087138652802, -0.146678209304...
login script? I guess this can be distilled to just a question about the validity of login script refactoring, and if it's valid how it's usually done. I personally have a scripts directory ~/.bin, add it to PATH in [~/.profile](http://lhunath.lyndir.com/stuff/.profile), and keep all my personal scripts in there. I ha...
[ 0.28732672333717346, 0.3071017563343048, 0.16212144494056702, -0.12546122074127197, 0.01783253438770771, -0.08692853152751923, 0.3112882375717163, -0.15723660588264465, 0.11975457519292831, -0.8184036016464233, 0.027417251840233803, 0.5516179203987122, -0.18070390820503235, -0.107122749090...
script. The links show you how I set up those files. By the way, refer to [<http://mywiki.wooledge.org/DotFiles>](http://mywiki.wooledge.org/DotFiles) for a description of how exactly the shell initialization happens; and which types of things go in which files.
[ 0.4533825218677521, -0.15305860340595245, 0.012317716144025326, -0.15045806765556335, 0.07212109863758087, -0.12713217735290527, 0.21784739196300507, 0.30602574348449707, -0.051027651876211166, -0.7381885647773743, 0.12382037937641144, 0.8377645015716553, -0.10058574378490448, -0.155900880...
I have a TCP Client,which puts a packet in a structure ``` using System.Runtime.InteropServices; [StructLayoutAttribute(LayoutKind.Sequential)] public struct tPacket_5000_E { public Int16 size; public Int16 opcode; public byte securityCount; public byte securityCRC; public byte flag; [MarshalA...
[ 0.021223297342658043, 0.33991581201553345, 0.30500438809394836, 0.029944509267807007, 0.13563160598278046, 0.030631808564066887, 0.1822957694530487, -0.5741548538208008, -0.20852147042751312, -0.6475895643234253, 0.06154342740774155, 0.1679515838623047, -0.27192431688308716, 0.215279787778...
= new tPacket_5000_E(); GCHandle pin = GCHandle.Alloc(data, GCHandleType.Pinned); packet = (tPacket_5000_E)Marshal.PtrToStructure(pin.AddrOfPinnedObject(), typeof(tPacket_5000_E)); pin.Free(); ``` **Now,before i continue I must tell you that I'm translating this project from C++ to C#.** This is the problem: The la...
[ -0.1716141700744629, 0.09740084409713745, 0.41591697931289673, -0.20246194303035736, -0.1554674506187439, 0.16266097128391266, 0.33950066566467285, -0.2980971336364746, -0.0938015729188919, -0.7834676504135132, -0.05579063668847084, 0.19121521711349487, -0.4586711823940277, 0.0086015295237...
both applications is equal ``` byte[] data = new byte[] { 0x25, 0x00, 0x00, 0x50, 0x00, 0x00, 0x0E, 0x10, 0xCE, 0xEF, 0x47, 0xDA, 0xC3, 0xFE, 0xFF, 0x79, 0x00, 0x00, 0x00, 0xD1, 0x00, 0x00, 0x00, 0x99, 0xC0, 0x8A, 0x54, 0x78, 0xD3, 0xC4, 0x03, 0xAB, 0x9E, 0x2E, 0x29, 0xE3, 0x5E, 0xEE, 0x4E, 0x6E, 0x20, 0x71, 0x10...
[ -0.15833072364330292, 0.2077609747648239, 0.43007799983024597, -0.09517598897218704, 0.09075229614973068, 0.12564101815223694, 0.19613976776599884, -0.4046093225479126, -0.1632341742515564, -0.3865482807159424, -0.13760073482990265, 0.6783893704414368, -0.43568912148475647, -0.127316892147...
your two sets of code are adding (or not adding) internal padding differently. I expect that the different packings look something like this: ``` C++ C# ================================ ================================ [size ][opcode ] [size ][opco...
[ 0.46503371000289917, 0.30017808079719543, 0.07484681159257889, -0.22190460562705994, 0.057529959827661514, 0.10609227418899536, -0.10457149147987366, -0.5818232893943787, -0.41570791602134705, -0.6702763438224792, 0.0022503777872771025, 0.49499037861824036, -0.4026281535625458, -0.16083349...
] [secCnt][secCrc][flag ][blow0 ] [secCnt][secCrc][flag ][blow0 ] [blow1 ][blow2 ][blow3 ][blow4 ] [blow1 ][blow2 ][blow3 ][blow4 ] [blow5 ][blow6 ][blow7 ][seedCou [blow5 ][blow6 ][blow7 ]..PAD... nt ][seedCRC [seedCount ]
[ -0.6801972389221191, -0.28494104743003845, -0.18953895568847656, -0.30879107117652893, 0.037355393171310425, 0.4377320110797882, -0.10196952521800995, -0.41159746050834656, 0.41464218497276306, -0.5907057523727417, -0.17371314764022827, 0.33035868406295776, 0.17775799334049225, 0.154646158...
][seedSec [seedCRC ] urity0 ][seedSec [seedSecurity0 ] urity1 ][seedSec
[ -0.601868748664856, 0.18795248866081238, -0.1220143660902977, 0.11759820580482483, 0.2912031412124634, 0.1691117137670517, -0.3210660517215729, 0.18974968791007996, 0.10179141163825989, -0.3712162971496582, -0.3058373034000397, 0.22265666723251343, -0.1983201801776886, 0.11440000683069229,...
[seedSecurity1 ] urity2 ][seedSec [seedSecurity2 ] urity3 ][seedSec [seedSecurity3
[ -0.6600490808486938, 0.2557809352874756, -0.29406002163887024, -0.08890441060066223, 0.18216753005981445, 0.4518987238407135, -0.10160414129495621, -0.13565722107887268, 0.06837836652994156, -0.33952516317367554, -0.2033631056547165, 0.19024518132209778, -0.21832247078418732, 0.04248832166...
] urity4 ] [seedSecurity4 ] ``` ... with C# inserting a byte of padding which causes later values to be one byte off. You can try using ``` [StructLayout(LayoutKind.Sequential,Pack=1)] ``` before your struct definition, which should use the minimum amount of space poss...
[ 0.11374284327030182, 0.13444507122039795, 0.5366966724395752, -0.05312063917517662, 0.13753509521484375, -0.20032675564289093, 0.23855921626091003, -0.15610936284065247, -0.26084375381469727, -0.6815280318260193, -0.11640982329845428, 0.3201122581958771, -0.10804848372936249, 0.20058104395...
I'm writing a Cocoa API for a project and the API takes a delegate. The protocol that I came up with declares all the methods as optional, but why would I do that instead of just documenting the delegate methods in a header file and taking a plain id as a parameter? For the benefit of your users. If the object takes de...
[ 0.5598916411399841, 0.17609034478664398, -0.35359621047973633, 0.3270767331123352, -0.0428520031273365, -0.24393804371356964, 0.007754553109407425, -0.185812845826149, -0.34557679295539856, -0.4034188389778137, 0.13559506833553314, 0.37067094445228577, -0.3199428915977478, 0.10597449541091...
So, Python functions can return multiple values. It struck me that it would be convenient (though a bit less readable) if the following were possible. ``` a = [[1,2],[3,4]] def cord(): return 1, 1 def printa(y,x): print a[y][x] printa(cord()) ``` ...but it's not. I'm aware that you can do the same thing b...
[ -0.08118971437215805, -0.18565316498279572, 0.006595988292247057, -0.272472620010376, -0.14098906517028809, 0.14644594490528107, 0.2072201818227768, -0.05393478646874428, -0.15376941859722137, -0.06446005403995514, -0.04382053390145302, 0.5786121487617493, -0.41685134172439575, -0.05601158...
forget about this? ``` printa(*cord()) ``` The `*` here is an argument expansion operator... well I forget what it's technically called, but in this context it takes a list or tuple and expands it out so the function sees each list/tuple element as a separate argument. It's basically the reverse of the `*` you might...
[ 0.008410156704485416, 0.14673931896686554, 0.6866782903671265, -0.41595104336738586, -0.006436106748878956, -0.011895663104951382, 0.2483648806810379, -0.06990059465169907, -0.43021532893180847, -0.35902851819992065, -0.367313027381897, 0.731146514415741, -0.5913982391357422, -0.0267260000...
This [flickr blog post](http://code.flickr.com/blog/2009/03/18/building-fast-client-side-searches/) discusses the thought behind their latest improvements to the people selector autocomplete. One problem they had to overcome was how to parse and otherwise handle so much data (i.e., all your contacts) client-side. They...
[ -0.20421287417411804, -0.16370414197444916, 0.44351866841316223, 0.16538240015506744, -0.28933554887771606, -0.15569338202476501, 0.14492036402225494, -0.002942649880424142, -0.3645022511482239, -0.722774088382721, 0.21845117211341858, 0.6142439246177673, -0.13181763887405396, -0.119978018...
using Ajax to instead fetching > the data using a dynamically generated > script tag. This means that the > contact data was never treated as > string, and was instead executed as > soon as it was downloaded, just like > any other JavaScript file. The > difference in performance was > shocking: 89ms to parse 10...
[ -0.46168726682662964, -0.36706340312957764, 0.3285265266895294, 0.1541961431503296, -0.5308970212936401, 0.003660249523818493, 0.5719053745269775, -0.47450631856918335, -0.15677855908870697, -0.8962470889091492, 0.15021418035030365, 0.7479569315910339, -0.13303051888942719, -0.535581707954...
one thing: in order for this JSON to > be executed, we had to wrap it in a > callback method. **Since it’s executable > code, any website in the world could > use the same approach to download a > Flickr member’s contact list.** This was > a deal breaker. (emphasis mine) Could someone please go into the exact se...
[ 0.500369668006897, -0.04947574809193611, -0.11331141740083694, 0.1389591097831726, -0.33190783858299255, -0.5106983780860901, 0.33905577659606934, 0.1416264921426773, -0.28929343819618225, -0.39116933941841125, 0.02679048478603363, 0.4688766598701477, -0.020153909921646118, -0.168809995055...
exploit was once used to steal contact lists from gmail. Whenever a browser fetches data from a domain, it send across any cookie data that the site has set. This cookie data can then used to authenticate the user, and fetch any specific user data. For example, when you load a new stackoverflow.com page, your browser...
[ 0.2689999043941498, -0.2260403335094452, 0.2117881327867508, -0.17283284664154053, -0.011022821068763733, -0.0016923696966841817, 0.3878861963748932, 0.3908218443393707, 0.04363905265927315, -0.4818137288093567, 0.009898735210299492, 0.29955577850341797, -0.2930312752723694, 0.428813457489...
any website could embed this javascript file hosted on Flickr's servers. Your Flickr cookie data would then be sent over as part of the request (since the javascript was hosted on flickr.com), and Flickr would generate a javascript document containing the sensitive data. The malicious site would then be able to get acc...
[ 0.6451428532600403, -0.18100519478321075, 0.5466914772987366, 0.2640596330165863, -0.09857131540775299, -0.0984441265463829, 0.09619339555501938, 0.025891274213790894, -0.13763807713985443, -0.26697349548339844, 0.16134655475616455, 0.6098409295082092, -0.4546841084957123, 0.13040801882743...
I have a list/sublist structure in my LaTeX document. By default, the sublist is delimited with letters, so you end up with this: ``` 1. Item (a) sub item (b) sub item ``` In my document, I've got more than 26 sub items, so I was running into a Counter overflow error, which I fixed by rewriting the sub item ...
[ -0.0975700318813324, 0.13081996142864227, 0.47706419229507446, -0.3084815740585327, 0.009105399250984192, 0.36340418457984924, 0.33578068017959595, -0.368371844291687, -0.5715265274047852, -0.5745671391487122, -0.3587346374988556, 0.1455225795507431, -0.5944069027900696, 0.2338541448116302...
on. The problem is that when the reference is rendered, it's rendered using a letter, not the number of the sub item. Here's a sample doc that shows the problem. ``` \documentclass[11pt]{report} \begin{document} \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}} \begin{enumerate} \item Item \begin...
[ 0.07637079805135727, 0.3384266495704651, 0.41099026799201965, -0.17835687100887299, -0.04429243132472038, 0.26381731033325195, 0.24400746822357178, -0.5117193460464478, -0.2614362835884094, -0.9073180556297302, -0.7215154767036438, 0.5020943880081177, -0.5603818893432617, -0.04416886717081...
items in a sublist with more than 26 items? I'm looking at my copy of The LaTeX Companion, p.129, and from what I'm seeing I would suggest something like the following: ``` \renewcommand{\theenumii}{\arabic{enumii}} \renewcommand{\labelenumii}{\theenumi.\theenumii.} \makeatletter \renewcommand{\p@enumii}{\theenumi.} \...
[ 0.06524229049682617, 0.16335435211658478, 0.6653652191162109, -0.00936567597091198, 0.13075979053974152, 0.20379415154457092, 0.2501577138900757, -0.14723879098892212, -0.17955997586250305, -0.5235135555267334, -0.14922329783439636, 0.33813023567199707, -0.25808185338974, 0.125493109226226...
Is there a predefined or "easy" method of writing a datatable to a text file or TextBox Control (With monospace font) such as DataTable.Print(): ``` Column1| Column2| --------|--------| v1| v2| v3| v4| v5| v6| ``` **Edit** Here's an initial version (vb.net) - in case anyone is int...
[ -0.13856534659862518, -0.1692192256450653, 0.5217299461364746, 0.01574448123574257, -0.22722786664962769, -0.06205704063177109, -0.1941041499376297, -0.20838455855846405, -0.001726352609694004, -0.42322754859924316, -0.21800687909126282, 0.42434051632881165, -0.34244224429130554, -0.078214...
List(Of Integer) Const ColumnSeparator As Char = "|"c Const HeadingUnderline As Char = "-"c ' determine width of each column based on widest of either column heading or values in that column For Each col As DataColumn In dt.Columns Dim colWidth As Integer = Integer.MinValue For Each row...
[ -0.35726019740104675, -0.3247543275356293, 0.8301770091056824, 0.03594781458377838, -0.19146481156349182, 0.3446211814880371, 0.05243133008480072, -0.46969160437583923, -0.4571875035762787, -0.3164037764072418, -0.09594558924436569, 0.33054834604263306, -0.24500292539596558, 0.210234344005...
If len > colWidth Then colWidth = len End If Next widths.Add(CInt(IIf(colWidth < col.ColumnName.Length, col.ColumnName.Length + 1, colWidth + 1))) Next ' write column headers For Each col As DataColumn In dt.Columns result.Append(col.ColumnName.PadLeft(wi...
[ -0.28696081042289734, -0.29207250475883484, 0.9125012755393982, -0.1811181753873825, -0.20769760012626648, 0.06308860331773758, 0.03692980483174324, -0.2549024224281311, -0.3310772776603699, -0.4810926616191864, -0.29204031825065613, 0.327860027551651, -0.21234844624996185, 0.1925416886806...
result.Append(ColumnSeparator) Next result.AppendLine() ' write heading underline For Each col As DataColumn In dt.Columns Dim horizontal As String = New String(HeadingUnderline, widths(col.Ordinal)) result.Append(horizontal.PadLeft(widths(col.Ordinal))) result.Append(ColumnSepa...
[ -0.3407190442085266, -0.13265879452228546, 1.3070529699325562, -0.19365987181663513, -0.37178462743759155, 0.4836265742778778, 0.10683930665254593, -0.5274720788002014, -0.4769412577152252, -0.5198861360549927, -0.4170428514480591, 0.2686985731124878, -0.3959178626537323, -0.01447842177003...
result.Append(row(col.ColumnName).ToString.PadLeft(widths(col.Ordinal))) result.Append(ColumnSeparator) Next result.AppendLine() Next Return result.ToString() End Function ``` No, there isn't. You will have to do the formatting yourself, or find a third-party library that will do ...
[ -0.21710897982120514, -0.05509781092405319, 1.0783641338348389, -0.26467323303222656, 0.006404642481356859, 0.07585393637418747, 0.08242762088775635, -0.4241732656955719, -0.15961062908172607, -0.4985823929309845, -0.3215194046497345, 0.46031248569488525, -0.3569726049900055, -0.0712713450...
My workplace will be starting to use Sharepoint internally during the coming months. I'm pretty excited about the possibilities of having more structured data on our intranet. A key part of this is allowing related data to be spread across the site hierarchy. I'm currently experimenting with a list of Committee Member...
[ 0.8309201598167419, 0.09804393351078033, 0.17966154217720032, 0.06199002265930176, -0.19048713147640228, -0.25601086020469666, -0.01583987846970558, 0.10459930449724197, -0.5813109874725342, -0.6975696682929993, 0.17898142337799072, 0.033916931599378586, 0.21575087308883667, 0.215837523341...
are three accepting ways to approach this: 1. Roll Up - Subsites have their own lists (optionally from a list template). Content types are used so the instances can be collected into a Data View Web Part on the parent site. 2. Pull Down - A master list is defined in the parent and each subsite contains a view of that ...
[ 0.6474645137786865, -0.16041506826877594, 0.3784962296485901, 0.2200111597776413, -0.20934678614139557, -0.1318601816892624, 0.0884728953242302, -0.32871341705322266, -0.3746798634529114, -0.3493223786354065, 0.03515079617500305, 0.10210634768009186, -0.09817615896463394, 0.093043081462383...
try out different possibilities. I'm more interested in the general tradeoffs, not necessarily specific to this example. Having done this a number of times on different sites, for your situation, I recommend: > 1.Roll Up - Subsites have their own lists (optionally from a list > template). Content types are used so > ...
[ 0.5962151885032654, -0.10974974930286407, 0.23856154084205627, 0.23832538723945618, -0.2029905766248703, -0.2028551548719406, 0.1530819833278656, -0.27328601479530334, -0.4787651300430298, -0.7950747609138489, 0.04398748278617859, 0.18330930173397064, -0.18259941041469574, 0.18917129933834...
and DVWP do not work across site collections). The only time I have used a Pull Down model is when there logically is only one list that I site collection will go to. Such lists for us have always been functional in nature, e.g. A list of content query definitions for a some custom functionality or a list of customers...
[ 0.49138376116752625, -0.0933251604437828, 0.38689330220222473, 0.06165669113397598, -0.11145717650651932, -0.19426050782203674, -0.0980113297700882, -0.19351091980934143, -0.36740726232528687, -0.574545681476593, -0.1622770130634308, 0.3703557848930359, 0.016519660130143166, 0.458906799554...
How do you add a row listener to a specific row, or all rows in a table? I need to add a type of "onMouseOver" listener to the rows so that when you hover over them, it changes the background color of the row, much like getRowFormatter will allow you to do. Supposing GWT 1.5.3: **CLICK EVENT HANDLING** If you are usi...
[ 0.026093579828739166, 0.08040101081132889, 0.6937894821166992, -0.2863519489765167, -0.16852381825447083, 0.08879410475492477, -0.22065231204032898, -0.3979234993457794, -0.4121887981891632, -0.6229670643806458, 0.06510266661643982, 0.5663979053497314, -0.36848756670951843, 0.1535745710134...
to handle other type of events other than click (say, hover), GWT currently doesn't have a ready interface for that. You pretty much left on your own to implement them yourself. There's two ways of doing it that I can think of now: 1. The quick and dirty way, is probably by exploiting JSNI, which provides a means for ...
[ 0.31007248163223267, -0.29964086413383484, 0.029851725324988365, 0.22100789844989777, -0.2556052505970001, -0.2745756506919861, 0.37617027759552, 0.05426030606031418, -0.3437102735042572, -0.6863755583763123, 0.21280047297477722, 0.46945908665657043, -0.3929751217365265, -0.112348549067974...
won't recommend this as it reduces maintainability and extensibility. 2. If you wanted a native, GWT interface, you can create a new class that inherits HTMLTable or FlexTable. At the constructor, call the [`sinkEvents`](http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/UIObject.htm...
[ 0.04547348618507385, -0.43822386860847473, 0.2942377030849457, -0.0953783467411995, -0.21180753409862518, -0.19468796253204346, 0.3532935082912445, -0.5365585684776306, -0.07960053533315659, -0.9298509359359741, -0.24732862412929535, 0.7099508047103882, -0.2909160256385803, 0.0352333076298...
} @Override public void onBrowserEvent(Event event) { switch(DOM.eventGetType(event)) { case Event.ONMOUSEOVER: // Mouse over handling code here break; default: break; }
[ 0.0032930225133895874, -0.3584408164024353, 0.2185766100883484, -0.13424474000930786, 0.7567006945610046, -0.07814701646566391, 0.46213093400001526, -0.2306319624185562, -0.15274420380592346, -0.312460333108902, -0.3448948860168457, 0.9010341763496399, -0.349727600812912, 0.340642958879470...
} } ``` The best of learning how to code this is by looking at the GWT source code itself (search for `sinkEvent`) and getting the feel on how to do it the GWT way.
[ 0.2817308008670807, 0.05196584388613701, 0.02098171040415764, 0.0702170729637146, -0.028408154845237732, -0.36215248703956604, 0.2774815857410431, 0.03164320066571236, 0.21792633831501007, -0.8756068348884583, -0.12971094250679016, 0.5599748492240906, -0.13491912186145782, 0.00510411430150...
I've seen this in a few pieces of code and I didn't want to "assume" it was unimportant but this is a copy of the Google Analytics code: ``` <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + ga...
[ 0.08719968050718307, 0.09418056905269623, 0.4258212149143219, -0.24005155265331268, -0.036369919776916504, -0.20198899507522583, 0.5167721509933472, -0.32112550735473633, -0.10443003475666046, -0.7567936778068542, -0.1136305183172226, 0.43175965547561646, -0.34885185956954956, -0.000817961...
bits in two different script tags is beneficial? My first reaction would be simply to remove the redundancy. The first block writes a `<script>` tag to the page. I think if the code was all in one block there would be no guarantee the written `<script>` would be loaded before the second part of the code executed. By u...
[ 0.4523293375968933, -0.034018732607364655, 0.0003292755573056638, 0.036742888391017914, -0.2881329655647278, 0.06824377179145813, 0.18723875284194946, -0.32967403531074524, 0.245296448469162, -0.5424312353134155, 0.020420974120497704, 0.4008311331272125, -0.33808988332748413, 0.27247890830...
Recently we received a mockup for a website from a client that makes extensive use of the [Rockwell](http://www.fonts.com/findfonts/detail.asp?pid=201908) font all over the layout for menu items, articles titles, block titles, etc... I never heard of that font before and I assumed that it wasn't web safe, also I check...
[ 0.28873032331466675, 0.2002069056034088, 0.49015671014785767, 0.13578031957149506, 0.3923012614250183, 0.013281747698783875, 0.09828795492649078, -0.00787587370723486, -0.2835257649421692, -0.5636293888092041, 0.15313735604286194, 0.5119016766548157, -0.11411494761705399, -0.00357677019201...
font and that they checked in Windows and Mac and the font is installed. So we are going to use this font but I'm still curious if this is a standard font or it's installed with an Adobe product or any other application. Does anyone have any info on this? There's a [very small set](http://en.wikipedia.org/wiki/Web-s...
[ 0.43818235397338867, 0.48726823925971985, 0.3664388954639435, 0.012631704099476337, -0.09852505475282669, 0.06926649063825607, 0.3082529306411743, -0.00681199599057436, -0.21194924414157867, -0.6667394638061523, 0.04989203065633774, 0.4412853717803955, -0.12588727474212646, -0.120582714676...
where each fallback *is* a web-safe font: ``` body, input, textarea { font-family: Rockwell, "Courier New", Courier, Georgia, Times, "Times New Roman", serif; } ``` Some information on font stacks: * <http://www.petercolesdc.com/web-fonts-nice-honest/> (includes info on Rockwell) * <http://unitin...
[ -0.21465833485126495, 0.20314157009124756, 0.15741807222366333, -0.005451536271721125, -0.2160957306623459, 0.4625299274921417, 0.4421828091144562, -0.05253880098462105, -0.19244235754013062, -0.40594783425331116, -0.18195515871047974, 0.4580671787261963, -0.21465414762496948, 0.0221597030...
I have a list of textual entries that a user can enter into the database and I need to validate these inputs with Regular Expressions because some of them are complex. One of the fields must have gaps in the numbers (i.e., 10, 12, 14, 16...). My question is, is there a Regex construct that would allow me to only match ...
[ 0.33158260583877563, 0.33150413632392883, 0.07515944540500641, 0.1777094602584839, -0.09569619596004486, 0.1924382597208023, 0.3781100809574127, -0.2376728057861328, -0.18794849514961243, -0.31486719846725464, 0.222162663936615, 0.4488151967525482, -0.4035399854183197, 0.14057643711566925,...
on this was an adaption of JaredPar's because in addition to needing only odd's or evens I also needed to constrain by a range (i.e., all even numbers between 10-40). Below is finished Regex. **^[123][02468]$** Odd Numbers ``` "^\d*[13579]$" ``` Even Numbers ``` "^\d*[02468]$" ``` Run of Odds with a , and potent...
[ -0.3124983310699463, 0.16178256273269653, 0.11898466944694519, -0.12039922177791595, -0.01929881051182747, 0.3294088542461395, -0.06210636720061302, -0.41639581322669983, -0.1971156746149063, -0.3988044559955597, -0.07740511745214462, 0.6320928335189819, -0.337295264005661, -0.134733274579...
Does including DISTINCT in a SELECT query imply that the resulting set should be sorted? I don't think it does, but I'm looking for a an authoritative answer (web link). I've got a query like this: ``` Select Distinct foo From Bar ``` In oracle, the results are distinct but are not in sorted order. In Jet/MS-Acc...
[ -0.1685476154088974, 0.09321057051420212, 0.0017161614960059524, -0.037929750978946686, -0.21412234008312225, -0.0785936638712883, -0.2420361340045929, -0.07573023438453674, -0.2323751300573349, -0.36375564336776733, -0.1788327395915985, 0.2346990406513214, -0.5109480023384094, 0.245282381...
sorting on `foo` (unless otherwise specified)? From the [SQL92 specification](http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt): > If DISTINCT is specified, then let TXA be the result of eliminating redundant duplicate values from TX. Otherwise, let TXA be TX. ... > 4) If an is not specified, then the order...
[ -0.24081015586853027, -0.021516187116503716, 0.13852384686470032, -0.3552205264568329, -0.17454181611537933, 0.40774333477020264, -0.04074951261281967, -0.4366850256919861, -0.2920692265033722, -0.2124277651309967, -0.33972135186195374, -0.022800782695412636, -0.5435913801193237, 0.1998747...
This is a Query in VBA (Access 2007) I have 3 strings defined: ``` str_a = "db.col1 = 5" str_b = " and db.col2 = 123" str_c = " and db.col3 = 42" ``` Then I use these in the WHERE part of my Query: ``` "WHERE '" & str_a & "' '" & str_b & "' '" & str_c & "' ;" ``` This fails, but If I paste in the strings like thi...
[ -0.20472022891044617, 0.09281715750694275, 0.4493845999240875, -0.18818165361881256, -0.17618584632873535, 0.1278061419725418, 0.2689695656299591, -0.4187488853931427, -0.07727833837270737, -0.48609721660614014, 0.08875960856676102, 0.4955877959728241, -0.4117286205291748, 0.05900666862726...
'" & str_b & "' '" & str_c & "' ;" ``` will include single quotes within your completed WHERE clause. And the working version you showed us has none: ``` "WHERE db.col1 = 5 and db.col2 = 123 and db.col3 = 42;" ``` So, try constructing the `WHERE` clause with no single quotes: ``` "WHERE " & str_a & " " & str_b & ...
[ 0.1452285349369049, 0.03853372856974602, 0.41201093792915344, -0.2985192537307739, 0.008804908953607082, 0.19633546471595764, 0.31964030861854553, -0.19924317300319672, -0.15081803500652313, -0.5107253193855286, -0.364544153213501, 0.3876812160015106, -0.39227908849716187, 0.18168838322162...
of the VB Editor. (You can get to the Immediate Window with the `CTRL`+`g` keyboard shortcut.) Alternatively, you could display the finished string in a message box window: ``` MsgBox strSQL ```
[ 0.09535758197307587, -0.08099216967821121, 0.4831017851829529, -0.20374733209609985, -0.2001662701368332, -0.10608317703008652, 0.12899446487426758, 0.013395152986049652, -0.1732424646615982, -0.6597526669502258, -0.366001158952713, 0.667941153049469, -0.6038636565208435, 0.060501459985971...
I use vim, sed, bash and Perl. Each has somewhat different regex syntax. I just spent time finding that I need to escape the curly parens in sed, but not in BASH (when using them as counter elements). Grrr. Can anybody point me to a table that summarizes the differences between the different regex parsers in these 4 e...
[ 0.7215608358383179, 0.09362226724624634, 0.12775716185569763, -0.1531234234571457, -0.39962130784988403, 0.07448780536651611, 0.49592506885528564, -0.529864490032196, -0.2189653366804123, -0.4774145185947418, 0.06816618889570236, 0.9487892985343933, -0.2705530822277069, -0.1189830377697944...
I am writing a POP3 mail client. I want to leave the messages on the server, but I don't want to have to redownload all messages every time I reconnect. If I download all the messages today, and reconnect tomorrow does the protocol support the ability to only download the messages from the last 24 hours or from a cert...
[ 0.3873927593231201, 0.1889219731092453, 0.6030692458152771, -0.058167438954114914, -0.2821962535381317, -0.09516406059265137, 0.4171665608882904, 0.31410425901412964, -0.3463728725910187, -0.6413588523864746, -0.06839188933372498, 0.23691140115261078, -0.3380516767501831, 0.097960688173770...
supports IMAP too, but this question is specifically for the POP servers. I've done it. You'll have to reread all the headers but you can decide which messages to download. I don't recall anything in the header that will give you a foolproof timestamp, however. I don't believe your solution is possible without keepin...
[ 0.39627188444137573, 0.1529327929019928, 0.2820076644420624, 0.335725337266922, 0.16446983814239502, -0.4163719713687897, 0.17987193167209625, 0.21827802062034607, -0.38709357380867004, -0.47870340943336487, -0.05294899642467499, 0.4979068338871002, -0.4541672170162201, -0.0619817674160003...
mean it's removed from the server. It's only removed from the server if you give an explicit command to kill the message. (And when a message contains so many attachments that the system time-outs before you properly log off and thus your kill command is discarded you'll be driven up the wall!) (It was an oversight in ...
[ 0.5350197553634644, -0.2103050947189331, 0.4704776406288147, 0.2187836617231369, -0.0587788000702858, -0.3942272663116455, 0.38836097717285156, -0.08621896058320999, -0.3893437087535858, -0.06720922887325287, -0.11020022630691528, 0.10899778455495834, -0.3757496178150177, 0.154874950647354...
nothing was able to kill it!) Thus if I were writing a mail client I would simply download anything I didn't already have locally. If it's supposed to remain on the server, fine, just don't give the kill command.
[ 0.49383366107940674, -0.26695287227630615, 0.31067532300949097, 0.2297099530696869, -0.38720089197158813, -0.16631823778152466, 0.569580078125, 0.3557625114917755, -0.1852843165397644, -0.2552555203437805, 0.011785046197474003, 0.5362743735313416, -0.35072606801986694, 0.04473919793963432,...
I have a table in html. I prefer to layout the table centered. What is the css style for this layout? And any online css tools to interactively see the style change? Given this HTML: ``` <div> <table> <!-- contents --> </table> </div> ``` You can use this CSS: ``` div{ margin:0 auto; text-align:center; ...
[ 0.034234076738357544, 0.3124542236328125, 0.6488226652145386, -0.1667865812778473, -0.38854992389678955, -0.07789052277803421, -0.02890598215162754, 0.01644502766430378, -0.2628408372402191, -1.0724703073501587, 0.09805434942245483, 0.15965481102466583, -0.3433067798614502, -0.003419562708...
cell's contents, you need to apply `text-align: left` to the table to reset that property.
[ -0.19840280711650848, 0.3394634425640106, 0.09891033917665482, -0.12369514256715775, 0.6861914992332458, -0.2756781280040741, 0.09848807007074356, 0.11777105182409286, -0.2375524640083313, -0.33335164189338684, -0.055791664868593216, 0.3038022220134735, -0.5020566582679749, -0.059094145894...
I have the following xml file: ``` <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <config> <a> <b> <param>p1</param> <param>p2</param> </b> </a> </config> ``` and the xpath code to get my node params: ``` Document doc = ...; XPath xpath = XPathFactory.newInstance().newXPath(); XPathExpression...
[ 0.12905248999595642, 0.1706518679857254, 0.8308979868888855, -0.08022772520780563, 0.11094927787780762, 0.6113017797470093, 0.36910778284072876, -0.707949161529541, -0.26869267225265503, -0.6951085925102234, -0.08430503308773041, 0.3676343262195587, -0.2228701263666153, 0.12304126471281052...
System.out.println(nodes.item(i).getNodeValue()); } ``` would be as expected: p1 and p2
[ -0.5163074731826782, -0.32661697268486023, 0.4760518968105316, -0.1526515781879425, 0.1068287342786789, 0.25874465703964233, 0.137436643242836, -0.2710319757461548, -0.4058890640735626, -0.5412957668304443, -0.4219038486480713, 0.46023809909820557, -0.28464463353157043, 0.14467673003673553...
I'm trying to get to grips with Cocos2d by trying to accomplish simple things. At this point, I have a scene, that scene has a background sprite, and a Layer. I'm trying to draw onto the Layer using drawLine. Here's my current attempt. ``` @implementation MyLayer -(id)init{ self = [super init]; if(self != nil...
[ 0.16057497262954712, -0.2834663987159729, 0.8328413367271423, -0.17728398740291595, 0.025452664121985435, 0.05678778886795044, 0.24824529886245728, -0.15825532376766205, -0.2165640890598297, -0.7691282033920288, -0.05934173986315727, 0.45810794830322266, -0.35868990421295166, 0.20062114298...
z:1]; } return self; } @end ``` Which generates the error "void value not ignored as it ought to be". So obviously I'm doing it wrong, but hopefully you can see my reasoning. I've also tried this ``` -(id)init{ self = [super init]; if(self != nil){ glColor4f(0.8, 1.0, 0.76, 1.0); ...
[ -0.06858088821172714, 0.14915244281291962, 0.5490301847457886, -0.33530858159065247, 0.1193525493144989, 0.021222855895757675, 0.40970635414123535, -0.3414872884750366, 0.145315483212471, -0.49119171500205994, -0.0388294942677021, 0.9405941963195801, -0.2865477502346039, 0.4498730301856994...
either. I realise I'm not understanding something fundamental, but can anyone steer me in the right direction? From the cocos2d [drawPrimitivesTest.m](http://github.com/cocos2d/cocos2d-iphone/blob/454d1753ea73b37dbde4d686a876a542a65e4677/tests/drawPrimitivesTest.m): ``` - (void)draw { // ... // draw a simple line...
[ -0.17357300221920013, -0.012664866633713245, 0.6462095975875854, 0.011604062281548977, -0.19842621684074402, 0.08016519248485565, 0.43175068497657776, -0.006240180227905512, -0.02281171828508377, -0.404269814491272, -0.471985787153244, 0.5656155943870544, -0.28753870725631714, -0.134716898...
What's up with that? It seems the only way to get an working HtmlDocument object is copying the Document property of an mshtml/webbrowser control. But spawning that is sloooooooooooow. I'd like to avoid writing my own HTML parser and HtmlAgilityPack is copyleft. Are there other sources of getting an instantiated HtmlD...
[ 0.5877189040184021, 0.02242756262421608, 0.387380450963974, 0.19005629420280457, -0.2890532314777374, -0.3157104551792145, 0.19292967021465302, 0.10070832818746567, -0.3448662757873535, -0.4561566412448883, 0.06095647066831589, 0.5227534770965576, -0.24629096686840057, 0.27694952487945557,...
and some of the other things this topic brings up. It has no constructor because it's just a wrapper class around an unmanaged object. Reference: <http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.aspx> > HtmlDocument provides a managed > wrapper around Internet Explorer's > document object,...
[ -0.05672979727387428, -0.3620010316371918, 0.6402750015258789, 0.2568408250808716, -0.04038907587528229, -0.317311555147171, -0.04614787548780441, -0.024932831525802612, -0.32267528772354126, -0.5515730977058411, -0.3040087819099426, 0.3637194335460663, -0.003391461679711938, 0.32347559928...
On the Mac there's a really nice library called [Sparkle](http://sparkle.andymatuschak.org/) that programs can use to implement the checking/install functionality for auto-updates. Is there anything similar out there for .NET? Or just regular Win32? [ClickOnce](http://en.wikipedia.org/wiki/ClickOnce) has its own secu...
[ 0.36808663606643677, 0.03740181773900986, 0.32845941185951233, 0.06878862529993057, 0.05026249587535858, -0.21302533149719238, -0.07163714617490768, 0.04132639989256859, 0.09012629836797714, -0.49779343605041504, 0.16994735598564148, 0.7424913048744202, -0.3254520893096924, -0.226119309663...
If you have ever used SQL reporting services, there are some dropdown lists that pop down with a checkbox list in it. It allows a user to select multi items very nicely. Does anyone know a free User control or an example of this implemented. Ok, so I know I can do this with some elbow grease and html, was just trying t...
[ 0.7030330896377563, 0.0013164012925699353, 0.13531635701656342, 0.2149994969367981, -0.21441788971424103, -0.10663509368896484, 0.1663757562637329, -0.033996447920799255, -0.359506219625473, -0.6008340120315552, 0.4890599548816681, 0.5187755227088928, -0.21156451106071472, -0.0249958094209...
I have a data input module where I add the information of my product and its sub information like: product basic info product price info product price details price info and price details are related to product and are lists In my web forms approach I would store my main product object on the view state and I would ...
[ 0.5148805379867554, 0.15331998467445374, 0.37064412236213684, -0.00024895009119063616, -0.12841488420963287, 0.04085685685276985, -0.26017892360687256, -0.12500689923763275, -0.03718487173318863, -0.5454239845275879, -0.10443142801523209, 0.683513343334198, 0.18943443894386292, 0.382800728...
I am done I would do one product.save() and that would persist all the data to the respective tables on db. Now I am building similar app on .net mvc framework and pondering on what would be the good way of handling this on mvc. I don't resonate towards storing all this on client side till I click save. And saving t...
[ 0.4325651228427887, 0.28238534927368164, 0.6347860097885132, -0.23135429620742798, -0.15773358941078186, -0.010751539841294289, 0.4621574282646179, -0.5275763273239136, -0.14200571179389954, -0.817094624042511, -0.06903018802404404, 0.5560315251350403, 0.1420370489358902, 0.412675112485885...
components of the filename > given in file\_name except the last > one. The filename must be formed using > forward slashes (``/’’) regardless of > the separator used on the local file > system. > > > > ``` > File.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work" > > ```
[ 0.07747334986925125, 0.45975977182388306, 0.421597421169281, -0.2549779415130615, 0.06279215961694717, 0.1952267289161682, 0.2537136673927307, -0.47946301102638245, 0.09103218466043472, -0.5184997320175171, -0.3513450026512146, 0.6037620902061462, -0.30315378308296204, 0.3490619361400604, ...
``` System.Diagnostics.Process proc0 = new System.Diagnostics.Process(); proc0.StartInfo.FileName = "cmd"; proc0.StartInfo.WorkingDirectory = Path.Combine(curpath, "snd"); proc0.StartInfo.Arguments = omgwut; ``` And now for some background... ``` string curpath = System.IO.Path.GetDirectoryName(Application.Executabl...
[ 0.36692240834236145, 0.17275632917881012, 0.625157356262207, -0.2975810468196869, 0.30734410881996155, 0.19398075342178345, 0.26955318450927734, -0.1433197557926178, -0.46149179339408875, -0.6634073853492737, -0.08912931382656097, 0.5858875513076782, -0.3529107868671417, 0.4207600653171539...
omgwut; ``` **Notes:** * A good way to test whether your command is going to work is to actually try it from a command prompt. If you try to do `cmd.exe copy ...` you'll see that the copy doesn't occur. * There are limits to the length of the arguments you can pass as arguments. From [MSDN](http://msdn.microsoft.com...
[ 0.190448597073555, 0.07415639609098434, 0.4928814470767975, -0.18922904133796692, 0.14003777503967285, 0.23512443900108337, 0.3720078468322754, -0.18303704261779785, -0.3161367177963257, -0.6362971663475037, -0.0796947181224823, 0.7497801780700684, 0.03055577725172043, 0.10707085579633713,...
I have just started working on a project and I am using zend framework and postgresql (normally use MySQL) however I am hitting a problem when I am trying to get the last inserted id when using the Zend\_Db insert command. When using the function `$db->lastinsertid('users', 'userid');` I get the following error messag...
[ 0.057448871433734894, 0.212082639336586, 0.3692933917045593, -0.09465379267930984, 0.11102919280529022, -0.160249724984169, 0.12393707782030106, -0.14290256798267365, -0.028886808082461357, -0.6131466627120972, -0.05559910461306572, 0.6702871918678284, -0.06763666123151779, 0.2769789397716...
still get the same error message. I am not sure if the problem is with postgresql (I think most likely) or with the framework. Has anyone else had a similar problem to this? I see you found your answer, it was simply a typographical error. FWIW, I'll offer the following suggestion as another reason for the error yo...
[ 0.31538960337638855, 0.36251360177993774, 0.061282817274332047, 0.007350696250796318, 0.09815842658281326, 0.042151905596256256, 0.30377960205078125, 0.28889766335487366, -0.23557217419147491, -0.7247667908668518, 0.06797213107347488, 0.3927180767059326, -0.2018425464630127, 0.253990739583...
this doesn't match and you'll get the error. Try listing sequences in the `psql` tool: ``` postgres=# \ds ``` This will show you the sequences defined, with their spelling as they are stored in the database.
[ 0.25156182050704956, 0.10837982594966888, 0.03930113837122917, -0.05409663915634155, 0.2914459705352783, -0.09831459075212479, 0.30233022570610046, 0.09087473154067993, 0.17444026470184326, -0.7843834161758423, -0.03384944796562195, 0.3440549373626709, -0.3149675726890564, 0.14127606153488...
I want to use something like this: ``` os.path.split("C:\\a\\b\\c") ``` With this kind of output: ('C:\a\b', 'c') --- However I want it to work on other delimiters like this: ``` method ('a_b_c_d') ``` With this kind of output: ('a\_b\_c', 'd') ``` >>> 'a_b_c_d'.rsplit('_', 1) ['a_b_c', 'd'] ``` > Help on b...
[ -0.3620196580886841, -0.2730593979358673, 0.5832281112670898, 0.12415659427642822, -0.25155848264694214, 0.21152204275131226, -0.05281106010079384, -0.1186184212565422, -0.1807367503643036, -0.6439109444618225, -0.495012491941452, 0.15749874711036682, -0.37145182490348816, -0.0774466693401...
is a separator.
[ -0.013665702193975449, 0.044050902128219604, 0.4215713143348694, -0.5324704051017761, -0.38147714734077454, -0.4054826498031616, 0.42941468954086304, -0.46657294034957886, 0.0810655951499939, 0.12131396681070328, -0.16838090121746063, 0.4115029275417328, -0.5232159495353699, 0.335905104875...
Amazon's SimpleDB stores values as strings, and I need to store numeric values so that they still compare correctly, for example: "0001" < "0002" I think bytes, integers and decimals will be fairly straightforward, but I'm a little unsure on the best way to handle singles and doubles, since they can be very small or ...
[ 0.26195022463798523, 0.014865532517433167, 0.38101649284362793, 0.35097354650497437, -0.2894134819507599, 0.03474783897399902, -0.01182568445801735, -0.2509154975414276, -0.05079470947384834, -0.4453084468841553, 0.21117861568927765, 0.30141711235046387, -0.0431404672563076, -0.19126950204...
formats were > designed so that the numbers are > “lexicographically ordered”**, which – > in the words of IEEE architect William > Kahan means “if two floating-point > numbers in the same format are ordered > ( say x < y ), then **they are ordered > the same way when their bits are > reinterpreted as Sign-Magn...
[ 0.4666088819503784, -0.08321723341941833, 0.22998467087745667, -0.04452069103717804, -0.10522984713315964, 0.1334623098373413, 0.21514388918876648, -0.5943341255187988, -0.2833176553249359, -0.3301745653152466, -0.2546956241130829, 0.3950897753238678, -0.6833637356758118, 0.223005130887031...
LongFromSortableString(str); return BitConverter.ToDouble(BitConverter.GetBytes(interpretAsLong), 0); } static public string LongToSortableString(long lng) { if (lng < 0) return "-" + (~lng).ToString("X16"); else return "0" + lng.ToString("X16"); } static public long LongFromSortableString...
[ -0.32789018750190735, -0.14787225425243378, 0.8499348759651184, -0.4498164653778076, 0.31066447496414185, 0.18219079077243805, 0.10680241882801056, -0.39857739210128784, -0.0753711462020874, -0.08895474672317505, -0.5653616786003113, 0.6972256302833557, -0.36458930373191833, 0.075526863336...
=> 10 04059000000000000 => 100 0408F400000000000 => 1000 040C3880000000000 => 10000 040F86A0000000000 => 100000 07FEFFFFFFFFFFFFF => 1.79769313486232E+308 ```
[ 0.02473091147840023, 0.6318594813346863, 0.6672137975692749, 0.10072791576385498, -0.042321402579545975, 0.10809928923845291, 0.4555390179157257, -0.4141044616699219, 0.03833993896842003, -0.7212175726890564, -0.15168963372707367, 0.5271553993225098, -0.222737118601799, 0.24211354553699493...
**Very general:** Is there an easy way to tell which line of code last freed a block of memory when an access violation occurs? **Less general:** My understanding of profilers is that they override the allocation and deallocation processes. If this is true, might they happen to store the line of code that last freed a...
[ 0.4683542549610138, 0.021989772096276283, 0.339754194021225, 0.1769610345363617, 0.020956533029675484, -0.21230730414390564, 0.28594329953193665, -0.15841329097747803, -0.24410176277160645, -0.9150923490524292, -0.4392804503440857, 0.5963677763938904, -0.03364173695445061, -0.0682348385453...
the debug build of your program under ntsd (ntsd yourprogram.exe). 4. Reproduce the bug. Now when you make the crash happen, you will get additional information in the debugger from AppVerifier. Use !avrf (may take a long time to run (minutes)) and it will try to give you as much useful information as possible. You ...
[ 0.1583106517791748, 0.21698400378227234, 0.07914116978645325, 0.21176253259181976, 0.10784532874822617, -0.1571103185415268, 0.4403277039527893, -0.30237877368927, -0.3081606328487396, -0.653486967086792, -0.3943411111831665, 0.8792939186096191, -0.3935241103172302, 0.1311485469341278, -...
with PageHeap](http://support.microsoft.com/kb/286470)
[ -0.2166179120540619, 0.31521573662757874, 0.38351428508758545, 0.07799886912107468, 0.12198775261640549, 0.1840086728334427, 0.3620113432407379, -0.12308555841445923, -0.4172435402870178, -0.5674444437026978, -0.22631636261940002, 0.1794329434633255, -0.5238234400749207, -0.030087316408753...
I'm designing a high level language, and I want it to have the speed of C++ (it will use LLVM), but be safe and high level like C#. Garbage collection is slow, and new/delete is unsafe. I decided to try to use "region based memory management" (there are a few papers about it on the web, mostly for functional languages)...
[ -0.2875121235847473, -0.24627144634723663, -0.05192602425813675, 0.31473037600517273, -0.08228904753923416, -0.23179863393306732, 0.15107165277004242, 0.22037281095981598, -0.07427798211574554, -0.5566273331642151, -0.08949461579322815, 0.17127591371536255, -0.2655988335609436, 0.300440549...
higher, to prevent dangling references. To make this more flexible, I added parallel regions that can be moved up and down the stack, and retained through loops. The type system would be able to verify assignments in most cases, but low overhead runtime checks would be necessary in some places. Ex: ``` region(A) { ...
[ -0.1094486266374588, -0.04620148986577988, 0.5762320756912231, -0.0695318877696991, 0.116463802754879, 0.030408473685383797, 0.10149193555116653, -0.468515545129776, -0.4162403643131256, -0.4557662606239319, -0.1896267533302307, 0.10427221655845642, -0.4239266514778137, 0.5584093928337097,...
//x.D=n; would cause error: x is in higher region than n. n.DoSomething(); Bar@C m=new Bar(); //m.D=n; would cause error: m and n are parallel. if(m.Y) retain(C); //On the next iteration, m is retained. } } ``` Does this seem practical? Would I need to add non-lexically...
[ -0.012830530293285847, 0.01881583407521248, 0.48285090923309326, -0.152473583817482, 0.2739003002643585, 0.18607914447784424, 0.11625164747238159, -0.4094766080379486, -0.28269869089126587, -0.46459510922431946, -0.32269516587257385, 0.41351690888404846, -0.18274982273578644, 0.42674401402...
can refer to any object, but with a check on region deletion? Can you think of any algorithms that would be hard to use with this system or that would leak? I would discourage you from trying regions. The problem is that in order to make regions guaranteed to be safe, you need a very sophisticated type system---I'm sur...
[ 0.1002776026725769, -0.08820953965187073, 0.3654051423072815, 0.48375311493873596, 0.26584547758102417, -0.21748758852481842, 0.12062763422727585, 0.12139406055212021, -0.5862882733345032, -0.5229614973068237, -0.3108023405075073, 0.15909485518932343, -0.20270493626594543, 0.68429142236709...
of the program---and that region at least has to be garbage collected. (This is why Cyclone has regions *and* GC.) Since you're just getting started, I'd encourage you to go with garbage collection. Modern garbage collectors can be made pretty fast without a lot of effort. The main issue is to allocate from contiguous...
[ 0.2601207196712494, -0.06509843468666077, -0.1506030261516571, 0.48624908924102783, -0.1152467131614685, -0.2784327268600464, -0.015760235488414764, -0.08934468030929565, -0.36124736070632935, -0.8012540936470032, -0.1407208889722824, 0.3833233714103699, -0.3508019745349884, 0.082685470581...
collector like Joel Bartlett's mostly-copying collector, where the idea is you allocate only from completely empty pages. If you want to study existing garbage collectors, [Lua](http://www.lua.org/) has a fairly sophisticated incremental garbage collector (so there are no visible pause times) and the implementation is...
[ 0.030614258721470833, -0.31691476702690125, 0.07475220412015915, 0.4127899706363678, -0.09633312374353409, 0.030282149091362953, -0.12080251425504684, -0.0436055026948452, -0.15260350704193115, -0.45393651723861694, 0.19181333482265472, 0.30134066939353943, -0.34362179040908813, -0.0914056...
I recently ran into an embarrassing situation with some Flash coding where I had to accidentally sent clients a build where not all my debugging flags and variables were unset. (It was sending requests to the debug instead of release server, etc...) Part of this was poor code organization on my part; I've resolved tha...
[ 0.2537768483161926, 0.3519169092178345, 0.07692054659128189, -0.0318068228662014, 0.1898735761642456, -0.01415539812296629, 0.5479750633239746, -0.0441896989941597, -0.39447951316833496, -0.44752970337867737, 0.059824418276548386, 0.4476131498813629, -0.2580738961696625, 0.0422858223319053...
In any case, I find that manually jumping between my release config and debug config to be easy to screw up. So, other developers, what techniques do you use to error-proof jumping between your testing config, and the build config that you issue to your boss/clients/whoever? I know I should probably slow down but I w...
[ 0.22285856306552887, 0.1415543109178543, -0.08588773757219315, 0.07387855648994446, -0.2500498592853546, -0.3941184878349304, 0.17193603515625, 0.25261563062667847, -0.4480516314506531, -0.3610367774963379, 0.16087065637111664, 0.7579057812690735, -0.3819711208343506, -0.12145660072565079,...
that, my goal is to simply keep the script kiddies out of my project. Decompilers trump all that so..... Anyways, Thanks! I use an environment class, like this: ``` public class MyEnvironment { public static const DEBUG:Boolean = true; public static const SERVER:String = 'localhost'; // More here } ``` Import...
[ 0.08647271245718002, -0.055814746767282486, 0.10610819607973099, -0.05769863352179527, 0.11041728407144547, -0.06804598867893219, 0.5774085521697998, 0.15168380737304688, -0.23176203668117523, -0.681023359298706, -0.2783120274543762, 0.7493225932121277, -0.3855157196521759, 0.0768533498048...
life.) I'd also save copies as `MyEnvironment.as-debug` and `MyEnvironment.as-release`; the latter would have different settings. Then, if I need a release build, my build script would copy `MyEnvironment.as-release` to `MyEnvironment.as` (overwriting the original), and recompile. That'll load all of my release setting...
[ 0.19883310794830322, -0.0159610603004694, 0.5048962831497192, -0.21793583035469055, 0.4887435734272003, 0.28554412722587585, 0.5708396434783936, -0.3047299087047577, -0.049048908054828644, -0.5155391693115234, -0.27809807658195496, 0.7787331938743591, -0.4695236384868622, -0.02551074698567...
This is the XMLHttpRequest: ``` $.ajax({ method: "get", url: "getPage.php", data: $data, dataType: 'json', timeout: 2000, success: function(result) { handleContent(result); } }); ``` This is getPage.php?data=data ``` header("Expires: " . gmdate("D, d M Y H:i:s", time() + ...
[ -0.1711418181657791, -0.08966749161481857, 0.7183731198310852, -0.08473049849271774, -0.09532217681407928, -0.1578299105167389, 0.05869385227560997, -0.030375778675079346, -0.23729820549488068, -0.6385568380355835, -0.48328304290771484, 0.22252540290355682, -0.05154205486178398, 0.22846379...
public"); print $print; ``` The client browser properly caches $location. However it does not cache the redirect in getPage.php?data=data Every time the ajax-request is called it requests a GET getPage.php?data=data. I would like it to automatically GET $location instead (or rather try GET $location and get the pag...
[ -0.0012790070613846183, 0.1214294582605362, 0.5226997137069702, 0.07832031697034836, -0.3241397440433502, -0.19541846215724945, 0.3960564136505127, 0.0810302272439003, -0.303964227437973, -0.6603723168373108, -0.08525366336107254, 0.6822423338890076, -0.3686142563819885, 0.0882998928427696...
an answer and possibly a solution which lets the 301 redirect get cached resulting in no GET requests at all after a first request. Thanks in advance! **Edit**: most browsers now (November 2013) do cache redirects, see [Browserscope](http://www.browserscope.org/?category=network&v=top) (the "Cache Redirects" test), bu...
[ 0.1406072974205017, -0.13258005678653717, 0.3945366442203522, 0.13542892038822174, -0.24690000712871552, 0.01362306997179985, 0.5630494356155396, -0.00040803459705784917, -0.27495038509368896, -0.45348116755485535, -0.1507130116224289, 0.19007508456707, -0.037820298224687576, -0.0217076689...
I want to know if there is a recommended way of determining if an asp application is running locally. At the moment I use the Request object and do a string search for localhost or 127.0.0.1 on the server variable but this has several limitations. The biggest one being that the Request object is not always available wh...
[ -0.017188264057040215, -0.1535429209470749, 0.40429747104644775, -0.07461042702198029, -0.017312772572040558, 0.0553378164768219, 0.4497550427913666, 0.156632199883461, -0.3459400534629822, -0.8202400803565979, -0.1791079044342041, 0.2833196520805359, -0.0889350026845932, 0.337313950061798...
I have a friendly argument going on with a co-worker about this, and my personal opinion is that a ASP.NET-MVC compiled web application would run more efficiently/faster than the same project that would be written in PHP. My friend disagrees. Unfortunately I do not have any solid data that I can use to back up my argu...
[ 0.45645052194595337, 0.547193169593811, -0.1312662810087204, 0.2260102480649948, 0.11287206411361694, -0.06861943751573563, 0.1674184799194336, 0.11323010921478271, -0.08441217988729477, -0.5706254243850708, 0.3180360794067383, 0.38058459758758545, -0.10283695161342621, 0.17794369161128998...
this argument I really don't care about any of that. I would like to know what stack overflow community thinks about the raw speed/efficency of websites in general that are developed in ASP.NET with MVC versus exactly the same website developed with PHP? Does anyone have any practical examples in real-world scenarios...
[ 0.5210655331611633, 0.4055245518684387, 0.33985745906829834, 0.32354167103767395, -0.3350149095058441, -0.030969219282269478, 0.15256653726100922, 0.08094926923513412, -0.20877215266227722, -0.49230048060417175, 0.3782532811164856, 0.663009762763977, 0.23573921620845795, 0.1200993657112121...