text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
create a dictionary of arguments to locks: ``` import threading dict_lock = threading.RLock() locks = {} def fn_dict(arg): dict_lock.acquire() try: if arg not in dict: locks[arg] = threading.RLock() l = locks[arg] finally: dict_lock.release() l.acquire() try: ...
[ -0.21993127465248108, -0.2675613462924957, 0.5007150173187256, -0.20006869733333588, 0.4685908257961273, -0.04438941180706024, 0.14372660219669342, -0.29028284549713135, -0.16319800913333893, -0.513534665107727, -0.5146116018295288, 0.7050251364707947, -0.4728299081325531, -0.0746067091822...
function can be called with many different arguments, though, that amounts to a lot of locks. Probably a better way is to have a set of all arguments with which the function is currently executing, and have the contents of that set protected by a lock. I think this should work: ``` set_condition = threading.Condition(...
[ -0.02026977203786373, -0.36715221405029297, 0.32844921946525574, -0.22096854448318481, 0.29710909724235535, -0.021563321352005005, 0.29123714566230774, -0.27450764179229736, -0.14086444675922394, -0.49746328592300415, -0.20232269167900085, 0.8177119493484497, -0.5435865521430969, 0.0048997...
set_condition.release() # do stuff set_condition.acquire() try: current_args.remove(arg) set_condition.notifyAll() finally: set_condition.release() ```
[ 0.34054651856422424, -0.049865853041410446, 0.6262320280075073, -0.294124037027359, 0.6143405437469482, -0.3582051694393158, 0.36675405502319336, -0.23157213628292084, -0.3087470829486847, -0.4077053666114807, -0.5132200121879578, 0.545373260974884, -0.6113289594650269, 0.2359028160572052,...
This is not the first time I'm using this method to send a POST request, and I never had any problems: ``` public static Stream SendPostRequest(Uri uri, byte[] postData) { var request = WebRequest.Create(uri); request.Method = "POST"; request.ContentType = "application/x-www-form-urlenc...
[ -0.06377854198217392, -0.1875346601009369, 0.7153565883636475, -0.16077087819576263, -0.3143630623817444, 0.013855750672519207, 0.3992171883583069, -0.15688663721084595, -0.0789470300078392, -0.7985565066337585, -0.23332668840885162, 0.1644545942544937, -0.37437042593955994, 0.570474267005...
requestStream.Close(); return request.GetResponse().GetResponseStream(); } ``` On request.GetRequestStream() I'm getting a System.Net.WebException: The underlying connection was closed: An unexpected error occured on a send. Even more interesting, it works perfectly well on some machines, but doesn't w...
[ 0.010968933813273907, 0.03484649211168289, 0.7410809993743896, -0.005163989961147308, 0.056044261902570724, -0.19779472053050995, 0.5801057815551758, -0.22107917070388794, -0.14288614690303802, -0.9091770052909851, -0.07723430544137955, 0.5798465609550476, -0.2670944035053253, 0.1248409226...
Server 2008 - .NET 3.5 Doesn't work - Windows 7 Beta - .NET 3.5 SP1 Tried: * Bunch of stuff from [here](http://blogs.msdn.com/engelsr/articles/497902.aspx), nothing helped. * Using [WebClient](https://stackoverflow.com/questions/625513/sending-a-post-request-system-net-webexception/625558#625558), nothing change...
[ -0.21517550945281982, -0.12755097448825836, 0.41026490926742554, -0.018286651000380516, -0.5649880170822144, -0.24235764145851135, 0.5898106694221497, 0.12436089664697647, -0.17821204662322998, -0.538428783416748, 0.1018054410815239, 0.5082215070724487, -0.26055970788002014, 0.061576988548...
each case. See what each machine is sending. Also, you've noted differences between operating systems, but do they all have the exact same version of .NET (down to SP) installed?
[ 0.5453899502754211, -0.17573945224285126, 0.32855093479156494, 0.42623546719551086, -0.03692173585295677, -0.10695982724428177, 0.06529217213392258, 0.07929127663373947, -0.34393110871315, -0.6062575578689575, 0.052765730768442154, 0.3754444718360901, -0.3153110444545746, -0.17676252126693...
While setting up Hudson for continous integration testing (on a JeOS server), I've come across some strange behaviour I'm hoping the fine people at SO can explain to me. Our unit tests depend heavily on the use of domain objects, with lots of properties that must be set (due to null constraints in the database). In or...
[ 0.06808051466941833, -0.13858160376548767, 0.12917980551719666, -0.006082823034375906, -0.1069483682513237, 0.20413942635059357, 0.21649043262004852, -0.218612402677536, -0.0768011063337326, -0.36636051535606384, 0.185236856341362, 0.5223003029823303, -0.1881621927022934, 0.369092434644699...
@Override public T perform() throws Exception { T object = type.newInstance(); for (KeyValuePair<?> propertyValue : propertyValues) { String propertyName = propertyValue.getKey(); Object value = propertyValue.getValue();
[ 0.13836732506752014, -0.4214912950992584, 0.2672477066516876, -0.1746598482131958, 0.25788453221321106, -0.15675973892211914, 0.7168464660644531, -0.5789219737052917, 0.2414046823978424, -0.208989217877388, -0.47376662492752075, 0.8205350041389465, -0.40176376700401306, 0.31963998079299927...
String setterName = "set" + StringUtils.capitalize(propertyName); ReflectionUtils.invoke(object, setterName, value); } return object; } }); } public static void invoke(final Object target, final String methodName, final Object... params) { List<Class<?>> paramet...
[ 0.038617417216300964, -0.39724013209342957, 0.49318674206733704, 0.01656472124159336, -0.1221371442079544, 0.32941052317619324, 0.3759460151195526, -0.5555275082588196, -0.22970536351203918, -0.42711541056632996, -0.31850266456604004, 0.5470511317253113, -0.39616629481315613, 0.02337299846...
parameterTypes.toArray(new Class<?>[] {})); invoke(target, method, params); } public class Foo { private String foo; public void setFoo(final String foo) { this.foo = foo; } } public class Bar extends Foo { private String bar; public void setBar(final String bar) { this.bar = ...
[ 0.25712183117866516, 0.0681796744465828, 0.7274392247200012, -0.29748138785362244, 0.08410969376564026, 0.20483706891536713, 0.34947770833969116, -0.5133205652236938, -0.02973625622689724, -0.19613990187644958, -0.25582605600357056, 0.7043642997741699, -0.5691367983818054, 0.29041329026222...
nothing wrong with it. Which is also true for Windows - we use InstantiationUtils throughout our unit tests without any problems. Linux, however, is different. It turns out that in Linux, the newInstance() method only works for direct (i.e. not inherited) members of the class we want to instantiate. InstantiationUtil...
[ 0.18160687386989594, -0.04090176895260811, 0.20603235065937042, -0.047514453530311584, -0.04251691326498985, -0.04618975520133972, 0.5488512516021729, -0.28957119584083557, -0.17592483758926392, -0.462550550699234, 0.0017463667318224907, 0.8938555717468262, -0.31828412413597107, 0.11103354...
time accepting that inherited public methods are treated differently, so I have tested this in all ways I can think of. And it always ends up with the conclusion that under Linux, at least with the above usage of Reflection, we can't access public inherited methods. On Windows, I use Sun's JRE 1.6.0.11, in Linux it's ...
[ 0.24003605544567108, 0.022599436342716217, 0.11878321319818497, 0.18080653250217438, -0.4225878119468689, -0.38462018966674805, 0.2943691313266754, 0.03747178614139557, -0.2231491059064865, -0.6104349493980408, 0.18652737140655518, 0.7587049603462219, -0.08297190070152283, 0.23003776371479...
parameter list when figuring out what signature the Method should have. I'd like to spend more time investigating this, but as always there are things to do and projects to deliver, so I just have to accept that getAccessibleMethod works, and move on :-) Thanks to everyone for their input!
[ 0.48587697744369507, -0.1346931904554367, 0.33743199706077576, 0.6089566946029663, -0.29001545906066895, -0.29790347814559937, 0.42696377635002136, 0.3037044107913971, -0.05299590155482292, -0.6631365418434143, 0.02801288105547428, 0.639457106590271, 0.12527644634246826, -0.010709581896662...
I am building a real estate website. I have a table for properties (i.e. "houses"), a table for pictures, a table for features, etc. So each property's data comes from three, not only one table. I need to provide a function that retrieves requested property data depending on a search criteria, for example: 1. propert...
[ 0.5739418864250183, 0.24797309935092926, 0.9743506908416748, -0.01866360753774643, 0.16168572008609772, 0.1117774099111557, 0.00775568513199687, -0.3468230962753296, -0.19973379373550415, -0.7455594539642334, -0.19689714908599854, 0.24254415929317474, 0.31071287393569946, 0.555056750774383...
of building one flexible mechanism that will retrieves whatever you want in a smart way, I mean one function that works for all cases? I know my question is kind of vague and too broad, but bear with me please. Thanks in advance. PS: I am using ASP.NET 3.5, VB.NET, Visual Web Developer 2008 Express, SQL Server 2005...
[ -0.254067063331604, 0.04351086542010307, 0.20318248867988586, 0.3383990526199341, -0.06418047845363617, -0.0862889438867569, 0.09819760173559189, -0.18900752067565918, -0.33220455050468445, -0.48976463079452515, 0.08892287313938141, 0.4239000082015991, -0.22035329043865204, -0.527752339839...
simple search would be using all parameter defaults. Whenever any criteria is provided to narrow the search, the passed parameter value will be used by the Stored Procedure.
[ -0.33909887075424194, -0.2741093039512634, 0.328154593706131, 0.06151936203241348, 0.08951091766357422, 0.1021101251244545, 0.0374235063791275, -0.12468920648097992, -0.07322666049003601, -0.5795385241508484, -0.38935136795043945, 0.5837770700454712, -0.45630961656570435, 0.179129526019096...
Okay, weird situation: I need to Debug a VSTO Office Addin. This was written in Visual Studio 2008 Professional and debugging is usually done by loading the Project, Attaching to Outlook.exe and setting breakpoints - works fine. But I gave a situation where it does not work as expected on one machine, but I do not hav...
[ -0.12834636867046356, 0.17382195591926575, 0.20638048648834229, 0.27139121294021606, -0.0734737291932106, -0.30733343958854675, 0.5491792559623718, 0.2111143320798874, -0.08375116437673569, -0.46103158593177795, 0.1021118238568306, 0.5774845480918884, -0.4514583945274353, 0.052629966288805...
since I'm "armed" with the .pdb File, Source Code and .dll that was used for this. Edit: Just for clarification, it's not an exception, it's an if/else block that goes into the else block even though it should not. I would need to set a breakpoint and inspect some .net variables, possibly even modifying them. WinDbg w...
[ 0.12848325073719025, -0.04878285154700279, 0.11534827202558517, 0.05251367390155792, -0.04297405108809471, -0.4017675817012787, 0.36686205863952637, -0.22717545926570892, -0.2747010588645935, -0.38430532813072205, 0.0627303496003151, 0.2893003523349762, -0.08475610613822937, -0.07176236808...
I want to apply the following "awk" command on files with extension "\*.txt" ``` awk '$4 ~ /NM/{ sum += $2 } END{ print sum }' ``` But why this command doesn't work: ``` for i in *.txt do echo awk '$4 ~ /NM/{ sum += $2 } END{ print sum }' $i; done ``` Normally, ``` awk '$4 ~ /NM/{ sum += $2 } END{ print sum }' f...
[ 0.36609411239624023, 0.13057582080364227, 0.15258730947971344, -0.22316844761371613, -0.11030375212430954, 0.05006954073905945, 0.6553298234939575, -0.5458493232727051, 0.2499193400144577, -0.2713998556137085, 0.0119644645601511, 0.5452479124069214, -0.5401840209960938, 0.0827469676733017,...
this: ``` find . -name '*.txt' -print0 | xargs --null -n 1 awk '$4 ~ /NM/{ sum += $2 } END{ print sum }' ``` An alternative for printing out names: ``` find . -name '*.txt' -print -exec awk '$4 ~ /NM/{ sum += $2 } END{ print sum }' {} \; ``` (Basically make find execute awk directly, so and also print out the fil...
[ -0.021631723269820213, -0.15373952686786652, 0.1745651811361313, -0.17267118394374847, -0.056259606033563614, -0.010404687374830246, 0.22371502220630646, -0.30221980810165405, 0.24074696004390717, -0.45083069801330566, -0.3022962510585785, 0.5086934566497803, -0.22484444081783295, 0.067090...
I know one can set the session timeout. But, if the application itself has received no requests for a given period of time, IIS shuts down the application. This behavior is configurable in the IIS management console, and I know how to do this. Still, I wonder if it is possible to configure this in web.config. Not in I...
[ 0.1862184703350067, -0.22552920877933502, 0.504496157169342, -0.06902718544006348, 0.04334587976336479, -0.13712629675865173, 0.3621631860733032, -0.18393166363239288, -0.07655294239521027, -0.8676926493644714, -0.012644868344068527, 0.6119809746742249, -0.28357547521591187, 0.287622153759...
there's no communication hooks between .Net and the low-level http handlers. ASP.net is implimented as an ISAPI filter, which is loaded by the Worker Process itself. You have a chicken-before-the-egg issue if you are looking at the web.config controlling a worker process. This is primarily why MS did the major re-wri...
[ 0.05548551678657532, -0.4863550662994385, 0.20912154018878937, -0.10464920103549957, -0.009259331040084362, -0.09691132605075836, 0.11206626892089844, 0.11644437164068222, -0.3145860433578491, -0.6420106887817383, -0.154907688498497, 0.3074421286582947, -0.4610920250415802, -0.095313921570...
I am trying to compile this : ``` template <class T, class U = myDefaultUClass<T> > class myClass{ ... }; ``` Although it seems quite intuitive to me it is not for my compiler, does anyone knows how to do this ? **edit :** Ok, the problem was not actually coming from this but from a residual try ... Sorry about t...
[ 0.16559727489948273, 0.16049304604530334, 0.1003510132431984, 0.05078456178307533, -0.1227974072098732, -0.17530004680156708, 0.5651230216026306, 0.043033160269260406, -0.14739017188549042, -0.7082597613334656, 0.022472446784377098, 0.5867341756820679, -0.5174329876899719, 0.13820987939834...
Lets say that i have this block of text ``` public function __construct() { parent::__construct(); } ``` and i want to insert a new line above parrent::construct at the same level. Like: ``` public function __construct() { // this is the new line. parent::__construct(); } ``` how can i do this. I try...
[ -0.06114739924669266, 0.31855639815330505, 0.5589613318443298, -0.08665411919355392, -0.11211217939853668, -0.09313547611236572, 0.36450883746147156, -0.04098420590162277, -0.03886200860142708, -0.6031621098518372, -0.20422974228858948, 0.4581739902496338, -0.22238394618034363, 0.278182953...
line ? or a shortcut to jump faster to parrent ? Try `O` and `o` in the normal mode.
[ 0.25167080760002136, -0.4022386372089386, 0.3517593443393707, 0.14628863334655762, -0.09742166846990585, 0.08743748813867569, 0.4731089472770691, 0.28835180401802063, -0.2319154143333435, -0.20258860290050507, -0.14254367351531982, 0.6065655946731567, -0.3452252447605133, -0.19801345467567...
How can I find out the `instance id` of an ec2 instance from within the ec2 instance? See [the EC2 documentation on the subject](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html). Run: ``` wget -q -O - http://169.254.169.254/latest/meta-data/instance-id ``` If you need programmatic acce...
[ -0.2219124585390091, 0.4486669898033142, 0.4288475513458252, 0.05225604772567749, 0.4180775284767151, -0.2784174978733063, 0.5479024648666382, -0.5031309127807617, -0.02553560398519039, -0.5912117958068848, -0.2786023020744324, 0.5695221424102783, 0.017923055216670036, 0.09899499267339706,...
|| die \"wget availability-zone has failed: $?\"`" test -n "$EC2_AVAIL_ZONE" || die 'cannot obtain availability-zone' EC2_REGION="`echo \"$EC2_AVAIL_ZONE\" | sed -e 's:\([0-9][0-9]*\)[a-z]*\$:\\1:'`" ``` You may also use `curl` instead of `wget`, depending on what is installed on your platform.
[ 0.015541838482022285, -0.16255414485931396, 0.6128672957420349, 0.022787924855947495, 0.4157215654850006, -0.1037423312664032, 0.13766531646251678, -0.23980988562107086, -0.035247981548309326, -0.6494418978691101, -0.2575596570968628, 0.567021369934082, -0.11354608833789825, 0.093178085982...
It seems that the inheritsFrom: method in GNU Smalltalk returns true for every undefined class name sent to it as a parameter. This might make a program very hard to debug, IMHO. Looking at the code for this in the Behavior class, it looks like this: ``` inheritsFrom: aClass [ "Returns true if aClass is a superclass o...
[ -0.04385962337255478, 0.03862392157316208, 0.12508827447891235, 0.03372578322887421, -0.1007496565580368, -0.25797581672668457, 0.38791581988334656, -0.18291175365447998, -0.11924885213375092, -0.20622612535953522, -0.11840848624706268, 0.30445802211761475, -0.5750530362129211, 0.314454734...
this way. (I am new to the Smalltalk world, by the way, and trying to learn.) Thanks. This is not related to exceptions but rather to undefined variables. In GNU Smalltalk's REPL, or alternatively in a Transcript or Workspace for graphical environments, undefined variables are all nil---this is not very different in R...
[ 0.021621378138661385, -0.015649940818548203, -0.1516813337802887, 0.08508551120758057, -0.13968729972839355, -0.44058623909950256, 0.47103047370910645, 0.16830836236476898, -0.43946337699890137, -0.4951883852481842, 0.10005325824022293, 0.8118370771408081, -0.2103281021118164, -0.035762537...
For a communication between two hosts, I need to send the IP address of my host to the other site. The problem is that if I request my IP address, it might be that I get back my local loopback IP addres (127.x.x.x) , not the network (ethernet) IP address. I use the following code: ``` char myhostname[32]; gethostnam...
[ -0.22350236773490906, 0.4676567316055298, 0.6903407573699951, -0.06303396821022034, 0.023389028385281563, 0.18551591038703918, 0.3373134434223175, -0.24759161472320557, -0.10588623583316803, -0.701442539691925, -0.09861407428979874, 0.4693232476711273, -0.44616010785102844, 0.2749049961566...
network address, not the local loopback (the default for e.g. Ubuntu). Is there a way to solve this without relying on the content of /etc/hosts? **Edit:** I changed the above code so it makes use of getaddrinfo, but I still get back the loopback device's number (127.0,0,1) instead of the real IP address: ``` struct...
[ -0.2780829071998596, -0.15086892247200012, 0.3234906494617462, 0.007746051996946335, -0.027049262076616287, -0.13825151324272156, 0.5667871832847595, -0.03577173873782158, -0.3391053080558777, -1.0035514831542969, -0.07327685505151749, 0.25192686915397644, -0.46889734268188477, 0.352232068...
list of 3 addrinfo's with the three SOCK\_STREAM,SOCK\_DGRAM and SOCK\_RAW, but the hint prevents that) So my question still stands... There is POSIX function `getaddrinfo()` that returns linked list of addresses for given hostname, so you just need to go through that list and find non-loopback address. See `man geta...
[ 0.07835843414068222, -0.17909853160381317, 0.27290523052215576, -0.007005441468209028, -0.2461872100830078, -0.030995270237326622, 0.24883891642093658, -0.16588406264781952, -0.44611063599586487, -0.8428822159767151, 0.10830757021903992, 0.4545539319515228, -0.4889620542526245, 0.294084668...
I have this test app: ``` import java.applet.*; import java.awt.*; import java.net.URL; public class Test extends Applet { public void init() { URL some=Test.class.getClass().getClassLoader().getResource("/assets/pacman.png"); System.out.println(some.toString()); System.out.println(som...
[ 0.5003823041915894, 0.20512157678604126, 0.11292873322963715, -0.2665092945098877, -0.06074267253279686, 0.1994924396276474, 0.5722501873970032, -0.4617363512516022, 0.21558411419391632, -0.7451751828193665, 0.050940949469804764, 0.5082289576530457, -0.4160892963409424, -0.0650754496455192...
the 'assets' directory which contains pacman.png. What am I doing wrong and how to resolve it? I would do it this way: ``` final InputStream stream; stream = Test.class.getResourceAsStream("assets/pacman.png"); System.out.println("Stream = " + stream); ``` "/assets/pacman.png" is an absolute location whle "assets/...
[ -0.2740814685821533, 0.06805449724197388, 0.2783806025981903, 0.09343556314706802, 0.3682991862297058, 0.020948713645339012, 0.3408576548099518, -0.20790550112724304, -0.15166887640953064, -0.42420321702957153, -0.07025831937789917, 0.5513046979904175, -0.030422888696193695, 0.226621776819...
``` class A { public synchronized void myOneMethod() { // ... } } class B extends A { public synchronized void myOtherMethod() { // ... } } // ... B myObject; // ... myObject.myOneMethod(); // acquires lock myObject.myOtherMethod(); // same lock? ``` How I understand the synchroni...
[ 0.19245804846286774, 0.04454392194747925, 0.2454390823841095, -0.00007627836021129042, 0.16391754150390625, -0.12514697015285492, 0.08070047199726105, -0.1688082069158554, -0.16047103703022003, -0.31300780177116394, -0.29015928506851196, 0.5363743305206299, -0.7399526834487915, 0.194625928...
you sure, and I'm not? :-) Yes, you are right, and you got the explanation right too. Nothing much to add. Note that if the methods were *static*, then they would synchronize on different objects, namely their respective classes (A and B). *EDIT*: Why am I sure? I don't know, why are you not sure? ;-) `myObject` is j...
[ 0.4650973975658417, 0.07505020499229431, 0.027214476838707924, 0.46686601638793945, 0.0465354323387146, -0.10618992894887924, 0.22950346767902374, 0.04220298305153847, -0.21618162095546722, -0.05655893683433533, 0.13323906064033508, 0.5404551029205322, -0.0649004653096199, -0.0529549531638...
about reflection for now. For common operations on the object there's no distinction.)
[ 0.5092692971229553, 0.10291539132595062, -0.12320797145366669, 0.1249559223651886, -0.13097406923770905, 0.11530866473913193, 0.38066473603248596, 0.3306926488876343, -0.08532705903053284, -0.43731826543807983, 0.13517028093338013, 0.7902944087982178, 0.04665191471576691, -0.10340243577957...
I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files *(can happen also in the same file)*. But fortunately(?) this doesn't hap...
[ 0.2901134490966797, 0.31137987971305847, -0.045224662870168686, 0.2821176052093506, -0.07641833275556564, -0.2569529712200165, 0.23609137535095215, 0.37957504391670227, -0.5144026279449463, -0.5490986704826355, -0.09087660163640976, 0.299197256565094, 0.02589746005833149, 0.263665616512298...
`A.h` ``` class B; class A { int _val; B *_b; public: A(int val) :_val(val) { } void SetB(B *b) { _b = b; _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B' } void Print() { cout<<"Type:A val="<<_val<<endl; } }; ``` --- * `...
[ 0.017808467149734497, 0.025115758180618286, -0.05163880065083504, -0.4920187294483185, 0.09284330159425735, 0.11546556651592255, 0.4391958713531494, -0.3416250944137573, -0.1132010743021965, -0.27592799067497253, -0.7148634791374207, 0.5737853050231934, -0.8039100766181946, 0.1273720860481...
double _val; A* _a; public: B(double val) :_val(val) { } void SetA(A *a) { _a = a; _a->Print(); } void Print() { cout<<"Type:B val="<<_val<<endl; } }; ``` --- * `main.cpp` ``` #include "B.h" #include <iostream> int main(int argc, char* argv...
[ 0.1334610879421234, -0.05778372660279274, 0.41024816036224365, -0.6649383306503296, 0.17781475186347961, 0.43926990032196045, 0.43732893466949463, -0.24971981346607208, -0.26524069905281067, -0.19642309844493866, -0.4917096495628357, 0.5306873321533203, -0.797246515750885, 0.02795716375112...
B b(3.14); a.Print(); a.SetB(&b); b.Print(); b.SetA(&a); return 0; } ``` The way to think about this is to "think like a compiler". Imagine you are writing a compiler. And you see code like this. ``` // file: A.h class A { B _b; }; // file: B.h class B { A _a; }; // file main.cc #include "A...
[ 0.4994161128997803, 0.36287471652030945, -0.10241171717643738, -0.19843879342079163, -0.09192725270986557, 0.007132853846997023, 0.2503930628299713, -0.4387616813182831, -0.2866014540195465, -0.36828726530075073, -0.23797519505023956, 0.307138055562973, -0.554802656173706, 0.10650053620338...
then? Enough to store `B`! What's the size of `B` then? Enough to store `A`! Oops. Clearly a circular reference that you must break. You can break it by allowing the compiler to instead reserve as much space as it knows about upfront - pointers and references, for example, will always be 32 or 64 bits (depending on t...
[ 0.22318844497203827, 0.32945191860198975, 0.031558264046907425, -0.07242774963378906, 0.13030733168125153, -0.035690486431121826, 0.23947465419769287, -0.17431896924972534, -0.5031853318214417, -0.24130624532699585, -0.18895064294338226, 0.3061549663543701, -0.20527009665966034, 0.21911813...
_b_ref; B* _b_ptr; }; ``` Now things are better. Somewhat. `main()` still says: ``` // file: main.cc #include "A.h" // <-- Houston, we have a problem ``` `#include`, for all extents and purposes (if you take the preprocessor out) just copies the file into the **.cc**. So really, the **.cc** looks like: ``` // ...
[ 0.361611545085907, 0.4415539503097534, 0.16376326978206635, -0.20940029621124268, 0.0066697970032691956, -0.29350554943084717, 0.37606024742126465, -0.10795081406831741, -0.48075342178344727, -0.42857080698013306, -0.1026943176984787, 0.3667755424976349, -0.4500390291213989, 0.320881128311...
[forward declaration](http://en.cppreference.com/w/cpp/language/class), and is discussed further in [this answer](https://stackoverflow.com/a/4757718/391161). ``` // main.cc class B; #include "A.h" #include "B.h" int main (...) { A a; } ``` This *works*. It is not *great*. But at this point you should have an unde...
[ -0.05384501814842224, 0.4610234797000885, 0.5650536417961121, -0.20959687232971191, -0.4405338168144226, 0.00591419730335474, 0.14070937037467957, -0.6531053781509399, -0.49496108293533325, -0.22353175282478333, -0.1434347778558731, 0.24724344909191132, -0.11457809805870056, 0.570129871368...
the other variants. }; ``` And in **B.h**, at this point, you can just `#include "A.h"` directly. ``` // file: B.h #include "A.h" class B { // note that this is cool because the compiler knows by this time // how much space A will need. A _a; } ``` HTH.
[ 0.1406225860118866, 0.08427441120147705, -0.01378701627254486, -0.31062281131744385, -0.0781073197722435, -0.13380217552185059, 0.187871053814888, -0.1067231297492981, -0.22239498794078827, -0.5327368378639221, -0.4710538983345032, 0.33195629715919495, -0.41078972816467285, 0.0761409401893...
I am trying to add a rich text editor in my web page where users can write reviews and format what they have written...something similar to the editor in which we write our posts on this site... can anyone point me to the right direction regarding this...any tutorial that would help me build such a component... Also i ...
[ 0.363947331905365, 0.15770302712917328, 0.2130168229341507, 0.44064170122146606, -0.11238489300012589, -0.3844562768936157, 0.04101761803030968, 0.0780598446726799, 0.04263453558087349, -0.24451394379138947, 0.33479565382003784, 0.5223320126533508, -0.18573591113090515, 0.24642957746982574...
that on my own so i used the help of a few sites.... [javascript Rich Text Editors](https://stackoverflow.com/questions/299577/javascript-rich-text-editors) <http://aspalliance.com/1092_Rich_Text_Editor_Part_I> <http://ws.aspalliance.com/1092_Rich_Text_Editor_Part_II> and a few others too... so the best option for ...
[ -0.09420900046825409, -0.025982407853007317, 0.2629210352897644, 0.259856253862381, 0.13523586094379425, 0.3183279037475586, -0.022235408425331116, -0.24338284134864807, -0.43980103731155396, -0.08344919979572296, 0.22554093599319458, 0.3811960518360138, -0.00615324592217803, 0.12036785483...
I have a GUI application within which i'm spawning a console application using Process class. ``` Process p1 = new Process(); p1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p1.StartInfo.CreateNoWindow = true; p1.StartInfo.UseShellExecute = false; p1.StartInfo.FileName = Path.Combine(basepath, "abc.exe"); p1.Sta...
[ 0.001889921841211617, 0.11737346649169922, 0.585301399230957, -0.16652458906173706, 0.2876235544681549, 0.27794358134269714, 0.402204692363739, -0.3505632281303406, -0.02406327798962593, -0.7705368399620056, -0.060130298137664795, 0.8040218949317932, -0.2572169303894043, 0.1682396531105041...
sleep() call internally, so i need to print the data till it goes to sleep. How can i do it? ============= As it was mentioned the output is line buffered, i tried the following change in the code ``` p1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p1.StartInfo.CreateNoWindow = true; p1.StartInfo.UseShellExec...
[ 0.32069194316864014, -0.20978136360645294, 0.5796367526054382, -0.4448915719985962, 0.576030969619751, -0.03823842480778694, 0.4967321455478668, -0.5716448426246643, -0.12386603653430939, -0.7325459122657776, -0.3081694543361664, 0.81492018699646, -0.3502153754234314, 0.004672256764024496,...
{ richTextBox1.Invoke(new UpdateOutputCallback(this.updateoutput), new object[] { str }); p1.StandardOutput.BaseStream.Flush(); } } ``` So i think it now monitors when each line is written and it prints it right? this too didn't work. Any thing wrong there? The Output and Error Dat...
[ -0.023488646373152733, -0.16698966920375824, 0.43473613262176514, 0.11676888167858124, -0.0028006655629724264, -0.1272367537021637, 0.345480352640152, -0.06494694203138351, -0.0847012922167778, -0.727274477481842, -0.07981932163238525, 0.6886646151542664, -0.5059006214141846, -0.1404995769...
Obvioulsly, this would have to be non-blocking :)
[ -0.4748280346393585, 0.005554454401135445, 0.5605043172836304, -0.10730395466089249, -0.39466726779937744, 0.15843729674816132, 0.31467488408088684, -0.11717215180397034, -0.15696045756340027, -0.5493288040161133, -0.12240992486476898, 0.4543266296386719, -0.570010781288147, -0.05714767426...
I have an Excel file that I need to process three times in integration services, once for projects, once for persons and once for time tracking data. At each step I have the excel source and I do need to do some data clean up and type conversions (same in all three steps). Is there an easy way of creating a step that...
[ 0.2985139787197113, 0.27859702706336975, 0.24781841039657593, -0.017638420686125755, -0.04147372022271156, -0.02017168700695038, 0.14038434624671936, -0.13730067014694214, 0.0043519544415175915, -0.7837631702423096, 0.28182855248451233, 0.442891001701355, -0.17233745753765106, -0.172805249...
it would be nice if I could skip that step. This can actually be achieved using a single data flow. You can read the Excel data source once and then use Multicast Transformation to create copies of the data set in memory. You can then process each of your three data flow branches accordingly and can also make use of p...
[ 0.4125725030899048, 0.20462676882743835, 0.12106354534626007, 0.10448167473077774, 0.011856019496917725, -0.12694169580936432, 0.12794162333011627, 0.18128353357315063, -0.24605238437652588, -0.6789108514785767, -0.18740931153297424, 0.4882104992866516, 0.018962673842906952, 0.090364016592...
the precedence/flow control of your package using more than one flow. So for example, you could use the multicast task to create three data flows however and then subsequently define your precedence flow control so that all transformation tasks in flow 1 must be completed before the transformations in flow two can begi...
[ -0.2668669521808624, -0.48719921708106995, 0.40491387248039246, 0.1714385598897934, -0.26146262884140015, -0.08423051238059998, -0.3080795705318451, -0.37269559502601624, -0.3107507824897766, -0.633579432964325, 0.07020106166601181, 0.3963213562965393, -0.20984503626823425, -0.056237727403...
I have an MS Office 2003 excel file with macro. I have to parse the VBA code in macro using c#. While parsing i have to identify whether the keyword is a method name or property. And also is there a component from Microsoft to access all the VBA functions dynamically using reflection in c#? Is there a way to do this...
[ -0.19751062989234924, 0.3659643530845642, 0.2533622980117798, -0.13320276141166687, -0.23295043408870697, -0.009788996540009975, 0.14196377992630005, -0.3879905939102173, -0.2883540689945221, -0.36961960792541504, 0.23497013747692108, 0.6798317432403564, -0.4070414900779724, -0.09314393997...
sub/function.
[ -0.32783666253089905, -0.1519903689622879, 0.1268174797296524, -0.22252002358436584, 0.03983170911669731, 0.13323237001895905, 0.09831321984529495, 0.10612942278385162, 0.10631881654262543, -0.4627113342285156, -0.6225171089172363, 0.17194324731826782, -0.21730069816112518, 0.1639405936002...
Previously, the following was my `.gitignore` file: ``` ... config/database.yml .DS_Store ``` Later I created an `app_config.yml` file in the config directory and committed it. Now, I realized that I don't need the `app_config.yml` file in the git repository. And I modified my `.gitignore` file: ``` ... config/app...
[ 0.028883449733257294, 0.1773102879524231, 0.3051789402961731, -0.06898733973503113, 0.0029154871590435505, 0.0031436097342520952, 0.5734652280807495, -0.13125650584697723, -0.7409345507621765, -0.6575663089752197, -0.34813615679740906, 0.9521418809890747, -0.6615365743637085, -0.0255824960...
it’s going to only stop watching changes for that file, and nothing else. > > This means that the history will still remember the file and have it**. > > > If you want to remove a file from the repository, but keep it in your working directory, simply use: ``` git rm --cached <file> ``` > However, this will st...
[ 0.46178945899009705, -0.11143267154693604, 0.4868614077568054, 0.1185796856880188, 0.30448654294013977, -0.2005189061164856, 0.23923316597938538, 0.2546361982822418, -0.5028605461120605, -0.74413001537323, -0.16380755603313446, 0.5176580548286438, -0.13835179805755615, 0.5334663391113281, ...
for a good reason: Git tries hard not to lose your data. > > Just like with rebasing, Git forces you to think about these kinds of options since they are destructive operations. > > > If you did actually want to remove a file from history, **`git filter-branch`** is the hacksaw you’re looking for. > > Definit...
[ 0.2810077667236328, -0.2798684239387512, 0.09923327714204788, 0.228768453001976, -0.08871033787727356, -0.477358341217041, 0.2755270302295685, 0.06494071334600449, -0.5992741584777832, -0.6589916944503784, -0.04449842497706413, 0.3502315878868103, -0.1931295245885849, 0.16646240651607513, ...
moving the project root folder around. The command to remove a file from all revisions is: ``` git filter-branch --index-filter 'git rm --cached <file>' HEAD ``` > This action can definitely be useful when you need to blow out sensitive or confidential information that may have been placed in your repository
[ 0.05894216522574425, -0.2828855514526367, 0.5993784070014954, 0.08514343947172165, 0.02643575333058834, -0.3762339949607849, 0.21950556337833405, 0.056104253977537155, -0.379841148853302, -0.48443907499313354, -0.2327311784029007, 0.16841427981853485, -0.2804032266139984, 0.269406110048294...
The code looks like this: ``` StringBuilder builder = new StringBuilder(); XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; using (XmlWriter xmlWriter = XmlWriter.Create(builder, settings)) { XmlSerializer s = new XmlSerializer(objectToSerialize.GetType()); s.Serialize...
[ -0.07042644172906876, 0.1060657650232315, 0.9073938727378845, -0.0907793715596199, -0.0026377958711236715, -0.05459379404783249, 0.39727744460105896, -0.495845228433609, -0.21946068108081818, -0.7926415205001831, -0.2698950171470642, 0.3153053820133209, -0.32538068294525146, 0.073415793478...
ns); ```
[ 0.040629733353853226, 0.05358907952904701, 0.2660139799118042, -0.2753147482872009, -0.1853133589029312, 0.16264721751213074, 0.3203033208847046, 0.07932566851377487, -0.39125677943229675, -0.5205288529396057, -0.4554328918457031, 0.5911117196083069, -0.3262592852115631, 0.3492712676525116...
I am trying to figure out recursion for OCaml in the context of an object's method. I have tried the following code but can't seem to get it to compile. ``` class foo = object (self) method loopTest = let rec doIt x = Printf.printf "%d\n" x; if x>1 then doIt (x+1) end;; ``` How do I create a recursive funct...
[ 0.0961444154381752, 0.0015184992225840688, 0.6636456251144409, -0.23966509103775024, -0.003209663089364767, -0.07535814493894577, 0.29792535305023193, -0.359929621219635, -0.28403112292289734, -0.380445659160614, -0.03303569555282593, 0.45466142892837524, -0.6009459495544434, -0.0585273280...
your loopTest method. `let` just defines doIt, just like `method` just defines a method, and does not call it. The compiler detects this because it doesn't know what to return from loopTest (like a method that does not have return type void, but has no implementation in C# or Java). Also, you're in for an infinite loo...
[ 0.3310635983943939, -0.35440343618392944, 0.275744765996933, 0.1332937777042389, -0.017668643966317177, -0.339630126953125, 0.46190735697746277, -0.22239436209201813, -0.03910309821367264, -0.49550068378448486, 0.2785719335079193, 0.27412816882133484, -0.6388216614723206, -0.13455383479595...
I realize C# and .NET in general already has the Hashtable and Dictionary classes. Can anyone demonstrate in C# an implementation of a Hashtable? **Update:** To clarify, I'm not ncessarily looking for a complete implementation, just an example of the core features of a hashtable (i.e. add,remove, find by key). There...
[ 0.2087084800004959, 0.30134421586990356, 0.03915465250611305, -0.010749222710728645, -0.131927952170372, -0.37434980273246765, 0.22473491728305817, -0.15887826681137085, -0.294522762298584, -0.4566193222999573, -0.1917540580034256, 0.38527029752731323, -0.402895450592041, 0.106584317982196...
In a Prism v2 application, I define two regions, each a tabitem in a tabcontrol: ``` <UniformGrid Margin="10"> <TabControl> <TabItem Header="First" Name="MainRegion" cal:RegionManager.RegionName="MainRegion"/> <TabItem Header="Second" Name="SecondRegion" cal:RegionManager.RegionName="SecondRegion"/...
[ -0.15179428458213806, -0.5095083117485046, 0.9715449213981628, -0.030988892540335655, -0.3411712646484375, -0.1212758719921112, 0.4280276894569397, -0.1750168651342392, -0.26401373744010925, -0.6430143117904663, -0.3650900721549988, 0.2705152630805969, -0.2664822041988373, -0.0059119844809...
and uncomment one of the modules and see its tab item not appear at all. Instead, on the contrary, there are still two TabItems and one is empty. This tells me that my application is still tightly coupling data and UI as in the bad old WinForm days. So what do I need to do here to make this dynamic, so that the UI cha...
[ -0.04780857637524605, -0.2829711139202118, 0.7050007581710815, 0.17931778728961945, 0.03832495957612991, 0.03304330259561539, 0.22574593126773834, -0.2009502649307251, -0.49890878796577454, -0.5130797624588013, 0.11347144097089767, 0.7795544266700745, -0.2671182453632355, 0.135414972901344...
TabControl: ``` <TabControl Name="MainRegion" cal:RegionManager.RegionName="MainRegion"/> ``` and then load both controls into the MainRegion: ``` public void Initialize() { regionManager.RegisterViewWithRegion("MainRegion", typeof(Views.SecondView)); } ... public void In...
[ -0.5631003379821777, -0.4754704535007477, 0.8074949979782104, -0.06140686571598053, 0.05558733269572258, 0.2027672529220581, 0.1168697252869606, -0.04484427347779274, -0.06037302315235138, -0.7741183638572693, -0.16955320537090302, 0.4790319800376892, -0.3687549829483032, 0.169776588678359...
it, which is what I want. But the TabItem headers are not defined. How do I dynamically define the header (e.g. not in the XAML but dynamically back in the View classes)? This works too: ``` public class View : UserControl { public string ViewName { get; set; } } ``` and then in the shell: ``` <Window.Resour...
[ 0.09384004771709442, -0.5580589771270752, 0.7361692786216736, -0.004889387171715498, 0.2911454439163208, -0.12791220843791962, -0.07065485417842865, -0.1418013870716095, -0.03649260476231575, -0.7102286219596863, -0.3333809971809387, 0.6777018308639526, -0.30242741107940674, 0.085152618587...
... <TabControl cal:RegionManager.RegionName="RightRegion" Width="Auto" Height="Auto" HorizontalAlignment="Stretch" Grid.Column="2" x:Name="RightRegion" ItemContainerStyle="{StaticResource TabItemRegionStyle}" /> ```
[ -0.23532162606716156, -0.5812998414039612, 0.8203015327453613, -0.08571340143680573, 0.19796960055828094, -0.209710493683815, -0.1375141441822052, 0.02146446704864502, -0.27958959341049194, -0.6845545768737793, -0.3851092457771301, 0.312507688999176, -0.10456453263759613, 0.057197265326976...
I tried compile apache 2.2, my Visual Studio 2008 returned error on RC. After some googling, I found this explanation: > What appears to have happened is that > you've opened it up unsuccessfully in > Visual Studio; before you convert to > an .sln file + .vcproj files, it's > important to invoke the perl script > ...
[ 0.3265615403652191, 0.39771124720573425, 0.34555429220199585, -0.150584876537323, -0.39431101083755493, -0.24323846399784088, 0.588737428188324, -0.4239305853843689, -0.04494674503803253, -0.4319474399089813, 0.17513738572597504, 0.6613500118255615, -0.4609908163547516, 0.26699212193489075...
it should > 'just work'. Can anyone explain to me how to invoke Perl script on Windows? Thank you The two distributions of Perl for Windows that you could get are * [Strawberry Perl](http://strawberryperl.com/) (A new distribution that integrates a C compiler to have the CPAN archive fully working on Windows) * [A...
[ 0.4504859447479248, -0.27106574177742004, 0.1429082155227661, 0.09114105999469757, -0.3655689060688019, 0.004702642094343901, 0.1815396398305893, 0.24420422315597534, -0.416615754365921, -0.28208860754966736, 0.15776985883712769, 0.3940166234970093, -0.25060710310935974, -0.024166433140635...
Is it possible to have variable-height rows within a WinForms ListView in Details mode? There is no RowHeight or Rows[i].Height property on the control as far as I know. Some blogs suggests implementing OwnerDraw, which I did, but I still can't find anything resembling height property from within the event handlers. ...
[ 0.23478205502033234, -0.2873743772506714, 0.5444762110710144, 0.06912213563919067, -0.09277008473873138, -0.028728898614645004, 0.06259004026651382, -0.3620981276035309, -0.20492061972618103, -0.6528615951538086, 0.09972703456878662, 0.7840295433998108, -0.10162876546382904, -0.00653725722...
use [ObjectListView](http://objectlistview.sourceforge.net/cs/features.html), you can change the item height of all rows pretty [easily](http://objectlistview.sourceforge.net/cs/features.html#row-height-can-be-changed). But still, there is no way to change the individual item height as long as you are using ListView.
[ 0.17382612824440002, -0.079254150390625, 0.6714226603507996, 0.03883463889360428, -0.18055273592472076, 0.021542012691497803, 0.1456776112318039, -0.12109606713056564, -0.7567145824432373, -0.8839125633239746, -0.12889815866947174, 0.49200546741485596, -0.22758272290229797, -0.254574954509...
With very simple caching semantics: if the parameters are the same (and the URL is the same, of course), then it's a hit. Is that possible? Recommended? The corresponding [RFC 2616](http://www.faqs.org/rfcs/rfc2616.html) in section 9.5 (POST) allows the caching of the **response** to a POST message, if you use the appr...
[ -0.010495592840015888, 0.020004864782094955, -0.020727183669805527, -0.02039278671145439, -0.3215632438659668, -0.06554212421178818, 0.43704962730407715, -0.3084738254547119, -0.015405391342937946, -0.42611655592918396, -0.3528611361980438, 0.27065175771713257, -0.46716055274009705, 0.1297...
cache must invalidate the corresponding entity after a POST **request**. > Some HTTP methods MUST cause a > cache to invalidate an entity. This is > either the entity referred to by the > Request-URI, or by the Location or > Content-Location headers (if present). > These methods are: > > > > ``` > - PUT > - DEL...
[ -0.24399958550930023, 0.5030322074890137, 0.049114953726530075, 0.07773883640766144, -0.2968694567680359, -0.0010376818245276809, 0.6698227524757385, -0.27846652269363403, -0.10084059089422226, -0.5651358962059021, -0.45109081268310547, -0.021005168557167053, -0.4040701389312744, 0.6340969...
explicit freshness information (see Section 4.2.1 of [RFC7234]). > > However, POST caching is not widely implemented. > For cases where an origin server wishes the client to be able to > cache the result of a POST in a way that can be reused by a later > GET, the origin server MAY send a 200 (OK) response containing...
[ 0.11185739189386368, -0.16362041234970093, 0.20650313794612885, 0.0031178148929029703, -0.16334077715873718, 0.16044354438781738, 0.2801218032836914, -0.1272442787885666, -0.06318949162960052, -0.6265004277229309, -0.6549193263053894, 0.2318592369556427, -0.053175196051597595, 0.3096134662...
the result of a GET request for the same URI.
[ -0.1185489222407341, -0.07414150983095169, 0.4531419277191162, 0.18515874445438385, -0.09922382980585098, -0.06030542775988579, -0.020129650831222534, 0.07672513276338577, -0.06577348709106445, -0.5112131237983704, -0.3718349039554596, 0.020651748403906822, -0.26157188415527344, 0.40781423...
One of my personal programming demons has always been complex logic that needs to be controlled by if statements (or similiar). Not always necessarily that complex either, sometimes just a few states that needs to be accounted for. Are there any tools or steps a developer can perform during design time to help see the...
[ 0.19742342829704285, 0.29701605439186096, -0.25495338439941406, 0.28350818157196045, -0.07869580388069153, 0.0320187509059906, 0.4705113470554352, 0.24858103692531586, 0.0924568697810173, -0.36255571246147156, -0.007251698989421129, 0.6596189737319946, -0.06710406392812729, 0.1080026105046...
to the math-averse, but it is really one of the most powerful (and oft-neglected) tools in your skillset, and rather simple, at the core. The [basic operators](http://en.wikipedia.org/wiki/Logical_operator), [de Morgan's](http://en.wikipedia.org/wiki/De_Morgan%27s_Laws) and [other basic laws](http://en.wikipedia.org/...
[ 0.07065339386463165, 0.15411728620529175, -0.11411989480257034, 0.16475756466388702, -0.5299893617630005, -0.045427002012729645, 0.6858933568000793, -0.4102306365966797, 0.27660903334617615, -0.3390142321586609, -0.18097367882728577, 0.7553784847259521, -0.04493166506290436, -0.32239255309...
Friends In our C++ , Iam current using realloc method to resize the memory allocated by malloc. realloc() usage is done as below ``` my_Struct *strPtr =(my_struct*)malloc(sizeof(my_Struct)); /* an later */ strPtr = (my_struct*)realloc(strPtr,sizeof(my_Struct)*NBR); ``` now wikipeadia (\_http://en.wikipedia.org/w...
[ -0.4184119999408722, 0.2785209119319916, 0.7305103540420532, -0.09187209606170654, 0.44459471106529236, 0.07902882993221283, 0.23999907076358795, 0.02991909347474575, -0.1887013465166092, -0.8289444446563721, 0.12060433626174927, 0.7073306441307068, -0.08404015004634857, -0.051065713167190...
*/ void *tmp = realloc(p, big_size); if (tmp != NULL) { p = tmp; /* OK, assign new, larger storage to p */ } else { /* handle the problem somehow */ } ``` --- Can you tell me which is the best way to use realloc() also once I have pointer to a structure and then while using realloc later can i use poin...
[ 0.10784436017274857, 0.015041202306747437, 0.1445596069097519, 0.07442872226238251, 0.1569567173719406, -0.10241449624300003, 0.07417098432779312, -0.07126476615667343, -0.37270480394363403, -0.6462482213973999, -0.13292187452316284, 0.7459887862205505, -0.21949505805969238, 0.114792793989...
calls, memory allocations can always fail. Directly overwriting the pointer with the return value is an error, as that drops the original pointer and makes the memory leak in case the reallocation failed.
[ -0.23987677693367004, 0.2504675090312958, 0.08282000571489334, 0.1415151208639145, 0.1738826334476471, 0.09749540686607361, 0.4994787871837616, -0.18151459097862244, -0.16282160580158234, -0.15154509246349335, -0.4608500599861145, 0.6387027502059937, -0.4319935739040375, 0.0709783211350441...
Need help with reading special characters within my VB code. ASCII code Char(34) = " works fine but Char(60) = < and Char(62) = > are not being read. My Code ``` node.FirstChild.InnerText = Chr(60) & "httpRuntime executionTimeout=" & Chr(34) & "999999" & Chr(34) & " maxRequestLength=" & Chr(34) & "2097151" & Chr(34)...
[ -0.12014665454626083, 0.14047245681285858, 0.41826745867729187, 0.03080853447318077, 0.13438944518566132, 0.2003791630268097, 0.35345885157585144, -0.2754862904548645, -0.14570945501327515, -0.6221194863319397, -0.19837713241577148, 0.45482224225997925, -0.02756635472178459, -0.02393480204...
I have to release my Adobe Air application but the build process was "setup" by a different developer. (He made a self signed cert and wrote a batch file to call adt for packaging the application). Adobe mentions that such self signed certificates are valid for 5 years. Now I have no idea when that certificate will ex...
[ 0.5469321012496948, 0.3628169000148773, 0.5972912311553955, -0.024062955752015114, -0.20208752155303955, -0.197063609957695, 0.4916767179965973, -0.3527489900588989, 0.0688503235578537, -0.25255221128463745, -0.2665652632713318, 0.41403838992118835, -0.26253560185432434, -0.022575737908482...
in order. If your application modified `sys.path` on load to put its own library paths at the front, this should do the trick. This section from the python docs has a good explanation of how python finds its dependencies: <https://docs.python.org/reference/simple_stmts.html#the-import-statement>.
[ 0.3542017936706543, -0.12470753490924835, 0.24022811651229858, -0.07653762400150299, 0.052604980766773224, -0.2567792534828186, 0.06114104017615318, -0.3213188052177429, -0.43888482451438904, -0.4128895401954651, -0.25070497393608093, 0.8277429938316345, -0.4589737355709076, -0.41329145431...
All of our production instances of reporting services are split into the web server components and the reports database components. I know that you can detect the instance of SQL Server on a database server by the following TSQL: ``` SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPRO...
[ 0.4954868257045746, 0.3831329941749573, 0.400014728307724, -0.04088889807462692, -0.16782638430595398, 0.009649334475398064, -0.111259825527668, -0.13048025965690613, -0.1953103393316269, -0.3778708279132843, -0.05719556286931038, 0.2964794635772705, -0.3320579528808594, 0.4119262993335724...
static void Main(string[] args) { // Create proxy object and set service // credentials to integrated ReportingService2006 rs = new ReportingService2006(); rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" + "ReportService2006.asmx"; rs.Credentials = ...
[ -0.04662167280912399, -0.14145798981189728, 0.4876532554626465, 0.009615912102162838, 0.0446602962911129, 0.11193349212408066, 0.5307421684265137, 0.0003114408755209297, -0.23142504692077637, -0.3870445191860199, -0.3767207860946655, 0.380232036113739, -0.48360881209373474, 0.4548868536949...
{ // Set the server info header rs.ServerInfoHeaderValue = new ServerInfoHeader(); // Make a call to the Web service CatalogItem[] items = rs.ListChildren("/"); // Output the server version and edition to the console
[ 0.03972208872437477, 0.04489577189087868, 0.8260108828544617, -0.08244830369949341, -0.04099731892347336, 0.022258326411247253, 0.13351847231388092, -0.16353464126586914, -0.2923043668270111, -0.4191432297229767, -0.31889310479164124, 0.19650553166866302, -0.21058964729309082, 0.4084527194...
Console.WriteLine("Server version: {0}", rs.ServerInfoHeaderValue.ReportServerVersionNumber); Console.WriteLine("Server edition: {0}", rs.ServerInfoHeaderValue.ReportServerEdition); } catch (Exception e) { Console.WriteLine(e.Message); ...
[ -0.24507001042366028, -0.11526857316493988, 0.578883945941925, -0.15582363307476044, 0.10494305938482285, -0.021501541137695312, 0.35365867614746094, 0.07515040785074234, -0.0500049814581871, -0.5627878308296204, -0.4155389964580536, 0.25712138414382935, -0.3281528055667877, 0.265194445848...
} } ```
[ 0.17493881285190582, 0.41805654764175415, 0.05209751054644585, -0.04864929988980293, 0.437467485666275, -0.15825650095939636, 0.13202530145645142, 0.5446501970291138, 0.35430577397346497, -0.4846813380718231, -0.2295716553926468, 0.546978771686554, -0.3188462555408478, 0.2798506021499634, ...
I'm having a problem with applicationShouldTerminate. What ever I do it seams that has no effect. Any help would be appreciated. I'm well versed in programing but this just gives me headache. Im going over some basic tutorials for xcode , as I'm new to mac in general, and am currently looking at a simple flashlight a...
[ 0.2058265209197998, 0.2763387858867645, 0.7284377813339233, -0.2524888813495636, -0.0644378662109375, -0.30096757411956787, 0.6987230777740479, -0.1859939992427826, -0.12521745264530182, -0.8013841509819031, -0.33660101890563965, 0.9739199280738831, -0.49356186389923096, -0.050087951123714...
initWithTitle:@"This is a Test" message:@"This is the message contained with a UIAlertView"
[ 0.5079358816146851, -0.056184012442827225, 0.009577286429703236, 0.2105918824672699, -0.1952170878648758, -0.402894526720047, 0.49334853887557983, 0.025368167087435722, 0.43279775977134705, -0.6422251462936401, 0.11156408488750458, -0.08801504224538803, -0.007870390079915524, -0.1043445467...
delegate:self cancelButtonTitle:@"Button #1" otherButtonTitles:nil]; [alertTest addButtonWithTitle:@"Button #2"]; [alertTest show]; [alertTest autorelease]; NSLog(@"Termination"); } ``` I did some reading online and found that it should be possible...
[ 0.18357062339782715, -0.09753234684467316, 0.21815505623817444, 0.1868549883365631, -0.060020264238119125, -0.14624159038066864, 0.5291544795036316, -0.5050137042999268, -0.1528094857931137, -0.594388484954834, -0.3541572093963623, 0.8318646550178528, -0.137295201420784, 0.2582693099975586...
where I put that declaration I get error: syntax error before NSApplicationTerminateReply. There is no syntax error except that xcode seems not to recognize NSApplicationTerminateReply as valid input. Any sample code would be greatly appreciated. 1. applicationShouldTerminate and NSApplication do not exist on the iP...
[ 0.17120195925235748, 0.08627528697252274, 0.5523357391357422, -0.21524378657341003, 0.044879715889692307, -0.4650469124317169, 0.5868602991104126, -0.13500884175300598, 0.07491203397512436, -0.5982597470283508, -0.3263661563396454, 0.6333807706832886, -0.5171642303466797, -0.16101127862930...
I was testing PowerShell remoting: 1. I installed [PowerShell V2 CTP3](http://go.microsoft.com/fwlink/?LinkID=131969) on my Windows XP desktop 2. I installed [WS-Management v1.1](http://www.microsoft.com/downloads/details.aspx?FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33&DisplayLang=en) on my Windows 2003 R2 server, ...
[ 0.0631600022315979, 0.3395877182483673, 0.40478745102882385, 0.017973531037569046, 0.1258307844400406, -0.34528684616088867, 0.6513136625289917, -0.21522633731365204, -0.14070096611976624, -0.4510541558265686, -0.29988083243370056, 0.8872344493865967, -0.25593000650405884, 0.09203710407018...
you have admin priviligies on the remote box? If not, try with the credential parameter: Get-WmiObject -ComputerName computerNameHere Win32\_Service -Credential $cred
[ 0.22021633386611938, 0.23680345714092255, 0.3354279398918152, 0.11956437677145004, 0.42642447352409363, -0.10188520699739456, 0.38305315375328064, 0.2469884604215622, 0.02742602676153183, -0.6312751173973083, 0.009129329584538937, 0.9715821146965027, 0.026085693389177322, 0.237723499536514...
I'm trying to setup [ViewSVN](http://viewsvn.berlios.de/) for viewing our subversion repository. My SVN repository uses https for access. However, irrespective of supplying svn://, svn+ssh:// or https:// in the viewsvn configuration for my svn repository, I always get this in my apache log: ``` svn: URL protocol is no...
[ 0.32544130086898804, 0.062458693981170654, 0.31841960549354553, -0.1618761122226715, -0.23198530077934265, -0.22654587030410767, 0.4268176257610321, 0.15618813037872314, -0.25743037462234497, -0.7281204462051392, -0.08268781006336212, 0.4629991054534912, -0.24523408710956573, 0.26123329997...
starting") ``` As a general aside, I would shy away from referencing objects like a logger (which you normally unconditionally expect to be present) via a pointer due to the uncertainty you get with a pointer, AKA is there an object or not?
[ 0.10617215931415558, 0.08503871411085129, 0.0777050256729126, 0.11840611696243286, 0.13732700049877167, -0.3943195044994354, 0.10159117728471756, 0.10985420644283295, -0.2973172962665558, -0.33291417360305786, -0.16572698950767517, 0.1654265820980072, -0.10273229330778122, 0.02061130851507...