text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Me again... I have an XML File that contains different categories which I would like to query for different attributes. ``` <item> <title>Industries</title> <category type="Channel">Automotive</category> <category type="Type">Cars</category>
[ 0.689721405506134, 0.28571584820747375, 0.4509739875793457, 0.07523372769355774, -0.24292966723442078, 0.09644187986850739, -0.08024749904870987, -0.04656729847192764, -0.30850061774253845, -0.5468032956123352, 0.12662751972675323, 0.5842630863189697, 0.2024984210729599, 0.5235716104507446...
<category type="Token">Article</category> <category type="SpecialToken">News</category> <guid>637f0dd7-57a0-4001-8272-f0fba60feba1</guid> </item> ``` IN SQL I would write something like. ``` select * from articles where channel = 'Automative' AND type = 'Cars' etc. etc. `...
[ 0.21951283514499664, 0.10334647446870804, 0.19571784138679504, 0.1946350485086441, -0.2169615477323532, 0.23914901912212372, 0.05106867104768753, -0.4302420914173126, -0.27704519033432007, -0.47759154438972473, -0.02829500287771225, 0.5402458310127258, -0.1107863336801529, 0.00596825685352...
results if an item matches both criteria. ``` var articleList = (from item in doc.Descendants("item") from _category in item.Elements("category") where _category.Value == valueCboChannel && _category.Attribute("domain").Value == "Channel" && (...
[ -0.1757022589445114, 0.06152584031224251, 0.8446426391601562, -0.08687300235033035, 0.10025838762521744, -0.10264430195093155, -0.07659720629453659, -0.493063747882843, -0.46916478872299194, -0.49144354462623596, -0.44200530648231506, 0.39923256635665894, 0.042572252452373505, 0.3025297820...
valueCboSubChannel && _category.Attribute("domain").Value == "SubChannel") select new { Title = item.Element("title").Value,
[ 0.15650808811187744, -0.05253028869628906, 0.7267719507217407, 0.12245483696460724, 0.13719765841960907, -0.22447016835212708, 0.054830726236104965, -0.43136724829673767, -0.33154502511024475, -0.4078388512134552, -0.1601223349571228, 0.4745040535926819, -0.1154855340719223, 0.828237712383...
Guid= item.Element("guid").Value, description = item.Element("description").Value, link = item.Element("link").Value
[ -0.37511882185935974, 0.023955006152391434, 0.25462332367897034, 0.36132392287254333, -0.09375297278165817, 0.261040598154068, -0.04788237810134888, -0.1449280083179474, -0.0528499037027359, -0.5682200789451599, -0.15632270276546478, 0.41103294491767883, -0.4895792007446289, 0.288767278194...
}).ToList(); ListView1.DataSource = articleList; ListView1.DataBind(); ``` I'd simplify it with an extension method to do the tricky lookup: (updated 12/02/09 to exclude empty elements) ``` static string CategoryValue(this XElement element, string type) { var category = el...
[ -0.3634476363658905, -0.37384727597236633, 0.6979935765266418, -0.341888964176178, 0.028942348435521126, -0.1371275633573532, 0.3214644491672516, -0.4862474203109741, -0.42410120368003845, -0.2532118260860443, -0.34996920824050903, 0.7125126123428345, -0.41534459590911865, 0.13447366654872...
UPDATE HERE return category == null ? null : category.Value; } static void Main() { XDocument doc = XDocument.Parse(xml); var qry = from item in doc.Descendants("item") where item.CategoryValue("Channel") == "Automotive" && item.CategoryValue("Type") == "Cars" sele...
[ -0.025832870975136757, -0.2142379730939865, 0.6645312309265137, -0.05556086078286171, 0.13740403950214386, 0.2984316945075989, -0.03949524089694023, -0.11561987549066544, -0.2776239216327667, -0.31148478388786316, -0.5320204496383667, 0.6170309782028198, -0.12794050574302673, 0.53690773248...
Console.WriteLine(node.Element("guid").Value); } } ```
[ -0.4192838668823242, 0.11081060767173767, 0.3984743356704712, -0.18681833148002625, 0.4426194727420807, -0.20472919940948486, 0.1419919729232788, 0.17715482413768768, 0.4080038070678711, -0.6694620847702026, -0.2331571877002716, 0.7599059343338013, -0.3265289068222046, 0.22684121131896973,...
I am working on a project for my company, and I need to integrate some graphs of different types and average complexity to C# in the process of studying stock markets. I found this free library on the Internet, [ZedGraph](http://zedgraph.org/wiki/index.php?title=Main_Page). If you came across it, do you recommend using...
[ 0.29889625310897827, -0.3151363432407379, 0.4693320691585541, 0.20966890454292297, -0.13463400304317474, -0.34138205647468567, -0.5230677723884583, 0.09702373296022415, -0.08982975780963898, -0.6655793190002441, 0.1770476996898651, 0.3692752420902252, -0.29489442706108093, 0.25771799683570...
with the actual data points shown, line connection data points](https://i.stack.imgur.com/xyznI.png) 3. [Sticks plot, with overlayed annotation (`TextBox`es, in fact)](https://i.stack.imgur.com/6CY5H.png) 4. [Several plots in the same window, types as in 2. and 3.](https://i.stack.imgur.com/HG6Wb.png) (the two plots in...
[ 0.15521657466888428, -0.4713486433029175, 0.5819361209869385, 0.3946991264820099, -0.17402200400829315, -0.056772250682115555, -0.4713256359100342, -0.2538725733757019, -0.49416178464889526, -0.6322273015975952, -0.02454782836139202, 0.2644536793231964, -0.30014538764953613, 0.003184347646...
is built-in support for the user to zoom in (infinite) and zoom out, pan (drag while holding down the `Ctrl` key), save the plot to a file or copy it to the clipboard. There is one thing I am missing in ZedGraph: the ability for the user to select items in the plot in order to perform some action on those selected ite...
[ 0.3227814733982086, -0.3119448125362396, 0.460435152053833, 0.48692506551742554, -0.10043056309223175, -0.4001661539077759, -0.10263745486736298, 0.18609902262687683, 0.22783493995666504, -0.5917399525642395, 0.12023358047008514, 0.4512217342853546, -0.1042763888835907, -0.0916017070412635...
team behind its further development.
[ 0.2912849187850952, 0.06344250589609146, -0.07150731980800629, 0.3711310029029846, 0.24283580482006073, 0.06000129133462906, -0.16894926130771637, -0.11314745992422104, -0.043271079659461975, -0.24864020943641663, -0.2541055381298065, 0.34126028418540955, 0.7066777348518372, 0.000445180950...
I just wrote an if statement in the lines of ``` if (value == value1 || value == value2 || value == value3 || value == value4) //do something ``` and it annoys me that I always have to repeat the 'value ==' part. In my opinion this is serving no purpose other than making it difficult to read. I wrote the follow...
[ 0.11755938082933426, -0.18134945631027222, 0.1715538203716278, -0.19930969178676605, -0.11056085675954819, -0.29996225237846375, 0.4393550157546997, -0.17886734008789062, -0.22078171372413635, -0.23378103971481323, -0.38135603070259094, 0.4121609330177307, -0.36032935976982117, 0.068299032...
an ExtensionMethod? EDIT: Thanks for all the great answers. For the record: I have kept the method. While the suggestion that you could simply use `new []{value1,value2,value3,value4}.Contains(value)` is true, I simply prefer reading this kind of if statement from left to right (***if this value is equal to any of th...
[ 0.23555386066436768, -0.26501014828681946, 0.43097588419914246, -0.0033410743344575167, 0.04025337100028992, -0.05934799462556839, 0.3213733434677124, -0.21637730300426483, -0.16933080554008484, -0.671006441116333, -0.10206934809684753, 0.5712234377861023, -0.2631050646305084, 0.1486859917...
look at the implementation. The answer is "Yes, it is"
[ 0.5623125433921814, 0.044075824320316315, 0.26451006531715393, 0.32636743783950806, 0.00003739898602361791, 0.22789794206619263, 0.1577264368534088, -0.04963633045554161, -0.1345106065273285, -0.2094200700521469, -0.15612144768238068, 0.6108527183532715, -0.05514092743396759, -0.1727735847...
My WinForms app uses the mouse wheel, subscribing to the `Control.MouseWheel` event. How can I get it to work with scrolling methods from other input devices, in particular "finger along the edge" scrolling on the (Synaptics) trackpad on my T61? I assume that I need to wire up the trackpad messages to the `Control.Mous...
[ -0.0763791874051094, -0.1489344984292984, 0.45652031898498535, 0.1340782642364502, -0.010700264014303684, -0.018740935251116753, 0.22933852672576904, 0.2846664786338806, 0.06102763116359711, -0.6963585615158081, 0.24581536650657654, 0.867493212223053, 0.029828108847141266, -0.0023880836088...
here: [Link](https://learn.microsoft.com/en-us/archive/blogs/markrideout/datagridview-mouse-scrolling-button-with-ibmultranav-driver) which involves tricking the mouse driver into recognizing that you want scroll messages.
[ -0.13527323305606842, -0.27954569458961487, 0.4806689918041229, 0.1044638529419899, 0.33795952796936035, -0.1880553960800171, 0.3930586576461792, -0.0797119140625, -0.19685685634613037, -0.2533864974975586, -0.1730782687664032, 0.7260007262229919, -0.01132814958691597, -0.1754256635904312,...
I'm writing an application for the JBoss Java EE server. I would like to have the DB-access code quite robust. Thus I have created retry loops so that the request won't fail because of temporary network problems. Now I would like the execution of the request to pause in between retries. The server thread has been spaw...
[ 0.7116381525993347, 0.12080740928649902, 0.251250684261322, -0.05463915690779686, -0.03284105286002159, -0.1337926685810089, 0.28212636709213257, 0.028967533260583878, -0.24063238501548767, -0.6150571703910828, 0.1388498693704605, 0.46044203639030457, -0.29412123560905457, 0.49238014221191...
here: [Link](https://learn.microsoft.com/en-us/archive/blogs/markrideout/datagridview-mouse-scrolling-button-with-ibmultranav-driver) which involves tricking the mouse driver into recognizing that you want scroll messages.
[ -0.13527323305606842, -0.27954569458961487, 0.4806689918041229, 0.1044638529419899, 0.33795952796936035, -0.1880553960800171, 0.3930586576461792, -0.0797119140625, -0.19685685634613037, -0.2533864974975586, -0.1730782687664032, 0.7260007262229919, -0.01132814958691597, -0.1754256635904312,...
I'm currently being visually assaulted by all of the names that are being displayed and entered on one of my systems. Basically, users have use of an on-screen keyboard and don't tend to write things in neatly! I.e. John Smith ends up getting entered as JOHN SMITH or john smith. I want a way to neatly enter names and ...
[ 0.49677419662475586, 0.43319588899612427, 0.07857787609100342, 0.13006748259067535, 0.048023488372564316, 0.3086337447166443, 0.3866317868232727, 0.2677306532859802, -0.3652558922767639, -0.8393459916114807, 0.07817070186138153, -0.06136152148246765, -0.35325419902801514, 0.318265259265899...
for cases such as O'Brien and McCarthy? Is there anything out there than can do this, nicely? My code at the moment basically has a list of special cases and goes through and manipulates them if they contain the special case... It's not the most efficient thing in the world though. Thanks in advance. Does it really ma...
[ 0.15593339502811432, 0.16663356125354767, -0.01220790110528469, 0.06561680883169174, 0.21617738902568817, 0.18169943988323212, 0.12458939850330353, 0.030883613973855972, -0.3681897819042206, -0.5493230819702148, 0.13502942025661469, 0.4810565114021301, -0.2547399699687958, -0.0084024118259...
you start to mess around with capitalisation then there's the risk of getting it wrong and offending a user. Surely there are other aspects of the system that warrant more attention...
[ 0.5220695734024048, 0.3776615262031555, -0.22194835543632507, -0.005190700758248568, -0.22225812077522278, 0.10447713732719421, 0.4133176803588867, 0.21889273822307587, -0.1884196698665619, -0.508974552154541, -0.13996493816375732, 0.4906308650970459, 0.02970188297331333, -0.13540230691432...
are there any good tutorials online for learning about the c# 2.0 language feature "predicates"? i'm trying to learn how to use predicates along with linq to sql to modify my queries what i am trying to do is query a table of customers and filter it based on changing criteria. for example * find all customers who ha...
[ 0.42004674673080444, 0.03886624053120613, -0.0833377093076706, 0.11481969803571701, -0.13730941712856293, 0.23592758178710938, 0.10858254134654999, -0.03795679658651352, -0.19781403243541718, -0.6512513160705566, 0.32773005962371826, 0.3091903030872345, -0.2874857783317566, -0.058890577405...
want a flexible solution to this problem that's easy to extend without breaking anything (open closed principle i think) (btw - the lambda-based predicates used with LINQ-to-SQL are C# 3.0 / .NET 3.5, not C# 2.0) Well, what specifically are you trying to do? Predicates are just filters (either as a delegate or an Exp...
[ 0.28452610969543457, -0.03570130839943886, 0.22272402048110962, 0.03534895181655884, 0.14305159449577332, 0.0106912637129426, 0.001418608007952571, -0.2287479192018509, -0.260313481092453, -0.3562142550945282, -0.17205600440502167, 0.432956725358963, -0.4334743320941925, 0.0203522033989429...
ctx.Customers where cust.Gender == 'M' && cust.Zip = '90210' select cust; var qry2 = from cust in ctx.Customers where cust.Zip = '90210' select cust; ``` Or for a non-trivial example (a dynamic search form / combining separately) ``` IQueryable<Foo> query = ctx.Customers; // ...
[ -0.26922091841697693, -0.03812597319483757, 0.46259990334510803, -0.02049950323998928, -0.054887112230062485, 0.46495017409324646, -0.08594843745231628, -0.060809291899204254, -0.2756998538970947, -0.39837175607681274, -0.32393625378608704, 0.5094197392463684, -0.4566671848297119, 0.028601...
by hand, but that is more work, and requires knowledge of the [Expression API](http://marcgravell.blogspot.com/2008/10/express-yourself.html).
[ 0.31168463826179504, -0.0710386112332344, 0.18244612216949463, -0.3246592879295349, 0.15686501562595367, 0.34959647059440613, 0.3123813569545746, -0.005401019472628832, -0.24809743463993073, -0.6292626261711121, -0.28298577666282654, 0.35034623742103577, -0.05869446322321892, -0.5159969925...
Is the source code available somewhere just to make a few small fixes to textfield class? As mentioned, the sources for the internal flash.\* classes are not available. To modify or add behavior you'll need to subclass TextField.
[ 0.3370596468448639, 0.08442958444356918, 0.08133158832788467, 0.04455235227942467, 0.09754613786935806, -0.24268239736557007, 0.18437184393405914, 0.2860809862613678, -0.07328415662050247, -0.4680890738964081, 0.11096308380365372, 0.9197842478752136, -0.1436062604188919, -0.112269140779972...
Is there an Iphone SDK API to search resource files? I have a set of html file resources that I'd like the user to be able to search in, but I want to avoid reading the files into memory and searching them one by one. Is there any API that can help me do this? Here's a solution using a self-referential relationship u...
[ 0.13826797902584076, 0.45663902163505554, 0.4576117694377899, 0.05044739320874214, 0.15751415491104126, 0.03680442273616791, 0.05401240661740303, -0.26158902049064636, -0.22219885885715485, -0.6279360055923462, 0.048490971326828, 0.9011892676353455, -0.4161710739135742, -0.3423738479614258...
:citations, :source => :reference has_many :references, :foreign_key => "reference_id", :class_name => "Citation" has_many :refered_publications, :through => :references, :source => :publication end class Citation < ActiveRecord::Base belongs_to :publication belongs_to :reference, :class_name => "Publication" ...
[ 0.11953620612621307, 0.42033809423446655, 0.48926061391830444, 0.14714466035366058, -0.5360456705093384, -0.0440070740878582, 0.2579909861087799, -0.5821982622146606, 0.4325757920742035, -0.5301948189735413, 0.04019267484545708, 0.4422319531440735, -0.3222973644733429, 0.2545013427734375, ...
1, ...>] >> a.references => [] >> b.citations => [] >> b.references => [#<Citation id: 1, publication_id: 1, reference_id: 2, created_at: "2009-02-15 14:13:15", updated_at: "2009-02-15 14:13:15">] >> a.cited_publications => [#<Book id: 2, type: "Book", name: "Book", created_at: "2009-02-15 14:11:00", updated_at: "2...
[ -0.2962951362133026, 0.6348228454589844, 0.4289219081401825, 0.27154961228370667, -0.12312359362840652, 0.09878533333539963, 0.2971043884754181, -0.28616005182266235, -0.3059159219264984, -0.4022621512413025, -0.30282461643218994, 0.6083231568336487, -0.15905755758285522, 0.086437895894050...
I have a small namespace containing some type definitions, which I use to make my code look cleaner. However I don't want to have to add a "using namespace ..." line to every file that uses one of these types, after all I already have to add a #include for the file. --- *MyFile.cpp:* ``` #include "typedefs.h" void B...
[ 0.29578232765197754, 0.31811004877090454, 0.45173659920692444, -0.25636041164398193, -0.23198246955871582, 0.19922001659870148, 0.3987347483634949, -0.4853759706020355, -0.3448047339916229, -0.6611745953559875, -0.12179749459028244, 0.44137507677078247, -0.587238073348999, 0.16564700007438...
Typedefs; ``` --- Would it be acceptable to add the "using namespace" line immediately after the namespace declaration? If not, why not? Use unnamednamespace.If you want to have the names visible only to the files in which you have included the headers ``` namespace { int i = 10; } ``` above has the same effect...
[ -0.06631559878587723, 0.05595073103904724, 0.28057482838630676, -0.024196214973926544, -0.11110163480043411, -0.053940530866384506, 0.2050953060388565, 0.14172552525997162, -0.13772115111351013, -0.6201931238174438, -0.4022645652294159, 0.3494657278060913, -0.49422532320022583, 0.130033820...
I'm currently working on a largish Ruby on Rails project. It's old enough and big enough that it's not clear if all views are actually in use. Is there any script/plugin out there that can generate a list of unused view files? I wrote a script to find unused partials/views. I assumed, though, that "unused" means that ...
[ 0.2863222360610962, 0.07415520399808884, 0.2059945911169052, 0.03588265925645828, 0.13399024307727814, -0.011237244121730328, 0.15936535596847534, 0.22761350870132446, -0.29603609442710876, -0.5984793901443481, 0.2033098340034485, 0.33237510919570923, -0.19212082028388977, 0.41754716634750...
script folder: ``` #!/usr/bin/env ruby require 'config/environment' (Dir['app/controllers/*.rb'] - ['app/controllers/application.rb']).each do |c| require c base = File.basename(c, '.rb') views = Hash.new Dir["app/views/#{base.split('_')[0]}/*"].each do |v| views.store(File.basename(v).split('.')[0], v) ...
[ 0.3037196695804596, -0.03680848702788353, 0.5473400354385376, -0.11237844079732895, 0.07545303553342819, 0.059093039482831955, 0.3286464512348175, -0.12983311712741852, -0.1037420704960823, -0.6623011231422424, -0.010669384151697159, 0.8146260380744934, -0.00021296596969477832, -0.30713915...
First of all, I must say that I am quite new to the API java.util.concurrent, so maybe what I am doing is completely wrong. What do I want to do? I have a Java application that basically runs 2 separate processing (called *myFirstProcess*, *mySecondProcess*), but these processing must be run at the same time. So, I ...
[ 0.09175454825162888, -0.4478045403957367, 0.45204901695251465, -0.22123773396015167, 0.6062943339347839, -0.028417212888598442, 0.29123952984809875, -0.2650010883808136, 0.00392548181116581, -0.7581420540809631, -0.08783918619155884, 0.7244554758071899, -0.2639613747596741, 0.1468426436185...
try { // I wait until both processes are finished. Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } logger.info("Processing finished"); executor.shutdown(); // Do some processing on results ... } ``` *myFirstProcess...
[ 0.0843268558382988, -0.19873258471488953, 0.4088955223560333, -0.053217437118291855, 0.6027330756187439, 0.06631947308778763, 0.2796860933303833, 0.051252324134111404, -0.2027427852153778, -0.8067592978477478, -0.22707094252109528, 0.4510238468647003, -0.20591050386428833, 0.21386529505252...
classes that implements `Callable<Object>`, and where all their processing is made in the call() method. It is working quite well but I am not sure that it is the correct way to do that. Is a good way to do what I want? If not, can you give me some hints to enhance my code (and still keep it as simple as possible). Yo...
[ 0.10484007000923157, -0.5403726696968079, 0.011991762556135654, 0.2671097218990326, 0.1736392080783844, -0.20968316495418549, 0.05519040301442146, 0.11657002568244934, 0.135962575674057, -0.7106831669807434, -0.13713528215885162, 0.6624652147293091, -0.2672225832939148, 0.1216004490852356,...
API `get(long timeout, TimeUnit unit)` which allows you to define a maximum time for the thread to sleep and wait for a response, and otherwise continues running. See the [Java API](http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Future.html#get()) for more info.
[ 0.6673839688301086, -0.559482991695404, 0.22499094903469086, -0.07000666111707687, 0.20999300479888916, -0.1593729704618454, 0.1680956929922104, -0.20780959725379944, -0.48422273993492126, -0.5022839307785034, -0.09304293245077133, 0.5306738615036011, -0.030429329723119736, -0.055074572563...
Is it possible to "wipe" strings in Delphi? Let me explain: I am writing an application that will include a DLL to authorise users. It will read an encrypted file into an XML DOM, use the information there, and then release the DOM. It is obvious that the unencrypted XML is still sitting in the memory of the DLL, and...
[ 0.3208276927471161, -0.05708960071206093, 0.4206697344779968, -0.033941060304641724, 0.14355406165122986, -0.43918365240097046, 0.03236958384513855, -0.13084428012371063, -0.07958632707595825, -0.4571571350097656, -0.34125879406929016, 0.29569435119628906, -0.12060826271772385, 0.119895465...
don't think I can easily wipe the memory anyway because of references. If I traverse my DOM (which is a TNativeXML class) and find every string instance and then make it into something like "aaaaa", then will it not actually assign the new string pointer to the DOM reference, and then leave the old string sitting there...
[ 0.43152114748954773, 0.09874507784843445, 0.2544875144958496, 0.04638943821191788, -0.0012122192420065403, -0.0450562983751297, 0.40038540959358215, -0.20234045386314392, -0.301775723695755, -0.3549797236919403, 0.11497893184423447, 0.7705805897712708, -0.1981099247932434, 0.44904783368110...
then tell it to wipe. Or should I just get on with my next task and forget this because it is really not worth bothering. I don't think it is worth bothering with, because if a user can read the memory of the process using the DLL, the same user can also halt the execution at any given point in time. Halting the exec...
[ 0.4872855246067047, 0.03185321390628815, 0.08088978379964828, 0.2621617019176483, -0.09467566013336182, -0.17777828872203827, 0.48319000005722046, 0.2879024147987366, 0.012680371291935444, -0.4660697877407074, -0.07140082120895386, 0.7488375902175903, -0.33535128831863403, 0.35073220729827...
memory.
[ -0.09653578698635101, 0.2924289405345917, -0.09403499215841293, 0.20091412961483002, -0.020947637036442757, -0.007025957573205233, -0.09472332149744034, 0.1295163333415985, -0.21200330555438995, -1.059785008430481, 0.006612830329686403, 0.1790286898612976, 0.2886207103729248, 0.03659739345...
I need a quick "no" for DELETE/UPDATE/INSERT, since 3p reporting tool allows users to write their own SQL. I know that I should probably add a new user and set permissions on tables/sp/views/etc..., and then create a new connection as restricted user. Is there a quicker way to force a transaction or connection in S...
[ 0.3580043315887451, 0.2131487876176834, 0.3958350121974945, 0.11491619795560837, -0.09903562813997269, -0.4288231134414673, 0.10611168295145035, -0.11842038482427597, -0.4364106357097626, -0.3727996051311493, 0.29988959431648254, 0.37409284710884094, -0.197723388671875, 0.4431494176387787,...
have to worry about them. See Kern's link.
[ 0.21673767268657684, 0.2317705899477005, 0.06780621409416199, 0.0037878630682826042, 0.11944437772035599, -0.061755724251270294, 0.3518211245536804, 0.10274862498044968, -0.2142394632101059, -0.6757042407989502, -0.09325296431779861, 0.47146502137184143, -0.16969799995422363, -0.1350507587...
Is there a particular reason why a generic `ICloneable<T>` does not exist? It would be much more comfortable, if I would not need to cast it everytime I clone something. ICloneable is considered a bad API now, since it does not specify whether the result is a deep or a shallow copy. I think this is why they do not imp...
[ 0.47414731979370117, -0.13007120788097382, 0.008120082318782806, 0.14778456091880798, 0.029221491888165474, -0.12987904250621796, 0.09001871198415756, 0.4784056842327118, -0.03728184476494789, -0.5498126149177551, 0.2797095775604248, 0.4167592227458954, -0.28044593334198, 0.474291294813156...
JavaScriptSerializer is not obsolete after .net 3.5 SP1. Should I uses JavaScriptSerializer or the prior recommended DataContractJsonSerializer?. Also why it was made obsolete? I'd happily use `JavaScriptSerializer` - but if in doubt, consider a third option - [Json.NET](http://james.newtonking.com/projects/json-net.as...
[ -0.39494964480400085, -0.0717308521270752, 0.8761419653892517, -0.057246360927820206, -0.1710180789232254, -0.27923059463500977, 0.30887481570243835, 0.07900261133909225, -0.13174068927764893, -0.8572703003883362, -0.2087852954864502, 0.779243528842926, -0.5052497982978821, -0.207807198166...
I have a game world with lots of irregular objects with varying coordinate systems controlling how objects on their surface work. However the camera and these objects can leave and move out into open empty space, where a normal Cartesian coordinate system is used. How do I manage mapping between the two? One idea I ha...
[ 0.45037317276000977, 0.04119768366217613, 0.04833446443080902, 0.3407629430294037, 0.2124597728252411, 0.19136030972003937, -0.17550373077392578, -0.05815131217241287, -0.31543028354644775, -0.519191324710846, 0.18237154185771942, 0.12756498157978058, -0.18092012405395508, 0.18059518933296...
solution can be found, since these objects are moving and could overlap at some point Regarding the use of bounds I had an idea where the object would use the coordinate system of the smallest bounds it occupied, and then transform according to the heirarchy of systems from top to bottom. Thus lets say stick figures o...
[ 0.10794384032487869, -0.3324146270751953, 0.553313136100769, 0.24224792420864105, -0.07380218058824539, 0.22294683754444122, -0.2167116105556488, -0.43974608182907104, -0.2187066227197647, -0.5427037477493286, 0.14745450019836426, 0.13987796008586884, -0.17235320806503296, 0.10484969615936...
I have a NavigationBar app with two views: a parent and a sub view. In the sub view I'm adding a button to the right corner as follows: ``` - (void)viewDidLoad { UIBarButtonItem *tempButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"lock-unlocked.png"] style:UIBarButtonItemStylePlain target:sel...
[ -0.0570046529173851, -0.14630857110023499, 0.8476198315620422, -0.07646603137254715, 0.03763948008418083, 0.3591657876968384, 0.4563405215740204, -0.13826817274093628, -0.03288263827562332, -0.7060045003890991, 0.03528355807065964, 0.678885281085968, -0.4100508987903595, 0.0771930962800979...
to create a new UIButtonItem with a new image and replace rightBarButtonItem with that new one. But I'm wondering if there's a way to just change the image without creating a new UIBarButtonItem. Am I creating a memory leak if I keep creating new UIBarButtonItem? Question 2: How can I get a hold of self.navigationItem...
[ 0.06580960750579834, -0.10368338972330093, 0.43329912424087524, 0.048655662685632706, -0.12963542342185974, 0.06332814693450928, 0.4992416501045227, -0.27963465452194214, -0.10204585641622543, -0.8409029841423035, -0.028757242485880852, 0.6629400849342346, -0.45728325843811035, -0.12239450...
*tempButton; } @property (nonatomic, retain) UIBarButtonItem *tempButton; ``` and synthesize it in the implementation. ``` @synthesize tempButton; ``` Create the object in viewDidLoad similiar to how you are now. ``` - (void)viewDidLoad { tempButtom = [[UIBarButtonItem alloc] initWithImage:[UIImage imageName...
[ 0.1345844268798828, -0.03933551535010338, 0.5567570328712463, -0.1721687912940979, -0.029030336067080498, 0.027246665209531784, 0.5095118880271912, -0.6460739374160767, -0.07858383655548096, -0.5106145739555359, -0.3175325095653534, 0.6650651097297668, -0.39108216762542725, -0.390474110841...
I am trying to attach a LINQ entity to the data context after I receive it from a form POST. However, all I get is the following exception: ``` An entity can only be attached as modified without original state if it declares a version member or does not have an update check policy. ``` I have also tried attaching th...
[ -0.023683037608861923, -0.09030751883983612, 0.8039403557777405, -0.08873863518238068, -0.023322833701968193, -0.0362333208322525, 0.1227046549320221, -0.31194621324539185, -0.26114630699157715, -0.4520736336708069, -0.47362393140792847, 0.25336286425590515, -0.3597094714641571, 0.33068984...
dataContext.People.Attach(person, prevPerson); dataContext.SubmitChanges(); return Redirect("~/People/Index"); } ``` Any ideas on what I'm doing wrong here? I can post the entity code if needed. In the LinqToSQL designer set all of the Update Checks to Never and when you attach call it like so: ``` context....
[ 0.029398910701274872, 0.04897203668951988, 0.6246536374092102, -0.050784215331077576, 0.0664420947432518, -0.15855225920677185, 0.21159964799880981, -0.13437025249004364, -0.11040180176496506, -0.686934769153595, -0.27000313997268677, 0.7563538551330566, -0.31477922201156616, 0.08076696842...
When I first learned C++ 6-7 years ago, what I learned was basically "C with Classes". `std::vector` was definitely an advanced topic, something you could learn about if you *really* wanted to. And there was certainly no one telling me that destructors could be harnessed to help manage memory. Today, everywhere I look...
[ 0.2852451801300049, 0.05846087262034416, -0.20960299670696259, -0.13957487046718597, -0.23240363597869873, 0.06564609706401825, 0.10132554173469543, 0.15199986100196838, -0.43949446082115173, -0.31267616152763367, 0.02688700333237648, 0.8509209752082825, -0.22061151266098022, -0.1457801163...
questions here on SO, and on other programming sites that tend to attract beginners (gamedev.net), or is this actually representative of the C++ community as a whole? Is modern C++ really becoming the default? Rather than being some fancy thing the experts write about, is it becoming "the way C++ just is"? Or am I jus...
[ 0.4564720392227173, -0.07353312522172928, 0.14136677980422974, 0.20536278188228607, -0.08991312980651855, -0.4180862307548523, -0.011064419522881508, 0.18300119042396545, -0.6230962872505188, -0.3197750449180603, -0.1130751520395279, 0.7788048982620239, 0.054056257009506226, 0.194165810942...
the C++ community as a whole has evolved so much in basically a few years. What are your experiences and impressions? (disclaimer: Someone not familiar with C++ might misinterpret the title as asking whether C++ is gaining popularity versus other languages. That's not my question. "Modern C++" is a common name for a d...
[ 0.3223031163215637, 0.2153180092573166, 0.007384227588772774, -0.288928359746933, -0.29070845246315, -0.293907105922699, 0.2292386144399643, 0.19475197792053223, -0.6169297695159912, -0.26731613278388977, 0.007920082658529282, 0.7871235013008118, 0.290749192237854, 0.18050651252269745, -...
things have evolved. The first generation of C++ programmers were C programmers, who were in fact using C++ as C with classes. Plus, the STL wasn't in place yet, so that's what C++ essentially was. When the STL came out, that advanced things, but most of the people writing books, putting together curricula, and teach...
[ 0.5295636057853699, 0.03528129309415817, -0.0017325225053355098, 0.02939484268426895, -0.35191500186920166, -0.32287704944610596, 0.17490781843662262, 0.4297638535499573, -0.6693195104598999, -0.5988044738769531, -0.011650524102151394, 0.5072393417358398, -0.12403261661529541, 0.0521154217...
"modern" way. Now, we have instructors and book writers who have been using the whole of C++, and getting their instructions from that perspective, such as Koenig & Moo's Accelerated C++ and Stroustrup's new textbook. So we don't learn `char*` then `std::strings`. It's an interesting lesson in how long it takes for ...
[ 0.01760995201766491, 0.20300202071666718, 0.06143873557448387, 0.15918336808681488, 0.0973176434636116, -0.26482000946998596, 0.17478619515895844, 0.05439931899309158, -0.12133382260799408, -0.7965123653411865, -0.29201000928878784, 0.4525783360004425, 0.0743560716509819, 0.126765146851539...
I have an ABC with several derived classes. To create these derived classes I use the factory pattern: .h file: ``` class derivedFactory { public: base* createInstance(); }; ``` .cpp file: ``` base* derivedFactory::createInstance() { return new derived(); } ``` Is there any advantage to this over just ha...
[ 0.5203397274017334, 0.30867528915405273, 0.37839436531066895, -0.24996693432331085, -0.07499950379133224, 0.18211890757083893, 0.3039367198944092, -0.4883563816547394, 0.03209073469042778, -0.7799111008644104, 0.27692845463752747, 0.3893214166164398, -0.49272286891937256, 0.172013491392135...
more composable, and if I wish I can wrap a real factory object in it. I can see that there may be a slight performance decrease but this is much to worry about as it is only called during startup. It depends on how flexible your factory needs to be. If the factory needs external information (like from a configuration ...
[ 0.2483813464641571, -0.0664716437458992, 0.24024361371994019, 0.2116531878709793, -0.04430459812283516, 0.1962372064590454, -0.07435090094804764, 0.07542546838521957, -0.2613913416862488, -0.6297189593315125, 0.1238756850361824, 0.834136962890625, -0.1331992894411087, -0.058590758591890335...
pointer is for testing, where you can use a different factory function.
[ 0.48927491903305054, -0.1940397471189499, 0.008826120756566525, 0.178907573223114, -0.032528895884752274, 0.24879708886146545, -0.1081264317035675, -0.09073562920093536, -0.1315210610628128, -0.5144972801208496, 0.33882489800453186, 0.2118719220161438, -0.23510651290416718, 0.0209747720509...
Is there any way to fadeout a div after 5 Seconds without using a setTimeOut function? everyone knows that in jquery 1.4 there's a delay function now, right? ``` $('#div').delay(5000).fadeOut(400) ``` that's how you do it, without having to add any custom functions or plug-ins. it's native to jquery 1.4
[ 0.46497321128845215, -0.2580830454826355, 0.5250986814498901, -0.11254160851240158, -0.0076607270166277885, -0.007377851288765669, -0.07307613641023636, -0.23938904702663422, -0.19430164992809296, -0.3295261859893799, 0.07666634768247604, 0.674735426902771, -0.34315118193626404, -0.1168264...
I mean how and why are realtime OSes able to meet deadlines without ever missing them? Or is this just a myth (that they do not miss deadlines)? How are they different from any regular OS and what prevents a regular OS from being an RTOS? Meeting deadlines is a function of the application you write. The RTOS simply pro...
[ 0.5244964957237244, 0.17315827310085297, 0.03798789530992508, 0.38685867190361023, 0.21191267669200897, -0.22042682766914368, 0.5177574753761292, -0.04401882365345955, -0.23903317749500275, -0.6934236288070679, -0.035707078874111176, 0.5953576564788818, -0.07083377242088318, -0.25585380196...
limited set of tasks and processes running. Some of the facilities an RTOS provide: * Priority-based Scheduler * System Clock interrupt routine * Deterministic behavior **Priority-based Scheduler** Most RTOS have between 32 and 256 possible priorities for individual tasks/processes. The scheduler will run the task...
[ -0.17086927592754364, -0.10945038497447968, 0.2599612772464752, 0.291387677192688, 0.3514154255390167, 0.18871738016605377, 0.05992007628083229, 0.06293193995952606, -0.48045614361763, -0.7357345223426819, -0.5286759734153748, 0.5208657383918762, -0.2016277313232422, 0.0023962853010743856,...
new (higher priority) task. As a developer, it is your job to assign the task priorities such that your deadlines will be met. **System Clock Interrupt routines** The RTOS will typically provide some sort of system clock (anywhere from 500 uS to 100ms) that allows you to perform time-sensitive operations. If you ha...
[ 0.28733760118484497, -0.12643465399742126, 0.43094760179519653, -0.018543235957622528, 0.3075656294822693, -0.1532835066318512, 0.4777512550354004, -0.13173896074295044, -0.54751056432724, -0.917917788028717, -0.4378579258918762, 0.5504209399223328, 0.12072331458330154, 0.03841393440961838...
you will run exactly at that time. It depends on the priority. If a task with a higher priority is currently running, you could be delayed. **Deterministic Behavior** The RTOS goes to great length to ensure that whether you have 10 tasks, or 100 tasks, it does not take any longer to switch context, determine what th...
[ 0.09567949920892715, -0.12760646641254425, 0.19182991981506348, 0.06179921701550484, 0.20129533112049103, -0.051963575184345245, 0.41222822666168213, 0.08697618544101715, -0.30611225962638855, -0.5094273090362549, -0.22082006931304932, 0.7499491572380066, -0.3494877517223358, -0.1914408206...
Routine and handles the interrupt without delay (regardless of the priority of any task currently running). Note that most hardware-specific ISRs would be written by the developers on the project. The RTOS might already provide ISRs for serial ports, system clock, maybe networking hardware but anything specialized (pa...
[ 0.38168442249298096, -0.17757828533649445, 0.19234469532966614, 0.14018258452415466, 0.09502708911895752, -0.11714255809783936, 0.28948038816452026, -0.3022688031196594, -0.12528063356876373, -0.4300433099269867, -0.4110346734523773, 0.703589916229248, -0.5176010727882385, -0.3085159957408...
Is it possible to create a database such that there are 2 tables across 2 different schemas within the database who reference each other? I would like to clarify my question with an example. Consider the tables, `EMPLOYEE (empID, empName, deptId)` and `DEPARTMENT (deptId, deptName)`. We can impose a foreign key const...
[ 0.08317611366510391, -0.03343912586569786, 0.0924517959356308, 0.16293497383594513, 0.10563495755195618, 0.08139774203300476, -0.02196473814547062, -0.1434832215309143, -0.19685260951519012, -0.5828438401222229, -0.11129814386367798, 0.3754240572452545, -0.3877531588077545, 0.2178661078214...
How to prevent ctrl+v paste for flash.display.textarea()? field.selectable = false; does not seem to work, also it disables caret/cursor this seem to work in TextEvent listener, any comments is it too bad solution to avoid copy+paste to a field ? ``` if (evt.text.length >1) evt.preventDefault () ; ```
[ -0.13375382125377655, 0.07730961591005325, 0.5838215351104736, -0.1142575815320015, 0.008447906002402306, -0.07427052408456802, 0.7263033390045166, -0.42944562435150146, 0.13045865297317505, -0.4274503290653229, -0.1688893437385559, 0.8966807126998901, -0.3481830954551697, -0.0283077266067...
I'm currently trying to write data from an array of objects to a range in Excel using the following code, where `objData` is just an array of strings: ``` private object m = System.Type.Missing; object[] objData = getDataIWantToWrite(); Range rn_Temp; rn_Temp = (Range)XlApp.get_Range(RangeName, m); rn_Temp = rn_Temp....
[ -0.0591120608150959, 0.19552069902420044, 0.6983253955841064, -0.5018461346626282, -0.031510356813669205, 0.328488826751709, 0.37328213453292847, -0.6089730858802795, -0.014339634217321873, -0.5360284447669983, -0.32193973660469055, 0.5917180180549622, -0.3576522469520569, -0.0840287283062...
I'm not sure why reading and assignment work differently. Has anyone ever done this successfully? I'm currently writing the array cell by cell, but it needs to cope with lots (>50,000) of rows and this is therefore very time consuming. This is an excerpt from method of mine, which converts a `DataTable` (the `dt` vari...
[ 0.15262950956821442, 0.08341243863105774, 0.33906638622283936, -0.3057340383529663, -0.13504643738269806, 0.22736528515815735, 0.333231121301651, -0.626526951789856, -0.15429697930812836, -0.5637993812561035, 0.04310695827007294, 0.5630138516426086, -0.2667185366153717, 0.14948372542858124...
dt.Rows.Count; r++) { DataRow dr = dt.Rows[r]; for (int c = 0; c < dt.Columns.Count; c++) { arr[r, c] = dr[c]; } } Excel.Range c1 = (Excel.Range)wsh.Cells[topRow, 1]; Excel.Range c2 = (Excel.Range)wsh.Cells[topRow + dt.Rows.Count - 1, dt.Columns.Count]; Excel.Range range = wsh.get_Range(c1, c2);...
[ -0.16318334639072418, -0.06538085639476776, 0.5115331411361694, -0.2694700062274933, -0.10586994141340256, 0.1795424520969391, 0.3066462576389313, -0.7191219329833984, -0.06084529310464859, -0.3057438135147095, -0.3710272014141083, 0.5168219208717346, -0.3887893855571747, -0.21973128616809...
In PHP I'm trying to match each character as its own group. Which would mimic the `str_split()`. I tried: ``` $string = '123abc456def'; preg_match_all('/(.)*/', $string, $array); // $array = array(2) { // [0]=> array(2) { // [0]=> string(12) "123abc456def" // [1]=> string(0) "" } // [1]=> array(2)...
[ -0.001388087752275169, 0.17649714648723602, 0.36356937885284424, -0.3130945563316345, -0.5693424344062805, 0.12986187636852264, 0.13429056107997894, -0.5986185073852539, 0.008336571976542473, -0.4646284878253937, 0.19004039466381073, 0.3080933392047882, -0.47583502531051636, -0.19190162420...
string(1) "1", [1]=> string(1) "2" // ... // [10]=> string(1) "e", [11]=> string(1) "f" } } ``` The reason I want to use the regular expression instead of a `str_split()` is because the regex will be the basis of another regex. The \* outside the parens means you want to repeat the capturing group. (This...
[ -0.15359100699424744, -0.3121565878391266, 0.08673261106014252, -0.0767565593123436, 0.10850446671247482, 0.17791421711444855, 0.09969087690114975, -0.17544780671596527, -0.16240651905536652, -0.4890575110912323, -0.2098761796951294, 0.593146562576294, -0.6408088803291321, -0.1593693494796...
Scenario: --------- * I load some data into a local MySQL database each day, about 2 million rows; * I have to (*have* to - it's an audit/regulatory thing) move to a "properly" administered server, which currently looks to be Oracle 10g; * The server is in a different country: a network round-trip current takes 60-70 ...
[ 0.11909327656030655, 0.018844781443476677, 0.20460152626037598, -0.016559729352593422, -0.04804818704724312, 0.2326604723930359, 0.3268916606903076, -0.04388335719704628, -0.18005920946598053, -0.7935363054275513, -0.0636734887957573, 0.2089986503124237, -0.2632249593734741, -0.14360974729...
that the MySQL style multiple values clause idea will work. It doesn't. **EDIT**: Extremely useful answers already - thank-you! More about that pesky input file. The number of fields is variable and positions have changed a few times - my current script determines content by analysing the header row (well, fastercsv a...
[ 0.16956862807273865, 0.4591253399848938, 0.2517588138580322, 0.32845643162727356, -0.13400399684906006, -0.08368778973817825, 0.37450018525123596, 0.25882062315940857, -0.0121688861399889, -0.35321319103240967, -0.006006794981658459, 0.4227496087551117, -0.0856727585196495, 0.0631569996476...
text-process afterwards - ugh). The problem: ------------ Loading 2 million rows at about 7/sec is going to take rather more than 24 hours! That's likely to be a drawback with a daily process, not to mention that the users would rather like to be able to access the data about 5 hours after it becomes available in CSV...
[ -0.12046030908823013, 0.05692313238978386, 0.5730108618736267, -0.0397595539689064, 0.00751508679240942, 0.06019609048962593, 0.3594910204410553, 0.14002084732055664, -0.38148367404937744, -0.7372044324874878, -0.3601585924625397, 0.654192328453064, -0.09428288787603378, -0.017019407823681...
INTO tablea (id,b,c) VALUES (tablea_seq.nextval,3,4) INTO tablea (id,b,c) VALUES (tablea_seq.nextval,5,6) SELECT 1 FROM dual; ``` (did I say it was ungainly?) tries to use the same id for all three rows. Oracle docus appear to confirm this. Latest attempt is to send multiple INSERTs in one execution, e.g.: ``` ...
[ -0.1600012332201004, 0.05588921904563904, 0.11888104677200317, -0.1060796007514, 0.04926105961203575, 0.26646289229393005, 0.30418503284454346, -0.13791680335998535, -0.15640945732593536, -0.3478600084781647, -0.11189150810241699, 0.4105202853679657, -0.23398196697235107, 0.020562494173645...
out to be the case!) * If I can't send multiple inserts, what else could I try? Why Accept That One? -------------------- For whatever reason, I prefer to keep my code as free from platform-specific constructs as possible: one reason this problem arose is that I'm migrating from MySQL to Oracle; it's possible another...
[ 0.18565329909324646, 0.09244324266910553, 0.35574468970298767, -0.0342167392373085, -0.07906274497509003, 0.11973298341035843, 0.2334786206483841, -0.044331956654787064, -0.2370884269475937, -0.5088202953338623, 0.14726488292217255, 0.5280765891075134, -0.15424399077892303, 0.2394026666879...
the change will be limited to changing the adapter in code: a one-liner, in all probability. You could use: ``` insert into tablea (id,b,c) ( select tablea_seq.nextval,1,2 from dual union all select tablea_seq.nextval,3,4 from dual union all select tablea_seq.nextval,3,4 from dual union all select tablea_seq...
[ -0.21609750390052795, -0.01090579479932785, 0.7394845485687256, -0.19941717386245728, 0.264577716588974, 0.27237510681152344, 0.2423003762960434, -0.28436967730522156, -0.039221156388521194, -0.7941977977752686, -0.2813316881656647, 0.567162275314331, -0.2185625284910202, 0.054817017167806...
I've just updated to .NET 3.5 SP1 and my once working ASP.NET MVC page has now stopped working. When trying to load a page I get the following YSOD ``` [CryptographicException: Padding is invalid and cannot be removed.] System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inp...
[ -0.21811498701572418, 0.06336548179388046, 0.7163950800895691, -0.1752256453037262, -0.05198027938604355, 0.031814441084861755, 0.6752269268035889, -0.43711450695991516, -0.5572348237037659, -0.9244752526283264, -0.1431332528591156, 0.5539829134941101, -0.17623132467269897, 0.2252671718597...
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729) ViewState: hC6BC8KsuD/yoy2iG74bUZ8TYhGfuDDeIjh9fg/L18yr/E+1Nk/pjS5gyn9O+2jY Referer: http://localhost:1092/admin/product Path: /admin.aspx/product/edit/4193] [HttpException (0x8000400...
[ -0.5938998460769653, 0.07569276541471481, 0.7737966775894165, -0.06612391769886017, -0.05769449472427368, 0.21188043057918549, 0.7030450105667114, -0.3581484258174896, -0.08636737614870071, -0.7535727024078369, -0.39410141110420227, 0.6036202311515808, -0.5141938328742981, 0.22395046055316...
+73 ``` If I remove the line ``` <%= Html.AntiForgeryToken() %> ``` Everything works again, any ideas what might be causing this? I would have expected more luck in finding a solution if this was an MVC or .NET issue so I'm guess it is something to do with my configuration. I've tried reinstalling the MVC framewo...
[ 0.33448317646980286, 0.5313779711723328, 0.6443048715591431, -0.41620519757270813, -0.15171393752098083, -0.2785327732563019, 0.7416049838066101, -0.036725353449583054, -0.32743754982948303, -0.7176203727722168, -0.013012680225074291, 0.6656704545021057, -0.4720621705055237, 0.173575401306...
Does Ruby have block comments? If not, is there an efficient way of inserting `#` in front of a block of highlighted code in TextMate? You can do ``` =begin [Multi line comment] =end ``` `=begin` and `=end` must be at the beginning of the line (not indented at all). [Source](http://www.ruby-doc.org/docs/ruby-doc...
[ 0.162884920835495, -0.07182475179433823, 0.11768914014101028, -0.05671684816479683, -0.4585353136062622, -0.0859532430768013, 0.5847000479698181, -0.44948139786720276, -0.1492544263601303, -0.4616800844669342, -0.24903492629528046, 0.3421696126461029, -0.6556468605995178, -0.17558795213699...
Is there a way to attach an image to an html formatted email message created in PHP? We need to ensure that a corporate logo is on emails sent to clients who may not have access to the internet whilst reading their email (They will obviously have it to download the files). Try the PEAR [Mail\_Mime](http://pear.php.net...
[ 0.5935269594192505, 0.09969110786914825, 0.3789917826652527, 0.15510371327400208, -0.06097482889890671, -0.09113160520792007, 0.15066145360469818, 0.012789946980774403, -0.19091229140758514, -0.6415404677391052, -0.013452286832034588, 0.5197463035583496, -0.17337666451931, -0.2468783706426...
'From' => 'foo@bar.org', 'Subject' => 'Mail_mime test message' ); $mime = new Mail_mime($crlf); //attach our image with a unique content id $cid="mycidstring"; $mime->addHTMLImage("/path/to/myimage.gif", "image/gif", "", true, $cid); //now we can use the content id in our message $html = '<html><...
[ 0.6306641101837158, -0.08095064014196396, 0.9168192744255066, 0.056180424988269806, -0.04738061875104904, -0.012214469723403454, 0.06279225647449493, -0.33410921692848206, 0.11565431952476501, -0.6805539727210999, -0.45658424496650696, 0.3685583174228668, 0.027160366997122765, 0.1965729147...
``` Warning: include(/2008/2009/assets/inc/base/error.inc.php) [function.include]: failed to open stream: No such file or directory in C:\Program Files\Apache Group\Apache2\htdocs\2008\2009\assets\inc\base\header.inc.php on line 82 ``` I am receiving the above error when including a file on a WAMP setup. Is it possib...
[ 0.12912875413894653, 0.4631005823612213, 0.1391526460647583, -0.4267512857913971, 0.03633911907672882, -0.12179823964834213, 0.778352677822113, -0.04729761183261871, -0.35788434743881226, -0.5944892764091492, -0.03987813740968704, 0.40760454535484314, -0.34950435161590576, 0.30001744627952...
not being found. Any help would be greatly appreciated. PS php.ini has include path defined as: ``` include_path = C:\Program Files\Apache Group\Apache2\htdocs" ``` **Update** I was using URL rewriting to change item/x to item-display.php?id=x, this change in folders is what ROOT was built off of. This made anyth...
[ -0.16282759606838226, -0.22317306697368622, 0.5794087648391724, -0.04017092287540436, -0.19632749259471893, 0.010725556872785091, 0.483978271484375, -0.11266180872917175, -0.2642242908477783, -0.9236027598381042, 0.07635702937841415, 0.2286323755979538, -0.3115839660167694, -0.073103912174...
I have a window, with an iframe in it. When i clicking a button, then the iframe will load (loaded from a web site). Is it possible to retrieve the content of that iframe? How can I retrieve the content of that page? I can view the source code by left clicking iframes View Source. I need to store the source in a DB. ...
[ 0.3054494261741638, 0.31991446018218994, 0.2982577681541443, -0.27921953797340393, -0.10846011340618134, -0.1438492089509964, 0.4531378149986267, -0.27542996406555176, 0.07029173523187637, -1.0068354606628418, 0.0005115600652061403, 0.3658744692802429, -0.3018026351928711, 0.28751108050346...
will get strange exceptions. Disclaimer: I have not tested this. Here's the google query I used: [google query](http://www.google.com/search?q=iframe+get+content)
[ 0.40047991275787354, 0.2335769683122635, 0.7539804577827454, 0.330993115901947, 0.0469818040728569, -0.36698397994041443, 0.26091665029525757, -0.09510784596204758, -0.1872757077217102, -0.42979007959365845, -0.3676946759223938, 0.29460111260414124, -0.03812536597251892, 0.232622429728508,...
I'd like to create a generic type hierarchy for representing graphs. In particular, I'd like like to have classes Graph and Node, and I want that for every Graph type, there is a corresponding Node type and if I create a generic function for manipulating Graphs, I want this function to use the actual Node type. An exam...
[ -0.008961206302046776, -0.342753529548645, 0.17457526922225952, 0.13299407064914703, -0.31254464387893677, -0.012713278643786907, 0.11497925221920013, -0.1549288034439087, -0.18568235635757446, -0.9054804444313049, 0.36690959334373474, 0.4132418632507324, -0.6823670268058777, 0.13932314515...
extends Graph { class Node extends GNode[ConcreteGraph] { ... } } ``` the dfs function would not accept a function of type `ConcreteGraph#Node=>Unit` as `nodeAction`, but only `AnyRef=>Unit` or `GNode[ConcreteGraph]=>Unit`. To be clearer, If I did it in C++, I'd do something like ``` template <class T> struct gra...
[ -0.1091163158416748, -0.20893830060958862, 0.6008045673370361, -0.2197386622428894, -0.052433233708143234, -0.1405327022075653, 0.2680862843990326, -0.43257462978363037, -0.18644461035728455, -0.6150466203689575, -0.12187037616968155, 0.24268169701099396, -0.41871142387390137, -0.251527756...
- i.e. GNode's type parameter needs to be covariant, and ConcreteGraph needs to be written with both a distinct node class and a type bound for Node. Once done, the first way to write dfs is to make it a method (it can be final if you want to avoid virtual dispatch overhead). ``` trait GNode[+Graph] { //... function...
[ -0.09819871187210083, -0.39024296402931213, 0.399308443069458, -0.2435770481824875, -0.2966790199279785, 0.03325160592794418, -0.05611187592148781, -0.414507657289505, -0.03685682266950607, -0.8511423468589783, 0.1095748245716095, 0.4371616840362549, -0.6764768362045288, 0.0028312234207987...
with dfs not a method, seems to require just a bit of extra type hinting to use it. ``` def dfs[G <: Graph](graph : G, nodeAction : G#Node => Unit) = print("dfsing!") dfs[ConcreteGraph](new ConcreteGraph, {node => println("foo")}) ``` The third way is with a curried dfs. Because of the way Scala's type inference wo...
[ -0.04245848208665848, -0.6563045382499695, 0.7053989768028259, -0.19323782622814178, -0.36701327562332153, 0.02487870119512081, 0.30403923988342285, -0.5029765367507935, -0.36603081226348877, -0.8721704483032227, 0.03221146762371063, 0.33850666880607605, -0.7450010776519775, 0.046058308333...
I have a big problem. My boss said to me that he wants two "magic black box": 1- something that receives a micropocessor like input and return, like output, the MIPS and/or MFLOPS. 2- something that receives a c code like input and return, like output, something that can characterize the code in term of performance (so...
[ 0.35325098037719727, 0.13370530307292938, 0.1775563359260559, 0.08478754013776779, 0.01962246373295784, 0.07366041094064713, -0.20441332459449768, -0.1057693138718605, -0.44321370124816895, -0.5346503853797913, -0.07722128927707672, 0.7026848196983337, -0.46768513321876526, 0.1966079175472...
hope) But the second...the second black box is my nightmare...the only thingh that i find is to use profiling tool but I ask a particular profiling tool. Is there somebody that know a profiling tool that can have, like input, simple c code and gives me, like output, the performance characteristics of my c code (or the...
[ 0.37644609808921814, 0.2569954991340637, 0.07142223417758942, 0.23132383823394775, -0.12904910743236542, 0.19591663777828217, -0.02575102262198925, -0.1518654078245163, -0.20383331179618835, -0.7872138023376465, 0.10429009795188904, 0.511134922504425, -0.13578052818775177, 0.15463070571422...
our code needed Thanks to everyone A very good example of an extensible graph structure is at <http://www.scala-lang.org/node/124> I have thee ways to write yours. Note that in all cases there were some type changes required - i.e. GNode's type parameter needs to be covariant, and ConcreteGraph needs to be written wi...
[ 0.21519456803798676, -0.19953490793704987, 0.4489346444606781, 0.07601708918809891, -0.07079698145389557, -0.1575910449028015, 0.2808333933353424, -0.266361266374588, -0.036647722125053406, -1.115794062614441, 0.1700434386730194, 0.3809460401535034, -0.3366328179836273, -0.0715638473629951...
Node <: GNode[Graph] def dfs(nodeAction : Node => Unit) = print("dfsing!") } class ConcreteGraph extends Graph { class CGNode extends GNode[ConcreteGraph] type Node <: CGNode } new ConcreteGraph dfs {node => println("foo")} ``` The second, with dfs not a method, seems to require just a bit of extra type hint...
[ -0.058721430599689484, -0.5492891073226929, 0.6254132986068726, -0.20933546125888824, -0.34782618284225464, 0.05784636735916138, 0.299003928899765, -0.40599027276039124, -0.2555048167705536, -0.9050865173339844, 0.019279392436146736, 0.4748247265815735, -0.6689608097076416, 0.0763765946030...
=> println("foo")} ```
[ 0.1540897786617279, 0.37976574897766113, 0.11725032329559326, -0.6526681780815125, 0.045055996626615524, -0.11538814008235931, 0.31619274616241455, -0.02468935213983059, 0.14319543540477753, -0.06275339424610138, -0.36209943890571594, 0.8866722583770752, -0.39178821444511414, -0.0647275224...
Here is my code snippet: ``` SPSecurity.RunWithElevatedPrivileges(delegate() { SPSolution newSolution = SPFarm.Local.Solutions.Add(@fullPath); }); ``` The stacktrace and innerexception give no further clues. The Exception.Source says **Microsoft.SharePoint**. SPFarm.Local.CurrentUser...
[ -0.023111416026949883, -0.022151416167616844, 0.778820276260376, -0.03860766813158989, 0.10538424551486969, -0.08581268042325974, 0.5971823334693909, -0.38336506485939026, -0.5542674660682678, -0.7426614761352539, -0.03513778746128082, 0.2236981838941574, -0.2551199793815613, 0.31409153342...