text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
$x = new-object system.io.driveinfo("h:\")
PS H:\> $x.drivetype
Network
``` | [
0.004015315789729357,
0.08564002066850662,
0.4423392415046692,
-0.11433438956737518,
0.05627164617180824,
-0.08462253957986832,
-0.013970657251775265,
0.22584624588489532,
0.05305013060569763,
-0.9440246820449829,
-0.21998104453086853,
0.6416799426078796,
-0.5175976157188416,
0.39664682745... | |
I have a little program that I want to make open automatically when my mac is started up.
Because this program accepts command line arguments, its not as simple as just going to System Prefs/Accounts/Login items and adding it there...
From google, I read that I can create a .profile file in my user's home folder, and... | [
0.3448028564453125,
0.4212465286254883,
0.6503666639328003,
-0.19039152562618256,
0.1450764238834381,
0.10705490410327911,
0.5367665886878967,
-0.08382981270551682,
-0.14791584014892578,
-1.0945343971252441,
0.0009082065662369132,
0.7990739941596985,
-0.1919383406639099,
-0.092240966856479... | |
work.
Any ideas?
From here and into the future, look into [`launchd`](http://www.google.com/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fdeveloper.apple.com%2Fmacosx%2Flaunchd.html&ei=JKHjSLHbH5GMpwT2_tH4Cw&usg=AFQjCNH84xt1QnHIRkhYtYJtGScdITegxQ&sig2=xYVn27D-CXFP8IbLig9-qg) for what you want to do. All other metho... | [
0.5878796577453613,
-0.028217561542987823,
0.25412118434906006,
-0.06275918334722519,
0.4911554157733917,
-0.29358968138694763,
0.35979482531547546,
-0.2261398285627365,
-0.30514106154441833,
-0.6881178021430969,
-0.2280684858560562,
0.6944801807403564,
0.006985761225223541,
-0.27152228355... | |
So I have a daemon running on a Linux system, and I want to have a record of its activities: a log. The question is, what is the "best" way to accomplish this?
My first idea is to simply open a file and write to it.
```
FILE* log = fopen("logfile.log", "w");
/* daemon works...needs to write to log */
fprintf(log, "fo... | [
0.39892086386680603,
0.11837138235569,
0.20135943591594696,
-0.12483958154916763,
0.060892052948474884,
-0.3174174129962921,
0.27239811420440674,
0.0873936116695404,
-0.2868632376194,
-0.749297559261322,
0.06373479217290878,
0.7059739828109741,
-0.39046087861061096,
0.02870522253215313,
... | |
```
man 3 syslog
```
and you'll get the help for the C interface to it.
[Some](http://www.codeproject.com/KB/IP/syslog_client.aspx) [examples](http://www.c.happycodings.com/Gnu-Linux/code21.html)
```
#include <stdio.h>
#include <unistd.h>
#include <syslog.h>
int main(void) {
openlog("slog", LOG_PID|LOG_CONS, LOG... | [
-0.1750759780406952,
0.32248246669769287,
0.5622085928916931,
-0.2039213925600052,
-0.35421404242515564,
0.017933867871761322,
0.6937770247459412,
-0.29885029792785645,
-0.3279143273830414,
-0.6002851128578186,
-0.5307077169418335,
0.5112276673316956,
-0.7848143577575684,
0.181114107370376... | |
I have a PDF file, which contains data that we need to import into a database. The files seem to be pdf scans of printed alphanumeric text. Looks like 10 pt. Times New Roman.
Are there any tools or components that can will allow me to recognize and parse this text?
I've used [pdftohtml](http://pdftohtml.sourceforge.n... | [
0.5275166034698486,
0.33996859192848206,
0.4985921382904053,
-0.014215550385415554,
-0.1010420098900795,
-0.3169577419757843,
0.02849787101149559,
-0.23553913831710815,
-0.24549271166324615,
-0.5567336082458496,
-0.005891318432986736,
0.42238736152648926,
0.00006005098111927509,
0.00303752... | |
port of Java's [iText](http://www.1t3xt.com/products/index.php) - and [PDFBox](http://www.pdfbox.org/) (yes, it says Java - but they have a .NET version by way of [IKVM.NET](http://www.ikvm.net/)). Here's some CodeProject articles on using [iTextSharp](http://www.codeproject.com/KB/cs/PDFToText.aspx) and [PDFBox](http:... | [
0.16332955658435822,
0.006132035981863737,
0.5922493934631348,
-0.007361672352999449,
-0.10387418419122696,
0.06599543988704681,
0.11846960335969925,
-0.11643724143505096,
-0.4361463487148285,
-0.4051409661769867,
-0.31225717067718506,
0.4843211770057678,
-0.4663351774215698,
-0.2550173699... | |
to do that fairly easily) and run it through an OCR engine.
I've used [MODI](http://en.wikipedia.org/wiki/Microsoft_Office_Document_Imaging) interactively before, with decent results. It's COM, so calling it from C# via interop is also [doable](http://secure.codeproject.com/KB/office/OCRSampleApplication.aspx) and pr... | [
0.47628360986709595,
-0.005901291500777006,
0.9824470281600952,
-0.14318712055683136,
0.04226011410355568,
-0.17643308639526367,
0.11179827898740768,
-0.48790067434310913,
-0.16724316775798798,
-0.6281012296676636,
-0.054554570466279984,
0.8051273822784424,
-0.2834808826446533,
-0.27350199... | |
strRecText &= Doc1.Images(imageCounter).Layout.Text ' this puts the ocr results into a string
Next
File.AppendAllText("C:\test\testmodi.txt", strRecText) ' write the OCR file out to disk
Doc1.Close() ' clean up
Doc1 = Nothing
```
Others like [Tesseract](http://code.google.com/p/tesseract-ocr/), but I have di... | [
0.2565041482448578,
0.33669352531433105,
0.42639824748039246,
-0.21843136847019196,
-0.18613411486148834,
-0.12652075290679932,
0.29471588134765625,
-0.11217742413282394,
0.0525861456990242,
-0.574154257774353,
-0.2709195017814636,
0.5838359594345093,
-0.286543071269989,
-0.281358838081359... | |
break line tag is not working in firefox, neither in chrome. When i see the source of my page i get:
```
<p>Zugang zu Testaccount:</br></br>peter petrelli </br></br>sein Standardpwd.</br></br>peter.heroes.com</p>
```
However when i do view selected source, i get:
```
<p>Zugang zu Testaccount: peter petrelli sein... | [
-0.14121507108211517,
0.16314029693603516,
0.4876227080821991,
-0.12429356575012207,
-0.31420567631721497,
-0.22417205572128296,
0.24804919958114624,
-0.08507084101438522,
-0.24720504879951477,
-0.36817774176597595,
-0.4680083096027374,
0.27915921807289124,
-0.5397854447364807,
-0.41230234... | |
Can you do a better code? I need to check/uncheck all childs according to parent and when an child is checked, check parent, when all childs are unchecked uncheck parent.
```
$(".parent").children("input").click(function() {
$(this).parent().siblings("input").attr("checked", this.checked);
});
$(".parent").si... | [
0.17959657311439514,
-0.10226496309041977,
-0.07773162424564362,
0.28846946358680725,
0.32818305492401123,
0.1931915581226349,
0.8630915880203247,
-0.42956238985061646,
0.04400959610939026,
-0.5595804452896118,
-0.18275736272335052,
0.6608227491378784,
-0.28538087010383606,
0.0317351371049... | |
return;
}
$(this).parent().children("div").children("input").attr("checked", false);
});
```
```
$(".parent").children("input").click(function() {
$(this).parent().siblings("input").attr("checked", this.checked);
});
$(".parent").siblings("input").click(function() {
$(this).siblings("div").children("... | [
-0.08470052480697632,
0.02650904282927513,
0.1220722645521164,
-0.01794521138072014,
0.1808120459318161,
0.45681798458099365,
0.3452050983905792,
-0.3360310196876526,
-0.12211652100086212,
-0.5585755109786987,
-0.5809111595153809,
0.7229702472686768,
-0.42626675963401794,
0.437112092971801... | |
I'm creating a networked server for a boggle-clone I wrote in python, which accepts users, solves the boards, and scores the player input. The dictionary file I'm using is 1.8MB (the ENABLE2K dictionary), and I need it to be available to several game solver classes. Right now, I have it so that each class iterates thro... | [
0.14516384899616241,
0.10899472236633301,
0.3304620385169983,
-0.13897700607776642,
0.014783971011638641,
0.10841066390275955,
-0.17670689523220062,
-0.089230976998806,
0.04386342316865921,
-0.7757697701454163,
0.1973290890455246,
0.6032375693321228,
-0.317489355802536,
0.12715782225131989... | |
But what is the best way to do this? Should I import the dictionary in the global space, then access it in the solver class as globals()['dictionary']? Or should I import the dictionary then pass it as an argument to the class constructor? Is one of these better than the other? Is there a third option?
If you create a ... | [
-0.1834920346736908,
0.024932295083999634,
0.22173531353473663,
0.10545913875102997,
0.014767889864742756,
0.22801899909973145,
0.1841549426317215,
-0.09693782031536102,
-0.05085059627890587,
-0.6876024603843689,
-0.24211999773979187,
0.78629469871521,
-0.310895711183548,
-0.17294187843799... | |
dictionary.py has:
```
words = {}
# read file and add to 'words'
``` | [
-0.022315938025712967,
0.24605713784694672,
0.3558092415332794,
-0.05003977566957474,
0.0010129505535587668,
0.12785814702510834,
0.056400321424007416,
0.05296442657709122,
0.149764284491539,
-0.6660301685333252,
-0.2788906395435333,
0.3430957496166229,
-0.27140751481056213,
-0.08910144120... | |
I have a temporary file with data that's returned as part of a SOAP response via a MTOM binary attachment. I would like to trash it as soon as the method call "ends" (i.e., finishes transferring). What's the best way for me to do this? The best way I can figure out how to do this is to delete them when the session is d... | [
0.39814379811286926,
-0.006878503132611513,
0.4104875922203064,
0.2530794143676758,
-0.04180431365966797,
0.08372537791728973,
0.5002659559249878,
0.05644020065665245,
-0.0202396921813488,
-0.6940084099769592,
-0.0870499536395073,
0.4061542749404907,
-0.11729031056165695,
0.294056355953216... | |
how to delete a file in java. My problem is this:
```
@javax.jws.WebService
public class MyWebService {
...
@javax.jws.WebMethod
public MyFileResult getSomeObject() {
File mytempfile = new File("tempfile.txt");
MyFileResult result = new MyFileResult();
result.setFile(mytempfile); // sets mytempfile as M... | [
-0.06151968613266945,
0.09766170382499695,
0.6093502044677734,
-0.270917683839798,
0.13409852981567383,
0.0041842409409582615,
0.4273824095726013,
-0.40434741973876953,
-0.2537127137184143,
-0.7368475794792175,
-0.35379406809806824,
0.5722474455833435,
-0.3381691873073578,
0.18331177532672... | |
is not possible to determine in your code when JAX-WS is done with the file so you do not know when to delete it.
In my case, I am using a DataHandler on my object model rather than a file. MyFileResult would have the following field instead of a file field:
```
private DataHandler handler;
```
My solution was to c... | [
0.038279127329587936,
-0.3530932664871216,
0.42048755288124084,
0.005526344291865826,
0.22852866351604462,
0.012519603595137596,
-0.006282059010118246,
-0.014035330154001713,
-0.19366797804832458,
-0.7480770945549011,
-0.007149764336645603,
0.5647441744804382,
-0.5060555338859558,
0.282348... | |
super(file);
}
@Override
public void close() throws IOException {
super.close();
file.delete();
}
}
```
Essentially the datasource allows reading only once. After the stream is closed, the file is deleted. Since the JAX-WS stack only reads the file once, it works.
The solution is a b... | [
0.14918027818202972,
-0.10261046886444092,
0.6238817572593689,
-0.2625879645347595,
0.18732178211212158,
-0.2928538918495178,
0.47792157530784607,
0.029217902570962906,
0.032474733889102936,
-0.5272914171218872,
-0.26535311341285706,
0.5110705494880676,
-0.45029792189598083,
0.285151243209... | |
I am trying to add a timed delay in a C++ program, and was wondering if anyone has any suggestions on what I can try or information I can look at?
I wish I had more details on how I am implementing this timed delay, but until I have more information on how to add a timed delay I am not sure on how I should even attemp... | [
0.4595157504081726,
-0.04999527335166931,
0.3559274673461914,
-0.2691854238510132,
0.04091566428542137,
-0.3031389117240906,
0.1526399850845337,
-0.232015922665596,
-0.2674378752708435,
-0.8253000378608704,
-0.21134798228740692,
0.49857407808303833,
-0.03336753696203232,
-0.137367814779281... | |
I have a function in a native DLL defined as follows:
```
#include <string>
void SetPath(string path);
```
I tried to put this in Microsoft's P/Invoke Interop Assistant, but it chokes on the "string" class (which I think is from MFC?).
I have tried marshaling it as a variety of different types (C# String, char[], b... | [
0.3471410870552063,
0.17033913731575012,
0.0071190595626831055,
-0.0007167941657826304,
0.11228261888027191,
-0.3737558424472809,
0.3141684830188751,
-0.3226453363895416,
-0.15433847904205322,
-0.6715970635414124,
0.07601656019687653,
0.44673866033554077,
-0.39870312809944153,
0.1293177902... | |
trying to use the C++ standard library string class. I doubt that will be easy to Marshal. Better to stick with a char \* and Marshal as StringBuilder. That's what I usually do. You'll have to add a wrapper that generates the C++ string for you. | [
0.31969454884529114,
0.2251352071762085,
-0.0739484503865242,
0.028844179585576057,
-0.04945286735892296,
-0.20102183520793915,
0.393455445766449,
-0.2590125799179077,
-0.12014185637235641,
-0.47076618671417236,
-0.2010263204574585,
0.6544594764709473,
-0.18312135338783264,
-0.083102479577... | |
What VBA code is required to perform an HTTP POST from an Excel spreadsheet?
```
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
URL = "http://www.somedomain.com"
objHTTP.Open "POST", URL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
objHTTP.send ""
```
Alternat... | [
0.2740311622619629,
-0.0393957793712616,
0.5006067752838135,
-0.12209916114807129,
-0.21122315526008606,
-0.04277849942445755,
0.5493751764297485,
-0.3778378367424011,
-0.22693149745464325,
-0.10049207508563995,
-0.10744241625070572,
0.48509010672569275,
-0.6665975451469421,
0.357615321874... | |
I want to delete all directories and subdirectories under a root directory that are contain "tmp" in their names. This should include any .svn files too. My first guess is to use
```
<delete>
<dirset dir="${root}">
<include name="**/*tmp*" />
</dirset>
</delete>
```
This does not seem to work as y... | [
-0.047419872134923935,
-0.16064924001693726,
0.2498956173658371,
-0.27185219526290894,
-0.08162445574998856,
0.14319176971912384,
0.5105384588241577,
-0.29065603017807007,
-0.15272238850593567,
-0.6271498203277588,
-0.11600048840045929,
0.5638842582702637,
-0.49214303493499756,
0.057151380... | |
defaultexcludes="false">
<include name="**/*tmp*/**" />
</fileset>
</delete>
```
I had an added complication I needed to remove `.svn` directories too. With `defaultexcludes`, `.*` files were being excluded, and so the empty directories weren't really empty, and so weren't getting removed.
The attribute `... | [
0.05568591132760048,
-0.20186804234981537,
0.3252184987068176,
-0.03508292883634567,
-0.02554701827466488,
-0.34476447105407715,
0.3571862578392029,
0.026311129331588745,
-0.24825449287891388,
-0.1883312165737152,
-0.39051929116249084,
0.49287307262420654,
-0.57768315076828,
0.018632268533... | |
I'd like to check if the current browser supports the onbeforeunload event.
The common javascript way to do this does not seem to work:
```
if (window.onbeforeunload) {
alert('yes');
}
else {
alert('no');
}
```
Actually, it only checks whether some handler has been attached to the event.
Is there a way to de... | [
0.27029240131378174,
0.006148918531835079,
0.08695746213197708,
-0.017936572432518005,
0.02708057500422001,
-0.482839971780777,
0.3462311327457428,
0.04972638562321663,
-0.1846226453781128,
-0.5920256972312927,
-0.0516466349363327,
0.603576123714447,
-0.2640606164932251,
0.0348379909992218... | |
used in jQuery, Prototype.js, Modernizr, and likely other scripts and libraries. | [
-0.046832744032144547,
-0.13578049838542938,
0.04383598640561104,
0.01586870476603508,
0.004258610773831606,
-0.33138030767440796,
-0.230242058634758,
0.4724363684654236,
-0.05544646084308624,
-0.4149836599826813,
-0.3410619795322418,
0.13037531077861786,
-0.270328551530838,
-0.05539916083... | |
I'm using the Excel interop in C# (`ApplicationClass`) and have placed the following code in my finally clause:
```
while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { }
excelSheet = null;
GC.Collect();
GC.WaitForPendingFinalizers();
```
Although this kind of works, the `Excel.exe` pro... | [
0.29369232058525085,
0.30790629982948303,
0.5968496203422546,
-0.19844621419906616,
-0.12077482789754868,
-0.24209406971931458,
0.41586974263191223,
-0.08045385032892227,
-0.13390395045280457,
-0.6101437211036682,
-0.12645231187343597,
0.731441080570221,
-0.4264369606971741,
0.219155505299... | |
it was the *excelApp.Worksheets* object which I directly used without assigning it to a variable:
```
Worksheet sheet = excelApp.Worksheets.Open(...);
...
Marshal.ReleaseComObject(sheet);
```
I didn't know that internally C# created a wrapper for the **Worksheets** COM object which didn't get released by my code (be... | [
-0.07832156866788864,
0.07932160794734955,
0.33635997772216797,
-0.11444047093391418,
-0.07522124797105789,
-0.06862757354974747,
0.26926594972610474,
0.02190028503537178,
-0.3853786289691925,
-0.7073507308959961,
0.03292400389909744,
0.4495421350002289,
-0.49275273084640503,
-0.0142554268... | |
important part
Worksheet sheet = sheets.Open(...);
...
Marshal.ReleaseComObject(sheets);
Marshal.ReleaseComObject(sheet);
```
**POST MORTEM UPDATE:**
I want every reader to read this answer by Hans Passant very carefully as it explains the trap I and lots of other developers stumbled into. When I wrote this answer y... | [
-0.5472714900970459,
0.13383632898330688,
0.45064660906791687,
0.25390714406967163,
-0.1261945366859436,
-0.08527373522520065,
0.13094164431095123,
-0.24781930446624756,
-0.07054785639047623,
-0.41430893540382385,
-0.40339961647987366,
0.19373436272144318,
-0.09517934173345566,
-0.09859741... | |
I work in an multi-site environment that's currently using Rational ClearCase for source control and Rational ClearQuest for issue tracking (I accept your condolences ahead of time). As a rough estimate I would say this is supporting 200 engineers.
How would you effectively migrate this SCM methodology to a comparativ... | [
0.4590013921260834,
0.14295694231987,
0.01830226741731167,
0.2882852554321289,
0.2510101795196533,
-0.24307172000408173,
-0.14219968020915985,
0.12151773273944855,
-0.20169538259506226,
-0.7476015686988831,
0.09569040685892105,
0.637904167175293,
0.08252806216478348,
0.15696197748184204,
... | |
I haven't used ClearCase much, and ClearQuest not at all. What about these tools is hindering development?
Once you know what you want, you need to look at various tools. I'm fond of Subversion for SCM, as a general rule, but there are situations it isn't well suited for. I have no strong feelings on specific version ... | [
0.37436896562576294,
0.043276138603687286,
0.009746258147060871,
0.030323786661028862,
0.10092396289110184,
-0.18000715970993042,
-0.052435971796512604,
0.39176908135414124,
-0.3696616590023041,
-0.5347865223884583,
0.1547868549823761,
0.5395117998123169,
0.010279974900186062,
0.1712580323... | |
you want to keep is a lot more work), so there will be no immediate dollar savings. Moreover, switching tools is going to reduce developer productivity for a short time (possibly very short), so this is best seen as a long-term move. Make sure you get the tools you want up front, since you aren't going to want to do mi... | [
0.5986053943634033,
-0.0265046376734972,
0.10831736028194427,
0.1699788123369217,
0.4296444058418274,
-0.15225590765476227,
0.27977511286735535,
-0.06808465719223022,
-0.34692350029945374,
-0.6205834150314331,
-0.08794247359037399,
0.7661827206611633,
0.07366351038217545,
-0.12455720454454... | |
I'm writing a series of Windows services. I want them to fail if errors are thrown during startup (in `OnStart()` method). I had assumed that merely throwing an error in `OnStart()` would do this, but I'm finding that instead it "Starts" and presents me with a message stating "The service has started, but is inactive. ... | [
0.25001540780067444,
0.1418127864599228,
0.3145343065261841,
-0.23501135408878326,
0.06532001495361328,
-0.19723810255527496,
0.8732597827911377,
0.25073671340942383,
-0.2204655110836029,
-0.5615701079368591,
-0.4165920317173004,
0.5235940217971802,
-0.27470168471336365,
0.20909383893013,
... | |
group gone) | [
-0.23119434714317322,
-0.12717393040657043,
0.2966167628765106,
-0.15061096847057343,
-0.15338905155658722,
0.05980159714818001,
0.4758600890636444,
0.053123973309993744,
-0.4115781784057617,
-0.010395006276667118,
-0.2558974325656891,
0.34914010763168335,
-0.5157180428504944,
0.2494792044... | |
I've got a lot of mysql data that I need to generate reports from. It's mostly historic data so it won't be changing much, but it weighs in at 20-30 gigabytes easily and is expected to grow. I currently have a collection of php scripts that will do some complex queries and output csv and excel files. I also use phpMyAd... | [
0.3649561107158661,
0.38846343755722046,
0.34403350949287415,
0.2041463702917099,
-0.0015658218180760741,
-0.09713571518659592,
0.24193577468395233,
0.09198056161403656,
-0.33483967185020447,
-0.7243813276290894,
0.18171660602092743,
0.4057687520980835,
0.23078981041908264,
0.0524097643792... | |
started reading about data warehousing the other day and it seems that this an area that relates to what I need to do. I've read [some](http://philip.greenspun.com/wtr/data-warehousing.html) [good](http://www.meansandends.com/mysql-data-warehouse/?link_body/body=%7Bincl:Aggregation%7D) [articles](http://en.wikipedia.or... | [
0.9176552891731262,
0.03815288469195366,
0.3620681166648865,
0.05616417154669762,
-0.1047416552901268,
-0.4021514356136322,
-0.08899176120758057,
-0.05282674729824066,
-0.5158702731132507,
-0.4664553701877594,
0.1483471691608429,
0.44398999214172363,
0.3100544810295105,
0.16575291752815247... | |
in the development. I'd gladly skip writing interfaces and scripts to schedule and email reports and the like and stick to writing queries and setting up relations.
I've mostly been a lamp guy, but I'm not above switching languages or platforms. I just need a more robust solution as my one off scripts don't scale well... | [
0.5822471976280212,
0.3038429915904999,
0.08926943689584732,
0.1194390058517456,
-0.000009330052307632286,
0.12433403730392456,
-0.041629597544670105,
0.006855872925370932,
-0.0185712780803442,
-0.855162501335144,
-0.0007007288513705134,
0.5101461410522461,
0.11213476955890656,
0.150133803... | |
warehouse - Normalized for In One Place Only data maintenance
* Data access layer
The transformation of your source data into your informational access layer.
ETL tools to extract, transform, load data into the warehouse fall into this layer.
* Informational access layer
• Report-facilitating Data Structure
... | [
0.36843591928482056,
0.0335715152323246,
0.3619537651538849,
0.1772008091211319,
-0.09814471006393433,
-0.07879804074764252,
-0.12188578397035599,
-0.10804971307516098,
-0.46761274337768555,
-0.5007770657539368,
-0.2985084354877472,
0.6114591956138611,
-0.018741875886917114,
0.160423710942... | |
• pre-canned reports (simple)
• more dynamic slice-and-dice access methods
The data accessed for reporting and analyzing and the tools for reporting and analyzing data
fall into this layer. And the Inmon-Kimball differences about design methodology,
discussed later in the Wikipedia a... | [
0.38406798243522644,
0.12304239720106125,
-0.1699834167957306,
0.37856921553611755,
0.009923753328621387,
-0.24479444324970245,
-0.34670743346214294,
-0.14719505608081818,
-0.48591405153274536,
-0.5141718983650208,
0.03577067703008652,
0.6158021688461304,
0.25917288661003113,
-0.2607164978... | |
required)
You don't need to use all the functionality of a platform right off the bat.
IMO, however, you want to be on a platform that you know will grow, and in the highly competitive and consolidating BI environment, that seems to be one of the four enterprise mega-vendors (my opinion)
* Microsoft (the platform of... | [
0.6188929080963135,
0.05967720225453377,
0.48782914876937866,
0.25356629490852356,
0.14762841165065765,
-0.166282057762146,
-0.18330974876880646,
-0.3425659239292145,
-0.11134842038154602,
-0.18400026857852936,
-0.18587088584899902,
0.5973469614982605,
0.07908416539430618,
0.18543201684951... | |
Layer", a denormalized reporting structure (implemented completely in the basic SQL Server database), and SQL Server Reporting Services (SSRS) to largely automate (based on your skill) the production of pre-specified reports. Note that an SSRS "report" is merely a (scalable) XML configuration/specification that gets re... | [
0.17985276877880096,
-0.26701968908309937,
0.6245577931404114,
0.2640796899795532,
-0.10496387630701065,
-0.3118506968021393,
0.226829394698143,
-0.21136635541915894,
-0.3947692811489105,
-0.6881729364395142,
-0.3347688317298889,
0.4366492033004761,
0.035240545868873596,
-0.207254350185394... | |
the "Data Access Layer".
I hope this helps you to get a sense of where to start looking. | [
0.3038524091243744,
-0.2141447216272354,
0.22485323250293732,
0.3936496376991272,
0.2458067685365677,
-0.4736550450325012,
-0.007226066198199987,
0.3859712779521942,
-0.13856986165046692,
-0.6298304200172424,
-0.1149764284491539,
0.3009735643863678,
0.1774912178516388,
0.21404777467250824,... | |
I'm trying to iterate all the controls on a form and enable ClearType font smoothing. Something like this:
```
procedure TForm4.UpdateControls(AParent: TWinControl);
var
I: Integer;
ACtrl: TControl;
tagLOGFONT: TLogFont;
begin
for I := 0 to AParent.ControlCount-1 do
begin
ACtrl:= AParent.Controls[I];
... | [
0.021957049146294594,
-0.058934617787599564,
0.8160766363143921,
-0.1461108922958374,
-0.08847909420728683,
0.28826576471328735,
0.47240790724754333,
-0.5806185603141785,
0.0980633795261383,
-0.6315493583679199,
-0.04149967432022095,
0.5475025773048401,
-0.4221951961517334,
0.0473432540893... | |
you in advance.
You use TypInfo unit, more specifically methods IsPublishedProp and GetOrdProp.
In your case, it would be something like:
```
if IsPublishedProp(ACtrl, 'Font') then
ModifyFont(TFont(GetOrdProp(ACtrl, 'Font')))
```
A fragment from one of my libraries that should put you on the right path:
```
func... | [
0.1040847972035408,
-0.32243862748146057,
0.4431905746459961,
-0.005282760597765446,
0.3055415749549866,
-0.06326957792043686,
0.32549357414245605,
-0.49833813309669495,
0.14474405348300934,
-0.5772895812988281,
-0.36379456520080566,
0.6664625406265259,
-0.2957526743412018,
-0.050231158733... | |
ignored.Text := ignoreControls;
end;
try
for iControl := 0 to controlParent.ControlCount-1 do begin
child := controlParent.Controls[iControl];
if (requiredControlNamePrefix = '') or
SameText(requiredControlNamePrefix, Copy(child.Name, 1,
Length(requiredControlNamePrefix))) then
... | [
-0.2144511491060257,
0.025007041171193123,
0.5601618885993958,
-0.09241317212581635,
0.5668528079986572,
0.12064448744058609,
0.484895795583725,
-0.4342687726020813,
-0.2204194962978363,
-0.29316002130508423,
-0.4516025185585022,
0.3641291856765747,
-0.40750396251678467,
0.0740317776799202... | |
else if IsPublishedProp(child, 'Lines') then begin
obj := TObject(cardinal(GetOrdProp(child, 'Lines')));
if (obj is TStrings) and (Unwrap(TStrings(obj).Text, child) <> '') then
Exit;
end;
end; //for iControl
finally FreeAndNil(ignored); end;
Result := false;
end; { ContainsNonemp... | [
-0.2275983691215515,
-0.09156911075115204,
0.682368278503418,
-0.2532742917537689,
0.21854202449321747,
0.13537463545799255,
0.5652926564216614,
-0.29489216208457947,
-0.10864269733428955,
-0.5110687017440796,
-0.7395493984222412,
0.5506535172462463,
-0.3385586142539978,
0.1207547932863235... | |
First off, let me start off that I am not a .net developer. The reason why I am asking this question is that we rolled out our REST-API and one of our first integration partners is a .net shop.
So basically we assumed that .net would provide some sort of wrapper to create JSON, but the developer in question created th... | [
0.34221044182777405,
0.10618400573730469,
0.04484255984425545,
-0.03693126514554024,
-0.14571921527385712,
-0.26587677001953125,
0.20455814898014069,
0.4940800964832306,
-0.006078644189983606,
-0.412217915058136,
0.1868782639503479,
0.5896440148353577,
-0.32225796580314636,
0.2244175076484... | |
ext/json is available ;):
```
<?php
$json = array('hello', 'world');
$json = json_encode($json);
```
I am also interested in what you use to decode the json into an array/object structure.
Help is very appreciated.
There are a couple first-party and third-party options. [Rick Strahl](http://www.west-wind.com/weblog... | [
-0.01392802968621254,
-0.38765621185302734,
0.22171659767627716,
-0.08333217352628708,
-0.07358527928590775,
0.024129070341587067,
0.4169357419013977,
0.3927224576473236,
-0.363716721534729,
-0.821786642074585,
-0.6219021677970886,
0.36324596405029297,
-0.3821081817150116,
-0.1430056393146... | |
I'm pulling my hair out on what should be an insanely simple problem. We are running WebSphere IHS (Apache) through an F5 BigIP. BigIP is doing the https translation for us. Our url (changed for web, not valid) is <https://superniftyserver.com/lawson/portal>.
When someone types in just that without the slash after por... | [
0.8223680853843689,
-0.2839670777320862,
0.6782720685005188,
-0.04690486192703247,
0.032589223235845566,
-0.2048656940460205,
0.3121572434902191,
-0.05318255349993706,
-0.2072187215089798,
-0.32697606086730957,
0.22081202268600464,
0.18337473273277283,
-0.2353842407464981,
0.37156158685684... | |
is one of the dozens of combinations I've tried.
RewriteEngine on
RewriteRule ^/lawson/portal(.\*) /lawson/portal/$1
I also tried
RewriteRule ^/lawson/portal$ /lawson/portal/
Among many other things... What am I missing?
If you can't get an answer on the RewriteRule syntax, here are two other options for you: Write... | [
0.10016624629497528,
-0.30784136056900024,
0.8588696718215942,
0.02522427774965763,
-0.10942371189594269,
-0.09901509433984756,
0.4987308979034424,
-0.5066847205162048,
-0.10068661719560623,
-0.6894742846488953,
0.10624747723340988,
0.6221123337745667,
-0.4587254524230957,
-0.0341349802911... | |
as you would expect. | [
0.02622228115797043,
0.0760754868388176,
0.17019936442375183,
-0.24211609363555908,
0.22361326217651367,
-0.02874290570616722,
0.2747204899787903,
0.23815098404884338,
-0.35339340567588806,
-0.06436654180288315,
-0.09363582730293274,
0.1906222254037857,
0.12272356450557709,
0.0606454871594... | |
Does anyone know of any methods to create a file upload progress bar in PHP? I have often heard that it's impossible.
I have one idea, but not sure if it would work: have a normal file upload, but instead submit to an iframe. When this is submitted, store the file information (size and temp location) in the session. A... | [
0.3811472952365875,
0.08524120599031448,
0.26930883526802063,
0.1372978240251541,
-0.45719778537750244,
-0.11381352692842484,
0.21085481345653534,
-0.1728334277868271,
-0.2038436084985733,
-0.8282954096794128,
0.2654767632484436,
0.4310852587223053,
-0.0021140878088772297,
-0.1672516763210... | |
be sized and maybe display the uploaded size to the user.
Thoughts?
You can try [YUI](http://developer.yahoo.com/yui/uploader/) or [Prototype](http://www.google.com/search?q=prototype+upload+progress) or [JQuery](http://www.google.com/search?q=jquery+upload+progress) | [
0.3189367949962616,
-0.45951172709465027,
0.09094473719596863,
0.15376512706279755,
-0.4868007004261017,
0.588250994682312,
-0.1287880688905716,
-0.059212345629930496,
-0.30811113119125366,
-0.8052024245262146,
0.25204411149024963,
0.19839343428611755,
0.08520308136940002,
-0.1612304896116... | |
Is it possible to reset the alternate buffer in a vim session to what it was previously?
By alternate buffer, I mean the one that is referred to by #, i.e. the one that is displayed when you enter cntl-^.
Say I've got two files open main.c and other.c and :ls gives me:
```
1 %a "main.c" lines 27
2... | [
0.1926339566707611,
-0.006595965474843979,
0.5872023105621338,
-0.14402888715267181,
0.3533293604850769,
0.23151762783527374,
0.11884789168834686,
0.19833767414093018,
-0.4426285922527313,
-0.6425285935401917,
-0.04231255501508713,
0.6462213397026062,
-0.2269589900970459,
-0.12320283055305... | |
will now give me:
```
1 %a "main.c" lines 27
2 "other.c" lines 56
3 # "refer.c" lines 125
```
If I delete the buffer containing refer.c, :ls now shows:
```
1 %a "main.c" lines 27
2 | [
-0.2034153789281845,
0.16126574575901031,
0.5354486703872681,
-0.6299939155578613,
0.38436442613601685,
0.147677481174469,
0.1515493094921112,
0.09277261793613434,
-0.012963916175067425,
-0.6381782293319702,
-0.2512064576148987,
0.28422385454177856,
-0.3232165575027466,
0.1588202267885208,... | |
"other.c" lines 56
```
But if I do a cntl-^, refer.c will be displayed again!
Is there some way to get vim to reset the alternate buffer back to what it last was automatically? A "history" of alternate buffers?
Or am I stuck with doing a :2 b to reload other.c into the alternate buffer?
Or maybe there ... | [
0.09097170829772949,
-0.12499801069498062,
0.38155853748321533,
-0.04900577664375305,
0.17882637679576874,
0.0437503382563591,
0.32848069071769714,
0.15511251986026764,
-0.4805835783481598,
-0.6084265112876892,
-0.005879211705178022,
0.34272342920303345,
-0.4799714684486389,
0.211701288819... | |
be toggled by ctrl-6.
Also, take a look at the :keepalt command. | [
0.3917267918586731,
-0.2549479007720947,
0.5682336688041687,
0.1185058206319809,
0.30506861209869385,
-0.4677233397960663,
0.4724818468093872,
0.24070052802562714,
-0.16813181340694427,
-0.21893687546253204,
-0.2661988139152527,
0.9195273518562317,
-0.4604141116142273,
-0.24781908094882965... | |
I'm making a request from an `UpdatePanel` that takes more then 90 seconds. I'm getting this timeout error:
> Microsoft JScript runtime error:
> Sys.WebForms.PageRequestManagerTimeoutException: The server request
> timed out.
Does anyone know if there is a way to increase the amount of time before the call times ou... | [
0.3430502116680145,
-0.22732394933700562,
0.6113758087158203,
-0.14007844030857086,
0.09102194756269455,
0.009993607178330421,
0.46723639965057373,
-0.2634687125682831,
0.09760916978120804,
-0.7547488212585449,
0.17486587166786194,
0.6377612352371216,
0.0014033553889021277,
-0.139211446046... | |
I am **very** new to the entity framework, so please bear with me...
How can I relate two objects from different contexts together?
The example below throws the following exception:
> System.InvalidOperationException: The
> relationship between the two objects
> cannot be defined because they are
> attached to di... | [
0.07507041096687317,
-0.255290150642395,
0.5390156507492065,
0.049194179475307465,
0.403650164604187,
-0.013347499072551727,
0.1536804884672165,
-0.24378344416618347,
-0.0619218647480011,
-0.7317563891410828,
-0.1572166532278061,
0.518034815788269,
-0.16496722400188446,
0.2028241902589798,... | |
static Roles GetDefaultRole()
{
Roles r = null;
using (TCPSEntities model = new TCPSEntities())
{
r = model.Roles.First(p => p.RoleId == 1);
}
return r;
}
```
Using one context is not an option because we are using the EF in an ASP.NET application.
You will have to use the same context (yo... | [
-0.21428987383842468,
-0.6649474501609802,
0.537520170211792,
0.14358018338680267,
0.008445775136351585,
0.16109026968479156,
0.04948360100388527,
-0.34789806604385376,
-0.32500165700912476,
-0.5866788029670715,
-0.08571179211139679,
0.587902843952179,
-0.6987619400024414,
0.06205021589994... | |
to fully think out your context and relationship designs.
You could simply pass the context.. IE:
```
void MyFunction()
{
using (TCPSEntities model = new TCPSEntities())
{
EmployeeRoles er = model.EmployeeRoles.First(p=>p.EmployeeId == 123);
er.Roles = GetDefaultRole(model);
model.Save... | [
-0.06271428614854813,
-0.39003536105155945,
0.5941101312637329,
-0.02110082283616066,
0.2462046891450882,
0.3318248391151428,
0.010287456214427948,
-0.3167734444141388,
-0.11771920323371887,
-0.707781970500946,
-0.13122697174549103,
0.8044747114181519,
-0.3328629434108734,
0.03763248026371... | |
Is there any way to format a string by name rather than position in C#?
In python, I can do something like this example (shamelessly stolen from [here](http://docs.python.org/lib/typesseq-strings.html)):
```
>>> print '%(language)s has %(#)03d quote types.' % \
{'language': "Python", "#": 2}
Python has 002 quot... | [
-0.020760510116815567,
0.0061896308325231075,
0.42066776752471924,
-0.08755766600370407,
-0.09854383021593094,
-0.12784382700920105,
0.027283312752842903,
-0.10144376754760742,
-0.2794424295425415,
-0.31342601776123047,
0.013388164341449738,
0.6877902746200562,
-0.29122453927993774,
-0.149... | |
logged in at {LastLoginDate}".FormatWith(user);
```
[A third improved method partially based on the two above](http://haacked.com/archive/2009/01/04/fun-with-named-formats-string-parsing-and-edge-cases.aspx), from Phil Haack | [
0.3086622655391693,
-0.168892040848732,
0.19434957206249237,
0.18636049330234528,
0.24398131668567657,
-0.19777345657348633,
0.2614096403121948,
0.3007282316684723,
-0.6888064742088318,
-0.46234047412872314,
-0.08367947489023209,
0.1597452610731125,
-0.3108145594596863,
-0.2258691638708114... | |
Are C++ enums signed or unsigned? And by extension is it safe to validate an input by checking that it is <= your max value, and leave out >= your min value (assuming you started at 0 and incremented by 1)?
You shouldn't rely on any specific representation. Read the following [link](http://www.parashift.com/c++-faq-lit... | [
0.2620611786842346,
-0.0405004657804966,
0.35358622670173645,
-0.021328285336494446,
0.004690025933086872,
0.0321638397872448,
-0.23236314952373505,
-0.5741571187973022,
-0.26685723662376404,
-0.16652676463127136,
-0.11720594018697739,
0.615887463092804,
-0.21420423686504364,
-0.1530177295... | |
signed or unsigned. | [
0.2270599901676178,
0.13348397612571716,
-0.0792168527841568,
0.058524779975414276,
0.41381585597991943,
0.16762617230415344,
0.09784610569477081,
0.32017606496810913,
-0.3712780475616455,
-0.11777421832084656,
-0.1529189795255661,
0.381905198097229,
-0.15986162424087524,
-0.02777477726340... | |
Are there any open source or commercial web programming language that function much like Fog Creek's Wasabi? As in you write your web app in this parent language and it then compiles down to php for Linux hosts and ASP.NET for Windows hosts.
[Genexus](http://www.genexus.com/) is a commercial development tool that does ... | [
0.6548003554344177,
0.37968653440475464,
-0.302829772233963,
-0.029453502967953682,
-0.01690163090825081,
-0.03432001546025276,
-0.04175856336951256,
0.464785099029541,
-0.046068910509347916,
-0.7543317675590515,
0.24220599234104156,
0.14159680902957916,
-0.48899027705192566,
0.22793246805... | |
Is there any way to output the contents of an XDocument without the BOM? When reading the output with Flash, it causes errors.
If you're writing the XML with an XmlWriter, you can set the Encoding to one that has been initialized to leave out the BOM.
EG: System.Text.UTF8Encoding's constructor takes a boolean to spec... | [
0.10130610316991806,
0.19317272305488586,
0.5860693454742432,
-0.12158375978469849,
0.06234269216656685,
-0.19670931994915009,
0.11928670108318329,
-0.3101738393306732,
0.12579219043254852,
-0.5795609951019287,
-0.19198442995548248,
0.6210197806358337,
-0.3382718861103058,
0.05486200004816... | |
Which type of input is least vulnerable to Cross-Site Scripting (XSS) and SQL Injection attacks.
PHP, HTML, BBCode, etc. I need to know for a forum I'm helping a friend set up.
We need to know more about your situation. Vulnerable how? Some things you should always do:
* Escape strings before storing them in a databa... | [
0.36735254526138306,
0.07591938227415085,
0.3853512704372406,
-0.004903505090624094,
-0.2977372407913208,
-0.024557918310165405,
0.3811090886592865,
-0.03066467121243477,
-0.19810716807842255,
-0.8064394593238831,
0.10800734162330627,
0.4252031147480011,
-0.3327665627002716,
0.095039367675... | |
to look into XSS vulnerabilities related to malformed image tags. If you allow HTML input, you can whitelist certain elements, but this will be a complicated approach that is prone to errors. So, given all of the preceding, I would say that using a good off-the-shelf **BBCode** library would be your best bet. | [
0.6884564757347107,
-0.09129095822572708,
0.13092902302742004,
0.20824502408504486,
-0.17928262054920197,
-0.40568143129348755,
0.30612897872924805,
-0.0896112471818924,
-0.14381927251815796,
-0.5593022704124451,
0.057307273149490356,
0.5507457256317139,
-0.2089715301990509,
-0.03050063364... | |
Groovy adds the `execute` method to `String` to make executing shells fairly easy;
```
println "ls".execute().text
```
but if an error happens, then there is no resulting output. **Is there an easy way to get both the standard error and standard out?** (other than creating a bunch of code to; create two threads to r... | [
-0.17845036089420319,
-0.05528310313820839,
0.7200602889060974,
-0.337099552154541,
0.03442833200097084,
0.0424785353243351,
0.2850518226623535,
-0.134253591299057,
-0.3795909881591797,
-0.4811156094074249,
-0.08372672647237778,
0.6983692646026611,
-0.4982765316963196,
-0.13669916987419128... | |
'ls /badDir'.execute()
proc.consumeProcessOutput(sout, serr)
proc.waitForOrKill(1000)
println "out> $sout\nerr> $serr"
```
displays:
`out> err> ls: cannot access /badDir: No such file or directory` | [
0.053491003811359406,
-0.09535601735115051,
0.3422556519508362,
-0.41252613067626953,
0.21955063939094543,
0.41157066822052,
0.2976190745830536,
-0.07935906946659088,
-0.13055257499217987,
-0.7774524092674255,
-0.14185687899589539,
0.6357192397117615,
-0.5502566695213318,
-0.03876559436321... | |
I've used DTCTester before to diagnose MSDTC problems. However, I just noticed DTCPing seems to do about the same thing. What's the difference between these two?
From what I can tell so far, DTCPing needs to run on both client and server machines, whereas DTCTester only needs to run from the client. Are there any othe... | [
0.20461755990982056,
-0.3578169345855713,
0.5218411684036255,
0.10943856835365295,
-0.11473099142313004,
-0.13445809483528137,
-0.09391643851995468,
-0.2382688820362091,
-0.18853114545345306,
-0.7578142881393433,
0.041574958711862564,
0.4491078853607178,
-0.21759173274040222,
-0.0923507362... | |
utility uses ODBC to verify
> transaction support against a SQL
> Server database. For more information
> about DTCTester see How to Use
> DTCTester Tool.
>
>
> Use DTCPing to verify transaction
> support between two computers if SQL
> Server is not installed on either
> computer. The DTCPing tool must be run
... | [
0.0009824855951592326,
-0.5100644826889038,
0.48323962092399597,
-0.028171930462121964,
-0.2155909538269043,
-0.20875346660614014,
-0.11841938644647598,
-0.2945536971092224,
-0.27352678775787354,
-0.6918627023696899,
0.00010315711551811546,
0.2767978310585022,
-0.44482937455177307,
-0.1561... | |
issues. | [
0.007017891388386488,
-0.004161785822361708,
-0.004215272143483162,
0.083971306681633,
0.09288512915372849,
0.49960023164749146,
-0.3130691945552826,
-0.19004186987876892,
-0.08855125308036804,
-0.4507289528846741,
-0.4864889085292816,
0.33270639181137085,
0.08658089488744736,
-0.022279083... | |
Is there any free software tool or combination that allows me to identify the pitch of a recorded singing session?
The idea is to display some kind of graph with the current pitch in a time line along with markers for the standard notes (C3, C#3, D, etc). I don't need pitch correction and I don't need it to be done in... | [
0.25162795186042786,
-0.17159873247146606,
-0.015452946536242962,
0.39343777298927307,
0.08694608509540558,
-0.0823981985449791,
0.21540771424770355,
0.42087122797966003,
0.058431126177310944,
-0.5128423571586609,
0.3156143128871918,
0.29670774936676025,
0.09180279821157455,
0.045661758631... | |
When I have a regular textbox in a UpdatePanel (not an ASP.NET control) with some JavaScript events on it, after the UpdatePanel updates my events are gone. Is there a way to re-attach my events after the update? (Preferably without putting my events inline).
You can use the [endRequest](http://www.asp.net/AJAX/documen... | [
-0.11679250746965408,
-0.22305181622505188,
0.47869232296943665,
0.03759915754199028,
-0.023487087339162827,
-0.13434436917304993,
0.06957938522100449,
0.01839560829102993,
-0.2778831124305725,
-0.6202222108840942,
-0.2813447415828705,
0.44906407594680786,
-0.11268538981676102,
-0.03343483... | |
Does anyone have an example of script that can work reliably well across IE/Firefox to detect if the browser is capable of displaying embedded flash content. I say reliably because I know its not possible 100% of the time.
[SWFObject](https://github.com/swfobject/swfobject) is very reliable. I have used it without trou... | [
0.35254502296447754,
0.22167259454727173,
0.15377584099769592,
-0.2505444586277008,
-0.14311864972114563,
-0.6304951310157776,
0.32979992032051086,
0.39759817719459534,
-0.050360046327114105,
-0.6905631422996521,
0.1495470106601715,
0.8395282626152039,
-0.05654318258166313,
-0.403512567281... | |
i have a flow panel that i'm adding extra items to it at runtime based on whether they have chosen to show all the items. that's all works fine; the expansion is controlled by a toolbar button.
the trouble is we'd like the user to be able to move his mouse over the "+" sign to expand the section.
)
When you hover over the text, you notice that it's actually a flat button. (Except that it's not - I believe Gerrit does some custom painting magic here).
[](https://i.stack.imgur.com/8OLTX.png)
(sourc... | [
-0.06121652200818062,
-0.37213489413261414,
1.1042433977127075,
-0.24875129759311676,
0.13049018383026123,
-0.13596540689468384,
0.021500874310731888,
-0.2832459509372711,
-0.576920211315155,
-0.6314355731010437,
-0.24086309969425201,
0.8103405833244324,
-0.25730010867118835,
-0.1625513881... | |
time. | [
0.21704621613025665,
-0.0339919738471508,
0.4872570037841797,
0.2487746626138687,
0.21128876507282257,
0.16310308873653412,
-0.31121158599853516,
0.12122748792171478,
-0.07917571812868118,
-1.049433946609497,
0.3179613947868347,
0.004204780329018831,
-0.05548129975795746,
0.604989767074585... | |
I know we cannot do this at class level but at method level we can always do this.
```
var myList=new List<string> // or something else like this
```
This question came to my mind since wherever we declare variable like this. We always provide the type information at the RHS of the expression. So compiler doesn't n... | [
0.4311502277851105,
-0.010967932641506195,
-0.001015945803374052,
-0.01606789231300354,
-0.08182677626609802,
-0.41197919845581055,
0.21616756916046143,
-0.20886565744876862,
0.032422199845314026,
-0.4927023649215698,
0.016873197630047798,
0.5539638996124268,
-0.32269051671028137,
0.040162... | |
chains or cycles, expressions which contain anonymous types) are not.
See Eric Lippert's blog for an in-depth explanation: [Why no var on fields?](http://blogs.msdn.com/ericlippert/archive/2009/01/26/why-no-var-on-fields.aspx) | [
0.31065624952316284,
-0.2424345314502716,
-0.1513257920742035,
-0.2698401212692261,
-0.5857737064361572,
-0.26146817207336426,
0.5647890567779541,
-0.17547698318958282,
-0.3991349935531616,
0.21002507209777832,
-0.19165849685668945,
0.6072964072227478,
-1.01912260055542,
0.3126626908779144... | |
I'm currently writing a simple .sh script to parse an Exim log file for strings matching " o' ". Currently, when viewing output.txt, all that is there is a 0 printed on every line(606 lines). I'm guessing my logic is wrong, as awk does not throw any errors.
Here is my code(updated for concatenation and counter issues)... | [
0.1861041933298111,
0.08877793699502945,
0.4712880253791809,
-0.3042409420013428,
-0.26214009523391724,
0.3043479025363922,
0.6623275279998779,
0.1710883527994156,
0.053048379719257355,
-0.8735741972923279,
0.01499659102410078,
0.272967666387558,
-0.14038263261318207,
0.18603810667991638,
... | |
for(i = 20; i <= 33; i++) {
line = line " " $i;
}
print line;
}' /var/log/exim/main.log > output.txt
```
Any ideas?
EDIT: For clarity's sake, I'm grepping for "o'" in email addresses, because ' is an illegal character in email addresses(and in our databases, appears only with o'-pre... | [
0.01915370486676693,
-0.1453815996646881,
0.5233159065246582,
-0.1538076102733612,
-0.012195910327136517,
0.13202868402004242,
0.4007161557674408,
-0.30757299065589905,
-0.21717002987861633,
-0.6099547147750854,
-0.260765939950943,
0.36788952350616455,
-0.3775826394557953,
0.14418917894363... | |
not reached
[xxx.xxx.xxx.xxx] julie.o'brien@domain.com <julie.o'brien@domain.com> routing defer (-51): retry time not reached
[xxx.xxx.xxx.xxx] james.o'dell@domain.com <james.o'dell@domain.com> routing defer (-51): retry time not reached
[xxx.xxx.xxx.xxx] daniel_o'leary@domain.com <aniel_o'leary@domain.com> routing ... | [
0.15143023431301117,
0.17911335825920105,
0.922363817691803,
0.06567633897066116,
0.1322329342365265,
0.0728575587272644,
0.43261635303497314,
-0.43453338742256165,
-0.2691764533519745,
-0.35961923003196716,
-0.13667641580104828,
0.2743377685546875,
-0.29802438616752625,
0.3130126297473907... | |
awk select the matching lines for you (and fixing your concatenation bug as per ΤΖΩΤΖΙΟΥ):
```
awk '/o'\''/ {
line = "> ";
for(i = 20; i <= 33; i++) {
line = line " " $i;
}
print line; | [
-0.10958245396614075,
-0.3308962881565094,
0.4379756450653076,
-0.27921730279922485,
-0.10244020074605942,
0.6626470685005188,
0.29843926429748535,
-0.24502430856227875,
0.49694105982780457,
-0.5818911194801331,
-0.2905873954296112,
0.4894247055053711,
-0.36568623781204224,
-0.089086621999... | |
}' /var/log/exim/main.log > output.txt
```
Of course, you end up needing some weird escaping if you do it at the promp like above. It is cleaner in a script...
---
Edit: On the first pass I missed the += problem...
Also assuming that the line you gave above is partial, as it has only 13ish fields (by default field... | [
-0.0070085665211081505,
-0.09936439245939255,
0.35966524481773376,
-0.09879958629608154,
0.23361675441265106,
-0.2188429981470108,
0.7406917810440063,
0.02992667257785797,
-0.13950835168361664,
-0.542934238910675,
-0.2974540889263153,
0.24208880960941315,
-0.09924980998039246,
0.1946926862... | |
This seems like a pretty softball question, but I always have a hard time looking up this function because there seem there are so many variations regarding the referencing of char and tchar.
[MultiByteToWideChar](http://msdn.microsoft.com/en-us/library/dd319072(v=vs.85).aspx) but also see ["A few of the gotchas of Mul... | [
-0.04268670082092285,
0.2353481501340866,
0.02786702662706375,
-0.06986626237630844,
-0.2636878490447998,
0.06730414181947708,
0.36132434010505676,
-0.030080899596214294,
-0.3179949223995209,
-0.29744645953178406,
0.08801750838756561,
0.21288436651229858,
-0.07715528458356857,
0.3525194525... | |
I have a database in the following format:
```
ID TYPE SUBTYPE COUNT MONTH
1 A Z 1 7/1/2008
1 A Z 3 7/1/2008
2 B C | [
0.11595389991998672,
0.5853068232536316,
0.5486258268356323,
-0.3165140151977539,
-0.2920271158218384,
-0.0406888946890831,
0.19624605774879456,
-0.16367724537849426,
0.08227504789829254,
-0.14261072874069214,
0.1599857658147812,
0.06339678913354874,
0.1328875571489334,
0.605000913143158,
... | |
2 7/2/2008
1 A Z 3 7/2/2008
```
Can I use SQL to convert it into this:
```
ID A_Z B_C MONTH
1 4 0 7/1/2008
2 0 2 7/2/2008
1 0 | [
-0.13722403347492218,
0.34541234374046326,
0.4868169128894806,
-0.3087293803691864,
-0.3742430508136749,
-0.06132446974515915,
-0.05072943866252899,
-0.04066403955221176,
-0.007889891043305397,
-0.07022606581449509,
-0.05473265424370766,
0.13438168168067932,
-0.09178530424833298,
0.3577461... | |
3 7/2/2008
```
So, the `TYPE`, `SUBTYPE` are concatenated into new columns and `COUNT` is summed where the `ID` and `MONTH` match.
Any tips would be appreciated. Is this possible in SQL or should I program it manually?
The database is SQL Server 2005.
Assume there are 100s of `TYPES` and `SUBTYPES` so and 'A'... | [
-0.18978114426136017,
0.25297901034355164,
0.787453293800354,
-0.1334969401359558,
-0.14578846096992493,
-0.09235665947198868,
0.18533390760421753,
-0.4390321671962738,
-0.1103815883398056,
-0.2696312963962555,
0.0021266634576022625,
0.29367920756340027,
-0.04575631394982338,
0.24672779440... | |
[TYPE] [char](1) NOT NULL,
[SUBTYPE] [char](1) NOT NULL,
[COUNT] [int] NOT NULL,
[MONTH] [datetime] NOT NULL
) ON [PRIMARY]
*/
DECLARE @sql AS varchar(max)
DECLARE @pivot_list AS varchar(max) -- Leave NULL for COALESCE technique
DECLARE @select_list AS varchar(max) -- Leave NULL for COALESCE technique
SEL... | [
0.04048217460513115,
-0.1606021225452423,
0.4561523199081421,
-0.10373371839523315,
-0.20781086385250092,
0.35342830419540405,
0.2602751851081848,
-0.5042268633842468,
-0.11445498466491699,
-0.306739866733551,
-0.03721436485648155,
0.20304182171821594,
-0.23998282849788666,
0.1398528665304... | |
AS PIVOT_CODE
FROM stackoverflow_159456
) AS PIVOT_CODES
SET @sql = '
;WITH p AS (
SELECT ID, [MONTH], [TYPE] + ''_'' + SUBTYPE AS PIVOT_CODE, SUM([COUNT]) AS [COUNT]
FROM stackoverflow_159456
GROUP BY ID, [MONTH], [TYPE] + ''_'' + SUBTYPE
)
SELECT ID, [MONTH], ' + @select_list + '
FROM p
PIVOT (
S... | [
-0.21031790971755981,
0.06076923385262489,
0.6977411508560181,
-0.1959848254919052,
-0.369022011756897,
0.39981815218925476,
0.17091967165470123,
-0.7624377012252808,
-0.4301964342594147,
-0.054748475551605225,
-0.2619836628437042,
-0.03164788708090782,
-0.45074987411499023,
0.041024729609... | |
I have been experimenting with WPF and rendering strict XAML markup in a web browser, also known as Loose XAML (explained [here](http://blogs.msdn.com/tims/archive/2005/09/21/472659.aspx) and [here](http://michaelbraude.com/index.php?XML/Projects/XAMLXSLT/XAMLXSLT_page1.xml)).
It strikes me as mostly useful for displa... | [
0.2636730968952179,
0.40665486454963684,
0.2793029546737671,
-0.2313329428434372,
-0.43188706040382385,
-0.37561696767807007,
0.4973926842212677,
-0.15488213300704956,
-0.3086475431919098,
-0.4005684554576874,
-0.25024935603141785,
0.14679692685604095,
-0.4565894901752472,
0.03418976068496... | |
the client machine in order to render the XAML in the browser?
* Are Search Engines able to interrogate Loose XAML to appropriately rank the
pages?
EDIT: I have attempted to bind the XML data provider to a web service (using [this](http://developer.yahoo.com/dotnet/howto-wpf_xaml.html) simple example) and have not bee... | [
0.19400101900100708,
0.21727433800697327,
0.5105108618736267,
-0.002897662576287985,
-0.246517613530159,
-0.22085925936698914,
0.18924756348133087,
-0.16267640888690948,
-0.20462080836296082,
-0.6504519581794739,
-0.2520378530025482,
0.42478126287460327,
-0.5316643118858337,
0.068110704421... | |
web service message, and so on)." -Matthew MacDonald, *Pro WPF*
AFAIK it's impossible to define a connection string in XAML. So you can't access your SQL db.
Note: It IS possible to databind to a webservice however using XmlDataProvider. So that could be a way you could send your data through...
Edit: btw, I found t... | [
0.18323355913162231,
0.17415401339530945,
0.4125491678714752,
-0.06784510612487793,
-0.1806628257036209,
-0.25587698817253113,
0.41787323355674744,
0.12246322631835938,
-0.4245474934577942,
-0.5546143054962158,
-0.21974685788154602,
0.25991401076316833,
-0.5336955785751343,
0.2663789093494... | |
I have a trace setup for SQL Server Profiler to monitor SQL that is executed on a database. I recently discovered that trigger execution is not included in the trace. After looking through available events for a trace, I do not see any that look like they would include trigger execution. Does anyone know how to setup a... | [
0.679524302482605,
-0.1416366994380951,
0.06716596335172653,
0.33097362518310547,
0.05130395293235779,
-0.3434183597564697,
0.2531513273715973,
-0.22509607672691345,
-0.5046768188476562,
-0.2783541977405548,
0.5017371773719788,
0.4538049101829529,
-0.24457266926765442,
-0.02996589615941047... | |
I've used recursion quite a lot on my many years of programming to solve simple problems, but I'm fully aware that sometimes you need iteration due to memory/speed problems.
So, sometime in the very far past I went to try and find if there existed any "pattern" or text-book way of transforming a common recursion appro... | [
-0.058793094009160995,
-0.1147829070687294,
-0.4073733985424042,
0.24674490094184875,
-0.24391788244247437,
0.2602737843990326,
0.5430687665939331,
0.1568777710199356,
-0.3097478747367859,
-0.6830052137374878,
0.22741346061229706,
0.32817184925079346,
-0.4333804249763489,
-0.27227523922920... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.