text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
How do I obtain the version number of the calling web application in a referenced assembly? I've tried using System.Reflection.Assembly.GetCallingAssembly().GetName() but it just gives me the dynamically compiled assembly (returning a version number of 0.0.0.0). **UPDATE: In my case I needed a solution that did not r...
[ 0.22170531749725342, 0.24634970724582672, 0.48156312108039856, -0.018020380288362503, -0.07991727441549301, -0.028742188587784767, 0.4147098660469055, -0.10494555532932281, -0.26890021562576294, -0.42705580592155457, 0.008614631369709969, 0.5343691110610962, 0.14201155304908752, -0.0805520...
first tries GetEntryAssembly() for non-web apps. This returns null under ASP.NET. It then looks at HttpContext.Current to determine if this is a web application. It then uses the Type of the current HttpHandler - but this type's assembly might be a generated ASP.NET assembly if the call is made from with an ASPX page, ...
[ 0.1846747249364853, -0.23498687148094177, 0.6470034122467041, 0.06370873004198074, -0.1376970261335373, 0.04198990389704704, 0.3287449777126312, -0.30118972063064575, -0.010343377478420734, -0.6991177201271057, -0.3123612403869629, 0.550491988658905, -0.42411157488822937, 0.074882246553897...
Assembly of that Type. If all else fails then fall back to GetExecutingAssembly(). There are still potential problems with this approach but it works in our applications. ``` private const string AspNetNamespace = "ASP"; private static Assembly getApplicationAssembly() { // Try the EntryAssembly,...
[ 0.053440481424331665, -0.07887259125709534, 0.34309956431388855, -0.1682981699705124, 0.08559848368167877, 0.008887560106813908, 0.6147685647010803, -0.5251860022544861, -0.18424785137176514, -0.41067996621131897, -0.3627704083919525, 0.5541266798973083, -0.5903610587120056, 0.239568606019...
HttpContext.Current; if (ctx != null) ass = getWebApplicationAssembly(ctx); // Fallback to executing assembly return ass ?? (Assembly.GetExecutingAssembly()); } private static Assembly getWebApplicationAssembly(HttpContext context) { Guard.AgainstNullArgument(co...
[ -0.2255529910326004, -0.2293691188097, 0.5778231024742126, -0.4047710597515106, 0.037887778133153915, 0.29247772693634033, 0.7900175452232361, -0.45368295907974243, -0.1901785433292389, -0.4580773413181305, -0.6212527751922607, 0.6238038539886475, -0.5505945682525635, 0.17786407470703125, ...
Type type = app.GetType(); while (type != null && type != typeof(object) && type.Namespace == AspNetNamespace) type = type.BaseType; return type.Assembly; } ``` UPDATE: I've rolled this code up into a small project on [GitHub](https://github.com/laazyj/ApplicationAssemblyUtility) and ...
[ 0.25791677832603455, 0.05609900504350662, 0.4670572280883789, -0.33036187291145325, 0.16205187141895294, 0.04039648920297623, 0.1672309786081314, -0.41652706265449524, -0.04961445927619934, -0.6623541712760925, -0.3963988721370697, 0.42882779240608215, -0.45053625106811523, -0.098323442041...
I'm using SQL Server 2008. Say I create a temporary table like this one: ``` create table #MyTempTable (col1 int,col2 varchar(10)) ``` How can I retrieve the list of fields dynamically? I would like to see something like this: ``` Fields: col1 col2 ``` I was thinking of querying sys.columns but it doesn't seem to...
[ -0.478282630443573, 0.11910455673933029, 0.4636409282684326, 0.027151960879564285, -0.12352529913187027, 0.05200663208961487, -0.19432063400745392, 0.2772520184516907, -0.4974733889102936, -0.6970435380935669, 0.19306455552577972, 0.3147831857204437, -0.438378244638443, 0.06112821400165558...
I use log4net all the time, but one thing I've never figured out is how to tell what's going on on the inside. For example, I've got a console appender and a database appender in my project. I made a few changes to the database and the code, and now the database appender doesn't work anymore. I'll figure out why eventu...
[ 0.636597216129303, 0.10924753546714783, 0.1585705578327179, 0.24883250892162323, 0.19500838220119476, -0.21401186287403107, 0.22393542528152466, 0.08276975899934769, -0.23641614615917206, -0.7545945048332214, 0.2676369845867157, 0.722465455532074, -0.3087805509567261, -0.025216203182935715...
value on the application configuration file: ``` <configuration> <appSettings> <add key="log4net.Internal.Debug" value="true"/> </appSettings> </configuration> ``` Then, to determine the file in which you want to save the output you can add the following code in the same .config file: ``` <configuration...
[ 0.3813559412956238, 0.11912978440523148, 0.45295289158821106, -0.09724605083465576, 0.3264692723751068, 0.13523146510124207, 0.38076746463775635, -0.14741845428943634, 0.013097433373332024, -0.6878476738929749, -0.19190634787082672, 0.8764021992683411, -0.25664225220680237, -0.246857449412...
type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\tmp\log4net.txt" /> </listeners> </trace> </system.diagnostics> ... </configuration> ``` You can find a more detailed explanation under 'How do I enable log4net internal debugging?' in the [log4net FAQ page](https://lo...
[ -0.0114695243537426, 0.2602788209915161, 0.1910005509853363, -0.19839176535606384, 0.14571677148342133, -0.25983792543411255, 0.5350008010864258, -0.27942168712615967, -0.2622230350971222, -0.330470472574234, -0.12529993057250977, 0.5671892166137695, -0.10997352004051208, 0.093172073364257...
Is there any way to set a timeout on Oracle OCI calls (OCIStmtExecute for example) ? Thanks There is no way provided by `OCI` itself. You can create a `Timer` and issue an `OCIBreak()` on timeout. `OCIBreak()` is thread safe and signal safe.
[ 0.17428706586360931, 0.09550564736127853, 0.1230856254696846, 0.3033220171928406, 0.21241599321365356, -0.30739927291870117, 0.1325591802597046, 0.17298264801502228, -0.2062046229839325, -0.6950824856758118, -0.2568543255329132, 0.5837767720222473, -0.20093472301959991, 0.09251194447278976...
I run the following command at uni to my user account ``` chmod -R 700 * ``` Then, I run ``` chmod -R 755 public_html ``` My homepage remains to be "Forbidden" when I browse to it. **The permissions of my user account** ``` 4 drwx------ 5 Newbie staff 4096 2008-12-19 12:39 Desktop 4 drwx------ 10 Newbie staff...
[ 0.09891778975725174, 0.5271049737930298, 0.5057843923568726, -0.27305489778518677, 0.0007344420300796628, 0.09618650376796722, 0.5344780087471008, -0.04991007223725319, -0.2697165608406067, -0.588346004486084, -0.45277443528175354, 0.5533072352409363, -0.026835959404706955, 0.1006107404828...
7 Newbie staff 4096 2008-09-03 21:39 Windows 4 drwx------ 4 Newbie staff 4096 2008-10-03 16:29 workspace ``` **The permissions of files in public\_html** ``` 4 -rwxr-xr-x 1 newbie staff 3414 2009-04-15 02:23 index.html 4 -rwxr-xr-x 1 newbie staff 2219 2008-09-16 10:46 index.html~ 144 -rwxr-xr-x 1 newbie sta...
[ -0.021219419315457344, 0.3587368130683899, 0.7282959222793579, -0.3275070786476135, -0.057678889483213425, 0.2043149471282959, 0.31384286284446716, -0.2105007767677307, -0.3877886235713959, -0.3925301432609558, -0.5604837536811829, 0.5833780765533447, 0.19080036878585815, 0.051514148712158...
the Web server; www user needs execute permission on the directory. `chmod o+x .` is probably your best bet.
[ 0.5169606804847717, 0.3209036886692047, 0.232964888215065, 0.11136360466480255, 0.11114238947629929, -0.25454214215278625, 0.21164937317371368, 0.2688905894756317, 0.0309002585709095, -0.5107421278953552, -0.18916364014148712, 0.5432829260826111, -0.04885713756084442, 0.15125618875026703, ...
I've been having a heck of a time getting this query right, so I'm hoping that StackOverflow can point me in the right direction. I have three tables: * Territories (TerritoryId, TerritoryName, etc) * UserTerritories (Just a gerrund) * Users (UserId, UserName, StatusId) I need to get all the Territories that have on...
[ 0.37559953331947327, 0.1548711061477661, 0.6460874676704407, 0.15071038901805878, -0.18919874727725983, -0.04558547958731651, 0.3234400451183319, -0.20718422532081604, -0.019489144906401634, -0.8216938972473145, 0.05081649869680405, 0.06757494807243347, -0.05477927252650261, 0.374118685722...
join uXt in db.User_x_Territories on t.TerritoryId equals uXt.UserID into tJoin from uXt in tJoin.DefaultIfEmpty()
[ 0.1012982651591301, -0.23137006163597107, 0.5823825001716614, -0.12261524796485901, -0.1316518634557724, -0.034778326749801636, 0.5121462941169739, -0.2325458526611328, 0.04495777562260628, -0.7836679816246033, -0.16831329464912415, 0.048875320702791214, -0.4227699041366577, 0.461687952280...
join u in db.Users on uXt.UserID equals u.Id into uJoin from u in uJoin.DefaultIfEmpty() select t); ``` Can anyone help me out? All I've
[ 0.26069214940071106, 0.16747239232063293, 0.5780001878738403, -0.1518009454011917, -0.10916849970817566, -0.08766351640224457, 0.664939284324646, -0.1954292356967926, 0.1302632838487625, -0.8164204359054565, 0.004140249453485012, 0.5338157415390015, -0.16476291418075562, 0.2729168534278869...
been able to find online are fairly basic examples. ``` var territories = context.Territories .Where(t=> t.UserTerritories.Any(ut=>ut.User.StatusId == 3)); ``` It works as it reads :) Just gets the territories that match the desired condition, which is to have any user with status id 3. Using the relations simp...
[ 0.21169213950634003, -0.10771330446004868, 0.6318872570991516, 0.042071383446455, 0.030732901766896248, -0.07038326561450958, 0.3154524862766266, -0.1974419802427292, -0.22437740862369537, -0.7624229788780212, -0.16745290160179138, 0.41177600622177124, -0.1996217668056488, 0.09571633487939...
select t; ```
[ -0.11681730300188065, -0.10839923471212387, -0.09142295271158218, -0.2055055946111679, 0.2326154261827469, 0.1849062442779541, -0.17801186442375183, 0.06937044113874435, 0.37841153144836426, -0.6104034185409546, -0.5730679035186768, 0.5956354737281799, -0.4053944945335388, -0.0378707572817...
For a block like this: ``` try: #some stuff except Exception: pass ``` pylint raises warning W0703 'Catch "Exception"'. Why? It's considered good practice to not normally catch the root Exception object, instead of catching more specific ones - for example IOException. Consider if an out of memory exception...
[ -0.07379088550806046, -0.1293298900127411, -0.02783091738820076, 0.14052695035934448, 0.04113166779279709, -0.4442490041255951, 0.6358717083930969, 0.09662720561027527, -0.39716026186943054, -0.5154489278793335, -0.4749394357204437, -0.17171558737754822, -0.1879657655954361, 0.000962444697...
Why the heck does Oracle offer a different(!) version of the JDBC driver, e.g. ojdbc14.jar, for every(!) database version? The files all have different sizes and thus probably different content. background: We get a random and seemingly irreproducible error saying "invalid number" when saving data (we guess it's...
[ 0.4256039261817932, 0.5049179196357727, -0.17898313701152802, 0.373080849647522, -0.17740249633789062, -0.11039969325065613, 0.22632332146167755, 0.09188210219144821, -0.3564035892486572, -0.3146922290325165, 0.17629922926425934, 0.44024160504341125, -0.12537866830825806, 0.442011207342147...
run on databases maintained by our clients, i.e. whatever version and patch the clients have running is what it is. So what driver do we use? The latest (Oracle 11g) - despite the fact that it's usually 9i and 10g databases? Why don't they just link all versions to the same "one driver suits all" file? Or are th...
[ 0.43470636010169983, 0.19019100069999695, 0.2804460823535919, 0.0507044717669487, -0.15888038277626038, -0.10334847122430801, 0.11023928970098495, -0.043519459664821625, -0.006920371204614639, -0.6021307110786438, 0.04988127574324608, 0.7912933230400085, -0.42875936627388, -0.1863507032394...
I have a class here that contain linked list of other class cars example ``` class transportation { private; int id; list <car> *cars; int keyval; public : set() { } void setTransportation(int ids, list <car> *carss, int keyvals) { id=ids; cars[...
[ 0.4862256944179535, -0.07487203925848007, 0.2393057644367218, 0.21391941606998444, 0.14452295005321503, 0.409140944480896, -0.13060340285301208, -0.2530441880226135, -0.13204047083854675, -0.6484723687171936, -0.3313048183917999, 0.7167795896530151, -0.02939274162054062, 0.4459267258644104...
keyval=keyvals; } list <car> *getCars() { return cars; // I have to accessed cars list to be modified in my main // is this how I do it ????? } ``` above is only a excerpt from my code. What
[ 0.4305461049079895, 0.20926272869110107, 0.4453846216201782, 0.029964208602905273, 0.271657794713974, -0.056147221475839615, 0.23094850778579712, -0.07351724803447723, -0.13777542114257812, -0.5442559123039246, 0.031083719804883003, 0.7728574275970459, 0.059217773377895355, 0.1452137827873...
I have to do is to set list of cars in the main, thus I will call setTransportation in main and pass in list of carss to build up the linked list of car. Am i doing the right thing on setTransportation? As i have to dynamically allocated memory to array of list cars, how do I do that in my main function? ``` int main(...
[ -0.03228436037898064, 0.2075294405221939, 0.5903789401054382, 0.13586191833019257, 0.1922137439250946, 0.36059316992759705, 0.14012691378593445, -0.27249133586883545, -0.3461405634880066, -0.41104304790496826, -0.15616515278816223, 0.7190980911254883, -0.017756391316652298, 0.2913747727870...
bmw.setCar(iseq,type); carList[k].push_back(bmw); list <car> *inputList = (*ptr).getCars(); // is this how I accessed list from inputList[k]=new list <car> [k]; // list class??? (*ptr).setTransportation(iid,carList,k); transportationList.push_back((*ptr)); k++; } ``` Any...
[ 0.23499606549739838, 0.021645134314894676, 0.5917837023735046, 0.07083528488874435, -0.1880493313074112, 0.28581443428993225, 0.3440805971622467, -0.5344539880752563, -0.2513488531112671, -0.4227864146232605, -0.22821062803268433, 0.6724162101745605, -0.1961633563041687, 0.2452493757009506...
I like this 6 line solution a lot and am trying to replicate it in C#. Basically, it permutes the elements of an array: ``` def permute(xs, pre=[]): if len(xs) == 0: yield pre for i, x in enumerate(xs): for y in permute(xs[:i] + xs[i+1:], pre + [x]): yield y ``` Well, it probably isn't how I'd w...
[ -0.06117229163646698, -0.3296467661857605, 0.45116016268730164, -0.33455291390419006, -0.5234357118606567, 0.25562092661857605, 0.5070537328720093, -0.5168445110321045, -0.02132680080831051, -0.44866061210632324, -0.19361627101898193, 0.2890108823776245, -0.3028615713119507, 0.121307179331...
< xs.Length; i++) { foreach (T[] y in Permute(xs.Take(i).Union(xs.Skip(i+1)).ToArray(), pre.Union(new[] { xs[i] }).ToArray())) { yield return y; } } } ``` --- Re your comment; I'm not *entirely* clear on the question; if you mean "why is this useful?" - among other things, there are a...
[ 0.35760006308555603, -0.24482615292072296, 0.14952628314495087, -0.07410158216953278, -0.043811749666929245, 0.07507694512605667, 0.21272951364517212, -0.37282437086105347, -0.011984542943537235, -0.36410456895828247, -0.4446875751018524, 0.3649161756038666, -0.4875468909740448, 0.12369382...
more sophisticated solution), you might want to check whether it is best to go {base,A,B,C,base}, {base,A,C,B,base},{base,B,A,C,base}, etc. If you mean "how would I use this method?" - untested, but something like: ``` int[] values = {1,2,3}; foreach(int[] perm in values.Permute()) { WriteArray(perm); } void Writ...
[ -0.008569917641580105, -0.20185986161231995, 0.5305547714233398, -0.18010447919368744, 0.15392298996448517, 0.04829637333750725, 0.5514162182807922, -0.8008093237876892, -0.10705748200416565, -0.37057504057884216, -0.12705625593662262, 0.42820337414741516, -0.28612667322158813, -0.00909839...
[in his book](http://www.manning.com/skeet/), though. The rest of the code is very much like your original question - just using LINQ to provide the moral equivalent of `+` (for arrays).
[ 0.4421288073062897, -0.031185299158096313, 0.0013918535551056266, 0.2097942978143692, -0.25670087337493896, -0.3081244230270386, 0.1098143607378006, -0.3227443993091583, -0.160042405128479, 0.08458352833986282, -0.061650246381759644, 0.5027015805244446, -0.10318353772163391, -0.36597442626...
I have a table with column ID that is identity one. Next I create new non-identity column new\_ID and update it with values from ID column + 1. Like this: ``` new_ID = ID + 1 ``` Next I drop ID column and rename new\_ID to name 'ID'. And how to set Identity on this new column 'ID'? I would like to do this progra...
[ -0.054677680134773254, 0.2910495698451996, 0.5159960389137268, 0.004857589025050402, 0.04935136437416077, 0.17487940192222595, -0.31605470180511475, -0.19096797704696655, -0.28020429611206055, -0.8722088932991028, 0.0768849179148674, 0.3211964964866638, -0.18211734294891357, 0.218378454446...
is an example with a table (named *TestTable*) that contains only one field, called ID (integer, non IDENTITY): ``` BEGIN TRANSACTION GO CREATE TABLE dbo.Tmp_TestTable ( ID int NOT NULL IDENTITY (1, 1) ) ON [PRIMARY] GO SET IDENTITY_INSERT dbo.Tmp_TestTable ON GO IF EXISTS(SELECT * FROM dbo.TestTable) ...
[ -0.06678616255521774, -0.1306733936071396, 0.05968097597360611, 0.2539408206939697, -0.1498056948184967, -0.017447037622332573, -0.11014267057180405, -0.459728866815567, -0.17019742727279663, -0.4352805018424988, -0.32536572217941284, 0.14857721328735352, -0.3980230987071991, 0.04129523411...
I'm trying to import one of the GWT samples into Eclipse by following the instructions below. But when I browse to the directory containing the "Hello" sample and uncheck "Copy projects into workspace", the Finish button is grayed out, preventing me from completing the import. Any ideas why? > -- Option A: Import your...
[ 0.6062449216842651, 0.1180591806769371, 0.16234110295772552, -0.121047742664814, -0.2998292148113251, -0.3160325884819031, 0.08885165303945541, -0.08987174928188324, -0.023450957611203194, -0.7288601398468018, 0.0003921586903743446, 0.6147270798683167, -0.21289967000484467, -0.002350299153...
the File menu and > choose: > > > File -> Import... -> Existing > Projects into Workspace > > > Browse to the directory containing > this file, select "Hello". > Be sure to uncheck "Copy projects into workspace" if it is checked. > Click Finish. I had the same problem but found [this](http://groups.google.com/...
[ 0.3977038860321045, 0.15716801583766937, 0.06461410224437714, 0.08430249989032745, -0.261502742767334, -0.15964002907276154, -0.056035034358501434, -0.2525861859321594, -0.24786221981048584, -0.7330542206764221, 0.002443252597004175, 0.5282023549079895, 0.001910500694066286, 0.135924607515...
your eclipse samples installation) > > Showcase (select the directory in the left panel) > > Into folder (Showcase should be the default value) > > > This will import the source into your > workspace. Use build.xml to build the > project. The build will fail as the > gwt-servlet.jar is in a shared > directory w...
[ 0.7278878092765808, -0.11152173578739166, 0.05694226175546646, 0.02111475169658661, -0.4581490755081177, -0.32515114545822144, -0.008392286486923695, -0.12459450215101242, 0.18376541137695312, -0.8226216435432434, 0.09572584182024002, 0.7573748230934143, -0.2177710086107254, -0.01015277486...
We have a pricing dataset that changes the contained values or the number of records. The number of added or removed records is small compared to the changes in values. The dataset usually has between 50 and 500 items with 8 properties. We currently use AJAX to return a JSON structure that represents the dataset and u...
[ 0.34041139483451843, -0.1904483586549759, 0.20065730810165405, 0.4209116995334625, -0.005230120848864317, 0.08921879529953003, -0.1973474621772766, -0.19921919703483582, -0.09456741064786911, -0.562272846698761, -0.1782255917787552, 0.5389189124107361, 0.07822894304990768, -0.0310463663190...
with a following request. If there is a change to the hashes we know we need a new JSON structure otherwise the hashes are just returned to save bandwidth and eliminate unnecessary client-side processing. As MD5 is normally used with encryption is the best choice of hashing algorithm for just detecting data changes? ...
[ -0.12540529668331146, -0.16516274213790894, 0.49809250235557556, 0.05551224201917648, -0.20093534886837006, -0.21664483845233917, 0.14481382071971893, -0.29210561513900757, -0.3852764964103699, -0.33925023674964905, -0.430624395608902, 0.42974022030830383, -0.25617343187332153, 0.236841246...
are very concerned with the performance of the algorithm, you could go with a simpler checksum-style algorithm that isn't designed to be cryptographically secure. (though weaknesses in MD5 have been discovered in recent years, it's still designed to be cryptographically secure, and hence does more work than may be requ...
[ 0.5204941034317017, 0.13213425874710083, -0.14817573130130768, 0.20367982983589172, -0.027159128338098526, -0.2580659091472626, 0.17441344261169434, 0.1745130717754364, -0.2813687324523926, -0.49313050508499146, 0.17339375615119934, 0.7125951647758484, -0.06517581641674042, -0.163071841001...
I need to convert 0.5 in base 10 to base 2 (0.1). I have tried using ``` Double.doubleToRawLongBits(0.5) ``` and it returns `4602678819172646912` which I guess is in hex, but it does not make sense to me. Multiply you number by 2^n, convert to an BigInteger, convert to *binary* String, add a decimal point at posit...
[ 0.2167535275220871, 0.03301915526390076, 0.2613760530948639, -0.479615181684494, 0.020504983142018318, 0.33947768807411194, 0.3596704304218292, -0.38424840569496155, -0.26820603013038635, -0.3653787672519684, -0.11517571657896042, 0.5260509848594666, -0.2718270421028137, 0.2296356856822967...
BigInteger bi = bd.toBigInteger(); StringBuilder str = new StringBuilder(bi.toString(2)); while (str.length() < n+1) { // +1 for leading zero str.insert(0, "0"); } str.insert(str.length()-n, "."); return str.toString(); } ```
[ -0.08487572520971298, -0.42800912261009216, 0.5071861147880554, -0.4010811150074005, -0.19041992723941803, 0.3834962546825409, 0.5152526497840881, -0.6814019083976746, -0.24462129175662994, -0.09123653173446655, -0.10341305285692215, 0.4378129839897156, -0.6254427433013916, 0.3356268703937...
I would like to introduce unit testing to our C++ product and wanted to investigate the pros and cons of trying to use the CLR-based unit tests. I've read that if you compile with the /clr:safe option, you can call your existing C++ code. I'm strictly a .NET developer, so I'm at a loss for how this would affect our co...
[ 0.7672993540763855, 0.1328991949558258, -0.08693575859069824, -0.08624530583620071, -0.13411208987236023, -0.3337628245353699, 0.39449235796928406, -0.16058315336704254, 0.14957194030284882, -0.34160545468330383, 0.043580442667007446, 0.8636476397514343, -0.14088726043701172, -0.0722539648...
a language that basically shares no datatypes with C++.
[ 0.027035357430577278, -0.05746671184897423, -0.036150820553302765, -0.12656280398368835, -0.2045421600341797, -0.10515886545181274, 0.24778655171394348, 0.3271377384662628, 0.15437637269496918, -0.28280001878738403, -0.26142895221710205, 0.3012971878051758, -0.535496175289154, -0.134013876...
This is a follow up to a previous question which seems to have confused people so I'll purify it a bit. Here is some markup. ``` <div class="button width120 height30 iconLeft colorRed"></div> <div class="button width180 height20 iconPlus colorBlue"></div> <div class="button width200 height10 iconStar colorGreen"></div...
[ -0.07250481098890305, -0.19347907602787018, 0.5861384272575378, -0.1851893663406372, -0.02292386069893837, 0.09304622560739517, 0.18503840267658234, -0.3085085153579712, -0.2699870765209198, -0.6416124105453491, 0.04588233679533005, 0.9175218343734741, -0.036667369306087494, -0.07833039760...
use classes this way so I'm not looking for alternative ways of doing it, this is an experiment and I'm interested to know if it's possible to do it this way. Something like: ``` $(".button").each(function(){ var classNames = $(this).attr('class').split(' '); var width, height; for(int i = 0; i < className...
[ 0.15670143067836761, -0.43910157680511475, 0.3736364543437958, -0.2936910390853882, -0.06637077033519745, 0.14500004053115845, 0.31614911556243896, -0.4594835937023163, -0.1511884480714798, -0.7528480291366577, -0.23762843012809753, 0.7319199442863464, -0.1345652937889099, 0.34081023931503...
} else if(className.indexOf('height') > -1) { height = className.substring(6, className.length - 1); } // etc. etc. } }); ``` Or have I misunderstood what you were asking?
[ 0.43775099515914917, -0.12542593479156494, 0.4862041771411896, -0.2828068733215332, 0.39507681131362915, -0.19421811401844025, 0.2752131521701813, -0.3047490119934082, -0.1391001045703888, -0.4042225778102875, -0.1937853842973709, 0.8290939927101135, -0.12871535122394562, 0.287596523761749...
I have noticed a rather strange behaviour in IE. I have a HTML form with a single input text field and a submit button On Submit click I need to execute a client side JavaScript function that does the necessary. Now when I want to prevent the postback in the text field (on enter key press). I have added a key press...
[ -0.1792580932378769, -0.04007440805435181, 0.4006043076515198, -0.18600021302700043, -0.34349945187568665, -0.0693093091249466, 0.26967573165893555, -0.27717453241348267, -0.03734985738992691, -0.8134095072746277, -0.10599493980407715, 0.6837602853775024, -0.1216433122754097, 0.03107860870...
IE { keyNum = event.keyCode; } else if (event.which) // Netscape/Firefox/Opera { keyNum = event.which;
[ 0.1602707803249359, -0.3247205913066864, 0.09018991887569427, -0.41671663522720337, 0.3643260598182678, -0.3741419017314911, 0.31186243891716003, -0.3400205075740814, 0.13599738478660583, -0.6051799654960632, -0.4487149715423584, 0.8091588020324707, -0.7571651339530945, -0.2706684768199920...
} else return true; if (keyNum == 13) // Enter Key pressed, then start search, else do nothing. { OnButtonClick(); return false; }
[ 0.040908098220825195, -0.301083505153656, 0.372943639755249, -0.30621251463890076, 0.6277694702148438, 0.10638067126274109, 0.5786238312721252, -0.3292241096496582, -0.1930726170539856, -0.2592634856700897, -0.46498924493789673, 0.8406978845596313, -0.2996821999549866, 0.07204746454954147,...
else return true; } ``` Strangly this doesn't work. --- But if I pass the text field to the function : ``` <input type=text onkeypress="return OnEnterKeyPress(this,event);" /> function OnEnterKeyPress(thisForm,event) { var keyNum = 0; if (window.event) // IE ...
[ -0.16076987981796265, -0.12236429750919342, 0.4800751805305481, -0.40013477206230164, 0.13629809021949768, -0.08289264887571335, 0.39164209365844727, -0.20235396921634674, 0.19238746166229248, -0.7827551960945129, -0.27770647406578064, 0.8539983630180359, -0.18843691051006317, 0.0549044385...
keyNum = event.keyCode; } else if (event.which) // Netscape/Firefox/Opera { keyNum = event.which; } else return true;
[ 0.09713277220726013, -0.4893200695514679, 0.032832980155944824, -0.37748849391937256, 0.4291686415672302, -0.23639148473739624, 0.24936914443969727, -0.4435311257839203, -0.1633434295654297, -0.27277305722236633, -0.4703691899776459, 0.8271036148071289, -0.5431174635887146, -0.085721708834...
if (keyNum == 13) // Enter Key pressed, then start search, else do nothing. { OnButtonClick(); return false; } else
[ 0.018207339569926262, -0.3290862441062927, 0.3826870322227478, -0.3370441794395447, 0.5879855751991272, 0.08600444346666336, 0.5597132444381714, -0.4138096868991852, -0.27993863821029663, -0.30020537972450256, -0.4173927903175354, 0.7998332977294922, -0.2249177247285843, 0.0767813399434089...
return true; } ``` I am able to prevent the postback. Can anyone confirm what is exactly happening here? The HTML form has just one text box and a submit button. The resultant output of the JavaScript function executed on submit is displayed in a HTML text area in a separate div. Found out a work around fo...
[ 0.41883164644241333, 0.24708311259746552, 0.37650394439697266, -0.05098807439208031, -0.3182244598865509, -0.2842075526714325, 0.3668142855167389, -0.34629905223846436, 0.20311065018177032, -0.7087315320968628, -0.21409469842910767, 0.6147761344909668, -0.26037439703941345, -0.110628105700...
are more than one text boxes, IE doesn't auto postback the form on enter press, instead it fires the button's onclick event. So i introduce a hidden text field in the form and everything works magically. I donot even need to handle the onkeypress event for the text field. ``` <Form> <input type="text" /> <inp...
[ -0.026469379663467407, -0.077181875705719, 0.6607468128204346, -0.12695738673210144, -0.27873796224594116, -0.18623243272304535, 0.35519513487815857, -0.6254630088806152, 0.07343415170907974, -0.7013049721717834, -0.1831865906715393, 0.8602659702301025, -0.2650028169155121, -0.152545109391...
I was wondering if there's some sort of system event that gets fired every time a user changes the time in Windows. I know there's a way to enable this in Windows' EventLog, but I was looking for a way to respond to this event programatically (like using the Windows API). I'm not sure from your question if you're worki...
[ 0.20035918056964874, -0.14342078566551208, 0.052105531096458435, 0.09810405969619751, 0.13705478608608246, -0.11921165883541107, 0.3219357430934906, 0.269696444272995, -0.5638638138771057, -0.6151092648506165, -0.1048957109451294, 0.5019863247871399, -0.11418510228395462, 0.106317631900310...
How can I make that a site automagically show a nice "Currently Offline" page when the server is down (I mean, the full server is down and the request can't reach IIS) Changing the DNS manually is not an option. **Edit:** I'm looking to some kind of DNS trick to redirect to other server in case the main server is dow...
[ 0.3952994644641876, -0.10927177965641022, 0.6239426136016846, -0.03688249737024307, 0.16638769209384918, 0.028627511113882065, 0.4901384115219116, -0.09375515580177307, -0.4919544756412506, -0.5686101913452148, 0.17505425214767456, 0.31360939145088196, -0.035627685487270355, 0.383474647998...
take care of pinging your server. In the event of outage, DNS queries get directed to the secondary IP. An excellent option for a "warm spare" in small shops with limited DNS requirements. I've used them for 3 years with not a single minute of downtime. **EDIT:** This allows for geographically redundant failover, wh...
[ 0.2672751545906067, -0.21154819428920746, 0.3898044228553772, -0.12318316102027893, -0.060916684567928314, -0.20811861753463745, 0.5000534057617188, 0.2267272174358368, -0.5744858980178833, -0.7822392582893372, 0.03815735876560211, 0.6726709008216858, 0.07082655280828476, -0.11854016780853...
I have a UITabBarController, and each tab handles a different UIViewController that pushes on the stack new controllers as needed. In two of these tabs I need, when a specific controller is reached, the ability to rotate the iPhone and visualize a view in landscape mode. After struggling a lot I have found that it is m...
[ -0.14407679438591003, -0.05537774786353111, 0.9823607206344604, -0.0038928070571273565, -0.029838675633072853, 0.09640518575906754, 0.20242249965667725, -0.14703074097633362, -0.046212632209062576, -0.6056822538375854, 0.1014675498008728, 0.8002474308013916, -0.1880934089422226, 0.01331936...
not work: when the iPhone is rotated, the controller is put in landscape mode. I implemented shouldAutorotateToInterfaceOrientation as follows in the subclassed UITabBarController: ``` - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if([self selectedIndex] == 0 || [se...
[ -0.023219581693410873, -0.24944740533828735, 0.7823161482810974, -0.23338189721107483, 0.012467502616345882, 0.25791236758232117, 0.49638861417770386, -0.3361118733882904, 0.093595951795578, -0.5300475358963013, -0.16401232779026031, 0.7919472455978394, -0.6499970555305481, -0.090271636843...
if ([[self selectedViewController] isKindOfClass: [landscapeModeViewController class]]) return YES; } return NO; ``` } Also, I tried using the delegate method didSelectViewController, without success. Any help is greatly appreciated. Thank you. This worked for me: ``` - (BOOL)shouldAutorotateTo...
[ -0.21306493878364563, -0.2828824520111084, 0.5461828708648682, -0.15591615438461304, -0.19843736290931702, 0.02247927524149418, 0.32294270396232605, -0.36053332686424255, 0.03618485480546951, -0.8039072155952454, -0.19321192800998688, 0.5677484273910522, -0.08762369304895401, 0.05419034510...
What is the nicest way of splitting this: ``` tuple = ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') ``` into this: ``` tuples = [('a', 'b'), ('c', 'd'), ('e', 'f'), ('g', 'h')] ``` Assuming that the input always has an even number of values. `zip()` is your friend: ``` t = ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') zip...
[ -0.31886735558509827, 0.08744730800390244, 0.4513275623321533, -0.11340945959091187, 0.06357448548078537, 0.29515206813812256, 0.5132380127906799, -0.09322482347488403, -0.20105823874473572, -0.5632966160774231, -0.39947324991226196, 0.45607537031173706, -0.23526163399219513, -0.2074330896...
How do I access files on another device/machine over Bluetooth from the command line? There is [Bluetooth Command Line Tools](http://bluetoothinstaller.com/bct) suite for Windows. This suite of tools contains a **btftp** utility that allows you to exchanges files with remote Bluetooth devices.
[ 0.8170915842056274, 0.1375279575586319, 0.29551962018013, 0.226800799369812, 0.12094376236200333, -0.29517796635627747, 0.2086997628211975, -0.1170317530632019, -0.1283789724111557, -0.6611839532852173, -0.1513262242078781, 0.5172349214553833, 0.08549891412258148, 0.10042539983987808, 0....
The situation is as follows. ``` public interface IFoo { } public abstract class FooBase : IFoo { } ``` Now I need a collection of `IFoo` with some additional methods. ``` public class IFooCollection : List<IFoo> { public void UsefullMethod() { } } ``` The problem is that `IFooCollection` looks like an interf...
[ 0.136602520942688, 0.057586461305618286, 0.5191712379455566, -0.10976067930459976, -0.09897882491350174, -0.37143629789352417, 0.003520878730341792, 0.026255397126078606, -0.09357264637947083, -0.6186509728431702, -0.10299597680568695, 0.6843993663787842, -0.43043506145477295, 0.3483960330...
like this because this might not be true forever. 4. Don't create the class at all but provide extension methods for `IList<IFoo>` because there are only a hand full methods - I don't like this because changing the code because you cannot find a name for a class ... yes, that is nasty. 5. Something I did not think abou...
[ 0.5609702467918396, -0.01332852616906166, 0.2589167654514313, 0.09201610088348389, -0.2619178593158722, -0.47678035497665405, 0.4957985281944275, 0.23589785397052765, -0.13744530081748962, -0.7484394311904907, -0.0724504142999649, 0.46603748202323914, -0.2599046230316162, 0.405474811792373...
inside a GUI tool to put some data into a server. So I don't care about using the methods with other collections or overlooking the methods. I like `FooCollection` you have a collection of the conceptual object "Foo" even if there is not an actual `Foo` class or interface. This is in keeping with `IFoo` is an interface...
[ 0.26398101449012756, 0.014732715673744678, 0.2826099693775177, 0.24689404666423798, -0.27160489559173584, -0.2252766638994217, 0.005055359564721584, 0.15467503666877747, -0.2164391130208969, -0.6044291257858276, -0.017577750608325005, 0.7684855461120605, -0.19447703659534454, -0.0027259283...
I'm trying to write a new mode for emacs, using define-generic-mode. I've found a few tutorials which show how you can add keywords (as strings) which will then be highlighted. Is it possible to give define-generic-mode a regular expression so that it can then highlight anything that matches that as a keyword? I'd lik...
[ 0.3709539771080017, 0.008872385136783123, 0.4047558009624481, -0.045711662620306015, -0.27905669808387756, -0.07543835043907166, 0.20629224181175232, 0.20582084357738495, -0.3900553584098816, -0.2936418652534485, 0.11891034990549088, 0.2749658226966858, -0.3103035092353821, 0.0531291887164...
face with some attributes chosen as examples: ``` (make-face 'my-date-face) (set-face-attribute 'my-date-face nil :underline t) (set-face-attribute 'my-date-face nil :family "times") (set-face-attribute 'my-date-face nil :slant 'normal) (set-face-attribute 'my-date-face nil :height '340) (define-generic-mode my-date-...
[ -0.28715750575065613, 0.04342227429151535, 0.9722384810447693, -0.3697836101055145, -0.052108604460954666, 0.2690768241882324, 0.32823941111564636, -0.0018648537807166576, -0.04359464719891548, -0.5955813527107239, -0.2954336404800415, 0.7868719100952148, 0.07765093445777893, 0.15160199999...
**Sorry everyone. It appears that I am a dumbass! The query works fine when I run it against the live database versus my test database...gotta pay more attention to that stuff!** I am having a problem with the statement shown below. It works fine if I run it against one database (sans the DBCATALOG.dbo), so no problem...
[ 0.30781152844429016, 0.24819117784500122, 0.1606447547674179, -0.006742951925843954, -0.2940412163734436, -0.23922772705554962, 0.8501679301261902, 0.18653595447540283, -0.38468441367149353, -0.6692111492156982, -0.017441505566239357, 0.5388358235359192, -0.21311870217323303, 0.13143299520...
name 'TF7-User-Demo-ScheduledRestore-03.dbo.LinkedDocumentFolderTable', Invalid object name 'TF7-TestDatabase-ScheduledRestore.dbo.LinkedDocumentFolderTable', etc.). It seems to be tied to the .[dbo], but I just don’t know what causes the problem. I can’t find anything in the book stating a count can’t be performed acr...
[ 0.001232213107869029, 0.1908654272556305, 0.48497268557548523, 0.06401760131120682, -0.042248133569955826, -0.25940436124801636, 0.23341305553913116, -0.43846604228019714, -0.3441457152366638, -0.3378606140613556, -0.4233599901199341, 0.5379566550254822, -0.36274996399879456, 0.17665302753...
same server present at all?)
[ -0.05038036033511162, -0.008277148939669132, 0.3831537067890167, 0.1524624079465866, 0.08610424399375916, 0.17318613827228546, 0.3608092963695526, 0.19748954474925995, -0.5802129507064819, -0.1478726863861084, 0.049040209501981735, 0.17830371856689453, -0.24858349561691284, -0.058679677546...
I'd like to define an alias that runs the following two commands consecutively. ``` gnome-screensaver gnome-screensaver-command --lock ``` Right now I've added ``` alias lock='gnome-screensaver-command --lock' ``` to my .bashrc but since I lock my workstation so often it would be easier to just type one command....
[ 0.03759533911943436, -0.07734287530183792, 0.2462742030620575, -0.08382134139537811, -0.12480981647968292, 0.18911299109458923, 0.3298872113227844, -0.14629194140434265, -0.039969302713871, -0.6676939725875854, -0.016302431002259254, 1.118131160736084, -0.3647022545337677, -0.1231727376580...
When will a TCP packet be fragmented at the application layer? When a TCP packet is sent from an application, will the recipient at the application layer ever receive the packet in two or more packets? If so, what conditions cause the packet to be divided. It seems like a packet won't be fragmented until it reaches the...
[ -0.06030610203742981, -0.3362511098384857, 0.3556199371814728, 0.37701618671417236, 0.1866030991077423, -0.36975476145744324, -0.002026949543505907, -0.12393226474523544, -0.576207160949707, -0.7478967905044556, -0.04081644117832184, 0.21088482439517975, -0.05939047783613205, 0.49647524952...
split when it hits a network device with a lower MTU than the packet's size. Most ethernet devices are 1500, but it can often be smaller, like 1492 if that ethernet is going over PPPoE (DSL) because of the extra routing information, even lower if a second layer is added like Windows Internet Connection Sharing. And dia...
[ 0.5377035140991211, -0.576657235622406, 0.5219619274139404, 0.22413286566734314, -0.028201505541801453, -0.35250166058540344, -0.1057165265083313, -0.0893784686923027, -0.5941470861434937, -0.6370689272880554, -0.12065698206424713, 0.1273578405380249, -0.22488108277320862, 0.38442379236221...
and has no requirement to provide you with a 1:1 relationship to the physical packets sent or received (for example most stacks will hold messages until a certain period of time has expired, or there are enough messages to maximize the size of the IP packet for the given MTU) As an example if you sent two "packets" (c...
[ 0.2410089075565338, -0.26497575640678406, 0.42305701971054077, 0.0648171529173851, -0.18645767867565155, -0.5076503157615662, 0.07288964092731476, -0.13769030570983887, -0.35301682353019714, -0.5770984888076782, -0.1920567750930786, 0.13537390530109406, -0.12093683332204819, 0.156833052635...
some other header/footer mechansim) so that the receiving side can split the TCP stream back into individual messages, either when a message is received in two parts, or when several messages are received as a chunk.
[ 0.28195706009864807, -0.3498256206512451, 0.065457284450531, 0.2424328327178955, -0.2283918410539627, -0.06365984678268433, -0.05833183228969574, -0.21260622143745422, -0.3798108398914337, -0.34572041034698486, -0.29010018706321716, 0.05244501307606697, -0.3224438428878784, 0.2854690849781...
Does anyone know how to use the Google safe browsing API. I downloaded the entire the malware and phish update from the google safe browsing using the API key and tried comparing the hash of the suspicious site (md5\_file method in php) but it did not work. I also tried comparing the hash of the suspicious site's url ...
[ 0.5855560898780823, 0.11054211854934692, 0.3879915773868561, 0.38697686791419983, -0.12554773688316345, -0.5398345589637756, 0.5405241847038269, 0.04306203871965408, -0.24331723153591156, -0.43109357357025146, 0.25687435269355774, 0.685135543346405, -0.18715430796146393, 0.0074165784753859...
be necessary depending on what you are doing with the url.
[ 0.7579101324081421, 0.21764066815376282, 0.12369342893362045, 0.0566757507622242, -0.05795831233263016, -0.19016164541244507, 0.11803470551967621, 0.3138032555580139, 0.26742440462112427, -0.42870834469795227, -0.33067265152931213, 0.38424402475357056, 0.10553962737321854, -0.0753717720508...
From within an html page, I create a child window to perform some filtering (choosing the printer, and what parts to print on the report). In order to show the part selection on the child window, I need to call a GetParts function from the parent window and return the recordset to the child. Here's some code to help: ...
[ 0.009874943643808365, 0.1566070020198822, 0.821426272392273, -0.14007382094860077, -0.07348368316888809, 0.19171924889087677, 0.17085780203342438, -0.6008557081222534, -0.0446605384349823, -0.6383224725723267, 0.0490042008459568, 0.4098334312438965, -0.1582798808813095, 0.03588543459773064...
this way....didn't work either 'more code follows ``` In the Parent window -> ``` Function GetParts(oParts) Dim sql sql = "SELECT Job.Part_Number FROM Job RIGHT JOIN Packlist_Detail ON Packlist_Detail.Job = Job.Job "_ & "WHERE Packlist_Detail.Packlist LIKE '" & sPL & "'" CloseRS(oRS) oRS.Open sql, oConn, adOpe...
[ -0.08260657638311386, 0.15062005817890167, 0.8160847425460815, -0.17197540402412415, 0.0877716988325119, 0.10965566337108612, 0.13530118763446808, -0.5267589092254639, -0.09748820215463638, -0.4439969062805176, -0.415792316198349, 0.5168125033378601, -0.11332696676254272, 0.004489111714065...
a parameter I did not believe this to be necessary, but when it didn't work as expected I tried returning it this way....didn't work either End Function ``` I write reports for a software that requires me to create filter and report html pages that contain the crystal report object. The software for which I write the...
[ 0.2848816514015198, 0.3737677037715912, 0.4534212052822113, 0.06422530114650726, -0.2523494064807892, -0.061320655047893524, 0.24267975986003876, -0.24459688365459442, -0.21829649806022644, -0.542992115020752, 0.4978937804698944, 0.511157751083374, -0.3505386710166931, 0.2709757089614868, ...
So the question is, How do I get a value back in the child window? Tester101: Trying what you said gave an error in the parent function: Object required 'oParts' Seeing this I defined the oParts recordset in there: ``` Set oParts = CreateObject("ADODB.Recordset") oParts.Fields.Append "Part", adBSTR , 30 oParts.Open...
[ 0.29533082246780396, 0.19289909303188324, 0.2491636574268341, 0.2147931009531021, 0.12714622914791107, -0.16428932547569275, 0.22197997570037842, -0.17661911249160767, -0.15329678356647491, -0.6086955666542053, 0.19449831545352936, 0.626575767993927, 0.1410466879606247, 0.03255991265177727...
`Calendar.getInstance(TimeZone.getTimeZone("GMT+1")).get(Calendar.HOUR_OF_DAY)` is an hour "slow", (possibly because they does not detect the daylight saving +1 hour.) In J2SE, there are a lot of available time zones (Europe/Budapest too, and it works perfectly), but in J2ME there are only GTM and UTC. How can I get...
[ 0.06367074698209763, -0.32899147272109985, 0.567925214767456, 0.13871538639068604, 0.050636451691389084, -0.33281442523002625, 0.439780592918396, 0.12237977981567383, -0.24115082621574402, -0.7712796926498413, -0.17373540997505188, 0.42355790734291077, -0.133574977517128, -0.24105687439441...
I'm not sure how to resolve this error: *Procedure or Function 'sp\_executesql' expects parameter '@statement', which was not supplied.* for this query: ``` DECLARE @a INT DECLARE @b VARCHAR SET @a = 1 WHILE @a < 30 BEGIN set @b = @a exec sp_executesql update source_temp set pmt_90_day = pmt_90_day + convert(mo...
[ 0.434753954410553, -0.11530261486768723, 0.5034782886505127, 0.09683612734079361, 0.16253799200057983, 0.1309683918952942, 0.1205507442355156, -0.320396363735199, -0.36708301305770874, -0.35858210921287537, 0.16757453978061676, 0.6572403907775879, -0.19920414686203003, 0.025874081999063492...
I realize that similar questions have been asked about this before here on SO, but let me describe exactly what I need to do: I have a set of tests which run a command line java application and I'd like to add memory profiling to them. One option I see would be to add code (possibly using 3rd party tools/libraries) to...
[ 0.4660550057888031, 0.330208420753479, -0.10104186087846756, 0.10697231441736221, 0.16018302738666534, -0.24635803699493408, 0.1479872316122055, -0.17965079843997955, -0.1975027173757553, -0.5555568933486938, 0.24626216292381287, 0.5462669730186462, 0.060585297644138336, -0.039174903184175...
something like Valgrind but for Java. Also open source if at all possible. What I'd really like to do is set up the memory tests so that my memory usage is being monitored at regular intervals, let's say every second, and dumped to a text file. That way I'd be able to see if the memory usage oscillates/increases/decre...
[ 0.22675706446170807, -0.2738896310329437, -0.020157722756266594, 0.06464849412441254, -0.14234383404254913, -0.3385794758796692, 0.24022041261196136, 0.3612293004989624, -0.40145692229270935, -0.6192319393157959, 0.2050439566373825, 0.7759661674499512, -0.10620128363370895, -0.154982075095...
should be reading up on profilers and exactly what they can do for you. I also suggest reading up on JVMTI. The JVMTM Tool Interface (JVM TI) is a new native programming interface for use by tools. It provides both a way to inspect the state and to control the execution of applications running in the Java virtual mach...
[ 0.49968692660331726, -0.15928098559379578, 0.3428339958190918, -0.09566781669855118, -0.20047087967395782, -0.29305317997932434, 0.2633717656135559, -0.23059405386447906, -0.1642991453409195, -1.0311468839645386, 0.05641303211450577, 0.5491491556167603, -0.2826927602291107, 0.0341276302933...
Virtual Machine Debug Interface (JVMDI). JVMPI and JVMDI will be removed in the next major release of J2SETM.
[ -0.1359684020280838, -0.19995954632759094, 0.4337780475616455, 0.14632642269134521, -0.17356747388839722, -0.24030697345733643, 0.4536118805408478, 0.17322272062301636, -0.22380976378917694, -0.6898120641708374, -0.36878105998039246, 0.34759920835494995, -0.3555179834365845, 0.365495085716...
Something like ``` Rails.cache.delete('site_search_form') ``` doesn't seem to work. Is this possible? Thanks. Cache fragment entries are created with a slightly different key than what you access with Rails.cache. Use `expire_fragment` instead (you can send it to a controller): [http://api.rubyonrails.org/classes/...
[ 0.025824597105383873, -0.29934266209602356, 0.19043955206871033, 0.27947789430618286, -0.1170649528503418, -0.1371614784002304, 0.3782796263694763, -0.34032967686653137, -0.5276191234588623, -0.5590499639511108, -0.3135840594768524, 0.15606488287448883, -0.35596176981925964, 0.386735767126...
I have a script that uses PHPMailer to send out an email. The email is sent with a direct SMTP connection to a remote mail server. The problem is that while everything seems to be okay when I run the script on my local machine, when the script is run on our live site using the same remote SMTP server the email never ge...
[ 0.4897637367248535, 0.2861717939376831, 0.12691685557365417, -0.04502356797456741, -0.1181596890091896, 0.013678406365215778, 0.6767811179161072, 0.41663292050361633, 0.008997906930744648, -0.6487634181976318, 0.2471933364868164, 0.22141306102275848, -0.2407342791557312, 0.1574406176805496...
have access to the SMTP server in question so I can't check its log files without submitting a support ticket, and although I was just given sudo access to the web server that is sending the email, I'm not quite sure what I'm looking for in terms of logfiles to go through, etc. FWIW, my local machine is running Ubuntu...
[ 0.3051670789718628, 0.10466247797012329, 0.3553599417209625, 0.07361627370119095, -0.09743046760559082, -0.39620572328567505, 0.4503357410430908, 0.24283675849437714, -0.31657564640045166, -0.4778309464454651, -0.10267392545938492, 0.1654498279094696, -0.11810531467199326, 0.29865893721580...
be looking for problems. How about you log into your live site, try to open a raw session to the remote SMTP server, and attempt to send email using raw SMTP commands? Doing so will help narrow down the possible causes of the problem.
[ 0.518672525882721, -0.19970108568668365, 0.022536074742674828, 0.32518866658210754, 0.10562164336442947, -0.39256682991981506, 0.5334550738334656, 0.194369375705719, -0.11420903354883194, -0.6630746126174927, -0.1489214450120926, 0.37033748626708984, -0.22903360426425934, -0.23782934248447...
A consultant employed by my client has asked for an export of the the first n rows (approx 30 or 40) of all the tables in one of our SQL Server 2000 databases in csv format, including column names on the first row. The database has about 100 tables so I don't want to do this manually. Can anyone recommend a script, t...
[ 0.0939723402261734, 0.2434379756450653, 0.03174580633640289, -0.001890220446512103, -0.07113375514745712, 0.18294760584831238, -0.026885682716965675, 0.1011047214269638, -0.4514768719673157, -0.8545755743980408, -0.0022642971016466618, 0.4768073856830597, -0.21252095699310303, -0.007721384...
In the various smartphone APIs/SDKs, I was wondering if it is possible to prompt a user if they'd like to log a phone call after they hang up. The most basic functionality would be after calling out or receiving a call, the phone would ask Do you want to log the call to|from 555-555-5555? Yes | No | Never this numb...
[ 0.41036170721054077, 0.12961071729660034, 0.4211331605911255, 0.012873178347945213, 0.41635048389434814, 0.03548577427864075, 0.0017407010309398174, -0.0204609502106905, -0.20603865385055542, -0.42998093366622925, 0.14768357574939728, 0.8861230611801147, -0.2904324233531952, -0.12429732829...
iPhone's Call log with the iPhone SDK](https://stackoverflow.com/questions/341622/accessing-the-iphones-call-log-with-the-iphone-sdk). On an Android phone you can register a [PhoneStateListener](http://developer.android.com/reference/android/telephony/PhoneStateListener.html) to receive a notification of when a call ha...
[ -0.05265621468424797, 0.17119306325912476, 0.4670516550540924, -0.07498274743556976, 0.37807512283325195, 0.16517134010791779, 0.3311845660209656, -0.05526318401098251, -0.5024920701980591, -0.17943459749221802, -0.37631282210350037, 0.6733083128929138, -0.3527747690677643, -0.197137922048...
Following on from this question... ["how do you tell the visual studio project type from an existing visual studio project"](https://stackoverflow.com/questions/660790/how-do-you-tell-the-visual-studio-project-type-from-an-existing-visual-studio-pro) How do i add project guids into my csproj file to enable me to add ...
[ 0.5947511196136475, 0.05708720162510872, 0.07280497252941132, 0.04366680979728699, -0.17901654541492462, -0.06549611687660217, 0.0015107756480574608, -0.08015171438455582, -0.2569601833820343, -0.503527045249939, -0.040812429040670395, 0.45188483595848083, -0.11072210967540741, -0.11393106...
2 things you cannot do in C# that you can do in C++. * You cannot use C#, or any other .Net language, to write a component for a system that only accepts native components * You cannot use C#, or any other .Net language, to alter certain properties of a CCW for which the CLR does not allow customization The most not...
[ 0.334138959646225, 0.17928440868854523, -0.03367597237229347, 0.2438298463821411, -0.10676541924476624, -0.3923066556453705, 0.07381878048181534, 0.22519078850746155, -0.4985753893852234, -0.4442579746246338, 0.08821979910135269, 0.7676306962966919, -0.40863943099975586, 0.1973104476928711...
is in C++. There are just a lot of cases where you simply don't want to and a native solution is better. It's possible for instance to manage and manipulate memory in C# via unsafe code or IntPtr. It's just not nearly as easy and generally there's no reason.
[ -0.06521455943584442, 0.07604093849658966, 0.023747777566313744, 0.16324906051158905, 0.10351995378732681, -0.2109977900981903, 0.1915857046842575, 0.14204087853431702, -0.10072778910398483, -0.40380603075027466, -0.07652522623538971, 0.5991982221603394, -0.12457531690597534, -0.1861361116...
I was hoping someone could help with a MS Word Macro. Basically, I have a MS Word document which lists out several text files and specific pages of interest in each file. The file format is similar to: ``` textdocument1.txt P. 6, 12 - issue1 textdocument2.txt P. 5 - issue1
[ 0.28078219294548035, 0.17102712392807007, 0.47329312562942505, -0.0022249091416597366, 0.2951570153236389, 0.022427793592214584, -0.22618503868579865, 0.22044439613819122, -0.10843614488840103, -0.6925656795501709, -0.10151131451129913, 0.4704296290874481, -0.10057568550109863, 0.024119643...
P. 13, 17 - issue3 textdocument3.txt P. 10 ``` I want to read each line into my Macro as a string. Then traverse through it to identify the file name. With the file name, I can then open the file, go to the page number, and copy the data I need. But I'm stuck at step 1, how do I capture the line into a...
[ 0.16366015374660492, 0.06774474680423737, 0.7024435997009277, -0.02416345663368702, 0.004838158842176199, 0.18643444776535034, 0.15952497720718384, -0.1008022204041481, -0.3318101763725281, -0.5654860138893127, -0.36266863346099854, 0.3385592997074127, -0.44327470660209656, 0.0918553173542...
Dim lineText As String For Each singleLine In ActiveDocument.Paragraphs lineText = singleLine.Range.Text '// parse the text here... Next singleLine End Sub ``` I found the basic algorithm in [this article](http://visualbasic.ittoolbox.com/groups/technical-functional/vb-vba-l/vba-to-read-lin...
[ 0.004654792603105307, -0.3425321578979492, 0.7849172949790955, -0.3283776342868805, -0.23852774500846863, 0.09817282855510712, 0.3474527597427368, -0.4498435854911804, 0.02639954537153244, -0.2783448100090027, -0.27652233839035034, 0.5102713704109192, -0.4152722656726837, -0.17487666010856...
I got an entity called Proveedor on my Data Context. A property called Proveedors is generated for the Data Context to represent a collection of Proveedor. I rename it to Proveedores which is the correct spelling in Spanish. But as soon as I do anything on the model (not related to the Proveedor Entity) and rebuild it ...
[ 0.25543999671936035, 0.18422001600265503, 0.11993854492902756, 0.3535964787006378, -0.10385441035032272, -0.2583823800086975, -0.13077983260154724, 0.06743224710226059, -0.07343901693820953, -0.10777002573013306, 0.2482002079486847, 0.38852983713150024, 0.19691795110702515, 0.1492466032505...
the class files will be overwritten. Changing the pluralization rules would have to be done by changing the code generation, but I do not know if this is possible. --- You can change the generated name by right-clicking the table in the dbml designer window and selecting properties. There is a field called 'name' wi...
[ 0.3409367501735687, -0.08233579993247986, 0.11181621253490448, 0.2797386348247528, -0.14457499980926514, -0.15509957075119019, 0.20641279220581055, 0.01269817166030407, -0.13990649580955505, -0.7824221253395081, -0.05706695467233658, 0.5077250599861145, -0.35204219818115234, 0.336985319852...