text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
that use that membership provider as well. It's a very simple app, so you should be able to read the source easily. <http://www.datakido.com/downloads/Token/ViewInfo/ItemId/3> You should be able to adapt the source to work with WPF.
[ 0.5271679162979126, -0.2373104989528656, 0.184053435921669, 0.3093673586845398, -0.08146803826093674, -0.32023030519485474, -0.05065928027033806, -0.06452628970146179, -0.2159867137670517, -0.543830931186676, -0.025805503129959106, 0.4007216989994049, 0.11695748567581177, -0.03742558509111...
I am developing a rich client application that will use the Entity Framework (with DevArt's DotConnect for Oracle) to connect to a central Oracle database. However, I have found that this scenario requires every client machine to have the Oracle client installed in order to connect to the Oracle 10g server. Is there an...
[ 0.33015599846839905, 0.02419799566268921, 0.4640355706214905, 0.05139215663075447, -0.11737889796495438, 0.03583424538373947, 0.12044594436883926, -0.042481958866119385, -0.06268253177404404, -0.6502494215965271, -0.061983682215213776, 0.6505073308944702, -0.5192019939422607, -0.0779882818...
Client software to be installed. This should solve my issue of connecting to Oracle using the Entity Framework. I also plan to connect to Oracle using a DbConnection, for which I can also use DevArt's Oracle provider. My issue now is that I cannot get the Direct mode to work. odp.net requires the installation of the Or...
[ 0.22160518169403076, -0.08105642348527908, 0.5747891664505005, 0.07481210678815842, -0.12827572226524353, 0.09120529145002365, 0.12395530194044113, 0.10990861803293228, -0.17267554998397827, -0.737720787525177, -0.11856527626514435, 0.7416014075279236, -0.28359055519104004, 0.0145487822592...
TCP/IP. Applications written with > dotConnect for Oracle are easy to > deploy, do not require installation of > Oracle Client Software, and tend to be > faster than those that use other data > connectivity solutions. So why this question?
[ 0.12659280002117157, -0.21998156607151031, 0.2437840700149536, 0.4197874367237091, 0.14367057383060455, -0.24791516363620758, -0.15014752745628357, 0.04390237480401993, -0.12901875376701355, -0.7737716436386108, -0.07634156942367554, 0.2789418697357178, -0.5784690976142883, -0.177845716476...
I would like to store an object **FOO** in a database. Lets say FOO contains three integers and a list of "*Fruits*". The list can have any length, the only thing I know is that the all the fruits allowed are stored in another table. Can I store the fruit list in a column? In a normalized relational database, such a ...
[ 0.20307457447052002, 0.5663079619407654, -0.13962167501449585, 0.022014427930116653, 0.18160788714885712, 0.266387939453125, -0.21587581932544708, 0.10749048739671707, -0.3646758496761322, -0.6889392733573914, 0.3284497857093811, 0.20771434903144836, -0.4976910948753357, 0.3543697595596313...
FOO ( id int primary key not null, int1 int, int2 int, int3 int ) CREATE TABLE Fruits ( id int primary key not null, name varchar(30) ) CREATE TABLE FOOFruits ( FruitID int references Fruits (ID), FooID int references FOO(id), constraint pk_FooFruits primary key (FruitID, FooID) ) ``` To add Ap...
[ -0.32075682282447815, 0.44028228521347046, 0.037211641669273376, -0.27013587951660156, 0.19286130368709564, 0.7971267700195312, -0.10375245660543442, -0.12350115180015564, -0.3328647315502167, -0.48794302344322205, -0.334829181432724, 0.45396578311920166, -0.3343600928783417, -0.1225070059...
I'm trying to wrap my head around functional programming in ruby and there doesn't seem to be much good documentation out there. Essentially, I'm trying to write a combine function that would have a Haskell type signature of: ``` [a] -> [a] -> (a -> a -> a) -> [a] ``` So ``` combine([1,2,3], [2,3,4], plus_func) =...
[ 0.6644869446754456, 0.10713294893503189, -0.0539637953042984, -0.48429393768310547, -0.05764959752559662, 0.042809005826711655, 0.38060957193374634, -0.6585267186164856, -0.05187777802348137, -0.5635083317756653, 0.0357833206653595, 0.5206466913223267, -0.7594268321990967, -0.4625080525875...
combine a, b a.zip(b).map { |i| yield i[0], i[1] } end puts combine([1,2,3], [2,3,4]) { |i, j| i+j } ``` No, I don't find it beautiful either. **edit -** #ruby-lang @ irc.freenode.net suggests this: ``` def combine(a, b, &block) a.zip(b).map(&block) end ``` or this, if you want to forward args: ``` def ...
[ 0.29043248295783997, 0.08536172658205032, 0.08209118992090225, -0.49972525238990784, -0.005324743688106537, 0.11117003113031387, 0.4006420373916626, -0.9200252890586853, -0.09148142486810684, -0.5805531144142151, -0.09321614354848862, 0.03545210137963295, -0.5574711561203003, -0.2140387296...
What is the best way to have a virtual operating system have a static IP address in VMWware. I would like to keep the IP address static since it is a virtual server. Assuming you're not using NAT-based VMWare networking, the answer isn't any different for a virtual (guest) server than for a real one. You can: * Assign...
[ 0.20069292187690735, -0.17793972790241241, 0.28943225741386414, 0.402739942073822, -0.03862384334206581, -0.17532673478126526, 0.05636773630976677, 0.24497045576572418, -0.38894522190093994, -0.5296012163162231, -0.018138252198696136, 0.450307697057724, -0.27602487802505493, 0.386404305696...
I need to concatenate 3 files using C#. A header file, content, and a footer file, but I want to do this as cool as it can be done. Cool = really small code or really fast (non-assembly code). ``` void CopyStream(Stream destination, Stream source) { int count; byte[] buffer = new byte[BUFFER_SIZE]; while( (co...
[ 0.32085156440734863, 0.029737375676631927, 0.7948732972145081, 0.0003501407918520272, 0.24269066751003265, -0.15583975613117218, 0.15273715555667877, -0.13849090039730072, -0.02210870571434498, -0.7269372344017029, -0.037651266902685165, 0.5194393992424011, -0.3884221315383911, 0.068232148...
Our web page is only available internally in our company and we am very intrested in being able to offer interactive .net usercontrols on our departments website in the **.Net 2.0** enviorment. I have been successful with embeding the object as so: ``` <object id="Object1" classid="http:EmbedTest1.dll#EmbedTest1.UserC...
[ 0.32551538944244385, 0.20295920968055725, 0.3670942783355713, 0.24360042810440063, -0.10744456201791763, 0.15558752417564392, 0.18757762014865875, -0.3253583014011383, 0.0795997679233551, -0.6843733787536621, -0.04853558912873268, 0.4792100489139557, 0.09467419236898422, -0.033375989645719...
function UpdateStr() { Object1.Text = "update string"; } </script> ``` Reference: <http://www.15seconds.com/issue/030610.htm> <http://windowsclient.net/articles/iesourcing.aspx> **Questions:** 1. Is this technology outdated? - if so is there a replacement 2. Should I just work with action script i...
[ 0.05243454873561859, -0.07116077840328217, 0.47809529304504395, 0.18722034990787506, -0.06347158551216125, -0.11915979534387589, 0.5646505951881409, -0.0036502389702945948, -0.17853502929210663, -0.6643327474594116, -0.11215145140886307, 0.8251543641090393, -0.30881795287132263, -0.3765486...
much as rarely used, and IE-only. If you want web-like deployment for desktop apps, use ClickOnce. If you want C# code that runs in the browser without security issues, use Silverlight. You could also look at XBAPs, which are sandboxed WPF apps that run in the browser, works on IE and Firefox, but requires the full .NE...
[ 0.5699470639228821, -0.00825832411646843, 0.13141386210918427, 0.06067834421992302, -0.24865825474262238, -0.3997996151447296, 0.1751089096069336, 0.17676787078380585, -0.38735297322273254, -0.7639464735984802, -0.06994134187698364, 0.5986862182617188, -0.36648181080818176, -0.071148820221...
framework right inside the browser. 3. We've used .NET controls in web pages internally and had a wide variety of strange issues, mostly related to scripting or security. Hard to determine the problem without more information. p.s. write all code examples using the <pre> tags. There's a "code sample" button on the too...
[ 0.4956609606742859, 0.2655225098133087, 0.2052661031484604, 0.09673305600881577, -0.3662726581096649, -0.48048490285873413, 0.36315402388572693, -0.3095301389694214, -0.11364736407995224, -0.797191858291626, 0.021482372656464577, 0.34735140204429626, -0.3086649775505066, -0.206933990120887...
I am binding an Image.Source property to the result of the property shown below. ``` public BitmapSource MyImageSource { get { BitmapSource source = null; PngBitmapDecoder decoder; using (var stream = new FileStream(@"C:\Temp\logo.png", FileMode.Open, FileAccess.Read, FileShare.Read))...
[ 0.5066148638725281, 0.016562575474381447, 0.7411953806877136, -0.25295475125312805, 0.02453927882015705, -0.17423196136951447, 0.40460604429244995, -0.7111132740974426, -0.021541805937886238, -0.5423606038093567, -0.280506432056427, 0.3868732154369354, -0.35312607884407043, 0.3349484503269...
null && decoder.Frames.Count > 0) source = decoder.Frames[0]; } return source; } } ``` For some reason this is failing during the rendering of the image (Deep in the PresentationCore assembly). I am certain the image is not corrupt as I can successfully show the same image w/o the...
[ 0.5154392123222351, 0.3061562180519104, 0.7243872284889221, -0.12491992115974426, -0.10511182993650436, -0.20890161395072937, 0.5195900201797485, -0.2676314413547516, 0.07490476220846176, -0.8753681182861328, -0.10078362375497818, 0.7855039834976196, -0.2990633249282837, 0.1219984218478202...
from a base64 string. Anyone know if this is a bug w/ WPF? or am I doing something incorrectly? The problem was the BitmapCacheOption option, changing to BitmapCacheOption.OnLoad works. With BitmapCacheOption.None the BitmapSource isn’t decoded until the image is rendered, but the stream with the png in it is alrea...
[ 0.060892436653375626, -0.12287139147520065, 0.4105154573917389, 0.10407000780105591, -0.06913560628890991, -0.055388033390045166, 0.3695632219314575, 0.018767209723591805, -0.45181822776794434, -0.5933319926261902, -0.3326118588447571, 0.6751369833946228, -0.4045606851577759, 0.02728150412...
Simple question, but I haven't found a good explanation on google. When using Set Statistics IO ON, the logical reads and scan count is provided in the message window of management studio. If I have: tblExample, scan count 5, logical reads 20 What does scan count signify? From Books On Line **Scan count:** Number of...
[ 0.14381492137908936, -0.1040959507226944, 0.663335919380188, 0.23694761097431183, 0.04430956393480301, 0.08493632823228836, 0.21470002830028534, -0.27158984541893005, -0.2670597434043884, -0.9168752431869507, -0.10756590962409973, 0.4997672438621521, 0.04858432710170746, -0.003214972792193...
I have this method: ``` private delegate void watcherReader(StreamReader sr); private void watchProc(StreamReader sr) { while (true) { string line = sr.ReadLine(); while (line != null) { if (stop) { return;
[ 0.5093300342559814, -0.5782749652862549, 0.7306908369064331, -0.24841482937335968, 0.33443090319633484, 0.0546998605132103, 0.3335934281349182, -0.2507193684577942, 0.005176907405257225, -0.3018692433834076, -0.26123493909835815, 0.6096615791320801, -0.391670286655426, 0.38913437724113464,...
} //Console.WriteLine(line); line = stripColors(line); txtOut.Text += line + "\n"; line = sr.ReadLine(); }
[ -0.0691063404083252, -0.37718626856803894, 0.5681324005126953, -0.31369802355766296, 0.37832584977149963, 0.17411905527114868, 0.09331340342760086, -0.1530001312494278, -0.008955875411629677, -0.4651779532432556, -0.39417022466659546, 0.6058602333068848, -0.2396697700023651, 0.058193150907...
} } ``` And it reads the streams from a Process (cmd.exe). When the user closes the cmd.exe window, it causes the CPU usage to jump to 100%. When playing with the debugger I see that it stops on the sr.ReadLine() and never returns. Because this is watching both the StandardErrorStream and the StandardOutputStream...
[ 0.33194151520729065, -0.10528985410928726, 0.42522770166397095, -0.18474169075489044, 0.16715915501117706, -0.2304232120513916, 0.4542105793952942, 0.06948476284742355, 0.14892597496509552, -0.6722685098648071, 0.01224946603178978, 0.6158979535102844, -0.3248341381549835, 0.394470334053039...
a window public ConsoleForm(Process p) { this.p = p; p.Start(); ShowWindow((int)p.MainWindowHandle, 0); //0 means to hide the window. this.inStream = p.StandardInput; this.outStream = p.StandardOutput; this.errorStream = p.StandardError; InitializeCompone...
[ 0.11121337860822678, -0.3387725055217743, 0.8866584897041321, -0.23801329731941223, 0.11309758573770523, 0.06353630870580673, 0.3868027627468109, -0.027231113985180855, -0.03366002067923546, -0.617979109287262, -0.4805139899253845, 0.43030551075935364, -0.4402572810649872, 0.29354560375213...
wr.BeginInvoke(this.outStream, null, null); wr.BeginInvoke(this.errorStream, null, null); } public void start(string[] folders, string serverPath) { this.inStream.WriteLine("chdir C:\\cygwin\\bin"); this.inStream.WriteLine("bash --login -i"); this.inStream.WriteLine(""); } ...
[ -0.048244960606098175, -0.08820061385631561, 0.47840428352355957, -0.1326880007982254, 0.04689484089612961, -0.196590393781662, 0.7488742470741272, -0.2795121967792511, -0.12797115743160248, -0.6412155628204346, -0.4195990562438965, 0.7566371560096741, -0.0036189465317875147, 0.11073324084...
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); const int WM_VSCROLL = 277; const int SB_BOTTOM = 7; private void txtOut_TextChanged(object sender, EventArgs e) { IntPtr ptrWparam = new IntPtr(SB_BOTTOM); IntPtr ptrLparam = new IntPtr(0); ...
[ -0.1972901076078415, -0.5479846000671387, 0.859027624130249, -0.21890683472156525, 0.07432027161121368, 0.33779075741767883, 0.5885987281799316, -0.21451501548290253, -0.07553734630346298, -0.5069260001182556, -0.5226185917854309, 0.6818537712097168, -0.6025596261024475, -0.004427317529916...
ConsoleForm_FormClosed(object sender, FormClosedEventArgs e) { this.stop = true; try { this.p.Kill(); } catch (InvalidOperationException) { return; } } ``` Another interesting this is that it doesn't always hide the cmd window like it's supposed to. It hides...
[ 0.06804334372282028, -0.3212207555770874, 0.49566739797592163, -0.05386967584490776, 0.17196024954319, -0.1993861049413681, 0.4534039795398712, -0.009617135860025883, 0.05350425839424133, -0.5041342377662659, -0.019910866394639015, 0.5236937999725342, -0.16630560159683228, 0.24442248046398...
hide it. This is when the user can close the cmd.exe window and cause the readline to act funny. It also never reads the last line outputted to cmd unless it exits. Any suggestions on how to fix this? Whenever you have a `while(true)` loop in your code you're going to peg your cpu (or at least one core) at 100%, unles...
[ 0.40070390701293945, -0.04358166456222534, 0.1200246661901474, 0.24324199557304382, 0.19114519655704498, -0.1919814944267273, 0.5163338780403137, 0.6402578949928284, -0.2533763647079468, -0.35475897789001465, -0.150784432888031, 0.37845513224601746, -0.11556711047887802, 0.2272531390190124...
In our infrastructure, we have lots of little Java projects built by Maven2. Each project has its own pom.xml that ultimately inherits from our one company "master" parent pom. We've recently started adding small profiles to our parent pom, disabled by default, that, when enabled, execute a single plugin in a conventi...
[ 0.4266827404499054, 0.1356019675731659, -0.062303315848112106, 0.027407331392169, 0.25529080629348755, 0.08401250839233398, -0.010039947926998138, -0.21070973575115204, -0.008386531844735146, -0.7279816269874573, 0.017131811007857323, 0.26082998514175415, 0.024104434996843338, -0.056918241...
the fitnesse tests associated with the project. It contains the fitnesse server host and port and other information that need not be repeated. This is being used to specify builds in our CI server like: ``` mvn test -P clover mvn deploy site-deploy -P fitnesse,sources ``` and so on. So far, this seems to provide a...
[ 0.8684512972831726, 0.008544723503291607, 0.1874205768108368, 0.18305142223834991, 0.13201075792312622, -0.18168112635612488, 0.08814407885074615, -0.40452829003334045, 0.1658683866262436, -0.6925772428512573, 0.11124657094478607, 0.4280738830566406, -0.19302165508270264, -0.14484189450740...
quite convenient. Anyway, that's what I feel about it: I don't really know why, but it seems somewhat odd. Let's consider these two questions: a) what are profiles meant for? b) what are the alternative approaches we should should compare your approach with? Regarding a), I think profiles are meant for different buil...
[ 0.47890231013298035, 0.03603798523545265, 0.1495736539363861, 0.272192120552063, 0.07034449279308319, 0.03754580393433571, -0.023772578686475754, -0.21293489634990692, -0.039911188185214996, -0.8436160683631897, 0.03434595465660095, 0.6451573371887207, -0.0462765209376812, -0.2810204625129...
ideas that come to my head: 1. triggering the plug-ins with command line properties. Such as mvn -Dfitnesse=true deploy. Like the well known -DdownloadSources=true for the eclipse plugin, or -Dmaven.test.skip=true for surefire. But that would require the plugin to have a flag to trigger the execution. Not all the plu...
[ 0.6778016686439514, -0.3616711497306824, 0.108706034719944, 0.06460774689912796, 0.027118807658553123, -0.35092875361442566, 0.18877840042114258, -0.4131682217121124, -0.2477097511291504, -0.4274483323097229, -0.09329907596111298, 0.948146641254425, -0.36098042130470276, -0.333361297845840...
reached, the plugin is executed. Rather than binding plugin executions to lifecycle phases, you should be able to include the plugin, but only execute it when it is called explicitly. So your call would look like "mvn fitnesse:run source:jar deploy". The answer to question a) might explain the "oddness". It is just no...
[ 0.462696373462677, -0.3082042336463928, 0.4789990186691284, -0.010477391071617603, 0.12945298850536346, -0.1910921186208725, 0.2668847441673279, -0.43850913643836975, -0.18026982247829437, -0.7379336357116699, -0.10575830191373825, 0.5410631895065308, -0.2709599733352661, -0.02677557244896...
"test" would denote an environment while "fitnesse" would denote a goal). If you would just call the goals explicitly, I think that would be very clear and flexible. Remembering the plugin/goal names should not be more difficult that remembering the profile names.
[ 0.7063485980033875, -0.2543075382709503, -0.14937910437583923, 0.24192668497562408, 0.03989844396710396, -0.12135252356529236, 0.41510504484176636, -0.3078339099884033, 0.0760011374950409, -0.6120066046714783, 0.05026420205831528, 0.5113171339035034, -0.1041274145245552, -0.207992151379585...
I have an application which may only have one instance of itself open at a time. To enforce this, I use this code: ``` System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcesses(); System.Diagnostics.Process me = System.Diagnostics.Process.GetCurrentProcess(); foreach (System.Diagnostics.Proces...
[ 0.2619773745536804, 0.32225579023361206, 0.6497874855995178, -0.39566412568092346, 0.3790977895259857, -0.005182064138352871, 0.45747601985931396, -0.39125028252601624, -0.16282178461551666, -0.7639727592468262, -0.36830779910087585, 0.6055809855461121, -0.2825010120868683, 0.3336280286312...
I would also like it to be able to focus the form of the already-running copy. That is, before returning, I want to bring the other instance of this application into the foreground. How do I do that? SetForegroundWindow works, to a point: ``` [System.Runtime.InteropServices.DllImport("user32.dll")] public static ext...
[ 0.2168998420238495, 0.006593730766326189, 0.6686314940452576, -0.24971985816955566, 0.258608877658844, -0.028354478999972343, 0.17290189862251282, -0.13602125644683838, -0.12741082906723022, -0.9777050018310547, -0.30135947465896606, 0.6433478593826294, -0.4115679860115051, 0.1569395810365...
static extern void SwitchToThisWindow(IntPtr hWnd, bool fAltTab); [STAThread] static void Main() { System.Diagnostics.Process me = System.Diagnostics.Process.GetCurrentProcess(); System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcessesByName(me.ProcessName); foreach (System.Diagno...
[ 0.17282454669475555, -0.25084322690963745, 0.6862227320671082, -0.1755017191171646, 0.40903767943382263, 0.32128557562828064, 0.33665865659713745, -0.04084232449531555, -0.02520894631743431, -0.559873640537262, -0.4115537703037262, 0.4835462272167206, -0.016770439222455025, 0.3470525741577...
application ;-) } ``` I had the same problem and [SwitchToThisWindow()](http://msdn.microsoft.com/en-us/library/ms633553.aspx) worked the best for me. The only limitation is that you must have XP sp1 installed. I played with SetForegroundWindow, ShowWindow, and they both had problems pulling the window into view.
[ 0.0974697545170784, -0.001863525016233325, 0.6636943221092224, -0.10679452866315842, -0.1057964488863945, -0.43031129240989685, 0.21246443688869476, -0.07753080874681473, -0.13719388842582703, -0.7666544318199158, -0.10667195916175842, 0.9822092652320862, -0.29564911127090454, -0.007752340...
I've seen a couple of Python IDE's (e.g. PyDev Extensions, WingIDE) that provide a debug console - an interactive terminal that runs in the context of the method where the breakpoint is. This lets you print members, call other methods and see the results, and redefine methods to try to fix bugs. Cool. Can anyone tell ...
[ 0.2835022211074829, 0.23501943051815033, -0.18820342421531677, 0.11326271295547485, -0.2833276391029358, -0.3246171772480011, 0.2344626784324646, 0.10352075099945068, -0.3400133550167084, -0.33649465441703796, 0.21051643788814545, 0.372824490070343, -0.16993428766727448, 0.0124095566570758...
to admit it's actually in the documentation for InteractiveConsole after all. You can make it run in the local context by passing in the result of the locals() function to the InteractiveConsole constructor. I couldn't find a way to close the InteractiveConsole without killing the application, so I've extended it to ju...
[ 0.15942472219467163, 0.3927464485168457, 0.16266228258609772, -0.09021135419607162, -0.0713389441370964, -0.42421483993530273, 0.4366091787815094, -0.01699724979698658, 0.13607603311538696, -0.5577232241630554, -0.055957358330488205, 0.8612072467803955, -0.2707805931568146, 0.1850860267877...
self.interact("Debug console starting...") except: print("Debug console closing...") def print_names(): print(adam) print(bob) adam = "I am Adam" bob = "I am Bob" print_names() console = EmbeddedConsole(locals()) console.start() print_names() ```
[ 0.031706951558589935, 0.36530646681785583, 0.24460124969482422, -0.3422611355781555, -0.007772738113999367, 0.11324138194322586, 0.6306272149085999, -0.15698368847370148, 0.0725848451256752, -0.7613994479179382, -0.1516367644071579, 0.8305332660675049, -0.33911436796188354, 0.0680143982172...
I have a `date` and `time` column in my mysql table called `start_date` and `start_time` respectively. I want my users the ability to set reminders for themselves to be sent X hours before `start_time`, min. 1 hour and max 24 hours. I'll be running a CRON script to send these reminders. Right now I do: ``` SELECT * F...
[ 0.4433945119380951, 0.12179972231388092, 0.7936071157455444, 0.06836719810962677, 0.20746593177318573, 0.035087551921606064, 0.12087112665176392, 0.1523725837469101, -0.3765099048614502, -0.8059070110321045, -0.0051401639357209206, 0.5442917346954346, 0.05317901074886322, 0.291670590639114...
is. Any suggestions at all? Something like this: ```sql SELECT col1, col2, col3 FROM records WHERE (records.startDate BETWEEN NOW() AND ADDDATE(NOW(), INTERVAL 9 HOUR)) AND (records.status = '0'); ```
[ -0.0366835854947567, 0.09442000091075897, 0.3890400826931, -0.008598427288234234, 0.36830875277519226, -0.04528573900461197, -0.11492382735013962, 0.12541086971759796, -0.09311868250370026, -0.48452630639076233, -0.27159833908081055, 0.17382775247097015, -0.2662069797515869, 0.175736829638...
I am currently trying out this code: ``` NSString *path = [[NSBundle mainBundle] pathForResource:@"dream" ofType:@"m4a"]; AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; theAudio.delegate = self; [theAudio play]; ``` However, the SDK says that the ...
[ 0.06581231951713562, -0.20849783718585968, 0.5984523892402649, 0.0008211343083530664, 0.11798589676618576, -0.35251402854919434, 0.24694226682186127, -0.3201771080493927, -0.1208241805434227, -0.9883657097816467, 0.01228555291891098, 0.6454935669898987, -0.17240825295448303, 0.127170398831...
I'm trying to create a Regex to block all `<` and `>` in a String except when used with `<select>.` Can anyone suggest a Regex for that? I'll be using it with `javax.util.Pattern`. I'm trying to write a solution to block the injection attack and XSS attempts through request and URL. For that, I'll be blocking the spec...
[ 0.38528040051460266, 0.01951834000647068, 0.19207963347434998, -0.11584292352199554, -0.07459212839603424, 0.11783190071582794, 0.1646093875169754, -0.13384976983070374, -0.03818289190530777, -0.6308990120887756, -0.09455987811088562, 0.33591675758361816, -0.5357365608215332, 0.07817534357...
of angle brackets have to be blocked. And that is the reason of my question. ``` Pattern p = Pattern.compile( "(?<!\\<select)>|<(?!\s*select\s*>)", Pattern.CASE_INSENSITIVE); ``` This will find > not preceded by <select and < not followed by select> allowing it to be case-insensitive. Now normally I'd check for ...
[ 0.37178194522857666, 0.14396075904369354, 0.2318325638771057, -0.20872214436531067, -0.00031023702467791736, -0.11829259246587753, 0.16724130511283875, -0.6331515312194824, 0.04658752307295799, -0.4436270296573639, 0.022331368178129196, 0.46278056502342224, -0.5139718055725098, 0.097701951...
Can anyone direct me to a smallish C# application that would be symbolic of the "right way" to design a program? I'm looking for a relatively simple (potentially trivial) program from which to analyze and learn. The application should have a relatively trivial problem to solve and should solve it in a rather straight-...
[ 0.3471793532371521, 0.13028866052627563, -0.18290723860263824, 0.43564578890800476, -0.19433283805847168, -0.07791013270616531, -0.12225991487503052, 0.16602745652198792, -0.05825304985046387, -0.6170061826705933, 0.03848124295473099, 0.6552257537841797, 0.08009351044893265, 0.012568555772...
a project fits together. Thanks for any sources you can provide! There are plenty of projects on this site: <http://www.codeplex.com/>
[ 0.9972545504570007, -0.017228135839104652, -0.23791705071926117, 0.23912636935710907, 0.1300859898328781, -0.173383429646492, 0.40317994356155396, -0.12794199585914612, -0.3984711468219757, -0.7019680738449097, 0.04845041036605835, 0.10505055636167526, -0.052615758031606674, -0.06906682252...
My question is pretty vague :o) - But here is an example : When I was writing C code, I was able to log counter's value when something failed : ``` <...> for ( int i = 0 ; i < n ; i++ ) if ( SUCCESS != myCall()) Log( "Failure, i = %d", i ); <...> ``` Now, using exceptions, I get this : ``` ...
[ 0.2634350061416626, 0.04534349963068962, 0.18986648321151733, -0.2692744731903076, 0.12170186638832092, 0.06830832362174988, 0.40928614139556885, -0.36992353200912476, -0.19370661675930023, -0.1910114884376526, -0.030112259089946747, 0.5057286024093628, -0.20462091267108917, 0.181492239236...
i = 0 ; i < n ; i++ ) myCall(); <...> } catch ( Exception exception ) { Log( "Failure ! Maybe in myCall() ? Don't know. i's value ? No clue." ); } ``` Of course, one may declare "i" outside of the try/catch statement (and this is what I'm doing). But I don't like it - I like declare v...
[ 0.06563811749219894, 0.052897341549396515, 0.15660899877548218, -0.3199283182621002, 0.08667711913585663, -0.27026239037513733, 0.4466843605041504, 0.05130859464406967, -0.14781083166599274, -0.18330726027488708, -0.32480546832084656, 0.37154775857925415, -0.16258779168128967, 0.2576317191...
you have any elegant solution ? Thank in advance ! Sylvain. ADDED : myCall() is an obscure API call - I have no clue what it can throw. Also, I can of course add a Try/Catch block around each call, but I would then be better to use return codes ? Would I then add a lot of noise around important lines of code ?. how a...
[ -0.04240049049258232, -0.07647614926099777, 0.16909797489643097, 0.09077823907136917, 0.13949455320835114, 0.002161122392863035, 0.32361751794815063, -0.3610585927963257, -0.2019440084695816, -0.4679918885231018, 0.008005251176655293, 0.38627925515174866, -0.4474191963672638, -0.1363965868...
How do I clear the value from a cell and make it NULL? If you've opened a table and you want to clear an existing value to NULL, click on the value, and press ``Ctrl``+``0``.
[ 0.1245717704296112, 0.22571563720703125, 0.23267939686775208, -0.1395687609910965, 0.18506526947021484, -0.294689804315567, 0.0760805755853653, -0.17719842493534088, -0.09912252426147461, -0.3312006890773773, -0.10389997065067291, 0.23060019314289093, -0.29836946725845337, 0.40299355983734...
What are the most common reasons that I would be getting this error from running a Perl script: ``` Memory fault(coredump) ``` I am running two SQL commands beforehand that only store ~1500 rows each with 6 fields. The SQL works fine out of the script, so I don't think I'm getting the error from that. And half of my...
[ 0.3164662718772888, 0.5185430645942688, 0.14025254547595978, -0.06709328293800354, -0.039907969534397125, 0.11093021929264069, 0.5445266366004944, -0.13546578586101532, -0.2816125154495239, -0.5478283762931824, 0.21360141038894653, 0.6052822470664978, -0.2875327169895172, 0.193142533302307...
{ while ($i != $colnamelen) { if ($i == 1) { $rowfetch = $DBS->{Row}->GetCharValue($colname[$i]); $rowfetch =~ s/(?=..$)/:/;
[ -0.26712143421173096, -0.09772547334432602, 0.7663081288337708, -0.3878595232963562, 0.15187719464302063, 0.4140443205833435, 0.3844629228115082, -0.2765005826950073, 0.09063881635665894, -0.6792753338813782, -0.3361462950706482, 0.4340421259403229, -0.2986049950122833, 0.42167946696281433...
printline($rowfetch); $i++; } if ($i == 2) { $rowfetch = $DBS->{Row}->GetCharValue($colname[$i]); $rowfetch =~ s/(?=..$)/:/;
[ -0.22849580645561218, -0.026837211102247238, 0.8593479990959167, -0.5043787360191345, 0.07495320588350296, 0.43617185950279236, 0.3674734830856323, -0.3904882073402405, 0.20049308240413666, -0.7019402980804443, -0.29697325825691223, 0.43043848872184753, -0.4929657280445099, 0.3412246108055...
printline($rowfetch); $i++; } if ($i == 10) { $rowfetch = $DBS->{Row}->GetCharValue("meetdays");
[ -0.02027563564479351, -0.12382041662931442, 0.8556086421012878, -0.39391443133354187, 0.21705587208271027, 0.2870614528656006, 0.5130388736724854, -0.2109220027923584, 0.3585677742958069, -0.6739116907119751, -0.26667770743370056, 0.55577552318573, -0.5251116156578064, 0.31634607911109924,...
$rowfetch =~ s/-//gi; printline($rowfetch); $i++; } if ($i == 12) {
[ -0.11538540571928024, -0.06970828026533127, 0.6264358162879944, -0.3957543671131134, 0.10633543878793716, 0.40534257888793945, 0.26376113295555115, -0.49311167001724243, 0.13331864774227142, -0.8198006749153137, -0.17640165984630585, 0.6946161389350891, -0.2916639447212219, 0.1037467792630...
$rowfetch = $DBS->{Row}->GetCharValue("fullname"); my ($lname, $fname) = split /,\s*/, $rowfetch; $rowfetch = $fname; printline($rowfetch); $rowfetch = $lname; printline($rowfetch);
[ -0.1469345986843109, -0.06166251376271248, 0.6412007808685303, -0.6416011452674866, 0.24567823112010956, 0.5632196068763733, 0.1010839194059372, -0.16328324377536774, 0.22267381846904755, -0.7491441369056702, -0.371339350938797, 0.46373316645622253, -0.416488915681839, 0.39522796869277954,...
$i=$i+2; } else { $rowfetch = $DBS->{Row}->GetCharValue($colname[$i]); printline($rowfetch); $i++;
[ -0.23597152531147003, 0.0030398229137063026, 0.5056632161140442, -0.5095846056938171, 0.050243571400642395, 0.3577039837837219, 0.41231611371040344, -0.39239105582237244, 0.2838539183139801, -0.6590180397033691, -0.29131975769996643, 0.4485330581665039, -0.6232075691223145, 0.3663603961467...
} } $i=0; printf $fh "\n"; } ``` Heres the code that doesnt work - All that was done was optimizing the sql fetch command ``` my $i; $i = 0; while ($DBS->SQLFetch() == *PLibdata::RET_OK) { while ($i != $colnamelen) {
[ -0.27109766006469727, -0.007204906083643436, 0.5602118372917175, -0.24689166247844696, 0.2828969359397888, -0.03702984005212784, 0.328224241733551, -0.07530395686626434, -0.033427633345127106, -0.27615272998809814, -0.1781489998102188, 0.6587191820144653, -0.3634551763534546, 0.03270322829...
$rowfetch = $DBS->{Row}->GetCharValue($colname[$i]); if ($i == 1) { $rowfetch =~ s/(?=..$)/:/; printline($rowfetch); $i++;
[ -0.36922624707221985, 0.016079017892479897, 0.8672732710838318, -0.4783191978931427, 0.10364246368408203, 0.5274909138679504, 0.33185040950775146, -0.4281194508075714, 0.24965116381645203, -0.7755278944969177, -0.29998478293418884, 0.49155348539352417, -0.497816264629364, 0.418008685111999...
} if ($i == 2) { $rowfetch =~ s/(?=..$)/:/; printline($rowfetch); $i++;
[ -0.4348602890968323, -0.07362545281648636, 0.817252516746521, -0.5722560286521912, 0.40831947326660156, 0.37054726481437683, 0.2685485780239105, -0.3614504635334015, 0.2288942039012909, -0.7758126854896545, -0.38644659519195557, 0.6192010045051575, -0.3290538787841797, 0.21839450299739838,...
} if ($i == 10) { $rowfetch =~ s/-//gi; printline($rowfetch); $i++; }
[ -0.2559935748577118, -0.1493791788816452, 0.6005828380584717, -0.4097316563129425, 0.17941735684871674, 0.44362393021583557, 0.1962442845106125, -0.3050454556941986, 0.20465371012687683, -0.9510154128074646, -0.28688299655914307, 0.663360595703125, -0.29318156838417053, 0.08758662641048431...
if ($i == 12) { my ($lname, $fname) = split /,\s*/, $rowfetch; $rowfetch = $fname; printline($rowfetch); $rowfetch = $lname;
[ 0.024986470118165016, -0.1619623452425003, 0.4922841191291809, -0.6508243083953857, 0.49548912048339844, 0.40377092361450195, -0.08229012787342072, -0.19467519223690033, 0.18246245384216309, -0.7028231620788574, -0.3375731408596039, 0.5467776656150818, -0.3409717082977295, 0.21115541458129...
printline($rowfetch); $i=$i+2; } else { printline($rowfetch); $i++;
[ -0.30054590106010437, 0.03321332111954689, 0.7870646119117737, -0.5031989216804504, 0.18811190128326416, 0.36127153038978577, 0.19424401223659515, -0.2943716049194336, 0.07619845122098923, -0.6207888722419739, -0.29007309675216675, 0.4851500391960144, -0.6496036648750305, 0.207682147622108...
} } $i=0; printf $fh "\n"; } ``` Oh and by the way, there is a functioning SQL statement before this while loop goes into action.. I just didnt want to waste space. Before the code change, you called GetCharValue after checking if $i was as value you wanted. After the change, you call i...
[ 0.39611703157424927, 0.04467608034610748, 0.3795970380306244, -0.09507635980844498, 0.11637424677610397, -0.17577332258224487, 0.47510114312171936, -0.0021206852979958057, -0.1303362101316452, -0.4394563138484955, -0.02895462140440941, 0.7869957089424133, -0.32966968417167664, 0.1403115391...
the issue?
[ 0.1074749156832695, 0.07188805937767029, 0.059965696185827255, 0.10477245599031448, -0.11835398524999619, 0.06910931318998337, -0.05420168116688728, -0.07577833533287048, -0.04599041864275932, -0.011661280877888203, 0.0908144935965538, 0.2250455617904663, -0.046448610723018646, 0.089524962...
We have an application that among other things, checks the existence of a cookie and reads and decrypts the contents of the cookie. Though the data stored inside the cookie is not sensitive, it has been encrypted via TripleDes encryption. A question was raised today whether the cookie saved on a single PC, could be cop...
[ 0.4585486948490143, 0.15269207954406738, 0.02109207771718502, 0.3815886080265045, 0.29330888390541077, -0.3152719736099243, 0.24146172404289246, -0.09039196372032166, -0.2711303234100342, -0.4979313015937805, -0.14872317016124725, 0.5081401467323303, 0.026232825592160225, -0.00038404521183...
HttpResponse), does the index.dat file prevent the transplant of a cookie from one machine to the other? What if the index.dat file was also transported and copied over, or is there some internal structure inside index.dat that ties a cookie to a specific machine? Absolutely. This is one way that [cross-site scripting ...
[ 0.6602175831794739, -0.07742961496114731, 0.03968681022524834, 0.21785509586334229, -0.09597013890743256, -0.27304673194885254, 0.4262808561325073, -0.28839194774627686, -0.11253159493207932, -0.8527728915214539, 0.09409461170434952, 0.23650281131267548, -0.5590680241584778, 0.029749406501...
I am teaching my friend how to make websites. I would like to keep the websites static, so that he does not [yet] have to learn PHP, worry about testing on his Windows machine, worry about the server configuration, security etc. The bad thing is that without some tool support he would have to repeat a lot of code, for ...
[ 0.5710264444351196, 0.32146862149238586, 0.07822668552398682, 0.33223962783813477, -0.09579966962337494, -0.4211307466030121, 0.24549098312854767, 0.4867938458919525, -0.33201172947883606, -0.6517896056175232, 0.2516717314720154, 0.4206319749355316, -0.16624632477760315, -0.012764889746904...
GUI tool or a text editor with some special support for this would be nice.) I’d like something that does not require keeping separate “source” and “build” file versions, ie. the source files with some special markup and the build ones with regular HTML. (I hate to re-make the whole thing after each change in code.) I’...
[ 0.06641720235347748, -0.09380583465099335, 0.3386533856391907, 0.21516460180282593, -0.06848890334367752, -0.1112726554274559, 0.021881502121686935, -0.11880776286125183, -0.1780596524477005, -0.8860222101211548, -0.031092289835214615, 0.9634121060371399, -0.43946373462677, -0.215394616127...
--> $ echo "Moo" > menu.tmpl $ update-templates page.html && cat page.html <h1>A page</h1> <!-- insert menu --> Moo <!-- menu ends --> ``` …only in GUI. BTW: Thanks for the JavaScript solutions. These did not occur to me, but the website has to work even with JS turned off. --- *Update:* As I did not find any exist...
[ 0.22443076968193054, 0.2094869613647461, 0.41272830963134766, -0.18395982682704926, -0.17268088459968567, -0.1157340481877327, 0.6332342028617859, -0.17850905656814575, 0.019953733310103416, -0.6174260973930359, -0.23964501917362213, 0.53122478723526, -0.22378847002983093, -0.0853178575634...
HTML sources updated. The easiest would probably be (although it requires a little bit of set up) a web server with server-side includes. It's the easiest form of templates that I can think of, and if you don't want to "build" the html files from some kind of source, then you need something which is actively serving re...
[ 0.6857078671455383, -0.043236441910266876, 0.4122905731201172, 0.03621377423405647, -0.45118457078933716, -0.26551535725593567, 0.2323857992887497, -0.009207239374518394, -0.3865217864513397, -0.9637163281440735, 0.0917893499135971, 0.5482007265090942, -0.37919631600379944, -0.269399464130...
thought struck me, it shouldn't be to difficult to construct a simple perl-script that includes a file, replacing everything between a start-commment marker and an end-comment marker. You also said you don't want to mess with perl, did that include a prepared perl-script that he just needs to execute? **EDIT 2** A ...
[ 0.15233075618743896, -0.17801444232463837, 0.45629850029945374, -0.06142515689134598, -0.1561308056116104, 0.028705235570669174, 0.3715589642524719, -0.15280114114284515, -0.12057386338710785, -0.47824615240097046, -0.18812362849712372, 0.5385094881057739, -0.5467673540115356, 0.0678137540...
# one megabyte maximum. close(FILE); return $buffer; } sub writefile($$) { open(FILE, 'w', shift); print FILE shift; close(FILE); } for my $file(@ARGV) { my $content = readfile($file); $content =~ s/\<!--\s+include\s+(\S+\)\s+--\>.*?\<!--\s+end\s+\1\s+--\>/"<!-- include $1 -->".readfile($1)."<!-- end $1 ...
[ -0.19788424670696259, 0.05756140872836113, 0.5741198658943176, -0.25928446650505066, 0.23890900611877441, 0.03625831380486488, 0.21435245871543884, -0.03970088064670563, -0.38286277651786804, -0.5464475750923157, -0.3542174994945526, 0.8080485463142395, -0.27474334836006165, 0.103704683482...
We recently changed physical DB's, new servers, new locations, same database schema and data and since the change over, whenever we try to connect directly to the DB in our own desktop type applications about half of the time we get this error: ``` SQL*Loader-704: Internal error: ulconnect: OCIServerAttach[0] ORA-1254...
[ 0.15508264303207397, 0.09852232784032822, 0.3471932113170624, 0.10345159471035004, -0.33398282527923584, -0.13229647278785706, 0.40854179859161377, -0.10991469025611877, -0.19463717937469482, -0.6550199389457703, -0.02823789417743683, 0.7470216751098633, -0.37704840302467346, 0.44682395458...
works 100% but using an oracle executable like SQLLDDR fails at least 50% of the time. Here's an anonymized snppet of our TSNNAMES file and a TNSPING output: ``` DB_CONNECTION = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 1.2.3.4)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME ...
[ -0.07628687471151352, 0.07515429705381393, 0.7226374745368958, 0.10487710684537888, 0.1857694387435913, -0.09174143522977829, 0.44262373447418213, -0.5701091885566711, -0.06916984170675278, -0.2906476557254791, -0.07057257741689682, 1.015991449356079, -0.4725729525089264, -0.01305470708757...
TCP) (HOST = 1.2.3.4)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = MY.URL.COM))) OK (200 msec) ``` I have the SID of the DB, which is what the JDBC connections rely on but adding it to the tnsnames.ora doesn't improve the odds of making a connection. I don't know enough about how the tnsnames file is being used by ...
[ 0.25352388620376587, 0.05385684594511986, 0.5061200261116028, 0.12306689471006393, -0.0935710072517395, -0.1933441013097763, 0.39277955889701843, -0.07668672502040863, -0.32726702094078064, -0.4283449351787567, 0.17729127407073975, 0.62646484375, -0.39194557070732117, 0.6949030756950378, ...
with ORA-12545. In short the issue was that the server had a real name while we were using virtual IP addresses in TNSNAMES.ORA. Once we added the mapping of the server name to IP address via system32\drivers\etc\hosts file everything started to work properly. I have written a bit more in my blog <shameless advert><h...
[ 0.2746632993221283, -0.22041335701942444, 0.35241833329200745, 0.008160432800650597, -0.06455128639936447, 0.029827114194631577, 0.18894869089126587, 0.0295096505433321, -0.25949740409851074, -0.08280996978282928, 0.31780096888542175, 0.6883229613304138, -0.4813460409641266, 0.007180759217...
In C++, arrays cannot be passed simply as parameters. Meaning if I create a function like so: ``` void doSomething(char charArray[]) { // if I want the array size int size = sizeof(charArray); // NO GOOD, will always get 4 (as in 4 bytes in the pointer) } ``` I have no way of knowing how big the array is...
[ 0.1417694389820099, -0.0032611945644021034, 0.40456441044807434, -0.30040737986564636, -0.13843759894371033, 0.040169935673475266, 0.34513208270072937, -0.51317298412323, -0.29094213247299194, -0.21201512217521667, -0.11489105224609375, 0.5852167010307312, -0.4993222951889038, -0.138838693...
the char array, specifically, was initialized like so: ``` char charArray[] = "i am a string"; ``` then the `\0` is already appended to the end of the array. In this case the answer (marked as accepted) works out of the box, so to speak. Without changing the signature? Append a sentinel element. For char arrays spec...
[ 0.1812521517276764, -0.10384970903396606, 0.3658985197544098, -0.28898292779922485, -0.1703052520751953, -0.019779514521360397, 0.43008244037628174, -0.5764941573143005, -0.0019408741500228643, -0.1635371893644333, -0.24113500118255615, 0.5552580952644348, -0.32122230529785156, 0.221093714...
to be valid data for your app, // then you can (maybe) use some other value as // sentinel } int arraySize = p - charArray; // now we know the array size, so we can do some thing } ``` Of course, then your array itself cannot contain the sentinel element as content. For other kinds of ...
[ 0.3877822458744049, 0.20444297790527344, 0.5504851341247559, 0.08478354662656784, 0.09538854658603668, 0.15752296149730682, 0.34357738494873047, -0.47790220379829407, -0.29531413316726685, -0.3447333574295044, -0.1266603320837021, 0.49207860231399536, -0.3916987478733063, -0.08823414891958...
method does not work. Moreover, this requires co-operation on the caller side. You really have to make sure that the caller reserves an array of `arraySize + 1` elements, and *always* sets the sentinel element. However, if you really cannot change the signature, your options are rather limited.
[ 0.2832287549972534, -0.12382691353559494, 0.4316781163215637, 0.18922780454158783, -0.01011009979993105, -0.1065719947218895, 0.6601791381835938, -0.6354436874389648, -0.16613714396953583, -0.425229012966156, 0.16139356791973114, 0.38593533635139465, -0.4328256845474243, -0.061651397496461...
I have an application which is connected to a database through a spring.net AdoTemplate. I am charged with creating a restore database method which keeps the app running but drops the network connections so as to drop the old database and bring up the new one. My question is how do I drop all the current connections th...
[ 0.183504119515419, 0.19479821622371674, 0.3533254563808441, 0.1231594979763031, 0.04186847805976868, -0.08650107681751251, 0.16441009938716888, 0.07976458966732025, -0.33018699288368225, -0.4075593948364258, 0.17083203792572021, 0.37602391839027405, -0.4291774034500122, 0.31957152485847473...
the clear, hopefully waiting // 3 seconds will give them time to be released and we can now close them as well Thread.Sleep(3000); //clear again SqlConnection.ClearAllPools(); ```
[ 0.30018725991249084, 0.04636474326252937, 0.7058389186859131, 0.029782969504594803, 0.3483359217643738, -0.3994942009449005, 0.23775213956832886, 0.1826566457748413, -0.2352348417043686, -0.5834079384803772, -0.10901644080877304, 0.6844222545623779, -0.09721904993057251, 0.1000218763947486...
I have a NewsFeed object mapped as such: ``` <class name="NewsFeed"> <id name="NewsFeedId"> <generator class="guid"/> </id> <property name="FeedName" not-null="true" /> <property name="FeedURL" not-null="true" /> <property name="FeedIsPublished" not-null="true" /> </class> ``` And Users ...
[ 0.5242424011230469, -0.04038670286536217, 0.5717855095863342, 0.05848046392202377, 0.03719545900821686, 0.03903328627347946, -0.3238479495048523, -0.17137888073921204, -0.02352714352309704, -1.0358079671859741, -0.1086278185248375, 0.23499614000320435, -0.3242599666118622, 0.28362283110618...
column="SystemUserId" /> <many-to-many column="NewsFeedId" class="NewsFeeds.NewsFeed, Domain"/> </set> </class> ``` What I want to happen is when I delete the parent NewsFeed then all of the SelectedNewsFeed references get deleted too, without having to load each SystemUser and delete the NewsFeed by han...
[ -0.11910030245780945, -0.17773835361003876, 0.17976510524749756, 0.3371469974517822, 0.031192654743790627, -0.04644591361284256, 0.22226981818675995, -0.3223385214805603, -0.3781944215297699, -0.7397799491882324, -0.023767458274960518, 0.5455923676490784, -0.4193076491355896, 0.45886400341...
relationship with a join > class in the middle which nHiberate > would be able to determine > parent-child relationships and the > cascade should work. is actually what the nHibernate folks recommend in their documentation. > **Don't use exotic association mappings.** > > > Good usecases for a real many-to-many...
[ -0.2719646692276001, -0.1972167044878006, 0.33081480860710144, 0.20713096857070923, -0.2949305474758148, 0.03332601487636566, 0.19022679328918457, -0.16113488376140594, -0.13254967331886292, -0.6575506329536438, 0.20893557369709015, 0.24601106345653534, -0.24707306921482086, 0.127346798777...
you > should be careful when using any other > association style and ask yourself if > it is really neccessary. Using two one-to-many associations adds the flexibility to easily add other attributes to the "subscription", such as notification preferences for that particular subscription.
[ 0.417045921087265, -0.1958765685558319, 0.05760091543197632, 0.30366265773773193, -0.20329983532428741, -0.4476120173931122, 0.07615908980369568, -0.07493174821138382, -0.14963291585445404, -0.8372945189476013, -0.013518293388187885, 0.519050657749176, -0.19209377467632294, -0.133640095591...
In .NET 3.5, I'd like to create a singleton interface: ``` interface ISingleton <T> { public static T Instance {get;} } ``` Of course that doesn't work but is what I'd like. Any suggestions? EDIT: I just want it to be known that all singeltons will have a static property named Instance of the class type. It is al...
[ 0.009609348140656948, -0.2570820748806, 0.23434212803840637, -0.031443677842617035, -0.4564610719680786, -0.08372414112091064, 0.21479946374893188, 0.06466224789619446, -0.016303090378642082, -0.9206805229187012, 0.04993744194507599, 0.42684584856033325, -0.7483887076377869, 0.101001366972...
I would like to create a spinning menu akin to the one done in flash [here.](http://accuval.net) Are there any relevant links you know about to help with this endeavor? Thank you kindly. You could use the <canvas> tag.
[ 0.6180531978607178, -0.412251740694046, 0.09595651179552078, 0.3642284572124481, -0.20642772316932678, -0.30241674184799194, -0.023237885907292366, 0.7266664505004883, -0.4485976994037628, -0.8139907717704773, 0.19754481315612793, 0.33383679389953613, 0.38246431946754456, 0.338090658187866...
I wrote a multi-threaded windows application where thread: A – is a windows form that handles user interaction and process the data from B. B – occasionally generates data and passes it two A. A thread safe queue is used to pass the data from thread B to A. The enqueue and dequeue functions are guarded usin...
[ 0.36584651470184326, 0.07780522853136063, 0.5334973931312561, -0.20976045727729797, -0.13715316355228424, 0.09581872075796127, 0.2513050436973572, -0.04470647871494293, 0.07704421877861023, -0.5123238563537598, 0.15166279673576355, 0.07923194020986557, -0.4411942660808563, 0.25605976581573...
the call to PostMessage is executed successfully and repeatedly calls PostMessage if it is not successful (PostMessage has yet to fail). This worked well for quite some time until one specific computer started to lose the occasional message. By lose I mean that, PostMessage returns successfully in B but A never recei...
[ -0.003741381224244833, -0.007458736188709736, 0.27176645398139954, -0.12399431318044662, 0.16889497637748718, 0.007408064790070057, 0.7196055054664612, 0.1702396273612976, -0.048835255205631256, -0.438480019569397, -0.3586871027946472, 0.5438357591629028, -0.5036177635192871, 0.17319333553...
Only called by B procedure TSharedQueue.Enqueue(AItem: TSQItem); var B: boolean; begin EnterCriticalSection(FQueueLock); if FCount > 0 then begin FLast.FNext := AItem; FLast := AItem; end else begin FFirst := AItem; FLast := AItem; end; if (FCount = 0) or (FCount mod 10...
[ 0.044614266604185104, -0.13133257627487183, 0.5992482304573059, -0.4124966263771057, 0.0607711598277092, 0.02100103534758091, 0.7471445798873901, -0.45345574617385864, -0.060696057975292206, -0.3670790493488312, -0.5973477363586426, 0.35619059205055237, -0.5674260258674622, -0.065532110631...
0); if not B then Sleep(1000); // this line of code has never been reached until B; Inc(FCount); LeaveCriticalSection(FQueueLock); end; // Only called by A function TSharedQueue.Dequeue: TSQItem; begin EnterCriticalSection(FQueueLock); if FCount > 0 then begin Result := FFirst; F...
[ 0.26142945885658264, -0.2161569893360138, 0.8257207274436951, -0.38686758279800415, 0.3283693492412567, 0.20807312428951263, 0.24274368584156036, -0.5113516449928284, -0.15241685509681702, -0.6532558798789978, -0.4947371184825897, 0.29490044713020325, -0.3203711211681366, 0.054617200046777...
TfrmMonitor.SQHasData(var AMessage: TMessage); var Item: TSQItem; begin while FMessageQueue.Count > 0 do begin Item := FMessageQueue.Dequeue; // use the Item somehow end; end; ``` Is `FCount` also protected by `FQueueLock`? If not, then your problem lies with `FCount` being incremented after th...
[ 0.0798504650592804, 0.10675216466188431, 0.6156949400901794, -0.055295657366514206, -0.1665177345275879, -0.005121453665196896, 0.6324840784072876, -0.24728316068649292, -0.310687392950058, -0.2460136115550995, -0.3520863652229309, 0.34090688824653625, -0.26419663429260254, 0.1014113128185...
to increment `FCount` before calling `PostMessage`. Keep in mind that things can happen quicker than one would expect (i.e. the message posted with PostMessage being caught and processed by another thread before you have a chance to increment FCount a few lines later), especially when you're in a true multi-threaded e...
[ 0.06162388250231743, -0.1928892284631729, 0.5005592107772827, 0.4577675759792328, -0.017822857946157455, -0.33859220147132874, 0.3666475713253021, -0.11777381598949432, -0.5354041457176208, -0.6447563171386719, -0.20182396471500397, 0.2232176512479782, -0.24760335683822632, -0.011054346337...
the true order of events. On a separate note, a nice little optimization that can be done in a producer/consumer scenario like this is to use two queues instead of one. When the consumer wakes up to process the full queue, you swap the full queue with an empty one and just lock/process the full queue while the new emp...
[ 0.33842238783836365, -0.632904052734375, -0.013951795175671577, 0.16748221218585968, 0.04737769439816475, 0.25615882873535156, -0.04016822949051857, 0.11266351491212845, -0.5717847347259521, -0.5675292611122131, 0.12453550845384598, 0.6550226807594299, -0.2556743025779724, 0.37207588553428...
I'm trying to move X number of rows down in a table using jQuery... I can do the following and it works.... ``` /* Now let's move next 3 times to arrive at the foo account */ for (var rowCount = 1; rowCount <=3; rowCount++) { foobarRow = $(foobarRow).next('tr'); } ``` I realize I could go ``` foobarRow = ...
[ -0.34685075283050537, 0.12477435171604156, 0.7245545983314514, -0.19237849116325378, 0.10399523377418518, 0.14589539170265198, 0.38693198561668396, -0.4119907021522522, -0.33780547976493835, -0.6701083779335022, -0.00034966919338330626, 0.5519442558288574, -0.2704789638519287, -0.018202306...
their index [`:eq(index)`](https://api.jquery.com/eq-selector/). `$("tr:eq(2)")` selects the third `<tr>`. Note, this is a zero-based index.
[ 0.008468390442430973, -0.024906927719712257, 0.4481571614742279, -0.07801076024770737, -0.12430863827466965, 0.17359837889671326, -0.1423967033624649, -0.27297890186309814, 0.030120840296149254, -0.6000169515609741, -0.23091666400432587, 0.4467381238937378, -0.37691861391067505, 0.20824594...
I'm using a SQL query that is similar to the following form: ``` SELECT col1, col2 FROM table1 LEFT OUTER JOIN table2 ON table1.person_uid = table2.person_uid AND table1.period = table2.period ``` And it's either way too slow or something's deadlocking because it takes at least 4 minutes to return. If I were to chan...
[ -0.4404083788394928, 0.005217357072979212, 0.6281696557998657, -0.035453032702207565, 0.09333927184343338, 0.30595430731773376, 0.2106386125087738, -0.1708039939403534, -0.4221211373806, -0.6730214953422546, -0.08247371017932892, 0.5459966063499451, 0.11001728475093842, -0.0987954139709472...
JOIN table2 ON table1.period = table2.period WHERE table1.person_uid = table2.person_uid ``` **UPDATE 2:** These are actually views that I'm joining. Unfortunately, they're on a database I don't have control over, so I can't (easily) make any changes to the indexing. I am inclined to agree that this is an indexing is...
[ 0.09533986449241638, 0.2090417593717575, 0.587311863899231, 0.0062199304811656475, -0.2222612351179123, -0.20531883835792542, 0.08959575742483139, 0.18435759842395782, -0.42955607175827026, -0.7767971754074097, 0.24333831667900085, 0.45259758830070496, 0.20994265377521515, 0.31267046928405...