text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I want to use IE8 as a WebBrowser control in a C# application. How can I disable "quirks mode" and force IE into standards compliance (as far as it is implemented)?
I think the issue you're facing is described in [IEBlog: WebBrowser Control Rendering Modes in IE8](http://blogs.msdn.com/ie/archive/2008/03/18/webbrowser-... | [
0.3840530812740326,
0.07126548141241074,
0.6653655767440796,
0.12030690163373947,
-0.00873237382620573,
-0.2091357558965683,
0.4044419825077057,
-0.07894444465637207,
0.0021569374948740005,
-0.6490699648857117,
-0.017038870602846146,
0.5972549319267273,
-0.25884535908699036,
0.266928315162... | |
in working order,
> **IE8 renders pages running within
> instances of the WebBrowser control in
> IE7 Standards Mode by default.**
Here I should note that the comments on the page say the above is incorrect, and that "**IE8 renders pages running within instances of the WebBrowser control in IE7 Strict Mode OR Quirk... | [
-0.18442228436470032,
-0.03684871643781662,
0.8020976781845093,
-0.09772997349500656,
-0.010387693531811237,
-0.09398438781499863,
0.4487966299057007,
-0.08149471879005432,
-0.07767799496650696,
-0.8115357160568237,
-0.4361172020435333,
0.5410940051078796,
-0.3828168213367462,
0.0600365623... | |
>
> To run in IE8 Standards Mode insert
> the following registry value:
>
>
> `[HKEY_CURRENT_USER\Software\Microsoft\Internet
> Explorer\Main\FeatureControl\FEATURE_NATIVE_DOCUMENT_MODE]`
>
>
> `"MyApplication.exe"=dword:13880`
>
>
> In both of these instances,
> MyApplication.exe should be replaced
> with t... | [
0.03164944797754288,
-0.06760576367378235,
0.7226276993751526,
0.14434359967708588,
0.2082424759864807,
-0.36872026324272156,
0.3978075683116913,
-0.1248776763677597,
0.2031143605709076,
-0.5751940608024597,
-0.21260188519954681,
0.5956966876983643,
-0.1919148862361908,
0.1237839087843895,... | |
I'm using PHP and PHPMyAdmin to create a small profile site.
I'm giving members an ID number, based on which is the biggest number currently in the database, +1
I did 25 tests before I got the PHP script where I wanted it to be.
I then deleted those 25 entries using PHPMyAdmin.
But now, when my PHP code does this:
... | [
0.6067695021629333,
-0.03679583966732025,
0.3374987542629242,
-0.06713250279426575,
-0.04832853004336357,
-0.001778873149305582,
0.5322761535644531,
-0.42106008529663086,
-0.14262840151786804,
-0.45536214113235474,
0.23709836602210999,
0.33518844842910767,
-0.38231390714645386,
0.256879776... | |
scenario: the database table holds 3 entries, with ID's 1, 2 and 3.
I start a debugging session and put a breakpoint on the return `$record[0]`.
I check its contents and instead of 3, which is the biggest number, it's 28.
As in 25+3=28, the 25 entries that I allready deleted...
Does anybody know what's causing this ... | [
0.013422190211713314,
0.22690385580062866,
-0.01620044931769371,
0.06703504174947739,
0.25388988852500916,
0.36241739988327026,
0.40857353806495667,
-0.30248549580574036,
-0.19606752693653107,
-0.5278455018997192,
0.19216914474964142,
0.46758604049682617,
-0.4105728566646576,
0.33630070090... | |
I'm trying to update one of my objects in my rails app and the changes just don't stick. There are no errors, and stepping through with the debugger just reveals that it thinks everything is updating.
Anyway, here is the code in question...
```
qm = QuestionMembership.find(:first, :conditions => ["question_id = ? A... | [
-0.14645271003246307,
0.10199052840471268,
0.31400516629219055,
0.17317384481430054,
0.05418148264288902,
0.0829799547791481,
0.1317262053489685,
-0.21922478079795837,
0.08452527225017548,
-0.6686252951622009,
-0.07749255001544952,
0.41891953349113464,
-0.08295534551143646,
0.0693067088723... | |
the object does get changed to the value of x, and save returns 'true'.
However, after the method exits, the object in the db is unchanged.
What am I missing?
Turns out that it was emitting the wrong SQL. Basically it was looking for the QuestionMembeship object by the id column which doesn't exist.
I was under the... | [
0.22801242768764496,
0.2554348409175873,
0.2716659903526306,
-0.018157217651605606,
-0.2933739125728607,
-0.0865832194685936,
0.6085314750671387,
-0.051120858639478683,
0.06098499894142151,
-0.4756506085395813,
0.29583868384361267,
0.6742285490036011,
-0.23286771774291992,
0.49746125936508... | |
Does anyone have any good intuition for a good hash function for a sparse bit vector?
To give a concrete example, say I want to hash a 4096 bit integer where the probability of each bit being 1 is 10%.
I want to get some compression in the hash. For example 4096 bits in and 32 bits out. This is just an example to illu... | [
-0.16441234946250916,
-0.12007785588502884,
0.06189727783203125,
0.010091593489050865,
-0.094426728785038,
-0.020549720153212547,
-0.03082144446671009,
-0.06487052887678146,
-0.2258358746767044,
-0.743171751499176,
0.1110619604587555,
0.4157457947731018,
-0.30435773730278015,
-0.1807512044... | |
I'm using an `NSArrayController`, `NSMutableArray` and `NSTableView` to show a list of my own custom objects (although this question probably applies if you're just showing a list of vanilla `NSString` objects too).
At various points in time, I need to clear out my array and refresh the data from my data source. Howev... | [
0.12056678533554077,
-0.11842809617519379,
0.4816163182258606,
-0.09668945521116257,
-0.2680937647819519,
-0.2940104007720947,
0.5266919136047363,
0.001021451666019857,
-0.38201409578323364,
-0.5934675931930542,
-0.1811555027961731,
0.6765725016593933,
-0.3630546033382416,
0.21757300198078... | |
is updated.)
The cleanest way I've managed to cause this happen correctly is:
```
[self willChangeValueForKey:@"myArray"];
[myArray removeAllObjects];
[self didChangeValueForKey:@"myArray"];
```
...so I'm kind of having to do the KVO notification manually myself (this is in my test app class, that contains the `myA... | [
-0.036710940301418304,
0.20802640914916992,
0.4874108135700226,
-0.15098074078559875,
-0.13481391966342926,
-0.15365828573703766,
0.7915672659873962,
-0.026619207113981247,
-0.22832414507865906,
-0.7511983513832092,
-0.12669143080711365,
0.36697596311569214,
-0.28384190797805786,
0.2533677... | |
is at least marginally self-documenting.
Did Apple not notice that sometimes people might want to empty a list control being managed via an `NSArrayController` object? This seems kind of obvious, so I think I must be missing something...
Aside: of course, if I add new items to the array (via `NSArrayController`), the... | [
0.16632764041423798,
0.022971436381340027,
0.09278348833322525,
0.21352103352546692,
0.09514480829238892,
-0.3901720345020294,
0.30219900608062744,
0.29313647747039795,
-0.7262139916419983,
-0.4800439178943634,
-0.012452423572540283,
0.32260429859161377,
-0.1530209630727768,
0.110175572335... | |
object's items.
If you bound the array controller's content array binding to an array property of some other object, then you should be working with that property of that object. Use `[[object mutableArrayValueForKey:@"property"] removeAllObjects]`.
If, on the other hand, you haven't bound the array controller's cont... | [
-0.025149451568722725,
-0.4113052785396576,
0.3292649984359741,
0.18431241810321808,
-0.2202455699443817,
-0.19187074899673462,
-0.0024596231523901224,
-0.33953943848609924,
-0.43978315591812134,
-0.6531000733375549,
-0.10485278069972992,
0.5147308111190796,
-0.6223528385162354,
0.27672353... | |
[AMF3 specification](http://download.macromedia.com/pub/labs/amf/amf3_spec_121207.pdf) defines use of so called "reference tables" (see Section 2.2 of this specification).
I implemented this behavior in my AMF3 encoder/decoder I developed in Erlang, but being not very experienced with Flash API, I can hardly find how... | [
0.04880267381668091,
0.400520384311676,
0.32517576217651367,
-0.27847880125045776,
-0.23752373456954956,
0.20215775072574615,
0.15999126434326172,
-0.6403114199638367,
-0.3857368230819702,
-0.2675558030605316,
-0.08693511039018631,
0.2888436019420624,
-0.5828027725219727,
-0.00436443276703... | |
writeObject call, it does seem to use references:
```
ba.writeObject(["some string1", "some string1"]);
# => <<9,5,1,6,25,115,111,109,101,32,115,116,114,105,110,103,49,6,0>>
```
Socket seems to behave the same way.
So, can I make use of reference tables in Flash code? (provided I **might** have a non-standard pro... | [
0.4305524230003357,
0.3786151707172394,
0.25633886456489563,
-0.17317338287830353,
-0.22801658511161804,
0.16417428851127625,
0.04382099583745003,
-0.18539585173130035,
0.17007659375667572,
-0.45319682359695435,
0.11006923764944077,
0.7692890763282776,
-0.6416715979576111,
-0.0875440165400... | |
This isn't necessarily a way to enforce it but it seems logical that the AMF serializer built into flash would serialize objects this way so it is probably a reliable way to get the behavior your want (reference table strings).
I hope that is helpful to you! | [
0.29503902792930603,
0.0680166482925415,
0.15576140582561493,
0.523763120174408,
0.021818339824676514,
-0.5159287452697754,
0.3815769851207733,
0.09344729781150818,
-0.28995591402053833,
-0.32058602571487427,
0.17051216959953308,
0.7225697636604309,
-0.27534249424934387,
-0.062580838799476... | |
I consider myself a very experienced SQL person. But I'm failing to do these two things:
* Reduce the size of the allocated log.
* Truncate the log.
DBCC sqlperf(logspace)
returns:
```
Database Name Log Size (MB) Log Space Used (%) Status
ByBox 1964.25 30.0657 0
```
The following does not w... | [
0.13110581040382385,
0.3403719663619995,
0.4405304491519928,
-0.10619395971298218,
-0.08888737112283707,
-0.14650166034698486,
0.21939878165721893,
-0.30905166268348694,
-0.395834356546402,
-0.41586756706237793,
0.04509945213794708,
0.7789861559867859,
-0.3398341238498688,
0.35783344507217... | |
and 'SIMPLE' and a combination of all of the above. I also tried setting the compatibility to SQL Server 2005 (I use this setting as I want to match our production server) and SQL Server 2008.
No matter what I try, the log remains at 1964.25 MB, with 30% used, which is still growing.
I'd like the log to go back down ... | [
0.10748127102851868,
0.3080282509326935,
0.6995685696601868,
-0.02421853132545948,
0.03246067464351654,
-0.05584840103983879,
0.5312572717666626,
-0.17074960470199585,
-0.45830926299095154,
-0.26049914956092834,
0.05529661104083061,
0.8522261381149292,
-0.2525677978992462,
0.21137019991874... | |
tables, which I turn off when I perform a restore on my development box by using the following:
```
-- Clear out pending replication stuff
exec sp_removedbreplication
go
EXEC sp_repldone @xactid = NULL, @xact_segno = NULL,
@numtrans = 0, @time = 0, @reset = 1
go
```
Trying:
```
SELECT log_reuse_wait, log_reuse... | [
-0.20031747221946716,
0.2951871454715729,
0.5432751774787903,
0.08209015429019928,
0.061307236552238464,
0.22550806403160095,
0.315218061208725,
-0.241161048412323,
-0.8112163543701172,
-0.5940263271331787,
-0.2511308491230011,
0.6730048060417175,
-0.29997575283050537,
0.07690301537513733,... | |
up the bybox log.
BACKUP LOG bybox TO ByBoxLog
```
which returned:
```
Processed 151800 pages for database 'bybox', file 'ByBox_Data' on file 3.
Processed 12256 pages for database 'bybox', file 'ByBox_Secondary' on file 3.
Processed 1 pages for database 'bybox', file 'ByBox_1_Log' on file 3.
BACKUP DATABASE successf... | [
0.0940721407532692,
0.12338478863239288,
0.6814594268798828,
0.11401945352554321,
0.07482004165649414,
0.38384950160980225,
0.6815027594566345,
-0.5579031705856323,
-0.4869685471057892,
-0.45453688502311707,
-0.08905543386936188,
0.18340666592121124,
-0.46998247504234314,
0.340837180614471... | |
251424 251424
```
and DBCC SQLPERF(LOGSPACE) still reports 30% usage.
I think I may have to resign myself to the fact there could well be a bug in SQL Server 2008, or that my log file has been corrupted in some manner. However, my database is in good working order, which leads me to think there is a bug *(shudders ... | [
-0.11802705377340317,
0.4974905848503113,
0.4543221592903137,
-0.058765724301338196,
-0.0158292967826128,
-0.05259892717003822,
0.6232327222824097,
-0.03475756570696831,
-0.3771737813949585,
-0.563998281955719,
0.1911989152431488,
0.42752429842948914,
-0.13434475660324097,
0.28934857249259... | |
solution is to make the log expand. | [
-0.282100647687912,
-0.15697988867759705,
0.49994993209838867,
0.02362940087914467,
0.5484210252761841,
-0.007490233983844519,
-0.07298994064331055,
-0.32229161262512207,
-0.4166885316371918,
-0.5349416732788086,
-0.22427479922771454,
0.19256581366062164,
-0.14908359944820404,
0.1456101238... | |
I was kindly helped a few minutes ago by a user named Juliano and the script works fine but it just baffles me why it continues to work when I press enter, if I don't it just sits there untill I have to keep pressing enter. I thought that was the job of the for loop?
```
#!/bin/bash
TIMEFORMAT=%6R
for file... | [
0.5532553195953369,
0.3877578675746918,
0.170578271150589,
-0.13458482921123505,
0.07808195054531097,
-0.05667855963110924,
0.48250463604927063,
-0.3761073648929596,
-0.3360218107700348,
-0.5766149163246155,
-0.05371558666229248,
0.7099300622940063,
-0.025818008929491043,
0.058725722134113... | |
#for loop 3
for ext in avi mpg wmv mov; do
base="${file##*/}"
elapsed=$({ time ffmpeg -i "$file" -ar 44100 "${file%/*}/done/${base%.*}.$ext" &>/dev/null; } 2>&1)
echo "$file $i $ext took $elapsed seconds"
done
done
done
```
Also can I swap for loops 2 and 3?
Than... | [
0.14245711266994476,
-0.1843826174736023,
0.3490583896636963,
-0.2651865482330322,
-0.21852056682109833,
0.1439289152622223,
0.7180719971656799,
-0.7879690527915955,
-0.42376312613487244,
-0.12731747329235077,
0.0721079632639885,
0.41868141293525696,
-0.5361213684082031,
-0.211390987038612... | |
for loop so that it concatinates at the end of the file. Is this correct:
${file%/*}/done/${base%.*}**$i**.$ext
Thank you for anymore help.
**Found the solution!**
I added a load of data to the database, so the log was forced to expand. I then removed the uneeded data to get my database back to how it was.
Backup a... | [
0.15490828454494476,
-0.13248968124389648,
0.38268789649009705,
0.03492000699043274,
0.4024028778076172,
-0.006028112955391407,
0.5316464900970459,
0.06595062464475632,
-0.469659686088562,
-0.6241332292556763,
0.024662837386131287,
0.46848735213279724,
-0.26051852107048035,
0.2575057148933... | |
How can I capture another process's output using pure C? Can you provide sample code?
EDIT: let's assume Linux. I would be interested in "pretty portable" code. All I want to do is to execute a command, capture it's output and process it in some way.
There are several options, but it does somewhat depend on your platf... | [
0.42243313789367676,
-0.05574445053935051,
0.16494791209697723,
0.06499732285737991,
0.011268743313848972,
-0.02470882423222065,
-0.2595193386077881,
-0.1361086219549179,
-0.17926450073719025,
-0.4546569585800171,
0.04709221050143242,
0.6485989093780518,
-0.29719865322113037,
0.13249449431... | |
such as way as to make it accessible from your program through the stream `FILE*`.
If you need to connect to an existing process, or need to do richer operations, you may need to look into other facilities. Unix has various mechanisms for hooking up a processes stdout etc.
Under windows you can use the `CreateProcess... | [
0.45640313625335693,
0.04332863539457321,
0.1908533275127411,
0.18513914942741394,
-0.00984515342861414,
-0.0646662637591362,
-0.04125493764877319,
0.2412174940109253,
-0.5847844481468201,
-0.7884401082992554,
-0.05878548324108124,
0.49741917848587036,
-0.21623708307743073,
0.3484439849853... | |
`popen` seems ideal, it is "pretty portable", I don't think there's a unix like OS without it, indeed it is part of the Single Unix Specification, and [POSIX](http://www.opengroup.org/onlinepubs/009695399/functions/popen.html), and it lets you do exactly what you want, execute a process, grab its output and process it. | [
0.1498958170413971,
-0.20517228543758392,
0.1817716509103775,
0.08587053418159485,
-0.24512514472007751,
-0.3013072907924652,
-0.17271488904953003,
0.22827306389808655,
-0.26753702759742737,
-0.2627265453338623,
-0.021955810487270355,
0.5873526334762573,
-0.24531729519367218,
0.10066568851... | |
XML has its uses.
What is the worst abuse of XML that you have seen? What about XML made it so unsuitable for the task?
Using it as a database, rewriting the file on every update/insert.
See this all the time... | [
0.451915979385376,
0.2920165956020355,
-0.08155830949544907,
0.3458755314350128,
-0.12930256128311157,
-0.32630065083503723,
-0.060008201748132706,
0.13218209147453308,
-0.15523794293403625,
-0.4917483925819397,
0.15379531681537628,
0.2640209496021271,
-0.3336999714374542,
0.14412806928157... | |
I'm writing [`grepath`](http://gist.github.com/79233) utility that finds executables in `%PATH%` that match a pattern.
I need to define whether given filename in the path is executable (emphasis is on command line scripts).
Based on ["Tell if a file is executable"](http://timgolden.me.uk/python/win32_how_do_i/tell-if-... | [
0.005290869623422623,
0.24554698169231415,
0.3611605763435364,
-0.2310987412929535,
0.056016720831394196,
0.01589030586183071,
0.45155301690101624,
-0.22576574981212616,
-0.08466338366270065,
-0.680597722530365,
-0.17806382477283478,
0.5626292824745178,
-0.4288526177406311,
-0.169283494353... | |
and samefile(GetLongPathName(executable), path)):
return True
# path is a document with assoc. check whether it has extension
# from %PATHEXT%
pathexts = os.environ.get('PATHEXT', '').split(os.pathsep)
return any(ext(path) == e.lower() for e in pathexts)
except error:
... | [
0.09985394030809402,
-0.26131319999694824,
0.509652316570282,
0.00985431857407093,
0.5234584808349609,
0.03866719454526901,
0.2120702713727951,
-0.1272171437740326,
-0.28255608677864075,
-0.6526911854743958,
-0.33347856998443604,
0.6399774551391602,
-0.43721237778663635,
-0.118581548333168... | |
is:
```
try: samefile = os.path.samefile
except AttributeError:
def samefile(path1, path2):
rp = lambda p: os.path.realpath(os.path.normcase(p))
return rp(path1) == rp(path2)
```
How `is_executable_win` could be improved in the given context? What functions from Win32 API could help?
P.S.
*... | [
-0.26560017466545105,
-0.040418948978185654,
0.4481545388698578,
-0.12191230803728104,
0.27554193139076233,
0.10664570331573486,
0.08608121424913406,
-0.22472311556339264,
-0.20579533278942108,
-0.6969279050827026,
-0.3942062556743622,
0.7856096625328064,
-0.32364657521247864,
-0.183650717... | |
is in `%PATHEXT%` i.e., `'C:\> which'` could start:
```
some\path\python.exe another\path\in\PATH\which.py
```
* `somefile.doc` most probably is *not* executable (when it is associated with Word for example)
* `another_file.txt` is *not* executable (as a rule)
* `ack.pl` is executable if it is associated with some ex... | [
0.053910739719867706,
0.0953039899468422,
0.3546772599220276,
-0.2757638096809387,
0.09647627174854279,
-0.22224706411361694,
0.34856894612312317,
0.04069594666361809,
-0.10143226385116577,
-0.5547505021095276,
-0.47177067399024963,
0.5723569393157959,
-0.21523258090019226,
0.1354240328073... | |
stdout, stderr = p.communicate()
return p.poll() != 1 or stdout != '' or stderr != error_message(barename)
```
Where `error_message()` depends on language. English version is:
```
def error_message(barename):
return "'%(barename)s' is not recognized as an internal" \
" or external\r\ncommand, oper... | [
-0.1568123996257782,
0.312702476978302,
0.21362431347370148,
-0.40088436007499695,
-0.16453488171100616,
0.16107149422168732,
0.632116973400116,
-0.1750807762145996,
-0.16358433663845062,
-0.5577898621559143,
-0.4531903564929962,
0.4670795500278473,
-0.2831934094429016,
0.01595688425004482... | |
(cmd.exe by default):
```
c:\cwd> cmd.exe /c somefile
```
If output looks like this:
```
'somefile' is not recognized as an internal or external
command, operable program or batch file.
```
Then the `path` is not an executable else it is (lets assume there is one-to-one correspondence between `path` and `barenam... | [
0.030591469258069992,
0.16161446273326874,
0.28604406118392944,
-0.11556461453437805,
0.08608180284500122,
0.029426392167806625,
0.07687283307313919,
0.04226072132587433,
-0.38529103994369507,
-0.7172978520393372,
-0.4297809302806854,
0.5490631461143494,
-0.25847557187080383,
0.07439438998... | |
will produce the error without actually running it? What Win32 API function and what conditions used to trigger the 'is not recognized as an internal..' error?
Here's the [grepath.py](http://gist.github.com/79233/) that I've linked in my question:
```
#!/usr/bin/env python
"""Find executables in %PATH% that match PATT... | [
-0.008694201707839966,
0.07625014334917068,
0.23320899903774261,
-0.14208079874515533,
0.06356791406869888,
0.05642075464129448,
0.4090079963207245,
-0.34867021441459656,
-0.14365209639072418,
-0.5164930820465088,
-0.252114862203598,
0.8550509214401245,
-0.5473698377609253,
-0.121552444994... | |
return win32file.CreateFile (
filename,
win32file.GENERIC_READ,
win32file.FILE_SHARE_READ,
None,
win32file.OPEN_EXISTING,
0,
None | [
-0.002138952724635601,
0.06539519876241684,
0.46749210357666016,
-0.18075574934482574,
0.3337174654006958,
-0.11901979893445969,
0.3423021137714386,
0.0628502145409584,
-0.23111213743686676,
-0.667963981628418,
-0.31724780797958374,
0.5104239583015442,
-0.38766998052597046,
0.5597272515296... | |
)
@staticmethod
def get_unique_id (hFile):
(attributes,
created_at, accessed_at, written_at,
volume,
file_hi, file_lo,
n_links,
index_hi, index_lo
) = win32file.GetFileInformationByHandle (hFile)
return volume, index_hi, index_lo
@stati... | [
0.06256356835365295,
-0.281008780002594,
0.5733896493911743,
-0.013938904739916325,
0.08551635593175888,
0.011648054234683514,
-0.1258770078420639,
-0.0453280471265316,
-0.5333995819091797,
-0.199131041765213,
-0.3445442318916321,
0.5132466554641724,
-0.47228699922561646,
0.187661081552505... | |
def samefile_win(filename1, filename2):
"""Whether filename1 and filename2 represent the same file.
It works for subst, ntfs hardlinks, junction points.
It works unreliably for network drives.
Based on GetFileInformationByHandle() Win32 API call.
http://timgolden.me.uk/python/win32_how_do_i/see_if_two_files_a... | [
0.18099525570869446,
-0.24164387583732605,
0.5511159896850586,
-0.13296113908290863,
0.11163591593503952,
-0.08712701499462128,
0.23482730984687805,
-0.41866493225097656,
-0.4607781171798706,
-0.4955920875072479,
0.0468691810965538,
0.6788766384124756,
-0.3362422287464142,
0.04211546853184... | |
(samefile_win.get_unique_id (hFile1)
== samefile_win.get_unique_id (hFile2))
hFile2.Close ()
hFile1.Close ()
return are_equal
except win32file.error:
return None
def canonical_path(path):
"""NOTE: it might return wrong path | [
0.03283201903104782,
-0.07306627929210663,
0.8546509742736816,
-0.003996980842202902,
0.04306412115693092,
-0.2931416928768158,
0.567411482334137,
-0.5588142275810242,
-0.15712909400463104,
-0.42870649695396423,
-0.12410029023885727,
0.6009932160377502,
-0.4049854278564453,
0.1976667046546... | |
for paths with symbolic links."""
return os.path.realpath(os.path.normcase(path))
def samefile_generic(path1, path2):
return canonical_path(path1) == canonical_path(path2)
class is_executable_destructive:
@staticmethod
def error_message(barename):
r"""
"'%(barename)s' is not recognized as an i... | [
-0.4634477198123932,
0.0908830463886261,
0.4619418978691101,
-0.04993057996034622,
-0.16303379833698273,
0.06789611279964447,
0.6030077934265137,
-0.35581088066101074,
-0.40755364298820496,
-0.5980280041694641,
-0.43032675981521606,
0.44195491075515747,
-0.5066573619842529,
0.3652547597885... | |
barename = os.path.splitext(os.path.basename(path))[0]
p = Popen(barename, stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate()
return p.poll() != 1 or stdout != '' or stderr != error_message(barename)
def is_executable_win(path):
"""Based on:
http://timgolden.me.uk/python... | [
-0.01578071154654026,
0.08756624907255173,
0.23550085723400116,
-0.3729209005832672,
0.034725505858659744,
0.11256832629442215,
0.8093721270561218,
-0.5020155906677246,
0.03754641115665436,
-0.6885094046592712,
-0.4247661530971527,
0.6991121768951416,
-0.37445804476737976,
-0.0038600564002... | |
return None # not an exe or a document with assoc.
def is_executable_posix(path):
"""Whether the file is executable.
Based on which.py from stdlib
"""
#XXX it ignores effective uid, guid?
try: st = os.stat(path)
except os.error:
return None
isregfile = S_ISREG(st[ST_MODE])
isexemode =... | [
-0.0740799531340599,
0.24335570633411407,
0.4159998595714569,
-0.11880089342594147,
0.042207978665828705,
0.05438147485256195,
0.610041081905365,
-0.4123227298259735,
-0.3243904709815979,
-0.4689393937587738,
-0.506312906742096,
0.6603640913963318,
-0.5194309949874878,
-0.05949054285883903... | |
= is_executable_win
except ImportError, e:
warn_import("is_executable: fall back on posix variant", e)
is_executable = is_executable_posix
try: samefile = os.path.samefile
except AttributeError, e:
warn_import("samefile: fallback to samefile_win", e)
try:
import win32file
samefile = sam... | [
-0.2920755445957184,
-0.2584902048110962,
0.45385441184043884,
-0.3254929780960083,
0.15072301030158997,
0.37328633666038513,
0.23480455577373505,
-0.24231307208538055,
-0.21317316591739655,
-0.6792355179786682,
-0.2693546712398529,
0.8114514946937561,
-0.5205686688423157,
-0.1762690544128... | |
opt = parser.add_option
opt("-e", "--regex", metavar="PATTERN",
help="use PATTERN as a regular expression")
opt("--ignore-case", action="store_true", default=True,
help="""[default] ignore case when --regex is present; for \
non-regex PATTERN both FILENAME and PATTERN are first \
case-normalized... | [
-0.15214569866657257,
-0.4384899139404297,
0.3827162981033325,
-0.2423483431339264,
0.5872985124588013,
0.3436465263366699,
0.1395636796951294,
-0.20791396498680115,
0.1349901556968689,
-0.5516418218612671,
-0.5685184001922607,
1.0569921731948853,
-0.5898443460464478,
-0.6832306981086731,
... | |
help="show non executable files")
(options, args) = parser.parse_args()
if len(args) != 1 and not options.regex:
parser.error("incorrect number of arguments")
if not options.regex:
pattern = args[0]
del args
if options.regex:
filepred = re.compile(options.regex, options.ignor... | [
-0.30672410130500793,
-0.21129007637500763,
0.3885624408721924,
-0.09106692671775818,
0.2633925676345825,
0.2868678867816925,
0.546364963054657,
-0.29041117429733276,
-0.28622227907180786,
-0.6011828184127808,
-0.45113620162010193,
0.8098731637001038,
-0.4555085301399231,
-0.25215584039688... | |
if file_pattern_symbol in pattern:
break
else: # match in any place if no explicit file pattern symbols supplied
pattern = "*" + pattern + "*"
filepred = lambda fn: fnmatch_(fn, pattern)
if not options.regex and options.ignore_case:
filter_files = lambda files: fnmatc... | [
0.12150322645902634,
-0.48735296726226807,
0.16336476802825928,
-0.15718238055706024,
0.21950332820415497,
-0.05744720995426178,
0.09278605878353119,
-0.2665255069732666,
-0.21358658373355865,
-0.7646359801292419,
-0.31937894225120544,
0.422093003988266,
-0.6188451647758484,
-0.28170579671... | |
else:
filter_files = lambda files: itertools.ifilter(filepred, files)
if options.use_pathext:
pathexts = frozenset(map(str.upper,
os.environ.get('PATHEXT', '').split(os.pathsep)))
seen = set()
for dirpath in os.environ.get('PATH', '').split(os.pathsep):
if os.path.isdir(d... | [
-0.1982678771018982,
-0.8053016662597656,
0.3778943419456482,
-0.014608069323003292,
0.33971139788627625,
-0.04343263804912567,
0.19287480413913727,
-0.052814994007349014,
-0.606066882610321,
-0.9818262457847595,
-0.27218666672706604,
0.3417753577232361,
-0.5094627141952515,
-0.15128161013... | |
drives, junction points, symlinks, etc
rp = canonical_path(dirpath)
if rp in seen: continue
seen.add(rp); del rp
for filename in filter_files(os.listdir(dirpath)):
path = os.path.join(dirpath, filename)
isexe = is_executable(path) | [
-0.1092226654291153,
-0.45609143376350403,
0.7094216346740723,
-0.07226929813623428,
0.04162617772817612,
0.13586090505123138,
-0.008919586427509785,
-0.21503278613090515,
-0.516019344329834,
-0.7215391993522644,
-0.35047683119773865,
0.6312740445137024,
-0.5166007876396179,
0.344756752252... | |
if isexe == False and is_executable == is_executable_win:
# path is a document with associated program
# check whether it is a script (.pl, .rb, .py, etc)
if not isexe and options.use_pathext: | [
-0.0388118214905262,
-0.24056890606880188,
0.25238093733787537,
0.21211156249046326,
0.11624816805124283,
-0.34450003504753113,
0.16765958070755005,
-0.2552294135093689,
0.013528276234865189,
-0.8671305775642395,
-0.31767407059669495,
0.5746344923973083,
-0.25769373774528503,
-0.2149954885... | |
ext = os.path.splitext(path)[1]
isexe = ext.upper() in pathexts
if isexe:
print path
elif options.show_non_executable: | [
-0.34123751521110535,
-0.4538198411464691,
0.3153679668903351,
-0.25803035497665405,
0.3134273290634155,
0.17877693474292755,
0.285202294588089,
-0.190926194190979,
-0.11882397532463074,
-0.8765520453453064,
-0.39333397150039673,
0.5132095813751221,
-0.4633532166481018,
-0.1612696945667266... | |
print "non-executable:", path
if __name__=="__main__":
main()
``` | [
-0.29234248399734497,
0.2989806532859802,
0.40413644909858704,
-0.19161728024482727,
0.2593115568161011,
-0.005482230801135302,
0.3357558250427246,
0.10703512281179428,
-0.07313535362482071,
-0.3368428647518158,
-0.4925471842288971,
0.522196352481842,
-0.5620061159133911,
0.216477319598197... | |
My default editor is [Pico](https://en.wikipedia.org/wiki/Pico_(text_editor)) at my server. I use Bash and Linux.
I tried to change Vim to be my default editor unsuccessfully by:
```
echo vim > $EDITOR
```
How can I change Vim to be my default editor?
The following code does not work in file *[.bashrc](https://en.... | [
0.24946138262748718,
0.31323036551475525,
0.6943421363830566,
-0.22613801062107086,
-0.10963249206542969,
-0.14396259188652039,
0.3495132327079773,
-0.12578679621219635,
-0.2554895877838135,
-0.6100744605064392,
-0.030738577246665955,
0.8804466128349304,
-0.35456499457359314,
0.19663356244... | |
you want Vim to be started?
I haven't used Git, but [the documentation](http://www.kernel.org/pub/software/scm/git/docs/git-commit.html) reads:
> The editor used to edit the commit log message will be chosen from the GIT\_EDITOR environment variable, the core.editor configuration variable, the VISUAL environment vari... | [
0.3725048303604126,
-0.12846501171588898,
0.4920240044593811,
-0.029276587069034576,
-0.026058973744511604,
-0.012239842675626278,
0.03860064595937729,
-0.2153993844985962,
-0.19816803932189941,
-0.7276304960250854,
-0.3083951473236084,
0.7446940541267395,
-0.4727288782596588,
-0.018132425... | |
I am seeing in some domain object models that an abstract base class is created(that implement Equals and GetHashCode) for all domain Entity objects to inherit from to gain their identity.
I am not clear why this base class is needed and when and why it should be used. Can you provide me some insight on this or refer ... | [
0.23748108744621277,
0.0035185846500098705,
0.2717335522174835,
0.2868407964706421,
-0.32070478796958923,
-0.19410696625709534,
-0.04401250183582306,
-0.022184161469340324,
-0.10074540972709656,
-0.6814756393432617,
0.331197589635849,
0.6209328174591064,
-0.10981674492359161,
0.26931488513... | |
I create 2 instances of customer with exactly the same details, since I am using guid as the identity they will be two different objects. But as they have all attributes the same they should be the same object(or is it a better ddd practice to keep them unique and seperate??)
Trying to understand if I should handle th... | [
0.28657227754592896,
0.08703086525201797,
0.2769997715950012,
-0.007193760480731726,
-0.14228790998458862,
0.31108132004737854,
0.14730113744735718,
-0.06176649406552315,
0.11684819310903549,
-0.6110237240791321,
0.19040325284004211,
0.8162072896957397,
-0.17185282707214355,
0.121340811252... | |
identity of the entity a string or hash code(?) representation of the values of all these attributes and use the Equality of the base class.
I could be little off here so thanks in advance for the patience.
The use of the term **equality** is overloaded here:
1) Equality for *Identity*
If you have 2 instances of the... | [
0.1986851841211319,
0.22131505608558655,
0.2290440797805786,
0.32501423358917236,
0.06070300564169884,
0.15433572232723236,
0.028993666172027588,
-0.037610627710819244,
-0.07395496219396591,
-0.4464998245239258,
0.11464692652225494,
0.7454633712768555,
-0.2050400972366333,
-0.0952759310603... | |
is where you're checking that 2 instances have all the same values. For instance, if 2 staff members are looking at the same Customer, and the first person modifies & saves it, both people will see different data. They’re both interested in the same Customer, but the data becomes stale.
For (2), you definitely need a ... | [
0.08070466667413712,
0.18139909207820892,
0.24828319251537323,
0.26968806982040405,
-0.08028025180101395,
-0.10081128031015396,
0.08802711963653564,
-0.3982448875904083,
-0.47784242033958435,
-0.32949137687683105,
0.009539386257529259,
0.6367287635803223,
-0.3782126307487488,
0.10594157129... | |
DDD. If you’re interested, [I sell a tool](http://www.evolving-software.co.uk) that can help grasp DDD concepts easier. | [
0.5701280832290649,
-0.10487548261880875,
0.09520497173070908,
-0.16947604715824127,
-0.015893949195742607,
-0.030887272208929062,
-0.07131392508745193,
0.1889098435640335,
-0.020007314160466194,
-0.7793064713478088,
-0.31574004888534546,
0.595209538936615,
0.05186254158616066,
-0.00733294... | |
The ElementTree.parse reads from a file, how can I use this if I already have the XML data in a string?
Maybe I am missing something here, but there must be a way to use the ElementTree without writing out the string to a file and reading it again.
[xml.etree.elementtree](http://docs.python.org/library/xml.etree.elem... | [
0.16529422998428345,
0.18077296018600464,
0.030593980103731155,
0.019392816349864006,
-0.017830902710556984,
-0.3296830356121063,
0.21275296807289124,
-0.26004037261009216,
-0.1352892816066742,
-0.6350491642951965,
-0.11174257844686508,
0.5876480937004089,
-0.4137037992477417,
-0.187424540... | |
I have an object(A) which has a list composed of objects (B). The objects in the list(B) are pointers, but should the list itself be a pointer? I'm migrating from Java to C++ and still haven't gotten fully accustomed to the stack/heap. The list will not be passed outside of class A, only the elements in the list. Is it... | [
0.26317527890205383,
0.2559255063533783,
-0.005633144173771143,
-0.3270331919193268,
-0.26200583577156067,
-0.1639876514673233,
0.23135730624198914,
-0.2596592605113983,
-0.3223378658294678,
-0.5378082394599915,
0.016309095546603203,
0.026831720024347305,
-0.38270390033721924,
0.1692255586... | |
list would only be on the stack if Object-A was also on the stack
2. Even if the list itself is not on the heap, it may allocate its storage from the heap. This is how std::list, std::vector and most C++ lists work – the reason is that stack-based elements cannot grow.
3. These days most stacks are around 1mb, so you'd... | [
0.11365094035863876,
-0.1803828328847885,
0.3331369459629059,
0.06007201969623566,
-0.19426995515823364,
-0.11725962162017822,
0.09683060646057129,
-0.48688042163848877,
-0.8660117983818054,
-0.7084957957267761,
0.03641532361507416,
0.16542577743530273,
-0.2782244384288788,
0.0065484801307... | |
to the explicit memory management in C/C++ can have a tendency to overthink these things.
Unless you're writing something that you know will have thousands of sizable objects just put the list on the stack. Unless you're using giant C-style arrays in a function the chances are the memory used by the list will end up i... | [
0.06431712210178375,
0.16251759231090546,
-0.029600225389003754,
0.18513445556163788,
-0.2437732219696045,
-0.1890130341053009,
0.23588229715824127,
-0.05633298680186272,
-0.5033872127532959,
-0.4337553381919861,
0.07078820466995239,
0.48138874769210815,
-0.25442275404930115,
-0.0453841462... | |
I'm working on my first video game for the Android platform as a bit of a nights and weekends project.
It is coming along nicely, but I am very unhappy with the control sensativity.
In this game, you move an object left and right on the screen. On the bottom of the screen is a "touchpad" of sorts, which is where your... | [
0.05478911101818085,
-0.005690890830010176,
0.5341758131980896,
-0.13035310804843903,
0.6194649934768677,
0.12613315880298615,
-0.13465161621570587,
0.04919219762086868,
-0.36610108613967896,
-0.7802203297615051,
0.4137994349002838,
0.5198611617088318,
0.12349216639995575,
-0.1338819563388... | |
|
| |
| Game Area |
| |
| | [
-0.4464074671268463,
0.2617413103580475,
0.4987764060497284,
-0.35454925894737244,
0.01741054281592369,
-0.36601129174232483,
-0.007300125900655985,
-0.02289557084441185,
-0.23531362414360046,
-0.5799320936203003,
-0.05625708028674126,
0.25326594710350037,
-0.052021779119968414,
-0.0484855... | |
|
| |
| |
| |
/-------------------------\
| | [
-0.09038911014795303,
0.2168024331331253,
0.5105277895927429,
-0.10915966331958771,
0.4005741775035858,
0.3255941569805145,
0.2510855495929718,
0.17026367783546448,
0.5547704696655273,
-0.5621174573898315,
-0.6271697878837585,
0.6276205778121948,
-0.024804137647151947,
0.23262028396129608,... | |
|
| Touch Area |
| |
\-------------------------/
```
I am currently using a state variable to hold "MOVING\_LEFT, MOVING\_RIGHT, NOT\_MOVING" and am updating the location of the player object each frame based on that variable.
However, my code that reads the touchscreen input and... | [
0.024915488436818123,
0.031139085069298744,
1.0728042125701904,
-0.16271217167377472,
0.39956507086753845,
0.02057039923965931,
-0.036176033318042755,
-0.14712852239608765,
-0.29246649146080017,
-0.7817465662956238,
0.10220334678888321,
0.5751208662986755,
-0.4193660318851471,
0.3343278467... | |
e) {
int action = e.getAction();
if (action == MotionEvent.ACTION_DOWN) {
this.mTouchX = (int)e.getX();
this.mTouchY = (int)e.getY();
}
else if (action == MotionEvent.ACTION_MOVE) {
if ((int)e.getX() >= this.mTouchX) {
this.mTouchX = (int)e.getX();
... | [
-0.14085938036441803,
-0.35113704204559326,
0.9026989340782166,
-0.19575311243534088,
0.3950766324996948,
0.23449109494686127,
0.36119508743286133,
-0.8035783171653748,
-0.5507472157478333,
-0.5334922075271606,
-0.7040200233459473,
0.5899838805198669,
-0.5182523131370544,
-0.05321032553911... | |
= (int)e.getY();
if (this.TouchRect.contains(this.mTouchX, this.mTouchY)) {
this.mTouchDirection = MOVING_RIGHT;
}
}
else if ((int)e.getX() <= this.mTouchX) {
this.mTouchX = (int)e.getX(); | [
-0.44688498973846436,
-0.2398555725812912,
0.9863898158073425,
-0.38661161065101624,
0.5764763951301575,
0.2148093283176422,
0.33726033568382263,
-0.38580065965652466,
-0.19513195753097534,
-0.9607194066047668,
-0.6472312808036804,
0.42334043979644775,
-0.5048369765281677,
0.00636878982186... | |
this.mTouchY = (int)e.getY();
if (this.TouchRect.contains(this.mTouchX, this.mTouchY)) {
this.mTouchDirection = MOVING_LEFT;
}
}
else { | [
-0.49851247668266296,
-0.19823850691318512,
0.7889943718910217,
-0.4155252277851105,
0.564069926738739,
0.19285131990909576,
0.38098934292793274,
-0.27170059084892273,
-0.2938327491283417,
-0.8305149674415588,
-0.5320573449134827,
0.28183111548423767,
-0.5235632061958313,
0.139185413718223... | |
this.mTouchDirection = NOT_MOVING;
}
}
else if (action == MotionEvent.ACTION_UP) {
this.mTouchDirection = NOT_MOVING;
}
}
```
The idea is that when there is any movement, I check the previous location of the users finger and then figure out what direction to move the... | [
-0.1698164939880371,
-0.032008733600378036,
0.7713446617126465,
-0.13792382180690765,
0.28874674439430237,
0.01821080595254898,
0.2263655811548233,
-0.4094148874282837,
-0.6057239174842834,
-0.5069054961204529,
0.016268394887447357,
0.6698128581047058,
-0.343921035528183,
-0.14050012826919... | |
developers on here who have figured out how to do good controls via a touchscreen and can give some advice.
In a real world test, creating 18129 instances of a class via "Constuctor.newInstance" passing in 10 arguments -vs- creating the instances via "new" the program took no measurable difference in time.
This wasn't... | [
-0.07037671655416489,
-0.10918296128511429,
0.21998102962970734,
0.289986252784729,
-0.16437961161136627,
-0.03506122902035713,
0.263560026884079,
-0.24474677443504333,
-0.33953365683555603,
-1.003326177597046,
0.2528274357318878,
0.6961482763290405,
-0.14837150275707245,
0.344191104173660... | |
yourself to see. | [
0.603195309638977,
-0.1118924468755722,
-0.02489408478140831,
0.0029888595454394817,
-0.2416289746761322,
0.1657995730638504,
0.41915470361709595,
0.226671040058136,
-0.27716341614723206,
-0.9397829174995422,
0.026419201865792274,
0.6386120915412903,
-0.1955663114786148,
0.2739270627498626... | |
Is it beneficial to use multicolumn (composite) primary keys for a many to many relationship table when using Linq to SQL?
Or should I just add an identity column as a non-clustered primary key and index the FK columns appropriately?
Not a LINQ issue. If you need them for your schema, then use them. If you don't, don'... | [
-0.025403019040822983,
0.308974951505661,
0.49249550700187683,
0.2614642083644867,
-0.2522551119327545,
-0.13044461607933044,
-0.06370611488819122,
-0.3331214487552643,
-0.24117448925971985,
-0.28914591670036316,
0.41834303736686707,
0.5472848415374756,
-0.34825044870376587,
0.158414468169... | |
that your question addresses. You can still perform CRUD operations on a mapping table within LINQ but LINQ cannot walk the relationship presented by a many to many mapping table. (LINQ works fine with one to one and one to many tables.)
I can't speak to any issue with the Entity Framework but again, I would be very s... | [
0.13275796175003052,
-0.0016348494682461023,
0.3498360216617584,
0.3697429597377777,
-0.046854253858327866,
-0.23599791526794434,
-0.04455607756972313,
-0.06538031995296478,
-0.17151828110218048,
-0.4485127925872803,
0.09046176820993423,
0.5423638820648193,
-0.054758790880441666,
-0.075260... | |
Hi there I'm not a developer and so am unaware of best practices. I created this to bypass manual data copying of log data. This agent is for a single feed which I'll copy and adjust for each additional one. For the specified feed it reads the log for the last time processed and number of files processed so far today a... | [
0.4206288456916809,
-0.020177412778139114,
0.6848233938217163,
0.08026790618896484,
-0.18308405578136444,
-0.05909815803170204,
0.021086424589157104,
0.06130167469382286,
-0.10981053113937378,
-0.4456263482570648,
0.2611289322376251,
0.2178642600774765,
-0.13509772717952728,
0.088463559746... | |
criticism.
```
Sub Initialize
Dim customername As String
Dim servername As String
Dim feedname As String
Dim alertthresholdinhours As Integer
Dim inputfeedpath As String
' Set for each feed
customername = "gRrhio"
servername = "gRrhioEdge2"
feedname = "FF Thompson ADT"
alertthr... | [
0.05744284391403198,
0.032335612922906876,
0.46990323066711426,
-0.16303549706935883,
-0.43315252661705017,
0.1028488501906395,
0.21256613731384277,
-0.2092949002981186,
-0.1421002894639969,
-0.19265221059322357,
-0.38007572293281555,
0.5743045806884766,
-0.5670761466026306,
0.352649778127... | |
inputfeedcounter As Integer
inputfeedcounter = 0
pathName$ = inputfeedpath
fileName$ = Dir$(pathName$, 0)
Do While fileName$ <> ""
inputfeedcounter = inputfeedcounter + 1
fileName$ = Dir$()
Loop
Dim entry As NotesViewEntry
Dim vc As NotesViewEntryCollection
Dim filesp... | [
-0.11008082330226898,
-0.40474480390548706,
0.7763252258300781,
-0.3094625473022461,
-0.27042871713638306,
0.1612103432416916,
0.12571896612644196,
-0.3364655077457428,
-0.15414991974830627,
-0.45511531829833984,
-0.22140011191368103,
0.22560031712055206,
-0.11879097670316696,
0.5573651790... | |
As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
Dim view As NotesView
Set view = db.GetView( "Sessions\by Feed" )
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( newDoc, "Body" )
Dim todaysdate As New NotesDateTime("Today")
Dim f... | [
0.17931784689426422,
-0.055170688778162,
0.7794317007064819,
-0.39312544465065,
-0.12531892955303192,
-0.1841852366924286,
0.3118663728237152,
-0.2757514715194702,
-0.010205229744315147,
-0.6199947595596313,
-0.31590837240219116,
0.25828537344932556,
0.1316160261631012,
0.38506779074668884... | |
Dim lastdayran As String
Dim lasttime As String
Dim lasttimeran As String
Dim filesp As Integer
Dim lastdayfiles As Integer
Dim lastdaysfiles2 As Integer
Dim terrors As Integer
Dim lastdayerrors As Integer
lastdate = ""
lastdayran = ""
counter = 0
flag = 0
filesp = 0
... | [
0.09630139917135239,
-0.5230095386505127,
0.7299429774284363,
-0.47492220997810364,
-0.16747142374515533,
0.21494129300117493,
0.4273883104324341,
-0.24778059124946594,
-0.36108314990997314,
-0.12069305032491684,
-0.23982052505016327,
0.5624151229858398,
-0.17992626130580902,
0.53484559059... | |
0
lastdayerrors = 0
' Finds date for last time processed, counts files processed and errors
While flag = 0
Dim dateTime As New NotesDateTime(todaysdate.DateOnly)
Dim keyarray(1) As Variant
keyarray(0) = feedname
Set keyarray(1) = dateTime
Set vc = view.GetAllEntries... | [
0.1675453782081604,
-0.6550323963165283,
1.048484444618225,
-0.12086917459964752,
0.18764646351337433,
0.007840030826628208,
0.23184232413768768,
-0.21893984079360962,
-0.1341370940208435,
-0.5685563683509827,
-0.3501267731189728,
0.2933986186981201,
-0.06767187267541885,
0.560710787773132... | |
If entry Is Nothing Then
Call todaysdate.AdjustDay(-1)
End If
While Not entry Is Nothing
files = 0
Forall colval In entry.ColumnValues
If counter = 9 Then | [
-0.129959836602211,
-0.15590177476406097,
0.8677349090576172,
-0.1903698593378067,
0.1628885269165039,
-0.0968364030122757,
0.33504539728164673,
-0.02365553379058838,
-0.22016257047653198,
-0.6457411050796509,
-0.4183175563812256,
0.4589555561542511,
0.020821060985326767,
0.358431965112686... | |
counter = 0
Elseif counter = 8 Then
counter = 9
Elseif counter = 7 Then
counter = 8 | [
-0.09319252520799637,
-0.3615456521511078,
0.4115988612174988,
-0.4242933690547943,
-0.21174217760562897,
0.049318790435791016,
0.08232436329126358,
-0.34634140133857727,
-0.08893601596355438,
-0.09422638267278671,
-0.12644414603710175,
0.45246943831443787,
-0.30853402614593506,
-0.0580001... | |
Elseif counter = 6 Then
errors = Cint(colval)
counter = 7
Elseif counter = 5 Then | [
-0.07209865003824234,
-0.1371551752090454,
0.11552421003580093,
-0.3625727891921997,
-0.025543468073010445,
0.05243541672825813,
0.17031915485858917,
-0.38014674186706543,
-0.0017886038403958082,
-0.3248675465583801,
-0.13970306515693665,
0.7606422305107117,
-0.2109503149986267,
-0.1791282... | |
counter = 6
Elseif counter = 4 Then
files = Cint(colval)
counter = 5 | [
0.018330242484807968,
-0.3262859880924225,
0.38640016317367554,
-0.3363042175769806,
0.05330872908234596,
0.014545467682182789,
-0.04831796884536743,
-0.4267902672290802,
-0.18921494483947754,
-0.3596118688583374,
-0.12206916511058807,
0.5696273446083069,
-0.19914762675762177,
0.1984854191... | |
Elseif counter = 3 Then
counter = 4
Elseif counter = 2 Then
counter = 3
lasttime = colval | [
-0.22326555848121643,
-0.37088149785995483,
0.4555007517337799,
-0.40906935930252075,
-0.004400997888296843,
-0.06368628889322281,
0.13559576869010925,
-0.4889049232006073,
-0.02068343199789524,
-0.34999987483024597,
-0.057925622910261154,
0.5630856156349182,
-0.2054349184036255,
0.0001813... | |
Elseif counter = 1 Then
counter = 2
lastdate = colval
Elseif counter = 0 Then
counter = 1 | [
-0.147907093167305,
-0.3363662362098694,
0.36289435625076294,
-0.4234989285469055,
-0.0209494736045599,
-0.010827843099832535,
0.10653084516525269,
-0.38753771781921387,
0.020368488505482674,
-0.22557738423347473,
-0.04662757366895676,
0.4567587971687317,
-0.19766494631767273,
-0.147950083... | |
End If
End Forall
filesp = filesp + files
terrors = terrors + errors
Set entry=vc.GetNextEntry (entry)
flag = 1 | [
0.0512409470975399,
-0.2676495611667633,
0.5901015400886536,
0.15065883100032806,
0.28096556663513184,
0.06631826609373093,
0.43696439266204834,
-0.32601216435432434,
-0.1270970106124878,
-0.5501465797424316,
-0.3622226417064667,
0.3091958165168762,
-0.11624722927808762,
0.3637171983718872... | |
Wend
Wend
lastdayfiles = filesp
lastdayerrors = terrors
lastdayran = lastdate
lasttimeran = lasttime
'Counts previous files processed
filesp = 0
terrors = 0
lastdate = ""
flag = 0
Call todaysdate.AdjustDay(-1)
While flag = 0
Dim dateTime2 As New NotesDateTime(... | [
-0.011260942555963993,
-0.4114494025707245,
0.8935473561286926,
-0.2065395563840866,
0.07236699014902115,
-0.08120632916688919,
0.5262690186500549,
-0.3030645251274109,
-0.3970070779323578,
-0.5603221654891968,
-0.05140939727425575,
0.3884645998477936,
0.12402097135782242,
0.21846720576286... | |
Dim keyarray2(1) As Variant
keyarray2(0) = feedname
Set keyarray2(1) = dateTime2
Set vc = view.GetAllEntriesByKey(keyarray2, False)
Set entry = vc.GetFirstEntry
If entry Is Nothing Then
Call todaysdate.AdjustDay(-1)
End If
While Not entry Is Nothi... | [
0.3527168333530426,
-0.7364781498908997,
1.0703328847885132,
-0.16033393144607544,
0.09481848031282425,
-0.06298426538705826,
0.42282792925834656,
-0.31217721104621887,
0.024902867153286934,
-0.490100234746933,
-0.2601275146007538,
0.7539976835250854,
-0.23939010500907898,
0.29637581110000... | |
files = 0
Forall colval In entry.ColumnValues
If counter = 9 Then
counter = 0
Elseif counter = 8 Then | [
-0.34006422758102417,
-0.008574874140322208,
0.7244069576263428,
-0.06780333817005157,
0.10057971626520157,
0.09922859072685242,
0.1683703511953354,
-0.2399139106273651,
-0.25738659501075745,
-0.49578550457954407,
-0.2332734763622284,
0.4526616632938385,
-0.1311163455247879,
0.181952282786... | |
counter = 9
Elseif counter = 7 Then
counter = 8
Elseif counter = 6 Then
counter = 7 | [
-0.13412635028362274,
-0.2855823040008545,
0.43600836396217346,
-0.4707030951976776,
-0.18342238664627075,
0.049275465309619904,
0.03778618946671486,
-0.41482013463974,
-0.07364581525325775,
-0.10577666759490967,
-0.1884901374578476,
0.4625842869281769,
-0.2906554639339447,
-0.032944232225... | |
Elseif counter = 5 Then
counter = 6
Elseif counter = 4 Then
files = Cint(colval) | [
-0.10283259302377701,
-0.35802242159843445,
0.28217437863349915,
-0.3501035273075104,
0.12690746784210205,
-0.04694228991866112,
-0.0247995313256979,
-0.45602166652679443,
-0.031445086002349854,
-0.3431072235107422,
-0.06152360513806343,
0.6724019646644592,
-0.33811700344085693,
0.02874296... | |
counter = 5
Elseif counter = 3 Then
counter = 4
Elseif counter = 2 Then
counter = 3 | [
-0.06980706751346588,
-0.29452481865882874,
0.4177142083644867,
-0.3586457073688507,
-0.2810991108417511,
0.014328334480524063,
0.11900122463703156,
-0.6448271870613098,
0.0318998284637928,
-0.09314196556806564,
-0.08149487525224686,
0.4594889283180237,
-0.2659938633441925,
-0.048451364040... | |
Elseif counter = 1 Then
counter = 2
Elseif counter = 0 Then
counter = 1
End | [
-0.09750337898731232,
-0.21233731508255005,
0.3055524230003357,
-0.36074867844581604,
-0.043790705502033234,
-0.19822612404823303,
0.17481639981269836,
-0.3691253066062927,
0.12874799966812134,
-0.014305569231510162,
-0.10260683298110962,
0.477923184633255,
-0.10753446817398071,
-0.1492521... | |
If
End Forall
filesp = filesp + files
Set entry=vc.GetNextEntry (entry)
flag = 1
Wend
Wend
lastdaysfiles2 = filesp
' Prints line of CSV into body of email | [
0.08813762664794922,
-0.09944861382246017,
0.8804764747619629,
-0.0790543332695961,
0.1278192400932312,
-0.051611628383398056,
0.1783449947834015,
-0.26742491126060486,
-0.08375360816717148,
-0.6429950594902039,
-0.261989951133728,
0.07520049810409546,
-0.1868477165699005,
0.14081361889839... | |
Call rtitem.AppendText ( customername )
Call rtitem.AppendText ( ", " )
Call rtitem.AppendText ( servername )
Call rtitem.AppendText ( ", " )
Call rtitem.AppendText ( datetime.timezone )
Call rtitem.AppendText ( ", " )
Call rtitem.AppendText ( lastdayran )
Call rtitem.AppendText ( " " )
... | [
-0.24606391787528992,
0.21214045584201813,
0.9903955459594727,
-0.41497141122817993,
0.31375452876091003,
0.383188396692276,
0.4875558018684387,
-0.23957602679729462,
0.009781384840607643,
-0.6139295697212219,
-0.5653457045555115,
0.6527193188667297,
-0.5233412384986877,
0.1967138350009918... | |
)
Call rtitem.AppendText ( lastdayerrors )
Call rtitem.AppendText ( ", " )
Call rtitem.AppendText ( lastdaysfiles2 )
Call rtitem.AppendText ( ", " )
Call rtitem.AppendText ( inputfeedcounter )
Call rtitem.AppendText ( ", " )
Call rtitem.AppendText ( alertthresholdinhours )
Call newDoc.Sa... | [
0.24736230075359344,
-0.02574225328862667,
0.5849186778068542,
-0.31285974383354187,
0.16854992508888245,
-0.02486751787364483,
0.586085855960846,
-0.2924369275569916,
-0.135999396443367,
-0.6491389870643616,
-0.4552401304244995,
0.821442723274231,
-0.6418611407279968,
0.2598220705986023,
... | |
newDoc.Send( False )
End Sub
```
For not being a developer, you can write a lot of code :)
If you are looking for some lessons to start becoming a good developer, then take Mitch's advice (from the comments) and break up this into subroutines. Lesson 1: There's definitely some repetitve code here, and it's always a g... | [
0.3731565773487091,
-0.07469293475151062,
0.21408943831920624,
0.1529296338558197,
0.07279662042856216,
-0.39312946796417236,
0.5799705386161804,
-0.31927528977394104,
-0.32622718811035156,
-0.5090075135231018,
-0.10945062339305878,
0.5222028493881226,
-0.36751991510391235,
0.1415667384862... | |
Function
```
However, you might even be able to save the need for that if I'm understanding your code correctly. Instead of doing that strange loop in the middle, it appears you're are trying to simply get a value from a column of a viewentry. Say you are interetsed in column 4's value. You can simply get at the valu... | [
-0.02727717161178589,
-0.08175255358219147,
0.5563476085662842,
-0.11836858838796616,
0.10783404111862183,
0.1418219804763794,
0.008545458316802979,
-0.14827007055282593,
-0.29101958870887756,
-0.48849228024482727,
0.023657917976379395,
0.5914866328239441,
-0.3967301845550537,
0.0401739776... | |
line is if this code works then you're off to a good start! | [
0.4516478478908539,
0.1730850338935852,
0.07233452051877975,
0.17733274400234222,
0.09043818712234497,
-0.2822206914424896,
0.29115423560142517,
0.5764713883399963,
0.006882332731038332,
-0.19234569370746613,
0.20070432126522064,
0.5244895815849304,
0.33640357851982117,
0.03209266439080238... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.