text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
is and pv\_ops is in mainline (soon also xen-0 ops) :) Good question, btw :) **Edit:** When I said 'careful but prudent' , I meant one step above conservative. If your program allocates some job structure that most functions need, lock it. If your allocating buffers to read huge files, don't lock them .. and be sure...
[ 0.3814510107040405, -0.38010382652282715, 0.337488055229187, -0.1752104014158249, 0.30252766609191895, -0.3328621983528137, 0.0006789321778342128, -0.3075101971626282, -0.3849778175354004, -0.7570793032646179, -0.3458651006221771, 0.7548261880874634, -0.3087102770805359, -0.359901458024978...
memory, don't let critical allocated blocks get thrown into dirty paging, don't assume your program is more important than anything else by locking everything it allocates :) Sorry for the ambiguity. The best phrase I could come up with was 'careful, but prudent'.
[ 0.2595803737640381, -0.1361445188522339, -0.01754588820040226, 0.31163254380226135, 0.0923716202378273, 0.08979582786560059, 0.2985060214996338, -0.09869943559169769, 0.14164169132709503, -0.10059364140033722, 0.18457061052322388, 0.5452293157577515, -0.1254550963640213, -0.234196737408638...
I'm trying to write a nice GUI in Swing that uses the proper Model-Delegate pattern as much as possible. I have a JComboBox that when changed, needs to update the model with the new data. To get the currently selected item, I am using: ``` fooCombo.addItemListener(new ItemListener() { public void itemStateChanged(...
[ -0.02014356479048729, -0.1371678113937378, 0.548746645450592, 0.018256599083542824, 0.0029184326995164156, 0.2270500361919403, 0.15349645912647247, -0.3294031023979187, -0.3956088721752167, -0.6980135440826416, 0.04075063019990921, 0.5233539938926697, -0.38642293214797974, 0.25437888503074...
changed. Any ideas here? ended up not going to the model at all but getting my object from the getItem method like so: ```` public void itemStateChanged(final ItemEvent event) { if (event.getStateChange() == event.DESELECTED) { deselectedFoo = (Foo) event.getItem(); } else if (event.getStateChange(...
[ 0.01332028303295374, -0.35757526755332947, 0.4599262475967407, 0.08569825440645218, 0.06037632003426552, 0.3749270439147949, 0.3166283965110779, -0.2560303807258606, -0.4682650566101074, -0.6108251214027405, 0.06980455666780472, 0.4658127427101135, -0.3844694495201111, 0.4770764410495758, ...
One thing I love about ruby is that mostly it is a very readable language (which is great for self-documenting code) However, inspired by this question: [Ruby Code explained](https://stackoverflow.com/questions/609612/ruby-code-explained) and the description of how `||=` works in ruby, I was thinking about the ruby id...
[ 0.45486897230148315, 0.4678143560886383, -0.30321502685546875, -0.07659643143415451, -0.5068447589874268, -0.4219614565372467, 0.7509204745292664, 0.31166669726371765, -0.2175856977701187, -0.45175790786743164, -0.0545605793595314, 0.5529507994651794, -0.14297722280025482, -0.0404682718217...
a == false a = b end ``` (Thanks to Ian Terrell for the correction) **Edit:** It turns out this point is not totally uncontroversial. The correct expansion is in fact ``` (a || (a = (b))) ``` See these links for why: * <http://DABlog.RubyPAL.Com/2008/3/25/a-short-circuit-edge-case/> * <http://DABlog.RubyPAL.C...
[ -0.008969441056251526, 0.11796897649765015, 0.2587938606739044, -0.13879351317882538, -0.18364782631397247, 0.07195328921079636, 0.6805506944656372, -0.4101411998271942, -0.24454930424690247, -0.37192243337631226, -0.19972434639930725, 0.3439123332500458, -0.4712318480014801, 0.06207054480...
but then he decided to chase bob} # this holds for method definitions to def catall(first, *rest) rest.map { |word| first + word } end catall( 'franken', 'stein', 'berry', 'sense' ) #=> [ 'frankenstein', 'frankenberry', 'frankensense' ] ``` The syntatical sugar for hashes as method arguments ``` this(:is => :the, ...
[ -0.2207457274198532, 0.16546526551246643, 0.2545377314090729, 0.22186775505542755, -0.011003652587532997, 0.09769753366708755, 0.4359098970890045, -0.19886909425258636, -0.37778109312057495, 0.003982309717684984, -0.022876905277371407, 0.29354143142700195, -0.6268610954284668, 0.1295746415...
:DynoMutt]} ``` metaclass syntax ``` x = Array.new y = Array.new class << x # this acts like a class definition, but only applies to x def custom_method :pow end end x.custom_method #=> :pow y.custom_method # raises NoMethodError ``` class instance variables ``` class Ticket @remaining = 3 def self...
[ -0.0015129722887650132, -0.31419700384140015, 0.47012653946876526, 0.30206701159477234, 0.08299518376588821, 0.09401336312294006, -0.11070118844509125, -0.3366859257221222, -0.1437368392944336, -0.8018909692764282, -0.18665485084056854, 0.5162705183029175, -0.2929195165634155, 0.1799262911...
know how to pack them into an object block = lambda { |e| puts e } # unpack them for a method %w{ and then what? }.each(&block) # create them as needed %w{ I saw a ghost! }.each { |w| puts w.upcase } # and from the method side, how to call them def ok yield :ok end # or pack them into a block to give to som...
[ 0.3128296434879303, -0.02044621668756008, 0.38573476672172546, -0.060610223561525345, 0.4218008816242218, -0.017552729696035385, 0.4051504135131836, -0.7138429284095764, -0.06418688595294952, -0.45118921995162964, -0.0180521197617054, 0.5818498730659485, -0.29721805453300476, -0.1098653227...
takes arguments and a block. %w{ a bunch of words }.inject(0) { |size,w| size + 1 } #=> 4 pusher = lambda { |array, word| array.unshift(word) } %w{ eat more fish }.inject([], &pusher) #=> ['fish', 'more', 'eat' ] ```
[ 0.026933880522847176, -0.12799273431301117, -0.04679245129227638, -0.3570050299167633, -0.13258805871009827, 0.6020547151565552, 0.206879124045372, -0.46585941314697266, 0.022958138957619667, -0.5609180331230164, -0.1677868813276291, 0.40715548396110535, -0.511200487613678, -0.048190794885...
I want to display a menu on every page that is run from a database. Using just down and dirty php thats easy but I want to integrate it with cakephp using their MVC system. Now my question is how is the best way to go about this? My thoughts are to make an element with the layout and then a component or controller fo...
[ 0.12791231274604797, -0.016737578436732292, 0.2489638328552246, 0.17564930021762848, -0.06629868596792221, 0.11254526674747467, -0.019140202552080154, 0.16947127878665924, -0.24986210465431213, -0.746792733669281, 0.19748371839523315, 0.562310516834259, -0.06781260669231415, -0.02268511615...
data collecting logic through one model? Or do most of it in the menu controller (or component) and use the models for each table? Thank you, Walter Models should fetch and process data from the table that they are modelising, so fetch menu data for each model in that model. Components are intended to house logic sh...
[ 0.12606272101402283, -0.3141148090362549, 0.10090433806180954, 0.5612314939498901, -0.0023137421812862158, 0.029582276940345764, -0.17275077104568481, -0.49210676550865173, -0.2709585130214691, -0.35392284393310547, -0.04866080358624458, 0.5737910866737366, -0.21779704093933105, -0.0376453...
your menu too, the easiest way to output the markup for this is a recursive function (a function that calls itself) which outputs one level at a time, so rather than an element, I'd just create a helper with a menu() method in there, and call that directly from the layout.
[ 0.11493075639009476, -0.18214178085327148, 0.16955210268497467, 0.05498436838388443, -0.07727891951799393, 0.2704189121723175, -0.07291007041931152, 0.34651806950569153, -0.19441397488117218, -0.6735514402389526, -0.029272286221385002, 0.6792066097259521, -0.29212310910224915, 0.0706358551...
I am working on a project ( Slots Game ) using cocos2d. I need to add picker view to rotate the reel ( image chain ). But I can not doing this rotation.If you have a solution for this please give me the instruction that how can I do this using picker view or without picker view. Please ans me with help instruction. Its...
[ 0.4327007532119751, -0.2863980531692505, 0.7590181231498718, 0.08953053504228592, 0.10591423511505127, -0.1718033254146576, -0.3837068974971771, -0.28905993700027466, -0.2577002942562103, -0.6804806590080261, 0.39133700728416443, 0.6593698263168335, 0.02113226428627968, 0.4274211525917053,...
//start ur logical code } ```
[ -0.09843482822179794, 0.5719849467277527, 0.10284684598445892, -0.10798940807580948, -0.012160366401076317, -0.18594789505004883, -0.04040812700986862, 0.21261648833751678, 0.29380086064338684, -0.7422685623168945, -0.5422178506851196, 0.4553193151950836, -0.21608524024486542, 0.2861593067...
I need to generate HTML forms in Java. I don't know in advance what fields are needed, those will probably be delivered in XML (i have some say over this). I could use the same input file to handle the form submission. Are there libs, techniques that deal with this problem? I can't imagine that there aren't, but i can...
[ 0.4581855237483978, 0.09927528351545334, 0.44521865248680115, -0.04370333254337311, -0.14713868498802185, -0.08884473145008087, 0.2240016758441925, -0.2559542655944824, -0.04002140089869499, -0.9658251404762268, -0.017119409516453743, 0.5493935346603394, -0.34390488266944885, -0.0805345848...
this [site](http://www.xml.com/pub/a/2000/08/30/xsltandhtml/index.html) for an example for the XSLT part and [this](http://www.ling.helsinki.fi/kit/2004k/ctl257/JavaXSLT/Ch05.html) site for the JAVA-XSLT connection.
[ -0.10296384990215302, 0.20506182312965393, 0.35549330711364746, -0.17098645865917206, -0.2926703095436096, -0.4057464003562927, 0.1781463921070099, -0.25552472472190857, -0.23980669677257538, -0.17246149480342865, -0.45022767782211304, 0.3921605944633484, -0.3724481761455536, -0.0467020757...
I'm reading through the [Prism v2 guidelines](http://www.microsoft.com/downloads/details.aspx?FamilyID=fa07e1ce-ca3f-4b9b-a21b-e3fa10d013dd&DisplayLang=en) in which they state: > *During initialization, modules use the > RegionManager to locate regions in the > shell and **add one or more views** to > those regions...
[ 0.16754332184791565, -0.241183340549469, 0.6725327372550964, 0.056310947984457016, -0.045662056654691696, -0.29154080152511597, 0.050130002200603485, -0.27820876240730286, -0.46068158745765686, -0.6661441326141357, -0.34511294960975647, 0.3797910809516907, -0.013988059014081955, 0.19249212...
to "register a view type" with the shell if they are already "adding their views" as with the above code? In your code you are not adding Views to the bootstrapper but Modules to the ModuleCatalog. A Module in the CAB/Prism/Composite UI world can contain Views, but many times it provides some sort of add-on service tha...
[ 0.6169171929359436, -0.1301555037498474, 0.40302354097366333, 0.007386792916804552, -0.028195936232805252, -0.16956183314323425, 0.11650138348340988, -0.18526984751224518, -0.3841303288936615, -0.738220751285553, 0.27702465653419495, 0.7160690426826477, -0.29353949427604675, 0.001477660378...
create a Module that contains a service called DockingWindowService and implements IDockingWindowService. I register this Module with the ModuleCatalog. The composite framework workflow would create this service, registers it with the bootstrapper and any modules loaded after this fact would be able to use the IDocki...
[ 0.45291414856910706, -0.14745011925697327, 0.4613442122936249, -0.04424189403653145, -0.008761652745306492, -0.17660300433635712, 0.009108391590416431, -0.2824757695198059, -0.14463801681995392, -0.714862048625946, -0.021885273978114128, 0.6961930990219116, -0.3641136586666107, 0.160301849...
the documentation is saying is that if you use Regions to display your Views, you can register the View types with the Region. Whenever the Region is shown, it will automatically build the View using the Unity container.
[ -0.011149454861879349, -0.2546326220035553, 0.8306278586387634, 0.265395849943161, 0.07559841126203537, -0.2196962833404541, -0.1109226644039154, 0.04867159202694893, -0.28020769357681274, -0.7979046106338501, -0.004551044199615717, 0.2109507918357849, -0.023549562320113182, 0.480685561895...
Using cocos2d for iPhone game development, I am confused between Layer and Scene. For example, My simple game have several "UI Pages" like main menu, highscores, game board etc. So should I use Layer or Scene for every "UI page", and why? Reviewing SpritesDemo.m/.h, it would appear that they are using Layer, and then...
[ -0.09529000520706177, -0.19557249546051025, 0.6459342241287231, 0.2599482536315918, 0.324135422706604, -0.18167705833911896, -0.1884145736694336, -0.12254205346107483, -0.09761917591094971, -0.6791262626647949, -0.366303950548172, 0.47178414463996887, -0.13625866174697876, -0.0783210694789...
question would be "both", you use Layer to represent your actual "UI Page", but you attach the Layer to a new scene and replace the current scene in the director.
[ 0.21506884694099426, -0.5645238161087036, 0.4395751357078552, 0.5464200377464294, -0.08831141144037247, -0.10377655923366547, -0.41920289397239685, -0.2244693636894226, 0.0359407439827919, -0.4348237216472626, -0.15559852123260498, 0.1988539695739746, -0.008513078093528748, -0.333306252956...
You system allows new users to register and enter their wedding date. Being a purist, I wanted to store this as a date. After user interviews, it was clear that the reality differs from this approach. Users are often not sure of the day or the month, and wish to store partial dates, so "June 2009" or "sometime in 2012"...
[ 0.37320005893707275, -0.10243246704339981, 0.7477506995201111, 0.08304673433303833, 0.03330501541495323, 0.04643901064991951, 0.3154789209365845, 0.1286645233631134, -0.26840364933013916, -0.48163148760795593, 0.149626225233078, 0.2742234468460083, 0.2324221283197403, 0.13985124230384827, ...
could be stored as 15 June 2009, with a variance of +/- 15 days. "sometime in 2010" would be 01 July 2010 with a variance of 180 days. So store a date and a # days. If/how that would work in practice I don't know. Just an idea. A date range might be easier to implement.
[ 0.3101866543292999, -0.2279292345046997, 0.9042414426803589, -0.13919523358345032, 0.04413402080535889, 0.4017219841480255, 0.330135703086853, 0.16325002908706665, -0.19193148612976074, -0.17662788927555084, -0.22873331606388092, 0.01078984048217535, 0.3237585425376892, 0.23960894346237183...
I’ve got the following code: ``` #include <iostream> using namespace std; int main() { char* a = "foo"; char* b = "bar"; a = b; cout << a << ", " << b << endl; return 0; } ``` This compiles and works, ie. prints `bar,` `bar`. Now I would like to demonstrate that what goes on here is not copying a...
[ 0.35705849528312683, 0.4816230833530426, 0.38712891936302185, -0.7883594036102295, 0.18144765496253967, 0.2746390998363495, 0.3370503783226013, -0.27990207076072693, -0.3343240022659302, -0.5065556764602661, -0.0907619521021843, 0.5574869513511658, -0.7624057531356812, -0.00480886921286582...
char* b = "bar"; a = b; b[1] = 'u'; // ← just this line added cout << a << ", " << b << endl; return 0; } ``` …but it segfaults. Why? The interesting thing is that the following modification runs just fine: ``` #include <iostream> using namespace std; int main() { char* a = "foo"; char b[] = ...
[ 0.06915967911481857, 0.004463979043066502, 0.64509117603302, -0.6135822534561157, 0.18185478448867798, 0.35620811581611633, 0.4629242420196533, -0.07743315398693085, -0.28384000062942505, -0.43182873725891113, -0.17384958267211914, 0.6647841334342957, -0.6051609516143799, 0.001137044513598...
" << b << endl; return 0; } ``` Why doesn’t it segfault like the previous one? I guess I am missing some important difference between the pointer-style and the array-style string initialization. You cannot change string constants, which is what you get when you use the pointer-to-literal syntax as in the first co...
[ 0.14348353445529938, -0.05707896128296852, 0.22398264706134796, -0.13572657108306885, -0.05904832109808922, -0.3350497782230377, 0.03901181370019913, -0.07873719185590744, -0.4208603501319885, -0.1639138013124466, -0.2203642874956131, 0.6895814538002014, -0.4251753091812134, 0.073530569672...
I'm maintaining an old asp classic application. It uses Response.AppendToLog as its sole debug logging system. I only debug it on my localhost so the logging files are on my harddrive in the %SystemDrive%\inetpub\logs\LogFiles folder. I'm looking for a tail-like program that shows these debug messages live. Maybe wit...
[ 0.6321188807487488, 0.03315815329551697, 0.4076591432094574, -0.1913965493440628, -0.214369997382164, -0.1026410385966301, 0.6680904626846313, 0.11362110078334808, -0.401093453168869, -0.5932406783103943, 0.13346189260482788, 0.4726184904575348, -0.36889538168907166, 0.049883369356393814, ...
in the first code samples. See also this question: [Is a string literal in c++ created in static memory?](https://stackoverflow.com/questions/349025/is-a-string-literal-in-c-created-in-static-memory).
[ 0.03519964590668678, -0.11404013633728027, -0.09224658459424973, -0.044531308114528656, -0.14302808046340942, -0.16430653631687164, 0.0775529071688652, -0.004432586021721363, -0.31305021047592163, 0.1169821098446846, -0.15296223759651184, 0.45909586548805237, -0.45133379101753235, -0.15305...
I have a number of regex patterns. When a string is input I have to find all the patterns match this string. This is normally an **O(n)** operation: ``` SELECT regex FROM regexes WHERE 'string' RLIKE regex ``` What is the fastest way to do this? Are there database structures or storage systems that are optimized to ...
[ 0.2099485695362091, 0.10847153514623642, 0.13936090469360352, 0.10258699953556061, -0.11038264632225037, -0.008261186070740223, 0.045567769557237625, -0.2835039496421814, 0.22430849075317383, -0.6223427057266235, 0.05342934653162956, 0.41171127557754517, -0.5073801875114441, 0.279606670141...
a prefix for index matches. Many DBMS platforms will optimise this and use an index (if available) to resolve the prefix. However, this is not anything like as clever as a full regex, and the indexing can only be used if you have a constant prefix. The even longer answer is that there are algorithms such as [RETE](htt...
[ -0.004319373983889818, -0.11639661341905594, 0.21658815443515778, 0.23186944425106049, -0.2979692816734314, -0.047504253685474396, 0.20989906787872314, -0.39937135577201843, -0.13548927009105682, -0.5275545120239258, -0.26764601469039917, 0.3794279396533966, -0.4735569357872009, 0.12816993...
it is more efficient than O(n) (more like O(log n) but I'm not sure of the exact time complexity) for matching n rules against a fact.
[ -0.03223903104662895, 0.10408478230237961, 0.1558408886194229, 0.24961751699447632, -0.06586442142724991, -0.07768332213163376, 0.2071068435907364, -0.4689601957798004, 0.0149917583912611, -0.3500484228134155, 0.02917930670082569, 0.32392802834510803, -0.26826027035713196, 0.01359980367124...
How would you define "unwanted code"? --- ### Edit: IMHO, Any code member with 0 active calling members (checked recursively) is unwanted code. (functions, methods, properties, variables are members) 0 active calls and no possibility of use in near future. And I prefer to never comment out anything in case I need fo...
[ 0.14335811138153076, 0.24329505860805511, 0.19092430174350739, -0.15914367139339447, -0.07554435729980469, -0.31628790497779846, 0.4261840283870697, -0.06780453026294708, -0.1980348825454712, -0.26623421907424927, -0.09427278488874435, 0.3966105878353119, -0.4383045732975006, 0.29132330417...
We have 2 databases, say DB1 and DB2. DB1 contains all the stored procedures which access also data in DB2. DB1 uses synonyms to access the tables in DB2. (Using synonyms is a requirement in our situation) This works perfectly fine in all situations with SQL Server 2005 Developer Edition. However in the Expr...
[ -0.213018000125885, -0.020539622753858566, 0.35768207907676697, 0.025803793221712112, -0.2450609803199768, -0.44119006395339966, 0.24953532218933105, -0.35729506611824036, -0.1166151762008667, -0.3524254858493805, 0.007418598979711533, 0.2910342216491699, -0.40842264890670776, -0.061927739...
> set @sQuery = 'Select \* from synToSomeTableInDB2' > > exec (@sQuery) > > commit transaction This will result in the following error: > Snapshot isolation transaction failed in database '...' because the database was not recovered when the current transaction was started. Retry the transaction after the da...
[ -0.004118001088500023, -0.36059731245040894, 0.5716479420661926, 0.0007786297937855124, -0.09155932813882828, -0.3258606791496277, 0.46584734320640564, -0.5663798451423645, -0.2182130515575409, -0.7170916795730591, -0.3254108130931854, 0.6423890590667725, -0.473116397857666, -0.05293275043...
an idea what this is? We need to be able to use EXEC for some dynamic queries. We've already checked MSDN, searched Google, ... Any help is greatly appreciated. --- Edit: March 10 09 As discussed with Ed Harper below, I've filed a bug report for this. See <https://connect.microsoft.com/SQLServer/feedback/ViewFee...
[ -0.05411562696099281, 0.13617178797721863, 0.3771655261516571, 0.054155539721250534, 0.022965265437960625, -0.35250580310821533, 0.48083388805389404, 0.16917254030704498, -0.12266837805509567, -0.5226706862449646, -0.1437080204486847, 0.3382425010204315, -0.4509894549846649, 0.064005263149...
Some time ago, reading [this entry](https://stackoverflow.com/questions/563036/what-is-elegant-code/575983#575983) I found a nice image and a pointer to a better book entitled "Thinking Forth". To my surprise, the LaTeX sources of the book were ready to download, with pearls like: ``` %% There's no bold typewriter in ...
[ -0.38237881660461426, -0.178419828414917, 0.7329267263412476, -0.0680292546749115, -0.02580966427922249, 0.0676591768860817, 0.14639884233474731, -0.27704641222953796, 0.009482636116445065, -0.4084184169769287, 0.43763309717178345, 0.3656446635723114, -0.23799020051956177, -0.0159478150308...
that relatively advanced use of TeX/LaTeX in terms of useful recipes, and 2. Do you know any books that offer their TeX/LaTeX source to inspect and learn (and that are worth doing so.)? There are two comprehensive reference guides/recipe books for TeX: * [TeX by Topic](http://www.eijkhout.net/tbt/) by Victor Eijkhout ...
[ 0.20459520816802979, 0.0681476891040802, 0.15764935314655304, -0.24575653672218323, 0.11855645477771759, 0.5999893546104431, 0.07667991518974304, -0.20660702884197235, -0.12251515686511993, -0.32842782139778137, -0.07781889289617538, 0.8138327598571777, 0.031827159225940704, -0.22500079870...
Donald Knuth On the LaTeX side of things, resources a little more scarce from the programming point of view. The best free reference that I know of is * [Formatting Information](http://tug.ctan.org/tex-archive/info/beginlatex/) by Peter Flynn Of course there's also * [The Not So Short Guide to LaTeX](http://tug.cta...
[ 0.5372945070266724, 0.4264701008796692, 0.047907862812280655, -0.06196723133325577, -0.023342538625001907, -0.1919621080160141, -0.06233461946249008, 0.03767423704266548, 0.04831758141517639, -0.18323105573654175, 0.047984860837459564, 0.50774085521698, 0.15849290788173676, -0.064768150448...
class: * [The memoir class](http://www.ctan.org/tex-archive/macros/latex/contrib/memoir/) by Peter Wilson (`memman.tex` is the documentation) --- I'm sure there are many more books with their source available; these are just the first ones that come to mind that happen to also be able TeX and/or LaTeX.
[ -0.032654158771038055, 0.25248149037361145, -0.21444910764694214, 0.11333032697439194, 0.21253280341625214, 0.021997597068548203, 0.14635224640369415, 0.13246096670627594, -0.023265959694981575, -0.3946528434753418, -0.3799826204776764, 0.4594971835613251, 0.30535611510276794, -0.219316914...
I have two sub-directories each with a repo, thus : ``` PPP/ |--ABC/ | |--.git/ | |--AAA/ | | BBB/ | | CCC/ | |--DEF/ | |--.git/ | |--DDD/ | |--EEE/ ``` And would like to combine them into one repo, so, I would assume the directory structure would be like this: ``` PPP/ |--.git/ |-...
[ -0.015913154929876328, -0.01412374246865511, 0.4931112229824066, 0.08201994001865387, -0.10602598637342453, 0.14883992075920105, 0.05998479947447777, 0.015859806910157204, -0.38646194338798523, -0.2616845667362213, -0.518801212310791, 0.3573971390724182, -0.3485005497932434, 0.246239960193...
several people have the repos on their machines. How much more complicated does that make life? Ta. You can do what you are describing like this: 1. Move the content of `ABC` to an `ABC/` subdirectory, and fix the history so that it looks like it has always been there: ``` $ cd /path/to/ABC $ git filter-branch --ind...
[ 0.1898968517780304, -0.2376728355884552, 0.6856614947319031, -0.06441052258014679, 0.140481635928154, 0.14086773991584778, 0.20383772253990173, -0.37625646591186523, -0.5674721598625183, -0.6251013278961182, -0.25323614478111267, 0.8081340193748474, -0.4982459843158722, 0.04612695425748825...
--index-filter \ 'git ls-files -s | sed "s-\t-&DEF/-" | GIT_INDEX_FILE=$GIT_INDEX_FILE.new \ git update-index --index-info && mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD ``` Now your directory structure is `DEF/DEF/your_code` 3. Finally, create the `PPP` repository and pull both `ABC` and `DEF` in...
[ 0.1667596995830536, -0.13279035687446594, 0.8320656418800354, -0.000900931830983609, -0.0016776438569650054, -0.31626254320144653, -0.12403527647256851, -0.4790346920490265, -0.3705624043941498, -0.6661799550056458, -0.1733359694480896, 0.6473498940467834, -0.6356567740440369, -0.071080565...
from the man page](http://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html). :-)
[ -0.03596646338701248, -0.17649222910404205, -0.013387308456003666, -0.17730773985385895, 0.0032121511176228523, 0.14613622426986694, 0.30138006806373596, -0.22783112525939941, -0.5852213501930237, -0.5218619108200073, -0.5903816819190979, 0.4144504964351654, -0.5102273225784302, 0.11273226...
I need to write a templated function `replace_all` in C++ which will take a string, wstring, glibmm::ustring etc. and replace all occurrences of `search` in `subject` with `replace`. replace\_all.cc ``` template < class T > T replace_all( T const &search, T const &replace, T const &subject ) {...
[ 0.2721780836582184, -0.03918757289648056, 0.3175930380821228, -0.09289774298667908, 0.2930838167667389, -0.13830998539924622, 0.09509921818971634, -0.38822367787361145, 0.06433531641960144, -0.5808548331260681, -0.38723674416542053, 0.618334174156189, -0.6379499435424805, 0.060678314417600...
while ((pos = subject.find(search, done)) != T::npos) { result.append (subject, done, pos - done); result.append (replace); done = pos + search.size (); } result.append(subject, done, subject.max_size()); return result; } ``` test.cc ``` #includ...
[ 0.4004983603954315, -0.25385937094688416, 0.4789978861808777, -0.27693313360214233, 0.4639483392238617, 0.27663758397102356, 0.4239359498023987, -0.5587103962898254, -0.3368358910083771, -0.2859094440937042, -0.565214216709137, 0.4874380826950073, -0.48303666710853577, -0.15349093079566956...
> T replace_all( T const &search, T const &replace, T const &subject ); // #include "replace_all.cc" using namespace std; int main() { string const a = "foo bar fee boor foo barfoo b"; cout << replace_all<string>("foo", "damn", a) << endl; return 0; } ``` When I try ...
[ 0.5534404516220093, 0.23002468049526215, 0.3995803892612457, -0.27733558416366577, 0.36217978596687317, -0.17636916041374207, 0.1848416030406952, -0.2875567078590393, -0.10205527395009995, -0.23618753254413605, -0.5057494640350342, 0.7682181000709534, -0.7223936319351196, 0.005247539374977...
replace_all.o ``` I get: ``` test.o: In function `main': test.cc:(.text+0x13b): undefined reference to ` std::basic_string<char, std::char_traits<char>, std::allocator<char> > replace_all< std::basic_string<char, std::char_traits<char>, std::allocator<char> > >( std::basic_string<char, std::char_trait...
[ 0.1597827821969986, 0.13997460901737213, 0.5079230070114136, 0.05205554887652397, 0.37623679637908936, -0.07261744886636734, 0.273211807012558, -0.23324637115001678, 0.03355530649423599, -0.4208948016166687, -0.30060747265815735, 0.9870724081993103, -0.6432880759239197, -0.0511982254683971...
make it work? You can't link templates as compiler don't know which code to generate before someone tries to use ( instantiate ) templates. You can "ask" compiler to instantiate template if you knows which types are you going to use or if you know that they are limited. If you want - put this to your .cc file: ```...
[ 0.798863410949707, -0.19763557612895966, 0.2336440086364746, 0.1717851161956787, 0.26680827140808105, -0.053287528455257416, 0.28194406628608704, -0.3443948030471802, -0.12787795066833496, -0.43800851702690125, 0.0467570535838604, 0.5484228134155273, -0.709160566329956, 0.07370628416538239...
std::string const& subject ); template glibmm::ustring replace_all( glibmm::ustring const& search, glibmm::ustring const& replace,
[ -0.047805305570364, 0.02937754988670349, 0.6274117231369019, -0.0913333147764206, 0.10589474439620972, 0.06587427854537964, 0.24618035554885864, -0.39543768763542175, -0.03654970973730087, -0.5762655735015869, -0.785740852355957, 0.5907083749771118, -0.810766339302063, -0.20983606576919556...
glibmm::ustring const& subject ); ```
[ -0.2753145098686218, 0.3254108428955078, 0.6892102360725403, -0.05560877546668053, -0.25098657608032227, 0.20705941319465637, -0.018051613122224808, 0.04488557577133179, -0.08096475899219513, -0.31702473759651184, -0.759535014629364, 0.51872318983078, -0.4128707945346832, 0.292054563760757...
swfobject.getFlashPlayerVersion doesn't work in IE, any alternatives? If your flash version is 10.0.12 then the following code allows you to retrieve the version nr: ``` var playerVersion = swfobject.getFlashPlayerVersion(); // returns a JavaScript object var majorVersionNr = playerVersion.major; //returns the major n...
[ 0.014690365642309189, -0.03431002423167229, 0.9401807188987732, -0.383527010679245, -0.04430539533495903, -0.2417268604040146, 0.3879726231098175, -0.1579662263393402, -0.36310333013534546, -0.6525666117668152, -0.21388021111488342, 0.7678307294845581, -0.4549563527107239, -0.0467619821429...
I recently tried to use backgroundworker instead of "classic" threads and I'm realizing that it's causing, at least for me, more problems than solutions. I have a backgroundworker running a synchronous read (in this case from serialPort) and getting blocked around 30 seconds in 1 code line, then cancellationpending isn...
[ 0.36268794536590576, -0.03947887569665909, 0.3839187026023865, -0.00650874013081193, 0.24879848957061768, -0.12458713352680206, 0.5137242674827576, 0.3682112991809845, -0.5482146143913269, -0.705779492855072, -0.10617920011281967, 0.3019781708717346, -0.5468481183052063, 0.4688997268676758...
event is a better solution? If you're already proficient with the usage of threads, I don't see the point in using BackgroundWorker. It's designed for people who don't understand threads in the first place. Besides, I don't like the idea of aborting a thread. It feels dangerous, and multithreaded applications don't n...
[ 0.2883104085922241, -0.5026572942733765, -0.047580279409885406, 0.23770639300346375, 0.013473465107381344, -0.09710375219583511, 0.14531342685222626, 0.06683863699436188, -0.3143489956855774, -0.6666967868804932, 0.15020017325878143, 0.5717835426330566, -0.09374967217445374, -0.06103238835...
My program has a component - dubbed the Scheduler - that lets other components register points in time at which they want to be called back. This should work much like the Unix cron service, i. e. you tell the Scheduler "notify me at ten minutes past every full hour". I realize there are no real callbacks in Java. He...
[ 0.28059616684913635, -0.09111413359642029, 0.3246143162250519, 0.06320478767156601, 0.2621532380580902, 0.10026533156633377, 0.03190149366855621, -0.11100827902555466, -0.17434705793857574, -0.47738879919052124, -0.025311602279543877, 0.43968746066093445, 0.13423167169094086, 0.05550791323...
hour / minute etc." (just like crontabs) * an object containing data that will tell the calling object what to do when it is notified by the Scheduler. The Scheduler does not process this data, just stores it and passes it back upon notification. * a reference to the calling object Upon startup, or after a new registr...
[ 0.5655511617660522, -0.12437695264816284, 0.600549578666687, 0.09390834718942642, 0.2622171640396118, 0.13038410246372223, -0.05658331513404846, 0.07523710280656815, -0.22313742339611053, -0.5854740142822266, -0.16704507172107697, 0.29659032821655273, -0.07611371576786041, 0.34441894292831...
in the Calendar object is incremented by one second and the entreis are rechecked. This repeats until there is one entry or more that match(es). (Discrete Event Simulation) The Scheduler will then remember that timestamp, sleep and wake every second to check if it is already there. If it happens to wake up and the tim...
[ 0.4322253465652466, -0.09602119773626328, 0.2213311344385147, 0.04312558099627495, 0.13632506132125854, 0.009614496491849422, 0.052819591015577316, -0.10643699765205383, -0.28734782338142395, -0.8573718667030334, 0.0680822879076004, 0.7247835397720337, -0.05984032526612282, -0.271655082702...
main(String[] args) { // non-daemon threads prevent termination of VM final boolean isDaemon = false; Timer timer = new Timer(isDaemon); final long threeSeconds = 3 * 1000; final long delay = 0; timer.schedule(new HelloTask(), delay, threeSeconds); Calendar calendar = Calendar.getInstance(...
[ 0.19255179166793823, -0.37263724207878113, 0.6390807032585144, -0.2850496768951416, 0.1568351686000824, 0.09375252574682236, 0.5804200768470764, -0.2586737871170044, -0.26580873131752014, -0.44355136156082153, -0.17254944145679474, 0.3879944980144501, -0.340671181678772, 0.5922471880912781...
System.out.println("Hello"); } } static class KillTask extends TimerTask { private final Timer timer; public KillTask(Timer timer) { this.timer = timer; } @Override public void run() { System.out.println("Cancelling timer"); timer.cancel(); } } } ``` As has bee...
[ 0.29773280024528503, -0.26623281836509705, 0.37530264258384705, -0.09677813947200775, 0.04517541453242302, 0.044194091111421585, 0.08705274015665054, -0.40146687626838684, -0.2946016192436218, -0.42396843433380127, -0.20938056707382202, 0.5634493231773376, -0.4143882393836975, 0.1911230385...
I'm embedding IronPython 2.0 in C#. In IronPython, I defined my own exception with: ```py def foobarException(Exception): pass ``` and raise it somewhere with: ```py raise foobarException( "This is the Exception Message" ) ``` Now in C#, I have: ```cs try { callIronPython(); } catch (Exception e) { //...
[ -0.031076528131961823, 0.4109549820423126, 0.47032180428504944, -0.4108670949935913, -0.11145658791065216, -0.025725116953253746, 0.16676968336105347, -0.30092689394950867, -0.06767352670431137, -0.4335539937019348, -0.16464799642562866, 0.4538555145263672, -0.5138626098632812, -0.02334962...
all my computed values. To this class I just added a member variable IronPythonExceptionName. Now I just have a simple try in IronPython: ``` try: complicatedIronPythonFunction() except Exception, inst: result.IronPythonExceptionName = inst.__class__.__name__ raise inst ```
[ -0.15056616067886353, 0.37429776787757874, 0.293692022562027, -0.1759248822927475, 0.15313400328159332, 0.1516426056623459, 0.24344328045845032, -0.3164045512676239, -0.04255817458033562, -0.5781869292259216, 0.22862766683101654, 0.5094603300094604, -0.26000335812568665, 0.0422338917851448...
I'm implementing drag and drop functionality between two datagridviews. This works as intended with one exception: it is possible to drag and drop within the same datagridview. This results in duplicated rows. I want to limit the functionality so that I can only drag from one datagridview to another. Does anyone know h...
[ 0.13828368484973907, 0.24298661947250366, 0.6626445055007935, -0.29316776990890503, 0.06687144935131073, 0.04954245686531067, 0.2332667112350464, -0.1911567598581314, -0.11787661910057068, -0.7520368695259094, -0.016684353351593018, 0.6150413155555725, -0.36583128571510315, 0.3078866899013...
Me.dgvFMAvailable.DoDragDrop(Me.dgvFMAvailable.SelectedRows, DragDropEffects.Move) End If End Sub ``` and ``` Private Sub dgvFMSelected_DragDrop(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles dgvFMSelected.DragDrop Try Me.SelectFM(CType(e.Data.GetData(GetType...
[ 0.20344004034996033, -0.13481242954730988, 0.7306733131408691, -0.010689057409763336, -0.03236253187060356, 0.06054825708270073, 0.08451040834188461, -0.47581449151039124, -0.19203495979309082, -0.7257249355316162, -0.27446305751800537, 0.5146690607070923, -0.4125610291957855, 0.3238206505...
Based on this article <http://www.codeproject.com/KB/linq/bindinglist_sortable.aspx> I implemented my bussines object with sortable feature. When I send the object to the client app (winfoms), the objects is not sortable. Does anyone have a solution for this? Thanks for the answer, Jani REPLACE(column, 'KB', ''). No n...
[ 0.06517169624567032, 0.046180360019207, 0.36323457956314087, -0.027842264622449875, -0.2310233861207962, 0.010471781715750694, 0.22201672196388245, -0.1850091964006424, -0.41618040204048157, -0.5103898644447327, 0.0036994367837905884, 0.609254777431488, -0.258974552154541, 0.25860056281089...
I have to read business rules stored in XML file (I am using VC++/MFC/MSXML). XML consists of rules. Each rule has a set of conditions and actions. What would be an elegant OOP design for such system? What design patterns would you use if you where a designer of such system? update: Rules are put in sequence and ex...
[ 0.47351789474487305, 0.19755536317825317, 0.3173717260360718, 0.039233118295669556, 0.23444390296936035, -0.2178013026714325, 0.06357156485319138, -0.4382646679878235, -0.007232251577079296, -0.5805771350860596, -0.2289697527885437, 0.43683120608329773, -0.22808724641799927, 0.064938150346...
<conditions> <condition name="condition no. 1" type="ATTR_EMPTY"> <parameters> <parameter name="attribute_name">ttt</parameter> <parameter name="workflow_id">3</parameter> <parameter name="workflow_state_id">5</parameter>
[ -0.03993812948465347, 0.015958212316036224, 0.2641226351261139, -0.22222748398780823, -0.13317757844924927, 0.20799453556537628, 0.012953204102814198, -0.6959947943687439, -0.13520200550556183, -0.7308487296104431, 0.0759437084197998, 0.665673017501831, -0.141798198223114, 0.17357118427753...
</parameters> </condition> <condition name="condition no. 2" type="ATTR_EMPTY"> <parameters> <parameter name="attribute_name">ttt</parameter> <parameter name="enviroment_id">3</parameter>
[ -0.11893033981323242, -0.24107377231121063, 0.2425260841846466, -0.1058581992983818, -0.20667622983455658, -0.149831622838974, -0.037558719515800476, -0.5742557644844055, -0.24711550772190094, -0.8853400349617004, 0.18558283150196075, 0.7334793210029602, -0.28345322608947754, -0.0079738674...
</parameters> </condition> </conditions> <actions> <action name="action no. 1" type="ATTR_CLEAR"> <parameters> <parameter name="attribute_name">ttt</parameter> </parameters>
[ -0.0477898046374321, -0.46081870794296265, 0.03404124826192856, -0.013044280931353569, -0.17758360505104065, 0.3174903690814972, 0.16002491116523743, -0.5203038454055786, -0.5635018944740295, -0.22975946962833405, -0.0963679775595665, 0.6976607441902161, -0.34771278500556946, -0.2977303862...
</action> </actions> </rule> </rules> ``` Difficult to tell from such a brief description, but I would make each rule an object which manages its own conditions and actions. The rules would be created by a factory from the XML and stored in some sort of dictionary.
[ 0.5755693912506104, 0.09797085076570511, 0.1260896623134613, 0.11010190844535828, -0.0978885218501091, 0.16052326560020447, 0.032725341618061066, -0.5038162469863892, -0.07813967764377594, -0.5137441754341125, -0.08718035370111465, 0.21572789549827576, -0.40308186411857605, 0.0617279596626...
I have a simple question which occured when I wanted to store the result of a SHA1 hash in a MySQL database: How long should the *VARCHAR* field be in which I store the hash's result? I would use `VARCHAR` for variable length data, but not with fixed length data. Because a SHA-1 value is *always* 160 bit long, the `VA...
[ -0.09152619540691376, 0.19297082722187042, 0.32882601022720337, -0.2539408802986145, -0.22199755907058716, 0.19982318580150604, 0.20280355215072632, -0.41620132327079773, -0.28987160325050354, -0.24151019752025604, -0.04240074008703232, 0.24628029763698578, -0.05049828439950943, 0.20074820...
you use 8 bit per character, you would only need a 160/8 = 20 character long field. So I recommend you to use [`BINARY(20)`](http://dev.mysql.com/doc/refman/5.0/en/binary-varbinary.html) and the [`UNHEX` function](http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_unhex) to convert the `SHA1` value ...
[ -0.17508067190647125, 0.0016933453734964132, 0.323398619890213, -0.3176591992378235, -0.19908621907234192, 0.43368396162986755, 0.14479967951774597, -0.5319986343383789, -0.33634254336357117, -0.5012745261192322, -0.09423519670963287, 0.4956386089324951, 0.013147998601198196, 0.14787392318...
I am not to add method to a remote shared object in AS3. In AS2 this code used to work ``` SharedObjectName.MethodName = function(){} ``` But this code is not working for AS3. I searched in Google and other AS3 forums but didn't get any help. can anyone provide a pointer to me please. Thanks, Sumit Ok I finally s...
[ 0.04857068881392479, 0.04369751736521721, 0.19592531025409698, -0.16294525563716888, -0.25635144114494324, -0.047198932617902756, 0.5829394459724426, -0.2591263949871063, -0.2144140601158142, -0.7220186591148376, 0.014469402842223644, 0.3896465301513672, -0.6956800222396851, 0.363148570060...
I've been having some problems with `ActionMessages` created during execution of an action which didn't display, and I found out that my problems were due to my forwards having `redirect=true` in struts-config.xml. Since the default behavior is `redirect=false`, I've been thinking about which benefits can one have usi...
[ -0.14382965862751007, -0.15184520184993744, 0.6048128604888916, 0.03960389271378517, -0.5000481009483337, 0.2424585372209549, 0.7558720111846924, -0.5605434775352478, -0.49014756083488464, -0.4771846532821655, -0.11447937786579132, 0.6405203342437744, -0.3216143548488617, 0.008314047940075...
In a C# winforms app what is the normal way to persist the data on form that is opened by another form? I'd planned on just keeping it all on the form object but when the form is closed it seems the that form object is disposed. meaning I loose all the data. I could wrap the form up in another object which takes all t...
[ 0.48950904607772827, -0.029805462807416916, 0.36189132928848267, 0.1690625697374344, -0.07999828457832336, -0.3317708373069763, 0.21137180924415588, 0.08511411398649216, -0.41260233521461487, -0.3444995880126953, 0.0174562931060791, 0.6181129813194275, -0.2893763780593872, 0.05642303451895...
is how the data is managed. ``` Result res; using (MyForm form = new MyForm()) { if(form.ShowDialog()== DialogResult.OK) { // In Myform, after the data collection is done, you can set DialogResult=DialogResult.Ok and close form using form.Close(); res = form.Result; // expose for...
[ 0.21250563859939575, 0.047220028936862946, 1.0399329662322998, -0.14861275255680084, 0.2283359169960022, -0.0771225243806839, 0.144650399684906, -0.49739202857017517, -0.06400002539157867, -0.6804489493370056, -0.5012853145599365, 0.3809208571910858, -0.15435157716274261, 0.170347094535827...
} } UserResult(res); ```
[ -0.18917663395404816, -0.04102155938744545, 0.21112920343875885, -0.27338162064552307, 0.45893535017967224, -0.1627276986837387, 0.4385938048362732, 0.11072289198637009, 0.07177318632602692, -0.5458687543869019, -0.40563368797302246, 0.953167736530304, -0.199330672621727, 0.339463472366333...
Is it possible to use records as a method parameter, and call it without implicitly declaring an instance of said record? I would like to be able to write code like this. ``` type TRRec = record ident : string; classtype : TClass; end; procedure Foo(AClasses : array of TRRec); ``` then calling the meth...
[ -0.031384874135255814, 0.07884219288825989, 0.2654399871826172, -0.04352127015590668, 0.17630299925804138, 0.06669121980667114, 0.21735185384750366, -0.273401141166687, -0.28534719347953796, -0.24493008852005005, -0.05051647871732712, 0.6978294849395752, -0.4168034791946411, 0.007463179994...
:= i; result.classtype := c; end; procedure Foo(AClasses : array of TRRec); begin ; end; // ... Foo([r('Button1', TButton), r('Lable1', TLabel)]); ```
[ -0.10335607826709747, 0.04760626703500748, 0.3808440864086151, -0.37867340445518494, 0.4988464117050171, 0.4814492166042328, 0.2752429246902466, -0.379686176776886, -0.10282258689403534, -0.14544405043125153, -0.6020520329475403, 0.7165625095367432, -0.4816533923149109, 0.2348870038986206,...
I'm trying to make a distribution directory with my application. I've copied several Qt DLLs to that directory, and the program seems to be working, with one exception: it doesn't seem to find SQL plugin for SQLite. Copying qtsqlite.dll to the directory, doesn't allow my application to open or create SQLite files. What...
[ 0.8223472833633423, -0.04627089574933052, 0.2442852407693863, -0.17052556574344635, 0.14988066256046295, -0.011578493751585484, 0.25096797943115234, 0.05930809676647186, 0.07806854695081711, -0.6491305828094482, 0.3710506856441498, 0.789438784122467, -0.34200796484947205, 0.183020874857902...
are supposed to be in a specific directory called "plugins" and not in the main directory with all the other dlls.
[ 0.30547142028808594, -0.2367967963218689, 0.2276003658771515, 0.2261543869972229, 0.3008142113685608, -0.15517300367355347, -0.0924096331000328, 0.26507043838500977, 0.017385704442858696, -0.6382176876068115, -0.6940247416496277, 0.37415021657943726, -0.28015729784965515, 0.080144248902797...
I'm trying to calculate the size of a few tables as stated [here](https://stackoverflow.com/questions/497214/), but I can't find the block header size variable How do I get it? Is it some kind of formula? I'm using Oracle 10g This site has a good discussion on the format of the block header: <http://www.adp-gmbh.ch/o...
[ 0.21356600522994995, 0.3371512293815613, 0.21450451016426086, 0.07451535016298294, -0.24355193972587585, 0.0502760224044323, 0.1585378646850586, -0.4890790283679962, -0.2019573152065277, -0.5351716876029968, -0.10192538797855377, 0.04326397180557251, -0.11484088003635406, 0.262061297893524...
with a rough estimate, it's not a fixed size for each data block.
[ 0.20862320065498352, 0.016855264082551003, 0.05795804038643837, 0.2801342010498047, 0.19180268049240112, 0.02809927798807621, -0.030982114374637604, -0.3259592056274414, -0.15954728424549103, -0.3293060064315796, 0.03451760113239288, 0.024826278910040855, 0.08334401994943619, 0.07595747709...
How can i get the content from HTML, removing the elements around it. I am looking for an example using VB6 You can use Internet Explorer as a COM object (without showing it on screen). For example to get a plain-text version of the HTML: ``` Public Function Html2Text(ByVal Data _ As String) As String Dim ob...
[ 0.17734597623348236, 0.011593778617680073, 0.5982611775398254, -0.01029198244214058, -0.15019704401493073, -0.14577080309391022, 0.25901058316230774, -0.028981037437915802, -0.38626185059547424, -0.9405942559242249, 0.017410852015018463, 0.43366238474845886, -0.4230909049510956, 0.17171066...
obj.Write Data Html2Text = obj.Body.InnerText End Function ``` You could also walk the element tree to do something more complicated. Credit: Karl Peterson in [Visual Studio Magazine](http://vb.mvps.org/articles/qa200302.asp).
[ -0.30123645067214966, 0.1279561072587967, -0.20988158881664276, 0.014135738834738731, -0.1353498250246048, 0.10899997502565384, 0.5679799914360046, -0.33492910861968994, -0.35295039415359497, -0.7289717793464661, -0.6298401951789856, 0.154093399643898, -0.384633332490921, -0.82135766744613...
I'm in the process of writing a small web app that would allow me to manage several IIS installations on different servers on our network. We have no domain controller. I have written a small impersonation controller that uses the win32 api and its LogonUser method. I then use System.DirectoryServices and the IIS ADSI...
[ 0.24068298935890198, 0.1283101886510849, 0.44855839014053345, -0.19048097729682922, 0.36153444647789, -0.17298607528209686, 0.44063010811805725, -0.006073721218854189, -0.03738858178257942, -0.76131671667099, 0.0780242383480072, 0.23190049827098846, -0.5120245814323425, 0.4076235592365265,...
string metabasePath = "IIS://" + server.ComputerName + "/W3SVC"; DirectoryEntry w3svc = new DirectoryEntry(metabasePath, "Administrator", "PASSWORD"); string serverBindings = ":80:" + site.HostName; string homeDirectory = server.WWWRootNetworkPath + "\\" + site.FolderName; ...
[ 0.0488164909183979, -0.018603114411234856, 0.7139667272567749, -0.39176255464553833, 0.09488890320062637, 0.23462934792041779, 0.24849089980125427, 0.08188546448945999, -0.23188993334770203, -0.8625651001930237, -0.3793596923351288, 0.37799668312072754, -0.6092491745948792, 0.3482787311077...
object websiteId = (object)w3svc.Invoke("CreateNewSite", newsite); int id = (int)websiteId; impersonationSvc.UndoImpersonation(); } ``` This routine works when I use the server the web app is hosted on (SRV6). A new site is created. If I use SRV5 for instance, another Server on our n...
[ -0.24530625343322754, 0.21399474143981934, 0.5901434421539307, -0.3077292740345001, 0.0845232605934143, 0.041053447872400284, 0.8773369193077087, -0.4410494267940521, -0.34474891424179077, -0.5715755820274353, -0.19663499295711517, 0.6203574538230896, -0.5296441316604614, 0.348387241363525...
+31 System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args) +53 ``` ... Anyone knows how I could solve this? You cannot use impersonation in this situation. The account you are impersonating needs login priveleges on the local machine. If your web servers are not part of a domain, I think T...
[ -0.019627751782536507, 0.18776117265224457, 0.43155187368392944, -0.23417262732982635, 0.15300096571445465, -0.009314656257629395, 0.6122552752494812, 0.058661166578531265, -0.03179597482085228, -0.5085216760635376, -0.3125147521495819, 0.5095727443695068, -0.46172863245010376, 0.145391896...
I'm struggling to find sufficient information about the property Inheritance Tree (or Inheritence Context) used by `DependencyObject` and `DependencyProperty`. I would like to use the value inheritence capability of `DependencyProperty` outside of a typical WPF page, such that Object A is the logical parent Object B, ...
[ 0.011725693009793758, -0.15951327979564667, 0.16313593089580536, -0.025534100830554962, 0.19602610170841217, -0.27480897307395935, -0.09650624543428421, 0.02090434543788433, 0.0556013248860836, -0.42001765966415405, -0.337626576423645, 0.4835176169872284, -0.11813773959875107, 0.5699357986...
own *root*), then how do you establish the logical tree so that `DependencyProperty` understands that B is a child of A? The [Hillberg Freezable Trick](http://www.drwpf.com/blog/Home/tabid/36/EntryID/36/Default.aspx) as well as [Josh Smith's bag of tricks](http://www.codeproject.com/KB/WPF/ArtificialInheritanceCxt.asp...
[ 0.17718540132045746, 0.1537759155035019, -0.054253626614809036, 0.11460775136947632, 0.19999289512634277, -0.15833233296871185, 0.22676312923431396, -0.1810174584388733, -0.11458517611026764, -0.34588590264320374, 0.089089035987854, 0.4343242347240448, -0.18672382831573486, 0.3160079121589...
90% of the useful implementation of `DependencyObject`) marked as internal and thus kept hidden from all code outside of WindowsBase.dll It is possible to use reflection to set the `_contextParent` field, as well as to call this hidden methods to set the `InheritenceContext`, but at the end of the day its not a clean...
[ 0.14146611094474792, 0.004403143189847469, 0.0449548102915287, 0.05692295730113983, -0.06761336326599121, -0.26253536343574524, 0.5388911366462708, 0.0004144204722251743, 0.05512649938464165, -0.42610013484954834, -0.08313737064599991, 0.6315698027610779, -0.3522334396839142, 0.16635851562...
co-exist with the rest of the sub-classes, which not only strays far from good OO design, but also makes an otherwise superb class utterly unusable outside of the WPF framework.
[ 0.08360486477613449, 0.055944785475730896, -0.041291140019893646, 0.025519048795104027, -0.040781211107969284, -0.3046037554740906, 0.42988744378089905, -0.2934509217739105, 0.08312379568815231, -0.34944742918014526, -0.24829331040382385, 0.06571907550096512, -0.08581900596618652, 0.094763...
I am putting together a REST API and as I'm unsure how it will scale or what the demand for it will be, I'd like to be able to rate limit uses of it as well as to be able to temporarily refuse requests when the box is over capacity or if there is some kind of slashdotted scenario. I'd also like to be able to gracefull...
[ 0.4457911550998688, -0.21245194971561432, 0.44798263907432556, -0.02307523414492607, 0.03286449983716011, 0.0011621887097135186, 0.34133416414260864, 0.052582331001758575, -0.0700504407286644, -0.6999684572219849, -0.015555813908576965, 0.4824611246585846, -0.012276779860258102, 0.09897716...
for this kind of thing? Implementation is Rails with mysql. This is all done with outer webserver, which listens to the world (i recommend nginx or lighttpd). Regarding rate limits, nginx is able to limit, i.e. 50 req/minute per each IP, all over get 503 page, which you can customize. Regarding expected temporary dow...
[ -0.033507850021123886, -0.2133861482143402, 0.46820423007011414, 0.18111541867256165, -0.10488501936197281, -0.04550214856863022, 0.4234963655471802, -0.0930088609457016, -0.35268014669418335, -0.8266168236732483, 0.04498164355754852, 0.6136167645454407, -0.33629152178764343, -0.1155406981...
without losing any connections at all. I.e. you can run separate instance of app server on different UNIX socket/IP port and have balancer (nginx/lighty/haproxy) use that new instance too. Then you shut down old instance and all clients are served with only new one. No connection lost. Of course this scenario is not al...
[ 0.14887070655822754, -0.12176545709371567, 0.4544096291065216, 0.04948297515511513, -0.11620523780584335, 0.25628265738487244, -0.05975133180618286, -0.22980770468711853, -0.5878300070762634, -0.6788884401321411, -0.01134931668639183, 0.3322942852973938, -0.5520821809768677, 0.176467016339...
M webservers for static and P app servers for dynamic content. Oh well your REST API don't have static files, does it? For quite small service (under 2K rps) all balancing is done inside one-two webservers.
[ 0.11171998083591461, -0.2941851019859314, 0.48895323276519775, 0.27041059732437134, -0.0754118338227272, 0.13297902047634125, 0.051408909261226654, -0.15257081389427185, -0.4804001748561859, -0.5407185554504395, -0.2699752748012543, 0.7641268968582153, -0.1380375176668167, -0.0543730780482...
I have a .swf file that I try to browse to and it loads fine in Firefox, but in IE6 it doesn't load. When right-clicking it says "movie not loaded". Any suggestions? The actual problem was the application uses SSL with client authentication and there is a strange issue where when loading the application in IE it wasn'...
[ 0.610619068145752, 0.10795808583498001, 0.5012960433959961, -0.08220317959785461, -0.09666460007429123, -0.560899555683136, 0.2477208971977234, 0.16097959876060486, -0.1529562920331955, -0.46138235926628113, -0.059256553649902344, 0.6635575294494629, -0.47859853506088257, 0.259845852851867...
I'm new to sphinx, and I'm seting it up on a new website. It's working fine, and when i search with the *search* in the console, everything work. Using the PHP api and the searched, gives me the same results as well. But it gives me only ids and weights for the rows found. Is there some way to bring some text fields t...
[ 0.37736570835113525, 0.4983658194541931, 0.051509980112314224, 0.1303054392337799, 0.018740909174084663, -0.08376382291316986, 0.12016569823026657, -0.1398005336523056, -0.3102116584777832, -0.4592427611351013, 0.34234410524368286, 0.1844899207353592, -0.20278269052505493, 0.01941842585802...
at the same time)? You can use a mysql FIELD() function call in your ORDER BY to ensure everything is in the order sphinx specified. ``` $idlist = array(); foreach ( $sphinx_result["matches"] as $id => $idinfo ) { $idlist[] = "$id"; } $ids = implode(", ", $idlist); SELECT * FROM table WHERE id IN ($ids) ORDER BY...
[ 0.12504994869232178, 0.1605973243713379, 0.21505938470363617, -0.14194904267787933, -0.03987794369459152, 0.04174230247735977, 0.2617560029029846, -0.5492181777954102, -0.5278459191322327, -0.45327234268188477, -0.33852848410606384, 0.41989660263061523, -0.6382681131362915, 0.2041937857866...