text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
that has the key to decrypt phone nos. This app's interface would have maybe one function taking an encrypted no and the message to send. Keep this app simple, and test and audit the snot out of it. Either hide it from the outside world, or use authentication to prove the request really came from your main app, or both... | [
0.2193513959646225,
-0.08261097222566605,
0.022920796647667885,
0.4082202911376953,
-0.011719580739736557,
-0.18240326642990112,
0.3270582854747772,
-0.14643973112106323,
-0.17748363316059113,
-0.2740384042263031,
-0.28800511360168457,
0.5523271560668945,
-0.07331900298595428,
0.1359276622... | |
above is just one example.
Note that phone nos would generally need to be padded with random data before encryption (like salting a hashed password). Otherwise it's possible to answer the question "is the encrypted phone number X?", without knowing the private key. That may not be a problem from the POV of spammers st... | [
0.3375951945781708,
-0.06496915966272354,
-0.024440089240670204,
0.30277901887893677,
0.024365071207284927,
-0.4032149612903595,
0.3236651122570038,
0.09765439480543137,
-0.6173804402351379,
-0.3616189956665039,
-0.21743987500667572,
0.47100287675857544,
-0.13610193133354187,
0.26121258735... | |
massively for a given user.
Sorry this doesn't directly answer your question: I don't know whether there's a PHP framework which will help implement privilege separation.
[Edit to add: in fact, it occurs to me that under the heading of 'keep the privileged app simple', you might not want to use a framework at all. It... | [
0.38821539282798767,
0.08246531337499619,
0.07564238458871841,
0.2772066295146942,
0.03745843470096588,
-0.3162551522254944,
0.44499364495277405,
0.22076448798179626,
-0.6045793294906616,
-0.27531343698501587,
-0.04824858903884888,
0.6764018535614014,
-0.33828791975975037,
-0.0148722296580... | |
a huge over-simplification.] | [
0.19387726485729218,
0.32995375990867615,
-0.059771981090307236,
0.13545064628124237,
0.19405165314674377,
0.1906038522720337,
0.14950034022331238,
0.0229109488427639,
-0.09739789366722107,
-0.31221964955329895,
0.26059335470199585,
0.20882034301757812,
-0.040970511734485626,
0.21964310109... | |
I'm just getting started with Custom User Controls in C# and I'm wondering if there are any examples out there of how to write one which accepts nested tags?
For example, when you create an `asp:repeater` you can add a nested tag for `itemtemplate`.
I wrote a [blog post](https://robertwray.co.uk/blog/describing-asp-ne... | [
0.22922278940677643,
-0.26091524958610535,
0.3006964325904846,
0.23605668544769287,
0.07735129445791245,
0.02973666414618492,
0.02777484804391861,
-0.28846341371536255,
-0.3639599084854126,
-0.43625882267951965,
-0.2101762592792511,
0.3996623158454895,
-0.33046403527259827,
-0.039704110473... | |
INamingContainer
{
private Control1ChildrenCollection _children;
[PersistenceMode(PersistenceMode.InnerProperty)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public Control1ChildrenCollection Children
{
get
{
if (_children == null)
... | [
-0.1736404299736023,
-0.42067891359329224,
0.14458338916301727,
0.14444312453269958,
0.34695348143577576,
0.3875938951969147,
0.5497332811355591,
-0.054743725806474686,
-0.05449581518769264,
-0.5895004868507385,
-0.22516922652721405,
0.33956748247146606,
-0.39387285709381104,
0.51670730113... | |
return _children;
}
}
}
public class Control1ChildrenCollection : List<Control1Child>
{
}
public class Control1Child
{
public int IntegerProperty { get; set; }
}
``` | [
-0.0024328860454261303,
-0.07457101345062256,
0.1631782054901123,
0.26613345742225647,
0.22552910447120667,
0.12365083396434784,
0.15198300778865814,
-0.1755242943763733,
-0.1914408802986145,
-0.5186498761177063,
-0.37772801518440247,
0.4704815745353699,
-0.3064519762992859,
0.428214818239... | |
I'm trying to create an Extension Method for MVC's htmlHelper.
The purpose is to enable or disable an ActionLink based on the AuthorizeAttribute set on the controller/action.
Borrowing from the [MVCSitemap](http://blog.maartenballiauw.be/post/2008/08/29/Building-an-ASPNET-MVC-sitemap-provider-with-security-trimming.asp... | [
-0.13743175566196442,
0.08790583908557892,
0.31065377593040466,
-0.3633503019809723,
-0.01941499300301075,
0.1337442547082901,
0.4028482735157013,
-0.40959295630455017,
-0.4274776875972748,
-0.4272630214691162,
-0.19988571107387543,
0.4760485887527466,
-0.5735859870910645,
0.02941819280385... | |
{
//simplified for brevity
if (IsAccessibleToUser(action, controller))
{
return htmlHelper.ActionLink(linkText, action,controller);
}
else
{
return String.Format("<span>{0}</span>",linkText);
} | [
-0.08168991655111313,
-0.689467191696167,
0.8285415172576904,
0.0053571490570902824,
-0.21270188689231873,
0.17082807421684265,
0.185047447681427,
-0.40816637873649597,
-0.4399140775203705,
-0.6547548174858093,
-0.037627849727869034,
0.4022497832775116,
-0.4065254330635071,
-0.350237756967... | |
}
public static bool IsAccessibleToUser(string action, string controller)
{
HttpContext context = HttpContext.Current;
MvcHandler handler = context.Handler as MvcHandler;
IController verifyController =
ControllerBuilder
.Current
.GetCon... | [
-0.27179378271102905,
-0.4105793237686157,
0.7333983778953552,
0.037055276334285736,
0.22688375413417816,
0.19952736794948578,
0.6420814394950867,
-0.37655654549598694,
-0.15137672424316406,
-0.47647902369499207,
-0.2797757089138031,
0.6837180256843567,
-0.5382564067840576,
0.2536273300647... | |
.CreateController(handler.RequestContext, controller);
object[] controllerAttributes = verifyController.GetType().GetCustomAttributes(typeof(AuthorizeAttribute), true);
object[] actionAttributes = verifyController.GetType().GetMethod(action).GetCustomAttributes(typeof(AuthorizeAttribute), true);
... | [
-0.07740334421396255,
-0.39904874563217163,
0.5691973567008972,
0.2996068298816681,
0.11732105910778046,
0.0075850957073271275,
0.6344599723815918,
-0.5729289054870605,
-0.07277465611696243,
-0.4964781105518341,
-0.3103744089603424,
0.47463998198509216,
-0.34467026591300964,
0.149595499038... | |
if (controllerAttributes.Length > 0)
{
AuthorizeAttribute attribute = controllerAttributes[0] as AuthorizeAttribute;
roles += attribute.Roles;
users += attribute.Users;
}
if (actionAttributes.Length > 0)
{ | [
-0.339214026927948,
-0.7903844118118286,
0.5348185300827026,
0.00045065159793011844,
0.15142285823822021,
0.14088089764118195,
0.1770535558462143,
-0.4816001057624817,
-0.2995784282684326,
-0.26112601161003113,
-0.32228776812553406,
0.5177913904190063,
-0.38304784893989563,
-0.235363781452... | |
AuthorizeAttribute attribute = actionAttributes[0] as AuthorizeAttribute;
roles += attribute.Roles;
users += attribute.Users;
}
if (string.IsNullOrEmpty(roles) && string.IsNullOrEmpty(users) && principal.Identity.IsAuthenticated)
return true;
string[] roleAr... | [
-0.2788061201572418,
-0.4596095085144043,
0.5051904916763306,
-0.243143230676651,
0.3640363812446594,
0.29588010907173157,
0.5585821270942688,
-0.6242959499359131,
-0.04400399327278137,
-0.2940020263195038,
-0.2175847887992859,
0.6144540905952454,
-0.22904694080352783,
-0.08783922344446182... | |
in roleArray)
{
if (role != "*" && !principal.IsInRole(role)) return false;
}
foreach (string user in usersArray)
{
if (user != "*" && (principal.Identity.Name == "" || principal.Identity.Name != user)) return false;
}
return true; | [
-0.47494328022003174,
-0.425246924161911,
0.40608200430870056,
-0.2783418297767639,
0.1741511970758438,
0.3350309431552887,
0.4457092881202698,
-0.3763503134250641,
0.12725330889225006,
-0.3162040710449219,
-0.19082874059677124,
0.5389273166656494,
-0.19747838377952576,
0.3036869764328003,... | |
}
}
```
Here is the working code:
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Principal;
using System.Web.Routing;
using System.Web.Mvc;
using System.Collections;
using System.Reflection;
namespace System.Web.Mvc.Html
{
public static class HtmlHe... | [
-0.13514918088912964,
-0.01721198856830597,
0.5965907573699951,
0.01673206128180027,
0.37084656953811646,
0.05888830125331879,
0.3506493866443634,
-0.3945123553276062,
-0.1295732855796814,
-0.44635894894599915,
-0.4456189274787903,
0.6069769263267517,
-0.31358277797698975,
0.15037062764167... | |
false);
}
public static string SecurityTrimmedActionLink(this HtmlHelper htmlHelper, string linkText, string action, string controller, bool showDisabled)
{
if (IsAccessibleToUser(action, controller))
{
return htmlHelper.ActionLink(linkText, action, contro... | [
-0.04780199006199837,
-0.3502984344959259,
0.5303840637207031,
-0.22275058925151825,
0.14601516723632812,
-0.050427600741386414,
0.6033762693405151,
-0.3875901699066162,
0.068588487803936,
-0.4067196249961853,
-0.3866179883480072,
0.546605110168457,
-0.4578956663608551,
-0.0985685810446739... | |
else
{
return showDisabled ? String.Format("<span>{0}</span>", linkText) : "";
}
}
public static bool IsAccessibleToUser(string actionAuthorize, string controllerAuthorize)
{
Assembly assembly = Assembly.GetExecutingAssembly(); | [
0.13365201652050018,
-0.4095858931541443,
0.3743542432785034,
-0.21595720946788788,
0.3228965401649475,
-0.05940213426947594,
0.35092028975486755,
-0.36475855112075806,
0.00787482038140297,
-0.21088534593582153,
-0.3859558701515198,
0.7031009793281555,
-0.5732916593551636,
0.19410626590251... | |
GetControllerType(controllerAuthorize);
Type controllerType = GetControllerType(controllerAuthorize);
var controller = (IController)Activator.CreateInstance(controllerType);
ArrayList controllerAttributes = new ArrayList(controller.GetType().GetCustomAttributes(typeof(AuthorizeAttrib... | [
-0.27446436882019043,
-0.6507872343063354,
0.9090691208839417,
0.12913939356803894,
0.03808257356286049,
0.13384971022605896,
0.26718202233314514,
-0.6903403997421265,
-0.5208277106285095,
-0.28758883476257324,
-0.36393511295318604,
0.4991712272167206,
-0.5469793677330017,
0.21349960565567... | |
(MethodInfo method in methods)
{
object[] attributes = method.GetCustomAttributes(typeof(ActionNameAttribute), true);
if ((attributes.Length == 0 && method.Name == actionAuthorize) || (attributes.Length > 0 && ((ActionNameAttribute)attributes[0]).Name == actionAuthorize))
... | [
-0.182572603225708,
-0.3273102641105652,
0.5112453699111938,
0.010986413806676865,
0.20541350543498993,
0.13709129393100739,
0.3782707750797272,
-0.588405191898346,
-0.16080161929130554,
-0.08753781020641327,
-0.3965817391872406,
0.6824650764465332,
-0.2733844518661499,
-0.1462672054767608... | |
actionAttributes.AddRange(method.GetCustomAttributes(typeof(AuthorizeAttribute), true));
}
}
if (controllerAttributes.Count == 0 && actionAttributes.Count == 0)
return true;
IPrincipal principal = HttpContext.Current.User;
string roles = "... | [
-0.5051495432853699,
-0.8184618353843689,
0.8414455652236938,
0.08281037956476212,
0.14742906391620636,
0.06873490661382675,
0.3520123064517975,
-0.23426012694835663,
-0.3129779100418091,
-0.32415321469306946,
-0.2242726981639862,
0.6512889862060547,
-0.42739540338516235,
0.067731767892837... | |
string users = "";
if (controllerAttributes.Count > 0)
{
AuthorizeAttribute attribute = controllerAttributes[0] as AuthorizeAttribute;
roles += attribute.Roles;
users += attribute.Users; | [
-0.3842776417732239,
-0.5388574600219727,
0.6062193512916565,
-0.03161716088652611,
0.17863938212394714,
0.11938164383172989,
0.08694884926080704,
-0.29607832431793213,
-0.17240113019943237,
-0.4408956468105316,
-0.30909815430641174,
0.38013505935668945,
-0.4990195035934448,
0.183983653783... | |
}
if (actionAttributes.Count > 0)
{
AuthorizeAttribute attribute = actionAttributes[0] as AuthorizeAttribute;
roles += attribute.Roles;
users += attribute.Users; | [
-0.18877220153808594,
-0.45833051204681396,
0.5152183175086975,
-0.22632688283920288,
0.20781558752059937,
0.24831601977348328,
0.23106324672698975,
-0.48159587383270264,
-0.14028604328632355,
-0.4043806791305542,
-0.38255566358566284,
0.5820388197898865,
-0.4142416715621948,
-0.2256847321... | |
}
if (string.IsNullOrEmpty(roles) && string.IsNullOrEmpty(users) && principal.Identity.IsAuthenticated)
return true;
string[] roleArray = roles.Split(',');
string[] usersArray = users.Split(',');
foreach (string role in roleArray)
{ | [
-0.19545350968837738,
-0.48995235562324524,
0.33980345726013184,
-0.2279796302318573,
0.5260931253433228,
0.3362268805503845,
0.51023930311203,
-0.4570161998271942,
0.1443113386631012,
-0.1813577562570572,
-0.1575421690940857,
0.7117300629615784,
-0.1494757980108261,
0.026288017630577087,
... | |
if (role == "*" || principal.IsInRole(role))
return true;
}
foreach (string user in usersArray)
{
if (user == "*" && (principal.Identity.Name | [
-0.4429989159107208,
-0.45104894042015076,
0.2848237454891205,
-0.12340512871742249,
0.48886770009994507,
0.08415746688842773,
0.46248045563697815,
-0.24399638175964355,
0.17961840331554413,
-0.16238698363304138,
-0.06742874532938004,
0.6397215127944946,
-0.07031005620956421,
0.31309777498... | |
== user))
return true;
}
return false;
}
public static Type GetControllerType(string controllerName)
{
Assembly assembly = Assembly.GetExecutingAssembly(); | [
0.07472497969865799,
-0.45496365427970886,
0.5481635928153992,
-0.031339067965745926,
0.26146072149276733,
-0.14466799795627594,
0.23923905193805695,
-0.3211152255535126,
-0.02165461704134941,
-0.26028531789779663,
-0.5191076397895813,
0.5985499620437622,
-0.6301574110984802,
0.57941228151... | |
foreach (Type type in assembly.GetTypes())
{
if (type.BaseType.Name == "Controller" && (type.Name.ToUpper() == (controllerName.ToUpper() + "Controller".ToUpper())))
{
return type;
} | [
-0.14929631352424622,
-0.013402508571743965,
0.6343919038772583,
-0.2939967215061188,
0.4075374901294708,
0.1961403638124466,
0.12745630741119385,
-0.5325166583061218,
0.019416948780417442,
-0.4087713360786438,
-0.5500032305717468,
0.2744182050228119,
-0.3133164644241333,
0.292995393276214... | |
}
return null;
}
}
}
```
I don't like using reflection, but I can't get to the ControllerTypeCache. | [
0.1333116888999939,
0.29799771308898926,
0.14529986679553986,
-0.20228534936904907,
-0.21986697614192963,
-0.38050827383995056,
0.3428603410720825,
-0.019453221932053566,
0.27125775814056396,
-0.6753644943237305,
0.21048855781555176,
0.43676039576530457,
-0.37796124815940857,
0.26941773295... | |
I know there are emulators, but is this good enough? If someone is serious about iPhone development, do they absolutely need an iPhone?
Just my personal opinion: if you're serious it means that you're committed to quality of your product. If you're committed to quality there is no way to deliver a product without actua... | [
0.5360132455825806,
0.3669030964374542,
0.20925374329090118,
0.16258463263511658,
0.35751989483833313,
0.09343717247247696,
0.2001393735408783,
0.38741981983184814,
-0.07057362049818039,
-0.3315717279911041,
0.12553857266902924,
0.8051956295967102,
-0.11073534190654755,
-0.3146772980690002... | |
How do I get the modified date/time of a file in Python?
```
os.path.getmtime(filepath)
```
or
```
os.stat(filepath).st_mtime
``` | [
0.3818131685256958,
-0.08595061302185059,
0.29005107283592224,
0.003052627667784691,
0.3346557021141052,
-0.09603140503168106,
0.21610009670257568,
0.019915105774998665,
-0.23352377116680145,
-0.5411311388015747,
-0.08017737418413162,
0.3455069959163666,
0.029924301430583,
0.15801425278186... | |
How do I go about making an image or section of the page full screen on the iPhone?
I have an image that is 480 x 320 and I want to pull that up full screen on the iPhone but it has to be within a webpage so that I can make the image a link back to the previous page.
Currently if I drop the image on a blank page and ... | [
0.335656076669693,
-0.016431668773293495,
0.4836631119251251,
-0.09741633385419846,
-0.116016685962677,
0.213042214512825,
0.3527069389820099,
-0.29790937900543213,
-0.5107418298721313,
-0.6453092098236084,
0.43159544467926025,
0.7812809348106384,
-0.24439673125743866,
-0.09036076813936234... | |
render the page at the right size. For more information, see this link:
[Apple iPhone Safari Documentation](http://developer.apple.com/DOCUMENTATION/AppleApplications/Reference/SafariWebContent/UsingtheViewport/chapter_4_section_5.html) | [
-0.30532845854759216,
0.22605562210083008,
0.3010561466217041,
-0.2854967713356018,
-0.0375201590359211,
0.5977802872657776,
0.4452401399612427,
-0.07758834213018417,
-0.5258641839027405,
-0.5408722758293152,
-0.34440532326698303,
0.36009442806243896,
-0.19234991073608398,
-0.3450823128223... | |
What is the best way to divide a 32 bit integer into four (unsigned) chars in C#.
Quick'n'dirty:
```csharp
int value = 0x48454C4F;
Console.WriteLine(Encoding.ASCII.GetString(
BitConverter.GetBytes(value).Reverse().ToArray()
));
```
Converting the int to bytes, reversing the byte-array for the correct order and the... | [
0.1664089411497116,
-0.09384933859109879,
0.23805242776870728,
-0.0815771073102951,
-0.041125282645225525,
0.24806976318359375,
0.1176418885588646,
-0.2920719385147095,
-0.3425999879837036,
-0.3838523030281067,
0.028757726773619652,
0.3838624656200409,
-0.3823731243610382,
0.07264610379934... | |
I'm running VS2008 and have used [SystemParametersInfo](http://msdn2.microsoft.com/en-us/library/ms724947.aspx) to activate "Focus Follows Mouse" and "Do not Raise On Focus." Sadly though, VS2008 (with and without SP1) doesn't honour the "Do not Raise" part and eagerly pushes into the foreground every time the pointer ... | [
0.24314571917057037,
-0.22514408826828003,
0.7780670523643494,
-0.1001044362783432,
-0.33659741282463074,
-0.2734462022781372,
0.3668932616710663,
-0.12968823313713074,
-0.4549437165260315,
-0.5713251233100891,
0.05912096053361893,
0.6917063593864441,
-0.10829711705446243,
-0.2108819782733... | |
might not like the copy-and-past behaviour it introduces, though, and also pop-up windows usually don't appear in visual studio (use alt-tab to find them). | [
0.301762193441391,
0.0463719479739666,
0.4051770269870758,
0.09346149861812592,
-0.003938622772693634,
-0.34662947058677673,
0.2596936523914337,
0.398478239774704,
-0.2433626502752304,
-0.4857381582260132,
-0.2202414572238922,
0.47967174649238586,
0.016304627060890198,
0.1328691840171814,
... | |
I have a legacy application that is written in C# and it displays a very complex treeview with 10 to 20 thousand elements.
In the past I encountered a similar problem (but in C++) that i solved with the OWNERDATA capability offered by the Win32 API.
Is there a similar mechanism in C#?
EDIT: The plan is to optimize t... | [
0.11102782189846039,
0.05925869569182396,
0.23138312995433807,
-0.011150273494422436,
-0.002780464245006442,
0.09682700783014297,
0.24168719351291656,
-0.1921323984861374,
-0.4932467043399811,
-0.6635261178016663,
0.19412828981876373,
0.13327211141586304,
-0.14765581488609314,
0.1385950148... | |
one time.
Joshl: We are actually doing exactly what you suggest already, but we still need more efficiency.
I don't believe the .NET TreeView supports what you want, although this type of model is supported by .NET's DataGridView (see DataGridView's [VirtualMode](http://msdn.microsoft.com/en-us/library/system.windows.f... | [
0.3836286962032318,
-0.3668382465839386,
0.2071114182472229,
0.16522172093391418,
-0.012204855680465698,
-0.04497336223721504,
0.12953171133995056,
-0.006388262379914522,
-0.2689255177974701,
-0.7903061509132385,
0.0875200554728508,
0.5202286243438721,
-0.20912331342697144,
0.0025645117275... | |
are expanded. Outside of that, you might want to check out some of the third party vendors, like [this one (Divelements SandGrid)](http://www.divelements.co.uk/net/controls/sandgrid/), that might (emphasis on might) support your desired mode of operation.
NOTE: The SandGrid is not supported by Divelements as of the en... | [
0.34530577063560486,
-0.1615680754184723,
0.5995264649391174,
-0.12465658038854599,
0.009199434891343117,
-0.3653959035873413,
0.0645141527056694,
0.1017051562666893,
-0.4052696228027344,
-0.44500434398651123,
-0.11324527114629745,
0.5041899681091309,
0.08149924129247665,
0.027196597307920... | |
Are there any good webservices out there that provide good lookup information for Countries and States/Provinces?
If so what ones do you use?
If you only need US information, the US Postal Service provides a set of web services it calls WebTools for this exact thing. <https://www.usps.com/business/web-tools-apis/welco... | [
0.4440562129020691,
-0.026034310460090637,
0.3643142282962799,
0.3672647476196289,
0.11001882702112198,
0.0035605356097221375,
-0.16381999850273132,
-0.4007841944694519,
-0.6415016651153564,
-0.687772274017334,
0.033617377281188965,
0.04195774719119072,
-0.27006301283836365,
-0.24168881773... | |
ID="0">
<Address2>6406 IVY LN</Address2>
<City>GREENBELT</City>
<State>MD</State>
<Zip5>20770</Zip5>
<Zip4>1441</Zip4>
</Address>
</AddressValidateResponse>
```
Here's a link to the technical documentation:
<https://www.usps.com/business/web-tools-apis/documentation-... | [
0.185153067111969,
-0.1754051148891449,
0.4639749228954315,
0.3558619022369385,
0.37274664640426636,
-0.3214852511882782,
-0.1883748471736908,
-0.45291927456855774,
-0.24431189894676208,
-0.8455457091331482,
-0.08321796357631683,
0.09866011142730713,
-0.27900663018226624,
0.019322395324707... | |
I'd like to be able to determine if a directory such as a '.app' is considered to be a package or bundle from Finder's point of view on the command line. I don't think this would be difficult to do with a small shell program, but I'd rather not re-invent the wheel if I don't have to.
Update:
-------
On all systems wit... | [
0.13147912919521332,
-0.24170464277267456,
0.6013128757476807,
0.010664100758731365,
-0.18313322961330414,
-0.30551546812057495,
-0.004130790941417217,
-0.2577972412109375,
-0.3009962737560272,
-0.569216787815094,
-0.2944093346595764,
0.7413253784179688,
-0.4120846092700958,
-0.07207265496... | |
"com.apple.bundle",
"public.directory",
"public.item",
"com.apple.package"
)
```
Whenever you see `com.apple.package` there, it is supposed to be displayed as a package by Finder. Of course, everything with "bundle" in the name implies that already but not all packages are bundles (bundles are a specific ... | [
0.3769325017929077,
-0.2508692443370819,
0.4694695472717285,
0.01160736009478569,
-0.031378909945487976,
-0.09152951091527939,
0.003259183606132865,
-0.43840909004211426,
-0.6087291836738586,
-0.43162548542022705,
-0.5489072799682617,
0.23744794726371765,
-0.524136483669281,
0.072692893445... | |
package.
E.g.
```
claim id: 806354944
name: Bundle
role: none
flags: apple-internal relative-icon-path package | [
-0.23075871169567108,
-0.00031231684261001647,
0.060534004122018814,
-0.05075535550713539,
0.1898484081029892,
0.028097545728087425,
0.21725933253765106,
-0.1632508486509323,
-0.20704811811447144,
-0.23938146233558655,
-0.6045686602592468,
0.550609290599823,
-0.19081906974315643,
-0.188795... | |
icon: Contents/Resources/KEXT.icns
bindings: .bundle
--------------------------------------------------------
claim id: 1276116992
name: Plug-in
role: none | [
-0.3637300431728363,
-0.10670910775661469,
0.19406533241271973,
0.5094072222709656,
0.445279598236084,
0.35647594928741455,
-0.08264374732971191,
0.11090675741434097,
-0.20587477087974548,
-0.45378345251083374,
-0.5003382563591003,
0.458993136882782,
0.040333427488803864,
0.091296061873435... | |
flags: apple-internal relative-icon-path package
icon: Contents/Resources/KEXT.icns
bindings: .plugin
```
Compare this to a file that is no bundle
```
claim id: 2484731904 | [
-0.001580932759679854,
0.0319577120244503,
0.12606552243232727,
0.09586718678474426,
0.4680917263031006,
0.09267856180667877,
0.1331496238708496,
-0.12867209315299988,
-0.3176039457321167,
-0.6522684693336487,
-0.4945995509624481,
0.5724861025810242,
-0.28779637813568115,
-0.05824438482522... | |
name: TEXT
role: viewer
flags: apple-internal
icon:
bindings: .txt, .text, 'TEXT'
```
The only | [
-0.17235369980335236,
0.3717908263206482,
0.32419919967651367,
-0.12262939661741257,
0.1776711344718933,
0.1859046220779419,
0.24297191202640533,
0.34409573674201965,
-0.22418339550495148,
-0.6760858297348022,
-0.47833505272865295,
0.4542628228664398,
-0.31779325008392334,
0.01917578466236... | |
way to really get all bundles is by looking up in the LaunchService database (the one we dumped above). If you just go by whether it has a plist or not or whether the bundle bit is set or not, you might catch some or even many bundles, but you can't catch all of them. This is the database Finder uses to determine
* Is... | [
0.6366395950317383,
-0.5184091329574585,
0.3265925347805023,
0.5670182704925537,
-0.03813911974430084,
-0.24719026684761047,
-0.2111567258834839,
-0.18157130479812622,
-0.48559269309043884,
-0.4217934012413025,
-0.012239638715982437,
0.3166106641292572,
-0.1855524480342865,
0.0604851916432... | |
some more stuff.
[EDIT: Added path for Leopard, thanks to Hagelin for the update] | [
0.11202176660299301,
-0.15255768597126007,
-0.18895873427391052,
0.058021727949380875,
-0.05609138309955597,
-0.030980797484517097,
0.7249206304550171,
-0.04019397124648094,
-0.6010178923606873,
-0.41040217876434326,
-0.20142708718776703,
0.15796034038066864,
-0.5144044756889343,
-0.565119... | |
What does the `explicit` keyword mean in C++?
The compiler is allowed to make one implicit conversion to resolve the parameters to a function. What this means is that the compiler can use constructors callable with a **single parameter** to convert from one type to another in order to get the right type for a parameter... | [
0.027374479919672012,
0.22500354051589966,
0.2188645601272583,
-0.27147358655929565,
-0.16016848385334015,
0.28984546661376953,
0.19864292442798615,
-0.402630090713501,
0.09997254610061646,
-0.40711483359336853,
-0.23536092042922974,
0.7369972467422485,
-0.6777498126029968,
-0.086921729147... | |
a simple function that takes a `Foo` object:
```
void DoBar (Foo foo)
{
int i = foo.GetFoo ();
}
```
and here's where the `DoBar` function is called:
```
int main ()
{
DoBar (42);
}
```
The argument is not a `Foo` object, but an `int`. However, there exists a constructor for `Foo` that takes an `int` so this ... | [
-0.15461373329162598,
0.32136452198028564,
0.16016535460948944,
-0.5876249074935913,
-0.06489399820566177,
0.1789337396621704,
0.30350175499916077,
-0.2496815174818039,
0.10092968493700027,
-0.2452077865600586,
-0.30085092782974243,
0.7581076622009277,
-0.6380798816680908,
0.04795336723327... | |
at the function call `DoBar (42)`. It is now necessary to call for conversion explicitly with `DoBar (Foo (42))`
The reason you might want to do this is to avoid accidental construction that can hide bugs.
Contrived example:
* You have a `MyString` class with a constructor that constructs a string of the given siz... | [
0.05213512107729912,
0.2152847796678543,
0.2591063380241394,
-0.5904249548912048,
-0.06457147747278214,
-0.01767752319574356,
0.44477301836013794,
-0.48482149839401245,
-0.1961701363325119,
-0.36590489745140076,
-0.17590953409671783,
0.6623807549476624,
-0.5162732005119324,
-0.052518438547... | |
Hey all. Newbie question time. I'm trying to setup JMXQuery to connect to my MBean, so far this is what I got.
java -classpath jmxquery org.nagios.JMXQuery -U service:jmx:rmi:///jndi/rmi://localhost:8004/jmxrmi -O java.lang:type=Memory -A "NonHeapMemoryUsage"
Here's what I get.
JMX CRITICAL Authentication failed! Cr... | [
0.3603532016277313,
-0.0075070359744131565,
0.3251161575317383,
0.23213590681552887,
-0.08319372683763504,
-0.20671795308589935,
0.42208701372146606,
-0.12813551723957062,
-0.38388845324516296,
-0.563791811466217,
0.2051990032196045,
0.67765212059021,
-0.1813269555568695,
-0.16531254351139... | |
I'm currently looking for ways to create automated tests for a [JAX-RS](https://jsr311.dev.java.net/) (Java API for RESTful Web Services) based web service.
I basically need a way to send it certain inputs and verify that I get the expected responses. I'd prefer to do this via JUnit, but I'm not sure how that can be ... | [
0.6253246068954468,
0.0610114261507988,
-0.1042509526014328,
0.13030630350112915,
0.12668615579605103,
-0.005093016196042299,
0.2555622458457947,
-0.23836421966552734,
0.09939756989479065,
-0.7681303024291992,
0.11706902831792831,
0.3267452120780945,
0.3214603066444397,
-0.3724243342876434... | |
RESTful client API that makes writing unit tests really easy. See the unit tests in the examples that ship with Jersey. We use this approach to test the REST support in [Apache Camel](http://activemq.apache.org/camel/), if you are interested the [test cases are here](http://svn.apache.org/viewvc/activemq/camel/trunk/co... | [
-0.11934405565261841,
-0.42700040340423584,
0.11341460794210434,
-0.012274947948753834,
-0.21657992899417877,
-0.10311978310346603,
0.13543538749217987,
0.01066465862095356,
-0.09922961890697479,
-0.4881265461444855,
-0.27709269523620605,
0.7872911095619202,
0.09619607031345367,
-0.2918405... | |
How do I detect what browser (IE, Firefox, Opera) the user is accessing my site with? Examples in Javascript, PHP, ASP, Python, JSP, and any others you can think of would be helpful. Is there a language agnostic way to get this information?
If it's for handling the request, look at the [User-Agent](http://www.w3.org/Pr... | [
0.4608699083328247,
-0.048937153071165085,
0.3196587860584259,
0.08209441602230072,
-0.06419280171394348,
-0.3951171040534973,
0.3118371069431305,
-0.13584591448307037,
-0.14692367613315582,
-0.7995246648788452,
-0.20370717346668243,
0.5315210819244385,
-0.145430788397789,
-0.1534745246171... | |
on the User-Agent. | [
0.13481420278549194,
-0.026769177988171577,
0.20919238030910492,
0.2888047397136688,
-0.25026148557662964,
-0.18316183984279633,
-0.11632867902517319,
0.664905846118927,
0.21337400376796722,
-0.6869035363197327,
-0.7664194107055664,
0.5723735094070435,
-0.16260915994644165,
0.0202249009162... | |
Is there a way to comment out markup in an `.ASPX` page so that it isn't delivered to the client? I have tried the standard comments `<!-- -->` but this just gets delivered as a comment and doesn't prevent the control from rendering.
```
<%--
Commented out HTML/CODE/Markup. Anything with
this b... | [
0.2190408855676651,
0.008699729107320309,
0.38240623474121094,
0.022891441360116005,
-0.20763929188251495,
0.056328535079956055,
0.013678447343409061,
0.06836453825235367,
-0.4264785349369049,
-0.6445130705833435,
-0.11982373148202896,
0.213010773062706,
-0.20429182052612305,
-0.1480110734... | |
<%# Eval(“SomeProperty”) %>
--%>
```
[Source](http://weblogs.asp.net/scottgu/archive/2006/07/09/Tip_2F00_Trick_3A00_-Using-Server-Side-Comments-with-ASP.NET-2.0-.aspx) | [
0.10084446519613266,
0.034216366708278656,
0.41596341133117676,
-0.028854865580797195,
-0.10962258279323578,
-0.1636987179517746,
0.6910271048545837,
-0.21404202282428741,
-0.2875056862831116,
-0.17717808485031128,
-0.2927730083465576,
0.39808300137519836,
-0.2178308516740799,
-0.083936437... | |
I have a bunch (hundreds) of files that are supposed to have Unix line endings. I strongly suspect that some of them have Windows line endings, and I want to programmatically figure out which ones do.
I know I can just run
```
flip -u
```
or something similar in a script to convert everything, but I want to be able ... | [
0.29520535469055176,
0.21159885823726654,
0.17640003561973572,
0.07631456851959229,
0.2076694816350937,
-0.04742499068379402,
0.17009137570858002,
0.4156007170677185,
-0.08941936492919922,
-0.858062744140625,
-0.24162645637989044,
0.669844388961792,
-0.08174414932727814,
0.2611626386642456... | |
I need to store items with a calendar date (just the day, no time) in a sqlite database. What's the best way to represent the date in the column? Julian days and unix seconds come to mind as reasonable alternatives. If I go with a unit other than days at what clock time should it be?
Update: I am aware of ISO8601 and ... | [
0.4942847788333893,
0.07879528403282166,
0.4578019380569458,
0.18172001838684082,
-0.038277767598629,
0.20977434515953064,
-0.02479327842593193,
0.033625528216362,
-0.3143612742424011,
-0.4560050964355469,
0.09275685995817184,
0.16648443043231964,
0.19434797763824463,
0.34329140186309814,
... | |
convert to string for display. What units should this number be in, with what origin, and if the units is more precise than days what time of day should be used?
If you expect to be handing the date to an external tool or library, you should use whatever format it expects. Unix time seems to be the lingua franca of dig... | [
0.28465893864631653,
-0.2107631266117096,
0.5089635252952576,
0.0578300878405571,
-0.13948363065719604,
0.145664781332016,
-0.3375746011734009,
0.16010086238384247,
-0.4288601875305176,
-0.7221640944480896,
-0.1846253126859665,
0.2333356887102127,
0.02751840651035309,
0.03336729481816292,
... | |
number and just convert to string for display.
Ah, that makes sense. If your environment (.NET? Python? C++?) has time-handling tools, it would be best to use their native unit and epoch. There's no reason to re-write all those date-manipulation functions; they're trickier than they look. Otherwise, I'd use days in th... | [
0.41813555359840393,
-0.26466843485832214,
0.06029948219656944,
0.2647876441478729,
-0.025823788717389107,
0.24166785180568695,
0.05514790490269661,
0.2557241916656494,
-0.3655933737754822,
-0.553242027759552,
0.15703238546848297,
0.28492552042007446,
0.06380816549062729,
0.325758069753646... | |
in the hour, minute, second fields), but since it never reaches the user there's no practical implications. It would be a good spot for an easter egg, in fact. | [
0.3442018926143646,
-0.13035888969898224,
0.5777559876441956,
-0.14102447032928467,
0.15752337872982025,
0.07909495383501053,
0.142921581864357,
0.21715493500232697,
0.026706773787736893,
-0.3627667725086212,
-0.0865091010928154,
0.13999903202056885,
0.03886755555868149,
0.1863079816102981... | |
I'm running `Django 1.0` and I'm close to deploying my app. As such, I'll be changing the DEBUG setting to False.
With that being said, I'd still like to include the stacktrace on my 500.html page when errors occur. By doing so, users can copy-and-paste the errors and easily email them to the developers.
Any thoughts... | [
0.4544219970703125,
0.18827570974826813,
0.27439084649086,
0.23845434188842773,
0.261027067899704,
-0.3680594563484192,
0.2179221212863922,
0.03285026177763939,
-0.24519670009613037,
-0.6607874631881714,
0.18706977367401123,
0.6476874351501465,
-0.11117109656333923,
-0.10875420272350311,
... | |
Personally, I create a (private) RSS feed with the stacktraces, urls, etc. that the developers can subscribe to.
Showing stack traces to your users on the other hand could possibly leak information that malicious users could use to attack your site. Overly detailed error messages are one of the classic stepping stones... | [
0.7253804802894592,
0.42650794982910156,
0.2554534077644348,
0.05190134793519974,
0.178211510181427,
-0.24435169994831085,
0.0878443643450737,
-0.19237154722213745,
-0.1902513951063156,
-0.6590836048126221,
0.03792453929781914,
0.5052779316902161,
-0.33997729420661926,
-0.2279461771249771,... | |
>> sys.stderr, type.__name__, ":", value
print >> sys.stderr, '\n'.join(traceback.format_tb(tb))
```
Prints:
```
Exception : Message
File "exception.py", line 5, in <module>
raise Exception("Message")
``` | [
-0.015560470521450043,
0.21504421532154083,
0.23415547609329224,
-0.18732933700084686,
0.19897320866584778,
0.07613085955381393,
0.08658049255609512,
-0.4627212584018707,
-0.2888117730617523,
-0.43399369716644287,
-0.28873318433761597,
0.2730962038040161,
-0.47968578338623047,
0.0456413067... | |
There is a way to know the flash player version installed on the computer that runs our SWF file with Action Script 3.0?
If you are programming from within the IDE the following will get you the version
```
trace(Capabilities.version);
```
If you are building a custom class the following should help.
Make sure that... | [
0.44709086418151855,
-0.06653223931789398,
0.3057415187358856,
-0.006371553521603346,
0.14004488289356232,
-0.3566060960292816,
0.3036450743675232,
-0.07095209509134293,
-0.3164839744567871,
-0.6036049723625183,
-0.008644461631774902,
0.8092982769012451,
-0.11623633652925491,
-0.0428582467... | |
{
> trace(Capabilities.version);
> }
> }
> }
>
> ```
Hope this helps, always remember that all of the AS3 language can be studied online here <http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/>. | [
0.20330598950386047,
-0.13216769695281982,
0.317599892616272,
-0.22838668525218964,
-0.027490105479955673,
-0.11696763336658478,
0.5096396803855896,
-0.31785961985588074,
-0.33021023869514465,
-0.4391913414001465,
-0.1045113131403923,
0.47475898265838623,
-0.1603137105703354,
-0.4517087638... | |
I'm no crypto expert, but as I understand it, 3DES is a symmetric encryption algorithm, which means it doesnt use public/private keys.
Nevertheless, I have been tasked with encrypting data using a public key, (specifically, a .CER file).
If you ignore the whole symmetric/asymmetric thang, I should just be able to use ... | [
0.1940702646970749,
0.36238935589790344,
0.3523072898387909,
0.07181846350431442,
-0.17171834409236908,
-0.07424645125865936,
0.2892884314060211,
-0.2042890042066574,
-0.02998746931552887,
-0.8080660700798035,
-0.294007807970047,
0.6066280007362366,
-0.3606542944908142,
0.34749099612236023... | |
the certificate is ToXmlString(bool), and then doing some hacky substringing upon the returned string.
However, this seems so hackish I feel I must be missing a simpler, more obvious way to do it.
Am I missing a simpler way to use a .cer file to provide the key data to the C# 3DES crypto class, or is hacking it out of... | [
0.5668864846229553,
0.3783249258995056,
0.37642279267311096,
0.12711185216903687,
-0.015300309285521507,
-0.34933555126190186,
0.3095397353172302,
-0.07877833396196365,
-0.017643073573708534,
-0.2788344919681549,
-0.38868919014930725,
0.5181427597999573,
-0.17342691123485565,
0.33069753646... | |
From what I have gleaned from reflector, RunWithElevatedPriveleges simply reverts the current thread identity to the base (non-impersonated) identity. This makes perfect sense in the case of code running inside the WSS application pool, since the base service account is a super-user. Does it have any effect when runnin... | [
0.6248208284378052,
-0.04303048551082611,
0.3354952335357666,
0.09955058991909027,
0.2403065264225006,
-0.11839625984430313,
0.4785170257091522,
0.15458284318447113,
-0.00923317763954401,
-0.45880958437919617,
0.01865864358842373,
0.40576171875,
-0.25173860788345337,
0.2887512445449829,
... | |
this case is either use [runas](http://technet.microsoft.com/en-us/library/cc781769.aspx) or
a set the identity of a scheduled task to the same account as the app pool identity. | [
0.32136422395706177,
-0.3024692237377167,
-0.02948402240872383,
0.08639544248580933,
0.430888831615448,
0.09960843622684479,
-0.2642132341861725,
-0.127360999584198,
-0.4556194841861725,
-0.34267285466194153,
-0.340293288230896,
0.44899046421051025,
-0.14169365167617798,
-0.310732543468475... | |
When building some of my PHP apps, a lot of the functionality could be coded using PEAR/PECL modules, however, the fact that some people using it may not have the access to install things, It poses a puzzler for me.
Should I forsake some users to use PEAR/PECL for functionality, where these will allow me to have a sys... | [
0.7686797380447388,
0.3330940902233124,
-0.022720161825418472,
0.16858230531215668,
-0.06607578694820404,
-0.04588441550731659,
0.5465118288993835,
0.004515674896538258,
-0.029743827879428864,
-0.41337209939956665,
0.13692450523376465,
0.3556760251522064,
-0.21133750677108765,
-0.323194712... | |
that works, go with PEAR/PECL. If you're trying to learn to be a better programmer, and you have the time, then I'd recommend taking the effort to write your own versions. Once you understand the innards of whatever you're trying to replace, you may want to switch to the PEAR/PECL version so that you're not wasting tim... | [
0.3426215350627899,
0.07715976983308792,
-0.07357563823461533,
0.06886985898017883,
0.024908006191253662,
-0.17443136870861053,
-0.1389518678188324,
0.31054040789604187,
-0.00799035094678402,
-0.4890316128730774,
-0.052905503660440445,
0.9439967274665833,
-0.13516472280025482,
-0.233234986... | |
really needs a version of 'ls' that can do anything besides what 'ls' can currently do. Your version of whatever PEAR library will, by virtue of being written by you, do exactly what you need doing. It requires some careful thought...
...but on the gripping hand, don't spend too much time thinking about it. Spend five... | [
0.6821510195732117,
-0.03701360896229744,
-0.11031554639339447,
0.2739759087562561,
0.1897294968366623,
0.22965776920318604,
0.28753817081451416,
0.4719194173812866,
-0.09802882373332977,
-0.7879818081855774,
-0.13183464109897614,
0.36761412024497986,
0.1103719025850296,
-0.600036203861236... | |
In SQL Server what is the simplest/cleanest way to make a datetime representing the first of the month based on another datetime? eg I have a variable or column with 3-Mar-2005 14:23 and I want to get 1-Mar-2005 00:00 (as a datetime, not as varchar)
```
Select DateAdd(Month, DateDiff(Month, 0, GetDate()), 0)
```
To r... | [
-0.3497765362262726,
0.20363231003284454,
0.8412720561027527,
-0.2142428308725357,
-0.35893887281417847,
-0.0552888885140419,
0.11181917041540146,
0.07583723217248917,
-0.26970916986465454,
-0.33100438117980957,
0.342481791973114,
-0.007069171406328678,
-0.009247573092579842,
0.45117670297... | |
1, 1900, then adds that number of months to Jan 1, 1900. The net effect is removing the day (and time) portion of a datetime value. | [
-0.08471574634313583,
0.15119007229804993,
0.20561781525611877,
0.17137844860553741,
0.13296696543693542,
0.04223577305674553,
0.39436131715774536,
0.3744608163833618,
-0.42521247267723083,
-0.4845237135887146,
0.060721930116415024,
-0.35619020462036133,
-0.13414491713047028,
0.79855728149... | |
I'm specifically interested in Windows 2000/XP, but Vista/7 would be interesting too (if different).
I was thinking along the lines of task scheduling a batch file or equivalent on a daily basis.
EDIT: Sorry, I should have provided more info. The question pertains to 10 machines which I manually apply updates. I don'... | [
0.1645309180021286,
-0.10530252754688263,
0.48537731170654297,
-0.02747172862291336,
0.13467752933502197,
-0.15702486038208008,
0.294756144285202,
0.3707835078239441,
-0.41114768385887146,
-0.897392213344574,
-0.30590763688087463,
0.5918086171150208,
-0.06588809192180634,
0.088560797274112... | |
batch file conjunction with [ActiveState ActivePerl](http://www.activestate.com/activeperl/) (recommended):
perl -nle "print $\_ if m/updates detected/i" < c:\Windows\WindowsUpdate.log
This might be crude or dirty, and might break in future, but it currently does what I need.
Thanks for all the ideas. | [
0.3443635106086731,
-0.13701370358467102,
0.428160697221756,
-0.07270725071430206,
-0.0036639594472944736,
-0.011440329253673553,
0.21510402858257294,
0.3355405032634735,
-0.3815361559391022,
-0.49012476205825806,
-0.10455970466136932,
0.5197418928146362,
-0.2609933614730835,
0.02013645507... | |
What is the best way to reduce the size of the viewstate hidden field in JSF?
I have noticed that my view state is approximately 40k this goes down to the client and back to the server on every request and response espically coming to the server this is a significant slowdown for the user.
My Environment JSF 1.2, MyF... | [
0.256814181804657,
-0.05452413856983185,
0.5843542218208313,
-0.2829548418521881,
-0.4297153353691101,
0.19687597453594208,
0.46956130862236023,
-0.25276699662208557,
-0.2928275167942047,
-0.7536641359329224,
0.26457104086875916,
0.6093438863754272,
-0.35058605670928955,
-0.341971874237060... | |
<param-value>server</param-value>
</context-param>
``` | [
-0.23623758554458618,
0.2482350617647171,
0.24107210338115692,
0.01851397566497326,
-0.2513794004917145,
0.35984569787979126,
0.1874070018529892,
-0.18901748955249786,
-0.33534935116767883,
-0.3536262512207031,
-0.442768394947052,
0.07984086871147156,
-0.16586090624332428,
0.14847575128078... | |
This may seem like a daft question, but i was wondering about how to use MVC frameworks on hosted servers.
I am playing about (albeit slowly) at home with the RoR on Ubuntu and understand that if i want to do a live site then i need hosting with Rails and Ruby.
However, what happens about the PHP frameworks. For exam... | [
0.28915444016456604,
0.12504813075065613,
0.20050181448459625,
-0.038159169256687164,
-0.41794103384017944,
-0.2913459539413452,
-0.13641436398029327,
0.4686397910118103,
-0.4867115020751953,
-0.6501929759979248,
0.21543531119823456,
0.3095693588256836,
-0.20244747400283813,
0.091869793832... | |
about deploying anything live.
How do i use php command line on live servers, and how would i go about installing the framework on another server.
This is all hyperthetical at the moment as i am just thinking about it, but it is a question that i have thought of in the past.
Regards
Not every framework needs things... | [
1.1392524242401123,
-0.08330751210451126,
0.13675765693187714,
0.11223892867565155,
0.06899826228618622,
-0.4114104211330414,
0.2628338038921356,
0.15862710773944855,
-0.016267258673906326,
-0.738545835018158,
0.1330035775899887,
0.6321130990982056,
-0.3226577937602997,
-0.1186310425400734... | |
use symfony on a hosting solution. In fact, [this document](http://www.symfony-project.org/book/1_1/03-Running-Symfony) explains how to use symfony on shared hosting. | [
0.40000608563423157,
0.03435090184211731,
0.2427319884300232,
0.2737959623336792,
0.028455737978219986,
-0.6904885172843933,
-0.3198162913322449,
0.21928249299526215,
-0.48614561557769775,
-0.45384418964385986,
-0.2536485493183136,
0.4833030700683594,
-0.5172218084335327,
-0.06713707745075... | |
The CPU architecture landscape has changed, multiple cores is a trend that will change how we have to develop software. I've done multi-threaded development in C, C++ and Java, I've done multi-process development using various IPC mechanisms. Traditional approaches of using threads doesn't seem to make it easy, for the... | [
0.25495803356170654,
0.31783202290534973,
-0.10902243107557297,
0.2918741703033447,
0.2001449316740036,
0.21997500956058502,
0.005182906985282898,
0.23390892148017883,
-0.396802693605423,
-0.8122631907463074,
0.20099873840808868,
0.34822556376457214,
-0.44351544976234436,
0.310669332742691... | |
actually take advantage of and ensure that the available resources are being utilized - just writing a safe, robust threaded application doesn't ensure that it's using all the available cores.
What I've seen so far is:
* [Erlang](http://www.erlang.org/): process based, message passing IPC, the 'actor's model of concu... | [
0.3043694794178009,
-0.450251042842865,
0.4111922085285187,
0.1062827855348587,
-0.19673041999340057,
0.14071886241436005,
-0.026003403589129448,
-0.25041118264198303,
-0.37809932231903076,
-0.5087124705314636,
0.19262459874153137,
0.48539838194847107,
-0.42405620217323303,
-0.379313200712... | |
what do you think is interesting to watch?
I'd suggest two paradigm shifts:
Software Transactional Memory
=============================
You may want to take a look at the concept of *Software Transactional Memory* (STM). The idea is to use *optimistic concurrency*: any operation that runs in parallel to others try to... | [
0.30218619108200073,
-0.03487874194979668,
0.030723795294761658,
0.15205958485603333,
0.011202210560441017,
-0.24573802947998047,
-0.36898916959762573,
0.2132173627614975,
-0.5922002792358398,
-0.10968676209449768,
0.35855433344841003,
0.5401742458343506,
-0.6778497099876404,
0.21395508944... | |
in Haskell : [Papers and presentations about transactional memory in Haskell](http://research.microsoft.com/~simonpj/papers/stm/index.htm). Many other implementations are listed on [Wikipedia's STM article](http://en.wikipedia.org/wiki/Software_transactional_memory).
Event loops and promises
========================
... | [
-0.18081799149513245,
-0.22641292214393616,
0.0075210146605968475,
-0.08923529088497162,
-0.35502439737319946,
-0.15823884308338165,
0.0905551165342331,
-0.08451183140277863,
-0.5355794429779053,
-0.19665731489658356,
-0.18027815222740173,
0.4818253219127655,
-0.5807492733001709,
-0.108306... | |
In an attempt to add some parameter validation and correct usage semantics to our application, we are trying to add correct exception handling to our .NET applications.
My question is this: When throwing exceptions in ADO.NET if a particular query returns no data or the data could not be found, what type of exception ... | [
0.046418704092502594,
-0.19367536902427673,
0.052237268537282944,
0.15792536735534668,
-0.08637642115354538,
-0.31338247656822205,
0.45119667053222656,
-0.46539855003356934,
-0.2826797068119049,
-0.5054183006286621,
-0.35501977801322937,
0.1898372769355774,
-0.7578524351119995,
0.131246864... | |
throw new Exception("Data not found");
return ds;
}
```
The [MSDN guidelines](http://msdn.microsoft.com/en-us/library/ms229021(VS.80).aspx) state:
* Consider throwing existing exceptions residing in the System namespaces instead of creating custom exception types.
* Do create and throw custom exceptions if you h... | [
0.23775503039360046,
-0.01261773332953453,
-0.32439789175987244,
0.08949122577905655,
-0.03591740503907204,
-0.2986692786216736,
0.5463160276412964,
-0.1216810792684555,
-0.5431020855903625,
-0.7152954339981079,
-0.2476307898759842,
0.410835862159729,
-0.3585466742515564,
0.167858749628067... | |
a custom exception type, such as DataNotFoundException [as suggested by Johan Buret](https://stackoverflow.com/questions/121700/what-exception-should-be-thrown-when-an-adonet-query-cannot-retrieve-the-reques#121809).
Otherwise you might consider throwing one of the existing exception types, such as System.Data.DataExc... | [
0.02651282399892807,
-0.22377531230449677,
-0.20143885910511017,
0.048892997205257416,
-0.3915131092071533,
-0.30713751912117004,
0.35190409421920776,
-0.2721874713897705,
-0.5549965500831604,
-0.3818115293979645,
-0.3919975757598877,
0.12542356550693512,
-0.588034451007843,
0.220626607537... | |
My boss asked me to setup a [Subversion](http://en.wikipedia.org/wiki/Apache_Subversion) server for him to use so that he can share all his documents across different machines in sync and still be able to access them when there is no Internet connection.
I have this up for him, but now he's requesting that the 'create... | [
0.4848363697528839,
0.14725270867347717,
0.36015427112579346,
0.25203433632850647,
0.27192121744155884,
-0.4297904372215271,
0.19492201507091522,
0.2089998722076416,
-0.2529785633087158,
-0.5105102062225342,
0.09098485857248306,
-0.1698106825351715,
-0.23044568300247192,
0.6156217455863953... | |
preserved via Subversion, or do I have to write a script to get the date of each file and have him run 'touch' after each intial check out?
Note that the set of documents that were added to the SVN repository span back several years, and he wants these dates preserved across all checkouts. So the date of the last chan... | [
0.41216176748275757,
-0.2872031033039093,
0.49927908182144165,
0.1885925531387329,
0.13674789667129517,
-0.07047086954116821,
0.31161195039749146,
0.3191656470298767,
-0.4181661307811737,
-0.6207185387611389,
-0.10043738037347794,
0.2173125445842743,
-0.16249433159828186,
0.476416260004043... | |
trawl through the output, updating the SVN create date to the file create date on your source folder.
* Load the updated dump file back in using svnadmin load.
* Use the **Set file dates to the "last commit time"** setting I suggested earlier.
I'm not certain this is possible, but off the top of my head I think it wou... | [
0.6299834847450256,
-0.15020059049129486,
0.3370473086833954,
0.11421054601669312,
-0.15100592374801636,
-0.21904386579990387,
0.16502320766448975,
0.2174042910337448,
-0.30909907817840576,
-0.7670478224754333,
0.20007404685020447,
0.39373865723609924,
0.05497335270047188,
0.20803883671760... | |
I've been using:
[Webmin](http://www.webmin.com) Free, Apache only
[Cpanel](http://www.cpanel.net) Paid, Apache only I believe
[Plesk](http://www.parallels.com/plesk/) Paid, supports IIS
Recently managing sites on our Windows/IIS machines have been becoming a chore. Installations, Configurations, Monitoring; have a... | [
0.4359419047832489,
0.15810874104499817,
0.30870693922042847,
0.03543788939714432,
-0.033799488097429276,
-0.060226693749427795,
0.25429075956344604,
0.11995351314544678,
-0.4897248446941376,
-0.6796391606330872,
-0.0596112422645092,
0.40553802251815796,
0.018164504319429398,
0.30605617165... | |
that does more than setup/configure sites, but the ftp accounts, email accounts, disk quota management, etc.
It's not quite what you're after (I think), but if you virtualized your Windows/IIS environments, and ran them on Microsoft Virtual Server, that would give you a remote, web-based interface for administration.
... | [
0.30723267793655396,
0.034014955163002014,
-0.0873224288225174,
0.3208875358104706,
0.13455632328987122,
-0.38753804564476013,
-0.006579502020031214,
0.2601742446422577,
-0.3625876009464264,
-0.5413392186164856,
0.07979639619588852,
0.4778790771961212,
-0.004842848517000675,
0.106901764869... | |
I recently heard of BDD and found it very similar to TDD.
Which of these two do you use (if any)?
and which are the pros and cons of each?
I'm very much of the BDD = TDD done properly camp. If you're doing TDD as originally described by Beck - and practised by many - then there is essentially no difference.
What BDD... | [
0.8827016949653625,
0.08651841431856155,
0.024739621207118034,
-0.5200135111808777,
-0.43778321146965027,
-0.07029934227466583,
0.34045758843421936,
-0.21338067948818207,
-0.09830063581466675,
-0.3862411677837372,
0.1411706656217575,
0.7579295039176941,
-0.07490560412406921,
0.004572648089... | |
been doing TDD for so long now it's hard for me to judge whether this actually helps. I think (hope :-) I've already learned many of the lessons that BDD tools/language encourage so that they don't seem to provide much extra value to me. Of course YMMV - and I've not done a whole "real world" project using BDD tools - ... | [
0.8585177063941956,
0.12511242926120758,
0.013666688464581966,
0.05009663477540016,
-0.1339598447084427,
-0.15542174875736237,
0.5530269742012024,
0.0677664577960968,
0.006978283636271954,
-0.3197854161262512,
0.25329825282096863,
0.6411048769950867,
0.2464005947113037,
0.02042486146092415... | |
being used in the more traditional sense. I've not done this myself yet - and would be interested if folk here have had any such experience. | [
0.4381352961063385,
-0.05623022839426994,
-0.24447064101696014,
-0.2691449224948883,
-0.1810106337070465,
0.3541126251220703,
0.32144397497177124,
-0.1741221398115158,
-0.2387116402387619,
-0.4369187355041504,
-0.05364978313446045,
0.5197532176971436,
0.24366241693496704,
-0.25904193520545... | |
I need to set the text within a DIV element dynamically. What is the best, browser safe approach? I have prototypejs and scriptaculous available.
```
<div id="panel">
<div id="field_name">TEXT GOES HERE</div>
</div>
```
Here's what the function will look like:
```
function showPanel(fieldName) {
var fieldNameEl... | [
0.14793135225772858,
0.009813480079174042,
0.4160309135913849,
-0.3246881067752838,
-0.14247357845306396,
0.23598426580429077,
0.04189843311905861,
-0.4028032124042511,
0.05009616166353226,
-0.8456603288650513,
-0.19123448431491852,
0.5700228214263916,
-0.31567034125328064,
-0.134264871478... | |
I am creating an SQL view for a file that strips out the spaces in a particular field. My question is if there is a why to set a key on that new view so a person can still CHAIN the file. We are on V5R3.
Okay found the answer at <http://archive.midrange.com/midrange-l/200809/msg01062.html>.
It is not possible at V5R3.... | [
0.2719939053058624,
-0.045331668108701706,
0.39826491475105286,
-0.0450177825987339,
-0.03762247785925865,
-0.27240413427352905,
0.1717764437198639,
-0.027396168559789658,
-0.10498731583356857,
-0.5268091559410095,
-0.14862658083438873,
0.3366170823574066,
-0.07065880298614502,
0.452835708... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.