text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
utils.executeDeferred( processor )
```
You can probably do something similar with wxPython as well. (utils.executeDeferred is a Maya function.) Be sure to check out how to create a [non-blocking GUI](http://wiki.wxpython.org/Non-Blocking%20Gui) on the wxPython wiki. Instead of processEvents(), you'll want to set up a... | [
-0.14259342849254608,
-0.04922997206449509,
0.6367323398590088,
-0.1946873664855957,
-0.11707646399736404,
0.1921769231557846,
0.5452037453651428,
-0.15590918064117432,
-0.2702184319496155,
-0.7768625617027283,
-0.11382176727056503,
0.6887023448944092,
-0.5163637399673462,
-0.0162142645567... | |
while 1:
time.sleep(0.01)
utils.executeDeferred( processor )
def initializePumpThread():
global pumpedThread
global app
if pumpedThread == None:
app = wx.App(False)
pumpedThread = threading.Thread(target = pumpWx, args = ())
pumpedThread.start()
```
The wxPython do... | [
-0.22898943722248077,
-0.07340413331985474,
0.6775709986686707,
-0.16120918095111847,
0.36196890473365784,
-0.03731290251016617,
0.364943265914917,
-0.2405172437429428,
-0.26444166898727417,
-0.6034501791000366,
-0.16158759593963623,
0.7737764716148376,
-0.5460450053215027,
-0.175414219498... | |
horribly. (There's some discussion about what you want to do on the [wxPython mailing list](http://www.nabble.com/app.MainLoop-vs.-Pending-Dispatch-td17921845.html) but it's from a few minor versions of wx ago.) There is also some indication in various forums that this technique causes problems with keyboard input. You... | [
0.00437787314876914,
0.21436807513237,
0.37228626012802124,
-0.020134337246418,
0.3192562758922577,
-0.058543018996715546,
0.5354808568954468,
0.34385573863983154,
-0.7493915557861328,
-0.7236360311508179,
-0.08098641037940979,
0.6360132098197937,
-0.1924387514591217,
0.317803293466568,
... | |
I'm reading through "A Gentle Introduction to Haskell," and early on it uses this example, which works fine in GHC and horribly in my brain:
```
initial = 0
next resp = resp
process req = req+1
reqs = client initial resps
resps | [
-0.3555677533149719,
-0.12085073441267014,
0.8227052688598633,
-0.25077006220817566,
0.06438663601875305,
-0.08437059074640274,
0.11192116141319275,
-0.1351606547832489,
0.024970367550849915,
-0.8504434823989868,
-0.24146562814712524,
0.44193145632743835,
0.03468341380357742,
0.20791871845... | |
= server reqs
server (req:reqs) = process req : server reqs
client initial ~(resp:resps) = initial : client (next resp) resps
```
And the calling code:
`take 10 reqs`
How I'm seeing it, is `reqs` is called, yielding a call to `client` with args 0 and `resps`. Thus wouldn't `resps` now need to be calle... | [
-0.21320301294326782,
-0.10360731184482574,
1.223583698272705,
-0.38232529163360596,
0.19520385563373566,
0.20392495393753052,
0.27805736660957336,
-0.31123703718185425,
-0.28547534346580505,
-0.7134311199188232,
-0.4175075888633728,
0.7550709247589111,
-0.23951415717601776,
0.256607651710... | |
appreciative!
I find that it's usually worthwhile to work out the behavior of small Haskell programs by hand. The evaluation rules are quite simple. The key thing to remember is that Haskell is *non-strict* (aka *lazy*): expressions are evaluated only when needed. Laziness is the reason seemingly infinite definitions c... | [
0.13715463876724243,
-0.19279824197292328,
0.10057658702135086,
-0.0680927261710167,
-0.29947221279144287,
0.028957553207874298,
0.726960301399231,
-0.1474021077156067,
0.04420892894268036,
-0.4147406220436096,
-0.09982350468635559,
0.6755343079566956,
-0.23703248798847198,
-0.327448010444... | |
distinguish between `[]` and `(x:xs)` before function application. (Note that a '`~`' preceding a pattern , as in the definition of `client`, makes it lazy (or *irrefutable*): a lazy pattern won't force its argument until the whole expression is forced.)
Remembering that `take` is:
```
take 0 _ = []
take n (x:xs... | [
-0.2332598865032196,
-0.21928450465202332,
0.3758535087108612,
-0.34065908193588257,
-0.07075369358062744,
0.04055003449320793,
0.2707058787345886,
-0.3622020483016968,
-0.017679480835795403,
-0.5227257609367371,
-0.4025821387767792,
0.7574170231819153,
-0.2676745653152466,
-0.236884072422... | |
match is lazy]
= take 10 (initial : (\ resp:resps' -> client (next resp) resps')
resps)
-- definition of take
= initial : take 9 ((\ resp:resps' -> client (next resp) resps') | [
-0.4308617413043976,
-0.5558446049690247,
0.6099179983139038,
-0.42743247747421265,
0.17054270207881927,
0.23844188451766968,
0.06394903361797333,
-0.282143771648407,
0.29867345094680786,
-0.4179738163948059,
-0.010566252283751965,
0.6212223768234253,
-0.5968132615089417,
-0.20850685238838... | |
resps)
-- definition of initial
= 0 : take 9 ((\ resp:resps' -> client (next resp) resps')
resps)
-- definition of resps
= 0 : take 9 ((\ resp:resps' -> client (next resp) resps')
(server reqs)) | [
-0.5082021951675415,
-0.6140349507331848,
1.0989155769348145,
-0.22198380529880524,
0.32649287581443787,
0.42802318930625916,
-0.03525084629654884,
-0.3120863437652588,
-0.0847504734992981,
-0.7413636445999146,
-0.44561830163002014,
0.20023134350776672,
-0.3298775255680084,
0.0345560722053... | |
-- definition of reqs
= 0 : take 9 ((\ resp:resps' -> client (next resp) resps')
(server (client initial resps)))
-- definition of client
= 0 : take 9 ((\ resp:resps' -> client (next resp) resps')
(server (initial : {- elided... -})) | [
-0.5088489651679993,
-0.5246387720108032,
0.8837447762489319,
-0.30613598227500916,
0.1566912829875946,
0.5590443015098572,
0.11573176085948944,
-0.30969756841659546,
-0.1068936288356781,
-0.60453200340271,
-0.35349729657173157,
0.26451894640922546,
-0.36958542466163635,
0.1419177949428558... | |
-- definition of server
= 0 : take 9 ((\ resp:resps' -> client (next resp) resps')
(process initial : server {-...-}))
-- beta reduction
= 0 : take 9 (client (next (process initial)) (server {-...-})
-- definition of client
= 0 : take 9 (next (process initial) : {-...-}) | [
-0.4532841742038727,
-0.65961092710495,
0.5382366180419922,
-0.49523577094078064,
-0.07358921319246292,
0.46446412801742554,
-0.022122789174318314,
0.01128474809229374,
0.03313976526260376,
-0.4392271041870117,
-0.16701409220695496,
0.2791443169116974,
-0.4036308228969574,
0.14860363304615... | |
-- definition of take
= 0 : next (process initial) : take 8 {-...-}
-- definition of next
= 0 : process initial : take 8 {-...-}
-- definition of process
= 0 : initial+1 : take 8 {-...-}
-- definition of initial
= 0 : 1 : take 8 {-...-}
-- and so on...
``` | [
-0.41410762071609497,
-0.13680271804332733,
0.40891408920288086,
-0.3691246807575226,
0.14283885061740875,
0.495088130235672,
-0.09161897748708725,
-0.4994592070579529,
-0.07944303005933762,
-0.4148959517478943,
0.06153559684753418,
0.294197678565979,
0.059258878231048584,
0.26496365666389... | |
I am asking about the common techniques which are used in c# to support multilingual interface in windows forms
Everything I said here:
[Internationalizing Desktop App within a couple years... What should we do now?](https://stackoverflow.com/questions/270829/internationalizing-desktop-app-within-a-couple-years-what-s... | [
0.2705983817577362,
0.11434827744960785,
0.35615235567092896,
-0.1588669866323471,
0.26162952184677124,
-0.13865672051906586,
-0.13375139236450195,
0.1415252834558487,
-0.22974339127540588,
-0.30451396107673645,
-0.07499738782644272,
0.3611063063144684,
0.0009749775053933263,
0.06497094035... | |
Thanks to ASP.NET MVC framework, it became possible to unit test web applications. But how do you unit test windows forms applications?
One way is to use Model View Presenter (MVP) Patterns for Winforms app. Pretty easy to adapt if you already worked with MVC
> Specifically, take the view part of
> MVC and slice it a... | [
0.008146561682224274,
-0.2680341303348541,
0.38068264722824097,
0.26400938630104065,
-0.39449724555015564,
-0.0875830203294754,
0.19107817113399506,
-0.2588654160499573,
-0.4260454475879669,
-0.71368807554245,
0.08369670808315277,
0.2138674557209015,
-0.12484555691480637,
0.104189448058605... | |
great articles from.
[Dan Bunea - Click to read](http://danbunea.blogspot.com/2005/11/model-view-presenter-is-testing_27.html)
[Jeremy Miller - Click to read](http://codebetter.com/blogs/jeremy.miller/articles/129546.aspx)
Happy coding | [
0.6017821431159973,
0.15786029398441315,
-0.26404324173927307,
0.2568507790565491,
0.06283315271139145,
-0.5353050827980042,
0.2316925823688507,
-0.1187489852309227,
-0.3589067757129669,
-0.20457671582698822,
-0.37494751811027527,
0.4053434729576111,
-0.08786400407552719,
-0.26867195963859... | |
I understand that [Firefox](http://www.mozilla.com/en-US/) addins can be created in Javascript and Chrome.
How do they run advanced graphics applications such as [CoolIris](http://www.cooliris.com/) ?
[](https://i.stack.imgur.com/CqFWU.png)
(source: [cooliris.com](ht... | [
0.31992030143737793,
0.17871513962745667,
0.25476717948913574,
0.07818145304918289,
-0.022007914260029793,
-0.289463609457016,
-0.0014222506433725357,
0.015351029112935066,
-0.12493671476840973,
-0.8389997482299805,
-0.21070416271686554,
0.5308502316474915,
-0.35085704922676086,
-0.1389185... | |
I have recently been exploring Apache Ofbiz and was impressed by its ability to customize most areas of the application: UI, workflow, entities.
Is there any similar (not necessarily an ERP system) application developed in C#/.Net which offers a similar level of customization?
I am looking for examples of application... | [
0.47606056928634644,
-0.024929862469434738,
-0.1218167394399643,
0.3531968295574188,
-0.23119452595710754,
-0.14089053869247437,
0.0012233135057613254,
-0.032332275062799454,
-0.3342331647872925,
-0.27833613753318787,
0.2656349241733551,
0.36350589990615845,
-0.13986912369728088,
0.1666680... | |
two entities:
* Financial instrument; and
* Quote.
So you need to then identify the attributes.
Financial instrument:
* Security code;
* Market;
* etc.
Quote:
* Timestamp;
* Financial instrument;
* Bid price; and
* Ask price.
The reference to the financial instrument is what's called a [foreign key](http://en.wi... | [
0.24373029172420502,
0.1716596931219101,
0.5355650782585144,
0.13247033953666687,
0.05647282674908638,
0.13377366960048676,
-0.7285885810852051,
-0.3387855887413025,
-0.16069690883159637,
-0.35500454902648926,
0.11723838746547699,
0.7500109672546387,
0.07180020958185196,
0.4525947868824005... | |
instrument_idx1 ON instrument (code);
CREATE INDEX quote_idx1 ON quote (instrument_id, dt);
SELECT (bid + ask) / 2
FROM instrument i
JOIN quote q ON i.id = q.instrument_id
WHERE i.code = 'GOOG'
AND q.dt >= '01-06-2008' AND q.dt < '02-06-2008'
```
If your dataset is sufficiently large you might want to include (bid ... | [
-0.15462717413902283,
-0.059002868831157684,
0.5738726854324341,
-0.017999371513724327,
-0.27002856135368347,
0.21012580394744873,
-0.2275448590517044,
-0.5670820474624634,
-0.16392634809017181,
-0.5198459625244141,
0.44169309735298157,
0.4249659478664398,
0.08988858759403229,
0.1639056801... | |
this: do you need to store all this data? The reason I ask this is that I used to be working in online broking and we only stored all the trades for a very limited window and trades would be a smaller set of data than quotes, which you seem to want.
Storing billions of rows of data is a serious problem and one you rea... | [
0.821671724319458,
0.26173660159111023,
0.023396624252200127,
0.21248625218868256,
0.2631106674671173,
-0.014177333563566208,
-0.3187696933746338,
0.11509204655885696,
-0.377216637134552,
-0.2556673288345337,
0.5899375677108765,
0.4856727719306946,
-0.09685950726270676,
0.250505656003952,
... | |
When should one use a scripting language over a more verbose, compiled language like C++. C# or Java?
And to make the question a little more interesting, let's answer the questions like this:
**You should use a scripting language when... BLANK...**
**When you need A use scripting language X.**
**When you need B use... | [
0.1540675312280655,
-0.07525483518838882,
-0.23206675052642822,
0.2060064822435379,
-0.11419864743947983,
-0.09161370247602463,
-0.08493603765964508,
0.18179988861083984,
-0.1977292001247406,
-0.784786581993103,
-0.2484561949968338,
0.6311284899711609,
-0.1333492249250412,
-0.3485225439071... | |
In which situations should I choose to use a functional programming language over a more verbose object-oriented language like C++, C# or Java?
I understand what functional programming is, what I don't really understand is for what types of problems is it a perfect solution?
Functional languages are, in my opinion, go... | [
-0.09571418166160583,
-0.0013509121490642428,
-0.06928369402885437,
0.184028759598732,
-0.1669299453496933,
-0.09239093959331512,
0.2936246693134308,
0.06747165322303772,
-0.23715849220752716,
-0.6510536074638367,
-0.13918769359588623,
0.7999281883239746,
-0.4729820489883423,
-0.6010134816... | |
thing I have to add is that functional languages are really fun languages. My Scheme course was one of the courses I had the most fun with. | [
-0.08636610954999924,
0.12220420688390732,
-0.10334969311952591,
0.009631559252738953,
-0.32532578706741333,
0.05616644024848938,
0.519974946975708,
0.7770531177520752,
-0.17570798099040985,
-0.21664749085903168,
-0.22211554646492004,
0.5847328901290894,
-0.11780210584402084,
-0.7089149355... | |
Is there something like python's interactive REPL mode, but for Java?
So that I can, for example, type `InetAddress.getAllByName( localHostName )` in a window, and immediately get results, without all this public static void nightmare() thing?
**edit**
Since Java 9 there's [JShell](https://en.wikipedia.org/wiki/JShell)... | [
-0.08041898906230927,
-0.23969140648841858,
0.38435864448547363,
0.13843360543251038,
-0.07996244728565216,
-0.09045212715864182,
0.052324213087558746,
0.1909416913986206,
-0.2211022973060608,
-0.6051799654960632,
0.04340282455086708,
0.6370888948440552,
-0.16342325508594513,
0.15405791997... | |
As far as I can see silverlight only supports streaming over http even in version 2, as I understand it mms is converted to http and therefore you cannot stream RSTP (I have tried to test this and get network errors unless I stream http).
Does anyone know if RSTP is going to be supported in Silverlight or if it is and... | [
0.29136449098587036,
0.027417510747909546,
0.585260272026062,
-0.10513602197170258,
-0.3749677240848541,
-0.4394966959953308,
0.19670447707176208,
0.21154356002807617,
-0.531619668006897,
-0.4453551769256592,
-0.027883362025022507,
0.36619800329208374,
-0.5039964318275452,
0.08961120247840... | |
I want to retrieve a set of records from a database, do a rs.next() and then assign the result of this to a variable to pass to a method that will use this record, in the same way that I would without assigning it to a variable and passing it to a method
is there any way to do this?
I'm using JAVA (1.5)
---
Thank you... | [
0.1450268179178238,
0.05946555361151695,
0.3646208941936493,
0.1467052698135376,
0.09292026609182358,
-0.1938389390707016,
-0.04628100246191025,
-0.34063562750816345,
-0.25331732630729675,
-0.6875396966934204,
0.1226593628525734,
0.31006956100463867,
-0.3700607419013977,
0.1127140000462532... | |
to a variable?
I'm afraid you cannot do that. You can have a reference from that rs and process it in other method ( the same way you would without assign it to a var )
When you pass the rs as an argument to a method that is exactly what you're doing already.
```
while( rs.next() ) {
list.add( createFrom( rs )... | [
0.4465923607349396,
0.12614057958126068,
0.5290920734405518,
0.058826081454753876,
0.0735696479678154,
-0.23062098026275635,
0.006098461803048849,
-0.4213000535964966,
-0.13743235170841217,
-0.2729511260986328,
-0.08270515501499176,
0.505264163017273,
-0.5948150753974915,
0.269842296838760... | |
I want to insert multiple invisible watermarks into my JPEG pictures through C# code. That means that I need a .NET library that does this work and not some external batch application.
Any suggestions?
there is a port of image magick library to c# , and it can easily perform that operation for you... | [
0.8731653690338135,
0.007723474875092506,
0.22817866504192352,
0.06301534175872803,
-0.15617625415325165,
-0.22906328737735748,
-0.21264994144439697,
-0.04882204532623291,
-0.19543242454528809,
-0.6289355754852295,
0.29196885228157043,
0.48901110887527466,
-0.20284926891326904,
-0.06311859... | |
How can I make a drag and drop editor like the one in wufoo.com form editor
Usually client side applications are built using some sort of **client-side framework**.
The more popular ones are (in no particular order):
* [GWT](http://code.google.com/webtoolkit/)
* [YUI](http://developer.yahoo.com/yui/)
* [jQuery](http:/... | [
0.28355246782302856,
-0.3081732392311096,
0.2322329580783844,
0.36012786626815796,
-0.29527607560157776,
-0.20707447826862335,
-0.18048861622810364,
0.15831927955150604,
-0.038172170519828796,
-0.572713315486908,
-0.004586725030094385,
0.44075506925582886,
-0.08285818994045258,
-0.37261444... | |
Given the [dangers of SUID shell scripts](http://www.drdobbs.com/dangers-of-suid-shell-scripts/199101190), is there a more secure way of giving passwordless access to scripts (bash, PHP) with root permissions in Linux?
(Ubuntu 8.10)
You could consider [sudo](http://www.gratisoft.us/sudo/).
Although not 'passwordless'... | [
-0.010073328390717506,
0.0178211759775877,
0.05251515284180641,
0.0951501801609993,
-0.1973964422941208,
-0.41749027371406555,
0.7511285543441772,
-0.24104230105876923,
-0.21849042177200317,
-0.3884502351284027,
-0.12129157036542892,
0.5855302214622498,
0.0012704769615083933,
0.02522108517... | |
for multiple commands over a period of use.*
By the way, sudo is built in to Ubuntu and nicely integrated with Gnome. When ubuntu prompts you for your password to do privileged operations, that's sudo under the hood. | [
-0.07250896096229553,
-0.3060058057308197,
0.3033426105976105,
0.1883610337972641,
-0.4501449167728424,
-0.37881362438201904,
0.32602769136428833,
0.3519248962402344,
-0.10421425849199295,
-0.6515794396400452,
-0.23298075795173645,
0.5646600723266602,
-0.04825596883893013,
0.17470614612102... | |
I hope someone could help me on this.
I want to add a month to a database date, but I want to prevent two jumping over month on those days at the end.
For instance I may have:
Jan 31 2009
And I want to get
Feb 28 2009
and not
March 2 2009
Next date would be
March 28 2009
Jun 28 2009
etc.
Is there a fu... | [
0.03880950063467026,
0.17134979367256165,
0.7687877416610718,
0.17014189064502716,
-0.1246640607714653,
-0.003561344463378191,
0.2332524061203003,
0.30918365716934204,
-0.5973560810089111,
-0.2939136326313019,
0.2626965641975403,
0.2808801829814911,
0.23921392858028412,
0.2803090810775757,... | |
)
I can fetch all the records and update the date manually ( well in an imperative way ) but I would rather let the SQL do the job.
Something like:
```
insert into the_table
select f1,f2,f3, f_date + 30 /* sort of ... :S */ from the_Table where date > ?
```
But the problem comes with the last day.
Any idea bef... | [
0.3482590913772583,
0.025829454883933067,
0.5377224683761597,
-0.04327276721596718,
0.19987885653972626,
-0.1339687556028366,
-0.1881566196680069,
0.01469420362263918,
-0.3016694188117981,
-0.619484543800354,
-0.00878001656383276,
0.3770979642868042,
-0.1153448298573494,
0.2430492341518402... | |
update.... et
```
**EDIT:2**
Add months did the trick.
now I just have this:
```
insert into my_table
select f1, add_months( f2, 1 ) from my_table where status = etc etc
```
Thanks for the help.
Oracle has a built-in function [ADD\_MONTHS](http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/functio... | [
-0.4827047288417816,
0.22309699654579163,
0.401608943939209,
0.06686098128557205,
-0.10613202303647995,
0.3838063180446625,
-0.041233792901039124,
-0.054031066596508026,
-0.2689308822154999,
-0.4130120277404785,
0.15110035240650177,
0.6195120215415955,
0.036005210131406784,
-0.198106899857... | |
I'd like to display the binary (or hexadecimal) representation of a floating point number. I know how to convert by hand (using the method [here](http://en.wikipedia.org/wiki/Floating_point#Implementation_in_actual_computers:_IEEE_floating-point)), but I'm interested in seeing code samples that do the same.
Although I... | [
0.40792030096054077,
0.3669368326663971,
0.16309748589992523,
0.0810096487402916,
-0.2547697126865387,
0.09950469434261322,
-0.12365677207708359,
0.12086860090494156,
-0.3951217532157898,
-0.7250535488128662,
0.08285530656576157,
0.39489656686782837,
-0.026937415823340416,
0.08207065612077... | |
unsigned u;
};
ufloat u1;
u1.f = 0.3f;
```
Then you just output `u1.u`. You can adapt [this implementation](http://www.daniweb.com/code/snippet87.html).
Doubles just as easy.
```
union udouble {
double d;
unsigned long u;
}
```
because doubles are 64 bit.
Java is a bit easier: use [Float.floatToRawIntBits()... | [
0.11024169623851776,
-0.13971371948719025,
0.3247983157634735,
-0.4300679862499237,
-0.24290919303894043,
0.2737385034561157,
0.034472521394491196,
-0.6402541399002075,
-0.2902039587497711,
-0.2852003872394562,
-0.2588387429714203,
0.5726554989814758,
-0.5491119027137756,
-0.19878821074962... | |
Is it possible to add a jQuery function so that a click in a table cell will invoke
a hidden <a href="javascript: ..." /> element (that is a descendant of the TD) ?
I've tried with
$('#table td').click(function() {
$(this).find('a').click();
});
An other variants, but to no luck.
--larsw
```
<html>
<head></head... | [
-0.17144697904586792,
-0.20294596254825592,
0.2655639350414276,
-0.2903943657875061,
-0.11175099015235901,
0.17619657516479492,
0.24040600657463074,
-0.42417338490486145,
-0.3105302155017853,
-0.5647327899932861,
0.07190486788749695,
0.22862546145915985,
-0.3659699261188507,
-0.21388071775... | |
href=# onclick='alert("b2")' /></td>
</tr>
</table>
<script src="scripts/jquery-1.2.6.min.js" ></script>
<script>
$(function(){
$('table td').click(function(){ $(this).find('a').click()});
})
</script>
</body>
</html>
```
I have it working fine with that clip above. However see your jQuery selecto... | [
0.21547576785087585,
-0.06010822579264641,
0.5809473991394043,
-0.0764831155538559,
-0.2829204797744751,
0.09577924758195877,
0.21670827269554138,
-0.6782599687576294,
-0.11936139315366745,
-0.6757869124412537,
0.04381895810365677,
0.737824559211731,
-0.2104659080505371,
-0.321502476930618... | |
Last weekend I changed webhosts for my website. The host server I was on was a 32-bit OS and the one I moved to is 64-bit. Unexpectedly, some of my PHP scripts started giving incorrect results.
In my case the << and >> (bit shift) operations were the culprit. I ended up having to mask the result with 0xFFFFFFFF and t... | [
0.2305551916360855,
0.16831177473068237,
0.433652400970459,
0.03556404635310173,
-0.048870719969272614,
-0.03210053965449333,
0.46752917766571045,
0.15753060579299927,
-0.03349010646343231,
-0.5930665731430054,
0.10215994715690613,
0.4403389096260071,
-0.42781445384025574,
0.19328528642654... | |
the same. | [
0.1934802085161209,
0.13983726501464844,
0.1285007894039154,
-0.09950464963912964,
-0.01928500086069107,
0.057599883526563644,
0.06498157232999802,
-0.00794237107038498,
-0.15401309728622437,
-0.42586395144462585,
0.15876907110214233,
0.09318139404058456,
-0.24909016489982605,
0.0598915852... | |
My Microsoft SQL Server Management Studio is slow. And by slow I mean >1minute to render a context menu-slow.
All other things work perfectly fine. The connection to the database itself is not slow (my app works just fine and context menus don't need connection to the DB anyway I guess)..
Anybody has any idea what I s... | [
-0.1555945724248886,
0.26390889286994934,
0.3341115415096283,
0.13979844748973846,
-0.26530012488365173,
-0.1298348605632782,
0.6772108674049377,
0.18674452602863312,
-0.14615078270435333,
-0.9150823354721069,
0.1103535071015358,
0.6666086316108704,
-0.023699134588241577,
0.138634130358695... | |
installed Toad for SQL and everything works super smooth there. Actually, I find it way more productive then MSSql ever was for me. It's not really an answer to my question, but it certainly a solution.
It's a high level language, so anything non-bit related (bitwise operators, bitshift) will be the same. | [
-0.0560561902821064,
-0.11428046226501465,
0.09885653108358383,
0.18017180263996124,
0.0876237228512764,
-0.1399049162864685,
0.22840356826782227,
0.578647255897522,
-0.008842206560075283,
-0.6341896653175354,
0.08378615230321884,
0.7044358253479004,
-0.2938191294670105,
-0.385313421487808... | |
I have a windows service written in c#. It has a timer inside, which fires some functions on a regular basis. So the skeleton of my service:
```
public partial class ArchiveService : ServiceBase
{
Timer tickTack;
int interval = 10;
...
protected override void OnStart(string[] args)
{
tickT... | [
0.3789418637752533,
0.17602871358394623,
0.41810640692710876,
-0.2336270660161972,
0.24375148117542267,
0.04614071920514107,
0.4728849530220032,
-0.26985543966293335,
0.006970788352191448,
-0.4228852689266205,
-0.07294543087482452,
0.6173526048660278,
-0.10285378247499466,
0.19673305749893... | |
override void OnStop()
{
tickTack.Stop();
}
private void tickTack_Elapsed(object sender, ElapsedEventArgs e)
{
...
}
}
```
It works for some time (like 10-15 days) then it stops. I mean the service shows as running, but it does not do anything. I make some logging ... | [
0.5252251625061035,
-0.17901505529880524,
0.7998620271682739,
-0.09882665425539017,
0.4587995409965515,
-0.22172911465168,
0.64825439453125,
0.04705164209008217,
-0.42803099751472473,
-0.18549533188343048,
-0.06454446166753769,
0.5258893370628357,
-0.3753560781478882,
0.4025751054286957,
... | |
not call the tickTack\_Elapsed function.
I was thinking about rewrite it without a timer, using an endless loop, which stops the processing for the amount of time I set up. This is also not an elegant solution and I think it can have some side effects regarding memory.
The Timer is used from the System.Timers namespa... | [
0.42512261867523193,
0.09019820392131805,
0.2681904435157776,
0.028851613402366638,
0.15296798944473267,
-0.16879646480083466,
0.11593124270439148,
-0.12035896629095078,
-0.35702332854270935,
-0.42568153142929077,
0.2130265235900879,
0.5562034249305725,
-0.44759079813957214,
0.319122046232... | |
wrong?
---
### Edit:
I edited both services. One got a nice try-catch everywhere and more logging. The second got a timer-recreation on a regular basis. None of them stopped since them, so if this situation remains for another week, I will close this question. Thank you for everyone so far.
---
### Edit:
I close ... | [
0.41458308696746826,
0.13721050322055817,
0.5194055438041687,
0.1467895805835724,
-0.009030449204146862,
0.07133296877145767,
0.4555980861186981,
0.36153000593185425,
-0.5355303287506104,
-0.37826988101005554,
0.0881175845861435,
0.34376829862594604,
-0.2340831160545349,
0.2953746318817138... | |
In my windows services I use System.Threading.Timer. It has Change(...) method which allows you to start/stop that timer. Possible place for exception could be reentrancy problem - in case when tickTack\_Elapsed executes longer than timer period. Usually I write timer loop like this:
```
void TimeLoop(object arg)
... | [
0.16890081763267517,
-0.010356073267757893,
0.3945014476776123,
-0.2416563332080841,
0.3178570568561554,
-0.14826008677482605,
0.6778745055198669,
0.20120438933372498,
-0.2793905436992645,
-0.6419792771339417,
-0.21291184425354004,
0.5350974798202515,
-0.27225521206855774,
0.45262435078620... | |
Is there a way to record the screen, either desktop or window, using .NET technologies.
My goal is something free. I like the idea of small, low cpu usage, and simple, but would consider other options if they created a better final product.
In a nutshell, I know how to take a screenshot in C#, but how would I record ... | [
0.6520220041275024,
0.1702302247285843,
0.20473648607730865,
0.28974130749702454,
0.21770109236240387,
-0.22013859450817108,
-0.13046327233314514,
0.2986506521701813,
-0.3227916657924652,
-0.9800845384597778,
0.10757022351026535,
0.5460161566734314,
-0.25138646364212036,
-0.007679731119424... | |
private Image CaptureScreen()
{
Rectangle screenSize = Screen.PrimaryScreen.Bounds;
Bitmap target = new Bitmap(screenSize.Width,screenSize.Height);
using(Graphics g = Graphics.FromImage(target))
{
g.CopyFromScreen(0,0,0,0,new Size(screenSize.Width,screenSize.Height));
... | [
0.3698624074459076,
-0.271506667137146,
0.5865228772163391,
-0.13929222524166107,
-0.07917534559965134,
-0.006621740758419037,
0.08217030018568039,
-0.20374812185764313,
-0.19792628288269043,
-0.8888756632804871,
0.15261249244213104,
0.47159743309020996,
-0.39098143577575684,
0.02879844047... | |
is needed :-). | [
-0.11735831201076508,
0.02412920631468296,
0.3995307981967926,
0.19002312421798706,
0.3600349724292755,
0.06387341022491455,
-0.06298687309026718,
-0.15668520331382751,
0.1212167888879776,
-0.4467897415161133,
-0.44783803820610046,
0.5840346217155457,
0.10207422077655792,
-0.20915727317333... | |
To help users, I would like my code to discover Oracle databases on the LAN. I thought to do this by first detecting all hosts, then checking each host to see if it is listening on Oracle's default port.
Any ideas how to go about this? Preferably in Java, but any language or algorithm would do.
Are you using DHCP? If ... | [
0.5359684824943542,
0.12546272575855255,
-0.04188018664717674,
0.3003039062023163,
-0.040338754653930664,
-0.3577878475189209,
0.033884789794683456,
0.06651429831981659,
-0.16714049875736237,
-0.5195279717445374,
0.18101441860198975,
0.5410333275794983,
-0.18173062801361084,
-0.07061877846... | |
see if it accepts the connection.
It should be pretty simple to implement as a shell script with half a dozen lines or so. Java seems like overkill for something like this. Loop through the leases file, grab the IP from each lease, and telnet to the Oracle port; if it connects, disconnect and print the IP to standard ... | [
0.3832218647003174,
-0.12644536793231964,
0.030681822448968887,
0.13118357956409454,
0.20428813993930817,
-0.10726695507764816,
0.057817794382572174,
-0.04214666411280632,
0.10246770083904266,
-0.5661611557006836,
-0.1254711151123047,
0.7357892394065857,
-0.09466218948364258,
-0.0013422996... | |
I once came across a validation framework for java, where you wrote one method that protected the integrity of the data-type and any CRUD operations on that data-type automatically called this method.
Does anyone know what this framework is? I simply want to avoid repetitive validation on every CRUD method attached to... | [
0.6723200678825378,
0.37944310903549194,
-0.07017379254102707,
0.12376564741134644,
-0.25614696741104126,
-0.31466343998908997,
0.09845918416976929,
0.08332416415214539,
-0.2133752852678299,
-0.17328210175037384,
0.5448101758956909,
0.4600643813610077,
-0.17331793904304504,
0.0720751360058... | |
Could someone tell me how the field "Task Group" is used in standard SharePoint Task Lists?
I believe it to be a "support" type column. It doesn't really get shown anywhere by default but it's filtered against during the usage of one type of view.
The naming convention they chose isn't very intuitive. Basically when y... | [
0.2502290904521942,
0.07999487221240997,
0.246977761387825,
0.08919581025838852,
0.0435405895113945,
0.14085030555725098,
-0.03437377139925957,
0.13897418975830078,
-0.46545708179473877,
-0.6338986754417419,
0.006972655653953552,
0.2636515498161316,
-0.15790705382823944,
0.3524619340896606... | |
groups' view then this field would be evaluated, e.g., "is visitor a member of this group, if yes, display task". HTH | [
-0.21043530106544495,
0.04739775508642197,
0.5093456506729126,
0.06064784526824951,
-0.386563241481781,
-0.041337404400110245,
-0.011526593007147312,
-0.10720193386077881,
-0.48055046796798706,
-0.6157108545303345,
-0.3975279629230499,
0.13315676152706146,
-0.061084501445293427,
0.06655494... | |
How can I get an application to write debug text to the Event Log window in the Delphi IDE (Borland Developer Studio 2006)?
How does one change the color of the text?
[OutputDebugString](http://msdn.microsoft.com/en-us/library/aa363362(VS.85).aspx)('Hello,World');
I think you may need to add Windows to your 'uses' li... | [
-0.020029287785291672,
-0.09945408999919891,
0.25531941652297974,
-0.1359053999185562,
0.030346132814884186,
0.10235168039798737,
0.3135189414024353,
0.11719407141208649,
-0.27316993474960327,
-0.6612514853477478,
-0.015892144292593002,
0.41169318556785583,
-0.4117300808429718,
0.006725377... | |
I have several lists in a sitecollection that are currently using ListTemplateID 101 (DocumentLibary). I want to attach an eventhandler to these lists, but if I attach the event to list 101 all of the document libaries in the sitecollection will get this eventhandler.
I do not want to programatically attach the event... | [
0.6671022176742554,
-0.09240008890628815,
0.024427182972431183,
0.13875851035118103,
0.08521946519613266,
-0.36379653215408325,
0.17143191397190094,
-0.0565534308552742,
-0.3557693064212799,
-0.8119314908981323,
0.1860784888267517,
0.4035990536212921,
-0.2791540324687958,
0.043902616947889... | |
the lists have been created, the ListTemplateID is stored in the database and there is no supported way of changing it. | [
0.25821325182914734,
0.04815516620874405,
0.6178421974182129,
0.20104919373989105,
0.045142948627471924,
-0.2963979244232178,
0.07283546775579453,
-0.07067708671092987,
-0.44019225239753723,
-0.6429611444473267,
-0.169206440448761,
0.04481688141822815,
-0.3052352964878082,
0.38244959712028... | |
I am building a calculator in C#.
I am not sure what the best way is to have it increment a number in an array every time the button is pressed. Here is one of my current button event handler methods:
```
//Assign button '2' to 2 with array address of 1
private void num2_Click(object sender, EventArgs e)
... | [
-0.13583101332187653,
-0.13486561179161072,
0.34621700644493103,
-0.22598376870155334,
0.20984847843647003,
0.24517375230789185,
-0.0217589158564806,
-0.23767361044883728,
-0.20811699330806732,
-0.6900151371955872,
0.09655575454235077,
0.6934168338775635,
-0.39393144845962524,
-0.031112400... | |
gets increased by 2. Right now, it just gets set to 2 no matter how many times the button is pressed.
Thanks so much!
Use UnitOfWorkApplication. [Here's how](http://lunaverse.wordpress.com/2008/07/13/rhino-commons-with-ms-mvc/). | [
0.25824517011642456,
-0.4644126296043396,
0.6671637892723083,
0.06641579419374466,
-0.18351005017757416,
0.21558168530464172,
0.08752292394638062,
-0.31488481163978577,
-0.7955084443092346,
-0.4622252583503723,
0.0885392278432846,
0.5592862963676453,
-0.13999108970165253,
0.226870790123939... | |
I have a table (T1) in t-sql with a column (C1) that contains almost 30,000 rows of data.
Each column contains values like MSA123, MSA245, MSA299, etc. I need to run an update script so the MSA part of the string changes to CMA. How can I do this?
```
update t1
set c1 = replace(c1,"MSA","CMA")
where c1 like "MSA%"
``` | [
0.02336486056447029,
0.3356406092643738,
0.3120362460613251,
-0.158157080411911,
0.11402097344398499,
0.23198793828487396,
0.15955407917499542,
-0.314617782831192,
-0.3261552155017853,
-0.5455689430236816,
-0.02125619724392891,
0.3349318504333496,
-0.35480669140815735,
0.16240853071212769,... | |
I was wondering when most people wrote their unit tests, if at all. I usually write tests after writing my initial code to make sure it works like its supposed to. I then fix what is broken.
I have been pretty successful with this method but have been wondering if maybe switching to writing the test first would be ad... | [
0.6134328246116638,
-0.04711637273430824,
0.13796645402908325,
-0.0313071683049202,
-0.3079310357570648,
0.13282757997512817,
0.5287714004516602,
-0.34481897950172424,
0.14140577614307404,
-0.6821048855781555,
-0.10051095485687256,
0.8851991295814514,
-0.04458973556756973,
-0.3392692208290... | |
tests *if required* for better coverage, exceptional paths, etc. [rare but worth consideration]
5. repeat with next feature
it is easy to get excited and start coding the feature first, but this often means that you will not think through all of the public interfaces in advance.
EDIT: note that if you write the code ... | [
0.8024025559425354,
-0.18225142359733582,
0.02332972176373005,
0.2309962958097458,
-0.07545968145132065,
-0.4161384403705597,
0.5384455323219299,
-0.250105619430542,
0.053067732602357864,
-0.8570662140846252,
-0.12160273641347885,
0.655268669128418,
0.10743021965026855,
-0.3137125372886657... | |
I want to change the text of a radio button (HTML element), not an ASP.NET component.
How can I change it from ASP.NET?
Add a simple:
```
runat="server"
```
to your HTML tag and it will allow a few of the properties to be modified through code behind.
These are known as "hybrid controls." | [
0.5673925876617432,
-0.3391140401363373,
0.5750792026519775,
0.005060411058366299,
0.1197643056511879,
-0.19840969145298004,
0.15306456387043,
-0.10497402399778366,
0.11744844913482666,
-0.559489369392395,
-0.025459880009293556,
0.6396268606185913,
-0.5439524054527283,
0.001725080888718366... | |
When I start a new ASP.NET project in Visual Studio, I can create an ASP.NET Web Application or I can create an ASP.NET Web Site.
What is the difference between ASP.NET Web Application and ASP.NET Web Site? Why would I choose one over other?
Is the answer different based on which version of Visual Studio I am using?
... | [
0.6286410689353943,
-0.03094135969877243,
0.21786046028137207,
0.39748960733413696,
-0.24045458436012268,
-0.1305808126926422,
0.11362970620393753,
-0.03071599267423153,
-0.4066637456417084,
-0.8755185008049011,
0.038119278848171234,
0.47608110308647156,
-0.18052266538143158,
0.11414070427... | |
another directory since the other directory may not be compiled into the code yet. Another problem can be in publishing.
If Visual Studio isn't told to re-use the same names constantly, it will come up with new names for the DLL files generated by pages all the time. That can lead to having several close copies of DLL... | [
0.24346545338630676,
-0.06624898314476013,
0.38394132256507874,
0.19261208176612854,
-0.43621355295181274,
-0.3153127133846283,
0.18137231469154358,
0.050234321504831314,
-0.32617834210395813,
-0.6323642134666443,
0.10353503376245499,
0.341823548078537,
-0.5297031402587891,
0.1529933959245... | |
as part
of SP 1 for Visual Studio 2005. The main differences are the Web Application Project
was designed to work similarly to the Web projects that shipped with Visual Studio 2003. It will compile the application into a single DLL file at build
time. To update the project, it must be recompiled and the DLL file
publis... | [
0.04842740297317505,
0.01683136634528637,
0.30465903878211975,
0.0006592327845282853,
-0.5257710814476013,
-0.42476627230644226,
0.22117535769939423,
-0.39766231179237366,
-0.486014723777771,
-0.30461743474006653,
-0.18171977996826172,
0.4208613336086273,
-0.6261831521987915,
0.06380800157... | |
track of which files to include/exclude from the project view without
renaming them, making things much tidier.
*[Reference](https://web.archive.org/web/20081211085108/http://www.megasolutions.net/AspNet/difference-between-Web-Site-and-Web-Application-Project-27210.aspx)*
The article *[ASP.NET 2.0 - Web Site vs Web A... | [
0.17077244818210602,
-0.03314488008618355,
0.10029464960098267,
-0.03515002876520157,
-0.1332067847251892,
-0.14933061599731445,
-0.05758582428097725,
-0.46143200993537903,
-0.5025431513786316,
-0.35106703639030457,
0.016634557396173477,
0.5747828483581543,
-0.17329047620296478,
0.00195150... | |
* You need to build a Web application using multiple Web
> projects? **use the Web Application project.**
> * You want to generate one assembly for each page? **use the Web Site project.**
> * You prefer dynamic compilation and working on pages without building
> entire site on each page view? **use Web
> Site project.... | [
0.5317685604095459,
0.009357177652418613,
-0.05295490100979805,
0.08315248042345047,
-0.1973068118095398,
0.06915131956338882,
0.16247813403606415,
-0.1887853443622589,
-0.5446110367774963,
-0.8765468001365662,
-0.23367977142333984,
0.328748881816864,
-0.11335476487874985,
0.10198137164115... | |
It's quite possible a question like this has been asked before, but I can't think of the terms to search for.
I'm working on a photo gallery application, and want to display 9 thumbnails showing the context of the current photo being shown (in a 3x3 grid with the current photo in the centre, unless the current photo i... | [
0.5619490742683411,
0.22166550159454346,
0.4691106975078583,
0.19834798574447632,
0.020532306283712387,
0.2875334620475769,
-0.12781399488449097,
-0.2758186459541321,
-0.40329527854919434,
-0.37413203716278076,
0.1524631679058075,
0.2276628464460373,
-0.08532843738794327,
0.057245694100856... | |
13, 18, 19, 20, 21, 22, 23, 25, 26
If the current photo is 19, I want to also view:
9, 12, 13, 18, 19, 20, 21, 22, 23
If the current photo is 5, I want to also view:
1, 5, 9, 12, 13, 18, 19, 20, 21
I've been thinking of something along the lines of:
```
SELECT *
FROM photos
WHERE ABS(id - currentphoto) < 5
ORDER ... | [
0.343673974275589,
0.043306078761816025,
0.5170485377311707,
0.1564941555261612,
0.17556938529014587,
0.39077088236808777,
0.21957123279571533,
-0.13519568741321564,
-0.6038343906402588,
-0.4136676788330078,
-0.15295568108558655,
0.4082731306552887,
-0.09980744868516922,
0.1320730447769165... | |
is unclear, and I'll clarify the question. If anyone can think of a more useful title to help other people find this question in future, then please comment too.
Probably could just use a UNION, and then trim off the extra results in the procedural code that displays the results (as this will return 20 rows in the non-... | [
0.3613131046295166,
0.004734116140753031,
0.4673968255519867,
0.23645810782909393,
0.30286407470703125,
-0.02370910719037056,
-0.11949586123228073,
-0.5572807788848877,
-0.16846244037151337,
-0.7308986186981201,
-0.029493246227502823,
0.34013575315475464,
-0.16812823712825775,
0.1349370479... | |
LIMIT 10)
ORDER BY ID ASC
```
EDIT: Increased limit to 10 on both sides of the UNION, as suggested by **le dorfier**.
EDIT 2: Modified to better reflect final implementation, as suggested by Dominic. | [
-0.04216688498854637,
-0.12222396582365036,
0.6236143708229065,
-0.2955070734024048,
-0.02303970418870449,
0.26310408115386963,
0.061154190450906754,
-0.39460769295692444,
-0.36658039689064026,
-0.5293740630149841,
-0.2058556079864502,
0.22496967017650604,
-0.36754003167152405,
-0.09717538... | |
How can you modify the URL for the current page that gets passed to Google Analytics?
(I need to strip the extensions from certain pages because for different cases a page can be requested with or without it and GA sees this as two different pages.)
For example, if the page URL is `http://mysite/cake/ilikecake.html... | [
0.5798598527908325,
0.06987103074789047,
0.41279110312461853,
0.18141968548297882,
-0.4609852135181427,
0.059759560972452164,
0.22967061400413513,
-0.10002867877483368,
-0.2356078028678894,
-0.7041047215461731,
-0.09180624037981033,
0.5870869755744934,
-0.08723492175340652,
-0.001228088862... | |
possibilities come to mind:
1. it can take a while, up to about 24 hours, for visits to be reflected in the Analytics statistics. How long ago did you make your change?
2. try beginning the pathname with a "/", so
```
pageTracker._trackPageview('/cake/ilikecake');
```
and then wait a bit, as per the first item. | [
0.4503385126590729,
-0.43139657378196716,
0.456194132566452,
0.2721327543258667,
0.34031856060028076,
0.10086390376091003,
0.09606213122606277,
0.1462911069393158,
-0.14266596734523773,
-0.6279111504554749,
0.22375346720218658,
0.2623780071735382,
0.38038742542266846,
0.012988266535103321,... | |
Hi What is the best way to do nested try & finally statements in delphi?
```
var cds1 : TClientDataSet;
cds2 : TClientDataSet;
cds3 : TClientDataSet;
cds4 : TClientDataSet;
begin
cds1 := TClientDataSet.Create(application );
try
cds2 := TClientDataSet.Create(application );
try
... | [
-0.2953164279460907,
-0.03804734721779823,
0.8828906416893005,
-0.18914110958576202,
-0.19106896221637726,
-0.39545488357543945,
0.20019517838954926,
-0.5120866894721985,
0.1974029839038849,
-0.11458706855773926,
-0.4433208703994751,
0.5652027130126953,
-0.5996391177177429,
-0.181419432163... | |
:= TClientDataSet.Create(application );
try
///////////////////////////////////////////////////////////////////////
/// DO WHAT NEEDS TO BE DONE
///////////////////////////////////////////////////////////////////////
finally
cds4.free;
end;
finally
... | [
0.38819825649261475,
-0.18697403371334076,
0.9901777505874634,
0.33869364857673645,
0.05370938405394554,
-0.33090776205062866,
0.035774022340774536,
-0.28157755732536316,
-0.016747383400797844,
-0.22974008321762085,
-0.31135115027427673,
0.5533033013343811,
-0.34647154808044434,
0.07168562... | |
cds2.free;
end;
finally
cds1.free;
end;
end;
```
Can you Suggest a better way of doing this?
how about the following:
```
var cds1 : TClientDataSet;
cds2 : TClientDataSet;
cds3 : TClientDataSet;
cds4 : TClientDataSet;
begin
cds1 := Nil;
cds2 := Nil;
cds3 := Nil;
cds... | [
-0.19923849403858185,
-0.19348473846912384,
0.5797223448753357,
-0.3048884868621826,
-0.3241936266422272,
-0.35704317688941956,
-0.09177770465612411,
-0.3562111258506775,
0.1683638095855713,
-0.29793834686279297,
-0.433136522769928,
0.5996243357658386,
-0.5845289826393127,
0.17705442011356... | |
cds2 := TClientDataSet.Create(nil);
cds3 := TClientDataSet.Create(nil);
cds4 := TClientDataSet.Create(nil);
///////////////////////////////////////////////////////////////////////
/// DO WHAT NEEDS TO BE DONE
///////////////////////////////////////////////////////////////////////... | [
-0.15687468647956848,
-0.004917810205370188,
0.5153016448020935,
0.06169254332780838,
-0.05973415449261665,
-0.49326714873313904,
0.0014997971011325717,
-0.3105161786079407,
-0.27423450350761414,
-0.3977535665035248,
-0.37104520201683044,
0.5683783888816833,
-0.42421889305114746,
0.0435792... | |
failure will result in dropping to the finally and performing all of the cleanup in the example you provided.
Personally I try not to nest within the same method... with the exception being a try/try/except/finally scenario. If I find myself needing to nest, then to me that is a great time to think refactoring into an... | [
0.15392573177814484,
0.20286530256271362,
-0.01861419528722763,
-0.10502263903617859,
0.08661352843046188,
0.12470816820859909,
0.6844749450683594,
-0.05431830883026123,
-0.3530847728252411,
-0.700248122215271,
-0.1380212903022766,
0.48245006799697876,
-0.20219865441322327,
0.1480343937873... | |
Let's say I have my pizza application with Topping and Pizza classes and they show in Django Admin like this:
```
PizzaApp
-
Toppings >>>>>>>>>> Add / Change
Pizzas >>>>>>>>>> Add / Change
```
But I want them like this:
```
PizzaApp
-
Pizzas >>>>>>>>>> Add / Change
Toppings ... | [
0.36821603775024414,
0.4253357946872711,
0.08417060971260071,
-0.18937934935092926,
-0.06594393402338028,
0.11121363192796707,
-0.20573893189430237,
0.031792834401130676,
-0.07672600448131561,
-0.6810545325279236,
-0.013417195528745651,
0.6790704727172852,
-0.10427846014499664,
-0.19015006... | |
[Writing your first Django app, part 7](https://docs.djangoproject.com/en/3.0/intro/tutorial07/).
Here's the relevant section:
> **Customize the admin index page**
>
>
> On a similar note, you might want to
> customize the look and feel of the
> Django admin index page.
>
>
> By default, it displays all the app... | [
0.18266603350639343,
0.13870224356651306,
0.5292488932609558,
-0.25143054127693176,
-0.41435977816581726,
-0.1732281893491745,
-0.1112489104270935,
-0.1405642032623291,
-0.3302430808544159,
-0.5799081325531006,
-0.04420051351189613,
0.6212660074234009,
-0.6021713614463806,
-0.5296829938888... | |
The template to customize is
> admin/index.html. (Do the same as with
> admin/base\_site.html in the previous
> section -- copy it from the default
> directory to your custom template
> directory.) Edit the file, and you'll
> see it uses a template variable called
> app\_list. That variable contains every
> ins... | [
0.3337555229663849,
0.13819968700408936,
0.4978327453136444,
-0.032329607754945755,
-0.11594482511281967,
-0.16992588341236115,
-0.009302460588514805,
-0.26110583543777466,
-0.1891423463821411,
-0.9914094805717468,
-0.09703946858644485,
0.46772500872612,
-0.6881886720657349,
-0.13902306556... | |
I just installed the FindBugs plugin for Eclipse, with the hope that it will help me find SQL injection vulnerabilities in my code. However, it doesn't seem to be finding anything, even when I deliberately put some in.
In the following examples, assume `staticFinalBaseQuery` is declared as follows:
public static fin... | [
0.18379640579223633,
-0.0613655224442482,
0.5517787933349609,
-0.26288992166519165,
-0.13568826019763947,
-0.2876628041267395,
0.18080061674118042,
-0.1486726701259613,
-0.05711173638701439,
-0.27193325757980347,
-0.15273088216781616,
0.6120834946632385,
-0.49480098485946655,
0.09990014135... | |
is a static final string, and `userInputfilterString` is a string direct from user input, available only at runtime, not scrubbed at all. Clearly, this is a vulnerability.
I expect the "[A prepared statement is generated from a nonconstant String](http://findbugs.sourceforge.net/bugDescriptions.html#SQL_PREPARED_STATE... | [
0.07153153419494629,
0.13327324390411377,
0.22663040459156036,
-0.23356802761554718,
0.05219362676143646,
-0.32479384541511536,
0.6134217381477356,
0.022124415263533592,
-0.13833501935005188,
-0.44946855306625366,
-0.631749153137207,
0.377846896648407,
-0.4132618308067322,
0.33143422007560... | |
first example? I am also curious **why** the first doesn't cause a warning, but the last does?
Thanks in advance!
**EDIT**: I [submitted a bug](https://sourceforge.net/tracker2/?func=detail&aid=2475589&group_id=96405&atid=614693) to FindBugs's bug tracking system, as it seems this might be a bug. However, if anyone h... | [
0.2971150279045105,
0.07066160440444946,
0.13936561346054077,
0.08055554330348969,
0.050103556364774704,
-0.33386918902397156,
0.4030988812446594,
0.17825010418891907,
-0.14961257576942444,
-0.46965736150741577,
-0.11329975724220276,
0.46603095531463623,
-0.36530280113220215,
-0.0959540605... | |
but not on the line with mere string concatenation.
Basically, this isn't a bug, but a limitation of how much can be done by software to check for SQL injection. Since the string may contain *anything* (i.e. it could have the vulnerable concatenation in another function) it is impossible to have the tool determine wit... | [
0.10562357306480408,
0.032664306461811066,
-0.15311598777770996,
0.18168902397155762,
0.0825115442276001,
-0.4671671390533447,
0.35932180285453796,
0.2478395253419876,
-0.22937577962875366,
-0.4295145869255066,
-0.24788929522037506,
0.5786245465278625,
-0.2724965214729309,
0.11576153337955... | |
We're having a small issue and could use some help - we have the need to combine multiple resultsets from one stored procedure into one resultset (the limitation of our Java reporting framework). We've looked at Union, etc. but the problem is that the stored procedure resultsets are multiple crosstab results and the (1... | [
0.25142139196395874,
0.13406255841255188,
0.5371934175491333,
0.049937013536691666,
0.11332126706838608,
0.29420357942581177,
0.31055447459220886,
-0.8063786029815674,
-0.3717758357524872,
-0.5556209683418274,
0.2109176218509674,
0.1658061295747757,
-0.5195391774177551,
-0.0008058492676354... | |
above text as-is which our framework would print to the user. Also please note that these 3-4 resultsets are not related to each other.
We're using SQL Server 2000 and Java 1.4.
Any advice would be appreciated.
Thanks,
SP
PS: An alternative explaination in case the one above is not very clear.
In SQL Query Analyze... | [
0.34337905049324036,
0.0010203301208093762,
0.5746322870254517,
0.33247047662734985,
0.15071521699428558,
0.1424485445022583,
-0.09158535301685333,
-0.27765947580337524,
-0.36372944712638855,
-0.624812126159668,
-0.3440469801425934,
-0.08396220207214355,
-0.2368791252374649,
0.159647494554... | |
the columns due to the crosstab-ing taking place).
Thanks.
Your question does not specify which database vendor, or which client application framework you are using, but most databases with stored procs have the capability to return multiple resultsets, and the few client frameworks I am familiar with (VB6, C++, .Net, ... | [
0.2597558796405792,
0.008579774759709835,
0.5405259728431702,
0.4848906397819519,
-0.1535554975271225,
0.05663897842168808,
-0.08543837815523148,
-0.12042631208896637,
-0.3843179941177368,
-0.48170191049575806,
0.056816454976797104,
0.3351072371006012,
-0.19447392225265503,
0.2107766270637... | |
the database, then you could do this:
```
Select ID, Name as value1, null as value2
From TableA
Union
Select ID, FName as value1, LName as value2
From TableB
Union
Select ID, Cast(Amount as VarChar(20)) as value1, null as value2
From TableC
```
The key is that the number of columns returned by... | [
-0.05136875808238983,
-0.15756098926067352,
0.39405912160873413,
0.06650719791650772,
0.0519413985311985,
0.21177756786346436,
-0.2515570819377899,
-0.3681938648223877,
-0.22054609656333923,
-0.43855226039886475,
0.10903819650411606,
0.3263777792453766,
-0.31296199560165405,
0.365144163370... | |
We looking to build an application to maintain meeting minutes and similar stuff using .net. I was thinking of using [db4o](http://www.db4o.com/about/productinformation/) or some OODB for this. Is it a bad idea? I am looking to simply create a repository of meeting minutes where users can perform lookups by date and li... | [
0.4426686763763428,
-0.08968425542116165,
0.1474894881248474,
0.2566889822483063,
0.05306084081530571,
-0.24649740755558014,
-0.027714775875210762,
0.038472190499305725,
-0.21561476588249207,
-0.6504662036895752,
0.1887536346912384,
0.3599047362804413,
-0.24705655872821808,
-0.083578854799... | |
why don't you try sqlite instead? | [
0.380677729845047,
0.1216757744550705,
-0.17973801493644714,
0.3145172595977783,
0.002108544809743762,
-0.14364629983901978,
-0.10914713144302368,
0.4081020653247833,
-0.17381246387958527,
-0.340843141078949,
0.4189116060733795,
0.3371754288673401,
-0.23925499618053436,
-0.0432416871190071... | |
Our application uses Hibernate for ORM, and stores data in several schemas, accessing them with a user whose grants are customized for the application.
The schema names are determined at runtime based on data; it's not feasible to include their names in the entity mapping documents. This means that I need a way to tel... | [
0.24802738428115845,
0.03337347134947777,
0.7349331378936768,
0.042320240288972855,
-0.07359563559293747,
-0.39286738634109497,
0.0890723392367363,
-0.4076811969280243,
-0.2154231071472168,
-0.44273316860198975,
-0.09723076224327087,
0.3683198392391205,
-0.35340967774391174,
0.056459933519... | |
well. | [
-0.06034502387046814,
0.07335762679576874,
0.25588366389274597,
0.11408231407403946,
0.2900284230709076,
-0.24014221131801605,
0.1821618676185608,
0.047716714441776276,
0.05080713331699371,
-0.1601426601409912,
0.15348441898822784,
0.041998930275440216,
0.17971153557300568,
0.1957090944051... | |
If I was to integrate a third-party GPLv3,v2 or LGPL django app in my django project, would the licence apply to the complete project or just the third-party application I'm using?
GPLv2 isn't so viral on web apps, since you're not distributing.
GPLv3 might be, there's some extra wording for this case.
usually it's be... | [
0.5564204454421997,
0.5056087374687195,
-0.039119455963373184,
-0.01203110720962286,
-0.07732692360877991,
-0.6076588034629822,
0.0015739371301606297,
0.017387349158525467,
-0.3013678193092346,
-0.1857355535030365,
-0.04033903777599335,
0.6760384440422058,
-0.3488187789916992,
0.0552167631... | |
the legalese says.
(AINAL) | [
0.28590378165245056,
0.3190760314464569,
0.12240429222583771,
-0.3008011281490326,
0.03584287688136101,
0.01281999982893467,
0.10503631830215454,
-0.20943006873130798,
-0.08009469509124756,
-0.2752038538455963,
-0.14264069497585297,
0.773432195186615,
-0.029566029086709023,
0.1016750782728... | |
A friend was in need of an algorithm that would let him loop through the elements of an NxM matrix (N and M are odd). I came up with a solution, but I wanted to see if my fellow SO'ers could come up with a better solution.
I'm posting my solution as an answer to this question.
**Example Output:**
For a 3x3 matrix, t... | [
-0.07605869323015213,
0.2848210632801056,
0.4536610543727875,
-0.15507350862026215,
0.010680917650461197,
0.354011207818985,
0.49044445157051086,
-0.4118254482746124,
-0.11452874541282654,
-0.08566192537546158,
-0.1443578153848648,
0.0841236338019371,
-0.33599337935447693,
-0.0434534959495... | |
-1)
(2, 0)
(2, 1)
(-2, 1)
(-2, 0)
(-2, -1)

Here's my solution (in Python):
```python
def spiral(X, Y):
x = y = 0
dx = 0
dy = -1
for i in range(max(X, Y)**2):
if (-X/2 < x <= X/2) and (-Y/2 < y <= Y/2):
print (x, y)
# DO... | [
-0.037368208169937134,
0.16061046719551086,
0.6670306921005249,
-0.15420038998126984,
0.16427025198936462,
0.16159039735794067,
0.2984587550163269,
-0.5742904543876648,
-0.15627500414848328,
-0.13457879424095154,
-0.2909345328807831,
0.528934895992279,
-0.3156093657016754,
-0.0855641067028... | |
(x < 0 and x == -y) or (x > 0 and x == 1-y):
dx, dy = -dy, dx
x, y = x+dx, y+dy
``` | [
-0.03316012769937515,
0.12591829895973206,
0.006867034360766411,
-0.1367662400007248,
-0.11886299401521683,
0.242022305727005,
0.2142353355884552,
-0.30762770771980286,
0.23227718472480774,
-0.294757604598999,
-0.6962960362434387,
0.5169046521186829,
-0.22801832854747772,
0.268462896347045... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.