text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
SDK\v6.0A\Include\KnownFolders.h and added in the same manner that I added in the sample. I included several wrapper functions that hide all of the evil marashal'ing details for calling the particular functions. If there is any particular folder id you'd like or explanation please add a comment and I'll update the sa...
[ 0.3151974678039551, 0.1262938529253006, 0.25075751543045044, 0.035871680825948715, -0.2562684118747711, -0.3013118803501129, 0.5631309151649475, -0.4011262059211731, 0.0816316083073616, -0.7870121598243713, 0.04316922649741173, 0.3729301691055298, -0.30375945568084717, 0.24576668441295624,...
'''KF_FLAG_CREATE -> 0x00008000 KF_FLAG_CREATE = 32768 '''KF_FLAG_DONT_VERIFY -> 0x00004000 KF_FLAG_DONT_VERIFY = 16384 '''KF_FLAG_DONT_UNEXPAND -> 0x00002000 KF_FLAG_DONT_UNEXPAND = 8192 '''KF_FLAG_NO_ALIAS -> 0x00001000 KF_FLAG_NO_ALIAS = 4096 '''KF_...
[ -0.3332785964012146, 0.3217838406562805, 0.5901384353637695, 0.13508117198944092, -0.06139570474624634, 0.18338675796985626, 0.42178404331207275, -0.5350363254547119, -0.48895081877708435, -0.36311274766921997, -0.2517804801464081, 0.175410196185112, -0.17139440774917603, -0.12240730971097...
'''KF_FLAG_DEFAULT_PATH -> 0x00000400 KF_FLAG_DEFAULT_PATH = 1024 '''KF_FLAG_NOT_PARENT_RELATIVE -> 0x00000200 KF_FLAG_NOT_PARENT_RELATIVE = 512 '''KF_FLAG_SIMPLE_IDLIST -> 0x00000100 KF_FLAG_SIMPLE_IDLIST = 256 '''KF_FLAG_ALIAS_ONLY -> 0x80000000 KF_FLAG_ALIAS...
[ -0.45739391446113586, 0.040703367441892624, 0.6291844248771667, 0.07576177269220352, 0.08126147091388702, 0.005401198286563158, 0.2817734479904175, -0.030497552827000618, -0.05358920618891716, -0.9346968531608582, -0.3466113805770874, 0.3043631613254547, -0.29867416620254517, 0.27342098951...
Guid("B4BFCC3A-DB2C-424C-B029-7FE99A87C641") Public DocumentsFolder As Guid = New Guid("FDD39AD0-238F-46AF-ADB4-6C85480369C7") <DllImport("shell32.dll")> _ Public Function SHGetKnownFolderPath( _ ByRef folderId As Guid, _ ByVal flags As UInteger, _ ByVal token As IntPtr, _ <...
[ -0.7593244910240173, -0.11068509519100189, 0.7608590126037598, -0.1471407264471054, -0.2664833962917328, 0.1634112447500229, 0.13780418038368225, -0.2802671194076538, -0.06335514783859253, -0.8785126805305481, -0.2853730320930481, 0.700232744216919, -0.22014759480953217, 0.2443470507860183...
Guid, _ ByVal flags As UInteger, _ ByVal token As IntPtr, _ <[In](), MarshalAs(UnmanagedType.LPWStr)> ByVal path As String) As Integer End Function Public Function SHGetKnownFolderPathWrapper(ByVal folderId As Guid) As String Return SHGetKnownFolderPathWrapper(folderId, 0) ...
[ -0.36914703249931335, 0.06465428322553635, 0.762449324131012, -0.25525763630867004, -0.11603103578090668, 0.21139255166053772, 0.23775365948677063, -0.29413729906082153, -0.14154307544231415, -0.5407138466835022, -0.34025853872299194, 0.6673819422721863, -0.2646564543247223, 0.307432353496...
As KNOWN_FOLDER_FLAG) As String Dim ptr = IntPtr.Zero Dim path = String.Empty Try Dim ret = SHGetKnownFolderPath(folderId, CUInt(flags), IntPtr.Zero, ptr) If ret <> 0 Then Throw Marshal.GetExceptionForHR(ret) End If
[ 0.4520491063594818, -0.37935495376586914, 0.5510232448577881, -0.10827931016683578, 0.14798292517662048, -0.23266646265983582, 0.7094372510910034, -0.5419615507125854, -0.2316041737794876, -0.5256286263465881, -0.19874605536460876, 0.5375949144363403, -0.20457465946674347, 0.23868277668952...
path = Marshal.PtrToStringUni(ptr) Finally Marshal.FreeCoTaskMem(ptr) End Try Return path End Function Public Sub SHSetKnownFolderPathWrapper( _ ByVal folderId As Guid, _ ByVal path As String) SHSetKnownFolderPathWrapper(folderId, 0, path) End Su...
[ -0.19374388456344604, -0.19849847257137299, 0.49017494916915894, 0.06192747503519058, 0.10954181849956512, -0.3140762746334076, 0.6221780776977539, -0.6494733095169067, 0.04175744950771332, -0.5581222176551819, -0.10279922187328339, 0.4210399091243744, -0.1857934445142746, 0.02745258808135...
Public Sub SHSetKnownFolderPathWrapper( _ ByVal folderId As Guid, _ ByVal flags As KNOWN_FOLDER_FLAG, _ ByVal path As String) Dim ret = SHSetKnownFolderPath(folderId, CUInt(flags), IntPtr.Zero, path) If ret <> 0 Then Throw Marshal.GetExceptionForHR(ret) End I...
[ 0.1494063436985016, -0.09937357157468796, 0.44736501574516296, -0.02786049246788025, 0.143361896276474, -0.416638046503067, 0.6744229197502136, -0.7681907415390015, -0.06880945712327957, -0.545478105545044, -0.21669712662696838, 0.6869860291481018, -0.22697308659553528, 0.02821744047105312...
Sub Main() Dim path = SHGetKnownFolderPathWrapper(NativeMethods.DesktopFolder) Console.WriteLine(path) End Sub End Module ```
[ -0.30096063017845154, -0.21404191851615906, 0.670876145362854, -0.18138617277145386, 0.2036130726337433, -0.14645633101463318, 0.6795883774757385, -0.1346767097711563, -0.04234309867024422, -0.45267006754875183, -0.14747114479541779, 0.475976824760437, -0.2552238404750824, 0.33092623949050...
Gah! This is really causing me hassle today. Suddenly without warning '@' (at symbol) and '"' (double quote) are trading places on my keyboard but ONLY in Visual Studio 2008! I can't seem to find anything in help or online to explain/remedy this. Is there some keyboard shortcut I am inadvertently executing? I reboo...
[ 0.07415232807397842, 0.3860567808151245, 0.24143801629543304, -0.0955757349729538, -0.37489867210388184, -0.16492357850074768, 0.5793351531028748, 0.3888474702835083, -0.3431539237499237, -0.5300201773643494, 0.32558512687683105, 0.6867729425430298, -0.018922941759228706, 0.457361072301864...
be that you accidentally hit Alt+Shift or Ctrl+Shift (British layout) when coding?
[ 0.32458269596099854, -0.10317524522542953, -0.009782643988728523, -0.12741266191005707, -0.013783239759504795, 0.006431054789572954, 0.046662844717502594, 0.18724805116653442, -0.3366578221321106, -0.3666905164718628, -0.18026156723499298, 0.37652716040611267, -0.13669107854366302, -0.3880...
Well, I guess this day had to come. My client's website has been compromised and blacklisted by Google. When you load the main page this javascript gets automatically added to the bottom of the document: ``` <script type="text/javascript">var str='google-analytics.com';var str2='6b756c6b61726e696f6f37312e636f6d';str4...
[ -0.0027147680521011353, 0.40568169951438904, 0.4825965464115143, -0.08740324527025223, 0.0731978788971901, -0.0056275008246302605, 0.7072383761405945, -0.10255376994609833, -0.363225519657135, -0.4974157512187958, -0.24749724566936493, 0.3934350311756134, -0.04968889430165291, 0.2107336819...
gets embedded. What gives? How is that possible? **updates** * The website is a very simple calendar application, runs on a $10/month godaddy unix account, MySQL, PHP. * It is not a local thing specific to my computer as my client was the one that called me with the problem. Also happening on all the computers I have...
[ 0.500857412815094, 0.33129245042800903, 0.2707214057445526, -0.04344341531395912, -0.24395544826984406, -0.05568014457821846, 0.49183523654937744, 0.3254684507846832, -0.1973651796579361, -0.6177877187728882, 0.05521325021982193, 0.5710964798927307, 0.024638058617711067, 0.1723214387893676...
to the bottom of my `index.php` and `main.php` files. How is this possible? A little more background: * It is a calendar application, as mentioned above, and it is used only by my client's small company. Login is required to do anything, and only 5 or so people have accounts. I can guarantee none of them would try an...
[ 0.46331560611724854, 0.19758883118629456, 0.3013441264629364, 0.08363628387451172, 0.1812833547592163, -0.42389288544654846, 0.6870748996734619, 0.4872368276119232, -0.44583860039711, -0.3276834487915039, 0.2221672385931015, 0.2962978780269623, 0.18562370538711548, -0.10465169697999954, ...
but I still cannot understand how an attacker could have possibly gained access to the webserver to append this javascript to my php files. A rogue HTTP Module (in IIS), or whatever the equivalent is for apache could prepend, append, or perhaps even modify content for any HTTP request, even for static files. This would...
[ 0.5164645314216614, 0.23689872026443481, 0.01314468216150999, 0.21877813339233398, -0.10087218135595322, -0.4667656421661377, 0.5133333206176758, 0.1490214616060257, -0.22064435482025146, -0.4464588463306427, 0.04622232913970947, 0.2753351032733917, -0.3271527886390686, 0.09076334536075592...
Does anyone have any good resources for refining my skills in developing class diagrams? Would like any strong tutorials in UML 2.0 ideally, but searches seem to be returning poor results. Also currently revising for a final year exam and really want to try and get my teeth into a practice paper with a model answer, I...
[ 0.5833126306533813, 0.24796661734580994, 0.03668312355875969, 0.3251030743122101, -0.04482071101665497, -0.17266082763671875, 0.27318546175956726, 0.7598533630371094, -0.4925956130027771, -0.38943400979042053, 0.2698998749256134, 0.32436999678611755, 0.6074838042259216, 0.07682136446237564...
Online UML Guide from StackOverFlow (No more available) * [Practical UML: A Hands-On Introduction for Developers](http://dn.codegear.com/article/31863) * Unified Modeling Language (UML) Tutorial (No more available) * [UML Tutorial and Introduction](http://www.cragsystems.co.uk/ITMUML/)
[ -0.14921708405017853, -0.11809234321117401, 0.39343729615211487, 0.1437249332666397, -0.08435359597206116, 0.08618228137493134, 0.26330727338790894, 0.004139110911637545, -0.41235122084617615, -0.24824348092079163, -0.33137282729148865, 0.5169047117233276, 0.10158201307058334, -0.359974861...
I have a website where I currently use ASP.NET's built in Authentication, profile and role management. I would like to move some functionality (including authentication) to the client side using a third party javascript library like JQuery or Mootools without the use of ScriptManager and generated proxy classes. There...
[ 0.5995610952377319, 0.05592232197523117, 0.3076203167438507, -0.13543467223644257, -0.4804077446460724, -0.4849052131175995, 0.23853592574596405, -0.09053104370832443, -0.1876041740179062, -0.7674767374992371, 0.10684311389923096, 0.35059842467308044, -0.1172860786318779, 0.086999364197254...
links or information, please let me know. Thanks There is an argument that interfering with standard Windows behaviour is confusing for the user, but that aside I have seen this done before, although more commonly in C++. You can subclass the control and handle paint messages yourself. When the control's enabled just ...
[ 0.4408637285232544, -0.18376940488815308, 0.18510740995407104, 0.2153947949409485, -0.29893070459365845, -0.1403631865978241, 0.2828657925128937, 0.2934298515319824, -0.2810512185096741, -0.6999393701553345, 0.05443885549902916, 0.5894826650619507, -0.5093981623649597, 0.013680734671652317...
I like to print out software requirements so I can easily mark them up, sketch UIs, etc. Do **you** print out requirements and design materials ahead of time or just view them digitally? What features make for the ideal "programmer's" printer? * Laser or Inkjet? * B&W or color? * USB or Ethernet connector? * Duplex?...
[ 0.7564601302146912, -0.0005177448620088398, 0.4914126694202423, 0.12825608253479004, 0.11145558953285217, -0.0064110360108315945, -0.41911131143569946, -0.04136864095926285, -0.198141947388649, -1.048821210861206, 0.3055582642555237, 0.7949231266975403, -0.21969729661941528, -0.15326774120...
What is important to look out for is that you find a printer that prints all four toner colors through one pass in the drum. Most of the cheaper laser printers send the sheet of paper through up to 5 times, once for each color plus black. This uses up the drum in your printer much faster. For any printer you look at, ...
[ 0.6949635148048401, 0.1831558793783188, 0.061375174671411514, -0.161958709359169, 0.6244112849235535, 0.39368435740470886, -0.03962842375040054, -0.2509511709213257, -0.7682176828384399, -0.6149701476097107, 0.5718075037002563, 0.4699040353298187, -0.16974449157714844, -0.11457907408475876...
and Okidata printers are great for business/spec type printing and have the lowest toner costs on the market. My next printer will be one of them. Beyond that, try to find a printer that: - is network capable (wireless is a nice to have) - duplexer is a nice to have. I like to use the backs of the sheets to take notes...
[ 0.48665234446525574, 0.19385163486003876, 0.4249110817909241, 0.10572881996631622, 0.043434012681245804, 0.3127778172492981, -0.051473043859004974, 0.046085480600595474, -0.2412692755460739, -0.8176229596138, 0.2843860983848572, 0.5617414116859436, -0.0021158207673579454, 0.171648383140563...
I can print off the PDF again.
[ 0.34379842877388, 0.1059238538146019, 0.3601515591144562, 0.12588578462600708, 0.12861889600753784, -0.6438317894935608, 0.03779321536421776, 0.40676209330558777, -0.15403255820274353, -0.6443231701850891, 0.02715253457427025, 0.13260520994663239, 0.1769518405199051, 0.01609070785343647, ...
We try and embed a what string within binary objects so that we can see the version number for an executable or shared library that has been deployed. Typically we embed standard CVS Id information in this what string. For example, we might embed: ``` const char cvsid[] = "@(#)OUR_TEAM_staging_remap_$Revision: 1.30 $ ...
[ 0.5832307934761047, -0.11962588131427765, 0.15705819427967072, 0.1454700231552124, 0.30149927735328674, -0.3216363787651062, 0.0425146110355854, -0.15366902947425842, -0.1263410747051239, -0.5542614459991455, -0.42678123712539673, 0.4892924427986145, -0.2325814962387085, 0.1106955558061599...
character. There is only one instance of this variable and it is never referred to. Someone suggested that this might get optimised away by the compiler. I've been using this technique for many years in both C and C++ and with a variety of compilers and I've yet to see a what string optimised away. Anyone got an ide...
[ -0.07082594931125641, -0.05485450103878975, 0.02188514545559883, -0.09411589801311493, -0.2790469229221344, 0.3185948133468628, 0.12117317318916321, 0.31557220220565796, -0.09735295921564102, -0.3773579001426697, 0.042385391891002655, 0.3254328668117523, -0.43716710805892944, -0.0581429079...
GCC from about that time (probably GCC 4.0.x, originating from April 2005), those constant strings were left out of the binaries. So, I had to go around modifying my source code to make the variables externally visible. It is not possible for the compiler to look at the object file alone and conclude that the string is...
[ 0.2536679804325104, 0.30296310782432556, 0.564856231212616, -0.23018062114715576, -0.12413015961647034, -0.348733127117157, -0.11960071325302124, -0.22693340480327606, -0.40392976999282837, -0.22688832879066467, 0.10722150653600693, 0.6355850100517273, -0.5106388330459595, 0.47824835777282...
`what` to `ident` for identifying files - plus I have my own hacked `what` that does both `what` and `ident` plus a few tweaks of my own. But I have the declaration in some files - not all - and the definition in all files. (Under some set of warning flags, not now remembered, I was getting warnings when the variable w...
[ 0.6219768524169922, 0.25233888626098633, 0.14393700659275055, 0.02228584885597229, -0.11670471727848053, -0.34739232063293457, 0.09447474032640457, -0.14117437601089478, -0.17629298567771912, -0.3754531741142273, -0.1853771209716797, 0.4349003732204437, -0.08728252351284027, 0.264318585395...
file being generated. Similarly for headers - though the identification string is only embedded in one file to avoid multiple definitions. I preferred the old system with static constants - but this has worked for me for over 3 years.
[ 0.47205743193626404, -0.09092463552951813, 0.39053070545196533, 0.32784655690193176, -0.07774114608764648, -0.2612750232219696, 0.02892475016415119, -0.06128496304154396, -0.22986988723278046, -0.4994100332260132, 0.03402198478579521, 0.4387580454349518, -0.04403092712163925, 0.30347266793...
I am trying to read data off of a Windows serial port through Java. I have the javax.comm libraries and am able to get some data but not correct data. When I read the port into a byte array and convert it to text I get a series of characters but no real text string. I have tried to specify the byte array as being both ...
[ -0.05629075691103935, 0.18037563562393188, 0.4203179180622101, -0.022790437564253807, -0.05358031019568443, 0.18204687535762787, 0.5281590223312378, -0.24983158707618713, -0.1765771210193634, -0.7349421381950378, 0.008465049788355827, 0.35414111614227295, -0.1891469657421112, 0.35647019743...
" + numBytes + " bytes"); } System.out.println(new String(readBuffer)); System.out.println(new String(readBuffer, "UTF-8")); System.out.println(new String(readBuffer, "US-ASCII")); ``` the output of the first three lines will not let me copy and paste (I assume because they are not normal characters). Here is the ou...
[ -0.1535968780517578, 0.3102201819419861, 0.666146457195282, 0.08055870234966278, 0.0393064022064209, 0.21182265877723694, 0.5813116431236267, -0.29872655868530273, -0.062119174748659134, -0.6095197200775146, 0.04514848068356514, 0.6258459687232971, -0.2604718804359436, 0.018900448456406593...
`java.io.InputStream` to read the object. You should use either `java.io.BufferedReader` or `java.io.InputSreamReader`. There are many ways to do this, but this is what we use: ``` javax.comm.SerialPort port = ...{initialize your serial port} BufferedReader portReader = new BufferedReader(new InputStreamReader(...
[ -0.08461357653141022, -0.29667985439300537, 0.7435898780822754, -0.20392219722270966, 0.2578526735305786, 0.2275654375553131, 0.19298724830150604, -0.15826909244060516, -0.27875998616218567, -0.7370254993438721, -0.011081786826252937, 0.6139965057373047, -0.4008461534976959, 0.232246518135...
I have a .Net framework 1.1 Windows service that works on one server, but on another the OnStart method is not being called. I have a Trace statement as the first line in the OnStart override and it's not being executed. No exception are thrown and the Windows Service control manager thinks the service has started corr...
[ 0.6581295728683472, 0.09112796187400818, 0.34790700674057007, -0.05215848982334137, 0.25130072236061096, -0.39249590039253235, 0.5105392336845398, -0.10836952179670334, -0.0786505937576294, -0.6613813042640686, 0.02293284796178341, 0.659182608127594, -0.29845014214515686, -0.00072070554597...
<listeners> <add name="LogFileWriter" type="System.Diagnostics.TextWriterTraceListener,System" initializeData="c:\interface.log" /> </listeners> </trace> </system.diagnostics> </configuration> ``` I can't tell from your code, but it looks like you're usi...
[ 0.31196659803390503, 0.2856694161891937, 0.28277742862701416, -0.12987986207008362, -0.07255513966083527, -0.08951549232006073, 0.45677608251571655, -0.34335097670555115, -0.04645051434636116, -0.5727129578590393, 0.007226691581308842, 0.8605710864067078, -0.10796202719211578, -0.056445688...
but this is what we use: ``` javax.comm.SerialPort port = ...{initialize your serial port} BufferedReader portReader = new BufferedReader(new InputStreamReader(port.getInputStream())); try { String line = portReader.readLine(); } catch(IOException e) { ... } ```
[ -0.033024828881025314, -0.3448540270328522, 0.8291469216346741, -0.0834229588508606, 0.3730648159980774, 0.23593153059482574, 0.12753473222255707, -0.08246966451406479, -0.3457878828048706, -0.6603567600250244, 0.09017582982778549, 0.6396772265434265, -0.40428146719932556, 0.28796702623367...
Is there a difference in `++i` and `i++` in a `for` loop? Is it simply a syntax thing? **a++ is known as postfix.** add 1 to a, returns the old value. **++a is known as prefix.** add 1 to a, returns the new value. C#: ``` string[] items = {"a","b","c","d"}; int i = 0; foreach (string item in items) { Console.W...
[ -0.15718701481819153, -0.19855144619941711, 0.43956831097602844, -0.27960172295570374, -0.1358291357755661, 0.4658451974391937, 0.266862690448761, -0.3630845248699188, -0.13451331853866577, -0.33491483330726624, -0.4838937819004059, 0.18850670754909515, -0.26263895630836487, 0.267103254795...
{ Console.Write(i);} Console.WriteLine(""); for (int i = 0; i < 5; ++i) { Console.Write(i); } ``` > 0 1 2 3 4 > > 0 1 2 3 4 If the value as evaluated is used then the type of increment becomes significant: ``` int n = 0; for (int i = 0; n < 5; n = i++) { } ```
[ -0.27365437150001526, 0.23657314479351044, 0.6168679594993591, -0.3753267228603363, 0.3182804584503174, 0.2626305818557739, 0.2534428536891937, -0.4956536889076233, 0.31200578808784485, -0.34787437319755554, -0.2563456892967224, 0.4464249908924103, -0.17640693485736847, 0.37444978952407837...
I have Apache/SVN running on Windows Server 2003 with authentication via LDAP/Active Directory and a flat-file. It's working great except that *any* LDAP user can access everything. I'd like to be able to limit SVN repositories by user or group. Ideally, I'd get to something like this: ``` <Location /svn/repo1> # ...
[ 0.03443724289536476, 0.1715901643037796, 0.34533098340034485, -0.08585868775844574, -0.42368823289871216, -0.3954731523990631, 0.2988310754299164, -0.2388986200094223, -0.05733722820878029, -0.5153241753578186, 0.059488095343112946, 0.6764357089996338, -0.24486671388149261, 0.0757512003183...
AuthType Basic AuthBasicProvider ldap file AuthUserFile "svn-users.txt" #file-based, custom users AuthzLDAPAuthoritative On AuthLDAPBindDN ldapuseraccount@directory.com AuthLDAPBindPassword ldappassword AuthLDAPURL ldap://directory.com:389/cn=Users,dc=directory,dc=com?sAMAccountName?sub?(objectCategory=pers...
[ -0.1665390580892563, 0.07215062528848648, 0.7096984386444092, -0.05416722223162651, -0.17399436235427856, -0.019784830510616302, 0.309374064207077, -0.3140965700149536, 0.043086014688014984, -0.5583847761154175, -0.32336628437042236, 0.7301952838897705, -0.528164267539978, -0.0738293677568...
file users and LDAP users at this point): ``` [groups] @admin = haren ### ### Deny all but administrators to the tree ### [/] * = @admin = rw ### ### Allow more specific people on a per-repository basis below ### [repo1:/] ldap-user1 = rw file-user1 = rw [repo2:/] ldap-user2 = rw file-user2 = rw ``` I'm still p...
[ 0.2724545896053314, 0.14010852575302124, 0.17163105309009552, -0.10506008565425873, -0.3099903464317322, -0.383700966835022, 0.18810373544692993, -0.29645368456840515, -0.1741298884153366, -0.35248327255249023, -0.40884360671043396, 0.7329246401786804, -0.5042484998703003, -0.1040433645248...
I mod\_rewrite my pages very similar to how SO does it. I have `www.example.com/users/login/` which will internally use `users.login.php` which acts as a controller. I want to pass in a parameter as a page to redirect to once the login is complete. If you pass in a relative URL you end up with a very peculiar looking ...
[ 0.4066909849643707, 0.14096572995185852, 0.3857526481151581, 0.14796246588230133, -0.3021906316280365, -0.10099252313375473, 0.32651156187057495, 0.01568167470395565, -0.37420982122421265, -0.7394905090332031, 0.21334145963191986, 0.3044739067554474, -0.251158744096756, 0.5854354500770569,...
put the login form ON the "Ask Question" page. I suppose that is a solution but I'm looking for other possibilities. **Edit:** It seems like using `$_SERVER['HTTP_REFERER']` is the best solution so far. Is there any reason not to use it? I realize you can fake the referer but will that actually cause any damages? I us...
[ 0.33188843727111816, 0.14760658144950867, 0.5032144784927368, 0.03240641579031944, -0.26146718859672546, -0.04783488065004349, 0.514401376247406, 0.012825848534703255, 0.03103846125304699, -0.6042389869689941, -0.03247959166765213, 0.6159622669219971, -0.3596346974372864, 0.126150444149971...
to that url. Note: HTTP\_REFERER is not always set.
[ 0.07558595389127731, -0.014563347212970257, 0.4295210540294647, 0.0071768141351640224, -0.07668398320674896, -0.4386678636074066, 0.2139967828989029, 0.4206564724445343, -0.06742216646671295, -0.4909471571445465, -0.34341999888420105, 0.22234198451042175, -0.19649021327495575, 0.4922485947...
So here is the deal. I want to call a class and pass a value to it so it can be used inside that class in all the various functions ect. ect. How would I go about doing that? Thanks, Sam > I want to call a class and pass a value to it so it can be used inside that class The concept is called "constructor". As the ot...
[ 0.3132322132587433, 0.1502661108970642, 0.5559439659118652, -0.2966757118701935, -0.12627415359020233, -0.38931772112846375, -0.14528530836105347, -0.3171430230140686, -0.23706024885177612, -0.4461287260055542, -0.019520558416843414, 0.6836894750595093, -0.18536265194416046, 0.224172458052...
$this->some_parameter = $init_parameter; } } // in code: $foo = new Foo("some init value"); ``` --- **Notice** - There are so-called old style constructors that you might run into in legacy code. They look like this: ``` class Foo { function Foo($init_parameter) { $this->some_parameter = $init_par...
[ 0.10484244674444199, 0.19911889731884003, 0.527981698513031, -0.22251452505588531, 0.055756594985723495, -0.3151817321777344, 0.5777513980865479, 0.23354974389076233, -0.14375805854797363, -0.32868465781211853, -0.15285971760749817, 0.5591760873794556, -0.3063438832759857, 0.44565469026565...
I've found a nasty VBS way to do this, but I'm looking for a native PoSh procedure to edit the properties of a .LNK file. The goal is to reach out to remote machines, duplicate an existing shortcut with most of the correct properties, and edit a couple of them. If it would just be easier to write a new shortcut file, ...
[ 0.55809485912323, -0.0021285605616867542, 0.5569919943809509, 0.012945381924510002, 0.004028725437819958, -0.19820617139339447, 0.13167297840118408, 0.06966312229633331, -0.14470022916793823, -0.8779860734939575, 0.19257965683937073, 0.42843401432037354, -0.5388770699501038, 0.338596343994...
## This is the "Comment" field $shortcut.Save() ## Save ``` Found the VB version of the code here: <http://www.tutorialized.com/view/tutorial/Extract-the-target-file-from-a-shortcut-file-.lnk/18349>
[ 0.36448952555656433, -0.09629297256469727, 0.20776882767677307, -0.19195125997066498, -0.11958108842372894, 0.11877749860286713, 0.06112677603960037, 0.1894862800836563, -0.17727500200271606, -0.2649241089820862, -0.22355090081691742, 0.32436469197273254, -0.3435908555984497, -0.0845917910...
I'm looking for an algorithm that rotates an image by some degrees (input). ``` public Image rotateImage(Image image, int degrees) ``` (Image instances could be replaced with int[] containing each pixel RGB values, My problem is that i need to implement it for a JavaME MIDP 2.0 project so i must use code runnable on...
[ 0.3510999083518982, 0.1250898391008377, 0.7745569944381714, -0.05490037798881531, -0.4127179980278015, -0.05837966501712799, 0.04903068393468857, -0.18262113630771637, -0.2283802181482315, -0.6501637101173401, 0.2693335711956024, 0.5781664252281189, -0.3001515567302704, 0.2702820897102356,...
best pages describing image rotation algorithms I've found on the internet is tied to Dan Bloomberg's *excellent* leptonica library. While the leptonica library itself is written in C and won't help you, his page on image rotation algorithms: <http://www.leptonica.org/rotation.html> is definitely worth a read. You wi...
[ 0.449345201253891, -0.05553940683603287, 0.1137871965765953, 0.5978044867515564, -0.14294344186782837, -0.3711872100830078, -0.5126557350158691, 0.44503000378608704, -0.19486179947853088, -0.7853555083274841, -0.08625319600105286, 0.21829664707183838, 0.12028922885656357, 0.028119822964072...
Is there is any reason to make the permissions on an overridden C++ virtual function different from the base class? Is there any danger in doing so? For example: ``` class base { public: virtual int foo(double) = 0; } class child : public base { private: virtual int foo(double); } ``` The [...
[ 0.30630233883857727, 0.07086619734764099, -0.1141127422451973, -0.12704388797283173, 0.2443453073501587, -0.25903335213661194, 0.2925308346748352, -0.09134607017040253, -0.16853545606136322, -0.19725190103054047, -0.19113121926784515, 0.36797910928726196, -0.3041643798351288, 0.42266234755...
an assumption that it is not possible to override a private member function. However, [This article](http://www.gotw.ca/publications/mill18.htm) shows an example of overriding private functions. Of course [another part of the C++ faq](http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.4) recommends a...
[ 0.21256470680236816, 0.04326087608933449, -0.005427216645330191, 0.19289958477020264, -0.13846583664417267, -0.4227007031440735, 0.34018492698669434, -0.16697858273983002, -0.22972969710826874, -0.2292986512184143, -0.09619934111833572, 0.5510504841804504, -0.29461348056793213, 0.360835283...
make something the Base had declared as public private, you are taking something away. Now, even though a Derived object "is-a" Base object, something that you should be able to do to a Base class object you cannot do to a Derived class object, breaking the [Liskov Substitution Prinicple](http://en.wikipedia.org/wiki/L...
[ 0.4276551902294159, -0.15986847877502441, -0.11557871848344803, 0.07417775690555573, 0.3026662766933441, -0.1673356294631958, 0.24131889641284943, -0.14654092490673065, -0.12139172106981277, -0.1712418645620346, -0.293606162071228, 0.3006815016269684, -0.4925798773765564, 0.540365159511566...
to in another answer), chances are you have an inheritance model where inheritance isn't really modeling "is-a," (e.g. Scott Myers's example Square inheriting from Rectangle, but you can't change a Square's width independent of its height like you can for a rectangle) and you may need to reconsider your class relations...
[ -0.07206723839044571, -0.4359022378921509, -0.4911458492279053, 0.20872123539447784, -0.250118613243103, 0.14306853711605072, 0.12102480232715607, -0.5661737322807312, -0.32670602202415466, -0.747787356376648, -0.051073744893074036, 0.004319571424275637, -0.1410987824201584, 0.266779005527...
I have a single Rails 2.2.2 app that I want to 'share' with multiple clients. Each client has his own domain name and database. The purpose is to allow one Rails app to 'host' many websites. I am using Apache as a front end to a mongrel cluster, as the web server. To enable Rails to know which request is for which cli...
[ 0.26275429129600525, 0.14823412895202637, 0.14728577435016632, -0.017819074913859367, -0.3115169405937195, 0.08396610617637634, 0.11004284024238586, 0.13259701430797577, -0.08674795180559158, -0.8873756527900696, 0.33927831053733826, 0.1659432351589203, -0.5159264206886292, 0.1863765716552...
even works fine -- mostly -- when many users are accessing the application from multiple domain names at the same time. The one problem I have is that when two users are accessing the application from two domain names at the same time, then **cookies are reset in an unexpected way**. The problem is illustrated in the...
[ 0.01398785412311554, -0.03475459665060043, 0.5315663814544678, 0.1347498595714569, -0.15157055854797363, -0.12740421295166016, 0.33710309863090515, 0.20023199915885925, -0.4921322762966156, -0.46749991178512573, 0.09895450621843338, 0.3159666657447815, -0.31469759345054626, -0.091292120516...
is, why did Rails send a different cookie back???** Note that, unlike several other questions, **I am not trying to share the same cookie across multiple domains.** User 1 and User 2 in the example above are accessing different domains. -- John ``` **1st Request from USER 1 for example1.com** Processing Admin::...
[ -0.30837056040763855, -0.027840707451105118, 0.3759949207305908, 0.045550063252449036, -0.16304755210876465, 0.32935115694999695, 0.49383825063705444, -0.19689986109733582, -0.33210131525993347, -1.103468656539917, -0.13449448347091675, 0.4511166512966156, -0.32702094316482544, -0.01356535...
[https://example1.com/admin/cms] **2nd Request from User 2 for example2.com** Processing CmsController#cms_show (for 64.1.215.163 at 2009-01-27 13:16:15) [GET] Session ID: 4fed1c59001f7484a63fb6280376825a Parameters: {"alias"=>"home.html"} >>> Request for client 48218343, EXAMPLE2.COM ### a...
[ -0.39504843950271606, 0.2734484076499939, 0.6959548592567444, -0.24473604559898376, -0.04742971807718277, 0.5286109447479248, 0.5299578905105591, -0.37352117896080017, -0.3584957420825958, -0.9215194582939148, -0.189051553606987, 0.500128448009491, 0.18847110867500305, -0.03817718476057052...
at 2009-01-27 13:16:18) [GET] Session ID: 85c178aa70ed2bef6a767e844bf6c6d6 >>> Request for client 90873721, EXAMPLE1.COM ####### 'admin/cms', 'index' Redirected to actionsignincontroller/admin/user Filter chain halted as [:check_authentication] rendered_or_redirected. Completed in 4ms | 302 Fo...
[ -0.7981275916099548, 0.06917829066514969, 0.8975673317909241, -0.05079095810651779, -0.12577132880687714, 0.5246785879135132, 0.64210045337677, -0.4104379415512085, -0.5209781527519226, -0.8052924871444702, -0.489151269197464, 0.5449628233909607, -0.22309355437755585, -0.12720878422260284,...
Rendering admin/user/signin Completed in 10ms (View: 6, DB: 0) | 200 OK [https://example1.com/admin/user/signin] ``` Well, I 'solved' the problem by eliminating the shared mongrel\_cluster, and giving each domain it's own mongrel instance. I was hoping that I could save some server resources by sharing a single m...
[ -0.5148527026176453, 0.3513582944869995, 0.8652659058570862, -0.28314879536628723, -0.1472070962190628, 0.4425446391105652, 0.6799032092094421, -0.2981383204460144, 0.1923578381538391, -1.1127492189407349, -0.054985009133815765, 0.41894057393074036, -0.1682772934436798, 0.22087794542312622...
the one I was trying.
[ -0.34737876057624817, -0.09658750146627426, -0.17159807682037354, 0.020493948832154274, -0.2208939790725708, 0.19839294254779816, -0.07099344581365585, -0.051144059747457504, -0.03908626735210419, -0.217926025390625, 0.02020125463604927, 0.2926025092601776, -0.3050575256347656, 0.134789213...
I know java has the SimpleDateFormat which seems fairly powerful, but you need to know the format ahead of time to use it correctly. TCL's clock scan function seems to be the easiest and most powerful I've seen. e.g. clock scan "1/08/2009 12:33:01 AM" will work just as well as clock scan "8-Jan-2009 12:33:01" ...
[ 0.16073882579803467, 0.0678895115852356, 0.619041919708252, -0.11254198104143143, -0.3162311911582947, -0.2932421863079071, 0.35382550954818726, -0.07113584131002426, -0.34362906217575073, -0.5284796357154846, 0.1509423404932022, 0.5431798696517944, -0.14233407378196716, -0.159516438841819...
25 2003") datetime.datetime(2003, 9, 25, 0, 0) >>> parse("Sep 25 2003") datetime.datetime(2003, 9, 25, 0, 0) >>> parse("Sep 2003", default=DEFAULT) datetime.datetime(2003, 9, 25, 0, 0) >>> parse("Sep", default=DEFAULT) datetime.datetime(2003, 9, 25, 0, 0) >>> parse("2003", default=DEFAULT) datetime.datetime(2003, 9...
[ -0.30389276146888733, -0.061739638447761536, 1.0652164220809937, -0.03748127445578575, 0.048750706017017365, 0.1697671264410019, 0.27443990111351013, 0.07444717735052109, -0.2973727285861969, -0.7787594199180603, -0.3371398150920868, 0.6413357257843018, -0.17363320291042328, 0.148748606443...
8, 15, 30) >>> parse("3rd of May 2001") datetime.datetime(2001, 5, 3, 0, 0) >>> parse("5:50 A.M. on June 13, 1990") datetime.datetime(1990, 6, 13, 5, 50) ``` Take a look at the documentation for it here: <http://labix.org/python-dateutil#head-c0e81a473b647dfa787dc11e8c69557ec2c3ecd2>
[ -0.17996066808700562, -0.09995073825120926, 0.661065936088562, -0.13930170238018036, 0.3179342746734619, 0.06490901857614517, 0.28273874521255493, 0.1368316411972046, -0.5547335147857666, -0.3541118800640106, 0.027456091716885567, 0.332645058631897, -0.21550080180168152, 0.1318382173776626...
Why is the following code (in cocoa) not working? ``` NSString *extension = [fileName pathExtension]; NSString *wantedExtension = @"mp3"; if(extension == wantedExtension){ //work } ``` in Xcode this just runs without warnings or errors but doesn't do what I think it SHOULD do. Shouldn't that be ``` if ([extension i...
[ 0.011812428012490273, 0.07047485560178757, 0.3389717638492584, -0.24810203909873962, -0.10030975937843323, -0.2139611840248108, 0.3662099242210388, -0.2866566777229309, -0.14286081492900848, -0.5660576224327087, -0.09342765808105469, 0.708367109298706, -0.3692690432071686, -0.1682595312595...
necessary because "sending a message" (ie calling a method) to a nil returns 0 or false. ``` if ([wantedExtension isEqualToString:extension]) { ... } ```
[ -0.004681949038058519, -0.16655518114566803, 0.40308499336242676, -0.18453243374824524, 0.12067729234695435, -0.29718703031539917, 0.46915000677108765, -0.26041555404663086, 0.17268338799476624, -0.46677282452583313, -0.42105263471603394, 0.6786484122276306, -0.2526853084564209, 0.03368359...
When one wants to refer to some part of a webpage with the "`http://example.com/#foo`" method, should one use ``` <h1><a name="foo"/>Foo Title</h1> ``` or ``` <h1 id="foo">Foo Title</h1> ``` They both work, but are they equal, or do they have semantic differences? According to the HTML 5 specification, [5.9.8 Nav...
[ -0.07250562310218811, 0.2486131638288498, 0.4101811945438385, -0.00767174456268549, -0.2911533713340759, -0.26277288794517517, 0.042855724692344666, -0.42411333322525024, -0.08857788145542145, -0.38471972942352295, -0.5148941874504089, 0.35131558775901794, -0.13354891538619995, 0.062295008...
document is the top of the document. > 3. If there is an element in the DOM that has an ID exactly equal to fragid, then the first such element in tree order is the indicated part of the document; stop the algorithm here. > 4. If there is an *a* element in the DOM that has a name attribute whose value is exactly equal ...
[ -0.3844725489616394, 0.2690662145614624, 0.7484984993934631, 0.02350667305290699, 0.15721727907657623, -0.3851044476032257, 0.24725115299224854, -0.4907442033290863, -0.23532240092754364, -0.2886804938316345, -0.778113603591919, 0.7307302951812744, -0.1736028790473938, 0.013000048696994781...
then will follow to `name="foo"`** Edit: As pointed out by @hsivonen, in HTML5 the `a` element has no name attribute. However, the above rules still apply to other named elements.
[ 0.18068137764930725, 0.26568707823753357, 0.24747827649116516, -0.35322755575180054, 0.017349958419799805, -0.4284974932670593, 0.3534914553165436, 0.018375933170318604, -0.3294278085231781, -0.13374921679496765, -0.5045424699783325, 0.3284943103790283, -0.41276785731315613, 0.210952088236...
This isn't a question specific to any programming language. Say you have some file written on a big-endian machine, and you know this. If two single-byte values were written back-to-back, how would you know? Big-endian reverses the order of 16, 32, and 64 bit values, so how would you know you need to read it as individ...
[ 0.22438429296016693, 0.2923915386199951, -0.01826118491590023, -0.005291811656206846, -0.118362657725811, 0.3066287636756897, -0.01097136177122593, -0.2480078935623169, -0.2818433940410614, -0.3125804662704468, 0.1854936182498932, 0.03705954551696777, -0.25292521715164185, 0.07751071453094...
this make any sense? I feel like I'm missing something super basic here. There is no way to know. This is why formally specified file formats typically mandate an endianness, or they provide an option (as with unicode, as MSN mentioned). This way, if you are reading a file with a particular format, you *know* it's big-...
[ -0.0628754198551178, 0.04175959527492523, 0.0872291773557663, -0.08538834005594254, -0.2046188861131668, -0.38210153579711914, 0.03773721680045128, 0.18041393160820007, -0.2286750078201294, -0.640903890132904, -0.2041650414466858, 0.3030548393726349, -0.11820369958877563, 0.278965204954147...
If you're big-endian, you don't need to worry about it. People use functions like [htonl and ntohl](http://www.opengroup.org/onlinepubs/007908799/xns/htonl.html) to preprocess things they write to the network so that their source code is the same on all machines. These functions are defined to do nothing on big-endian ...
[ -0.03896086663007736, -0.009730782359838486, 0.15397107601165771, 0.05017533153295517, -0.042528651654720306, -0.05740194395184517, 0.055165212601423264, 0.20094823837280273, -0.46503907442092896, -0.5188624262809753, -0.3284960985183716, 0.436297208070755, -0.239303857088089, 0.0799649134...
way. A big-endian machine can write the same byte sequence as a little-endian machine, it just might use a few more instructions to do it, because it has to reorder the bytes. The same is true for little-endian machines writing big-endian formats.
[ 0.08073139190673828, 0.011724838986992836, 0.1821848750114441, 0.11621113121509552, -0.10783131420612335, -0.04311511665582657, -0.03078940324485302, 0.1205219179391861, -0.38963592052459717, -0.553037166595459, 0.021397320553660393, 0.3946625590324402, -0.28403833508491516, -0.23578710854...
i have an interface - one of whose members returns a variable of type**Object**. In my attempts to try to use this returned variable, i discovered that it isn't just an "**Object**", but is actually a "**mshtml.HTMLDocumentClass**", as you can see in the following screenshot: [![alt text](https://i.stack.imgur.com/Gi...
[ 0.22939229011535645, 0.033351458609104156, 0.5787423253059387, 0.030930068343877792, -0.15367497503757477, -0.09614729136228561, 0.15248098969459534, -0.13001294434070587, -0.22628110647201538, -0.6998509764671326, -0.04557714983820915, 0.3556686341762543, -0.13451698422431946, 0.219359412...
= ie.Document; ``` to ``` mshtml.HTMLDocumentClass webDocument = (mshtml.HTMLDocumentClass)ie.Document; ``` --- If you're wondering, **ie** is declared as: ``` IWebBrowser2 ie; ``` and IWebBrowser2's declaration of ie.Document is: ``` [ComImport, DefaultMember("Name"), Guid("D30C1661-CDAF-11D0-8A3E-00C...
[ 0.10760360211133957, 0.19502021372318268, 0.5704758167266846, -0.18893732130527496, 0.14814648032188416, -0.2612682282924652, 0.2704928517341614, -0.1894593983888626, 0.013654068112373352, -0.762911856174469, -0.4197484254837036, 0.5843344926834106, -0.3657107949256897, 0.16517676413059235...
types into random strings to obfuscate the example. --- [chakrit](https://stackoverflow.com/questions/484770/visual-studio-how-to-figure-out-where-this-type-is-defined#484830) suggested using "\*Go to Definition\*\* of the **ie.Document** member, which unfortunatly goes to the declaration of ie.Document: [![alt text...
[ 0.059792179614305496, 0.008407657966017723, 0.3475553095340729, -0.2053893655538559, -0.05192966014146805, 0.09676176309585571, 0.11059202998876572, -0.31930410861968994, -0.019530994817614555, -0.4706454575061798, -0.44936543703079224, 0.2954135835170746, -0.6398068070411682, -0.021661905...
"Located at: "+asm.Location; } ``` Which in my case returns: > **Type Name:** mshtml.HTMLDocumentClass > > > **Namspace:** mshtml > > > **From assembly:** Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a > > > **Located at:** C:\Windows\assembly\GAC\Microsoft.mshtml\7.0.3...
[ 0.3362797498703003, 0.18277500569820404, 0.46309807896614075, 0.03429454192519188, 0.3284478187561035, -0.05778856575489044, 0.4016747772693634, 0.2852587103843689, -0.34198907017707825, -0.47332972288131714, -0.19093351066112518, 0.1889064759016037, -0.4247894585132599, 0.4825878441333771...
obj = new { Random = "Object" } as object; var t = obj.GetType(); var asm = t.Assembly; Console.WriteLine("Type name : " + t.FullName); Console.WriteLine("Namspace : " + t.Namespace); Console.WriteLine("From assembly : " + asm.FullName); Console.WriteLine("Loc...
[ -0.30554714798927307, -0.23893088102340698, 0.7004022002220154, -0.6055329442024231, 0.26368218660354614, 0.36328038573265076, 0.4191834330558777, -0.22888928651809692, -0.2725240886211395, -0.5685749650001526, -0.6976295709609985, 0.19272753596305847, -0.4634891152381897, 0.41238802671432...
Console.ReadKey(); } } ``` Or in your case... ``` var t = ie.Document.GetType() ``` ...should give you type information about what is it that is really inside `ie.Document`.
[ -0.03278836980462074, -0.061641138046979904, 0.5543409585952759, -0.0720975324511528, 0.33874520659446716, -0.2810240089893341, 0.11559589952230453, 0.02305411361157894, 0.38922497630119324, -0.8109424710273743, -0.19385944306850433, 0.6528649926185608, -0.2390850931406021, 0.1266759186983...
I'm currently doing something like this in some code I'm working on right now: ``` public CommandType GetCommandTypeFromCommandString(String command) { if(command.StartsWith(CommandConstants.Acknowledge)) return CommandType.Acknowledge; else if (command.StartsWith(CommandConstants.Status)) return Com...
[ 0.29550665616989136, 0.3124225437641144, 0.33989816904067993, -0.23215360939502716, 0.08807951956987381, -0.05681907758116722, 0.5204974412918091, -0.3614961802959442, -0.2494492530822754, -0.6633355617523193, -0.10113125294446945, 0.6145764589309692, -0.3696528673171997, 0.148590490221977...
I'm not too happy with the time it takes to do all of those string comparisons. Any suggestions? :) One optimization would be to use the StringComparison enum to specify that you only want ordinal comparison. Like this: ``` if(command.StartsWith(CommandConstants.Acknowledge, StringComparison.Ordinal)) return Comma...
[ 0.16267254948616028, 0.12623503804206848, 0.22056220471858978, -0.25834792852401733, -0.24043545126914978, 0.44363826513290405, 0.423557847738266, -0.3248700201511383, -0.07264693081378937, -0.5893718600273132, 0.45776838064193726, 0.7395578026771545, -0.2955147922039032, 0.072999045252799...
35.6033 ms culture sensitive ran 1000000 times in 175.5859 ms ``` You should also order your comparisons so that the most likely tokens are being compared first (happy path). Theese optimizations are a simple way of making your current implementation perform better but if performance really is critical (and I mean r...
[ 0.052487388253211975, -0.11808187514543533, 0.16751408576965332, 0.2404085099697113, -0.34676581621170044, 0.3672645092010498, 0.4306659996509552, -0.1530638337135315, -0.13231760263442993, -0.6923628449440002, 0.262498676776886, 0.41935548186302185, -0.27992454171180725, -0.29435887932777...
I'm using levenshtein algorithm to meet these requirements: When finding a word of N characters, the words to suggest as correction in my dictionary database are: Every dictionary word of N characters that has 1 character of difference with the found word. Example: found word:bearn, dictionary word: bears Every d...
[ -0.013243172317743301, 0.7013500928878784, 0.21085043251514435, -0.2474721521139145, -0.3553135395050049, 0.3239856958389282, 0.44118553400039673, -0.5568063259124756, -0.17676995694637299, -0.8294978737831116, -0.013354543596506119, 0.3260125517845154, -0.2635033130645752, -0.004500565119...
Levenshtein number of 1 (which is the Levenshtein number for all three cases), but then how do I choose the word to suggest? I read about Boyer-Moore-Horspool and Knuth-Morris-Pratt but I'm not sure on how either of them can be helpful. ``` #include <string> #include <vector> #include <algorithm> using namespace std;...
[ 0.08991745859384537, -0.03205263242125511, 0.281633585691452, -0.5467971563339233, -0.2661959230899811, 0.38397809863090515, 0.3580057621002197, -0.787326455116272, -0.18222187459468842, -0.5276632905006409, -0.003925262950360775, 0.33768925070762634, -0.256567120552063, 0.4067665934562683...
i < N1; i++ ) { T[0] = i+1; int corner = i; for ( j = 0; j < N2; j++ ) { int upper = T[j+1]; if ( s1[i] == s2[j] ) T[j+1] = corner; else T[j+1]
[ -0.4857780337333679, -0.381656676530838, 0.49051612615585327, -0.3119082748889923, 0.12522590160369873, 0.28471916913986206, 0.4541444182395935, -0.5697293877601624, -0.07180435955524445, -0.5019481778144836, -0.6689410209655762, 0.39921703934669495, -0.2068498432636261, -0.278558671474456...
= min(T[j], min(upper, corner)) + 1; corner = upper; } } return T[N2]; } ``` You may also want to add [Norvig's excellent article on spelling correction](http://norvig.com/spell-correct.html) to your reading. It's been a while since I've read it but I remember it being very similar to what your w...
[ -0.034638386219739914, 0.13365007936954498, 0.3845360577106476, -0.2572304606437683, -0.12189428508281708, -0.08378170430660248, 0.6209533214569092, 0.11603182554244995, -0.06176440790295601, -0.7272660136222839, -0.04415235295891762, 0.09699346125125885, 0.19081102311611176, -0.1246967390...
I am writing a client/server app in C++ and need to realize simple protocol to sent and receive data correctly. I have a class for server protocol which can convert the message to my format and then convert it again from this format. That what is server-side protocol looks like: ``` class BaseProtocol { protected:...
[ 0.25129011273384094, 0.0845579132437706, 0.6069258451461792, -0.15867742896080017, 0.2429698407649994, 0.39994898438453674, 0.33297404646873474, -0.16715577244758606, -0.07554253935813904, -0.7766664624214172, -0.23740461468696594, 0.5117160677909851, -0.2433314025402069, -0.26756277680397...
convertToSystemMessage(const char* message)=0; virtual std::string& convertToNativeMessage(const char* message)=0; virtual ~BaseProtocol() { NumberOfBytesInPackOfText = 0; serviceString = ""; } }; class SimpleProtocol: public BaseProtocol { public: SimpleProtocol(int SizeOfTextPack, con...
[ -0.27509960532188416, -0.3520033359527588, 0.7041864991188049, -0.1742737740278244, 0.607123613357544, 0.1647900491952896, 0.5867068767547607, -0.14999687671661377, -0.18321052193641663, -0.5818354487419128, -0.4219914376735687, 0.5066024661064148, -0.318260133266449, 0.10986439883708954, ...
to the server protocol? Or may be I need to extract subclass from server protocol and then the client protocol will be derived from this class? I would create a protocol class independent of both the client and the server. They can each call the functions of that class rather than inheriting from the class. This foll...
[ 0.21654029190540314, -0.2662433087825775, 0.19178833067417145, 0.09327683597803116, -0.03671542555093765, 0.016412820667028427, 0.1857149749994278, -0.38822999596595764, 0.06761521100997925, -0.4285154342651367, 0.033448778092861176, 0.5857831239700317, -0.48699450492858887, 0.224623993039...
That's my question, I want design all the interface of my application within an XML layout but I want to handle all the onTouch events, move ImageViews, etc, from a Java Class, this is possible? [LayoutInflaters](http://code.google.com/android/reference/android/view/LayoutInflater.html) let you convert XML layouts to t...
[ 0.2406691163778305, -0.011804914101958275, 0.6071656346321106, -0.11452463269233704, -0.24010692536830902, 0.26573148369789124, -0.08599500358104706, -0.08919170498847961, -0.14995606243610382, -0.7927327752113342, -0.00831531174480915, 0.5711039900779724, -0.2240293025970459, 0.1326202750...
I have an application that uses simple sockets to pass some characters between two systems. I have my java application running as a server. I establish a connection fine, and even pass one message. However, after one message has been sent my connection closes. From what I can tell it appears as if on closing the `prin...
[ 0.04723326489329338, 0.2794376015663147, 0.6481425166130066, -0.2932283878326416, -0.056546784937381744, 0.11812262237071991, 0.3743583559989929, -0.08403848856687546, -0.12002293765544891, -0.557958722114563, -0.13312646746635437, 0.35687172412872314, -0.3915981650352478, 0.30043643712997...
I maintain this connection in Java? Yes, closing any Writer/Reader will close all other Writers and Readers that they wrap. Don't close it until you are ready to close the underlying socket.
[ 0.2057802379131317, 0.47915223240852356, 0.23624315857887268, -0.29585906863212585, 0.02443525940179825, -0.15842776000499725, 0.4181024432182312, 0.264774352312088, 0.04019324481487274, -0.4793843924999237, -0.16972292959690094, 0.2757216691970825, -0.1118142306804657, 0.2939454913139343,...
To keep things simple, we have a few aspx pages... **Page1.aspx** - resets Session information. **Page2.aspx** - Search form with results and sets Session variables. **Page3.aspx, Page4.aspx, Page5.aspx** - require Session variables set on Page2.aspx What we're finding is that as Page2.aspx loads and setting t...
[ 0.05623726174235344, -0.15193350613117218, 0.5166404843330383, 0.18508848547935486, 0.06362786144018173, 0.005784724839031696, 0.5667187571525574, -0.2012067586183548, -0.7172307968139648, -0.7065550684928894, -0.24190092086791992, 0.44282978773117065, -0.32937201857566833, -0.103315472602...
as soon as Page1.aspx stopped processing on the server. Possibly useful info... we do use a Master page and there are links to Page1.aspx in the Master page. Other than that, I can not find any references to Page1.aspx in the code base. **update:** It may be due to authentication? It appears that when I access Pa...
[ 0.08461430668830872, 0.06294380128383636, 0.46704819798469543, 0.3143063485622406, -0.15248043835163116, -0.30543553829193115, 0.6245603561401367, 0.1159825250506401, -0.5362725853919983, -0.5297988057136536, -0.043328821659088135, 0.029262781143188477, -0.21609650552272797, 0.296289354562...
have src property defined. So when Page2.aspx executed, it was looking for an image located at the web site's root level, this then triggered the code on Default.aspx (Page1) and wipe away the session. Overall it looked something like this... On Page2.aspx ``` <img src=""> <!-- this ended up triggering a call to Def...
[ 0.03308272734284401, -0.09966163337230682, 0.5681816339492798, -0.13570129871368408, 0.005857475101947784, -0.4531755745410919, 0.4976241886615753, -0.06673621386289597, -0.3636096715927124, -0.6146870255470276, -0.19629234075546265, 0.5444331765174866, -0.20766009390354156, 0.086583748459...
I am using PHP 5's scandir($dir) function to iterate through a directory and print out an xml list of files. Only, when the directory has a single quote in the name, scandir returns no items! It doesn't return false (as it would if it failed) or generate warnings or errors - just empty. Any ideas? ``` $items = scandir...
[ 0.5526849031448364, -0.20391845703125, 0.6237052083015442, -0.24896782636642456, -0.07283282279968262, -0.11605747044086456, 0.5990601778030396, -0.3665998578071594, -0.05164829641580582, -0.7135002017021179, -0.09310628473758698, 0.5610909461975098, -0.26980483531951904, -0.02095636539161...
I'm having a problem with the FCKEditor html editor for ASP.NET in that when trying to insert an image within the editor and then clicking "browse server" in the Image Properties dialog I get an "page cannot be found" error. I want to get it to show all the files in the "images" folder. The website is set up as follow...
[ 0.31030842661857605, 0.11809804290533066, 0.5243744850158691, -0.10945413261651993, -0.12862803041934967, -0.395271897315979, 0.39239463210105896, 0.05341142788529396, -0.18295085430145264, -0.8513594269752502, -0.07436088472604752, 0.42990580201148987, -0.3037600517272949, -0.052249543368...
this contains the FCKEditor Control ``` I have tried setting the ImageBrowserURL to various settings such as "/images" but this doesn't seem to return the correct path to the images folder. Any ideas ? I think the problem is that 'ImageBrowserUrl' doesn't point to the path where your image files reside, it points to...
[ 0.08077545464038849, -0.05032660812139511, 0.7804965376853943, 0.1828564554452896, -0.09687112271785736, -0.24407216906547546, 0.12440882623195648, -0.22957585752010345, -0.14075247943401337, -0.8451356291770935, -0.13330769538879395, 0.5641005635261536, -0.5319830775260925, -0.34867003560...
<add key="FCKeditor:UserFilesPath" value="/images/" /> </appSettings> ``` The url is relative to the website root, the default used by fckeditor is /userfiles/. Hope this helps.
[ 0.027772294357419014, 0.022323690354824066, 0.8050394654273987, 0.025373702868819237, -0.030905241146683693, -0.21544374525547028, 0.19325819611549377, 0.012994387187063694, -0.2064160704612732, -0.7928928136825562, -0.29340431094169617, 0.370576411485672, -0.5463033318519592, 0.0537876375...
I'm looking for a tutorial, blog entry, or some help on the technique behind websites that automatically push users (ie without a postback) when the session expires. Any help is appreciated Usually, you set the session timeout, and you can additionally add a page header to automatically redirect the current page to a p...
[ 0.14712123572826385, 0.060035590082407, 0.5635889172554016, -0.08180863410234451, -0.005327149294316769, -0.3087832033634186, 0.7116169929504395, -0.11485088616609573, -0.4099939465522766, -0.8786256313323975, -0.3558902442455292, 0.5244613885879517, -0.12440991401672363, 0.103145673871040...
get { return Session.Timeout; } } public string SessionExpireDestinationUrl { get { return "/SessionExpired.aspx"; } } protected override void OnPreRender(EventArgs e) { base.OnPreRender(e);
[ -0.23130543529987335, -0.3908102512359619, 0.43054378032684326, -0.18208235502243042, 0.20338915288448334, -0.23404830694198608, 0.6418235898017883, -0.12983231246471405, -0.09271740913391113, -0.3722185790538788, -0.5361942052841187, 0.8076664209365845, -0.09821750223636627, 0.17171503603...
this.PageHead.Controls.Add(new LiteralControl( String.Format("<meta http-equiv='refresh' content='{0};url={1}'>", SessionLengthMinutes*60, SessionExpireDestinationUrl))); } } } ``` The SessionExpireDestinationUrl should link to a page where you clear the session and any ot...
[ 0.11719746142625809, 0.08878505975008011, 0.8710473775863647, -0.0769573524594307, 0.1401658058166504, -0.5066692233085632, 0.5315619707107544, -0.06527166813611984, -0.18508706986904144, -0.8072630763053894, -0.49933576583862305, 0.5764457583427429, -0.3050086200237274, 0.481914222240448,...