text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
create a Developer ID certificate. If you have an organization membership, read Managing Your Team in Member Center for a description of team roles and tasks that team agents perform on behalf of team members.
>
>
> Xcode creates your development certificate for you when you need it. For example, when you assign your... | [
0.5548162460327148,
0.09704915434122086,
-0.32927998900413513,
0.12897413969039917,
0.09989184886217117,
-0.4310535490512848,
0.06007247418165207,
-0.14419199526309967,
-0.060250066220760345,
-0.970781683921814,
-0.27203482389450073,
0.07208580523729324,
-0.23110148310661316,
0.14715713262... | |
**To create a signing identity**
>
>
> 1. In the Xcode Preferences window, click Accounts.
> 2. Select the team you want to use, and click View Details.
> 3. In the dialog that appears, click the Create button in the row of the type of certificate you want to create.
>
>
> If the Create button is disabled, you are ... | [
0.5122065544128418,
0.1678077131509781,
0.40364667773246765,
-0.059074364602565765,
0.21102318167686462,
-0.17349711060523987,
0.22045254707336426,
0.07654288411140442,
-0.07881677150726318,
-0.9380457401275635,
-0.1286717802286148,
0.4375985860824585,
-0.27784642577171326,
-0.080300427973... | |
Thanks to this website I succeed to use a connectionString localized inside a web.config instead of the one provided in the app.config of the library. But my production and my test SQL Server do not have the same SQL user name.
```
Table(Name="SqlUserName.tableName")]
public partial class tableName : INotifyPropertyCh... | [
-0.08693038672208786,
0.2782512903213501,
0.2677045166492462,
0.014825292862951756,
0.04391534999012947,
-0.12411095201969147,
0.3009798228740692,
-0.03260831907391548,
-0.2281944304704666,
-0.7943963408470154,
0.12758201360702515,
0.45980122685432434,
-0.1748892217874527,
0.26158329844474... | |
LINQ will regenerate the dbml, I will loose my modification. I think I can't move it to a partial class as it's an attribute and can't be redefined (I don't want to do it for all the tables also).
Thanks for your help.
The problem is that it gives the wrong impression - it makes it look like the value can't change, wh... | [
0.25619831681251526,
-0.023306850343942642,
0.3145877420902252,
0.23956838250160217,
-0.13927145302295685,
-0.2434735745191574,
0.2302219569683075,
0.04472164809703827,
-0.2797568440437317,
-0.39204174280166626,
0.17367199063301086,
0.5088004469871521,
-0.21042293310165405,
0.3188154995441... | |
readonly field, particularly if it's private, initialized in a static initializer and then never mutated within your code.
While the field is protected, however, there's more of a risk of derived classes abusing it. Personally I like all my fields to be private. On the other hand, I don't know your code - it could be ... | [
0.5019250512123108,
0.20381364226341248,
0.08987238258123398,
0.0680038332939148,
0.0014176955446600914,
-0.3869934678077698,
0.3731052279472351,
0.3150542080402374,
-0.11273384839296341,
-0.14669568836688995,
-0.19447258114814758,
0.46518799662590027,
-0.3113889992237091,
0.23664696514606... | |
for that line, and add a comment to emphasize that the object is mutable even though the field is readonly. | [
0.038615867495536804,
0.032464105635881424,
0.17050285637378693,
-0.020622743293642998,
-0.1781330108642578,
0.049149803817272186,
0.05489653721451759,
0.06536435335874557,
0.027277400717139244,
-0.3893307149410248,
-0.606672465801239,
0.3869454860687256,
-0.1551836133003235,
0.33163467049... | |
I've got a textbox where the user can enter text that includes html markup.
Of course, when the page does anything that involves a postback, it breaks (error 500) because the parser thinks the html code in the textbox is a hack attempt.
Now, I know there is a way to allow it, but I can't for the life of me remember.
... | [
0.3626803457736969,
0.1542610228061676,
0.47906288504600525,
0.06720302999019623,
-0.03332524746656418,
-0.31436392664909363,
0.2927146553993225,
-0.01629941537976265,
-0.4253290295600891,
-0.5026313066482544,
0.0983472466468811,
0.6001325249671936,
-0.03049238957464695,
-0.057708706706762... | |
Well i have a list of objects `List<UserDC>` now i would want to display this in some kind of grid so i tryed the `GridView`
```
GridView1.DataSource = list
GridView1.DataBind()
```
Well that did work but now i want to hide some columns but that does not seem to be so easy :
```
GridView1.Columns(0).Visible = Fals... | [
0.24611009657382965,
0.1398722380399704,
0.4418748617172241,
-0.05493270978331566,
-0.14424842596054077,
-0.02560516819357872,
0.4275335371494293,
-0.4337387979030609,
-0.30648964643478394,
-0.7281147837638855,
0.18212413787841797,
0.6677296161651611,
-0.07511550933122635,
0.06637468189001... | |
the Column Header, Data Rows OR BOTH by checking the "RowType" property in this event. | [
-0.19664569199085236,
0.12004035711288452,
0.40964409708976746,
0.11622405797243118,
-0.08346518874168396,
0.04625946655869484,
0.001234133611433208,
-0.24071936309337616,
0.04755832627415657,
-0.47803008556365967,
-0.2200961410999298,
0.4444650113582611,
-0.09757863730192184,
0.2541277110... | |
Currently I have a test class called TestClass.cs in C:\Projects\TestProject\TestClass.cs
I also have an Xml file in C:\Projects\TestProject\config\config.xml
In TestClass.cs, I have a test method to load the Xml from the filesystem like so:
`XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(Path.Combine(Assembly.... | [
0.503534197807312,
0.24331451952457428,
0.2460498809814453,
-0.05972031131386757,
0.1463540494441986,
-0.20862559974193573,
0.1960601806640625,
-0.11476640403270721,
-0.08805384486913681,
-0.950238823890686,
-0.047221750020980835,
0.3699178397655487,
0.18397396802902222,
0.2501220405101776... | |
I want to develop an ASP.NET application that can detect the user logged on a Window Domain. These credentials are going to be used to logging on the ASP.NET application.
How can I do this?
Thanks!
In IIS, turn on Integrated Windows Authentication, and in code, if you use:
```
Request.ServerVariables["LOGON_USER"]
... | [
0.3860345482826233,
0.17337755858898163,
0.7182037830352783,
0.13824410736560822,
0.03720807656645775,
-0.385493665933609,
0.29407045245170593,
0.057934995740652084,
-0.1290719211101532,
-0.8825303316116333,
-0.027628174051642418,
0.2840345501899719,
0.01484264712780714,
0.1083491593599319... | |
I'm developing on the iPhone and I'm missing something about storing objects in an NSMutableArray - what am I doing wrong and how should I approach this?
The relevant sections of the code are
I have an object, Entity, defined which inherits directly from NSObject. In my class GLView I wish to define an array of thes... | [
0.15248778462409973,
-0.04442332684993744,
0.7510805130004883,
0.06352901458740234,
0.016765370965003967,
0.011930309236049652,
0.16718079149723053,
-0.3691967725753784,
-0.01952023059129715,
-0.6025672554969788,
0.04655476287007332,
0.5405824184417725,
-0.21638666093349457,
-0.05456350743... | |
called multiple times by a timer event - I allocate the array and, for initial development, just one Entity object and add it to the array
```
- (void)drawView
{
if(!controllerSetup) { // initialize on first call
[controller setupView:self];
controllerSetup = YES;
arrEntities = [NSMutableA... | [
0.25724223256111145,
-0.500072181224823,
0.5559247732162476,
0.024500751867890358,
0.07603458315134048,
0.02662576176226139,
0.07602428644895554,
-0.4881088435649872,
-0.10061115771532059,
-0.4699661135673523,
0.07550688832998276,
0.48370838165283203,
-0.36089470982551575,
0.27418291568756... | |
*entity = [arrEntities objectAtIndex:0];
[entity tickEntity:0.1];
}
```
My understanding was that on the first call of `drawView` the NSMutableArray would be set up and the instance of Entity added to it, then in the body the a pointer to first copy of entity stored in the array retrieved and this manipulated (ob... | [
0.10059911012649536,
-0.21689651906490326,
0.6327449083328247,
0.11125773936510086,
0.1309129148721695,
-0.307302862405777,
0.01576080732047558,
-0.3087778687477112,
-0.09976202249526978,
-0.4821072816848755,
0.12625744938850403,
0.7666738033294678,
-0.3775666356086731,
0.17133015394210815... | |
executed `arrEntities` is empty and the program crashes as `objectAtIndex` retrieves nil.
So what am I doing wrong? Why does my stored Entity object not persist in the NSMutableArray?
Try replacing the line you create arrEntities with the following:
```
arrEntities = [[NSMutableArray alloc] init];
```
Then make sur... | [
0.07802707701921463,
0.12471770495176315,
0.47322049736976624,
-0.2590857148170471,
0.003377275075763464,
-0.22275638580322266,
0.3130166530609131,
-0.34085813164711,
-0.4584425687789917,
-0.3561084270477295,
-0.05436176434159279,
0.6760213971138,
-0.6400736570358276,
0.27069199085235596,
... | |
thisEntity = [[Entity alloc] initEntity];
[arrEntities addObject:thisEntity];
[thisEntity release]; // add this
```
If you don't release thisEntity, it will leak. addObject retains the passed object. | [
0.00020320856128819287,
-0.08273649960756302,
0.3668650984764099,
-0.20411373674869537,
0.1601962149143219,
-0.46011000871658325,
0.3677785098552704,
-0.02011137269437313,
0.02568475902080536,
-0.23812179267406464,
-0.512129545211792,
0.5353177189826965,
-0.6226322650909424,
0.412493258714... | |
I need to pass information from one exe to another exe. Is it possible ?
If it is possible, can you give me idea to solve this problem.
here i need to send some string msg to another exe . the another exe should recive that msg and it should perform some operation depends on the that string msg...
You can do this is... | [
0.5219537019729614,
-0.1148204579949379,
0.06488450616598129,
0.31376954913139343,
-0.0332585945725441,
-0.12257148325443268,
0.09989388287067413,
0.22954367101192474,
-0.12105457484722137,
-0.6464378833770752,
0.2861919105052948,
0.24113181233406067,
-0.5608353614807129,
0.476607650518417... | |
I'm trying to setup cruisecontrol.net to work with our existing projects.
The projects use the visual studio 2008 testing tools (running as .net 2.0).
During the actual build process I get several error messages, most or which are:
Type 'TestClass' is not defined.
I'm assuming that this is because I don't have the ... | [
0.48135247826576233,
0.1787242591381073,
0.283782035112381,
0.09458319842815399,
-0.122126504778862,
-0.24492044746875763,
0.42885175347328186,
0.21987617015838623,
-0.12889157235622406,
-0.5633524656295776,
0.39902251958847046,
0.8989490866661072,
-0.08527250587940216,
-0.0640935525298118... | |
on my build server?
MSTest requires Visual Studio. You'll need to install it on your build machine (or use a more lightweight testing framework!) | [
0.5940924882888794,
0.21399515867233276,
0.13908715546131134,
0.16998565196990967,
-0.015319998376071453,
-0.07417076826095581,
0.5746636390686035,
-0.11288062483072281,
0.1476661115884781,
-0.9076825976371765,
0.16457150876522064,
0.6695398092269897,
-0.0660572499036789,
-0.12638291716575... | |
We have a Web project containing both an ASP.Net (forms) UI, and some WCF web services. This is hosted in IIS 6. Both the UI and the WCF services make use of a PDF-generating tool which requires a license, stored in the `<appSettings>` section of the web.config file. The license is based on the domain of the website, i... | [
0.684977650642395,
0.11730943620204926,
0.6746558547019958,
0.10949184000492096,
0.1216624453663826,
-0.3427984416484833,
0.0257819015532732,
-0.3137505352497101,
-0.06031792238354683,
-0.8851982355117798,
-0.22352148592472076,
0.22832004725933075,
-0.17585426568984985,
0.01758910529315471... | |
fine. When the WCF services do the same, the tool somehow gets the name of the server rather than the domain, and so thinks it's unlicensed.
I don't really want to concentrate on the tool, what I'd like to know is:
If `.aspx` and `.svc` files (and their parent DLL) are both hosted in the same IIS 6 website and virtua... | [
0.7006215453147888,
0.18412357568740845,
0.387666791677475,
-0.0722312182188034,
-0.05863633006811142,
-0.7172116637229919,
0.18830665946006775,
-0.09280252456665039,
-0.20390862226486206,
-0.5371522307395935,
-0.10417834669351578,
0.39814817905426025,
-0.14195853471755981,
0.6368437409400... | |
expect you might need to [enable ASP.NET compatibility mode](http://msdn.microsoft.com/en-us/library/ms752234.aspx). The other thing to try is making the address explicit (rather than relative) in the WCF config.
No, it doesn't matter about separate dlls, and it *shouldn't* matter about accounts (although anything is ... | [
0.3339615762233734,
-0.02176663652062416,
0.40860220789909363,
-0.009160882793366909,
0.055259499698877335,
-0.37167593836784363,
0.5193397402763367,
-0.002187843434512615,
-0.24041780829429626,
-0.9489026069641113,
-0.29297852516174316,
0.547192394733429,
-0.08949767053127289,
0.039218313... | |
Is there any way that I can connect to a server DB (Oracle, MS SQL, Sybase, ...) from a Windows Mobile application (written in C# using VS 2008). Is there support for say ODBC or another technologie? I'm connecting to a LAN via WLAN or via UMTS.
There is no possibility for me to install an additional server component.... | [
0.3390551507472992,
-0.03335389494895935,
0.31740128993988037,
0.28897130489349365,
0.08316031843423843,
0.03569484502077103,
0.012044381350278854,
0.04228711128234863,
-0.20913441479206085,
-0.580856442451477,
-0.05183880776166916,
0.4186152219772339,
-0.22984208166599274,
-0.018695734441... | |
I wonder if anyone has tried velocity in a production environment. It is in CTP2 version right now, and we are thinking of using it. Has anyone tried it? If yes was it a positive experience?
Sure [System.Data.SqlClient](http://technet.microsoft.com/en-us/library/ms173281.aspx) for SQL Server works just fine. For Oracle... | [
-0.03826257213950157,
-0.2753990590572357,
0.8254907131195068,
0.3667393624782562,
-0.028013741597533226,
-0.07804859429597855,
-0.1516675502061844,
0.15645332634449005,
-0.3803144693374634,
-0.6913865208625793,
0.2902836501598358,
0.5502728819847107,
-0.00014927686424925923,
0.03527443110... | |
Where does xhost store the allowed network addresses?
`xhost` simply calls [`XAddHost` etc.](http://www.xfree86.org/current/XAddHost.3.html), which manipulates a list held by the server. See [`xhost/xhost.c`](http://cgit.freedesktop.org/xorg/app/xhost/tree/xhost.c) for the client-side and [`xserver/os/access.c`](http:/... | [
-0.04572936147451401,
0.16953054070472717,
0.6820206642150879,
0.02671915665268898,
0.08900030702352524,
-0.46913498640060425,
0.014746028929948807,
0.06971258670091629,
-0.3044807016849518,
-0.4090728461742401,
-0.3670785129070282,
0.4950340688228607,
-0.3822286128997803,
0.21139489114284... | |
I will connect with one database from several machines. In all machines they need to insert the data in single table. In that time: how to use multithreading and deadlock concepts? Using the MySQL database and also MS Access.
If you are talking about an SQL server (MySQL) then the thread safty is not your problem. It's... | [
0.520289957523346,
0.0506708025932312,
0.34415557980537415,
0.33224934339523315,
0.06258945167064667,
-0.02071634866297245,
0.10205332934856415,
0.34318283200263977,
-0.3761347830295563,
-0.7284305095672607,
0.3522871732711792,
0.3725367486476898,
-0.2901346981525421,
0.5846214294433594,
... | |
I have some problem with inserting image when i generate pdf using FPDF library (ASP port version) you can get it here [ASP FPDF](http://www.aspxnet.it)
I have tried this code (this was ASP VBScript):
```
pdf.Image Server.MapPath("map.jpg"), 10, 10, 800, 400
pdf.Image "map.jpg", 10, 10, 800, 400
pdf.Image "http://... | [
-0.1528617888689041,
-0.1191459521651268,
0.41808485984802246,
0.018839605152606964,
-0.20889781415462494,
-0.02532750740647316,
0.3413773477077484,
-0.08977474272251129,
-0.24497897922992706,
-0.9304364323616028,
0.04127133637666702,
0.7121272683143616,
-0.30144035816192627,
-0.3484481275... | |
image in the header. the problem i have is i want to use a variable for the image, when i put the variable name instead of the image name i get an error:
Microsoft JScript runtime error '800a138f'
'undefined' is null or not an object
/EKtestdb/fpdf/fpdf/includes/Basics.asp, line 121
```
this.Header=function He... | [
0.3846963346004486,
-0.11513721197843552,
0.9169499278068542,
0.06700076907873154,
-0.013533531688153744,
-0.1958165168762207,
0.27813777327537537,
-0.3575277626514435,
-0.09666101634502411,
-0.6812286972999573,
-0.2788267731666565,
0.8041707873344421,
-0.2717019021511078,
-0.2702417075634... | |
= s.lastIndexOf(ch)
if (res>0-1){return res}else{return false}
}
this.strpos=function strpos(s,ch,start){
if (arguments.length<3){start=0}
res = s.indexOf(ch,start);
if (res>-1){return res}else{return false}
}
```
if you just want to display an image this line should work:
```
this.Image('logoSM1.jpg',165,3,33)
... | [
0.35627758502960205,
-0.31311219930648804,
0.8606985211372375,
-0.27473798394203186,
-0.11554595828056335,
0.12689146399497986,
0.19563134014606476,
-0.31138330698013306,
-0.30951356887817383,
-0.7853090763092041,
-0.1878456324338913,
0.49696630239486694,
-0.19358280301094055,
0.0754215046... | |
I want to make an app where every single item is unique. I could not find out much information about the Store Kit in iPhone OS 3.0. Do I have to upload all these download-items to the App Store? Or can the download be made from my own server?
Example:
I have 10 items in my app that people can buy. They are highly ex... | [
0.6395030617713928,
0.06959783285856247,
0.16362884640693665,
0.30584725737571716,
-0.029823176562786102,
0.1721605807542801,
0.03584236279129982,
0.07281863689422607,
-0.5014408230781555,
-0.3062596619129181,
0.09273926913738251,
0.3647267818450928,
-0.027034156024456024,
0.28048470616340... | |
on the apple developer forums - the 3.0 API is under an NDA and cannot be discussed on a public forum like this.
That said, I would imagine the in-app purchases are held to the same standards as app purchases - each item that you offer for sale must be approved by Apple. | [
0.6332029700279236,
0.24737875163555145,
0.07338857650756836,
-0.05192521587014198,
0.060945507138967514,
-0.35774391889572144,
0.10005825757980347,
0.04234546050429344,
-0.15249723196029663,
-0.5243471264839172,
-0.21827419102191925,
0.5298718810081482,
0.10835999995470047,
0.065178014338... | |
I need to parse an xml string and find values of specific text nodes, attribute values etc.
I'm doing this in javascript and was using the DOMParser class for the same. Later I was informed that DOM is takes up a lot of memory and SAX is a better option.
Recently I found that XPath too provides a simple way to find no... | [
0.0452730618417263,
0.054589368402957916,
0.4358172118663788,
0.01592150516808033,
-0.2109781950712204,
-0.28210312128067017,
0.2283211350440979,
-0.05257660150527954,
-0.3045867383480072,
-0.6862397193908691,
-0.11849214881658554,
0.7958652377128601,
-0.31194305419921875,
0.08094021677970... | |
the other hand is more robust - it reads the entire XML document into a tree, and is very efficient when you want to alter, add, remove data in that XML tree. XPath is useful when you only need a couple of values from the XML document, and you know where to find them (you know the path of the data, /root/item/challange... | [
-0.2384546995162964,
-0.11289218813180923,
0.5670839548110962,
0.19192959368228912,
-0.10138510167598724,
-0.24004283547401428,
0.04294133186340332,
-0.41283535957336426,
-0.37767937779426575,
-0.5428927540779114,
-0.3055182695388794,
0.9215859770774841,
0.15498094260692596,
-0.46518146991... | |
I am developing a WPF application where the 3D part is handled by DirectX 9 (a lot of 3d that did not run fast enough using WPF).
The problem is the application is released with "Any CPU" as configuration and when a user runs it on a 64 bit windows, the direcX part crashes (System.BadImageFormatException). Apparently... | [
0.2544257938861847,
0.25119584798812866,
0.3712562620639801,
0.040947578847408295,
-0.08786218613386154,
-0.20947051048278809,
0.27724215388298035,
-0.00024545632186345756,
0.22169549763202667,
-0.7249866724014282,
0.02736462838947773,
0.6624053120613098,
-0.6134118437767029,
0.35058799386... | |
built for x64 if the user are running on a 64 bit windows machine. Do any of you know where I can find DirectX 9 dlls for x64? If they exist at all.
The ones I need are:
* Microsoft.DirectX.Direct3D
* Microsoft.DirectX.Direct3DX
* Microsoft.DirectX
If they do not exist, can the problem be solved in some other way? ... | [
0.4955346882343292,
0.10607273131608963,
0.3964390754699707,
0.08433473855257034,
-0.11991139501333237,
-0.06966196000576019,
0.007028397638350725,
0.2829322814941406,
-0.0009390611667186022,
-0.9050039052963257,
-0.122743159532547,
0.6760803461074829,
-0.5477491617202759,
0.26742187142372... | |
and that the winforms part is using the DirectX dlls I am asking about. This was a much better and faster way of presenting a lot of 3D meshes in WPF than to use WPF:s 3D. Unfortunately this problem occurred instead.
The DLL's you need are for Managed DirectX. Unfortunately Microsoft no longer supports Managed DirectX ... | [
0.4623797833919525,
-0.08104739338159561,
0.4340888261795044,
0.20148228108882904,
-0.15946820378303528,
-0.05674911290407181,
-0.010528531856834888,
0.40642035007476807,
0.10983509570360184,
-0.6704432964324951,
0.19860075414180756,
0.8186996579170227,
-0.21134346723556519,
0.101809322834... | |
I have a need to read a CSV file, and the only language I can use is VBscript.
I'm currently just opening the file and splitting on commas, and it's working OK because there aren't any quoted commas in fields. But I'm aware this is an incredibly fragile solution.
So, is there such a thing as a VBscript module I can u... | [
0.48876485228538513,
0.34879037737846375,
0.2261992245912552,
-0.04363089054822922,
-0.3723444938659668,
-0.18073464930057526,
0.42951855063438416,
0.04220535233616829,
-0.153390035033226,
-0.56795734167099,
0.06547727435827255,
0.3619813323020935,
-0.3821207582950592,
0.1318686604499817,
... | |
a database table. The code would go something like this:
*(The funny comments are solely to fix SO's broken VB syntax highlighting)*
```
Dim conn ''// As ADODB.Connection
Dim rs ''// As ADODB.RecordSet
Dim connStr ''// As String
Dim dataDir ''// As String
dataDir = "C:\" '"
connStr = ... | [
0.140329971909523,
-0.019063731655478477,
0.6751600503921509,
0.05257342755794525,
-0.04735375568270683,
0.050631117075681686,
0.2243048995733261,
-0.43904194235801697,
-0.2604653537273407,
-0.4056212902069092,
-0.07625368982553482,
0.36342379450798035,
-0.6377848386764526,
0.1775322109460... | |
rs.Fields("Col1Name").Value
If Not rs.EOF Then
rs.MoveNext
WScript.Echo rs.Fields("Col3Name").Value
End If
''// explicitly closing stuff is somewhat optional
''// in this script, but consider it a good habit
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
```
Creating a [`schema.ini`](http://msdn.micros... | [
-0.13068893551826477,
0.1748335063457489,
0.6711474657058716,
-0.25797101855278015,
-0.25649526715278625,
-0.12017910927534103,
0.2896622121334076,
-0.5336781740188599,
-0.19037652015686035,
-0.36518529057502747,
-0.23160837590694427,
0.45965373516082764,
-0.3677457571029663,
-0.0902053713... | |
ADO About Text Files](http://msdn.microsoft.com/en-us/library/ms974559.aspx) off the MSDN. | [
0.14973531663417816,
0.24429376423358917,
0.4032749831676483,
0.15341180562973022,
0.14176274836063385,
-0.5295825600624084,
0.13964411616325378,
0.13237981498241425,
-0.23552854359149933,
-0.45084652304649353,
-0.31501415371894836,
0.6618104577064514,
-0.32973286509513855,
0.2770200371742... | |
There is a strange behaviour with `json_encode` and `json_decode` and I can't find a solution:
My php application calls a php web service. The webservice returns json that looks like this:
```
var_dump($foo):
string(62) "{"action":"set","user":"123123123123","status":"OK"}"
```
now I like to decode the json in my ... | [
0.07285749912261963,
0.27634987235069275,
0.29096919298171997,
-0.18562375009059906,
-0.1564197689294815,
0.022243143990635872,
0.6566807627677917,
-0.06581933051347733,
-0.25985410809516907,
-0.44620630145072937,
-0.2376841902732849,
0.5733153223991394,
-0.5104804039001465,
0.248219862580... | |
know why this byte sequence is displayed as `` here.
Essentially the system you aquire the data from sends it encoded in UTF-8 with a BOM preceding the data. You should remove the first three bytes from the string before you throw it into `json_decode()` (a `substr($string, 3)` will do).
```
string(62) "{"action":"... | [
0.09151477366685867,
0.2150600254535675,
0.16098512709140778,
-0.21783027052879333,
-0.09620825946331024,
-0.11052162200212479,
0.07491336762905121,
-0.21348553895950317,
-0.31882113218307495,
-0.11000948399305344,
-0.4380030333995819,
0.26076987385749817,
-0.45731303095817566,
0.172568783... | |
`json_decode` fails. The string in its given form is not correctly a JSON formated structure (see [RFC 4627](http://www.ietf.org/rfc/rfc4627.txt)) | [
-0.07305163145065308,
0.1580805629491806,
0.013330858200788498,
-0.18944686651229858,
0.02964750863611698,
-0.2721251845359802,
0.5023925304412842,
-0.1736663579940796,
-0.1707577258348465,
-0.3327578604221344,
-0.8324241638183594,
0.401701420545578,
-0.5147072672843933,
0.1118849143385887... | |
Sun's virtualbox windows binaries are under 'non-commercial' license so can't be used in any company. But source code is GPL. Is it any resource on the network that has a virtualbox compiled binaries for windows?
Added a bounty to see if I can get a little more feedback.
I don't Know what exactly you are going to do w... | [
0.8212271332740784,
0.24159134924411774,
0.07576798647642136,
-0.046987634152173996,
-0.02664348855614662,
-0.5322489142417908,
0.042843542993068695,
0.105152428150177,
-0.13228850066661835,
-0.6884524822235107,
0.008088958449661732,
0.41088801622390747,
-0.38090386986732483,
-0.0989202037... | |
in your Company you will be able to use the commercial licence
> Q: What exactly do you mean by personal use and academic use in the
> Personal Use and Evaluation License?
>
>
> A: Personal use is when you install
> the product on one or more PCs
> yourself and you make use of it (or
> even your friend, sister a... | [
0.6134693622589111,
0.5598340630531311,
0.5418136715888977,
-0.15772086381912231,
0.14731170237064362,
-0.31356969475746155,
0.026507027447223663,
0.06312692910432816,
-0.17767086625099182,
-0.32813534140586853,
-0.08140987902879715,
0.5132648348808289,
0.24057593941688538,
-0.120716199278... | |
company, this is
> still personal use. However, if you
> are an administrator and want to
> deploy it to the 500 desktops in your
> company, this would no longer qualify
> as personal use. Well, you could ask
> each of your 500 employees to install
> VirtualBox but don't you think we
> deserve some money in thi... | [
0.4215511381626129,
0.21064479649066925,
0.3678247928619385,
0.09869847446680069,
0.30937227606773376,
-0.1794855147600174,
0.09425626695156097,
0.28323811292648315,
-0.2518470883369446,
-0.6210989952087402,
0.10904548317193985,
0.5004914402961731,
-0.10288982093334198,
0.0422113835811615,... | |
Just downloaded the [Silverlight 3 Toolkit](http://silverlight.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=20430) and executed the MSI file.
Now I need to reference the Microsoft.Windows.Controls.dll file but don't know where MSI unpacked it. Can't find it at C:\ or in C:\Program Files. **Where might it be?**
... | [
0.47532784938812256,
0.14400236308574677,
0.4566970765590668,
0.18819035589694977,
-0.10527211427688599,
-0.38238760828971863,
0.39906221628189087,
-0.20084354281425476,
-0.3083265721797943,
-0.48433905839920044,
-0.10997148603200912,
0.5527345538139343,
-0.2523546516895294,
-0.01729146391... | |
After restarting everything, it works fine: the controls are automatically in the toolbox so you just have to drag them in, [no need referencing the dll anymore as in Silverlight 2](http://www.tanguay.info/web/index.php?pg=howtos&id=1).
The July 2009 release of the Silverlight Toolkit added a "Open the welcome page" ch... | [
0.04954617843031883,
-0.2750643789768219,
0.6778751015663147,
0.16114071011543274,
-0.1518428474664688,
-0.3386077582836151,
0.36998656392097473,
0.13693132996559143,
-0.42932477593421936,
-0.31623730063438416,
-0.332979291677475,
0.6067226529121399,
-0.3122577667236328,
-0.150941625237464... | |
installed, including links to all the binaries, themes, the documentation, etc.
Also, since the controls are all referenced through the AssemblyFolderEx registry key, you can add a GAC-style reference in your C# or VB.NET project...
```
<Reference Include="System.Windows.Controls.Input.Toolkit" />
```
And that wil... | [
0.46625781059265137,
0.004747801460325718,
0.47471094131469727,
0.2704104781150818,
0.17325834929943085,
-0.4907649755477905,
-0.1709122210741043,
0.15138724446296692,
-0.1290416121482849,
-0.7396755814552307,
-0.17483088374137878,
0.7029245495796204,
-0.4276984632015228,
0.110864318907260... | |
In a simple web page I load some new HTML into a **div** using *load(url)*
Works fine in most browsers but, surprise, surprise, IE7 behaves differently.
All the other browsers apply the pages CSS styles to the newly loaded HTML but IE7 doesn't.
Any ideas?
Ken
---
**Update**
The new HTML is just a code fragment, e.g... | [
0.23252016305923462,
-0.000057201581512345,
0.457037091255188,
-0.1316848248243332,
-0.19006642699241638,
-0.3247578740119934,
0.5948054790496826,
-0.17877288162708282,
-0.26244714856147766,
-0.6450953483581543,
-0.4423494338989258,
0.47933685779571533,
-0.3334997594356537,
0.0020045824348... | |
$("#nav-home").click(function() {
$("#girc-content").load("home.html");
});
.
.
.
```
**Update** On further investigation the problem appears to be slightly more odd than I thought.
I tried Steerpike's suggestion because I originally thought the problem was that the CSS styles were not being app... | [
0.33516621589660645,
0.16503499448299408,
0.35417503118515015,
-0.3548954129219055,
-0.050235576927661896,
-0.017700403928756714,
0.345707505941391,
-0.00016587902791798115,
-0.19379408657550812,
-0.6369649767875671,
-0.23251698911190033,
0.5697465538978577,
-0.2584817707538605,
0.24745315... | |
the master HTML page or the page you're loading? If they're in the page you're loading it seems that IE strips out script and style tags from XMLHttpRequest objects.
Given that it's not that and I'm intrigued I constructed a sample:
```
<html>
<head>
<title>test</title>
<style type="text/css">
#girc-content { border:... | [
0.18751388788223267,
-0.08724287152290344,
0.6259996891021729,
-0.020302899181842804,
-0.334231436252594,
-0.10175400972366333,
0.36293208599090576,
-0.6191375255584717,
-0.11071658879518509,
-0.7280500531196594,
-0.004032398574054241,
0.2514294385910034,
-0.140526682138443,
-0.01540318597... | |
no IE7 any more).
I did notice when I copied your google onload snippet that you were missing some closing braces/parentheses. Was this just a cut and paste error or a problem with your Javascript? It might explain the inconsistent behaviour. | [
0.5834136009216309,
-0.09247111529111862,
0.07459167391061783,
0.13218910992145538,
0.0051756324246525764,
0.008870067074894905,
0.6418167948722839,
0.5435043573379517,
-0.298618882894516,
-0.5457508563995361,
0.1490611582994461,
0.5095375180244446,
-0.22755083441734314,
-0.117940180003643... | |
In order to allocate enough space for an array element for each weekday of a year, I'm trying to work out the maximum number of rows I would need. That lead me onto the question of how I would work it out.
Would you have to calculate the number of days in every year for the next n years and go with that? Or is there ... | [
0.46544739603996277,
-0.131998211145401,
0.5010696053504944,
0.07861778140068054,
0.001190566341392696,
0.31814146041870117,
0.2651534974575043,
0.26597827672958374,
-0.984411895275116,
-0.06686565279960632,
0.046932656317949295,
-0.0222936999052763,
-0.04099740833044052,
0.346006214618682... | |
those 52 weeks there are at least 52 \* 5 = 260 weekdays.
We are left with 2 days (52 \* 7 = 364), it is possible that these 2 days are weekdays.
So maximum number of weekdays in a year is 262. | [
0.25550076365470886,
0.2440032809972763,
0.4237353801727295,
-0.3728470802307129,
-0.11655419319868088,
0.14772416651248932,
0.7679678797721863,
0.2701495885848999,
-0.9330315589904785,
0.027909863740205765,
-0.42816999554634094,
0.16649432480335236,
0.006212368607521057,
0.066155560314655... | |
I am looking for a data aware Tree View for delphi
what is the best one to use ?
I would recommend the [DevExpress](http://www.devexpress.com/Products/VCL/ExQuantumTreeList/) QuantumTreeList. It looks really nice, is fast and data aware. | [
0.1744139939546585,
-0.44461971521377563,
0.3313227593898773,
0.15670502185821533,
-0.14480453729629517,
-0.2851882874965668,
0.027219608426094055,
0.13492760062217712,
-0.22080427408218384,
-0.6706380844116211,
-0.06352382898330688,
0.3129829168319702,
-0.14011624455451965,
-0.03772151470... | |
All of a sudden I keep getting a `MetadataException` on instantiating my generated `ObjectContext` class. The connection string in App.Config looks correct - hasn't changed since last it worked - and I've tried regenerating a new model (edmx-file) from the underlying database with no change.
Anyone have any ideas?
Fu... | [
0.27394556999206543,
0.1511847823858261,
0.31168633699417114,
0.017146915197372437,
-0.10429566353559494,
-0.03177529573440552,
0.33935654163360596,
0.2709084749221802,
-0.5114781856536865,
-0.612147331237793,
0.187379851937294,
0.4068710207939148,
-0.08322687447071075,
0.4622498154640198,... | |
I've even tried recreating the database, from scratch. No luck, whatsoever.
This means that the application is unable to load the EDMX. There are several things which can cause this.
* You might have changed the MetadataArtifactProcessing property of the model to Copy to Output Directory.
* The connection string could... | [
0.5850222110748291,
0.13705648481845856,
0.1163652092218399,
0.09179046005010605,
0.06265721470117569,
-0.03918910026550293,
0.3398805558681488,
0.07597269862890244,
-0.5970914363861084,
-0.4663410782814026,
0.3124433159828186,
0.640006959438324,
-0.2691414952278137,
0.3404124975204468,
... | |
is not really enough detail in your question to give an accurate answer, but hopefully these ideas should get you on the right track.
**Update:** I've written [a blog post with more complete steps for troubleshooting](http://www.craigstuntz.com/posts/2010-08-13-troubleshooting-entity-framework-connection-strings.html)... | [
0.3192276656627655,
-0.04444044083356857,
0.4831348657608032,
0.005769826006144285,
0.10314382612705231,
-0.26925474405288696,
0.8916559815406799,
0.12130054086446762,
-0.46604251861572266,
-0.4347098767757416,
0.1754620522260666,
0.4810296893119812,
0.12377939373254776,
-0.192906454205513... | |
A while back we were transferring our reasonably popular forum to a new dedicated server (with the same host), and we noticed something weird. At first we used the new server to host just the database as this was the biggest issue. Then later we transferred the forum files and changed the dns for the domain.
When we l... | [
0.4672577381134033,
0.03008405491709709,
0.4083172082901001,
0.2540002167224884,
-0.19858410954475403,
-0.18344147503376007,
0.02025248482823372,
0.21409131586551666,
-0.4938119947910309,
-0.41195669770240784,
0.2327105551958084,
0.3835366368293762,
-0.2786025106906891,
0.3087310492992401,... | |
4 times more network traffic then the server actually sends back to the user? It sounds very inefficient to me, like requesting much more than what is needed from the database, but this is the latest version of vBulletin we're talking about here.
vBulletin is known to use incredible amount of traffic between webserver ... | [
0.5163172483444214,
-0.10966610908508301,
0.6581683158874512,
0.27494415640830994,
-0.06251050531864166,
-0.32647889852523804,
0.3549957871437073,
0.037986110895872116,
-0.6672938466072083,
-0.5157517194747925,
0.3084025979042053,
0.566887617111206,
-0.45986801385879517,
0.3784867823123932... | |
than they actually present to the client.
So I would say it's normal for vBulletin, but not normal in most other software-solutions.
If you google regarding this issue I believe you would find a lot of people with the same issue.
example:
<http://www.vbulletin.org/forum/archive/index.php/t-111191.html>
If your host... | [
0.618584930896759,
0.005482963286340237,
0.48552167415618896,
0.30613943934440613,
-0.01413513720035553,
-0.28079405426979065,
0.177583709359169,
0.13984130322933197,
-0.5343711972236633,
-0.599204957485199,
-0.006551790051162243,
0.952177882194519,
-0.0754103884100914,
0.35363322496414185... | |
Are there any tools or IDE features to allow viewing of different parts of the *same* file side-by-side.
I've often thought this would be useful for analysing and refactoring duplicated code within a file.
notepad++ -> view -> clone to another view
You can even synchronize scrolling of two different positions on same... | [
0.5930603742599487,
-0.36876264214515686,
0.0315452478826046,
0.32269570231437683,
0.17198047041893005,
0.08146510273218155,
-0.1774664670228958,
0.24476341903209686,
-0.3248004615306854,
-0.89747554063797,
0.5081125497817993,
0.3980185091495514,
-0.20364801585674286,
0.09817776829004288,
... | |
If I have three entities, Project, ProjectRole and Person, where a Person can be a member of different Projects and be in different Project Roles (such as "Project Lead", or "Project Member") - how would you model such a relationship?
In the database, I currently have the following tablers: Project, Person, ProjectRol... | [
-0.06605493277311325,
-0.05103971064090729,
0.15959838032722473,
0.28060057759284973,
-0.09035530686378479,
0.30439746379852295,
-0.022999918088316917,
-0.17084774374961853,
-0.3499983251094818,
-0.3655071556568146,
0.21347978711128235,
0.19514155387878418,
0.08087395131587982,
0.420604288... | |
there is an example what a Project and ProjectMember would look like, but AddProjectMember() in Project would call ProjectMember.AddProject(). So Project has a List of ProjectMembers, and each ProjectMember in return has a reference to the Project. Looks a bit convoluted to me.
**update**
After reading more about thi... | [
0.22142399847507477,
-0.1330212652683258,
0.08892858028411865,
0.3072102665901184,
0.02960226684808731,
-0.037957821041345596,
0.05103174224495888,
0.12716639041900635,
-0.15469679236412048,
-0.6317681074142456,
-0.0774911493062973,
0.24924130737781525,
0.07529327273368835,
0.0692015141248... | |
the Role it will play. I do know for certain that persons will have to play roles inside a project, so I will model that relationship.
ProjectMembershipTypes can be created and modified. These can be "Project Leader", "Developer", "External Adviser", or something different.
A person can have many roles inside a proje... | [
-0.00862126424908638,
-0.4166766405105591,
0.28644588589668274,
0.2465483844280243,
0.35591578483581543,
0.19868747889995575,
0.05794487148523331,
0.14225776493549347,
-0.13946840167045593,
-0.7727835774421692,
-0.31913620233535767,
0.358676016330719,
-0.006595531944185495,
0.3284564912319... | |
Person Person { get; set; }
public virtual Project Project { get; set; }
public virtual DateTime From { get; set; }
public virtual DateTime Thru { get; set; }
// etc...
}
```
ProjectMembershipType: ie. "Project Manager", "Developer", "Adviser"
```
public class ProjectMembershipType : IRoleType
{
... | [
-0.21060322225093842,
-0.30823948979377747,
0.07567664235830307,
0.23884376883506775,
0.09685679525136948,
0.28067290782928467,
0.3314022719860077,
0.010229344479739666,
-0.061093442142009735,
-0.6333325505256653,
-0.24977296590805054,
0.502511203289032,
0.20539306104183197,
0.140224486589... | |
people working on it, and a person can work on multiple projects.
You're modeling the relation as a Project Role, which in addition to serving as a bi-directional link from Person <-> Project, also records a RoleType and start/end of that Person filling that RoleType on that Project. (Notice how the English work "that... | [
0.18205589056015015,
0.06386229395866394,
-0.043194495141506195,
0.16770943999290466,
-0.1517115831375122,
0.34084591269493103,
-0.16099633276462555,
-0.13256171345710754,
-0.5039048790931702,
-0.45466023683547974,
-0.14307674765586853,
0.238218292593956,
-0.04884185269474983,
0.1561121195... | |
a.person_id = ?
```
Or we can follow it in the other direction, from Project:
```
select a.person_id, b.project_role_id, c.project_id
from person a join project_role b on (a.id = b.person_id)
join project c on (b.project_id = c.id)
where c.project_id = ?
```
Ideally, we'd like to be able to do the same in the C# c... | [
-0.028092628344893456,
0.2112956941127777,
0.022257307544350624,
0.030404556542634964,
-0.044843725860118866,
0.11639077961444855,
-0.07776065915822983,
-0.33499330282211304,
-0.33574381470680237,
-0.40738534927368164,
-0.34569957852363586,
0.41915246844291687,
-0.3938407897949219,
-0.0723... | |
{
this.addProjectRole( new ProjectRole( p, &this, RoleType::UNASSIGNED ) ;
}
```
A ProjectRole doesn't have a list, it has-a reference to a Person and a reference to a Project. It also has, as values, a start date, an end date, and a RoleType (which either is an enum, or a class instance that mimics an enum value -... | [
-0.1165521964430809,
-0.24142612516880035,
0.5200799703598022,
-0.01553485356271267,
-0.02752533182501793,
-0.07922998815774918,
0.25338611006736755,
0.07839576154947281,
-0.28398415446281433,
-0.58912593126297,
-0.28484681248664856,
0.06583315134048462,
-0.29879966378211975,
0.25661003589... | |
in the code; lazy proxies that retrieve only on use can save us from that. Then if we're only currently concerned with the Person, and not his Roles (and Projects, we can just retrieve the Person. (NHibernate, for instance, I think does this more-or-less seamlessly.)
Basically, I think that:
1) This is a standard way... | [
-0.15258151292800903,
-0.03157712519168854,
-0.20512983202934265,
0.2624140679836273,
-0.25882405042648315,
0.032731927931308746,
0.0895862802863121,
0.06382394582033157,
0.039062753319740295,
-0.4416414499282837,
-0.2157686948776245,
0.5817034840583801,
-0.09250128269195557,
-0.0862783491... | |
In **Delphi**; what are the differences between Application.MessageBox, Windows.MessageBox or Dialogs.MessageDlg?
Or which is more efficient to use computer memory?
Windows.MessageBox **is** the WinAPI MessageBox, Application.MessageBox is a wrapper around it. Dialogs.MessageDlg however is a VCL form. So if you are con... | [
-0.07561803609132767,
-0.25561004877090454,
0.5075992345809937,
0.08803210407495499,
-0.17790336906909943,
-0.06251320987939835,
-0.18465207517147064,
-0.045383989810943604,
-0.34838342666625977,
-0.8873897790908813,
-0.09426265954971313,
0.3888377845287323,
-0.34500646591186523,
-0.084162... | |
How can I make a website multilingual?
I want to create a website and in the home page i want the client to choose a language from English and Arabic. Then the whole website is converted to that language. What should I do to achieve this? I am creating this website in asp.net 2.0 with C#
What you're asking for is a tut... | [
0.3328709900379181,
0.18038302659988403,
0.45456618070602417,
-0.11105577647686005,
-0.10985013842582703,
-0.20109309256076813,
0.4072814881801605,
0.5353166460990906,
-0.6678746342658997,
-0.7534408569335938,
-0.06313910335302353,
0.3765644431114197,
0.09283564984798431,
-0.05066351220011... | |
I'd like to change the following patterns:
```
getFoo_Bar
```
to:
```
getFoo_bar
```
(note the lower b)
Knowing neither foo nor bar, what is the replacement pattern?
I started writing
```
sed 's/\(get[A-Z][A-Za-z0-9]*_\)\([A-Z]\)/\1
```
but I'm stuck: I want to write "\2 lower case", how do I do that?
Maybe... | [
0.09788258373737335,
0.2287091761827469,
0.5150953531265259,
-0.24193942546844482,
0.10825992375612259,
0.22733309864997864,
0.30597254633903503,
-0.2487538903951645,
-0.19527548551559448,
-0.6984261870384216,
-0.21439935266971588,
0.32128986716270447,
-0.5271950364112854,
0.05131169408559... | |
I'm exploring Rails for the first time and trying to add some fairly straightforward role-based security to my test app. Some Googling seemed to indicate [rails-authorization](http://github.com/DocSavage/rails-authorization-plugin/tree/master) is the way to go for this. I followed the [README](http://github.com/DocSava... | [
-0.3518660366535187,
-0.09082327038049698,
0.3641594648361206,
-0.033595647662878036,
0.009140725247561932,
0.06169348955154419,
0.5024502873420715,
-0.41907158493995667,
0.10867811739444733,
-0.7334079146385193,
0.031024564057588577,
0.5174676179885864,
-0.18455760180950165,
-0.0587351061... | |
nil, authorizable_id: nil, created_at: "2009-03-27 11:02:35", updated_at: "2009-03-27 11:02:35">
>> u.has_role r
ActiveRecord::StatementInvalid: PGError: ERROR: column "id" does not exist
LINE 1: ....546623', '2009-03-27 11:42:16.546623', 5, 1) RETURNING "id"
... | [
-0.5265836119651794,
-0.11613983660936356,
0.49710705876350403,
-0.12466861307621002,
0.22463464736938477,
0.506788432598114,
0.07453074306249619,
-0.020219480618834496,
-0.09016477316617966,
-0.5834282636642456,
0.02114074118435383,
0.6869300603866577,
-0.1799989640712738,
0.0769013613462... | |
"user_id") VALUES('2009-03-27 11:42:16.546623', '2009-03-27 11:42:16.546623', 5, 1) RETURNING "id"
```
Am I just doing something silly, or is this a known issue? I found [essentially the same error](http://groups.google.com/group/rails-authorization-plugin/browse_thread/thread/db2f0f8995bef55a/a31a19c06bff2f18?lnk=gs... | [
-0.11370854079723358,
0.004763913806527853,
0.5612466931343079,
-0.0565464049577713,
0.10308573395013809,
0.19005857408046722,
0.22044801712036133,
-0.49265018105506897,
-0.21627244353294373,
-0.5022342205047607,
0.28021591901779175,
0.6011156439781189,
-0.2945818603038788,
-0.009994045831... | |
ADD PRIMARY KEY (user_id, role_id);
```
This solved the problem in my case, which seems to be Postgres-specific. | [
0.1705877184867859,
0.1997474879026413,
0.17583997547626495,
-0.2848507761955261,
-0.014163029380142689,
-0.3809199333190918,
0.10481934994459152,
0.11839921027421951,
0.1284000426530838,
-0.4945796728134155,
-0.2940870523452759,
0.7219216823577881,
-0.31085005402565,
0.06135715916752815,
... | |
Why it is not allowed to assign null to a DateTime in C#? How has this been implemented? And can this feature be used to make your own classes non-nullable?
Example:
```
string stringTest = null; // Okay
DateTime dateTimeTest = null; // Compile error
```
I know that I can use `DateTime?` in C# 2.0 to allow null to ... | [
-0.09479814022779465,
-0.044341493397951126,
0.12029771506786346,
-0.13737991452217102,
0.020711712539196014,
-0.3054577112197876,
0.1083567887544632,
0.07660501450300217,
-0.2197660356760025,
-0.2019766867160797,
0.028547773137688637,
0.30510520935058594,
-0.540807843208313,
0.05146326124... | |
etc). That is the key difference. A reference can always be null; a value can't (unless it uses `Nullable<T>` - i.e. `DateTime?`), although it can be zero'd (`DateTime.MinValue`), which is often interpreted as the same thing as null (esp. in 1.1). | [
0.44429364800453186,
-0.20085228979587555,
0.1647833287715912,
-0.16663745045661926,
0.28981733322143555,
-0.1566862314939499,
0.14093966782093048,
0.1971450001001358,
-0.05779825150966644,
-0.2644325792789459,
-0.3304743468761444,
0.26794081926345825,
-0.3368335962295532,
0.58475130796432... | |
I have a set of students (referred to as items in the title for generality). Amongst these students, some have a reputation for being rambunctious. We are told about a set of hate relationships of the form 'i hates j'. 'i hates j' does **not** imply 'j hates i'. We are supposed to arrange the students in rows (front mo... | [
0.42419546842575073,
0.44377946853637695,
0.07270001620054245,
-0.002895198529586196,
-0.23630616068840027,
0.35663676261901855,
0.3137286305427551,
0.3111371397972107,
-0.0855553150177002,
-0.5929031372070312,
-0.3333788216114044,
-0.035005323588848114,
0.42393356561660767,
0.390746563673... | |
j's row) so that i doesn't throw anything at j (Turning back is not allowed). What would be an efficient algorithm to find the minimum number of rows needed (each row need not have the same number of students)?
We will make the following assumptions:
1) If we model this as a directed graph, there are no cycles in the... | [
0.20753148198127747,
0.21807211637496948,
-0.05484124645590782,
-0.1697254329919815,
-0.7013310194015503,
0.24916747212409973,
0.5887861847877502,
-0.031163545325398445,
-0.17697744071483612,
-0.6931936740875244,
-0.14195501804351807,
0.17136968672275543,
-0.5208449959754944,
0.23659071326... | |
at least hates one other student. Of course, there would be students who are both hated by some and who in turn hate other students. This means that there are no stray students who don't form part of the graph.
**Update:** I have already thought of constructing a directed graph with i --> j if 'i hates j and doing top... | [
0.10957727581262589,
-0.1408758908510208,
0.2945069372653961,
0.08856195956468582,
-0.5992517471313477,
-0.09972482919692993,
0.32819053530693054,
0.32597774267196655,
-0.1662384271621704,
-0.804972767829895,
-0.04244968295097351,
0.09592853486537933,
-0.2601126730442047,
0.200208157300949... | |
in the change into topological sort so it gives me what I want.
When you answer, please state the complexity of your solution. If anybody is giving code and you don't mind the language, then I'd prefer Java but of course any other language is just as fine.
JFYI This is not for any kind of homework (I am not a stude... | [
-0.1594417691230774,
-0.2398957908153534,
0.07528971880674362,
-0.1049763634800911,
-0.2607409954071045,
0.018833015114068985,
-0.18195946514606476,
0.1472753882408142,
-0.3719826340675354,
-0.8379583358764648,
-0.015188057906925678,
-0.18459346890449524,
-0.469901978969574,
-0.07633019238... | |
graph without loops. There is an arc from vertex `a` to vertex `b` if and only if `a` hates `b`. Let's assume there is a source (without incoming arcs) and destination (without outgoing arcs) vertex. If that is not the case, just add imaginary ones. Now we want to find length of a longest path from source to destinatio... | [
-0.13618171215057373,
-0.156258687376976,
0.4352567195892334,
0.14494630694389343,
-0.2839128375053406,
-0.05429838225245476,
0.4783409535884857,
-0.047402575612068176,
-0.6233943700790405,
-0.8731160759925842,
-0.1442418396472931,
-0.012197713367640972,
-0.6174036264419556,
0.320186406373... | |
rank:
```
0) r_0[v] := 0 for all verteces v
repeat
t) r_t[end(j)] := max( r_{t-1}[end(j)], r_{t-1}[start(j)] + 1 ) for all arcs j
until for all arcs j r_{t+1}[end(j)] = r_t[end(j)] // i.e. no changes on this iteration
```
On each step at least one vertex increases its rank. Therefore in this form complexity is ... | [
-0.2639645040035248,
-0.13458259403705597,
0.5093324184417725,
-0.029045965522527695,
-0.29289117455482483,
0.14438743889331818,
0.3565935492515564,
-0.4124414920806885,
-0.36912834644317627,
-0.7026907205581665,
-0.2076781988143921,
0.3821795880794525,
-0.006439270917326212,
0.15037372708... | |
range(N)
# source has index 0, destination has index N-1
# E is a list of edges, i.e. tuples of the form (start vertex, end vertex)
R = [0] * len(V)
do:
changes = False
for e in E:
if R[e[1]] < R[e[0]] + 1:
changes = True
R[e[1]] = R[e[0]] + 1
while changes
# The answer is derive... | [
-0.08663821965456009,
-0.19670097529888153,
0.7470842003822327,
-0.21657028794288635,
-0.15072794258594513,
0.05406684800982475,
0.38233888149261475,
-0.6679832339286804,
-0.015662088990211487,
-0.5884247422218323,
-0.3630020022392273,
0.5590807795524597,
-0.42327120900154114,
0.0278852917... | |
can be optimized, and time estimate can be better.
**Edit2:** obvious optimization - update only verteces adjacent to those that were updated on the previous step. I.e. introduce a queue with verteces whose rank was updated. Also for edge storing one should use adjacency lists. With such optimization complexity would ... | [
-0.5032432675361633,
-0.1978873610496521,
0.34367796778678894,
0.04637649655342102,
-0.17874246835708618,
0.2791072130203247,
0.14969545602798462,
-0.23166993260383606,
-0.4271606206893921,
-1.0097143650054932,
-0.19682642817497253,
0.3273606300354004,
-0.48885032534599304,
-0.072470076382... | |
I looking to hack something like this:
**[An example](http://www.menlotravel.com/)** >> Just click on "Start PicLens Lite Slideshow PicLens".
Did you see how the swf/flash loads on top of the normal page?
Im looking to do that **:-D**
If there is some code out there the **better** otherwise any tips or hits are welc... | [
0.7952279448509216,
0.10506849735975266,
0.14297553896903992,
0.134996697306633,
-0.35520610213279724,
-0.013569366186857224,
0.23158201575279236,
0.1553395837545395,
-0.38906601071357727,
-0.87652587890625,
0.1816907674074173,
0.6626277565956116,
-0.09074760973453522,
0.09879735112190247,... | |
I saw a tool which can tell you if you have design problem in your project and I'm wondering if there is a tool which can tell you dynamically if there are some concurrency problems in your project.
Chess from MS Research is great (<http://research.microsoft.com/en-us/projects/chess/>)
It detects Concurrency Bugs with ... | [
-0.06719737499952316,
-0.1829555183649063,
-0.21293948590755463,
0.28272545337677,
-0.07884883880615234,
-0.23769453167915344,
-0.0050537437200546265,
0.08985497057437897,
-0.5844117999076843,
-0.3524440824985504,
0.45326220989227295,
0.36784330010414124,
-0.11212482303380966,
0.1864458173... | |
```
int fn();
void whatever()
{
(void) fn();
}
```
Is there any reason for casting an unused return value to void, or am I right in thinking it's a complete waste of time?
David's [answer](https://stackoverflow.com/questions/689677/casting-unused-return-values-to-void/689688#689688) pretty much covers the motiva... | [
0.3614896535873413,
0.4249756634235382,
0.0011737479362636805,
-0.3485279381275177,
0.03983281925320625,
-0.22158190608024597,
0.377005934715271,
-0.07801803201436996,
0.0219091959297657,
-0.23819679021835327,
-0.1819385588169098,
0.5529621243476868,
-0.30068179965019226,
0.113405548036098... | |
reviewing a coding standard or writing one, then it's also a good idea to explicitly state that calls to overloaded operators (not using function call notation) should be exempt from this too:
```
class A {};
A operator+(A const &, A const &);
int main () {
A a;
a + a; // Not a problem
(void)ope... | [
0.13486145436763763,
-0.06321464478969574,
-0.09604862332344055,
-0.16082598268985748,
0.010225740261375904,
-0.18018700182437897,
0.34632954001426697,
-0.5000560879707336,
-0.0914241224527359,
-0.10712658613920212,
-0.5144450664520264,
0.6201774477958679,
-0.6606881618499756,
-0.225894868... | |
Is there any way to get `HttpContext.Current.Request.Url.Host` and `HttpContext.Current.Request.ApplicationPath` in one call?
Something like "full application url"?
EDIT: Clarification - what I need is this the part within []:
```
http://[www.mysite.com/mywebapp]/Pages/Default.aspx
```
I ask simply out of curiosi... | [
-0.21987175941467285,
0.10836335271596909,
0.6916840672492981,
0.06938115507364273,
0.1009749323129654,
-0.03240454941987991,
0.45865005254745483,
-0.10023835301399231,
-0.22018232941627502,
-0.6812533140182495,
-0.37241417169570923,
0.4603719413280487,
-0.4043373465538025,
0.0304953474551... | |
+ HttpContext.Current.Request.Url.Host + HttpContext.Current.Request.ApplicationPath;
}
```
```
public static string GetSiteRoot()
{
string port = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_PORT"];
if (port == null || port == "80" || port == "443")
port = "";
else
port = ":" + port;
... | [
-0.5577974319458008,
-0.12713003158569336,
1.1413277387619019,
-0.20112274587154388,
-0.0019648843444883823,
-0.028647001832723618,
0.4805013835430145,
-0.43749767541885376,
-0.4992714524269104,
-0.560652494430542,
-0.7116259336471558,
0.5479216575622559,
-0.3963162899017334,
0.31368967890... | |
I am looking for a web based svn admin that can use LDAP Users and Groups which can create repos add/modify hooks of a repo through the web interface.
For example you have a LDAP group that has access to multiple repos. You can then have one user in the group that can be an admin of all users in the group.
This admi... | [
0.3870247006416321,
-0.07340770959854126,
0.24467849731445312,
0.12233792990446091,
-0.37222597002983093,
-0.03293260931968689,
0.018699949607253075,
-0.20925447344779968,
-0.08905559033155441,
-0.5738322138786316,
0.05956796929240227,
0.5347912907600403,
-0.40725937485694885,
-0.009823385... | |
development.
Is there a web admin tool for svn that does all of this?
VisualSVN Server is definitely the way to go. However, you can't administer permissions or hooks from the web interface. I use remote desktop to administer our install on the server. I also don't think there's any way to set admin permissions as you... | [
0.5047121644020081,
0.02979329787194729,
0.2853676378726959,
0.2834671437740326,
-0.35487958788871765,
-0.1415545493364334,
0.2042444944381714,
0.02786889113485813,
-0.03517733886837959,
-0.6055874228477478,
-0.10060959309339523,
0.34363698959350586,
0.137973815202713,
0.13626284897327423,... | |
When running ruby scripts as such
```
ruby some-script.rb
```
How would I include a file (e.g. configuration file) in it dynamically?
As you have found, the -r option is your friend. It also works with IRB:
```
irb -ropen-uri
```
Will do the same as `require 'open-uri'`
FWIW, the most common thing I need to incl... | [
0.14407309889793396,
0.08766800910234451,
0.10579351335763931,
-0.09230345487594604,
-0.2920690178871155,
-0.2532108426094055,
0.5369570255279541,
0.030273305252194405,
-0.07501281052827835,
-0.4695310592651367,
-0.050098054111003876,
0.899908185005188,
-0.487446665763855,
0.10161274671554... | |
it is one character, but thought it was extra polish to make me happier. | [
-0.054455000907182693,
-0.12781929969787598,
-0.14153046905994415,
0.06106813624501228,
-0.09471333026885986,
0.5098467469215393,
0.05154060572385788,
0.3593125641345978,
-0.07465684413909912,
-0.5534956455230713,
-0.16867542266845703,
0.05706407129764557,
0.47013676166534424,
0.0426749438... | |
I am trying to implement a C++/CLI class that implements both `IList` and `IList<T>`.
Since they have overlapping names, I have to implement one of them explicitly, and the natural choice should be IList.
The implicit implementation of the indexer is:
```
using namespace System::Collections::Generic;
generic<class I... | [
-0.05069124326109886,
-0.10806852579116821,
0.3903488516807556,
-0.0381983257830143,
-0.1053684875369072,
0.16460268199443817,
-0.006543661467730999,
-0.22198691964149475,
-0.0451698936522007,
-0.8762571215629578,
0.008069179020822048,
0.7118370532989502,
-0.5295169949531555,
0.10655371099... | |
Object^ System::Collections::IList::get(int index);
virtual void System::Collections::IList::set(int index, Object^ item);
}
```
but that just gives me
> error C2061: syntax error : identifier 'default'
Any hints?
[JaredPar's answer](https://stackoverflow.com/questions/689704/c-cli-implementing-ilist-and-ilis... | [
-0.31530681252479553,
-0.058887504041194916,
0.5165214538574219,
-0.06053347885608673,
-0.057481274008750916,
0.1267988234758377,
0.2775239646434784,
-0.33542171120643616,
-0.2420179843902588,
-0.3857831656932831,
-0.4725659489631653,
0.8144228458404541,
-0.4866163432598114,
-0.22417594492... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.