text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
an object to an array, it calls `retain` on that object. If you don't release your pointer to that object, it will be a leak. When you release the array, it will call `release` on all of the objects that it holds, since it called `retain` previously. As for autorelease vs release, the only way to know for sure (aside ...
[ 0.37091323733329773, 0.02170063927769661, 0.19063732028007507, 0.27020126581192017, 0.23098529875278473, -0.5665913224220276, 0.002238199580460787, -0.09997768700122833, -0.5269507169723511, -0.06927405297756195, -0.279834121465683, 0.6270674467086792, -0.06446875631809235, 0.5167279839515...
methods (`array:`, `arrayWithObjects:`, `arrayWithArray:`, etc.) return autoreleased objects. However, their corresponding init methods (`init:`, `initWithObjects:`, `initWithArray:`, etc.) do not - if you call them, you are responsible for calling `release` on the returned object. I seem to recall a few other questio...
[ -0.07630729675292969, -0.09809236973524094, 0.07488644123077393, 0.09755586832761765, -0.2709031105041504, -0.13103124499320984, 0.2811987102031708, -0.11673863232135773, -0.22044691443443298, -0.1938154250383377, -0.4273906350135803, 0.4968670606613159, -0.4748777747154236, 0.006402830127...
On my computer, I'm using a custom adblock based on HOSTS redirection (so I can have adblock in Chrome). I'm running IIS on my machine, so I have a custom blank 404 error that displays when an `iframe`-based ad is displayed on a page. I've modified my 404 error to inherit its background color from its parent so that ...
[ 0.2925121784210205, 0.5644521713256836, 0.11156680434942245, -0.1571502834558487, -0.03150932863354683, -0.0033492553047835827, 0.41300150752067566, 0.15491944551467896, -0.18252435326576233, -0.8962734937667847, 0.23762942850589752, 0.32229092717170715, -0.28043118119239807, 0.41448932886...
`<iframe />` tag from within the iframe? I just want to change the height & width attributes if this is possible. If so, how would I go about doing this? Shouldn't be possible, as sites within iframes can be external site. Allowing them to manipulate the environment they're displayed in would be a browser security risk...
[ 0.6912226676940918, 0.25018206238746643, 0.39888009428977966, -0.22784779965877533, -0.06941128522157669, -0.0028802191372960806, 0.004659194964915514, -0.0493055023252964, 0.0015463250456377864, -0.73844975233078, 0.15599492192268372, 0.5468131899833679, -0.305264949798584, 0.118685588240...
In .Net the `Component` class exposes a `Disposed` event. It also provides a protected member `OnDispose(bool disposing)`. What is the best practice for a custom component that extends `Component`? Override `OnDispose(bool)` or attach an event handler to `Disposed` on construction? My feeling is that one should over...
[ 0.5405640602111816, -0.3652244508266449, -0.03471618518233299, 0.07975210249423981, -0.08455672860145569, -0.34109917283058167, 0.01675317995250225, -0.20423132181167603, -0.1406649947166443, -0.6265982985496521, 0.013174314051866531, 0.5527990460395813, -0.24621833860874176, 0.15649116039...
guarantee the order in which the Events are handled. Sealing the class often depends on what you're designing. The FxCop rule also has some good info: <http://msdn.microsoft.com/en-us/library/ms244737(VS.80).aspx>
[ 0.08784514665603638, -0.3251781463623047, 0.25370240211486816, 0.29130586981773376, 0.31601783633232117, -0.4243980348110199, -0.02567106857895851, -0.232180655002594, -0.23028723895549774, -0.36735546588897705, -0.23195874691009521, 0.8305887579917908, -0.1105371043086052, -0.339507639408...
How can I validate the user input by using scanf. Right now I have something like this, but doesn't work. NOTE: I have the atoi just to validate that the scanf validation works. ``` scanf("%[0987654321.-]s",buf); i = atoi(buf); if(i) index = i; ``` Using `scanf()` is usually a bad idea for user input since fai...
[ 0.2690904438495636, -0.019231338053941727, 0.5463098883628845, -0.1004633679986, -0.0999658852815628, -0.05495312437415123, 0.5381571650505066, -0.4099103510379791, -0.05170843377709389, -0.6435595750808716, -0.036542560905218124, 0.516664445400238, -0.2902841866016388, 0.03792635723948479...
check the string for those characters you desire (either via a loop or with a regular expression), something which the `scanf` family of functions is not really suited for. By way of example, using `scanf()` with a `"%d"` or `"%f"` will stop at the first non-number character so won't catch trailing errors like `"127he...
[ 0.16228491067886353, -0.27958616614341736, 0.1391221135854721, -0.13494211435317993, -0.04522612690925598, 0.0007822313345968723, 0.23554491996765137, 0.041774339973926544, -0.10178638249635696, -0.4335632920265198, -0.11818832159042358, 0.4657108783721924, -0.428607314825058, -0.173462331...
using that advice, see [here](https://stackoverflow.com/questions/4023895/how-to-read-string-entered-by-user-in-c/4023921#4023921). Once you have an input line as a string, you can `sscanf` to your hearts content.
[ 0.12252562493085861, -0.06953088194131851, 0.3192770481109619, -0.06914284080266953, 0.12288230657577515, -0.26081573963165283, 0.49236375093460083, 0.16059046983718872, -0.133383110165596, -0.5295965075492859, -0.1487392783164978, 0.6008367538452148, -0.04305029660463333, -0.1690342128276...
What are the best practices for choosing the linking method in VC++? Can anything/everything be statically linked? On a dynamically linked project, is the relative/absolute location of the linked library important? What are the pros and cons ? **added**: I was mainly referring to lib files. Do they behave same as ...
[ 0.10458873957395554, -0.20173384249210358, 0.46216875314712524, 0.26282358169555664, -0.09425714612007141, -0.1450156420469284, 0.09950506687164307, 0.03768413886427879, -0.4075309634208679, -0.7251874208450317, -0.20350788533687592, 0.6861212253570557, -0.35562431812286377, 0.183850541710...
benefit in that calls to the linked code are not indirected, so they run faster. This may have an impact on extremely performance dependent code. Using DLLs can also help you reduce your memory footprint, as effectively you only load the libraries as you need them and you can unload them when your done (think applicat...
[ 0.37652403116226196, -0.19500599801540375, 0.052289847284555435, 0.19766847789287567, -0.21848316490650177, -0.3643566966056824, -0.19081389904022217, -0.10530594736337662, -0.46854403614997864, -0.7523993849754333, -0.2107904851436615, 0.6735842823982239, -0.4862286150455475, -0.007891585...
your program) use the same DLL, they will use the same DLL loaded into memory which will further reduce your overall memory usage.
[ 0.22239713370800018, -0.1684141904115677, 0.22711998224258423, 0.4877675771713257, 0.11783561110496521, 0.0597786083817482, 0.3402040898799896, 0.03557619825005531, -0.11575952172279358, -0.8578056693077087, -0.29969310760498047, 0.6659842133522034, -0.17692837119102478, 0.1115079969167709...
What is the exact SQL to assign `db_datareader` and `db_datawriter` roles to a user in SQL Server? The user name is `MYUSER` and the database is `MYDB`. In SQL Server 2012, 2014: ``` USE mydb GO ALTER ROLE db_datareader ADD MEMBER MYUSER GO ALTER ROLE db_datawriter ADD MEMBER MYUSER GO ``` In SQL Server 2008: ```...
[ -0.2231692373752594, 0.4220763146877289, 0.6191933155059814, 0.09248567372560501, -0.18725363910198212, 0.05081570893526077, -0.1911635398864746, -0.22593121230602264, -0.16957879066467285, -0.41299358010292053, 0.1173229068517685, 0.37284478545188904, -0.2464733123779297, 0.25859680771827...
When I build in Xcode, any errors or warnings are being duplicated. So in the IDE, I get twice the number near the icons in the status bar, and where the yellow or red bubbles show up in the editor, there are two warning lines (or error lines) below the line where the warning (or error) occurred. Anyone else have this ...
[ 0.6559861302375793, 0.38611456751823425, 0.26523974537849426, -0.2885713279247284, 0.09966873377561569, -0.027703039348125458, 0.32353201508522034, -0.016487181186676025, -0.10380660742521286, -0.8222546577453613, -0.02803467959165573, 0.75712651014328, -0.10881295055150986, -0.23239435255...
When reading source code, I always want to know the full path of the file when it is loaded, is there any callback method in ruby to accomplish this, or any other way to do this? thanks in advance. **EDIT** Clarification from the comments: I want to know where the loaded "somefile" is located while I execute this lin...
[ 0.4631938636302948, 0.1324891895055771, 0.15463325381278992, -0.027547378093004227, -0.16667848825454712, -0.4096139967441559, 0.3895469009876251, 0.18050836026668549, -0.22080975770950317, -0.9146640300750732, -0.10976502299308777, 0.8796654343605042, -0.32028570771217346, -0.227730870246...
$:.each do |p| if File.exists? File.join(p, string) puts File.join(p, string) break end end load_original(string) end alias_method :load_original, :load alias_method :load, :load_and_print end ``` We use `alias_method` to store the original `load` method, which we call at t...
[ 0.16095563769340515, -0.030325453728437424, 0.4558561146259308, -0.09326456487178802, 0.211083322763443, -0.27122732996940613, 0.17480824887752533, -0.3701936602592468, 0.04609709978103638, -0.33797046542167664, -0.17127154767513275, 0.5105072855949402, -0.3674798309803009, 0.0898848921060...
I am using a "spinner" NSProgressIndicator in my cocoa app: [![spinner image](https://i.stack.imgur.com/NTzoW.png)](https://i.stack.imgur.com/NTzoW.png) I would like to display it in a different color so that it will show up well on a dark background: [![inverted spinner image](https://i.stack.imgur.com/eytEK.png)](...
[ 0.3543974757194519, -0.05905148759484291, 0.32021433115005493, 0.06330244988203049, -0.3114633560180664, 0.30355435609817505, 0.09476448595523834, 0.2913743853569031, -0.4547030031681061, -0.8499349355697632, 0.1446007639169693, 0.2932388186454773, -0.30685123801231384, 0.1290004849433899,...
NSView, which can be used on OS X 10.4, and the other is a subclass of CALayer, which can be used in a CoreAnimation-based project. The code is on github (both the [NSView-based](https://github.com/kelan/yrk-spinning-progress-indicator) version and the [CoreAnimation-based](https://github.com/kelan/yrk-spinning-progres...
[ 0.21435800194740295, 0.10532427579164505, 0.37851473689079285, 0.20157958567142487, -0.023768024519085884, -0.15645356476306915, 0.3433089852333069, 0.2752198874950409, -0.13409368693828583, -0.8591568470001221, -0.2136421501636505, 0.2950376272201538, 0.09238886088132858, -0.0533447414636...
I'm getting the following error on the line of code below: Syntax error (missing operator) in query expression 'REPLACE(LTRIM(RTRIM(ATTACHMENTS)), ,'')'. Any help would be awesome... ``` -----------the line of code that is giving me problems-------------------------------- objConn.Execute("UPDATE EMAIL_SEND_ATTACH...
[ -0.00026153455837629735, 0.293506920337677, 0.9552940130233765, -0.19920614361763, 0.08128596097230911, -0.06589312106370926, 0.5192394256591797, -0.2933518886566162, -0.3716564476490021, -0.41023126244544983, -0.21652646362781525, 0.8560320734977722, -0.5113825798034668, 0.010203894227743...
set ATTACHMENTS = REPLACE(LTRIM(RTRIM(ATTACHMENTS)), '"& StoredPath & "' ,'') WHERE EMAIL\_LETTERS\_HOLD\_ID= "& AttID & " ") Andy.
[ 0.38191860914230347, -0.11024612188339233, 0.7394195199012756, -0.4299564063549042, 0.20756390690803528, 0.18931236863136292, 0.3473006784915924, -0.45021677017211914, -0.23522290587425232, -0.6266120672225952, -0.3781410753726959, 0.6060266494750977, -0.7536145448684692, -0.15020467340946...
I coded up 4 .java files. The thing is that I can only execute my .java files from my IDE, how do I execute the .class files like an application? I study at uni, and I was told that Java is platform independent. Any tutorial/book recommendations would be highly appreciated. Thanks The basic idea (to give you some thi...
[ 0.7197009325027466, 0.13752099871635437, -0.28477948904037476, -0.05552567169070244, -0.2602311372756958, -0.08237846195697784, 0.3921722173690796, 0.07161831110715866, -0.2712053954601288, -0.7190645933151245, 0.10577495396137238, 0.40700122714042664, -0.17164170742034912, 0.0448986031115...
'dist' folder. Modern JREs will allow you to run the jar by double clicking it etc. You can also go a bit further by wrapping the jar in a native executable using a tool such as JSmooth.
[ 0.24063600599765778, -0.04796518385410309, 0.3399915397167206, 0.24815738201141357, -0.015419285744428635, -0.24952152371406555, 0.35795140266418457, 0.33249178528785706, -0.09848669171333313, -0.5332449078559875, -0.20758599042892456, 0.43815308809280396, -0.06894182413816452, 0.258095085...
How can I get the underlying DataItem from a GridView row that is in edit mode and the user clicks on "Update"? I have an editable GridView. I've added a CustomValidator to the Edit view of one of the columns. When the user clicks on Update I run a server validate method and need to get the underlying DataItem of the ...
[ 0.1914559304714203, 0.2092081755399704, 0.5899380445480347, 0.03325940668582916, 0.025614803656935692, 0.05427097901701927, 0.2142740935087204, -0.41029632091522217, 0.10803282260894775, -0.6779041290283203, 0.057777728885412216, 0.800053596496582, -0.23643338680267334, 0.0884389653801918,...
When it comes to classifying music by genre, I've found wikipedia to have more interesting genre information than most other data sources. I seem to remember a database that collected this sort of information from Wikipedia and made it more easily accessible, but I couldn't google anything up today. If I was to attem...
[ 0.47692856192588806, 0.17468145489692688, -0.024758853018283844, 0.12284207344055176, -0.14899343252182007, -0.05309499055147171, -0.2236788421869278, 0.17072786390781403, -0.6158173680305481, -0.25920408964157104, 0.18341559171676636, 0.3020453453063965, 0.05185217410326004, 0.40347045660...
not really what I want though because it's only available as a download. While I was looking I found how to access articles in [XML format](http://en.wikipedia.org/wiki/Special:Export/Radiohead) with unrendered wiki markup. Apparently it's easier on the wikipedia servers but I'm unsure about whether it would be easier...
[ 0.7124598622322083, 0.36559391021728516, -0.20005398988723755, 0.18286855518817902, -0.16064757108688354, -0.31062713265419006, 0.028167899698019028, 0.4523908793926239, -0.07356265187263489, -0.1435961276292801, 0.27230802178382874, 0.4723645746707916, -0.012180633842945099, 0.32527282834...
What is the best approach to releasing a new version of a hosted web app, and how often do you typically release? Do you pick an arbitrary date, say every week, month, etc. to rollout an accumulated set of fixes (perhaps using an approach similar to [Joel's approach to ship dates](http://www.joelonsoftware.com/articles...
[ 0.4548877477645874, -0.24361996352672577, 0.28696712851524353, 0.15706180036067963, -0.04770295321941376, 0.020937670022249222, -0.05689495801925659, 0.25826162099838257, -0.5519086122512817, -0.15499258041381836, 0.15891963243484497, 0.1864318549633026, 0.29586082696914673, 0.147640660405...
has been primarily with installed server-based or desktop apps. I am curious to see what type of release management people use with a hosted app. Google's approach is probably the best for the end user, but it comes at the cost of complexity. They roll out new versions (and sometimes just individual changes) on a pret...
[ 0.3213821351528168, 0.12167198210954666, 0.2646121382713318, 0.1211107075214386, -0.03783627226948738, -0.11663903295993805, 0.018330814316868782, 0.3375391662120819, -0.4509108364582062, -0.07523280382156372, -0.25380510091781616, 0.3793771266937256, -0.061198942363262177, 0.0182518716901...
should see this feature". They can then analyse the results and plan their next release, perhaps to another 15% of the user population.
[ 0.6403109431266785, 0.025215648114681244, 0.5619069337844849, 0.07785874605178833, 0.3735492527484894, -0.35837286710739136, 0.35147926211357117, 0.07124371826648712, 0.026554450392723083, -0.46481165289878845, -0.4225175976753235, 0.4558284282684326, 0.26150956749916077, -0.25315043330192...
For a typical J2EE web application, the datasource connection settings are stored as part of the application server configuration. Is there a way to version control these configuration details? I want more control on the datasource and other application server config changes. What is the standard practice for doing ...
[ 0.049589548259973526, -0.1597350537776947, 0.2530103027820587, -0.05177215859293938, -0.06443050503730774, -0.4282127916812897, 0.08702964335680008, -0.2855880856513977, -0.35992616415023804, -0.7305286526679993, -0.2530313730239868, 0.42570555210113525, -0.21321338415145874, -0.2435821443...
here: <http://www.ibm.com/developerworks/java/library/j-ap02109/index.html?ca=drs->
[ -0.014256535097956657, 0.1858668178319931, -0.08897396177053452, -0.05238606780767441, 0.22177766263484955, 0.18381266295909882, -0.058098215609788895, 0.1695243865251541, -0.5461800694465637, -0.4554804563522339, -0.5539729595184326, 0.05207683891057968, -0.30397656559944153, 0.1551205664...
I'm seeking a library, or bit of code I can incorporate into a Cocoa project where I can turn a stream of text with ansi color control codes into an attributed string. There are many projects that do this, but having examined their code they're either messy or overly complex. Has anyone an idea of a *simple* piece of c...
[ 0.1116909608244896, 0.10618981719017029, 0.012286324985325336, -0.02313663437962532, 0.14640472829341888, -0.028920304030179977, 0.354086697101593, 0.11474631726741791, -0.07909009605646133, -0.6975969672203064, 0.0848991870880127, 0.14613217115402222, -0.4202095866203308, -0.1114698126912...
I am having a couple of issues deciding how best to describe a certain data structure in C# (.NET 3.5). I have to create a class library that creates some text files for the input of a command line program. There are dozens of file types, but most of them have a similar header, footer and a couple of other properties....
[ 0.6627201437950134, 0.16206839680671692, 0.14722909033298492, -0.07405924797058105, 0.2200419008731842, 0.016689134761691093, -0.10020112246274948, -0.11973772197961807, -0.1253061294555664, -0.8193550109863281, 0.2586984932422638, 0.38817209005355835, -0.10470547527074814, 0.2286632657051...
parent class that contains most of the headerItems and footeritems, and then implement the actual file types in a derived class: ``` class BaseFileType { public List<HeaderItems>; public List<BodyItems>; public List<FooterItems>; FileType filetype; String filename; public BaseFileType1 (FileType filetype,String ...
[ 0.4805084466934204, -0.057731177657842636, 0.5060538649559021, 0.2487327605485916, 0.15275466442108154, 0.1954999417066574, -0.10120952874422073, -0.26374849677085876, 0.10848983377218246, -0.466255247592926, -0.08435000479221344, 0.27939698100090027, -0.17784260213375092, 0.13200300931930...
} //some other generic methods } ``` The thing is, I want to inherit the contructor from the base class for the derived class, but from what I have read this can not be done. What is the best strategy here? I have seen that I can call the base constructor from my derived class constructor like so: ActualFil...
[ 0.29590246081352234, 0.08307530730962753, 0.20514898002147675, 0.18127146363258362, 0.07207318395376205, -0.19772303104400635, 0.06449820846319199, 0.035833798348903656, 0.056801892817020416, -0.560265302658081, 0.15223020315170288, 0.7710911631584167, -0.1307986080646515, 0.12039008736610...
I make these classes. What other alternatives to people thing would work? Have a single FileFactory that spits out classes containing the structure I require? I've written a class (called [ANSIEscapeHelper](http://hasseg.org/ansiEscapeHelper/)) to translate between `NSStrings` that contain ANSI escape sequences and s...
[ 0.23137053847312927, -0.03996796905994415, -0.10561861842870712, -0.025246798992156982, 0.12379354983568192, 0.056241732090711594, 0.556016743183136, 0.08802080899477005, 0.0017948175081983209, -0.6269749999046326, -0.010710676200687885, 0.18570859730243683, -0.2557058036327362, -0.0056433...
I tried running the following statement: ``` INSERT INTO VOUCHER (VOUCHER_NUMBER, BOOK_ID, DENOMINATION) SELECT (a.number, b.ID, b.DENOMINATION) FROM temp_cheques a, BOOK b WHERE a.number BETWEEN b.START_NUMBER AND b.START_NUMBER+b.UNITS-1; ``` which, as I understand it, should insert into VOUCHER each record from ...
[ 0.2946329414844513, 0.31901073455810547, 0.19661802053451538, 0.13486190140247345, 0.07729503512382507, 0.288821280002594, 0.2025250643491745, -0.08466486632823944, -0.20538382232189178, -0.3883776068687439, 0.35087528824806213, 0.25037768483161926, -0.250669926404953, 0.13002139329910278,...
syntax of my query? EDIT: The structure of BOOK is: ``` ID int(11) START_NUMBER int(11) UNITS int(11) DENOMINATION double(5,2) ``` The structure of temp\_cheques is: ``` ID int(11) number varchar(20) ``` Try removing the parenthesis from the SELECT clause. From [Microsoft TechNet](http://technet.micro...
[ -0.05139457434415817, 0.2486819326877594, 0.6165137887001038, -0.09894008934497833, -0.03300231322646141, 0.13096340000629425, -0.07412369549274445, -0.25681793689727783, 0.09613214433193207, -0.281526118516922, -0.3033154606819153, 0.5199669003486633, -0.19938980042934418, 0.0147432014346...
okay.", is actually correct, assuming you have many rows in both BOOK and temp\_cheques. You are trying to query all rows from both tables and make a cross-reference, resulting in an m\*n size query. SQL Server is trying to warn you of this, before performing a potentially long operation. Set `SQL_BIG_SELECTS` = 1 bef...
[ 0.29763063788414, -0.14706666767597198, 0.4841119050979614, 0.08763159066438675, 0.40102827548980713, -0.34162458777427673, 0.25723254680633545, 0.08191122114658356, -0.33977487683296204, -0.5803378224372864, -0.013831444084644318, 0.7004595398902893, -0.38473185896873474, -0.0296925380825...
I have a C# Application I am creating that stores all data in SQL Server. Sometimes it's easier for me to make data changes programmatically and sometimes it's easier to have stored procedures and functions in the SQL Server database and call them. I am rather new to programming and I don't know what the subtle adva...
[ 0.49215415120124817, 0.5303902626037598, 0.16651147603988647, 0.18140938878059387, 0.05111716315150261, -0.2494460940361023, 0.20850591361522675, 0.31977182626724243, -0.15915706753730774, -0.5782514810562134, 0.27401334047317505, 0.24698279798030853, -0.18832598626613617, 0.25892958045005...
Joel Spolsky. I love his books. This is a solo project, so I can refactor any amount of code I want to make it better. All options are on the table. Thanks, J3r3myK Well, Stored Procs can be an additional level of abstraction or a set of functions/methods if you look at the database like an object or service. This c...
[ 0.026082511991262436, 0.1548144519329071, -0.15860766172409058, 0.4010617434978485, -0.018506906926631927, 0.08729679137468338, 0.3720373511314392, 0.20423370599746704, -0.3100496828556061, -0.5532091856002808, -0.17480479180812836, 0.3592558801174164, -0.28747326135635376, -0.074669487774...
of stored procs, no matter how someone gets access to your database, they'll only be able to interact with it using the methods you designed and wrote for it --> there's less risk of someone firing up Excel and hacking into your database. On the other hand, Stored Proc require extensive T-SQL knowledge and you'll be s...
[ 0.11512591689825058, 0.29039204120635986, 0.25645241141319275, 0.15612752735614777, 0.04323345050215721, -0.05383085086941719, 0.08269951492547989, 0.09694571793079376, -0.17862892150878906, -0.43387749791145325, -0.08119334280490875, 0.4538283050060272, -0.41744014620780945, -0.1036589369...
Procs is the fact that if something is wrong in your proc, you can fix it merely by deploying the proc with the fix - you don't need to touch your C# app. This can be a great plus in a "hosted" environment if you only get 3 releases per year - applying a hotfix by means of fixing an Stored Proc can be your live-saver t...
[ 0.06408553570508957, 0.20535799860954285, 0.23943381011486053, -0.07612209022045135, 0.028322625905275345, 0.0004824362404178828, 0.028759995475411415, 0.3955165445804596, -0.320208877325058, -0.29384881258010864, -0.22724051773548126, 0.6032608151435852, -0.5926274061203003, -0.5048471093...
it works for you. If it feels to cumbersome or too inflexible or like too much work in the long run, you can always switch back to using straight SQL in your C# app. Just my $0.02. Marc
[ 0.6204525828361511, 0.2950195372104645, 0.0807817131280899, 0.19346070289611816, -0.024878744035959244, -0.11401942372322083, 0.427700400352478, 0.6126489043235779, 0.15875941514968872, -0.7346958518028259, 0.22322742640972137, 0.6807165741920471, 0.001267132698558271, -0.1541633903980255,...
I know something about MACROS. I don't mean the ASSEMBLY language kind. I am talking about those programs that you can use perform repetitions actions on another program. I am talking about those programs that you can use to record a series of events on your computer, like, mouse movements and button clicks and then yo...
[ 0.46890681982040405, -0.20631583034992218, -0.03200612962245941, 0.1357678920030594, 0.2752556800842285, 0.3667750358581543, -0.24385099112987518, 0.3500012755393982, -0.5020415782928467, -0.3902524411678314, 0.5041213035583496, 0.6156613230705261, -0.6142215132713318, -0.1680063009262085,...
kind to feed the excell session script commands. It worked. But something on the level of the operating system, I imagine, is a whole different story. How does someone go about writing a "macro" in C#? I think the approach I will take is to use the spy routine that comes with the development environment to get a lis...
[ 0.3949187397956848, 0.04320918768644333, 0.36241477727890015, -0.1325354129076004, 0.15141040086746216, 0.1568724811077118, 0.12255044281482697, 0.004947977140545845, -0.1610492467880249, -0.5929293632507324, 0.30871009826660156, 0.7100791931152344, -0.4791613519191742, -0.3289286196231842...
is already running? 3. How do I send user-like messages to an app that is already running? There are different answers based on many following factors: * is it 3rd party or your own application? * does it have automation interface * GUI toolkit used in app If it is a 3rd party app then you need to work on Windows API...
[ 0.27523815631866455, -0.06511158496141434, 0.3743996322154999, 0.2326154112815857, -0.14040030539035797, 0.04157804697751999, 0.2828729748725891, -0.22574982047080994, -0.14557646214962006, -0.43700873851776123, 0.09645121544599533, 0.5838345885276794, -0.36800065636634827, -0.221862360835...
program that will be interact with this app. If it's your own application you want to enhance with macros functionality then you should take this into account on design state. If you use Command pattern from the beginning then it's not hard to program macro recording. You should provide more details to get a better a...
[ 0.36147361993789673, -0.09822942316532135, 0.17697742581367493, 0.2179575115442276, -0.06977033615112305, -0.03169194236397743, 0.26229962706565857, -0.3114036023616791, -0.2626439034938812, -0.6896564960479736, 0.31125497817993164, 0.7913841009140015, -0.13549436628818512, -0.135317280888...
process Id and window's handle via WinApi. > 3. How do I send user-like messages to an app that is already running? Once again it depends on application type. For native win apps you can easily send WM\_XXX messages via WinAPI
[ 0.24475182592868805, 0.06813224405050278, 0.3576280176639557, -0.057652175426483154, -0.0914650559425354, 0.14291547238826752, 0.357930451631546, -0.2242121398448944, 0.06367039680480957, -0.9823817014694214, -0.10304675996303558, 0.5539025068283081, -0.08025114983320236, 0.201384112238883...
How can I create a Java/Swing text component that is both styled and has a custom font? I want to highlight a small portion of the text in red, but at the same time use a custom (embedded via `Font.createFont`) font. JLabel accepts HTML text, which allows me to highlight a portion of the text, but it ignores font setti...
[ 0.3519975543022156, 0.015063336119055748, 0.35041970014572144, -0.18433627486228943, -0.30182158946990967, -0.09640482068061829, 0.24630291759967804, -0.44919446110725403, -0.03866385295987129, -0.8762470483779907, -0.070599265396595, 0.6003063917160034, -0.3565647602081299, -0.07895676791...
textPane.setFont(myCustomFont); textPane.setText(text); MutableAttributeSet attributes = new SimpleAttributeSet(); StyleConstants.setForeground(attributes, Color.RED); textPane.getStyledDocument().setCharacterAttributes( text.indexOf(toHighlight), toHighlight.length(), attributes...
[ 0.2450605034828186, 0.17176540195941925, 0.6758646965026855, -0.255079984664917, -0.07413050532341003, -0.03664243966341019, 0.6042117476463318, -0.5016265511512756, -0.058609265834093094, -0.761402428150177, -0.19100749492645264, 0.8523823022842407, -0.16180478036403656, -0.10799749195575...
cannot use the `DefaultStyledDocument` and have it use a physical font (one you created yourself with `createFont`) out of the box. However, what I think you could do is implement your own `StyleContext` this way: ``` public class MyStyleContext extends javax.swing.text.StyleContext { @Override public Font getFon...
[ 0.21865715086460114, 0.15554068982601166, 0.5959635376930237, -0.1702663004398346, 0.06006627529859543, -0.023556113243103027, 0.351971298456192, -0.3592491149902344, 0.17996813356876373, -0.7414823770523071, -0.15452946722507477, 0.737787663936615, -0.2916944622993469, -0.0717214718461036...
return super.getFont(attr); } } ``` Then you have to: 1. create a `DefaultStyledDocument` with a `new MyStyleContext()` 2. "attach" it to the `JTextPane` 3. call `attributes.addAttribute("MyFont", myCustomFont);` in your snippet above I did not try it but I think it should work or it might be a good path to inv...
[ 0.14805057644844055, -0.11803186684846878, 0.6391786336898804, -0.17385634779930115, 0.33928170800209045, -0.3473784625530243, 0.2726597189903259, -0.07585024833679199, 0.15637198090553284, -0.6032777428627014, -0.4242004156112671, 0.7255915403366089, -0.2291998714208603, -0.12859641015529...
I am creating a test program to test the functionality of program which calcultes CPU Utilization. Now I want to test that program at different times when CPU utilization is 100%, 50% 0% etc. My question how to make CPU to utilize to 100% or may be > 80%. I think creating a while loop like will suffice ``` while(i+...
[ 0.5466336011886597, 0.08830457925796509, 0.0797606110572815, -0.022498656064271927, 0.036189544945955276, -0.027282260358333588, 0.4107509255409241, 0.024216428399086, -0.14433571696281433, -0.6446062922477722, 0.17814813554286957, 0.577063798904419, -0.21874545514583588, 0.115550331771373...
a sleep Basically nothing in that loop is going to take very much CPU time compared with the time it's sleeping or waiting for IO. To kill a CPU you need to give it *just* CPU stuff. The only tricky bit really is making sure the C++ compiler doesn't optimise away the loop. Something like this should probably be okay:...
[ 0.6535851359367371, -0.2098923623561859, 0.09874208271503448, -0.239034503698349, 0.02963421121239662, -0.2716839015483856, 0.34967952966690063, -0.08451453596353531, -0.32517075538635254, -0.701017439365387, -0.020719554275274277, 0.6262386441230774, -0.5223393440246582, 0.032944686710834...
the fact that I'm returning the value out of the loop. That should stop the C++ compiler from noticing that the loop is useless (if you never used the value anywhere, the loop would have no purpose). You may want to disable inlining too, as otherwise I guess there's a possibility that a smart compiler would notice you ...
[ -0.051131997257471085, -0.07580889761447906, -0.007444484159350395, 0.019155168905854225, 0.012683779001235962, -0.24816155433654785, 0.380312979221344, -0.17946545779705048, -0.11556807160377502, -0.09513526409864426, -0.28092464804649353, 0.743532657623291, -0.4954474866390228, 0.0819961...
I have a ASP MVC App with some seemingly simple code to save and retrieve cookies but for some reason they won't persist. The code in the controller is : ``` if (System.Web.HttpContext.Current.Response.Cookies["CountryPreference"] == null) { HttpCookie cookie = new HttpCookie("CountryPreference"); cookie.Value...
[ -0.13765516877174377, -0.147128626704216, 1.0259621143341064, 0.11777474731206894, 0.06359325349330902, -0.18030384182929993, 0.4977914094924927, -0.17991897463798523, -0.4400539696216583, -0.7343534231185913, -0.04747415706515312, 0.264481782913208, -0.22873248159885406, 0.378052026033401...
using Response object rather than Request, ASP.net automatically creates a cookie. Check this detailed post here: <http://chwe.at/blog/post/2009/01/26/Done28099t-use-ResponseCookiesstring-to-check-if-a-cookie-exists!.aspx> --- Quote from the article in case the link goes down again .... > The short explanation, if...
[ -0.09264294803142548, -0.2617923617362976, 0.3442533314228058, 0.1983470916748047, -0.09741362929344177, -0.327551931142807, 0.5286599397659302, -0.11484534293413162, -0.2960602641105652, -0.5292549133300781, -0.4737936854362488, 0.5505280494689941, -0.24845601618289948, 0.1448604613542556...
I'd really like some help with this as I have hardly any idea where to start. I'm fed up of not having somewhere to properly test any web code and the free hosting sites I've found only support half of what I want. **I want to setup my own server capable of dishing out webpages, running a database and handling WCF se...
[ 0.5287333726882935, 0.4238111674785614, 0.40372464060783386, -0.001889532431960106, 0.10094712674617767, -0.16166336834430695, 0.29312747716903687, 0.1906178593635559, -0.10926209390163422, -0.7333372831344604, -0.011713179759681225, 0.22244876623153687, 0.37031078338623047, 0.010536038316...
out internet information services. Will that let me serve up an ASP.NET website? **What I'm looking for is a little guidance and any resources you think might help me.** EDIT: Not sure why I'm downvoted, perhaps not programming related? I can't test my code properly if I have nowhere to run it now can I? I'm despera...
[ 0.1067696213722229, -0.1402943730354309, 0.44865527749061584, 0.1133665069937706, 0.010484094731509686, -0.3135014474391937, 0.40674924850463867, 0.09171917289495468, -0.4718312919139862, -0.7947084307670593, -0.09395404160022736, 0.08629050850868225, -0.4214114248752594, 0.131334096193313...
the article in case the link goes down again .... > The short explanation, if you don’t > like to read the entire story > > > If you use code like “if > (Response.Cookies[“mycookie”] != null) > { … }”, ASP.Net automatically > generates a new cookie with the name > “mycookie” in the background and > overwrites ...
[ 0.02143171802163124, -0.12607650458812714, 0.42343753576278687, 0.3042505085468292, 0.0357632152736187, -0.39452293515205383, 0.5358933210372925, 0.05868721008300781, -0.32009774446487427, -0.4740746319293976, -0.3340233862400055, 0.5021263957023621, -0.11084900051355362, 0.069547362625598...
Does anyone know a project which implements standard compression methods (like Zip, GZip, BZip2, LZMA,...) using NVIDIA's [CUDA library](http://www.nvidia.com/object/cuda_home.html)? I was wondering if algorithms which can make use of a lot of parallel tasks (like compression) wouldn't run much faster on a graphics ca...
[ 0.3559902012348175, 0.08712054789066315, -0.03947219252586365, 0.2965858280658722, -0.03542163595557213, 0.013737686909735203, -0.2579611539840698, 0.10143997520208359, -0.3646746873855591, -0.570006787776947, 0.02890978567302227, 0.30712953209877014, -0.22035075724124908, 0.27491867542266...
independently. Ziping a large tree of files can be parallelized at the file level. However, none of these is really SIMD-style parallelism (Single Instruction Multiple Data), and they're not massively parallel. GPUs are basically vector processors, where you can be doing hundreds or thousands of ADD instructions all ...
[ 0.20682744681835175, -0.03163127973675728, 0.2587960958480835, 0.41465646028518677, -0.09098344296216965, 0.08071424812078476, -0.28805553913116455, -0.3174259662628174, -0.5392822027206421, -0.5538183450698853, -0.12700502574443817, 0.2295229434967041, -0.5630207061767578, 0.1310123056173...
that there is a very large number of pixel blocks that are being cosine-transformed or convolved (for motion detection) in parallel, and the IDCT or convolution subroutines can be expressed with branchless code. GPUs also like algorithms that have high numeric intensity (the ratio of math operations to memory accesses...
[ 0.023784061893820763, 0.05686591938138008, 0.0903720110654831, 0.44428789615631104, -0.2042461484670639, 0.13344769179821014, -0.15011051297187805, -0.2282046675682068, -0.2525710165500641, -0.582370400428772, -0.20408165454864502, 0.32830753922462463, -0.41793712973594666, -0.168024316430...
I am in the middle of moving over a large body of code to Castle Trunk which includes the new fluent interface for configuring the container. Since the project has a huge windsorConfig xml file that is beyond maintainable, I thought I would start to take advantage of this new feature. I know other containers (e.g. Stru...
[ 0.2879919707775116, 0.1318192332983017, 0.1543886661529541, -0.07985884696245193, 0.1810753047466278, -0.3246765732765198, 0.2098270058631897, 0.09150136262178421, -0.10007111728191376, -0.517647385597229, 0.15722621977329254, 0.5020842552185059, -0.29261407256126404, 0.19352653622627258, ...
would load all the relevant types that the app uses into the container. My worry is eventually this monolithic function would end up being almost as unmaintainable as the xml config file (less the angle bracket tax). My second thought was to break it down so each dependent assembly, by convention exports its default c...
[ 0.69510418176651, 0.20956967771053314, 0.31095802783966064, -0.1485779583454132, -0.032156091183423996, 0.1733464002609253, 0.004688757471740246, -0.03180237114429474, -0.19891858100891113, -0.4529976546764374, 0.2318785935640335, 0.41024836897850037, -0.4288455545902252, 0.059686522930860...
at StructureMap 2.5. It offers several features to dramatically reduce the work to bootstrap the IOC container. It offers a convention over configuration technique (see the blog entries below) See the following recent blog posts from Jeremy Miller (author of StructureMap) [Create your own Auto Registration Convention...
[ 0.3966749906539917, -0.051211848855018616, 0.06378022581338882, -0.06343304365873337, -0.09241423010826111, -0.482534795999527, -0.08955899626016617, -0.67856365442276, -0.3236493468284607, -0.4138374328613281, -0.057963576167821884, 0.28705137968063354, -0.582023024559021, -0.003200659062...
{ x.TheCallingAssembly(); x.With<DefaultConventionScanner>(); }); }); ``` [StructureMap 2.5.2 is Released](http://codebetter.com/blogs/jeremy.miller/archive/2009/01/11/structuremap-2-5-2-is-released.aspx)
[ -0.11411149054765701, -0.003822699189186096, 0.5830758213996887, -0.18708063662052155, 0.03450573608279228, -0.20560289919376373, 0.2840530276298523, -0.2504678964614868, -0.1994449496269226, -0.33964255452156067, -0.5589461326599121, 0.3875944912433624, -0.7204565405845642, 0.076726272702...
I want to detect whether the browser is refreshed or not using PHP, and if the browser is refreshed, what particular PHP code should execute. If the page was refreshed then you'd expect two requests following each other to be for the same URL (path, filename, query string), and the same form content (if any) (POST data...
[ 0.2526279389858246, -0.006991298869252205, 0.6232650279998779, -0.36819079518318176, -0.18385818600654602, -0.02194741554558277, 0.4270329177379608, -0.45528003573417664, -0.30627384781837463, -0.5392709374427795, -0.08465930074453354, 0.4958646893501282, -0.28444963693618774, 0.1590990573...
echo 'This is a new request.'; $_SESSION['LastRequest'] = $RequestSignature; } ``` In an AJAX situation you'd have to be careful about which files you put this code into so as not to update the LastRequest signature for scripts which were called asynchronously.
[ 0.1802811622619629, -0.05182857811450958, 0.10613632947206497, -0.27046769857406616, -0.20246948301792145, -0.3920152187347412, 0.4737545847892761, -0.22287678718566895, -0.24193274974822998, -0.5867782235145569, -0.21108165383338928, 0.5007564425468445, -0.5160243511199951, 0.065811067819...
I am not sure where the best place to put validation (using the Enterprise Library Validation Block) is? Should it be on the class or on the interface? Things that may effect it * Validation rules would not be changed in classes which inherit from the interface. * Validation rules would not be changed in classes whi...
[ 0.26060327887535095, -0.10661870241165161, 0.23484958708286285, 0.14910949766635895, -0.2691170275211334, -0.21413373947143555, 0.19104161858558655, -0.194407656788826, -0.015071667730808258, -0.5346454977989197, 0.14001154899597168, 0.36179423332214355, -0.07005684077739716, 0.15662772953...
block. The way you are trying to use the Validation Block with DI, I dont think its a problem if you set the attributes at interface level. Also, I dont think it should create problems in the inheritance chain. However, I have mostly seen this block used at class level, with an intent to keep interfaces not over specif...
[ 0.6159328818321228, 0.06847291439771652, -0.1194007620215416, 0.18627361953258514, -0.44541117548942566, -0.43479499220848083, 0.2046242505311966, -0.28314247727394104, 0.13707207143306732, -0.6174395084381104, 0.36137235164642334, 0.32509660720825195, -0.30635809898376465, 0.0719188600778...
I am using a hash table in JavaScript, and I want to show the values of the following in a hash table ``` one -[1,10,5] two -[2] three -[3, 30, 300, etc.] ``` I have found the following code. It works for the following data. ``` one -[1] two -[2] three-[3] ``` How do I assign one-[1,2] values to a ...
[ 0.0840030387043953, 0.47091445326805115, 0.23381319642066956, -0.33747121691703796, -0.11292528361082077, 0.122224360704422, 0.2489747852087021, -0.4694173336029053, 0.09517165273427963, -0.7615500688552856, -0.10618380457162857, 0.5220943093299866, -0.22579345107078552, -0.179297283291816...
new Array(); for (var i = 0; i < arguments.length; i += 2) { if (typeof(arguments[i + 1]) != 'undefined') { this.items[arguments[i]] = arguments[i + 1]; this.length++; } }
[ -0.07066726684570312, -0.4198639690876007, 0.4705532491207123, -0.47377681732177734, 0.014741182327270508, 0.23836000263690948, 0.4219024181365967, -0.7559242248535156, -0.2591448426246643, -0.5708299279212952, -0.3728237450122833, 0.37752842903137207, -0.30514347553253174, 0.2493567019701...
this.removeItem = function(in_key) { var tmp_value; if (typeof(this.items[in_key]) != 'undefined') { this.length--; var tmp_value = this.items[in_key]; delete this.items[in_key];
[ 0.02720048278570175, -0.3443131744861603, 0.5644133687019348, -0.43695303797721863, 0.29242435097694397, 0.15732136368751526, 0.5339609384536743, -0.3098297119140625, -0.18912802636623383, -0.21020115911960602, -0.4489617347717285, 0.34630152583122253, -0.712455153465271, 0.452548831701278...
} return tmp_value; } this.getItem = function(in_key) { return this.items[in_key]; } this.setItem = function(in_key, in_value) { if (typeof(in_value) != 'undefined') {
[ -0.0809447392821312, -0.43125784397125244, 0.3608609735965729, -0.13895545899868011, 0.31984835863113403, 0.13511218130588531, 0.41475099325180054, -0.4806120991706848, -0.27977168560028076, -0.4800052344799042, -0.5080382227897644, 0.41523900628089905, -0.6049437522888184, 0.1702881008386...
if (typeof(this.items[in_key]) == 'undefined') { this.length++; } this.items[in_key] = in_value; } return in_value;
[ -0.3977504074573517, -0.2680552303791046, 0.2878558933734894, -0.4932830333709717, 0.33544668555259705, -0.02802150323987007, 0.2933093309402466, -0.462323397397995, 0.0508800633251667, -0.3557274043560028, -0.611958920955658, 0.4123791456222534, -0.3614802360534668, 0.2075762152671814, ...
} this.hasItem = function(in_key) { return typeof(this.items[in_key]) != 'undefined'; } } var myHash = new Hash('one',1,'two', 2, 'three',3 ); for (var i in myHash.items) { alert('key is: ' + i + ', value is: ' + myHash.items[i]); } </script> ``` How do I...
[ -0.004157011862844229, 0.029821954667568207, 0.49294206500053406, -0.3532508313655853, 0.3265743553638458, -0.03859267756342888, 0.34021785855293274, -0.3597418963909149, -0.2062092125415802, -0.7403771877288818, -0.43906599283218384, 0.5278163552284241, -0.03850828483700752, 0.10913023352...
= new Hash('one',[1,10,5],'two', [2], 'three',[3,30,300]); ``` Of course, the following would also work: ``` var myHash = {}; // New object myHash['one'] = [1,10,5]; myHash['two'] = [2]; myHash['three'] = [3, 30, 300]; ``` since all objects in JavaScript are hash tables! It would, however, be harder to iterate ove...
[ -0.1978878676891327, 0.21384520828723907, 0.15958842635154724, -0.5032799243927002, -0.1977647989988327, 0.09590210020542145, 0.2858903706073761, -0.5803502202033997, -0.10849925875663757, -0.6722341775894165, -0.3667164742946625, 0.34590262174606323, -0.28931304812431335, -0.1007462814450...
I'm trying to configure my Terminal and I would like to insert **@{}** at one key-stroke. This works with the following code ``` # .inputrc "\e\"": "@{}" ``` But I also want the cursor to end up inside the braces. How can I do this? The following doesn't work. ``` # .inputrc "\e\"": "@{}": backward-char ``` Try: ...
[ -0.16207440197467804, 0.19235950708389282, 0.6800513863563538, -0.1071014329791069, 0.10179612785577774, 0.26270610094070435, 0.41718941926956177, 0.05105042830109596, 0.12417884916067123, -0.7869953513145447, 0.19335411489009857, 0.6492254137992859, -0.46924060583114624, 0.142105355858802...
Do you have any formal or informal standards for reasonably achievable SQL query speed? How do you enforce them? Assume a production OLTP database under full realistic production load of a couple dozen queries per second, properly equipped and configured. Personal example for illustrative purposes (not a recommendatio...
[ 0.040867604315280914, -0.3454495072364807, 0.38427069783210754, 0.4370860755443573, -0.05526407063007355, 0.07679341733455658, 0.17264249920845032, -0.2396392524242401, -0.3557021915912628, -0.6177740693092346, -0.16030633449554443, 0.27562275528907776, -0.11568514257669449, -0.03849801793...
other analysis are moved to an OLAP cube (best case) or a static snapshot database. (Obviously some execution queries (Insert/Update/Delete) can't be moved, so must be optimized, but so far in my experience it's been achievable.) I usually go by the one second rule when writing/refactoring stored procedures, although ...
[ 0.0437404066324234, -0.11160250008106232, -0.06137688830494881, 0.11483507603406906, -0.06546137481927872, 0.11076070368289948, 0.21732471883296967, -0.049607690423727036, -0.3085799813270569, -0.587512731552124, 0.007807998452335596, 0.5406177043914795, 0.017637144774198532, -0.2976313531...
most common problem I encounter in SP:s with poor performance is incorrect use of indexes, causing costly index seek operations.
[ -0.13579633831977844, 0.2400021106004715, 0.6237702369689941, 0.21376028656959534, -0.003911422565579414, -0.22378027439117432, 0.183066263794899, -0.02053782343864441, -0.06914010643959045, -0.7126532196998596, -0.047749221324920654, 0.29082879424095154, -0.16018298268318176, 0.1115310043...
I've got a select with two 'special' options, a bit like this: ``` <select> <option value="????">Choose one:</option> <option value="1">option1</option> <option value="2">option2</option> .... <option value="????">Free input</option> </select> ``` When the user selects nothing, I should ignore the input. When...
[ 0.05800404027104378, -0.31005915999412537, 0.1106109470129013, -0.13614024221897125, 0.13452361524105072, 0.31197988986968994, -0.23581574857234955, -0.06752432137727737, -0.4475366771221161, -0.66499263048172, -0.17101530730724335, 0.5700077414512634, -0.18710005283355713, -0.084264762699...
who will be reading the code. Therefore something like 'freeInput' or 'textFieldLookupValue' could be appropriate
[ 0.5668494701385498, -0.49533966183662415, 0.1549653261899948, 0.32951557636260986, -0.015750830993056297, -0.43648067116737366, 0.1934201866388321, 0.38143110275268555, -0.06433097273111343, -0.6027183532714844, -0.5146821737289429, 0.6239174604415894, -0.10287236422300339, -0.172467604279...
We are looking for any proven migration path for moving a Subversion repository to a Team Foundation Server. Seems that there has been a discontinued product named CS-Converter([ComponentSoftware homepage](http://www.componentsoftware.com/Products/converter/svn2tfs.htm)) but can't find anybody having used it. Is CS-C...
[ 0.2954128682613373, -0.06412103027105331, 0.1850701868534088, 0.08228316903114319, -0.23466233909130096, -0.1441306620836258, -0.011913036927580833, -0.010519611649215221, -0.16575680673122406, -0.5911851525306702, -0.004852148238569498, 0.11235633492469788, -0.128864586353302, 0.087936155...
the repository Maybe [this discussion](http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/dafc9550-1c17-40ae-ad0a-fc463b336507/) is interesting for you. There's another software mentioned from [Krysoft](http://www.kyrosoft.com) which has been tested and proved working well.
[ 0.5683652758598328, 0.09908736497163773, -0.056011080741882324, 0.4709957540035248, 0.08615857362747192, -0.08673133701086044, -0.0147898243740201, 0.2732686698436737, -0.10569539666175842, -0.2823055386543274, -0.051930490881204605, 0.18594515323638916, 0.07988011837005615, 0.245489344000...
One thing that's always confused me is input escaping and whether or not you're protected from attacks like SQL injection. Say I have a form which sends data using HTTP POST to a PHP file. I type the following in an input field and submit the form: ``` "Hello", said Jimmy O'Toole. ``` If you print/echo the input on...
[ 0.2166433036327362, 0.3940465450286865, 0.0719563439488411, -0.035020243376493454, -0.390493780374527, 0.003634912660345435, 0.19866439700126648, 0.05872391536831856, 0.025087453424930573, -0.39989596605300903, 0.1366328001022339, 0.2873559594154358, -0.5102964043617249, 0.3997952044010162...
stop SQL injection? If I take the input string and call something like [`mysqli real_escape_string`](http://www.php.net/mysqli_real_escape_string) on it, it comes out like this: ``` \\"Hello\\", said Jimmy O\\'Toole. ``` So when it goes into the database via (My)SQL, it ends up as: ``` \"Hello\", said Jimmy O\'Too...
[ 0.3423807621002197, 0.1516154557466507, 0.11385137587785721, -0.10692626982927322, 0.045571889728307724, -0.0483158640563488, 0.42189109325408936, -0.0799371600151062, -0.2985967695713043, -0.13299834728240967, -0.21624282002449036, 0.6864772439002991, -0.7278339266777039, 0.11729443073272...
them, and many of your headaches go away. Here's an exemplary article of the subject: <http://www.sitepoint.com/blogs/2005/03/02/magic-quotes-headaches/> Recap: disable magic quotes, use `real_escape_string()`.
[ 0.214681476354599, 0.21972247958183289, 0.2888944745063782, -0.021347083151340485, 0.07730278372764587, 0.07646650820970535, 0.6129841804504395, -0.02310630865395069, -0.25013217329978943, 0.038095612078905106, -0.26697030663490295, 0.9713039398193359, -0.2563919126987457, 0.05587942153215...
I am using `<a>` tags for links on a web page. How do I disable the `Tab` key from selecting either of them? **EDIT:** Hi, original author of this answer here. Don't use this one. Scroll down. StackOverflow won't let me remove this answer since it was accepted. --- You could do something like this for those links: `...
[ 0.26592299342155457, 0.25988951325416565, 0.5381063222885132, -0.027670325711369514, 0.03249526023864746, -0.3276222348213196, 0.16483500599861145, -0.08605378866195679, -0.25963056087493896, -0.5781499743461609, -0.031780779361724854, 0.30660855770111084, -0.47807759046554565, 0.193882733...
The question is as simple as stated in the title: What's the difference between the following two expressions? ``` $(...) `...` ``` For example, are the two variables `test1` and `test2` different? ``` test1=$(ls) test2=`ls` ``` The result is the same, but the newer $() syntax is far clearer and easier to read. At...
[ 0.4113868772983551, 0.1569066047668457, -0.11526388674974442, -0.287474125623703, -0.1136820986866951, 0.26871001720428467, 0.30021268129348755, -0.45506975054740906, 0.051738131791353226, -0.3918076157569885, -0.08872736245393753, 0.5416890978813171, -0.36292994022369385, -0.2748092710971...
how they treat embedded double backslashes.
[ 0.46937912702560425, 0.4116121232509613, -0.3046758770942688, 0.11638718098402023, 0.05810415744781494, -0.034066639840602875, 0.48723408579826355, 0.29245632886886597, 0.05502936616539955, -0.35567861795425415, -0.0035261258017271757, 0.49128323793411255, 0.2461303025484085, -0.0059571298...
I encountered a, at least to my expectations, strange behavior in the binary serialization of .NET. All items of a `Dictionary` that are loaded are added to their parent AFTER the `OnDeserialization` callback. In contrast `List` does the other way. This can be really annoying in real world repository code, for example...
[ 0.2113170176744461, -0.024627622216939926, 0.019591810181736946, 0.17575615644454956, -0.08065131306648254, -0.4470188021659851, 0.3530172109603882, 0.04512639343738556, -0.10451984405517578, -0.40644386410713196, -0.2156461477279663, 0.3457237780094147, -0.29860007762908936, 0.55107682943...
public Data() { Dictionary = new Dictionary<string, string> { { "hello", "hello" }, { "CU", "CU" } }; List = new List<string> { "hello", "CU" }; } public static Data Load(string filename) { using (Stream stream = File.OpenRead(filename)) { Data result = (Data...
[ -0.05727319046854973, -0.5696671009063721, 0.3392754793167114, 0.1997351050376892, 0.031961191445589066, 0.0917738825082779, 0.0774986669421196, -0.139366015791893, 0.06994058191776276, -0.5087854862213135, -0.46802324056625366, 0.7094894051551819, -0.28559088706970215, 0.414921373128891, ...
TestsLengthsOfDataStructures(result); return result; } } public void Save(string fileName) { using (Stream stream = File.Create(fileName)) { new BinaryFormatter().Serialize(stream, this); } } public void OnDeserialization(object sender)
[ 0.4967852532863617, -0.30064263939857483, 0.22249822318553925, 0.0584176667034626, 0.27429908514022827, 0.1624341607093811, 0.5274186730384827, -0.25066083669662476, -0.02180718071758747, -0.6157887578010559, -0.2232198715209961, 0.4424186646938324, -0.2776206433773041, 0.3310607969760895,...
{ TestsLengthsOfDataStructures(this); } private static void TestsLengthsOfDataStructures(Data data) { Debug.Assert(data.List.Count == 2, "List"); Debug.Assert(data.Dictionary.Count == 2, "Dictionary"); } } ``` I can reproduce the problem. Had a look around Google and found this...
[ 0.4937232434749603, 0.05691445618867874, 0.2603326141834259, 0.04410471394658089, -0.07322343438863754, 0.08896343410015106, 0.7299662232398987, -0.17589133977890015, 0.039591774344444275, -0.6591296792030334, 0.1549178659915924, 0.6095006465911865, -0.33818867802619934, 0.1551121026277542...
this.Dictionary.OnDeserialization(sender); } ``` No time to exhaustively test, and I want to beat Marc to the answer ;-)
[ 0.017445646226406097, 0.4016965925693512, 0.2669825553894043, -0.1149740144610405, 0.14410066604614258, -0.14724597334861755, 0.40812280774116516, 0.2281433790922165, 0.1752377599477768, -0.5858349800109863, -0.244303897023201, 0.44634896516799927, -0.1776973307132721, 0.2715914249420166, ...
My question is best phrase as: [Remove a child with a specific attribute, in SimpleXML for PHP](https://stackoverflow.com/questions/262351/remove-a-child-with-a-specific-attribute-in-simplexml-for-php) except I'm not using simpleXML. I'm new to XML for PHP so I may not be doing the best way I have a xml created usin...
[ -0.0379038080573082, 0.13110651075839996, 0.27080270648002625, 0.04663410037755966, -0.19663339853286743, 0.31790316104888916, 0.1805141717195511, -0.2857416868209839, -0.02046630159020424, -0.44323408603668213, -0.11926309019327164, 0.18735827505588531, -0.08895494043827057, 0.17389692366...
data</categorydata1> <categorydata2>some data</categorydata2> <categorydata3>some data</categorydata3> <categorydata4>some data</categorydata4> </category> </details> ``` And I want to remove a category that has a specific attribute named id with the DOM class in php when i run a function activated from using ...
[ -0.08427340537309647, -0.14765402674674988, 0.41705167293548584, -0.14079971611499786, -0.22694465517997742, -0.15608681738376617, 0.30392763018608093, -0.3567832112312317, -0.2234114110469818, -0.2737007141113281, -0.31924962997436523, 0.4962269365787506, -0.5541388392448425, 0.2487241029...
$main = $xmlDoc->getElementsByTagName( "details" )->item(0); $mainElement = $xmlDoc->getElementsByTagName( "details" ); foreach($mainElement as $details){ $currentCategory = $details->getElementsByTagName( "category" ); foreach($currentCategory as $category){ $ca...
[ -0.2944852411746979, -0.3341454267501831, 0.7084401845932007, -0.1890670508146286, -0.04706481844186783, 0.24406003952026367, 0.07682301849126816, -0.15713384747505188, -0.21919524669647217, -0.2687448561191559, -0.5499258041381836, 0.3474559783935547, -0.36451753973960876, 0.4113764464855...