text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
sense built in.
[Codepad](http://codepad.org/) is a pastebin with a twist: it has a interpreter/compiler built in for 13 languages, including C, C++, Haskell, Scheme, Python, and PHP. So you can not only use it to share code, but also to run or test code when you're away from your programming environment (think boring... | [
0.4235398471355438,
0.13023868203163147,
0.3007371127605438,
0.11138399690389633,
-0.12964870035648346,
0.10405619442462921,
0.27318084239959717,
-0.028028711676597595,
0.01992075704038143,
-0.8093895316123962,
0.1727105975151062,
0.33220812678337097,
-0.3881836533546448,
-0.22184619307518... | |
Anything would be good. Exemples, best practices, samples, etc.
Hanselman just blogged on this yesterday, he has a huge list of links:
<http://www.hanselman.com/blog/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx> | [
0.48894616961479187,
-0.16862137615680695,
0.2273070216178894,
0.170561745762825,
0.05869683250784874,
-0.18192608654499054,
0.3825974464416504,
-0.0981389582157135,
0.17960596084594727,
-0.6374372839927673,
0.33442285656929016,
0.4570606052875519,
0.07719963043928146,
-0.30553385615348816... | |
I have an xsd like this
```
<xsd:complexType name="A">
<xsd:complexContent>
<xsd:sequence>
<xsd:element name="options">
<xsd:complexType>
<xsd:sequence> | [
0.020498773083090782,
-0.124646857380867,
0.4963254928588867,
-0.21180887520313263,
0.13424189388751984,
0.03675182908773422,
-0.14220887422561646,
0.05389668792486191,
0.010982935316860676,
-0.9337682723999023,
0.1682104468345642,
0.31504249572753906,
-0.3431682586669922,
0.27741980552673... | |
<xsd:element name="Day">
...
</xsd:element> | [
0.028794435784220695,
-0.2558360993862152,
0.23156492412090302,
0.014171989634633064,
0.0026867100968956947,
-0.2199024260044098,
0.016606111079454422,
0.053128499537706375,
-0.28062596917152405,
-0.7243103981018066,
-0.24098403751850128,
0.015165511518716812,
-0.25830793380737305,
0.20557... | |
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="B">
<xsd:complexContent>
<xsd:extension base="A"> | [
-0.3440096974372864,
-0.17151828110218048,
0.3821758031845093,
-0.6130827069282532,
-0.2747510075569153,
0.24948230385780334,
-0.11804623156785965,
-0.43970876932144165,
-0.17732027173042297,
-0.32462504506111145,
-0.3331901431083679,
0.31889358162879944,
-0.6394955515861511,
0.28608357906... | |
...What would go here...
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
```
So basically I want class A to have a sequence of options (Day, Week for example) then I want B to inherit from A and have all of A's options and an additional 2 or 3 options like hours, seconds.
Here's the schema I c... | [
0.2695367634296417,
-0.31103917956352234,
0.07992798089981079,
-0.1074277013540268,
0.05267779156565666,
0.05615728348493576,
0.05517977848649025,
-0.46789461374282837,
-0.2488563358783722,
-0.6116037368774414,
-0.0607256218791008,
0.1170484647154808,
-0.2427186816930771,
0.243986621499061... | |
<xs:complexType>
<xs:sequence>
<xs:element name="First" type="test:A" />
<xs:element name="Second" type="test:B" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="shortOptions">
<xs:sequence> | [
0.10171455889940262,
-0.19069012999534607,
-0.12323936820030212,
-0.24303652346134186,
-0.1688161939382553,
0.18821324408054352,
0.1005493775010109,
-0.47779467701911926,
0.3093562424182892,
-0.31776362657546997,
-0.1316317915916443,
0.3796239495277405,
-0.4676440358161926,
0.0054350411519... | |
<xs:element name="Day" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="longOptions">
<xs:complexContent>
<xs:extension base="test:shortOptions">
<xs:sequence>
<xs:element name="Week" />
</xs:sequence> | [
0.11383182555437088,
-0.3701552152633667,
-0.016858089715242386,
-0.1882295310497284,
-0.103599414229393,
0.3119729459285736,
0.22166724503040314,
-0.08246991038322449,
-0.2721591591835022,
-0.18718557059764862,
-0.16366423666477203,
-0.20000971853733063,
-0.22075152397155762,
0.2067576050... | |
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="A">
<xs:sequence>
<xs:element name="options" type="test:shortOptions" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="B">
<xs:sequence>
<xs:element name="optio... | [
-0.14220376312732697,
-0.2912581264972687,
0.14023366570472717,
-0.2545182704925537,
0.016072288155555725,
0.23373310267925262,
-0.04454939067363739,
-0.39432793855667114,
0.07033189386129379,
-0.48589304089546204,
-0.3210867941379547,
0.5213218331336975,
-0.24700219929218292,
-0.139190316... | |
to fit this xml:
```
<?xml version="1.0" encoding="utf-8" ?>
<Time xmlns="http://test.com">
<First>
<options>
<Day>Today</Day>
</options>
</First>
<Second>
<options>
<Day>Tomorrow</Day>
<Week>This Week</Week>
</options>
</Second>
</Tim... | [
0.3093772232532501,
-0.24919496476650238,
0.2609095275402069,
0.05389770492911339,
0.16900521516799927,
0.1449570655822754,
0.06338748335838318,
-0.25179997086524963,
-0.0852719098329544,
-0.8060475587844849,
-0.33367854356765747,
0.28426826000213623,
-0.11723789572715759,
-0.0274241752922... | |
Our web application sends e-mails. We have lots of users, and we get lots of bounces. For example, user changes company and his company e-mail is no longer valid.
To find bounces, I parse SMTP log file with log parser. The logs come from Microsoft SMTP server.
Some bounces are great, like `550+#5.1.0+Address+rejected... | [
0.5319312810897827,
0.39750638604164124,
0.35355207324028015,
0.013352014124393463,
-0.1317300796508789,
-0.4124428629875183,
0.35440024733543396,
-0.1601242572069168,
-0.3587852716445923,
-0.4862643778324127,
0.03930474817752838,
0.060253486037254333,
-0.34915944933891296,
0.2630629241466... | |
found tools like Zabbix and Splunk for log analysis, but they look like overkill for such simple task.
Anybody knows a tool that would parse SMTP logs, find bounces and e-mails that cause them?
This [article](http://scriptolog.blogspot.com/2007/08/smtp-log-parsing.html) is exactly what you are looking for. It is based... | [
-0.028750715777277946,
0.0002348093839827925,
0.2416335642337799,
0.2615697979927063,
-0.060861214995384216,
-0.5252475142478943,
0.08715251833200455,
0.05732255056500435,
-0.2533359229564667,
-0.8416290283203125,
0.06595585495233536,
0.4401679039001465,
-0.3260086178779602,
0.064569719135... | |
system, and Active Directory®. You
> tell Log Parser what information you
> need and how you want it processed.
> The results of your query can be
> custom-formatted in text based output,
> or they can be persisted to more
> specialty targets like SQL, SYSLOG, or
> a chart. Most software is designed to
> accomp... | [
0.17463037371635437,
0.015680793672800064,
0.4848056435585022,
0.48952600359916687,
0.24802812933921814,
-0.1696152687072754,
0.09122338891029358,
-0.10082069784402847,
-0.37681037187576294,
-0.7981888055801392,
-0.16992324590682983,
0.5048075318336487,
-0.48900458216667175,
-0.06535942107... | |
Log
> Parser. | [
-0.2438807636499405,
0.08147644996643066,
-0.015161652117967606,
0.15050701797008514,
-0.12664787471294403,
-0.19921816885471344,
0.2979128360748291,
-0.006875799037516117,
0.03112470917403698,
-0.8597233295440674,
-0.3164198398590088,
0.4015602469444275,
-0.5342186093330383,
-0.2519924640... | |
What is the best way to set the time on a remote machine remotely? The machine is running Windows XP and is receiving the new time through a web service call. The goal is to keep the remote machines in synch with the server. The system is locked down so that our web service is the only access, so I cannot use a time se... | [
0.3984130918979645,
-0.0859573632478714,
0.5408644080162048,
0.33391499519348145,
0.5638397932052612,
0.0336732380092144,
0.28301888704299927,
0.03647703304886818,
-0.1731024980545044,
-0.8546758890151978,
0.05616256594657898,
0.5500019192695618,
-0.06484421342611313,
0.2699114978313446,
... | |
get time from it.
I've been down the application-setting-system-time road before. | [
0.45484259724617004,
0.30728158354759216,
-0.103216752409935,
0.10123623162508011,
0.25611212849617004,
0.033616550266742706,
-0.0848129466176033,
0.17209063470363617,
0.05969223380088806,
-0.46512919664382935,
0.21146948635578156,
0.4252578318119049,
0.15968963503837585,
-0.12723849713802... | |
We have a .NET application that uses WMI to gather a wide range of information on machines throughout a network, such as reading the Win32\_NTLogEvent to see if Symantec Antivirus has written anything. The queries work fine, but after repeatedly running a WMI query "Generic Failure" errors will start coming back. This ... | [
0.3828742206096649,
-0.10531985014677048,
0.21340273320674896,
0.47894468903541565,
0.33653372526168823,
-0.4926978647708893,
0.3760174810886383,
0.06905900686979294,
-0.23837652802467346,
-0.6892675161361694,
0.08352891355752945,
0.705632209777832,
-0.17749246954917908,
0.0802656337618827... | |
- Ran WMIDiag after getting the error and found -
25607 13:55:38 (1) !! ERROR: WMI ENUMERATION operation errors reported: 2 ERROR(S)!
25608 13:55:38 (0) \*\* - ROOT/CIMV2, SubClassesOf, '\*', 0x80041006 - (WBEM\_E\_OUT\_OF\_MEMORY) Not enough memory for the operation.
25609 13:55:38 (0) \*\* MOF Registration: 'C:\WI... | [
0.17561666667461395,
0.15739251673221588,
0.2144850194454193,
0.1588270515203476,
0.20645751059055328,
-0.13170655071735382,
0.6769059896469116,
0.0852137878537178,
-0.21550032496452332,
-0.3476192355155945,
0.05736734718084335,
0.38653337955474854,
-0.4462054371833801,
0.4074118435382843,... | |
Removed the constant=constant and the one query I was testing with went from 40 seconds to .4 seconds and has run over 10,000 times without generating a generic failure (WBEM\_E\_OUT\_OF\_MEMORY). | [
0.07606402039527893,
-0.05363968387246132,
0.48626428842544556,
-0.06234519183635712,
0.16225376725196838,
0.09565219283103943,
0.5321775078773499,
-0.27380141615867615,
0.1512429267168045,
-0.40069928765296936,
0.245936319231987,
0.42943817377090454,
-0.11169999837875366,
0.41826894879341... | |
If you want to associate some constant value with a class, here are two ways to accomplish the same goal:
```
class Foo
{
public:
static const size_t Life = 42;
};
class Bar
{
public:
enum {Life = 42};
};
```
Syntactically and semantically they appear to be identical from the client's point of view:
```
si... | [
0.24860934913158417,
-0.12282225489616394,
0.26750755310058594,
-0.19775788486003876,
-0.09793931245803833,
0.0995934009552002,
0.15337689220905304,
-0.2099834680557251,
-0.16041536629199982,
-0.4650469124317169,
0.025248326361179352,
0.8209165930747986,
-0.6875210404396057,
0.155980959534... | |
option. Modern compilers are also capable of optimizing this constant so that no storage space is required for it.
The only reason for not using the `static const` variant is if you want to *forbid* taking the address of the value: you can't take an address of an `enum` value while you can take the address of a consta... | [
-0.08450262993574142,
-0.3732779920101166,
0.12779535353183746,
0.03743641823530197,
-0.04834357276558876,
-0.4837268590927124,
0.5699718594551086,
0.15016543865203857,
-0.1736273467540741,
-0.4753077030181885,
-0.4278320074081421,
0.5030931830406189,
-0.42379331588745117,
0.20339012145996... | |
it can still be initialized at the site of declaration:
```
struct foo {
static int const bar = 42; // Declaration, initialization.
};
int const foo::bar; // Definition.
``` | [
-0.03813236951828003,
0.24892856180667877,
0.45484745502471924,
-0.49445125460624695,
0.12193566560745239,
0.1902114301919937,
0.17255426943302155,
-0.4405783414840698,
0.03830103203654289,
-0.188977912068367,
-0.6038585901260376,
0.22846738994121552,
-0.23516494035720825,
0.13202203810214... | |
At my work everyone has sql snippets that they use to answer questions. Some are specific to a customer, while some are generic for a given database. I want to consolidate those queries into a library/repository that can be accessed by anyone on the team. The requirements would be:
1. Accessible
2. Searchable
3. Tagab... | [
0.8052477240562439,
0.23191583156585693,
0.037654049694538116,
0.10839885473251343,
-0.22969242930412292,
-0.17126910388469696,
0.04274627938866615,
-0.05869228020310402,
-0.08704067021608353,
-0.6733496785163879,
0.052764467895030975,
0.2757602035999298,
0.04629744216799736,
-0.0720038935... | |
I have a program in which I've lost the C++ source code. Are there any good C++ decompilers out there?
I've already ran across [Boomerang](http://boomerang.sourceforge.net/).
You can use [IDA Pro](http://www.hex-rays.com/idapro/) by [Hex-Rays](http://www.hex-rays.com/). You will usually not get good C++ out of a binar... | [
0.5596913695335388,
0.35346338152885437,
-0.3016919493675232,
0.23734577000141144,
-0.28699713945388794,
0.18853436410427094,
0.2715715765953064,
-0.006694628391414881,
-0.15166956186294556,
-0.36791011691093445,
-0.04242739453911781,
0.5413587689399719,
-0.130204975605011,
0.1550961881875... | |
I wonder if it is possible to create an executable module from a Python script. I need to have the most performance and the flexibility of Python script, without needing to run in the Python environment. I would use this code to load on demand user modules to customize my application.
* There's [pyrex](http://www.cosc.... | [
0.7380778789520264,
0.19833901524543762,
-0.012029964476823807,
-0.18498648703098297,
-0.3646858036518097,
0.06843281537294388,
0.34874066710472107,
-0.2133498638868332,
-0.28227561712265015,
-0.4303760826587677,
0.20163270831108093,
0.42374664545059204,
-0.005829575005918741,
-0.059958156... | |
compiler which attempts to optimize runtime by translating pieces of what's running at runtime to machine code, if you write for the PyPy interpreter that might be a feasible path.
* The same author that is working on JIT in PyPy wrote [psyco](http://psyco.sourceforge.net/) previously which optimizes python in the CPyt... | [
0.17837557196617126,
-0.022632183507084846,
-0.5440040826797485,
0.015110678970813751,
-0.10106512904167175,
0.18806035816669464,
0.04137318208813667,
0.20440785586833954,
-0.2361685037612915,
-0.6530805230140686,
-0.015145952813327312,
0.32221755385398865,
-0.4959198236465454,
-0.50194752... | |
On Unix, is there any way that one process can change another's environment variables (assuming they're all being run by the same user)? A general solution would be best, but if not, what about the specific case where one is a child of the other?
Edit: How about via gdb?
Via gdb:
```
(gdb) attach process_id
(gdb) ca... | [
0.2450510710477829,
-0.16872215270996094,
0.07638835161924362,
-0.08199243992567062,
0.21539068222045898,
-0.18120309710502625,
-0.06050267815589905,
0.31699368357658386,
-0.09732455015182495,
-0.48783451318740845,
-0.23106902837753296,
0.8457657694816589,
-0.5136947631835938,
0.2701438069... | |
This is a problem that only occurs on application update (only tested through Admin Console, not CLI). Also, this is only happening on our development environment, which is identical to our prod env. On uninstall/install, everything is compiled properly. However, this is a large application and it takes long enough to ... | [
0.23607715964317322,
0.15015892684459686,
0.3451685905456543,
-0.00805071834474802,
0.15120501816272736,
-0.4548806846141815,
0.4658993184566498,
-0.2818271517753601,
-0.30282750725746155,
-0.7078124284744263,
-0.3793477416038513,
0.6717392802238464,
-0.3301975429058075,
-0.194996401667594... | |
faced this problem, or know what we are possibly overlooking?
WAS Version: 6.1.0.17
**EDIT:** This is only happening for one JSP and the tag library its using. We're trying to trouble shoot the issue. Let you know if we figure anything out. We think it may be an issue with the .SMAP file per [this fix](http://www-01.... | [
-0.1108538955450058,
0.13872860372066498,
0.5564089417457581,
-0.10215003043413162,
-0.0852692574262619,
-0.33705413341522217,
0.6407116651535034,
0.07192995399236679,
-0.2933669090270996,
-0.5348896384239197,
-0.17204304039478302,
0.5182809829711914,
-0.45332393050193787,
-0.0334628857672... | |
bug upon an update only, but, whatever the case, the problem is solved. | [
-0.025438576936721802,
0.18389451503753662,
0.5699102878570557,
0.20766609907150269,
0.5013436079025269,
-0.1782766580581665,
0.20523515343666077,
0.5638646483421326,
-0.36705565452575684,
-0.47772538661956787,
-0.6774642467498779,
0.5996617674827576,
-0.39547300338745117,
0.19588793814182... | |
Real UID, effective UID, and some systems even have a "saved UID". What's the purpose of all these, especially the last one?
Each UNIX process has 3 UIDs associated to it. Superuser privilege is UID=0.
**Real UID**
This is the UID of the user/process that created THIS process. It can be changed only if the running pr... | [
0.010608748532831669,
-0.3474397361278534,
0.676228404045105,
0.0821525901556015,
-0.016826853156089783,
0.10690999031066895,
0.20034590363502502,
-0.1775999367237091,
-0.207229346036911,
-0.7634549140930176,
-0.2363290786743164,
0.546005368232727,
-0.28834328055381775,
0.20620641112327576... | |
then the resulting running process will start off with a real UID of the real user running it, and an effective and saved UID of the owner of the executable file. If the process then calls setuid() or seteuid() to change their effective UID, they can still get back their original privileges again thanks to the saved UI... | [
-0.25921693444252014,
-0.547263503074646,
0.7385660409927368,
0.07867831736803055,
0.14598125219345093,
0.029748883098363876,
0.27817603945732117,
-0.2793154716491699,
-0.00752253970131278,
-0.708869218826294,
-0.4815756678581238,
0.4606161415576935,
-0.19595858454704285,
0.222543150186538... | |
Are you aware of any serious performance problems with checking if a file exists before you open it and send it? The context for this is a web application that serves up files dynamically via an ASP page. I was told that there is no check for whether or not the file exists because the database stores this information a... | [
0.7123777270317078,
-0.017390605062246323,
-0.22484683990478516,
0.3968212604522705,
0.18061228096485138,
-0.35474950075149536,
0.18734826147556305,
0.20462468266487122,
-0.39122551679611206,
-0.162173330783844,
0.18261894583702087,
0.5620204210281372,
-0.11454334855079651,
0.0125925214961... | |
about it but I was told otherwise. Our storage solution is a pretty high powered one (not just an IDE drive on the web server) if that helps. My question is basically: Is my instinct correct?
Thanks!
Note: These files are never just deleted. Something has to go wrong for them to be missing but this happens a few time... | [
0.5577564835548401,
0.0143301822245121,
-0.20940668880939484,
0.28798121213912964,
0.2027752697467804,
-0.4522797763347626,
0.36152130365371704,
0.2944980263710022,
-0.31757670640945435,
-0.05952543020248413,
0.22248247265815735,
0.5124863386154175,
0.12981046736240387,
0.06205310672521591... | |
with catching an exception and dealing with that in that context.
Even if you check it exists just before you try to serve it, it could be deleted between the check and you serving it.
The problem here is that you send back nothing if you can't serve the file. Trying to serve a non-existent file should throw an except... | [
0.32991093397140503,
-0.04215753823518753,
-0.15139983594417572,
0.23835720121860504,
-0.0561506561934948,
-0.27854084968566895,
0.4463517367839813,
0.13206368684768677,
-0.445357084274292,
-0.27167654037475586,
0.045194074511528015,
0.40579745173454285,
-0.10140982270240784,
-0.0327748544... | |
I have an asp.net 2.0 page that contains 2 `UpdatePanels`.
The first panel contains a `TreeView` control, when I select a node in the three view control it triggers an update of the second `UpdatePanel` only. This much is behaving correctly.
There are two buttons on the page outside of an update panel (previous/next)... | [
-0.03552604094147682,
-0.3098807632923126,
0.6680881381034851,
-0.12305182963609695,
-0.1726503223180771,
0.16754040122032166,
0.29783129692077637,
-0.07984840869903564,
-0.23895925283432007,
-0.8720591068267822,
0.001589910825714469,
0.4536100924015045,
-0.0796482190489769,
-0.33383095264... | |
to reflect this change.
The problem happens when I click any of these buttons again. The selected node of the treeview seems to remember the previously selected node and the buttons act on this node. So the behaviour of the previous/next buttons is to do nothing or jump back two.
**Edit** - Sample code that demonstra... | [
-0.17826054990291595,
-0.213169664144516,
0.4708612561225891,
-0.13741156458854675,
-0.05865103378891945,
-0.0014029942685738206,
0.25529783964157104,
-0.17237478494644165,
-0.4666336178779602,
-0.7765644192695618,
-0.1381082981824875,
0.5088070034980774,
-0.2356640100479126,
-0.1524196565... | |
<Triggers>
<asp:AsyncPostBackTrigger ControlID="myButton" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel ID="myLabelPanel" runat="server">
<ContentTemplate>
<asp:Label runat="server" ID="myLabel" Text="myLabel"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:... | [
-0.3986648619174957,
-0.1763456016778946,
0.33776044845581055,
-0.0699927881360054,
-0.027598148211836815,
0.2240048050880432,
0.06268762052059174,
-0.4266915023326874,
-0.4284215569496155,
-0.7016665935516357,
-0.27715522050857544,
0.39394158124923706,
-0.22925135493278503,
-0.09191872179... | |
{
myTreeView.Nodes.Add( new TreeNode( "Test 1", "Test One" ) );
myTreeView.Nodes.Add( new TreeNode( "Test 2", "Test two" ) );
myTreeView.Nodes.Add( new TreeNode( "Test 3", "Test three" ) );
myTreeView.Nodes.Add( new TreeNode( "Test 4", "Test four" ) );
myTreeView.Nodes.Add( ... | [
0.22827862203121185,
-0.005883676931262016,
0.14055834710597992,
0.0022797170095145702,
0.1045909896492958,
0.14470620453357697,
0.737986147403717,
0.10531994700431824,
0.12608742713928223,
-0.8924285173416138,
-0.2831592857837677,
0.2843087911605835,
-0.2082064002752304,
0.058893863111734... | |
6", "Test size" ) );
}
}
protected void myTreeView_SelectedNodeChanged ( object sender, EventArgs e )
{
UpdateLabel( );
}
protected void myButton_Click ( object sender, EventArgs e )
{
// here we just select the next node in the three
int index = myTreeView.Nodes.IndexOf( myTre... | [
-0.03416335955262184,
-0.42523279786109924,
0.5675778388977051,
0.03571346402168274,
0.3514421880245209,
0.16916604340076447,
0.3636172115802765,
-0.21873785555362701,
-0.2587142288684845,
-0.7717991471290588,
-0.2587728500366211,
0.37064382433891296,
-0.23908768594264984,
0.38946098089218... | |
private void UpdateLabel ( )
{
myLabel.Text = myTreeView.SelectedNode.Value;
}
```
It is like the viewstate of the tree is not being saved?
From [UpdatePanel Control Overview [asp.net]](http://www.asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx)
> ### Controls that Are Not Compatible wi... | [
-0.18682357668876648,
-0.04697096720337868,
0.19539974629878998,
0.05939030274748802,
0.07232785224914551,
0.01990325376391411,
0.26988694071769714,
0.14527152478694916,
-0.16159340739250183,
-0.6221745014190674,
-0.3746263384819031,
0.4952872395515442,
-0.38787636160850525,
0.071799740195... | |
**Background**
--------------
A project installs some files that contain all the elements to define a UserControl - some user source, a CodeCompileUnit for designer code, and a resx file. At runtime, these files are compiled into an assembly and the classes are consumed by our main application (the assembly is only up... | [
0.5077545046806335,
-0.1082485094666481,
0.2464292198419571,
0.2718352973461151,
0.21876312792301178,
0.07442206889390945,
0.131697878241539,
-0.13071446120738983,
-0.1771857738494873,
-0.7811249494552612,
-0.4223310649394989,
0.4298366606235504,
-0.16905753314495087,
0.0099922651425004,
... | |
be compiled into a satellite assembly for the main assembly, or to provide a copy of each full file for each supported language, compiling the appropriate set for the language being supported.
* Does anyone have any other options that might be worth considering?
* What problems might be inherent in either of the solut... | [
0.5862255096435547,
0.21803022921085358,
0.02286102995276451,
0.08556747436523438,
0.2835384011268616,
-0.12334021180868149,
0.11685405671596527,
0.3768163025379181,
-0.09898126125335693,
-0.5829590559005737,
-0.34088048338890076,
0.19026809930801392,
-0.07198908925056458,
-0.2364412993192... | |
can provide. Thanks.
Create a separate satellite assembly for each culture. This has two benefits:
* You can build all of the assemblies in one go, and have a definitive file for each version number and filename combination, rather than it *also* depending on the culture.
* You can have multiple assemblies in the same... | [
1.0214266777038574,
-0.04284435883164406,
0.137823224067688,
0.3261980712413788,
-0.09115063399076462,
-0.12910257279872894,
0.2869374454021454,
0.11721204966306686,
-0.22927851974964142,
-0.8641456365585327,
0.006842170841991901,
-0.0328349806368351,
-0.11865022033452988,
-0.0053835962899... | |
to work. While I'm not an expert on .NET i18n ("read Guy Smith-Ferrier's book" is my best advice!) I generally find that frameworks work best when you follow their expected model.
Even if the final part of "building the satellite assembly" is done at runtime (can you do it at *install* time instead?) you still get the... | [
1.1609258651733398,
0.2370125651359558,
0.1374305784702301,
-0.16007450222969055,
0.07642262428998947,
0.03330908715724945,
0.4225578010082245,
-0.3457876145839691,
-0.24334536492824554,
-0.7357823848724365,
-0.11667302250862122,
0.7212104201316833,
-0.07481926679611206,
-0.298764377832412... | |
the question though... | [
0.0659022182226181,
0.13699080049991608,
0.06388815492391586,
0.04206477478146553,
-0.2974138557910919,
-0.11128036677837372,
-0.004134412854909897,
-0.0604386068880558,
0.05050109326839447,
-0.5200355052947998,
0.16052910685539246,
0.2255566120147705,
0.1908940076828003,
0.147054329514503... | |
We are running our Junit 4 test suite against Weblogic 9 in front of an Oracle 10 database (using Hudson as a continuous integration server) and occasionally we will get an ORA-12519 crash during script teardown. However, the error is very intermittent:
* It usually happens for the same Test class
* It doesn't always... | [
0.11827388405799866,
0.09750991314649582,
-0.04504398629069328,
0.049269501119852066,
0.1249459981918335,
-0.039807483553886414,
0.6715888381004333,
0.1624527871608734,
0.13008418679237366,
-0.533222496509552,
0.34124019742012024,
0.6212894916534424,
-0.1259351223707199,
-0.047907866537570... | |
have run the same suite of class multiple times with no issues.
Any ideas?
Don't know if this will be everybody's answer, but after some digging, here's what we came up with.
The error is obviously caused by the fact that the listener was not accepting connections, but why would we get that error when other tests cou... | [
0.5597764849662781,
0.16581448912620544,
-0.08184773474931717,
0.36643069982528687,
-0.22265422344207764,
-0.07727909833192825,
0.5692518353462219,
-0.16197353601455688,
-0.1125713512301445,
-0.3009818196296692,
0.5938897132873535,
0.6176650524139404,
-0.0997958704829216,
0.413572996854782... | |
for the life of the test class, creating new ones as it went. Now, even though all of the resources were properly released when this class went out of scope (via a finally{} block, of course), there were some cases during the run when this class would swallow up all available connections (okay, bad practice alert - thi... | [
0.3706773817539215,
-0.368713915348053,
-0.1453949213027954,
0.3020831346511841,
-0.05829222500324249,
-0.03590065613389015,
0.30427268147468567,
0.03644939139485359,
-0.36312493681907654,
-0.1904958188533783,
0.05028286576271057,
0.22535760700702667,
-0.2372695952653885,
0.286247968673706... | |
method setUp and tearDown methods.
So if you get this error in your own apps, slap a profiler on that bad boy and see if you might have a connection leak. Hope that helps. | [
0.5297024846076965,
0.08116655796766281,
-0.0016973611200228333,
0.47995126247406006,
0.23645645380020142,
-0.27612051367759705,
0.5582456588745117,
0.2519729435443878,
-0.31625428795814514,
-0.5551444888114929,
0.288658082485199,
0.3469044268131256,
-0.17975030839443207,
-0.30150291323661... | |
Is there a way of reusing the same resultMap multiple times in a single query.
For example, suppose I have a "foo" resultMap:
```
<resultMap id="foo" class="Foo">
<result property="Bar" column="bar" />
</resultMap>
```
Is there a way to define another resultMap that reuses the above for different columns? Somethi... | [
-0.06126870587468147,
-0.2014310359954834,
0.683262825012207,
-0.27552321553230286,
0.04935033246874809,
-0.14991594851016998,
-0.2515805661678314,
-0.5711463093757629,
-0.17109450697898865,
-0.5791847705841064,
-0.02023736946284771,
0.5427687764167786,
-0.3356589078903198,
-0.133409187197... | |
a `selectFoo` query defined.) But that's extremely slow with large result sets, since it does an additional SELECT for every row.
iBATIS has a solution to this problem for the typical case, where you have a composite object that contains various other objects. First, you define a query that joins your tables, then you... | [
-0.08981553465127945,
0.08114942163228989,
0.49140670895576477,
-0.16044819355010986,
0.043760597705841064,
0.05135727673768997,
-0.1960449069738388,
-0.34093645215034485,
-0.40014174580574036,
-0.5373437404632568,
0.06996142119169235,
0.27518966794013977,
-0.6946783065795898,
-0.062362994... | |
Datamapper manual. | [
-0.3236735463142395,
-0.18508058786392212,
0.14194098114967346,
0.37689468264579773,
0.30425146222114563,
-0.39190229773521423,
-0.01483102422207594,
-0.22221244871616364,
-0.042281623929739,
-0.6063369512557983,
-0.30971458554267883,
0.36541348695755005,
-0.13148105144500732,
-0.379636555... | |
There seems to be lots of different ways to register assemblies with the GAC, as in, they 'work'. However, what's the "proper" way of doing it?
In response to Lou Franco (and gacutil):
I'm using Gacutil for development, but it seems to me to be not the proper way to install it, since gacutil isn't included in the bas... | [
0.4041042923927307,
0.2797001302242279,
0.11317270994186401,
-0.18449588119983673,
-0.10119979083538055,
-0.15773148834705353,
0.18135131895542145,
-0.131253182888031,
-0.2695682644844055,
-0.30067047476768494,
0.14637020230293274,
0.49406859278678894,
-0.4693153202533722,
0.03588581457734... | |
[This blog post (and comments) by Aaron Stebner](http://blogs.msdn.com/astebner/archive/2006/11/04/why-to-not-use-gacutil-exe-in-an-application-setup.aspx).
In response to using WIX:
WIX might be great and all, but how does it work under the hood? What details makes the way WIX installs the assembly the right way to ... | [
0.5222510695457458,
0.16347338259220123,
-0.2414301484823227,
-0.10673635452985764,
-0.20861469209194183,
-0.15128099918365479,
0.36369121074676514,
-0.26255661249160767,
-0.22878427803516388,
-0.45244932174682617,
-0.0004318805877119303,
0.41843894124031067,
-0.41174954175949097,
0.024937... | |
windows installer, and nothing else. I'm going to give Wix a try. Thanks all!
With Wix I would do something like this:
```
<DirectoryRef Id="MyDirectory" >
<Component Id="MyComponent" Guid="PUT-GUID-HERE" DiskId="1">
<File Id="MyAssembly" Name="MyAssembly.dll" Assembly=".net" KeyPath="yes" Source="MyAssem... | [
0.0708131343126297,
0.10318666696548462,
0.609537661075592,
-0.12991411983966827,
-0.11268625408411026,
-0.2694014012813568,
0.1518772691488266,
0.28934258222579956,
-0.17075423896312714,
-1.1745911836624146,
-0.193827822804451,
0.7804523706436157,
-0.3894892632961273,
0.27911272644996643,... | |
Initialization would include creating all the required tables, constraints and populating the tables.
edit: Is there already a project doing this?
You could take it a step further and write a script to load in a text file.
In this text file you could set up some default styling and then use your script to handle it, ... | [
0.15795738995075226,
-0.12829001247882843,
0.14214584231376648,
0.033240530639886856,
-0.19360603392124176,
0.16544224321842194,
-0.11445251852273941,
-0.4198729991912842,
-0.0020178677514195442,
-0.78929603099823,
0.0895700678229332,
0.19631828367710114,
-0.37905797362327576,
-0.049090620... | |
key, name vc 255 is field called name at varchar 255 etc.. with -end stopping it.
This is theoreticaly mind, and the above won't do squat but it migth give you an idea. | [
-0.12537544965744019,
0.1772431582212448,
0.450033038854599,
0.07062550634145737,
-0.22301331162452698,
-0.27579814195632935,
0.27596786618232727,
-0.39147526025772095,
-0.14206886291503906,
-0.09891601651906967,
-0.31504812836647034,
0.46387580037117004,
0.05071447417140007,
0.41342738270... | |
I've created a web application that I've hosted with IIS 7 on a Windows Server 2008 machine. I've loaded a security certificate for secure.xxxxx.com.
[IIS 7 Server Certificates http://img401.imageshack.us/img401/324/certxx6.gif](http://img401.imageshack.us/img401/324/certxx6.gif)
When I browse to the web site with **... | [
0.0694049671292305,
0.21589049696922302,
0.6334553360939026,
-0.004858470056205988,
0.015417749062180519,
-0.15479643642902374,
0.4168429970741272,
0.14709588885307312,
-0.4992590844631195,
-0.6581157445907593,
-0.26488587260246277,
0.43706756830215454,
-0.16109435260295868,
0.349200069904... | |
other indication from Internet Explorer that there is a security issue.
[Microsoft Internet Explorer SSL Security Certificate Website Identification http://img207.imageshack.us/img207/8265/ie2yr5.gif](http://img207.imageshack.us/img207/8265/ie2yr5.gif)
The **Apple Safari** browser won't display the page at all.
> Sa... | [
0.09882450848817825,
0.5229995250701904,
0.47366470098495483,
0.031525567173957825,
-0.255974143743515,
-0.33278435468673706,
0.7950723767280579,
-0.09700565040111542,
-0.3566809296607971,
-0.5803406238555908,
-0.42402327060699463,
0.6821123957633972,
-0.43768471479415894,
-0.0156837124377... | |
the solution at [forums.iis.net](http://forums.iis.net/t/1151141.aspx).
In IIS I modified the SSL Settings for my web site.
[IIS SSL Settings icon http://img183.imageshack.us/img183/8808/ssl1uc7.gif](http://img183.imageshack.us/img183/8808/ssl1uc7.gif)
I changed "Client certificates" from "Accept" to "Ignore".
**Be... | [
-0.23653578758239746,
0.11533421277999878,
0.6668425798416138,
-0.08828046917915344,
0.1831376552581787,
-0.03712230175733566,
0.8112893104553223,
-0.046990059316158295,
-0.320093035697937,
-0.982473611831665,
-0.1590903252363205,
0.44968047738075256,
-0.35590308904647827,
0.03680988028645... | |
I've recently begun evaluating a few project management projects for the company I work for. It's the classic case - growing company looking for the right solution (meaning, free or really cheap). It's a combination shop - Windows, Macs, and Linux on the desktop. The tech savviness, of course, ranges from newbie to uni... | [
0.6100414991378784,
0.09135830402374268,
0.03017480857670307,
0.18570461869239807,
0.09174241870641708,
0.22300545871257782,
-0.004068602807819843,
0.5756532549858093,
-0.21973763406276703,
-0.4707547724246979,
-0.14799177646636963,
0.6025155186653137,
0.3145592212677002,
0.159572958946228... | |
free or really cheap
* document management
* timelines and milestones
* task tracking and assigning
* reporting
* source control
* development wiki
I've looked at Trac, Projectivity, Basecamp, JIRA, RT, XPlanner, and SharedPlan. I've stayed away from Bugzilla due to previous unhappy experiences with it. None of these ... | [
0.48760709166526794,
-0.1430932730436325,
0.06262798607349396,
0.5434203147888184,
-0.1571287363767624,
-0.24934083223342896,
-0.04971020668745041,
-0.23261207342147827,
-0.4107664227485657,
-0.5591155886650085,
-0.05373109504580498,
0.5905466675758362,
-0.23233753442764282,
-0.15352530777... | |
I have created an **application which needs 'hand-over'** to the support group in the next month.
The application is **fairly small** (2 months development), and consists of two client side applications and a database, it's written in c# for the windows platform.
**I have a broad idea** of what to include in a suppor... | [
0.459820955991745,
0.14923490583896637,
0.3835279941558838,
-0.0952155813574791,
0.1531931608915329,
0.2539672255516052,
0.09064480662345886,
0.07868139445781708,
0.11920984834432602,
-0.5197367072105408,
-0.16558298468589783,
0.4497380256652832,
0.12344509363174438,
-0.19010962545871735,
... | |
I guess my questions are:**
1. What should a support document absolutely contain
2. What additional things have you put in support documents to make them extra useful.
3. What other activities can be done before hand-over to make all our lives easier?
Having been on both sides of this process professionally, I can say... | [
0.8357593417167664,
0.2138143926858902,
0.1605987846851349,
0.023694798350334167,
0.35329514741897583,
-0.22075271606445312,
0.16581955552101135,
-0.19735635817050934,
-0.1933862566947937,
-0.4588659405708313,
-0.2520568072795868,
0.6694198250770569,
-0.022691801190376282,
-0.4557994604110... | |
portions (eg there is a scripting component)
* primary contacts for each component, aka escalation path
* encouragement for feedback from Support as to what else they want to see
I'm sure lots of other things can be added, but these are the top priority in my mind. | [
0.29813796281814575,
0.00501368660479784,
0.3286391496658325,
0.41533157229423523,
-0.12491131573915482,
0.19010505080223083,
0.062368832528591156,
0.340692937374115,
-0.07309180498123169,
-0.6332410573959351,
-0.23712848126888275,
0.4344309866428375,
0.3478333353996277,
0.1014751195907592... | |
I'm trying to draw images on the iPhone using with rounded corners, a la the contact images in the Contacts app. I've got code that generally work, but it occasionally crashes inside of the UIImage drawing routines with an `EXEC_BAD_ACCESS` - `KERN_INVALID_ADDRESS`. I thought this might be related to the [cropping ques... | [
0.343168705701828,
0.16901831328868866,
0.6483038067817688,
-0.07432803511619568,
0.0049221934750676155,
0.16817772388458252,
0.029649032279849052,
-0.011447625234723091,
-0.26348957419395447,
-0.755562961101532,
0.22489404678344727,
0.7316023707389832,
-0.12307032197713852,
-0.20051968097... | |
UIImage *maskedImage = nil;
radius = MIN(radius, .5 * MIN(CGRectGetWidth(dstRect), CGRectGetHeight(dstRect)));
CGRect interiorRect = CGRectInset(dstRect, radius, radius);
UIGraphicsBeginImageContext(dstRect.size);
CGContextRef maskedContextRef = UIGraphicsGetCurrentContext();
CGContextSaveGState(m... | [
-0.4019204378128052,
-0.44356489181518555,
0.7535234093666077,
0.16717253625392914,
-0.13964401185512543,
0.38699039816856384,
0.5244364142417908,
-0.34358012676239014,
0.06704295426607132,
-0.5948604345321655,
-0.18592016398906708,
0.48236143589019775,
-0.10154802352190018,
0.164734274148... | |
borderPath);
CGContextClosePath(maskedContextRef);
CGContextClip(maskedContextRef);
[self drawInRect: dstRect];
maskedImage = UIGraphicsGetImageFromCurrentImageContext();
CGContextRestoreGState(maskedContextRef);
UIGraphicsEndImageContext();
return maskedImage;
}
```
and here's the cras... | [
-0.17513832449913025,
-0.27781951427459717,
0.5079471468925476,
0.10237430036067963,
-0.047507062554359436,
-0.01612919196486473,
0.5828108191490173,
-0.23929575085639954,
-0.23390096426010132,
-0.7053879499435425,
0.24588224291801453,
0.6540475487709045,
-0.41148266196250916,
0.1020440906... | |
+ 104
2 libRIP.A.dylib 0x33c51868 ripc_DrawImage + 3860
3 com.apple.CoreGraphics 0x30fecad4 CGContextDelegateDrawImage + 80
4 com.apple.CoreGraphics 0x30feca40 CGContextDrawImage + 368
5 UIKit 0x30a6a708 -[UIImage drawInRect:blendMode:alpha:] + 1460
6... | [
-0.3834156394004822,
-0.18296001851558685,
0.7922509908676147,
-0.16181324422359467,
-0.3987598121166229,
0.2057112157344818,
0.11639761179685593,
-0.5345859527587891,
-0.11173156648874283,
-0.7549542784690857,
-0.3081192374229431,
0.49233877658843994,
-0.4751238226890564,
-0.3145470917224... | |
0x30a66904 -[UIImage drawInRect:] + 72
7 MyApp 0x0003f8a8 -[UIImage(PNAdditions) borderedImageWithRect:radius:] (UIImage+PNAdditions.m:187)
```
Here is an even easier method that is available in iPhone 3.0 and up. Every View-based object has an associated layer. Each layer can have a corner... | [
-0.006819101050496101,
-0.30771905183792114,
0.8373496532440186,
-0.03625168651342392,
-0.39805421233177185,
0.3278670012950897,
0.10045461356639862,
-0.1706850677728653,
-0.18798834085464478,
-0.6348756551742554,
0.057346925139427185,
0.5513284802436829,
-0.029437756165862083,
-0.05778490... | |
initWithImage: [UIImage imageNamed:@"wood.jpg"]];
// Get the Layer of any view
CALayer * l = [roundedView layer];
[l setMasksToBounds:YES];
[l setCornerRadius:10.0];
// You can even add a border
[l setBorderWidth:4.0];
[l setBorderColor:[[UIColor blueColor] CGColor]];
``` | [
0.2041669636964798,
-0.5702573657035828,
0.8844403624534607,
0.19570836424827576,
-0.2109721153974533,
-0.12384863197803497,
-0.04671924561262131,
-0.059019457548856735,
0.04790067300200462,
-0.8323977589607239,
-0.17591451108455658,
0.33820679783821106,
-0.14346250891685486,
-0.1288195699... | |
We are implementing an IP based geolocation service, and we need to find some IP's from various markets (LA, NY etc) to fully test the service.
Does anybody know of a directory where we could find what IP ranges are used where?
EDIT: We have already implemented the system, it uses a 3rd party DB and a webservice. We ... | [
0.6092938184738159,
-0.023303937166929245,
0.3239619731903076,
0.5182527899742126,
0.16779190301895142,
-0.34688040614128113,
0.09434621781110764,
0.08217521756887436,
-0.050227198749780655,
-0.6818065643310547,
0.10272842645645142,
0.2935746908187866,
-0.17009097337722778,
-0.096975162625... | |
[This one](http://www.maxmind.com/app/geoip_country) claims 99.3% accuracy on its free version with 99.8% for its paid version. They've also got a [Free & Open Source City Database](http://www.maxmind.com/app/geolitecity) (76% accuracy at city level).
They're both available as CSV-based databases so you can easily tak... | [
0.22207657992839813,
-0.21420682966709137,
0.6190122365951538,
0.24202919006347656,
0.06620136648416519,
0.06091088801622391,
0.2755735218524933,
0.05715521425008774,
-0.2411971241235733,
-0.8274168968200684,
-0.010202791541814804,
0.1015053540468216,
-0.09586914628744125,
-0.1730656325817... | |
I'm working on an application for work that is going to query our employee database. The end users want the ability to search based on the standard name/department criteria, but they also want the flexibility to query for all people with the first name of "James" that works in the Health Department. The one thing I wan... | [
0.8856485486030579,
0.22741666436195374,
0.03322133049368858,
0.07891812175512314,
0.31646445393562317,
0.05823846161365509,
0.18080508708953857,
0.011808875016868114,
-0.11273156851530075,
-0.6230599284172058,
0.23489795625209808,
0.5232316851615906,
-0.016406366601586342,
0.2976507544517... | |
method is:
```
CREATE PROCEDURE ps_Customers_SELECT_NameCityCountry
@Cus_Name varchar(30) = NULL
,@Cus_City varchar(30) = NULL
,@Cus_Country varchar(30) = NULL
,@Dept_ID int = NULL
,@Dept_ID_partial varchar(10) = NULL
AS
SELECT Cus_Name
,Cus_City
,Cus_Country
,Dept_ID
FROM Cust... | [
-0.1987442821264267,
-0.1782805323600769,
0.49742549657821655,
0.0913059338927269,
0.11444021016359329,
0.37192845344543457,
-0.0501658134162426,
-0.2799666225910187,
-0.12960687279701233,
-0.5853164792060852,
-0.13897313177585602,
0.19576892256736755,
-0.3553257882595062,
0.30666384100914... | |
Cus_Country LIKE '%' + @Cus_Country + '%')
AND (@Dept_ID IS NULL OR Dept_ID = @DeptID)
AND (@Dept_ID_partial IS NULL OR CONVERT(varchar, Dept_ID) LIKE '%' + @Dept_ID_partial + '%')
```
These kind of SPs can easily be code generated (and re-generated for table-changes).
You have a few options for handling... | [
-0.25224846601486206,
-0.12955646216869354,
0.36007174849510193,
0.02887069433927536,
-0.31243792176246643,
0.008783547207713127,
-0.017799129709601402,
-0.20074684917926788,
-0.6181771755218506,
-0.6143214702606201,
-0.23480558395385742,
0.10514035820960999,
-0.3356439471244812,
0.0263133... | |
Because I run a blog aggregator website which checks a large list of RSS feeds for new posts every hour so I will be happy if its possible to use google feed api or [Google AJAX Feed API](http://code.google.com/apis/ajaxfeeds/) instead of making the cron jobs to read the whole feed to know if its updated or not.
like t... | [
0.739385724067688,
-0.0214501041918993,
0.6046303510665894,
0.18875378370285034,
-0.11306958645582199,
-0.28771790862083435,
0.07120206952095032,
0.267657071352005,
-0.433957040309906,
-0.40993452072143555,
0.22990183532238007,
0.6664714813232422,
-0.11449023336172104,
0.1500040590763092,
... | |
to update feeds, then you should look into using a ping server, <http://en.wikipedia.org/wiki/Ping_blog> to determine when feeds are updated so that you know it is time to fetch the feed again. Not all feeds use a ping server, but it might help you for those that do. | [
0.7476406097412109,
-0.5535817742347717,
0.5342279672622681,
0.36176255345344543,
-0.07812511920928955,
-0.44604846835136414,
-0.09806223213672638,
0.2741096615791321,
-0.3345670700073242,
-0.8599737882614136,
0.22233620285987854,
0.5399269461631775,
-0.020575199276208878,
-0.0320264622569... | |
Say I have a C function which takes a variable number of arguments: How can I call another function which expects a variable number of arguments from inside of it, passing all the arguments that got into the first function?
Example:
```
void format_string(char *fmt, ...);
void debug_print(int dbg_lvl, char *fmt, ...... | [
0.18194712698459625,
0.33754080533981323,
0.8210570216178894,
-0.1462646871805191,
-0.05450684204697609,
0.1381448656320572,
0.13707368075847626,
-0.4327271580696106,
-0.10735508799552917,
-0.28677353262901306,
-0.37206268310546875,
0.5947414040565491,
-0.4770422875881195,
0.32330238819122... | |
char *fmt, ...)
{
char formatted_string[MAX_FMT_SIZE];
va_list argptr;
va_start(argptr,fmt);
format_string(fmt, argptr, formatted_string);
va_end(argptr);
fprintf(stdout, "%s",formatted_string);
}
``` | [
-0.21143384277820587,
0.08445192128419876,
0.876238226890564,
-0.5321953892707825,
0.15004035830497742,
0.38520848751068115,
0.5497992038726807,
-0.43283602595329285,
-0.22847598791122437,
-0.5807851552963257,
-0.7717713713645935,
0.7832472324371338,
-0.22467383742332458,
0.134276613593101... | |
Visual Studio makes calling a web service easy, trying to figure out what is going on under the covers is difficult.
How can I see the actual XML generated from my .Net app when making a call to a web service?
tools like [tcptrace](http://www.pocketsoap.com/tcptrace/) or [Fiddler](http://www.fiddler2.com/fiddler2/) ca... | [
0.24960936605930328,
0.1273079365491867,
0.04440738260746002,
0.0398963987827301,
-0.2730853259563446,
0.0803656056523323,
0.22998596727848053,
-0.2590387463569641,
-0.35223785042762756,
-0.4665650725364685,
0.07827506214380264,
0.7389116883277893,
0.003604018595069647,
-0.1114107444882392... | |
During my work with databases I noticed that I write query strings and in this strings I have to put several restrictions in the where-clause from a list/array/collection. Should look like this:
```
select * from customer
where customer.id in (34, 26, ..., 2);
```
You can simplify this by reducing this to the quest... | [
0.0674380287528038,
-0.07894822210073471,
0.19969864189624786,
-0.036404483020305634,
-0.04064948111772537,
-0.012171922251582146,
-0.20255494117736816,
-0.4205845892429352,
-0.15861406922340393,
-0.37783923745155334,
-0.158563032746315,
0.6451184153556824,
-0.2817084491252899,
0.203993141... | |
result+=string;
first=false;
} else {
result+=","+string;
}
}
```
But this is as you can see very ugly. You cannot see what happens there on the first look, especially when the constructed strings (like every SQL query) is getting complicated.
What is your (more) elegant way?
Note: This answe... | [
-0.036703094840049744,
-0.008597265928983688,
0.39562559127807617,
-0.04053753614425659,
-0.3379363715648651,
-0.3727976679801941,
0.44041571021080017,
-0.5556950569152832,
-0.12444581091403961,
-0.6140530705451965,
0.08559346944093704,
0.2872004806995392,
-0.38532882928848267,
-0.03553139... | |
a utility library. See other answers below.
---
Since strings are immutable, you may want to use the StringBuilder class if you're going to alter the String in the code.
The StringBuilder class can be seen as a mutable String object which allocates more memory when its content is altered.
The original suggestion in... | [
0.0790105015039444,
-0.2596123218536377,
0.23637734353542328,
-0.09219366312026978,
-0.030389269813895226,
-0.03661938011646271,
0.3249972462654114,
-0.6373754739761353,
-0.1353575736284256,
-0.428091824054718,
-0.3414420783519745,
0.5726710557937622,
-0.48043587803840637,
0.22515967488288... | |
}
return result.length() > 0 ? result.substring(0, result.length() - 1): "";
``` | [
-0.15708674490451813,
-0.18303878605365753,
0.30591005086898804,
-0.25414538383483887,
0.2734050750732422,
-0.13565059006214142,
0.254079133272171,
-0.5440964102745056,
-0.026956960558891296,
0.0113990418612957,
-0.316241055727005,
0.6449962258338928,
-0.28041568398475647,
0.17827650904655... | |
The new ASP.NET routing is great for simple path style URL's but if you want to use a url such as:
<http://example.com/items/search.xhtml?term=Text+to+find&page=2>
Do you have to use a catch all parameter with a validation?
Any view data items that are not listed in the route are automatically mapped to the querystri... | [
-0.027980247512459755,
-0.6244186758995056,
0.6798744797706604,
0.25281402468681335,
-0.2701101005077362,
-0.3995269238948822,
0.17119434475898743,
-0.15475954115390778,
-0.5304210782051086,
-0.8225273489952087,
-0.07429369539022446,
0.10621946305036545,
-0.26880308985710144,
-0.0410336777... | |
I have an alert script that I am trying to keep from spamming me so I'd like to place a condition that if an alert has been sent within, say the last hour, to not send another alert. Now I have a cron job that checks the condition every minute because I need to be alerted quickly when the condition is met but I don't n... | [
0.6092349886894226,
0.5618994235992432,
0.3318628668785095,
-0.04234945774078369,
0.18941353261470795,
0.061714641749858856,
0.20190122723579407,
-0.247770756483078,
-0.43941599130630493,
-0.7639089226722717,
0.40220901370048523,
0.7141620516777039,
-0.012987541034817696,
-0.05717697367072... | |
as modification times of dummy files. GNU `touch` and `date` commands can set/get these times and perform date calculations. Bash has tests to check whether a file is newer than (`-nt`) or older than (`-ot`) another.
For example, to only send a notification if the last notification was more than an hour ago:
```
touc... | [
0.2694292664527893,
0.014641485176980495,
0.5115947723388672,
-0.23649607598781586,
0.2993655204772949,
-0.27036547660827637,
0.26032140851020813,
-0.42417973279953003,
-0.45617443323135376,
-0.5973345637321472,
-0.20292118191719055,
0.7404473423957825,
0.3072532117366791,
0.18054753541946... | |
Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called without needing to run the code. Is there an equivalent way to do this in Emacs instead of running and executing the code?
You can [use Pyflakes together with Flymake](https://web.archive.org/web/20090503090851/http://www.plope.org/Members... | [
0.5483573079109192,
0.04181588813662529,
0.0983394905924797,
-0.11128513514995575,
-0.18324904143810272,
-0.1467517912387848,
0.0774051696062088,
-0.06469589471817017,
-0.3848606050014496,
-0.2350858598947525,
0.02896859683096409,
0.5747296810150146,
-0.41945117712020874,
-0.47601482272148... | |
My knowledge of matlab is merely on a need to know basis, so this is probably an elementary question. Nevertheless here it comes:
I have got a file containing data (16-bit integers) stored in binary format. How do I read it into a vector /an array in matlab? How do I write this data to a file in matlab? Is there any s... | [
0.4319254755973816,
0.04431777447462082,
0.08938833326101303,
-0.022886699065566063,
-0.05692027136683464,
0.184300035238266,
-0.036141201853752136,
0.10075587034225464,
-0.622093677520752,
-0.1688786745071411,
0.1782456338405609,
0.5060043931007385,
-0.1470831036567688,
-0.055985212326049... | |
answer.
### Reading Data
```
>> fid=fopen('data.bin','rb') % opens the file for reading
>> A = fread(fid, count, 'int16') % reads _count_ elements and stores them in A.
```
The commands *fopen* and *fread* default to Little-endian[1] encoding for the integers. If your file is Big-endian encoded you will need to ch... | [
-0.20331427454948425,
0.09104476869106293,
0.5276685357093811,
-0.0380772240459919,
0.06452449411153793,
0.20453019440174103,
0.027463184669613838,
-0.7511393427848816,
-0.1320270150899887,
-0.3248537480831146,
-0.3796771764755249,
0.38443702459335327,
-0.37865957617759705,
-0.244964718818... | |
a binary file. If you want to write the data to a text file you can use *dlmwrite*
```
>> dlmwrite('data.csv',A,',');
```
### References
[1] <http://en.wikipedia.org/wiki/Endianness>
### Update
1. The machine format (IE, *ieee-be*,
*ieee-le*, *vaxd* etc.) of the binary data can be specified in either the
*fopen* ... | [
0.1281587928533554,
0.011575005017220974,
0.4183862507343292,
0.06578437983989716,
0.08636827021837234,
0.40445011854171753,
-0.13298651576042175,
-0.2918326258659363,
-0.2379898577928543,
-0.5133469104766846,
-0.42805221676826477,
0.44409632682800293,
-0.47280940413475037,
0.0149241564795... | |
around the file. For example,
```
>> fseek(fid,0,'bof');
```
will rewind the file to the beginning where *bof* stands for *beginning of file*. | [
0.17998990416526794,
-0.014752681367099285,
0.6105942130088806,
-0.35423120856285095,
0.13069672882556915,
-0.2549627125263214,
0.01720661111176014,
-0.08666472136974335,
-0.26793771982192993,
-0.49380940198898315,
-0.7779836654663086,
0.1396445482969284,
-0.20541344583034515,
0.3431096673... | |
The explorer control in Windows Vista is very handy and I would like to be able to incorporate it in an application written in WPF. I've been unable to find a *stock control* that is part of the Framework. This application is being specifically developed for Windows Vista and therefore, having the same look and feel as... | [
0.08449995517730713,
-0.01926235295832157,
0.41107627749443054,
0.1947641223669052,
0.13886627554893494,
-0.20862986147403717,
0.06236134096980095,
0.2923498749732971,
-0.002022094326093793,
-0.7160352468490601,
0.0854361280798912,
0.6352943181991577,
-0.24049502611160278,
0.23993402719497... | |
from Third Party components if possible, but am definitely open to all suggestions.
I haven't yet tried it but look at [VistaBridge](http://msdn.microsoft.com/en-us/library/ms756482.aspx)... It gives you all the Vista look dialog boxes! | [
0.4040944278240204,
-0.06953103840351105,
0.355106920003891,
0.06730852276086807,
0.13369427621364594,
-0.21530546247959137,
0.1531979888677597,
0.08614549040794373,
-0.07995674014091492,
-0.7899301052093506,
-0.052661169320344925,
0.5204669237136841,
-0.1548117697238922,
0.037449017167091... | |
I need to make changes to an in-use production database. Just adding a few columns. I've made the changes to the dev database with migrations. What is the best way to update the production database while preserving the existing data and not disrupting operation too much?
It's MYSQL and I will be needing to add data to... | [
0.4857127070426941,
0.19672073423862457,
0.4881628155708313,
0.00692167691886425,
0.1797443926334381,
0.14579139649868011,
-0.020841732621192932,
-0.04918801411986351,
-0.4071120619773865,
-0.8203076720237732,
0.326504647731781,
0.21075786650180817,
-0.29403990507125854,
0.3758121728897095... | |
data and how do I get it to just do the two (or three - I add data -latest migrations on the production db when it wasn't initially built via migrations (I believe they used the schema instead)?
It sounds like you're in a state where the production db schema doesn't exactly match what you're using in dev (although it's... | [
0.5822038054466248,
-0.14857099950313568,
0.42086485028266907,
0.24440361559391022,
0.13161006569862366,
-0.01856112852692604,
-0.03152254968881607,
-0.2939241826534271,
-0.16982251405715942,
-0.4455902576446533,
0.11811913549900055,
0.7158657908439636,
-0.13372965157032013,
0.105444446206... | |
that you >don't< ever want to run in production. Then you can add migrations to your hearts content and they'll work against the production db.
Once you've done that you can write migrations that add schema changes or add data, but one thing you need to be really careful about is that if you add data using a migration... | [
0.7473644614219666,
0.08782650530338287,
0.30893343687057495,
-0.18915951251983643,
0.30016037821769714,
0.11170582473278046,
0.12630078196525574,
0.042213376611471176,
-0.3434206545352936,
-0.5675899386405945,
-0.059439193457365036,
0.29012590646743774,
-0.40590548515319824,
0.20910826325... | |
u.super_cool = true
u.save
end
def self.down
remove_column :users, :super_cool
end
end
```
The reason for this is that in the future, you might remove the model altogether, during some refactoring or other. If you don't define the user class on line "User.find\_by\_login..." the migration will throw an... | [
0.05509331449866295,
-0.05189299210906029,
0.5483242869377136,
-0.03252774849534035,
0.22038963437080383,
-0.23042374849319458,
0.4363839626312256,
0.152085080742836,
-0.1331736296415329,
-0.7786734104156494,
-0.24209801852703094,
0.4929770231246948,
-0.23632201552391052,
0.606624901294708... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.