text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I'm creating a database table and I don't have a logical primary key assigned to it. Should each and every table have a primary key?
Short answer: **yes**.
Long answer:
* You need your table to be joinable on something
* If you want your table to be clustered, you need some kind of a primary key.
* If your table desi... | [
-0.054448749870061874,
0.16272462904453278,
-0.12330867350101471,
0.27372613549232483,
-0.1625475436449051,
-0.10924971103668213,
-0.0697566345334053,
0.013169495388865471,
-0.47203725576400757,
-0.6384530663490295,
-0.01592150330543518,
0.20317363739013672,
-0.5600448250770569,
0.41747799... | |
access to.
Note that a primary key can be composite.
If you have a many-to-many link table, you create the primary key on all fields involved in the link. Thus you ensure that you don't have two or more records describing one link.
Besides the logical consistency issues, most RDBMS engines will benefit from includin... | [
-0.18319173157215118,
0.2033473402261734,
0.1411237120628357,
0.4522811770439148,
-0.058118633925914764,
-0.4102399945259094,
0.0997796505689621,
0.20566685497760773,
-0.3577236235141754,
-0.6542184948921204,
-0.1409691423177719,
0.33498719334602356,
-0.23662228882312775,
0.682663142681121... | |
are some *very, very* special cases where you don't need a primary key.
Mostly they include log tables which don't have *any* indexes for performance reasons. | [
-0.1062634140253067,
0.17194123566150665,
-0.11553653329610825,
0.47451186180114746,
0.21129687130451202,
-0.31156125664711,
0.10944049805402756,
0.09365435689687729,
-0.5020701289176941,
-0.4046471416950226,
-0.4607153534889221,
0.4377206265926361,
0.14728471636772156,
-0.1384598612785339... | |
I encountered ConcurrentModificationException and by looking at it I can't see the reason why it's happening; the area throwing the exception and all the places modifying the collection are surrounded by
```
synchronized (this.locks.get(id)) {
...
} // locks is a HashMap<String, Object>;
```
I tried to catch the ... | [
0.6837276816368103,
-0.048639435321092606,
0.3573884665966034,
0.24970164895057678,
0.06635420024394989,
-0.2828408181667328,
0.16933761537075043,
-0.007905418053269386,
-0.4906502664089203,
-0.40522682666778564,
0.24820925295352936,
0.46978235244750977,
-0.6330453157424927,
0.579998910427... | |
with the synchronization block. `ConcurrentModificationException`s often occur when you're modifying a collection while you are iterating over its elements.
```
List<String> messages = ...;
for (String message : messages) {
// Prone to ConcurrentModificationException
messages.add("A COMPLETELY NEW MESSAGE");
}... | [
0.2223559319972992,
-0.25291237235069275,
0.21469473838806152,
0.009801818989217281,
-0.03195502981543541,
-0.19437649846076965,
0.3653118908405304,
-0.1496714949607849,
-0.4103192389011383,
-0.3688000738620758,
-0.23181352019309998,
0.48136022686958313,
-0.7177941799163818,
0.454531311988... | |
I in the process of designing a database for high volume data and I was wondering what datatype to use for the primary keys?
There will be table partitioning and the database will ultimatley be clustered and will be hot failover to alternative datacentres.
**EDIT**
---
Tables - think chat system for multiple time p... | [
0.19569708406925201,
0.24621908366680145,
0.4857066571712494,
0.33109816908836365,
0.09056916832923889,
0.010234751738607883,
0.12240216881036758,
0.10419630259275436,
-0.2960650622844696,
-0.8582820296287537,
0.2347617894411087,
0.38214731216430664,
-0.22047188878059387,
0.366056859493255... | |
I share your concearn of GUID - I dont like coding with GUIDs flying about.
With just the little bit of info you've provided, I would recommend using a **BigInt**, which would take you up to 9,223,372,036,854,775,807, a number you're not likely to ever exceed. (Don't start with an INT and think you can easily change it... | [
-0.2232283502817154,
0.1578921526670456,
0.1343597173690796,
0.25499844551086426,
-0.10818912088871002,
0.5165382027626038,
0.2906619906425476,
0.09166951477527618,
-0.578955888748169,
-0.43266141414642334,
0.26777371764183044,
0.22452323138713837,
0.29454925656318665,
0.07310602813959122,... | |
Clustered Index Debate Continues](http://www.sqlskills.com/BLOGS/KIMBERLY/post/The-Clustered-Index-Debate-Continues.aspx)*) on the issue of creating clustered indexes, and choosing the primary key (related issues, but not always exactly the same). Her recommendation is that a clustered index/primary key should be:
1. ... | [
-0.24393123388290405,
-0.13801012933254242,
0.7250396609306335,
0.11072400212287903,
-0.17144837975502014,
-0.15517793595790863,
-0.36456114053726196,
-0.1421157866716385,
-0.3035106360912323,
-0.48519203066825867,
0.03792182728648186,
0.26672661304473877,
-0.14285704493522644,
0.257834553... | |
clustered index, that should satisfy all four of these requirements.
Edit: Kimberly's article I mentioned above (*[GUIDs as PRIMARY KEYs and/or the clustering key](http://sqlskills.com/BLOGS/KIMBERLY/post/GUIDs-as-PRIMARY-KEYs-andor-the-clustering-key.aspx)*) talks about why a (client generated) GUID is a bad choice ... | [
-0.7185736298561096,
-0.10182014107704163,
0.4162573516368866,
0.16300614178180695,
-0.12317350506782532,
-0.08243970572948456,
-0.11825627088546753,
-0.17106790840625763,
-0.2672466039657593,
-0.4447798430919647,
-0.023838091641664505,
0.32808583974838257,
-0.5213313102722168,
0.159990787... | |
size. It's unnecessarily wide (it's 4
> times wider than an int-based identity
> - which can give you 2 billion (really, 4 billion) unique rows). And,
> if you need more than 2 billion you
> can always go with a bigint (8-byte
> int) and get 263-1 rows.
SQL has a function called NEWSEQUENTIALID() that allows you ... | [
0.274291455745697,
-0.15803316235542297,
0.23901355266571045,
0.31383517384529114,
-0.18940196931362152,
-0.16968713700771332,
0.06544272601604462,
0.07584166526794434,
-0.46367350220680237,
-0.6572597026824951,
0.053688932210206985,
0.27895545959472656,
-0.09955377131700516,
0.23201763629... | |
I'm writing a Windows Service that needs to take a file from an FTP folder on the local computer and parse the data in that file, and push it to an external source. The file will be uploaded to the FTP folder at some point from some other party, and I can't predict when the file will be uploaded. I need the service to ... | [
0.5884015560150146,
0.23222452402114868,
0.17203785479068756,
0.06288554519414902,
0.2521950900554657,
-0.14892500638961792,
0.07002482563257217,
0.23177100718021393,
-0.14757230877876282,
-0.7333248257637024,
0.03127053380012512,
0.45813193917274475,
-0.12324599176645279,
0.20250762999057... | |
able to detect when a file was put into a directory.
There is a similar question in SO about this [here](https://stackoverflow.com/questions/426809/how-to-get-date-time-when-file-was-placed-in-a-directory-on-windows), but it wasn't in regards to writing a windows service. Also, the solution seemed to be to monitor the... | [
0.14801397919654846,
-0.3547496497631073,
0.30901384353637695,
0.11782290786504745,
0.21862120926380157,
-0.4528634548187256,
0.44646742939949036,
-0.045503947883844376,
-0.2053752988576889,
-0.668106198310852,
0.15496084094047546,
0.5904541611671448,
0.0896618515253067,
-0.120459392666816... | |
a FileSystemWatcher. That will throw a "Changed" (Or even a "created" I believe) event which you can handle. You'll need to be careful to make sure the file is fully written before you start working with it, but that should get you pointed in the right direction.
EDIT: To Joseph's question about how, here's a static m... | [
0.25882741808891296,
-0.23420968651771545,
0.1034005731344223,
0.08251745998859406,
0.0056676133535802364,
-0.18005232512950897,
0.21967989206314087,
-0.05921223387122154,
-0.3981938660144806,
-0.4901565909385681,
-0.13990721106529236,
0.6631842851638794,
-0.44903650879859924,
0.0693355053... | |
{
File.Open(filePath, FileMode.Open, FileAccess.ReadWrite, FileShare.None);
return true;
}
catch { return false; }
}
```
Then I just a While(!FileComplete(foo)) {} before my actual file handling. | [
0.048037465661764145,
-0.004372362047433853,
0.4041307270526886,
-0.27127355337142944,
0.25171518325805664,
-0.22863323986530304,
0.39707356691360474,
-0.019952936097979546,
-0.17077229917049408,
-0.3190195858478546,
-0.1992630809545517,
0.6920558214187622,
-0.19943633675575256,
0.34804609... | |
I ran across the following snippet of code. Names have been changed to protect the innocent:
```
public void RunProgram()
{
System.IO.FileInfo fInfo = new System.IO.FileInfo(Application.StartupPath + "Program.exe");
if (!fInfo.Exists)
{
System.Windows.Forms.MessageBox.Show(... | [
0.3830389380455017,
-0.12356378138065338,
0.5360996127128601,
-0.2349707931280136,
0.4464740455150604,
0.07781874388456345,
0.4314769506454468,
-0.01702059805393219,
-0.24015843868255615,
-0.6968329548835754,
-0.1278003454208374,
0.41268190741539,
-0.5023085474967957,
0.40217384696006775,
... | |
try
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo pStart = new System.Diagnostics.ProcessStartInfo();
pStart.FileName = fInfo.FullName;
pStart.UseShellExecute = true;
process.StartInfo =... | [
0.09985271841287613,
-0.2575892508029938,
0.6464425325393677,
-0.11165469884872437,
0.6409978270530701,
0.2717929482460022,
0.2872992753982544,
-0.36797472834587097,
-0.10939668864011765,
-0.7412870526313782,
-0.4139675199985504,
0.5152413249015808,
-0.3013480305671692,
0.37545573711395264... | |
process.Start();
}
catch
{
System.Windows.Forms.MessageBox.Show(string.Format("An error occurred trying to run the program:{0}", fInfo.FullName));
}
}
```
I know there are a few things wrong here:
* Exception types aren't being handled individually
* Error message isn'... | [
0.3239758610725403,
0.28798121213912964,
0.3909872770309448,
-0.1114109456539154,
0.1983509510755539,
-0.1607510894536972,
0.43064311146736145,
-0.33439818024635315,
-0.4422994554042816,
-0.6504203081130981,
-0.009019684046506882,
0.36107194423675537,
-0.05828585475683212,
0.32172784209251... | |
the try/catch block. This strikes me as a bit redundant.
The point of exception handling is to catch unexpected conditions. I fully expect the file to be there so removing the existence check and just letting the exception handling catch it if it isn't seams a reasonable solution to me.
What do you think?
It is redun... | [
0.09039166569709778,
-0.08687147498130798,
0.030237404629588127,
-0.058718565851449966,
0.08000579476356506,
-0.34144583344459534,
0.41148823499679565,
-0.15972700715065002,
-0.5681679248809814,
-0.28510528802871704,
-0.16472822427749634,
0.6042721271514893,
-0.3607836961746216,
0.01278600... | |
I'd like to inject jQuery into a page using the Google AJAX Libraries API, I've come up with the following solution:
**<http://my-domain.com/inject-jquery.js>:**
```
;((function(){
// Call this function once jQuery is available
var func = function() {
jQuery("body").prepend('<div>jQuery Rocks!</div>');
};
... | [
0.1725510209798813,
-0.1229739785194397,
0.6786563992500305,
0.17546984553337097,
-0.2720429301261902,
-0.0669107660651207,
0.23593273758888245,
-0.05924952030181885,
0.08796381205320358,
-0.8554472923278809,
0.04633985832333565,
0.4155298173427582,
-0.11468883603811264,
0.0307320952415466... | |
Libraries API is loaded ...
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
done = true;
// ... load jQuery ...
window.google.load("jquery", "1", {callback:function(){
jQuery.noConflict();
// ... jQuery available, f... | [
0.18144239485263824,
-0.3021849989891052,
0.4948411285877228,
0.061302728950977325,
0.23209892213344574,
-0.04799913614988327,
0.26141101121902466,
-0.2230413854122162,
-0.04908966273069382,
-0.2772356867790222,
-0.3897961676120758,
0.5849074721336365,
-0.8649928569793701,
0.11691682785749... | |
// Prevent IE memory leaking
script.onload = script.onreadystatechange = null;
head.removeChild(script);
}
}
// Load Google AJAX Libraries API
head.appendChild(script);
// Page already using jQuery, fire function
} else {
func();
}
})());
```
The script would then be incl... | [
0.07237999886274338,
0.23172618448734283,
0.5609643459320068,
-0.049507468938827515,
-0.04184733331203461,
-0.23205113410949707,
0.28204602003097534,
-0.24966685473918915,
0.1082359105348587,
-0.9978100061416626,
-0.1987292468547821,
0.40324240922927856,
-0.14381778240203857,
0.02616001106... | |
is my page.</h1>
<script src="http://my-domain.com/inject-jquery.js"></script>
</body>
</html>
```
In Firefox 3 I get the following error:
```
Module: 'jquery' must be loaded before DOM onLoad! jsapi (line 16)
```
The error appears to be specific to the Google AJAX Libraries API, as I've seen others use a jQ... | [
0.06717128306627274,
0.1238376647233963,
0.7814196348190308,
-0.3440755605697632,
-0.18511314690113068,
-0.3760349452495575,
0.29511788487434387,
-0.30480822920799255,
0.05387486517429352,
-0.7715786695480347,
-0.18587300181388855,
0.6340014934539795,
-0.4780522882938385,
-0.08317418396472... | |
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";
script.onload = script.onreadystatechange = function(){ /* your callback here */ };
document.body.appendChild( script );
})()
``` | [
0.005188242997974157,
0.031201858073472977,
0.5502511858940125,
-0.2210889607667923,
-0.029237661510705948,
0.03248351439833641,
0.4532727003097534,
-0.10160426050424576,
0.05323014780879021,
-0.6392101049423218,
-0.2957684397697449,
0.6331477761268616,
-0.17477241158485413,
-0.04753719270... | |
For Visual Studio .sln files, Window Explorer is doing something "clever" to figure out whether to display the v8 or v9 icons.
Now when it comes to double-clicking/launching the icon, I know that it goes through a "Visual Studio Launcher" app which looks at the version info in the sln file and selectively runs VS2005... | [
0.5190573334693909,
-0.13921253383159637,
0.3182185888290405,
-0.02085907943546772,
-0.30140864849090576,
-0.20426267385482788,
0.1438499242067337,
0.3199683427810669,
-0.4166787266731262,
-0.695662796497345,
0.17679008841514587,
0.7502951622009277,
-0.1299886554479599,
0.03631792590022087... | |
config generator here, that gets updated deployed by ClickOnce but it would be nice for people to see at a glance which version of the generator app, created the config files.
Cheers,
I think this is what you're looking for?
[How to Create Icon Handlers](http://msdn.microsoft.com/en-us/library/cc144122(VS.85).aspx) | [
0.22993619740009308,
-0.24969129264354706,
0.2043893039226532,
0.15200912952423096,
0.0691470056772232,
0.058829255402088165,
0.06853284686803818,
0.06507831066846848,
-0.5961864590644836,
-0.5447378158569336,
-0.034566812217235565,
0.4159204959869385,
-0.45647162199020386,
-0.345592051744... | |
I'm trying to embed a Flash object in my app. I've added a reference to the ShockwaveFlash COM Object but the app fails at instantiation:
```
ShockwaveFlashObjects.ShockwaveFlashClass shockwave = new ShockwaveFlashObjects.ShockwaveFlashClass();
```
With the following error:
> System.Runtime.InteropServices.COMExcep... | [
0.29733511805534363,
0.268020361661911,
0.25518959760665894,
0.010972903110086918,
0.12401140481233597,
0.10939473658800125,
0.4753466546535492,
-0.08340008556842804,
-0.07629226893186569,
-0.6289565563201904,
0.1110047847032547,
0.7148498892784119,
-0.28329408168792725,
0.2507809698581695... | |
implements the IPostBackEventHander):
```
<asp:Button runat="server"
UseSubmitBehavior="false" ID="Button"
Text="Update"
OnClientClick="myfunction();"/>
```
The myfunction javascript must look like this:
```
<script type="text/javascript">
function myfunction(param)
{
__doPostBack(... | [
-0.3117215633392334,
0.22929921746253967,
0.3597707748413086,
-0.1515839844942093,
0.011286519467830658,
0.02164968103170395,
0.29175493121147156,
-0.44240307807922363,
-0.12444024533033371,
-0.7062511444091797,
-0.2868826687335968,
0.3703874945640564,
-0.2677857279777527,
0.02525361068546... | |
In standard SQL, is there a way to say:
```
select mubmle as x from mumblemmble
```
And get more than one line of results, like this
```
x
_
1
2
3
```
without creating temporary tables? I can do it in SQL Server using row\_count() if I know some table that has enough rows, like:
```
select row_number() o... | [
0.04914890229701996,
0.20578891038894653,
0.22803594172000885,
0.05908222869038582,
-0.1905287802219391,
-0.053616102784872055,
0.04965565726161003,
-0.07996297627687454,
-0.2111426293849945,
-0.4787038564682007,
-0.31244245171546936,
0.3902387320995331,
-0.3213861584663391,
0.082213215529... | |
level < n
```
In `MS SQL`:
```
WITH hier(row) AS
(
SELECT 1
UNION ALL
SELECT row + 1
FROM hier
WHERE row < n
)
SELECT *
FROM hier
OPTION (MAXRECURSION 0)
```
In `PostgreSQL`:
```
SELECT *
FROM generate_series (1, n)
```
Note that | [
-0.18046854436397552,
-0.2402816116809845,
0.5542147755622864,
0.0951060801744461,
-0.005158417392522097,
-0.22835548222064972,
0.040372464805841446,
-0.3029222786426544,
0.19159317016601562,
-0.6043389439582825,
-0.23828743398189545,
0.6071313619613647,
-0.29296210408210754,
-0.0897867158... | |
`MS SQL`, unlike `Oracle`, cannot swap recursion stack into temporary tablespace, so you may experience troubles when generating large datasets.
See [**this answer**](https://stackoverflow.com/questions/701444/how-do-i-make-a-row-generator-in-mysql/707845) for more details | [
-0.14814919233322144,
0.005751541815698147,
0.18681971728801727,
-0.08675073832273483,
-0.05825334042310715,
-0.05513444170355797,
0.1354166865348816,
-0.13908471167087555,
-0.20370705425739288,
-0.28181886672973633,
-0.1929805427789688,
0.25405794382095337,
-0.34189945459365845,
0.0165573... | |
I'm building a dynamic button view, which adds buttons programmatically depending on the amount of items in the database. Like a simple workflow engine. On the first page call the event handler works like expected. The new page with the new item is builded and returned to the client. On the second postback the event ha... | [
-0.03678424283862114,
-0.22361335158348083,
0.2810322940349579,
0.035249482840299606,
-0.15699447691440582,
0.11273429542779922,
0.31563377380371094,
-0.15467020869255066,
-0.257425993680954,
-0.5979360342025757,
-0.06555095314979553,
0.7097402215003967,
-0.4112780690193176,
0.261147826910... | |
post back?
For information: The methods `LoadViewWithAlphabeticalDatasource()` and `LoadViewWithWorkflowItem()` does quite the same, so i deleted one in section below. The events are added in same way.
Code:
```
<pre>
namespace EPS.Web.View.Article
{
public class DynamicGridView : BasePage, IDynamicGri... | [
-0.13921816647052765,
-0.4781976640224457,
0.5662040710449219,
-0.058127015829086304,
-0.08577748388051987,
0.141661137342453,
0.27547815442085266,
-0.10092997550964355,
-0.3447851538658142,
-0.5939346551895142,
-0.16584353148937225,
0.4789314568042755,
-0.18984462320804596,
0.341279357671... | |
if (IsPostBack)
{
if (Presenter.Step smallerthan 2)
{
LoadViewWithAlphabeticalDatasource(); | [
-0.1389654576778412,
-0.4815455377101898,
0.624320387840271,
-0.31065985560417175,
0.031000282615423203,
0.03800060972571373,
0.4238227307796478,
-0.20281857252120972,
-0.03805289790034294,
-0.5873016715049744,
0.06560120731592178,
0.4954083263874054,
-0.056514982134103775,
0.1975554823875... | |
}
else
{
LoadViewWithWorkflowItem();
} | [
-0.1296849101781845,
-0.2708601951599121,
0.09870083630084991,
-0.48129910230636597,
0.1956423968076706,
-0.038607604801654816,
0.30966126918792725,
0.07939881086349487,
0.029006199911236763,
-0.43779584765434265,
-0.19647759199142456,
1.0495710372924805,
-0.2176443636417389,
-0.1415890455... | |
}
}
[PageMethod]
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{ | [
-0.36620861291885376,
-0.16695299744606018,
0.2614152133464813,
-0.1931883543729782,
-0.10721522569656372,
-0.06631094962358475,
0.3141505718231201,
-0.1864856332540512,
-0.031479403376579285,
-0.7986674904823303,
-0.13366031646728516,
0.4021168053150177,
-0.5066069960594177,
0.22151578962... | |
SetSubmenuVisible = false;
Presenter.InitView();
PrepareView();
}
AddEvents();
AddLabels(); | [
0.0765366405248642,
-0.2816399037837982,
0.4995504915714264,
-0.0610177107155323,
-0.17239415645599365,
0.2898220419883728,
0.7092846035957336,
-0.23182179033756256,
-0.14231203496456146,
-0.628230631351471,
-0.3715382218360901,
0.3501397371292114,
-0.3116197884082794,
0.18597649037837982,... | |
PageMethodsEngine.InvokeMethod(this);
}
private void Back_Clicked(object sender, EventArgs e)
{
Presenter.StepEngine(DynamicGridPresenter.BACK, string.Empty, string.Empty);
PrepareView();
}
private void Cancel_Clicked(object sender, ... | [
-0.02459711767733097,
-0.33742842078208923,
0.7039240598678589,
-0.1694585680961609,
-0.09878061711788177,
0.09363508224487305,
0.6131105422973633,
-0.10141213238239288,
-0.33081549406051636,
-0.6798648238182068,
-0.3279036581516266,
0.3506234288215637,
-0.47381675243377686,
0.282924413681... | |
e)
{
Presenter.StepEngine(DynamicGridPresenter.CANCEL, string.Empty, string.Empty);
PrepareView();
}
private void ForwardString(object sender, EventArgs e)
{
Presenter.StepEngine(DynamicGridPresenter.FORWARD, ((LinkButton)sender).... | [
-0.3101217746734619,
-0.2673405706882477,
0.6159192323684692,
-0.45864829421043396,
-0.2350231111049652,
0.2904409170150757,
0.6485509276390076,
-0.36114218831062317,
-0.21594128012657166,
-0.4320821762084961,
-0.5612340569496155,
0.4109475314617157,
-0.3139236867427826,
0.3178593516349792... | |
PrepareView();
}
private void ForwardWorkflowItem(object sender, EventArgs e)
{
Presenter.StepEngine(DynamicGridPresenter.FORWARD, string.Empty, ((LinkButton)sender).CommandArgument);
PrepareView();
}
protected | [
-0.03809410706162453,
-0.07347257435321808,
0.4794367849826813,
-0.43752047419548035,
-0.2510013282299042,
0.34814906120300293,
0.8051570653915405,
-0.5239594578742981,
-0.18445269763469696,
-0.4881659150123596,
-0.1834680438041687,
0.35934868454933167,
-0.09707015752792358,
0.311700284481... | |
void PrepareView()
{
phDynamicGridView.Controls.Clear();
if (Presenter.Step smallerthan 2)
{
LoadViewWithAlphabeticalDatasource();
} | [
0.181600883603096,
-0.44558224081993103,
0.656167209148407,
-0.2680986523628235,
0.11609911918640137,
0.010778474621474743,
0.3617452085018158,
-0.2725602686405182,
0.3227534890174866,
-0.6143576502799988,
0.023256562650203705,
0.49269968271255493,
0.11860159039497375,
0.42609527707099915,... | |
else
{
LoadViewWithWorkflowItem();
}
}
private void LoadViewWithWorkflowItem()
{
var table = new HtmlTable(); | [
0.02390369027853012,
-0.15587396919727325,
0.5014363527297974,
-0.34136897325515747,
0.01151641458272934,
0.1388085037469864,
0.4026057720184326,
-0.21111160516738892,
-0.19742350280284882,
-0.5647108554840088,
-0.19149236381053925,
0.7652359008789062,
-0.4446941018104553,
-0.1612998843193... | |
table.Attributes.Add("class", "tableDynamicGrid");
int max = GetRowLength(WODatasource.Count);
int temp = 1;
int actualPosition = 0;
int itr = 1;
var tr = new HtmlTableRow(); | [
0.0032133529894053936,
-0.33762162923812866,
0.8680511713027954,
0.03201228752732277,
-0.12933838367462158,
0.23998954892158508,
0.3054977357387543,
-0.4127296209335327,
-0.2589692771434784,
-0.5087824463844299,
-0.24233923852443695,
0.5965843796730042,
-0.16771136224269867,
0.233560442924... | |
if (WODatasource.Count == 0)
{
phDynamicGridView.Controls.Add(new HtmlTable());
return;
}
foreach (WorkflowItem s in WODatasource) | [
-0.33337387442588806,
-0.41631627082824707,
0.8761093020439148,
0.010860796086490154,
0.12700052559375763,
-0.004148072097450495,
0.2300933450460434,
-0.3304760456085205,
-0.01209565531462431,
-0.6340023875236511,
-0.3207654356956482,
0.38013944029808044,
-0.0317450687289238,
0.33350557088... | |
{
if (actualPosition biggerOrEqual MaxLength && temp smallerOrEqual max)
{
table.Rows.Add(tr); | [
-0.18609662353992462,
-0.2614381015300751,
0.77994704246521,
-0.17143744230270386,
0.19877664744853973,
0.40841326117515564,
0.07813718169927597,
-0.31975290179252625,
-0.32912516593933105,
-0.24180208146572113,
-0.0012800543336197734,
0.5802215337753296,
-0.2780376970767975,
0.00329369585... | |
actualPosition = 0;
temp++;
tr = new HtmlTableRow();
}
actualPosition++; | [
-0.05013834312558174,
-0.35902082920074463,
0.8568950295448303,
-0.020215405151247978,
-0.32450586557388306,
0.25537827610969543,
0.34846916794776917,
-0.12710356712341309,
-0.08350943773984909,
-0.4101877212524414,
-0.03558477386832237,
0.3809337615966797,
-0.2211192101240158,
-0.16833387... | |
var cell = new HtmlTableCell();
// cell.Attributes.Add("class", "cellDynamicGrid");
var btn = new LinkButton
{ | [
0.0008867139113135636,
-0.35292983055114746,
0.5461537837982178,
-0.1837465763092041,
0.08733439445495605,
0.14912013709545135,
0.3207024931907654,
-0.2770356833934784,
-0.2864900529384613,
-0.6954427361488342,
-0.14452482759952545,
0.4117179214954376,
-0.44134438037872314,
0.1480315923690... | |
CommandArgument = s.Oid.ToString(),
Text = s.SelectionItem.Name /*, CssClass = "linkButtonDynamicGrid"*/
}; | [
-0.24360230565071106,
-0.27200260758399963,
0.3204350173473358,
-0.2848186790943146,
0.03948071226477623,
-0.027352117002010345,
0.4246063530445099,
-0.1430792510509491,
-0.2456924170255661,
-0.4566255509853363,
-0.7385509014129639,
0.36007973551750183,
-0.2930756211280823,
0.2984896004199... | |
btn.Click += ForwardWorkflowItem;
cell.Controls.Add(btn);
tr.Cells.Add(cell);
if (itr == WODatasource.Count && temp smallerOrEqual max)
{ | [
-0.06428205966949463,
-0.2503790855407715,
0.6439879536628723,
-0.3400181233882904,
0.29207083582878113,
0.2911893427371979,
0.522778332233429,
-0.6066471934318542,
-0.2625828981399536,
-0.4814818501472473,
0.04727219045162201,
0.36097514629364014,
-0.2839805483818054,
0.1741815209388733,
... | |
while (itr biggerOrEqual WODatasource.Count && itr smallerThan max*MaxLength)
{
tr.Cells.Add(new HtmlTableCell());
itr++; | [
-0.06225849315524101,
-0.4547644853591919,
0.7651206851005554,
-0.15161871910095215,
0.061955902725458145,
0.1602582484483719,
0.47604912519454956,
-0.2991037964820862,
-0.41196805238723755,
-0.5106311440467834,
-0.3186349868774414,
0.3279164135456085,
-0.4957578778266907,
0.11593903601169... | |
}
table.Rows.Add(tr);
phDynamicGridView.Controls.Add(table);
return; | [
-0.22793292999267578,
-0.31966352462768555,
0.42029479146003723,
-0.05432071536779404,
0.4401555061340332,
0.22152511775493622,
-0.2765462100505829,
-0.06726288050413132,
0.15109941363334656,
-0.5621320605278015,
-0.12372967600822449,
0.7439097166061401,
-0.2652411460876465,
0.359990030527... | |
}
itr++;
}
}
}
</pre>
```
Thank everbody for helping me out. I found the solution:
I didn't know that the dynamically created button needs a ID value. I suggested that Asp know wich button is created. Unfortunately i was wrong. It seems that .NET compares the ID on t... | [
0.1703464537858963,
-0.13541845977306366,
0.2866702675819397,
0.16742126643657684,
0.013635103590786457,
-0.007292247377336025,
0.24231792986392975,
-0.042117949575185776,
-0.11749964207410812,
-0.6031705141067505,
-0.06904573738574982,
0.4381590783596039,
-0.21275575459003448,
0.093196958... | |
in ControlTree.
I added
```
new Button{ID = itr.ToString()}
```
Now when server rebuilds the site, eventhandler are hitted.
regards
x. | [
-0.2917688488960266,
-0.060420699417591095,
0.321837842464447,
-0.01862148940563202,
0.02408413030207157,
-0.33874019980430603,
0.379313200712204,
-0.1137227937579155,
-0.15662820637226105,
-0.6676279306411743,
-0.21103738248348236,
0.607502818107605,
-0.2853216230869293,
0.230310991406440... | |
I'm using emacs [tramp mode](http://www.emacswiki.org/emacs/TrampMode) to remotely edit files over ssh. The problem is that every time I save the file I'm editing I have to enter my user password. I find that very annoying. How can I write my password only once / editing session?
Ah, from the [tramp docs](http://www.gn... | [
-0.25947105884552,
0.15089406073093414,
0.30024710297584534,
0.0004307846538722515,
-0.1837405264377594,
0.08632199466228485,
0.7999305129051208,
-0.25825560092926025,
-0.37591734528541565,
-0.7526749968528748,
-0.2325296252965927,
0.4501422047615051,
-0.2706330120563507,
0.216638863086700... | |
an
> agent set up: The first is that the
> agent starts a new subcommand into
> which some environment variables are
> exported, eg ssh-agent xterm &. The
> second is that the agent prints the
> needed shell commands (either sh(1) or
> csh(1) syntax can be generated) which
> can be evalled in the calling shell,... | [
-0.374349445104599,
-0.22099687159061432,
0.26657697558403015,
-0.10211819410324097,
-0.1841883510351181,
-0.0841149240732193,
0.363413006067276,
-0.3605697453022003,
0.14151792228221893,
-0.676817774772644,
-0.4348837733268738,
0.4361433982849121,
-0.3632459342479706,
-0.2286241054534912,... | |
Developing in rails is sometimes described as following "the rails way". And convention over configuration is also a very important aspect in rails.
But what are these specific conventions? Using active record for example?
I think the 'rails way' or 'ruby way' is the generally accepted syntax and practices that progra... | [
0.5634655356407166,
0.0249625351279974,
-0.24786736071109772,
0.07244091480970383,
0.044646382331848145,
-0.373261034488678,
0.4321344792842865,
0.3005063831806183,
0.05297856777906418,
-0.6874260902404785,
0.17799821496009827,
0.7714016437530518,
-0.19138407707214355,
-0.4640038311481476,... | |
language and the stylistic guidelines that define a particular type of writing.
I think all languages have certain biases and strengths that make a certain 'style' of programming for it popular. People migrating languages might struggle at first because they haven't learned how to write to that particular language. Fo... | [
0.44089818000793457,
0.2733570337295532,
-0.09108617156744003,
0.17161919176578522,
0.015073655173182487,
-0.0487489216029644,
0.45598775148391724,
0.3202533423900604,
-0.1567656248807907,
-0.7158406972885132,
0.011333809234201908,
0.5003470778465271,
-0.1924084573984146,
-0.22676567733287... | |
of source code and take notes on the way people seem to be constructing their classes, routines, file structure, etc.
Also reading the two 'Ways' books mentioned by others can't hurt. I own them both, and they're excellent resources. | [
0.8048408627510071,
0.39662957191467285,
-0.21705345809459686,
0.15762723982334137,
0.3921954035758972,
-0.16426591575145721,
-0.17712938785552979,
0.1016414612531662,
0.01367607805877924,
-0.6768771409988403,
0.18932349979877472,
0.7658546566963196,
0.2756536304950714,
-0.0348577126860618... | |
My application keeps running into Timeout Expired SqlExceptions. The thing is that this query is one that will simply have to run for a decent amount of time. I'm having trouble figuring out where this exception is occurring though. Is this a timeout that's created at the database server or is it happening in my progra... | [
0.2464386373758316,
-0.11284414678812027,
0.7684967517852783,
0.22755204141139984,
0.16196706891059875,
-0.16991029679775238,
0.5900388360023499,
0.00526130897924304,
-0.24746151268482208,
-0.7680789232254028,
-0.0053293704986572266,
0.3895137906074524,
0.10504355281591415,
0.2108374387025... | |
to do is set the property on the DataContext before you execute your query. | [
0.16376963257789612,
0.13005496561527252,
0.08139395713806152,
0.12463847547769547,
0.24198956787586212,
-0.38597074151039124,
0.031000778079032898,
-0.40058860182762146,
0.062143970280885696,
-0.70029217004776,
-0.17581729590892792,
0.5424713492393494,
0.055567797273397446,
0.102661520242... | |
> **Duplicate:** [What’s the canonical way to check for type in python?](https://stackoverflow.com/questions/152580/whats-the-canonical-way-to-check-for-type-in-python)
How do I check for type equality in IronPython?
I need the equivalent of the following C# code in IronPython:
```
if (x.GetType() == typeof(xType))
... | [
0.4777931869029999,
0.3437766432762146,
0.2776528000831604,
-0.1646099090576172,
-0.18898417055606842,
-0.13684123754501343,
0.3560318648815155,
-0.4105321168899536,
-0.011977110058069229,
-0.5799182653427124,
0.05737895146012306,
0.5948632955551147,
-0.4537537097930908,
-0.203135445713996... | |
The pragmatists have won the argument of surrogate vs. natural primary keys in favor of surrogate keys\*. In my own work I always use SQL Server identity columns without a second thought. But it occurs to me that, for a table to be in 1st normal form, I should be able to identify a natural key and enforce it with a uni... | [
-0.13794051110744476,
0.17887558043003082,
0.36325281858444214,
0.22661887109279633,
0.006734984461218119,
-0.17710576951503754,
0.08709558099508286,
-0.12103251367807388,
-0.28982698917388916,
-0.3557915687561035,
-0.05504585802555084,
0.4121864438056946,
-0.4057261049747467,
0.1344110965... | |
constraint on a natural key in order to be in 1NF?
\*I think Joe Celko is still fighting the good fight, see the [last paragraph](http://www.intelligententerprise.com/channels/business_intelligence/showArticle.jhtml;jsessionid=3O5G0FAW0VNDGQSNDLOSKHSCJUNN2JVN?articleID=201806814&pgno=2).
Edited to add:
Thanks for the... | [
-0.014627084136009216,
0.13697615265846252,
0.22183464467525482,
0.10985764116048813,
-0.15446940064430237,
0.16239947080612183,
0.28552088141441345,
-0.3547085225582123,
-0.21214093267917633,
-0.3300255239009857,
-0.21218392252922058,
0.645776629447937,
-0.3475779891014099,
-0.04379835352... | |
is pathetic or ludicrous or a travesty, depending on your viewpoint. | [
0.4636663794517517,
0.06535466015338898,
-0.29372814297676086,
0.3436582684516907,
0.3453817069530487,
0.2623760998249054,
0.3694457709789276,
0.439450740814209,
0.10910108685493469,
-0.3550354540348053,
0.01101372018456459,
0.23775237798690796,
-0.08381263166666031,
0.1074179857969284,
... | |
Apologies if this has been asked before. Had a quick search and there's nothing that answers my question 100%.
I've got some XSL stored in the database which I want the user to be able to edit within my .NET Windows application. I could just stick it into a multi-line textbox but then I don't get anything like auto-in... | [
0.38397854566574097,
0.36644789576530457,
0.14962133765220642,
0.2050376683473587,
-0.3020644783973694,
-0.2411363422870636,
0.5071746110916138,
0.11936872452497482,
-0.10276740044355392,
-0.3644312918186188,
0.03209107741713524,
0.3261329233646393,
-0.03142674267292023,
0.2840743362903595... | |
the bare minimum, I'd like it to have the text indent nicely. I'm not too worried about the validation of the XSL/XML itself - I can sort that myself. Any ideas?
> Why doesn't C# support static method
> variables?
>
>
> Q: In C++, it's possible to write a
> static method variable, and have a
> variable that can on... | [
0.27590617537498474,
0.022399036213755608,
0.4073609709739685,
0.025920284911990166,
-0.27704355120658875,
-0.3218872547149658,
0.18640771508216858,
-0.06302599608898163,
0.035867251455783844,
-0.567585289478302,
0.028768904507160187,
0.7068021893501282,
-0.32207348942756653,
-0.2860669493... | |
effect by having a
> class-level static, and adding method
> statics would require increased
> complexity.
>
>
> Second, method level statics are
> somewhat notorious for causing
> problems when code is called
> repeatedly or from multiple threads,
> and since the definitions are in the
> methods, it's harder... | [
-0.1040470078587532,
-0.13056862354278564,
0.2632370591163635,
-0.18512271344661713,
-0.32762661576271057,
-0.08321591466665268,
0.4929383397102356,
0.013846755027770996,
-0.5139940977096558,
-0.5599095225334167,
-0.052759718149900436,
0.06654061377048492,
-0.488162100315094,
0.40878418087... | |
Visual Studio is erroring trying to open a simple class with the error "The designer inspected the following classes in the file: InstallerSupport --- The base class 'Microsoft.ManagementConsole.SnapInInstaller' could not be loaded"
I've got the assembly referenced and the project builds just fine. I also get errors t... | [
0.5365627408027649,
0.08217393606901169,
0.08519182354211807,
-0.1343887448310852,
-0.2254335582256317,
-0.21479997038841248,
0.4957749545574188,
0.022142628207802773,
-0.19485680758953094,
-0.4598797559738159,
-0.09078194200992584,
0.9958932995796204,
-0.2452148050069809,
-0.1485185623168... | |
arithmetics (which generally is true). So the best approach here is either to use a wider type than `int` (e.g. `Number`), or pass some flag (`Boolean` value) to function, as well as `int`, to indicate actual value absence. Choice should depend on whether you want to emphasize the importance of fact that passed value i... | [
-0.18877224624156952,
-0.25270983576774597,
-0.07645593583583832,
-0.03114844672381878,
-0.3278977572917938,
0.06616455316543579,
0.19596952199935913,
-0.19514231383800507,
-0.1955757588148117,
-0.24414698779582977,
-0.1285228580236435,
0.5355082750320435,
-0.18290592730045319,
-0.33506104... | |
value for myVar */
}
else
{
/* Use the supplied value for myVar */
}
}
```
That is both more technically accurate and it is also more stable. It will also allow you to strongly type at compile-time and would not cause weird bugs as in case of using `Object`.
Note that this will not work with ... | [
0.010568132624030113,
0.07441998273134232,
0.15079651772975922,
-0.08290677517652512,
-0.2994431257247925,
0.14662587642669678,
0.18090568482875824,
-0.18462827801704407,
-0.0009704941767267883,
-0.6243441700935364,
0.4152058959007263,
0.5328285694122314,
0.006328557152301073,
0.1942358314... | |
If you're worried about performance - don't be. Using `Number` instead of `int` or `uint` is generally OK.
---
**UPD:** If you want to explicitly mark that argument should be integral just use additional flag and exact type - it would be much clearer.
```
function setMyValue (isIntValueSupplied : Boolean = false, in... | [
-0.02522183768451214,
-0.27635252475738525,
0.5164849758148193,
-0.19173723459243774,
0.14158807694911957,
-0.24446001648902893,
0.27785709500312805,
-0.47963017225265503,
0.0641959086060524,
-0.4709324240684509,
-0.04757749289274216,
1.0914690494537354,
-0.2243691384792328,
-0.40345776081... | |
/* Use the supplied value for intValue */
}
}
```
---
Another option is to define your own type with additional value, e.g. `MaybeInt`, which holds integer value and a flag (whether it was actually initialized or not). That way you would clearly signal that value should be integral or *no-value*. However, this a... | [
0.1700422763824463,
-0.27922990918159485,
-0.018418310210108757,
0.008989447727799416,
-0.19359873235225677,
-0.22885656356811523,
-0.1138651967048645,
-0.2159457504749298,
0.0311325304210186,
-0.42450255155563354,
-0.06327672302722931,
0.4871613681316376,
-0.27174603939056396,
-0.13603296... | |
I want svn update to overwrite my local file with the files from the server, even if my local files have modifications, I want to throw them away and use the version that's on the remote repository.
How do I do that? I tried `svn update --force` but it doesn't work.
### Update:
Thanks for the answers, so I'm using r... | [
0.438259482383728,
0.13583312928676605,
0.49860450625419617,
0.10852353274822235,
-0.11603503674268723,
-0.15660978853702545,
0.48997780680656433,
0.05701752007007599,
0.03669828549027443,
-0.682854413986206,
0.009959587827324867,
0.9540429711341858,
-0.42965415120124817,
0.289244115352630... | |
the files in your working copy to their original state. For more information and examples check the svn book here:
<http://svnbook.red-bean.com/en/1.1/re25.html> | [
0.21607518196105957,
-0.07456724345684052,
0.47046393156051636,
0.051118217408657074,
0.028032345697283745,
-0.435943067073822,
0.1968538761138916,
-0.07762573659420013,
-0.669100284576416,
-0.6577113270759583,
-0.5859564542770386,
0.42905354499816895,
-0.060095179826021194,
0.040438286960... | |
**Background:**
This is really a general best-practices question, but some background about the specific situation might be helpful:
We are developing a "connected" application for the iPhone. It will communicate with the backend application via REST services. In order to not have to prompt the user for a username an... | [
0.29471808671951294,
0.19619418680667877,
0.3473062217235565,
0.1810135692358017,
0.3387812674045563,
-0.03375884145498276,
0.33931705355644226,
0.07209866493940353,
-0.11696209758520126,
-0.2986777722835541,
-0.3633827865123749,
0.29603880643844604,
0.1317983865737915,
-0.1644184291362762... | |
re-authenticate with their username/password.
**The Question:**
What are the best practices for generating this sort of token to be used for authentication?
For example, we could...
* Hash (SHA-256, etc) a random string and store it in the database for the given user along with an expiration date. Do a simple looku... | [
0.27706101536750793,
0.08300316333770752,
0.4715292155742645,
0.09153641015291214,
0.009707430377602577,
-0.1372671276330948,
0.7288362383842468,
-0.4330861568450928,
-0.24057799577713013,
-0.25738590955734253,
-0.2522333562374115,
0.23645669221878052,
-0.01694425381720066,
0.3958200812339... | |
other answers to this question, additional research, and offline discussions, here is what we ended up doing...
It was pointed out pretty quickly that the interaction model here is essentially exactly the same as the model used by Forms Authentication in ASP.NET when a "remember me" checkbox is checked. It's just not ... | [
0.2675960063934326,
-0.28411665558815,
0.6155543923377991,
0.4495302736759186,
0.10702044516801834,
-0.5640131831169128,
0.06259672343730927,
-0.2140861451625824,
-0.19236725568771362,
-0.7966892123222351,
0.10024912655353546,
0.2008620798587799,
-0.21286115050315857,
0.018329229205846786,... | |
fill the userData array with the information we need for subsequent requests
userData[0] = ...; // data we need
userData[1] = ...; // other data, etc
// create a Forms Auth ticket with the username and the user data.
FormsAuthenticationTicket formsTicket = new FormsAuthenticationTicket(
1,
username,
DateT... | [
0.13835075497627258,
-0.24450767040252686,
0.9189797043800354,
0.3784175515174866,
0.05696430429816246,
-0.14582780003547668,
0.25999757647514343,
-0.53561931848526,
-0.0731748715043068,
-0.9295485615730286,
-0.09917931258678436,
0.2430265247821808,
-0.31705746054649353,
-0.026130480691790... | |
for the request. Developers put this operation behavior attribute on operations that require authentication. Here is how that code parses the ticket:
```
// get the Forms Auth ticket object back from the encrypted Ticket
FormsAuthenticationTicket formsTicket = FormsAuthentication.Decrypt(encryptedTicket);
// split th... | [
-0.02009986899793148,
-0.30201438069343567,
0.6345713138580322,
0.30822595953941345,
0.005621973425149918,
-0.055353034287691116,
0.2543681263923645,
-0.6769302487373352,
-0.03137010335922241,
-0.6742451190948486,
-0.10213499516248703,
0.5582773089408875,
-0.2409297078847885,
-0.1258508563... | |
I'm not new to VB6 programming, but I'm not a master at it either. Hopefully someone can help me out with a question that I have concerning a Type Mismatch error that I'm receiving from trying to set an int variable with a int returned from a function.
The integer that I'm trying to set is defined as:
```
Global AICR... | [
0.05084841698408127,
0.033108483999967575,
0.4575023949146271,
-0.1342872977256775,
0.0747501328587532,
0.16417954862117767,
0.3355503976345062,
0.04012535139918327,
-0.28269609808921814,
-0.3520996570587158,
0.09869766980409622,
0.7166948914527893,
-0.3940051198005676,
0.1242353618144989,... | |
to be made to the AICROSSDOCKStatus it fails.
On a side note, I've also tried doing a CInt() to the ProcessQuery with the same result.
Does anyone have any suggestions for what I may be able to try?
Edit:
Here is the definition of ProcessQuery
```
Function ProcessQuery(icode As Integer, pb As ADODB.Recordset, Table... | [
0.009380459785461426,
0.24937038123607635,
0.615682065486908,
-0.15164218842983246,
0.0977170467376709,
0.30292659997940063,
0.1315567046403885,
-0.17696553468704224,
-0.26187682151794434,
-0.6203868389129639,
0.14967291057109833,
0.5910611748695374,
-0.33713263273239136,
0.327038794755935... | |
As String, sql$) As Integer
''THIS IS THE ORIGINAL SQL CALL ROUTINE!
Dim STATUS As Integer
On Error GoTo ProcessSQLError
STATUS = 0
Select Case icode
Case BCLOSE
If pb.State 0 Then
pb.Close
End If
Set pb = Nothing
STATUS = 3
Case BOPEN
STATUS = 9 | [
0.1041509211063385,
-0.0586828738451004,
0.422675758600235,
-0.08817695826292038,
0.14703892171382904,
0.176194965839386,
0.3313745856285095,
-0.2490176409482956,
-0.3999491035938263,
0.13584311306476593,
-0.14824941754341125,
0.43136438727378845,
-0.5347860455513,
0.17356136441230774,
0... | |
Set pb = New ADODB.Recordset
Case BOPENRO
STATUS = 9
Set pb = New ADODB.Recordset
Case BGETEQUAL, BGETEQUAL + S_NOWAIT_LOCK, BGETGREATEROREQUAL, BGETGREATEROREQUAL + S_NOWAIT_LOCK
If pb.State 0 Then
pb.Close
''Set pb = Nothing
''Set pb = New ADODB.Rec... | [
0.015329458750784397,
-0.034746456891298294,
0.6963597536087036,
-0.05209173262119293,
0.16787965595722198,
0.17441821098327637,
0.2676624357700348,
-0.356614887714386,
-0.23278464376926422,
-0.1302231103181839,
-0.45426660776138306,
0.5000221729278564,
-0.33995145559310913,
0.039442624896... | |
End If
pb.Open sql$, MISCO_SQL_DB, adOpenDynamic, adLockOptimistic
If Not pb.EOF Then
pb.MoveFirst
Else
STATUS = 9
End If
Case BGET_LE, BGET_LE + S_NOWAIT_LOCK
If pb.State 0 Then | [
-0.08622388541698456,
0.03031773306429386,
0.6526798605918884,
-0.21418273448944092,
0.271759569644928,
0.2214713841676712,
0.17453859746456146,
-0.07785109430551529,
-0.29354071617126465,
-0.6137406826019287,
-0.47957131266593933,
0.12744565308094025,
-0.14770647883415222,
0.3636824488639... | |
pb.Close
End If
pb.Open sql$, MISCO_SQL_DB, adOpenDynamic, adLockOptimistic
If Not pb.BOF Then
pb.MoveLast
Else
STATUS = 9
End If
Case BGETFIRST, BGETFIRST + S_NOWAIT_LOCK
If pb.State | [
-0.19921743869781494,
0.11990181356668472,
0.8826635479927063,
-0.21676693856716156,
0.08095906674861908,
0.1576332002878189,
0.2945924401283264,
-0.15350931882858276,
-0.25627589225769043,
-0.5946564674377441,
-0.5318318009376526,
0.03944998234510422,
-0.07264579087495804,
0.6589218974113... | |
0 Then pb.Close
sql = "select * from " + TableName
If InStr(1, gblOrderBy, "ORDER BY") > 0 Then
sql = sql + gblOrderBy
Else
sql = sql + " ORDER BY " + gblOrderBy
End If
gblOrderBy = "" | [
-0.1312452256679535,
0.1612638384103775,
0.8173192739486694,
-0.4202720522880554,
-0.1760861575603485,
0.02067505195736885,
0.06532448530197144,
-0.3825189769268036,
-0.007852676324546337,
-0.35214781761169434,
-0.5558159947395325,
0.2967001795768738,
-0.28077325224876404,
0.33804041147232... | |
pb.Open sql$, MISCO_SQL_DB, adOpenDynamic, adLockOptimistic
If Not pb.EOF Then
pb.MoveFirst
End If
Case BGETLAST, BGETLAST + S_NOWAIT_LOCK | [
-0.1869923621416092,
0.07273628562688828,
0.6938514709472656,
-0.16213655471801758,
-0.03075738623738289,
0.03930920362472534,
0.08840959519147873,
-0.1154140904545784,
-0.18529333174228668,
-0.6326937675476074,
-0.5487573742866516,
-0.019414089620113373,
-0.2652941048145294,
0.44428521394... | |
If pb.State 0 Then
pb.Close
End If
sql = "select * from " + TableName
If InStr(1, gblOrderBy, "ORDER BY") > 0 Then
sql = sql + gblOrderBy
Else
sql = sql + " ORDER BY " + | [
-0.3042648434638977,
0.1211964339017868,
0.7997663021087646,
-0.335682213306427,
-0.03838808089494705,
0.1065928265452385,
0.15731386840343475,
-0.406449556350708,
-0.07989421486854553,
-0.5035378932952881,
-0.42820921540260315,
0.18098129332065582,
-0.22106200456619263,
0.4479958117008209... | |
gblOrderBy
End If
gblOrderBy = ""
pb.Open sql$, MISCO_SQL_DB, adOpenDynamic, adLockOptimistic
If Not pb.EOF Then
pb.MoveFirst
pb.MoveLast
End If
Case BGETNEXT, BGETNEXT + S_NOWAIT_LOCK: pb.MoveNext
Case | [
-0.2883700430393219,
0.0032800287008285522,
0.9106429815292358,
-0.1725572645664215,
0.052401669323444366,
-0.0018626569071784616,
0.18983711302280426,
-0.03859274834394455,
-0.21089044213294983,
-0.5626158118247986,
-0.6203259229660034,
0.2728154957294464,
-0.06535747647285461,
0.66119921... | |
BGETPREVIOUS, BGETPREVIOUS + S_NOWAIT_LOCK: pb.MovePrevious
Case B_UNLOCK
''need to add code here
Case BINSERT
If pb.State = 0 Then
pb.Open TableName, MISCO_SQL_DB, adOpenDynamic, adLockOptimistic
End If
Case BDELETE
STATUS = 8
pb.Delete
Case Else | [
0.004303195513784885,
0.15036775171756744,
0.4840540885925293,
-0.13373257219791412,
0.17210562527179718,
0.18121053278446198,
0.33785301446914673,
-0.32404449582099915,
-0.05258940905332565,
-0.5748285055160522,
-0.4533875286579132,
0.38017991185188293,
-0.2320786416530609,
0.466115742921... | |
STATUS = 1
MsgBox "STOP: UNDEFINDED PROCEDURE" + Str$(icode)
End Select
If STATUS = 0 Then
If pb.EOF Or pb.BOF Then STATUS = 9
End If
ProcessQuery1 = STATUS
Exit Function
ProcessSQLError:
MsgBox TableName + ": " + Error(Err), vbCritical, "Error "
ProcessQuery1 = 9
End Function
```
If that elemen... | [
-0.3318811357021332,
-0.06739987432956696,
0.8970249891281128,
-0.24242836236953735,
0.37804368138313293,
0.20532505214214325,
0.056743547320365906,
-0.28313955664634705,
-0.340109258890152,
-0.35546770691871643,
-0.45875200629234314,
0.18812249600887299,
-0.176458477973938,
0.107221215963... | |
the element’s height to `auto` (default value). | [
-0.043498214334249496,
-0.016417529433965683,
0.5575898289680481,
-0.13455486297607422,
0.23994925618171692,
-0.0026907045394182205,
0.330866277217865,
-0.2630206048488617,
0.028264520689845085,
-0.0926840528845787,
-0.3146358132362366,
0.7187228798866272,
0.05131711810827255,
-0.202968344... | |
Is it possible for a SQL CLR User-Defined Function to return the data type varbinary(MAX)?
In the documentation it mentions:
"The input parameters and the type returned from a scalar-valued function can be any of the scalar data types supported by SQL Server, except rowversion, text, ntext, image, timestamp, table, o... | [
0.15072156488895416,
-0.23805777728557587,
0.3431147038936615,
-0.02281741052865982,
-0.1884358823299408,
-0.14178605377674103,
-0.10466858744621277,
0.0788242369890213,
-0.31933295726776123,
-0.043940264731645584,
0.0959201529622078,
0.6954585313796997,
-0.3109782040119171,
0.031928762793... | |
it working in test now).
Thanks!
If you define it as returning a [SqlBytes](http://msdn.microsoft.com/en-us/library/system.data.sqltypes.sqlbytes.aspx) data type, this should correctly map to `varbinary(MAX)` in SQL Server.
```
[SqlFunction]
public static SqlBytes Function1()
{
return new SqlBytes(Encoding.UTF8.G... | [
0.020135339349508286,
-0.30882883071899414,
0.45081499218940735,
0.026524260640144348,
-0.031627804040908813,
-0.05253934487700462,
0.3959706425666809,
0.09069878607988358,
-0.12827463448047638,
-0.7139150500297546,
-0.10355168581008911,
0.4283689558506012,
-0.2015170007944107,
0.347539186... | |
Say I issue:
```
select date_field from table1;
```
date\_field is like '25.11.2009'
I will try to change the positions of date fields with the month and vice versa. (of course for days > 12 some manipulations)
```
TO_DATE( MOD(SUBSTR(TO_CHAR(a.A_DATE, 'DD.MM.YYYY'), 4, 2), 12) || '.' ||
SUBSTR(TO_CH... | [
0.07705459743738174,
0.06893675029277802,
0.8002316355705261,
-0.22210386395454407,
0.060563474893569946,
0.32772380113601685,
0.050915949046611786,
-0.07481527328491211,
-0.18447113037109375,
-0.23155656456947327,
-0.38366127014160156,
0.47397109866142273,
-0.054739031940698624,
0.2652338... | |
i.e. for 01.07.2009 --> I get 1 for date, not '01' as expected. Later on I cannot get the date.
Is there a shortcut solution to my problem?
yli> "I am somehow anonymising the date, actually Hire Date of employees, to be used in a test environment."
So here was your actual requirement. If you want to change some dates,... | [
0.3371093273162842,
-0.12255283445119858,
0.19098974764347076,
0.029237477108836174,
0.2066338062286377,
-0.027453888207674026,
-0.16857357323169708,
-0.059339042752981186,
-0.03664379566907883,
-0.14510464668273926,
-0.06749031692743301,
0.401234894990921,
-0.19984857738018036,
0.19653382... | |
We have a 2005 report that can be 2 to around 250 pages with the average being in the ballpark of 10. When the report was developed, our developer was told that 10 pages or so was the right number, and without knowing the business domain very well he decided reporting services was the correct approach.
Now that the re... | [
0.23082342743873596,
0.06506244838237762,
0.33990126848220825,
-0.038095586001873016,
-0.12670564651489258,
-0.17186956107616425,
0.05057371035218239,
-0.20565229654312134,
-0.36652839183807373,
-0.6368170976638794,
0.37799230217933655,
0.4140743613243103,
-0.07706193625926971,
-0.23772747... | |
what options do we have to use our current report that works 95% of the time and make it work for the remaining 5%? Are there configuration options anywhere to improve the rendering performance or anything like that?
> The report is used for return
> authorizations so the size of the
> returns can very. Each authori... | [
0.37643399834632874,
0.1057283952832222,
0.60181725025177,
0.3266794681549072,
-0.1361355036497116,
-0.19364237785339355,
0.2298329621553421,
-0.3643215596675873,
-0.16205556690692902,
-0.7345081567764282,
-0.19329141080379486,
0.4863757789134979,
-0.0828060731291771,
-0.2589817941188812,
... | |
timeout setting for each report in SSRS. By default, they are set to use the default system setting, but they can be customized through the report manager or SSMS.
Are you sure it isn't a database command timeout? That could be adjusted in the connection string. Is it the report that is inefficient or the query? 250 p... | [
0.1136145144701004,
-0.3019581735134125,
0.2444671243429184,
0.3815431594848633,
0.03933068364858627,
-0.2075861096382141,
0.1955609768629074,
0.009312908165156841,
-0.598293662071228,
-0.7407881617546082,
0.33878472447395325,
0.45331937074661255,
-0.2467256486415863,
-0.09613431990146637,... | |
We're beginning development of an in-house app in the iPhone Enterprise developer program. Since it's close to OS 3.0, we're reconsidering our original design of using SQLite and using Core Data instead. Here's some more info:
* There is a legacy desktop application that this is replacing. We will reuse the existing b... | [
0.29787638783454895,
0.2718322277069092,
0.2693609297275543,
0.17689825594425201,
0.40952035784721375,
-0.06463207304477692,
0.1519346982240677,
0.2014555037021637,
-0.24060995876789093,
-0.7265794277191162,
0.006699480582028627,
0.30923742055892944,
-0.08363000303506851,
-0.01351080182939... | |
We only update it if it has changed, which will be every month or two. We will most likely use XML or JSON to transfer the data.
* There are two developers on this project and we both have strong SQL skills but neither one has used Core Data.
My questions are: what is the benefit of Core Data over SQLite, what would t... | [
0.38194793462753296,
0.0656917467713356,
0.3420194983482361,
-0.0016418382292613387,
-0.19103240966796875,
0.018131963908672333,
0.04004605486989021,
-0.2777968943119049,
-0.2087724357843399,
-0.604310929775238,
0.1145111545920372,
0.5374748706817627,
-0.05808945745229721,
0.16273403167724... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.