text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
That would be helpful!
If you are using FF 3.0 then try removing the FireBug plugin and reinstalling it. You may have to clear out the prefs.js file for all the FireBug settings.
If you are using FF 3.1 then there really isn't a good solution at this time, and if you need to use FireBug I recommend downgrading. | [
0.3164132237434387,
0.07843910157680511,
0.08081535995006561,
0.006166466046124697,
-0.22453591227531433,
-0.2380673736333847,
0.3448445498943329,
-0.08100403100252151,
-0.10658914595842361,
-0.598651647567749,
-0.024716816842556,
0.7610667943954468,
-0.5394622087478638,
-0.028921658173203... | |
I have a canvas on my page and when i click a button i'm creating a new button dynamically on my canvas. So, i whant to keep my button somewhere where i can access anytime anywhere on my project( to change text for example, or to format it).Can someone give me a solution?
If you are using FF 3.0 then try removing the F... | [
0.48218846321105957,
-0.06451558321714401,
0.3460061550140381,
0.014512578025460243,
-0.11784730106592178,
-0.05908023566007614,
0.4044856131076813,
-0.11443697661161423,
-0.3982715308666229,
-1.050066351890564,
0.05466565862298012,
0.510129988193512,
-0.4977567493915558,
-0.12126689404249... | |
to use FireBug I recommend downgrading. | [
0.3659363389015198,
0.859727680683136,
-0.1817282885313034,
-0.3401287794113159,
-0.09209475666284561,
-0.21135537326335907,
0.41551467776298523,
0.112040676176548,
0.44526657462120056,
-0.5623019337654114,
0.1294836550951004,
0.6234740614891052,
-0.06892494112253189,
0.17307575047016144,
... | |
We just started using StyleCop and the one thing I'm having a hard time with is the documentation requirements. I don't want to debate the usefulness of the tool, I'm just wondering if anyone has any guidelines or ways of thinking about documenting methods that makes the comments actually useful. I find that my comment... | [
0.8105294108390808,
0.06805966049432755,
0.244369775056839,
0.089251309633255,
-0.19895654916763306,
-0.27598461508750916,
-0.2306855022907257,
-0.13574188947677612,
-0.40809670090675354,
-0.4249080717563629,
0.22359177470207214,
0.4196372628211975,
0.054528556764125824,
-0.057108752429485... | |
the user.
/// </param>
/// <returns>
/// A dto containing personal info.
/// </returns>
public PersonalInfoDTO GetPersonalInfoDTO(int userId) {...}
```
Is there a standard way of phrasing a summary vs a returns description? What do you put in your param descriptions?
I try to avoid duplicates by d... | [
0.29369932413101196,
0.37350228428840637,
0.4080018997192383,
0.1323326826095581,
-0.22350576519966125,
0.3091941773891449,
0.23515044152736664,
-0.30731427669525146,
-0.40572381019592285,
-0.44547584652900696,
0.1042429655790329,
0.4936491549015045,
-0.030044395476579666,
-0.1888858973979... | |
a dto of personal info by querying the current list of users (or active directory or SQL)
/// </summary>
/// <param name="userId">
/// The id of the user. Must be greater than 0. The ID is stored in the application context or can be retrieved by a call to GetUserIdByName.
/// </param>
/// <returns>
/// A dto containing... | [
0.20573721826076508,
0.02439647726714611,
0.5772015452384949,
0.09508024156093597,
-0.06605149805545807,
0.15418699383735657,
0.010111331008374691,
-0.42482322454452515,
-0.1576928198337555,
-0.5079395771026611,
-0.3206626772880554,
0.4820999503135681,
-0.21354544162750244,
-0.285738885402... | |
I have a MOSS web site with its virtual directory in IIS.
That VD maps to a folder in certain location in the C: disk.
I need to move that folder to the same location but in the D: disk.
If it were a common web app it is no problem, just change the "Local Path".
But as it is a MOSS website... I think that this will b... | [
0.03657050058245659,
-0.21811974048614502,
0.6564506888389587,
0.03832868114113808,
0.11570776253938675,
-0.17113752663135529,
0.3288133442401886,
-0.026688242331147194,
-0.21121959388256073,
-0.8634953498840332,
0.15083418786525726,
0.5056904554367065,
-0.2094467282295227,
0.2384809702634... | |
way you can even move your central administration to another folder (like I did). | [
0.4257359504699707,
-0.1726303994655609,
0.059155404567718506,
0.5301565527915955,
0.3528612554073334,
-0.25950825214385986,
-0.005893853027373552,
0.19438114762306213,
-0.6950622200965881,
-0.7180107235908508,
0.19194822013378143,
0.05785006657242775,
0.05986744165420532,
-0.0210250020027... | |
I'd like to do two things on my progress bar.
1. Change the green colour to red.
2. Remove the blocks and make it in one color.
Any information about those two things I wonder how to accomplish will be greatfuly appreaciated!
Thanks.
Since the previous answers don't appear to work in with Visual Styles. You'll proba... | [
0.3596501648426056,
-0.13960584998130798,
0.40509089827537537,
-0.18530431389808655,
0.15709105134010315,
0.15707577764987946,
0.32310646772384644,
-0.2952653467655182,
-0.09980384260416031,
-1.0077972412109375,
-0.00765187805518508,
0.6015890836715698,
-0.2533825635910034,
0.0307369623333... | |
{
Rectangle rec = e.ClipRectangle;
rec.Width = (int)(rec.Width * ((double)Value / Maximum)) - 4;
if(ProgressBarRenderer.IsSupported)
ProgressBarRenderer.DrawHorizontalBar(e.Graphics, e.ClipRectangle);
rec.Height = rec.Height - 4;
e.Graphics.FillRectangle(Brushes.Red, ... | [
0.09873085469007492,
-0.23918092250823975,
0.9891517758369446,
-0.24396765232086182,
-0.0569302998483181,
0.5317324995994568,
0.07492135465145111,
-0.5415069460868835,
-0.2708321511745453,
-0.7310129404067993,
-0.17350752651691437,
0.5337885022163391,
-0.3607494533061981,
0.020849378779530... | |
In my asp.net application, I am trying to open a particular report. I have the ReportViewer Control set with width of 100% and height of 100%. Now I expect that to mean that the report will take up the entire page. Well to my surprise, it does not. In IE7 while it takes the entire width of the page, it only takes up a ... | [
0.3074798882007599,
-0.004069488029927015,
0.5075547099113464,
-0.17407409846782684,
-0.2908969819545746,
-0.32414498925209045,
0.28651735186576843,
-0.06476966291666031,
-0.3824164867401123,
-0.8052101135253906,
-0.1309807002544403,
0.406636118888855,
-0.1899474561214447,
-0.2300945073366... | |
a static height that is enough for the entire height of the report. As far as I know 100% will not work because the ReportViewer control is essentially wrapped by one big `div` tag. | [
0.3928214907646179,
-0.11403882503509521,
0.7986276149749756,
0.2558577060699463,
-0.16541847586631775,
-0.32752105593681335,
0.26274076104164124,
-0.07995577901601791,
-0.024654913693666458,
-0.18222641944885254,
-0.053300078958272934,
0.5188532471656799,
-0.10174115002155304,
0.102289266... | |
I have a simple assembly function called from a c program and I have to use a instruction (`FIDIV`) that needs a memory operand.
Is it safe to move the value to `[esp - 2]` and use it in the next instruction or is it never safe to use the stack that way?
I know there are many workarounds, and I really don't need this... | [
0.5188098549842834,
-0.03818442299962044,
-0.1122346743941307,
0.08385280519723892,
0.23638662695884705,
-0.061901774257421494,
-0.1815866380929947,
-0.23971019685268402,
-0.20444384217262268,
-0.549106776714325,
0.3160138726234436,
0.7000086307525635,
-0.2514113485813141,
0.01744508929550... | |
switches, exceptions, etc. What you'll want to do instead is to actually reserve space on the stack and save a pointer to it.
```
sub esp, 4 ; Allways move it 4 byte increments. x64 may need 8 bytes
mov eax, esp ; EAX points to your 4 byte buffer
add esp, 4 ; Restore allocation.
```
Of course if y... | [
0.15285331010818481,
0.01090217288583517,
0.5716531872749329,
-0.11707424372434616,
0.27114516496658325,
0.11883876472711563,
0.1081094741821289,
-0.4569821059703827,
-0.5095751881599426,
-0.7538202404975891,
-0.2244669646024704,
0.35823580622673035,
-0.25651291012763977,
-0.27611726522445... | |
alligned to system
``` | [
0.13077813386917114,
0.30070164799690247,
0.6224930286407471,
0.17301353812217712,
0.42545509338378906,
-0.01259114220738411,
-0.012459401972591877,
0.292429655790329,
-0.341320276260376,
-0.5329992175102234,
-0.1570843607187271,
0.54789137840271,
-0.44707366824150085,
0.22375240921974182,... | |
I see in the settings you can specify patterns to exclude files from check-ins. But how would you add to include folders bin and obj?
Add this in the same place you exclude the files:
\*/bin \*/obj | [
0.43466660380363464,
0.0805874913930893,
0.028153296560049057,
0.08775079995393753,
0.11963063478469849,
-0.11223209649324417,
0.10828400403261185,
-0.035498570650815964,
-0.41818127036094666,
-0.6765100955963135,
0.020307324826717377,
0.17122779786586761,
-0.5439523458480835,
0.0916194170... | |
If one of my processes open a file, let's say for reading only, does the O.S guarantee that no other process will write on it as I'm reading, maybe
leaving the reading process with first part of the old file version, and second part of the newer file version, making data integrity questionable?
I am not talking about... | [
0.38019800186157227,
-0.06174422800540924,
0.3562890291213989,
0.1558150351047516,
0.1730167269706726,
-0.47916942834854126,
0.30034202337265015,
-0.15646576881408691,
-0.20651385188102722,
-0.7752965688705444,
-0.4149830937385559,
0.7322911024093628,
-0.0739055871963501,
0.308793455362319... | |
those are "optional" locks that processes only have to pay attention to if they want. Instead, look for the (alas, non-POSIX) "mandatory" locks. **Those** are the ones that will protect you from other programs. Try a read lock. | [
0.496555894613266,
-0.07612906396389008,
0.08232315629720688,
0.24851654469966888,
0.32131433486938477,
-0.25651198625564575,
0.381452739238739,
0.025956014171242714,
-0.40883669257164,
-0.5340425372123718,
-0.2910638153553009,
0.6804073452949524,
-0.13798856735229492,
-0.21762095391750336... | |
I have an application that reads data from a com port using javax.comm.
The problem I am having is that if the device that I'm reading from is unexpectedly disconnected I get an error in the console that says "WaitCommEvent: Error 5"
I have looked around and can't find any helpful information about this. I have set a... | [
0.16353744268417358,
0.0601876936852932,
0.2468397170305252,
0.050265178084373474,
0.09466657042503357,
-0.1466151624917984,
0.560080885887146,
0.12307222187519073,
-0.1544269621372223,
-0.7428045868873596,
0.24261629581451416,
0.5718733072280884,
-0.21846386790275574,
0.4203912317752838,
... | |
package somewhere. Can anyone tell me how to handle this error so that I can close the com port properly when it occurs?
Thanks!
No, other processes can change the file contents as you are reading it. Try running "man fcntl" and **ignore** the section on "advisory" locks; those are "optional" locks that processes only... | [
0.47044986486434937,
-0.1750493198633194,
0.13367073237895966,
-0.018706979230046272,
0.05507915839552879,
-0.2843914031982422,
0.5141999125480652,
-0.03471613675355911,
-0.25915583968162537,
-0.8067997694015503,
-0.2845800220966339,
0.895255982875824,
-0.20535528659820557,
-0.073683731257... | |
I'm trying to derive from List and selectively turn the *IsReadOnly* property on and off. I was hoping that the Add/Remove/[] functions would honor this property, but they don't.
What's the right way of doing this?
My derived class has some additional properties, so I can't unfortunately just wrap the list in ReadOnly... | [
0.3137592375278473,
-0.22171685099601746,
0.003924623131752014,
0.08335606008768082,
-0.02181313745677471,
-0.10235367715358734,
0.10311461985111237,
-0.3366832733154297,
0.10793780535459518,
-0.6719156503677368,
0.06642930209636688,
0.4708375632762909,
-0.5197224617004395,
0.4122930467128... | |
does nothing but call this.List.method(...) ).
In general, I don't think it's a good idea to inherit from the BCL collection classes in any case. I prefer to make them an implementation detail internal in my class. | [
0.445049524307251,
-0.09510280936956406,
-0.03235836699604988,
0.16522108018398285,
-0.18932271003723145,
-0.43906667828559875,
0.12659253180027008,
-0.31269168853759766,
-0.27956464886665344,
-0.3535267114639282,
0.2133687138557434,
0.29930198192596436,
-0.15145975351333618,
0.08344750106... | |
I have a query that takes input from the end user and compares it to 2 columns individually, and the two columns concatenated.
```
SELECT f_name, l_name, (f_name + ' ' + l_name) AS full_name
FROM users_table
WHERE f_name = user-input
OR l_name = user-input
OR 'full_name' = user-input
```
Excuse the massive syn... | [
-0.18026727437973022,
0.21239334344863892,
0.5657554864883423,
-0.2749185860157013,
-0.14452944695949554,
0.1541687399148941,
0.1087256371974945,
-0.1004452034831047,
0.22892634570598602,
-0.6969723701477051,
0.03675446659326553,
0.3019639253616333,
-0.4141104817390442,
-0.0146941328421235... | |
is a literal and not a column name, it does not exists at the WHERE clause level
you need to add
```
OR f_name + ' ' + l_name = user-input
```
instead of
OR 'full\_name' = user-input | [
-0.11729694902896881,
0.0981372520327568,
0.5054061412811279,
-0.22899079322814941,
-0.002243667608126998,
0.011237699538469315,
0.04101111739873886,
0.27668312191963196,
0.12600888311862946,
-0.09568443149328232,
-0.4168575406074524,
0.2378927767276764,
-0.39656567573547363,
0.15066421031... | |
Is it possible to exclude a folder in a web project from being published? We've got some documentation and scripts that included in a particular project folder, and are added to the project, but when I do a VS publish, I don't want them to go up to the production server.
I know they shouldn't be in the project, but I ... | [
0.8933541178703308,
0.23159483075141907,
0.07927556335926056,
0.25687742233276367,
0.0901431143283844,
-0.4491557776927948,
0.10592509806156158,
-0.01119740679860115,
-0.33768507838249207,
-0.29122689366340637,
0.15552517771720886,
0.4582013189792633,
-0.07394953817129135,
0.16038422286510... | |
would be better off doing builds on a dedicated workstation or server using MSBuild (or some other building and deploying solution) directly (and thereby would be able to very granularly control what goes up to production). MSBuild can not only build, but using some extensions (including open source types), it can also... | [
0.37773704528808594,
-0.13231772184371948,
0.3319835066795349,
0.10562131553888321,
0.16344493627548218,
-0.09208399802446365,
-0.020869921892881393,
0.16801618039608002,
-0.32136887311935425,
-0.6481704115867615,
-0.2465878427028656,
0.4108140766620636,
-0.26999980211257935,
0.08134616911... | |
on the batch file that starts up an MSBuild project. It labels all code using VSS, gets latest version, builds the solution, and then deploys it to both servers. We deploy exactly what we want to deploy and nothing more. We're quite happy with it.
The only downside, if it could be considered a downside, is that at lea... | [
0.7916343808174133,
-0.026752563193440437,
0.5243657231330872,
0.2079392373561859,
0.12937942147254944,
-0.21383634209632874,
0.24128523468971252,
-0.05960344150662422,
-0.06700669229030609,
-0.6642811894416809,
-0.3262321949005127,
0.5151545405387878,
-0.14384347200393677,
0.0306802000850... | |
I am currently developing a webapp based on c# that calls some webservices. I have imported three different WSDLs from the provider into my WebApplication3 project (references -> add web reference). In the class viewer they appear as:
WebApplication3.com.provider.webservices1
WebApplication3.com.provider.webservice... | [
0.1366576999425888,
-0.057310085743665695,
0.27270621061325073,
-0.10775776207447052,
-0.47371330857276917,
0.07104762643575668,
0.3285732567310333,
-0.3965013027191162,
-0.3404389023780823,
-0.9184873104095459,
0.1330316811800003,
0.372030645608902,
-0.1896379441022873,
0.2714605331420898... | |
declared in both WSDL? How can I fix this so I can use it?
Thanks, and sorry if the question is stupid!
try referencing MessageHeader by using its full namespace.
eg.
```
WebApplication3.com.provider.webservices1.MessageHeader msgHeader = new
WebApplication3.com.provider.webservices1.MessageHeader()
```
for brev... | [
0.19974935054779053,
-0.022221321240067482,
0.2891416549682617,
0.04762253537774086,
-0.2584879994392395,
-0.2496454268693924,
0.3564315140247345,
0.2164202183485031,
-0.29722779989242554,
-0.49702465534210205,
-0.0688992291688919,
0.5557354092597961,
-0.22059078514575958,
0.23239609599113... | |
When using the wpf elements of my application, everything styles to the operating system, but when I use an OpenDialog or a MessageBox, it renders the older Windows 9X way. Is there an easier way I can do an Application.EnableVisualStyles() equivalent call to make the message boxes and dialogs look the same as the rest... | [
0.24064819514751434,
-0.06321347504854202,
0.44485557079315186,
-0.06201735511422157,
-0.34991389513015747,
-0.21553324162960052,
0.18451637029647827,
-0.025270121172070503,
-0.5139256119728088,
-0.538624107837677,
-0.05405119061470032,
0.609074592590332,
-0.3349147140979767,
-0.0470762625... | |
### Background
I have a `DataGridView` control which I am using, and I added my handler below to the `DataGridView.CellFormatting` event so the values in some cells can be made more human-readable. This event handler has been working great, formatting all values without issue.
Recently however, I have discovered a ve... | [
0.28202468156814575,
-0.2649340033531189,
0.6334555149078369,
-0.001034098444506526,
-0.15838134288787842,
-0.03784383088350296,
0.20841698348522186,
0.10468821227550507,
-0.23832103610038757,
-0.4111126959323883,
0.1738108992576599,
0.2675069570541382,
-0.22263389825820923,
0.153019443154... | |
moved from one `DataGridView` row with a due date, to another `DataGridView` row with a due date (at this point everything is still appears fine), and then presses a button which reloads the data from the database (without sending updates, essentially calling `DataAdapter.Fill()`), the program generates a `StackOverflo... | [
-0.08387934416532516,
-0.4135766327381134,
0.8199456334114075,
-0.29416126012802124,
0.3578759431838989,
-0.0901123434305191,
0.0977000743150711,
-0.11952612549066544,
-0.1368572860956192,
-0.47519752383232117,
-0.01838824152946472,
0.4784000515937805,
-0.06890913099050522,
0.2541110515594... | |
I would expect since I wasn't under the impression and recursion was occuring.
Can somebody help me?
How can I view a stack trace? In VS2008 it says:
`{Cannot evaluate expression because the current thread is in a stack overflow state.}`
Best regards,
Robinson
```
private int cellFormatCallCount = 0;
private void ... | [
-0.1408340334892273,
0.027063783258199692,
0.5747388601303101,
-0.11485692858695984,
0.3305274248123169,
-0.21185633540153503,
0.45897600054740906,
-0.3387189209461212,
-0.21892449259757996,
-0.6986445784568787,
0.08434557914733887,
0.29973435401916504,
-0.17659837007522583,
0.128546193242... | |
"";
// the event is sometimes called where the value property is null
if (e.Value != null) {
cellFormatCallCount++; // here is my test for recursion, this class member will increment each call
// This is the line that throws the StackOverflowException
/* ***********... | [
-0.07071936875581741,
-0.3002724051475525,
0.3195951581001282,
-0.2217538058757782,
0.23868155479431152,
-0.08776947110891342,
0.20468279719352722,
-0.17218005657196045,
-0.12764064967632294,
-0.2997265160083771,
-0.02704133465886116,
0.41636577248573303,
-0.22528836131095886,
-0.065286256... | |
value = e.Value.ToString();
/* ********************* */
column = actionsDataGridView.Columns[e.ColumnIndex].Name;
} else {
return; // null values cannont be formatted, so return
}
if (column == "id") {
// different code for formatting | [
-0.013513345271348953,
-0.2638050615787506,
0.5613273978233337,
0.058782920241355896,
-0.17944838106632233,
0.2784680724143982,
0.36485666036605835,
-0.7764579057693481,
-0.3368610739707947,
-0.2535398602485657,
-0.13801966607570648,
0.635522186756134,
-0.1937928944826126,
0.08779625594615... | |
each column
} else if (column == "title") {
// ...
} else {
// ...
}
} finally {
cellFormatCallCount = 0; // after we are done with the formatting, reset our recursion counter
}
}
```
Apparently e.Value.ToString() invokes the CellFormatting event again. T... | [
-0.1923866868019104,
-0.20557747781276703,
0.7977900505065918,
-0.14822585880756378,
0.4095456600189209,
-0.21795754134655,
0.2288385033607483,
-0.2168605774641037,
0.01585005782544613,
-0.36176979541778564,
-0.3208685517311096,
0.509736180305481,
-0.05675150826573372,
0.26174813508987427,... | |
somewhat logical. It should be easy enough to find out with a debugger.
But the actual recursion could be caused somewhere else, like in the per-column formatting that you omitted.
Your recursion check isn't reliable since Value==null will also reset it, and it appears to be shared by all columns. Make it surround t... | [
-0.011675771325826645,
0.05820957198739052,
0.4236856997013092,
-0.13493265211582184,
0.3444540202617645,
-0.20661966502666473,
0.49311399459838867,
-0.3743634521961212,
-0.03268866240978241,
-0.4764537215232849,
-0.0591086819767952,
0.4890750050544739,
-0.4443179666996002,
0.1665886044502... | |
I'm working on an application that lets registered users create or upload content, and allows anonymous users to view that content and browse registered users' pages to find that content - this is very similar to how a site like Flickr, for example, allows people to browse its users' pages.
To do this, I need a way to... | [
0.7516025304794312,
0.24853651225566864,
0.2913399934768677,
0.15825103223323822,
0.033007215708494186,
-0.09124074876308441,
0.09518184512853622,
0.050125107169151306,
-0.25574636459350586,
-0.6180900931358337,
0.033619482070207596,
0.05872141942381859,
0.19863587617874146,
0.417976200580... | |
I can get the email address associated with the user, but like I said, I don't want to use that. I can have users of my application pick a unique user name when they register, but I would like to make that optional if at all possible, so that the registration process is as short as possible.
Another option is to gene... | [
0.4544203281402588,
0.30232322216033936,
0.0722779855132103,
0.23277580738067627,
0.13004469871520996,
-0.13477371633052826,
0.16273650527000427,
0.060829244554042816,
-0.2392529994249344,
-0.5336691737174988,
0.021570593118667603,
0.400452584028244,
-0.22386229038238525,
0.117256231606006... | |
user object, of getting a unique identifier for that object that can be used in this way?
I'm looking for a Python solution - I forgot that GAE also supports Java now. Still, I expect the techniques to be similar, regardless of the language.
Your timing is impeccable: Just yesterday, a new release of the SDK came out... | [
0.07466969639062881,
0.15862970054149628,
0.4062504172325134,
-0.03144822269678116,
-0.20038439333438873,
0.16480685770511627,
-0.09584454447031021,
-0.21369528770446777,
-0.16609743237495422,
-0.6270225048065186,
-0.26451611518859863,
0.4431155025959015,
-0.24816244840621948,
0.0173216406... | |
I would like to have a clean C# class that authenticates from Active Directory.
It should be pretty simple, it just has to ask for credentials and check if it matches what AD is expecting.
I am responsible for a number of C# applications, and I would like all of them to use the same class.
Could someone please pro... | [
0.6405221223831177,
0.29686588048934937,
0.0675046294927597,
0.1996040940284729,
-0.08552822470664978,
-0.535234808921814,
0.09358806908130646,
-0.1416320502758026,
0.012262005358934402,
-0.48499953746795654,
0.18766647577285767,
0.5801212787628174,
-0.2580306828022003,
0.152746319770813,
... | |
a security requirement because some applications are used in areas with shared computers: People with multiple roles and different permission levels may use the same computer and forget to log out between sessions)
<http://support.microsoft.com/kb/316748>
```
public bool IsAuthenticated(String domain, String username,... | [
-0.12373842298984528,
-0.054786425083875656,
0.6222378015518188,
-0.09244406223297119,
0.2490367293357849,
-0.3989899754524231,
0.44838207960128784,
-0.24470284581184387,
-0.015478366985917091,
-0.4279603064060211,
-0.5641588568687439,
0.5378919243812561,
-0.3845936059951782,
0.32066124677... | |
= "(SAMAccountName=" + username + ")";
search.PropertiesToLoad.Add("cn");
SearchResult result = search.FindOne();
if(null == result)
{
return false;
}
//Update the new path to the user in the directory.
_path = result.Path;
_filterAttribute = (String)result.Properties[... | [
-0.13263049721717834,
-0.38186115026474,
0.5119333863258362,
-0.35301995277404785,
0.24288702011108398,
0.09257720410823822,
0.27448007464408875,
-0.36545783281326294,
-0.49848172068595886,
-0.5738577246665955,
-0.2947700023651123,
0.428337037563324,
-0.5093459486961365,
0.1351384520530700... | |
return true;
}
``` | [
-0.04748712480068207,
0.29700207710266113,
-0.06574172526597977,
-0.3631051182746887,
0.2280571609735489,
-0.155355304479599,
0.469013512134552,
0.24233460426330566,
0.4076424241065979,
-0.3014841675758362,
-0.4890527129173279,
0.8487451672554016,
-0.19325628876686096,
0.23513224720954895,... | |
I have a ordered list where I would like the initial number to be 6. I found that this was [supported](http://www.w3schools.com/TAGS/tag_ol.asp) (now deprecated) in HTML 4.01. In this specification they say that you can specify the starting integer by using CSS. (instead of the `start` attribute)
How would you specify... | [
0.3184575140476227,
0.15003645420074463,
0.6332510113716125,
-0.33695366978645325,
-0.1451522707939148,
0.2506231963634491,
0.10315277427434921,
-0.3453074097633362,
-0.2268468737602234,
-0.6782420873641968,
-0.1698940545320511,
0.3563283681869507,
-0.2883690893650055,
0.36299484968185425,... | |
<li>Ipsum</li>
<li>Dolor</li>
</ol>
``` | [
-0.05638203024864197,
0.4343024790287018,
-0.269486665725708,
-0.04442494362592697,
-0.21580514311790466,
0.46032699942588806,
0.033810097724199295,
-0.11397451162338257,
0.013371208682656288,
-0.6084912419319153,
-0.4559987783432007,
0.4643815755844116,
-0.5814807415008545,
0.362723290920... | |
If you like to create custom delegates you would use the `delegate` keyword in lowercase.
What can you do with the actual `Delegate` Class? What is this good for? I don't understand the exact difference.
From <http://msdn.microsoft.com/en-us/library/system.delegate.aspx>:
> The `Delegate` class is the base class
> f... | [
0.45128586888313293,
-0.01625862717628479,
0.07880266010761261,
0.388245165348053,
-0.1077558770775795,
-0.15017609298229218,
0.04553704708814621,
-0.1505286693572998,
-0.34869569540023804,
-0.6753149628639221,
-0.006131728645414114,
0.3633095324039459,
-0.3314951956272125,
0.3743566870689... | |
derive delegate types.
>
>
> Most languages implement a `delegate`
> keyword, and compilers for those
> languages are able to derive from the
> `MulticastDelegate` class; therefore,
> users should use the `delegate` keyword
> provided by the language. | [
0.14405740797519684,
-0.00852032471448183,
-0.03804093971848488,
0.45485085248947144,
-0.12642891705036163,
-0.4184795320034027,
0.018150366842746735,
-0.03465316444635391,
-0.14657418429851532,
-0.7271831631660461,
-0.46001535654067993,
0.22137264907360077,
-0.2766322195529938,
0.04683626... | |
I've got an application with 2 main components + other DLLs:
1. Core DLL (got all core functionality)
2. GUI
3. 3rd Party and Totally Independent DLLs which requires for DI etc.
Now I'm implementing plugin support.
Which DLL should be responsible from loading these plugins? GUI or the Core DLL?
I'm using MEF so n... | [
0.40906184911727905,
0.11224465817213058,
0.30633974075317383,
-0.018710041418671608,
-0.13518200814723969,
0.10784779489040375,
-0.1830660104751587,
-0.007253546267747879,
-0.12277012318372726,
-0.7354395985603333,
0.02358073554933071,
0.573437511920929,
-0.2641525864601135,
0.14266115427... | |
the GUI I would think that the GUI layer in the application would load them and manage the container.
I have an application framework that I built for client app plug-ins and in it there is a static application manager class that loads Parts for the application, but then I also load Parts into a container that is used... | [
0.04494527354836464,
0.06807027012109756,
0.2532199025154114,
0.21619485318660736,
0.15950718522071838,
0.19222736358642578,
-0.4217962622642517,
-0.029639482498168945,
-0.030881136655807495,
-0.584244430065155,
0.04181581735610962,
0.861485481262207,
-0.4535352885723114,
-0.04784352332353... | |
dropped in and available to the app.
Also, these are loaded using different approaches... the core is only at start up using specific rules and the other is loading everything from a directory (plugins). | [
0.3696441650390625,
-0.1266854852437973,
0.0883939266204834,
0.16417673230171204,
0.3655940890312195,
-0.13383865356445312,
-0.212412491440773,
-0.14643877744674683,
-0.1664038747549057,
-0.4149777591228485,
-0.665186882019043,
0.25749266147613525,
-0.2781064510345459,
-0.18519581854343414... | |
I have observed a great difference in Sun Java performance when code is compiled through jdk1.6 as compared to jdk1.5 or jdk1.4 (over 4 folds)
What changes and optimizations have been done? Is there anything worth taking home from these changes which will help to boost our application performance.
Thanks for replying... | [
0.5820802450180054,
0.08389271795749664,
-0.0034403714817017317,
0.05711877718567848,
-0.2657579779624939,
0.029270149767398834,
0.1481534093618393,
0.116118423640728,
-0.1202198937535286,
-0.5116842985153198,
0.07726731896400452,
0.6711938381195068,
0.07735209167003632,
-0.153213933110237... | |
I'm using the Linq to Entities. I've got my main table, Employee setup with a field named vendorID. Vendor ID is a foreign key into the Vendors table.
As it is right now, the Employee object does not directly expose the vendorID. Instead, I can only access it this way:
```
var employee = (from e in context.Employees.... | [
-0.08971498906612396,
0.11336720734834671,
0.2641138732433319,
0.04837356507778168,
0.2068302184343338,
0.005976909771561623,
-0.20808899402618408,
-0.08501336723566055,
-0.10425259172916412,
-0.8957914710044861,
-0.2094905823469162,
0.5992113947868347,
-0.08070584386587143,
0.355526328086... | |
dandy, but it is extra work on the database because it is forcing a join where none is needed. Is there a way to get that key value without being forced to do a join to the tbl\_vendors table?
You can access the foreign key via the entity reference.
```
Employee employee = context.Employees.Single(e => e.employeeID ==... | [
0.06835563480854034,
0.14366433024406433,
0.19623404741287231,
0.2925242483615875,
0.11927536129951477,
-0.09262823313474655,
0.10640639811754227,
-0.27391690015792847,
-0.06747233867645264,
-0.26845961809158325,
-0.02671729028224945,
0.3812543749809265,
-0.37672483921051025,
0.38379564881... | |
I'm implementing a custom date converter in WPF, the idea to be more clever about date entry, a la Outlook (being able to enter "today", etc.) So I've written my own converter, which is working. It formats the user's entry in the format M/d/yy. So for example, if they enter: 8-2, they'll see 8/2/09. Lovely.
The quest... | [
0.3402070999145508,
0.1607866883277893,
0.5257413983345032,
-0.17117856442928314,
-0.007056805770844221,
0.22306647896766663,
-0.017521042376756668,
0.3073232173919678,
-0.3890041410923004,
-0.49779242277145386,
-0.15395833551883698,
0.22172890603542328,
0.011291803792119026,
0.24510721862... | |
8/2/09. So far so good. Now let's say they enter 8-2 (or 8/2 again) in that same field, right afterwards. That gets run though ConvertBack, which yields the SAME date that's already there in the bound property, so it doesn't bother to run Convert, which means that that "8/2" is sitting there in the textbox. Yick! There... | [
0.12880176305770874,
-0.01847679913043976,
0.524593710899353,
-0.24683251976966858,
-0.15595731139183044,
-0.1792769432067871,
0.253336638212204,
0.08258878439664841,
-0.4706317186355591,
-0.7237840890884399,
-0.09070153534412384,
0.6190386414527893,
-0.13541556894779205,
0.166168183088302... | |
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value != null)
{
string tempStr = value.ToString();
return ((DateTime.Parse(tempStr)).ToString("M/d/yy"));
}
else
{
retur... | [
0.12357265502214432,
-0.24393242597579956,
0.4393683671951294,
-0.1617727428674698,
0.16193918883800507,
0.16408506035804749,
0.422540545463562,
0.08626430481672287,
-0.020665207877755165,
-0.33961132168769836,
-0.5689054131507874,
0.4722389280796051,
-0.5630273818969727,
0.431893318891525... | |
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return DateTime.Parse(value.ToString());
}
#endregion
}
```
and here's what the use of it looks like:
```
<local:FilteredTextBox.Text>
<Binding Path="... | [
0.07695276290178299,
-0.5196806192398071,
0.7062898278236389,
-0.021633721888065338,
0.5324237942695618,
-0.2835353910923004,
0.13621588051319122,
0.14733193814754486,
-0.0878358706831932,
-0.6638245582580566,
-0.12505675852298737,
0.5407313108444214,
-0.38372793793678284,
0.17738254368305... | |
<Binding.ValidationRules>
<local:DateValidation/>
</Binding.ValidationRules>
</Binding>
</local:FilteredTextBox.Text>
```
Thanks!
Scott
In response to a comment below, here's the backing property:
```
public DateTime? Value
{
get
{
return... | [
0.16570213437080383,
-0.19397717714309692,
0.6729394793510437,
0.009978052228689194,
0.3070456385612488,
-0.2784564197063446,
0.24465924501419067,
-0.1456557810306549,
-0.09635647386312485,
-0.32088184356689453,
-0.41872668266296387,
0.36389315128326416,
-0.21860508620738983,
0.19517086446... | |
}
set
{
SetValue(ValueProperty, value);
OnPropertyChanged(new DependencyPropertyChangedEventArgs(ValueProperty, null, value)); // I just added this line, it makes no difference
}
}
```
Many thanks to Josh G - with his help, I figured out the (or at least an) answer.
... | [
0.28873348236083984,
-0.07833448052406311,
0.5039446353912354,
0.11806759238243103,
0.3300038278102875,
0.20865429937839508,
0.26396918296813965,
0.11511649936437607,
-0.0765761137008667,
-0.4513048231601715,
-0.04666741192340851,
0.5298540592193604,
-0.42390990257263184,
-0.09296232461929... | |
than "lock" the textbox directly to the value of the control, I created an intermediate property, which THEN calls the set to the dependency property:
```
public DateTime? DateValue
{
get
{
return _dateValue;
}
set
{
_dateValue = value; | [
0.41469433903694153,
-0.33635568618774414,
0.45417073369026184,
-0.21951454877853394,
0.5089051127433777,
-0.13035011291503906,
0.15943337976932526,
-0.12363199889659882,
0.26669007539749146,
-0.4302802085876465,
-0.2147151678800583,
0.5562261343002319,
-0.3900185227394104,
0.2748296558856... | |
OnPropertyChanged("DateValue");
SetValue(ValueProperty, _dateValue);
}
}
```
and this totally works as it should. Thanks again, Josh! | [
0.20516525208950043,
-0.017490945756435394,
0.5651738047599792,
0.0770433321595192,
0.3623256981372833,
0.07725949585437775,
0.47242191433906555,
0.3095998167991638,
0.033624108880758286,
-0.5323665738105774,
-0.14029426872730255,
0.7467560768127441,
-0.08577599376440048,
0.094007506966590... | |
So, folks, I have this self crafted pattern that works. After some hours (I am no regex guru) this puppy evolved to parse curl PUT output for me:
```
^\s*([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)
\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)\s+([^ ]+)
```
*(CR in text only for formatting)... | [
0.16904708743095398,
0.18629741668701172,
0.396847665309906,
-0.150781512260437,
-0.2023458182811737,
-0.08861084282398224,
0.37008893489837646,
-0.08292600512504578,
-0.6179315447807312,
-0.6042323112487793,
0.07850655913352966,
0.11795417964458466,
-0.3763158917427063,
-0.278536528348922... | |
a \* in it have failed miserably.
So, **The Question Is**: how do write this pattern in a more concise way so that I can still pull out my target groups?
It probably doesn't matter, but here are the groups I am after:
```
$1: percent finished
$2: size uploaded so far
$6: size to upload
$8: average upload rate
``... | [
0.6472579836845398,
0.048680972307920456,
0.19612321257591248,
0.06807100772857666,
-0.24082183837890625,
-0.03675707057118416,
0.2262699156999588,
-0.15743249654769897,
-0.06875846534967422,
-0.6584820747375488,
0.10838315635919571,
0.1567825973033905,
-0.21967442333698273,
-0.17206120491... | |
language, *per se*...but configuring a tool to use a regex.
It looks like this is the best I can do:
```
^\s*([^ ]+)\s+([^ ]+)\s+(?:[^ ]+\s+){3}([^ ]+)\s+[^ ]+\s+([^ ]+)\s+
```
I collapsed the matches you do not care about, made them not capture, and left off the unneeded trailing matches. If it is important to matc... | [
-0.14837779104709625,
-0.04582630842924118,
0.19305354356765747,
-0.10177195817232132,
0.04416545480489731,
0.049172621220350266,
0.7973996996879578,
0.2786325514316559,
-0.12397503107786179,
-0.5797291398048401,
-0.039153728634119034,
0.6568003296852112,
-0.5951166749000549,
-0.1538748592... | |
this if it supports \S
```
^\s*(\S+)\s+(\S+)\s+(?:\S+\s+){3}(\S+)\s+\S+\s+(\S+)\s+
```
but it does not mean exactly the same thing. | [
-0.029209787026047707,
0.11443651467561722,
0.36877933144569397,
-0.23209001123905182,
0.03833013027906418,
-0.32701003551483154,
0.042003002017736435,
-0.11644194275140762,
0.07020436972379684,
-0.4426862299442291,
-0.3934098184108734,
0.32049790024757385,
-0.21554216742515564,
0.06860158... | |
I'm learning Vim and with it came the urge to use 'hjkl' and friends on every other program, including mouse operated programs like browsers.
How can I use these keyboard shortcuts, or something similar?
I'm using Linux.
Off the top of my head...
* Vimperator for Firefox.
* Awesome, WMII, Xmonad or ion3 window manag... | [
0.49068406224250793,
0.07636327296495438,
0.7832108736038208,
0.06843828409910202,
-0.18676558136940002,
-0.22372223436832428,
0.317226380109787,
0.22051699459552765,
-0.2779737114906311,
-1.1167817115783691,
0.04535629227757454,
0.9324518442153931,
-0.0834038183093071,
0.14539377391338348... | |
I've recently run into a rather nasty bug, wherein the code was loading a `<select>` dynamically via JavaScript. This dynamically loaded `<select>` had a pre-selected value. In IE6, we already had code to fix the selected `<option>`, because sometimes the `<select>`'s `selectedIndex` value would be out of sync with the... | [
0.05197504535317421,
-0.2861107885837555,
0.13378165662288666,
-0.12078171968460083,
0.08609102666378021,
-0.15396812558174133,
0.2837102711200714,
0.0333128459751606,
-0.05751189962029457,
-0.6232033371925354,
-0.005684481468051672,
0.6762546896934509,
-0.5351096987724304,
0.1448903828859... | |
be some sort of timing issue, I tried something random that I'd seen in code before:
```
var wrapFn = (function() {
var myField = field;
var myElement = element;
return function() {
myField.selectedIndex = myElement.index;
}
})();
setTimeout(wrapFn, 0);
```
And this worked!
I've got a solut... | [
0.17158371210098267,
-0.38117271661758423,
0.21048055589199066,
-0.09639792889356613,
0.10565418004989624,
-0.10944363474845886,
0.22214767336845398,
-0.08163037896156311,
-0.1831977218389511,
-0.6607827544212341,
-0.26264581084251404,
0.46141141653060913,
-0.47036316990852356,
0.167502135... | |
[race condition](https://en.wikipedia.org/wiki/Race_condition) between:
1. The browser's attempt to initialize the drop-down list, ready to have its selected index updated, and
2. Your code to set the selected index
Your code was consistently winning this race and attempting to set drop-down selection before the brow... | [
-0.05051868408918381,
-0.21218928694725037,
0.004782099276781082,
-0.16947807371616364,
-0.01895240508019924,
0.2078704535961151,
0.051830071955919266,
-0.4234962463378906,
0.09558011591434479,
-0.5559031963348389,
0.02191069908440113,
0.535709798336029,
-0.5161410570144653,
-0.12694381177... | |
delay - which will be around 10ms when the tab has focus and the JavaScript thread of execution is not busy.
The OP's solution, therefore was to delay by about 10ms, the setting of the selected index. This gave the browser an opportunity to initialize the DOM, fixing the bug.
Every version of Internet Explorer exhibi... | [
0.1713249534368515,
-0.34145084023475647,
0.3912082016468048,
-0.161096453666687,
-0.0992862656712532,
0.04032205790281296,
0.38740673661231995,
-0.1492774933576584,
-0.6259317398071289,
-0.14383447170257568,
0.005366150289773941,
0.41451993584632874,
-0.5306430459022522,
0.049242302775382... | |
Here's Pair.java
```
import java.lang.*;
import java.util.*;
public class Pair<TYPEA, TYPEB> implements Comparable< Pair<TYPEA, TYPEB> > {
protected final TYPEA Key_;
protected final TYPEB Value_;
public Pair(TYPEA key, TYPEB value) {
Key_ = key;
Value_ = value;
}
public TYPEA getKey() {
re... | [
-0.25854459404945374,
-0.2120184451341629,
0.5044457912445068,
-0.5624406337738037,
-0.02997872419655323,
0.1916053295135498,
0.26218917965888977,
-0.6430100798606873,
-0.08683211356401443,
-0.5669933557510376,
-0.40985003113746643,
0.5441896319389343,
-0.5415614247322083,
0.19310937821865... | |
buff.append(Key_);
buff.append("\tValue: ");
buff.append(Value_);
return(buff.toString() );
}
public int compareTo( Pair<TYPEA, TYPEB> p1 ) {
System.out.println("in compareTo()");
if ( null != p1 ) {
if ( p1.equals(this) ) {
return 0;
} else if ( p1.hashCode() > this.... | [
-0.11444545537233353,
0.154102623462677,
0.6929240226745605,
-0.5062400102615356,
-0.21226003766059875,
0.32918858528137207,
0.4725995659828186,
-0.4752422571182251,
-0.052889134734869,
-0.36634641885757446,
-0.363059937953949,
0.7331734895706177,
-0.28314682841300964,
0.07822222262620926,... | |
} else if ( p1.hashCode() < this.hashCode() ) {
return -1;
}
}
return(-1);
}
public boolean equals( Pair<TYPEA, TYPEB> p1 ) {
System.out.println("in equals()");
if ( null != p1 ) {
if ( p1.Key_.equals( this.Key_ ) && p1.Value_.equals( this.Value_ ) ) {
return(true);... | [
-0.43718037009239197,
-0.06534630060195923,
0.4496854841709137,
-0.2803332209587097,
0.06132078915834427,
0.07040544599294662,
0.2916504740715027,
-0.3778495490550995,
0.09326887130737305,
-0.4115298092365265,
-0.29009705781936646,
0.4994109272956848,
-0.48030850291252136,
-0.1707634776830... | |
}
return(false);
}
public int hashCode() {
int hashCode = Key_.hashCode() + (31 * Value_.hashCode());
System.out.println("in hashCode() [" + Integer.toString(hashCode) + "]");
return(hashCode);
}
}
```
Here's the testcase:
```
import java.lang.*;
import java.util.*;
import junit.framework.*... | [
0.3556382954120636,
-0.11424920707941055,
0.07827107608318329,
-0.2153550386428833,
-0.024816634133458138,
0.03696854040026665,
0.5112121105194092,
-0.7467031478881836,
0.4306487441062927,
-0.7234535813331604,
-0.36293265223503113,
0.49850043654441833,
-0.45646318793296814,
0.0985124483704... | |
);
assertTrue( pair.getValue().equals( value ) );
assertTrue( pair.equals( new Pair<String, String>(key, value)) );
}
public void testPairCollection() {
HashMap< Pair<String, String>, String> hm1 = new HashMap<Pair<String,String>, String>();
Pair<String, String> p1 = new Pair<String, String>("T... | [
0.18871912360191345,
-0.1836291253566742,
0.20393124222755432,
-0.18468792736530304,
-0.15532885491847992,
0.2731357514858246,
0.38923004269599915,
-0.7022541761398315,
0.18444375693798065,
-0.3162570893764496,
-0.31956496834754944,
0.48005902767181396,
-0.3527047634124756,
-0.031315308064... | |
hm1.put(p3, "THREE");
Pair<String, String> p4 = new Pair<String, String>("Test2", "Value2");
hm1.put(p4, "FOUR");
Pair<String, String> p5 = new Pair<String, String>("Test3", "Value1");
hm1.put(p5, "FIVE");
Pair<String, String> p6 = new Pair<String, String>("Test3", "Value2");
h... | [
0.37148094177246094,
-0.14889530837535858,
-0.024180715903639793,
-0.2713615596294403,
-0.1515226513147354,
0.6931401491165161,
0.5092843174934387,
-0.7438576221466064,
-0.2990252375602722,
-0.3173117935657501,
-0.2724703550338745,
0.3616533577442169,
-0.13392910361289978,
-0.0203944537788... | |
hm1.size() == 7 );
Pair<String, String> pSrch = new Pair<String, String>("Test3", "Value3");
assertTrue( p7.equals(pSrch) );
assertTrue( pSrch.equals(p7) );
assertTrue( p7.hashCode() == pSrch.hashCode() );
assertTrue( 0 == p7.compareTo( pSrch ) );
assertTrue( 0 == pSrch.compareTo(p7) );
... | [
-0.4149547219276428,
-0.15688656270503998,
0.9707863926887512,
-0.31403839588165283,
-0.24043750762939453,
0.3040439784526825,
0.5023778676986694,
-0.5956774353981018,
-0.22817249596118927,
-0.2746182084083557,
-0.47334396839141846,
0.5240336060523987,
0.025125544518232346,
0.1602986752986... | |
assertTrue( null != result );
assertTrue( 0 == result.compareTo("SEVEN"));
}
}
```
Here's my problem, the last hm1.containsKey call should (I naively expect) return the value stored where Pair<"Three", "Three"> is true - I should get a String with a value of "SEVEN". Here is the output:
```
Running in equal... | [
-0.7187253832817078,
0.28336670994758606,
0.5937325358390808,
-0.44461435079574585,
-0.40973642468452454,
-0.06510019302368164,
0.5285654664039612,
-0.4677788019180298,
-0.3131614625453949,
-0.21853353083133698,
0.0466902069747448,
0.8751649856567383,
-0.08765187859535217,
0.22609555721282... | |
String result = hm1.get( pSrch );
```
So is both p7.hashCode() and pSrch.hashCode() are equal and p7.equals(pSrch) and pSrch.equals(p7), and hm1.containsValue(p7) == true, I would expect hm1.containsValue(pSrch) would also return true, but it does not. What am I missing?
You need to *override* the `equals` method fro... | [
-0.20864586532115936,
-0.08354075998067856,
0.6344218850135803,
-0.3033321499824524,
0.13131186366081238,
-0.1475924849510193,
0.27798208594322205,
-0.5157643556594849,
-0.32014045119285583,
-0.2817521393299103,
-0.09210433810949326,
0.44255805015563965,
-0.3129516541957855,
0.080331563949... | |
?>) o;
if ( p1.Key_.equals( this.Key_ ) && p1.Value_.equals( this.Value_ ) ) {
return(true);
}
}
return(false);
}
```
To avoid this kind of mistake, use the `@Override` annotation on methods you intend to act as overrides. You'll get a compile time error when they don't. | [
-0.1656242311000824,
0.0902666375041008,
0.40388867259025574,
-0.1581081598997116,
0.2981686592102051,
-0.12099801748991013,
0.5158628225326538,
-0.508300244808197,
0.18222759664058685,
-0.4514356851577759,
-0.33819884061813354,
0.6539609432220459,
-0.3598639965057373,
-0.00397817743942141... | |
It seems the only way to stay "in app" is to give them a UIWebView of the paypal mobile site and let them complete the transaction there, otherwise the user would need to use their API key.
Does this sound right and has anyone got or seen any sample code? I have to think this is a common piece of code.
UPDATE:
Will A... | [
0.7342023253440857,
-0.03824822977185249,
0.5260313749313354,
0.3238315284252167,
0.15452200174331665,
-0.04399913549423218,
0.3145495355129242,
-0.21912099421024323,
-0.21535132825374603,
-0.4355652630329132,
0.03401804342865944,
0.4347623586654663,
-0.12823627889156342,
-0.27489417791366... | |
be useful for the purchase of physical goods
---
Update:
Although this code works, App Store terms won't allow you to use this code within an app.
---
Original Answer:
I figured this out after some heavy API research. Below is a method that creates an HTTP POST to send to Paypal and makes an NSURLRequest. You can... | [
0.22099794447422028,
0.07772817462682724,
0.6667404174804688,
0.0981253832578659,
-0.05411931127309799,
0.23420757055282593,
0.3836166560649872,
-0.5103648900985718,
0.0559462271630764,
-0.5566609501838684,
0.06933515518903732,
0.558836042881012,
-0.18200494349002838,
-0.044431865215301514... | |
setHTTPMethod:@"POST"];
[theRequest setHTTPBody: [parameterString dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if( theConnection ){
webData = [[NSMutableData data] retain];
[self displayConnectingView];
}else{
... | [
-0.022750455886125565,
0.0907134860754013,
0.7773603796958923,
0.1848798394203186,
-0.16807013750076294,
0.07302037626504898,
0.47700148820877075,
-0.33152151107788086,
-0.23781904578208923,
-0.6680536866188049,
-0.3756018579006195,
0.5838640332221985,
-0.1469835638999939,
0.16587653756141... | |
Paypal to finalize the transaction. You can find the API information in the Paypal Mobile Checkout API docs. | [
0.6696646809577942,
0.04741174727678299,
0.42329534888267517,
0.19334113597869873,
0.18172721564769745,
0.18663671612739563,
-0.04176419600844383,
0.11287792772054672,
-0.09592700004577637,
-0.50380939245224,
-0.09595490992069244,
0.36716970801353455,
0.10077207535505295,
-0.07987104356288... | |
How do I declare in C# a C function that returns a pointer to a structure?
I believe following is one way to do that, followed by **Marshal.PtrToStructure** to get actual structure value.
```
// C-function
SimpleStruct * Function(void);
// C# import
[DllImport("MyDll.dll")]
public static extern IntPtr Function();
`... | [
0.2639288008213043,
0.2516411244869232,
0.23298579454421997,
-0.05381924659013748,
0.04736750200390816,
-0.35277119278907776,
0.32512715458869934,
-0.5097202062606812,
-0.1567336767911911,
-0.48416733741760254,
-0.061557698994874954,
0.5343878865242004,
-0.1340363472700119,
0.0149536523967... | |
PInvoke Interop Assistant then pass it via ref or out. | [
0.2135200947523117,
0.1070261299610138,
0.6351684927940369,
-0.09193430840969086,
0.07169057428836823,
0.17790324985980988,
-0.03902873396873474,
-0.019411036744713783,
0.17111735045909882,
-0.5776698589324951,
-0.47783419489860535,
0.653556764125824,
0.02461116574704647,
0.069458782672882... | |
So for complex types, we can write:
```
return new MyType ( 5 );
```
but why can't we do stuff like (to have symmetry for one):
```
return new int ( 5 );
return new Int64 ( 5 );
```
I know only parameterless constructors are provided. What's the reason for this?
What would be the point? Any of the .NET value typ... | [
0.21090465784072876,
0.12389715760946274,
0.14158974587917328,
-0.00933254137635231,
-0.07688276469707489,
-0.1954953521490097,
0.2602826654911041,
-0.17194205522537231,
0.006773463450372219,
-0.5485345125198364,
-0.0912349671125412,
0.683673620223999,
-0.6384953260421753,
0.15132015943527... | |
impossible
```
int i = new int(new int(new int(...)));
```
With literal
```
int i = new int(5); // What is the point? Would the constructor do *anything*
// besides int i = 5?
``` | [
-0.059236470609903336,
0.36126235127449036,
0.15128177404403687,
-0.04217780381441116,
0.17585676908493042,
-0.10239227861166,
0.43989524245262146,
-0.3737345337867737,
0.000623363652266562,
-0.19850710034370422,
-0.4233258366584778,
0.5468428730964661,
-0.372729629278183,
-0.0474864654242... | |
I am writing a python package with modules that need to open data files in a `./data/` subdirectory. Right now I have the paths to the files hardcoded into my classes and functions. I would like to write more robust code that can access the subdirectory regardless of where it is installed on the user's system.
I've t... | [
0.2863959074020386,
0.10313091427087784,
0.21165402233600616,
-0.14253537356853485,
-0.03222675621509552,
-0.043095558881759644,
0.3935210406780243,
-0.05871834605932236,
-0.08814994245767593,
-0.5595517754554749,
-0.17362557351589203,
0.7283730506896973,
-0.18600651621818542,
-0.014230937... | |
be a trivial, common problem. Yet I can't seem to figure it out. Part of the problem is that my data files are not `.py` files, so I can't use import functions and the like.
Any suggestions?
Right now my package directory looks like:
```
/
__init__.py
module1.py
module2.py
data/
data.txt
```
I am trying to... | [
0.12182151526212692,
0.041934289038181305,
0.28293856978416443,
-0.17980684340000153,
0.01658949814736843,
-0.016758129000663757,
0.24703730642795563,
-0.34750092029571533,
0.04720355570316315,
-0.8347442746162415,
-0.15510627627372742,
0.864268958568573,
-0.4902225732803345,
0.01892677880... | |
Has anybody any experience in using Gupta (formerly Centura) Team Developer?
If so, what do you think of it in terms of its capability to support the development of mature, scalable, maintainable applications?
Thanks
I have been using the CTD since version 1.1. Currently I'm still using 2.1 PTF4, mainly for doing ri... | [
0.259941041469574,
0.12368951737880707,
0.4614749252796173,
-0.038417667150497437,
-0.2740963101387024,
-0.18944324553012848,
-0.008235888555645943,
0.12615303695201874,
-0.06661688536405563,
-0.8230710625648499,
0.2730993330478668,
0.7603535056114197,
-0.0526268295943737,
0.13187415897846... | |
called "user defined variables" in 2.1) and integrate MS Office. We have no stability issues or memory leaks. The development environment is a bit long in the tooth, though: no intellisense, no smart debugging and practically unusable without a mouse. This may have changed with newer versions.
There is nothing in the n... | [
0.07910346984863281,
-0.06365064531564713,
0.2169729471206665,
0.16538876295089722,
0.08891675621271133,
-0.2822366952896118,
0.48957037925720215,
-0.06288453936576843,
-0.04749751463532448,
-0.8603641390800476,
-0.06402432918548584,
0.8340426683425903,
-0.47674986720085144,
0.166921392083... | |
access modifiers like "private" or "protected". Also: no interfaces or abstract classes. On the other hand: multiple inheritance.
The "outline structure" of the code takes some getting used to, but I even sometimes miss the outline structure when I get lost in a sprawling C#-file with variable declarations and event ha... | [
-0.1836925446987152,
-0.022221112623810768,
0.37110084295272827,
0.2789780795574188,
0.07417742908000946,
-0.23263299465179443,
0.13371224701404572,
0.14086736738681793,
-0.19781585037708282,
-0.6339728236198425,
0.10092396289110184,
0.4043748378753662,
-0.1547398865222931,
0.1132186278700... | |
the apps look more up-to-date. The mtable-Extensions for table windows where very helpfull, available here: [MTable by MICSTO](http://www.micsto.de/) . Integrating 3rd-party-DLLs (e.g. for integrating a smartcard-reader) is not really fun, especially when they use structs. Oh: and the "Centura Report Builder" is a roya... | [
0.11330025643110275,
0.0025342798326164484,
0.4555426836013794,
0.5535220503807068,
-0.03985556215047836,
-0.21868284046649933,
0.1333381086587906,
-0.03690706938505173,
-0.02159886807203293,
-0.7002264857292175,
-0.03063124790787697,
0.849251389503479,
-0.026910293847322464,
-0.2717019617... | |
unusual outline structure and can lead the unwary towards writing "ugly" code: e.g. lots of static functions, lots of code in the "Message Actions" and problems with variable scoping. I think your success with CTD will depend on the nature of the application you want to write: for a rich client CRUD you might almost ce... | [
0.14745748043060303,
0.05640270933508873,
0.3055301308631897,
-0.0017744178185239434,
-0.3421389162540436,
-0.1090521365404129,
0.3099666237831116,
0.10086402297019958,
-0.19728955626487732,
-0.7213902473449707,
0.44954854249954224,
0.5706130862236023,
-0.19485345482826233,
0.0196736846119... | |
the pros and cons of the language alone, you might want to consider that CTD is a niche. There are not many free tools and I have yet to find a vibrant community (there was a newsgroup, but the server went down after the merger - maybe its still around somwhere). So, googling up help on specific Problems may no be easy... | [
0.23995660245418549,
-0.045111678540706635,
0.41455501317977905,
-0.18084795773029327,
-0.14663384854793549,
-0.253400593996048,
0.6560387015342712,
0.4487816393375397,
-0.15602053701877594,
-0.7825153470039368,
-0.36220964789390564,
0.5787533521652222,
-0.3544461131095886,
0.0632146224379... | |
pay for bugfixes I deceided to continue using 2.1 for our legacy apps and switch to .net for new apps. I think they revised this later on. | [
0.7492241263389587,
0.10043422132730484,
0.35913020372390747,
0.39903953671455383,
0.22401230037212372,
-0.17014135420322418,
0.2632792592048645,
0.2808888554573059,
0.07662846893072128,
-0.5706275701522827,
0.0044305454939603806,
0.5270919799804688,
-0.3676128089427948,
-0.019970407709479... | |
Here's my situation...
I'm writing a .Net/C# security system (authorization and authentication) for a large collection of web applications that require a single sign-on process. I'm using Active Directory as a data store and have written a very nice prototype that communicates with AD through LDAP. This component retr... | [
0.46610939502716064,
0.3056722581386566,
0.3901762068271637,
-0.09141623228788376,
0.11013562232255936,
-0.20000095665454865,
0.12463375926017761,
-0.15270139276981354,
0.05672949552536011,
-0.6198267936706543,
0.1163845881819725,
0.6778379082679749,
-0.38176965713500977,
-0.14547759294509... | |
wasn't aware that for each domain, I needed a separate server and domain controller. As it turns out, there are like 9 different domains that my team requires to be set up for all of the different environments that we're going to be accessing AD...
* env1.dev.mycompany.com
* env1.qa.mycompany.com
* env1.stage.mycompa... | [
0.4365311861038208,
0.40793299674987793,
0.6621704697608948,
0.23155125975608826,
0.09666271507740021,
-0.04631580412387848,
0.15626224875450134,
0.08308804780244827,
-0.10765618830919266,
-0.8612878322601318,
0.35511717200279236,
0.3154959976673126,
-0.15574903786182404,
0.633666217327117... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.