text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
as you use the default table type.
However you also stated the database is 50GB in size, which suggests you may be looking for a database that will *reliably* store the information. Using the default table type MySQL is not a reliable database by any stretch of the imagination.
If you want a fast, free alternative t... | [
0.18371185660362244,
0.1661665290594101,
0.23878023028373718,
0.3289079964160919,
-0.306814968585968,
-0.39913684129714966,
0.18572284281253815,
0.2965455949306488,
-0.3982451856136322,
-0.7181405425071716,
-0.027434397488832474,
0.6245226263999939,
-0.16448107361793518,
0.2038746178150177... | |
it shares some of the same DBA guru requirements as Oracle, where as MS SQL can often be managed by a regular IT person, and MySQL doesn't need much management besides restoring the old backups everytime it decides to become corrupted and lose your data. | [
-0.10602907836437225,
0.05130183696746826,
-0.04011610150337219,
0.27734139561653137,
-0.24228417873382568,
-0.4047563076019287,
0.21859826147556305,
0.18405009806156158,
0.04749758169054985,
-0.08902692794799805,
-0.0787542313337326,
0.5130011439323425,
0.1064184233546257,
0.2776781320571... | |
Following SRP and KISS principle I designed an object with properties only, but I need methods to work with the objects. What is the best way to separate entity object data and entity set object methods?
Currently I created the following objects:
Pet Entity object
Attribute Name
Attribute Age
Pet Entity Set o... | [
0.18725532293319702,
0.10901215672492981,
0.7273039221763611,
0.06920620799064636,
-0.055357757955789566,
0.12232116609811783,
0.25778457522392273,
-0.5512766242027283,
-0.21555617451667786,
-0.5586026310920715,
0.2617596685886383,
0.5401504635810852,
-0.4904305338859558,
0.462419658899307... | |
should implement the methods that they need, that doesn't break SRP, but IMHO SRP is way over rated anyway. | [
-0.014242722652852535,
0.22923065721988678,
0.2494678795337677,
0.12920156121253967,
-0.06115174666047096,
-0.4485938549041748,
0.3389822542667389,
-0.3529222011566162,
-0.08822659403085709,
-0.25147882103919983,
0.11508999019861221,
0.5562388300895691,
-0.12547993659973145,
-0.22899129986... | |
I used something like
Dim i As String
i = Server.MapPath("~/photos/") + fileName
Only once in a project that was working and online, on the offline version, when I run it on my machine, its working, no errors, I uploaded it, it gave me an error like:
> '~/photos/<http://www>.**MyURL**.com/photos/4411568359267Pic003.... | [
0.27051565051078796,
-0.2115776538848877,
0.7658358216285706,
-0.0673752874135971,
-0.20890910923480988,
-0.20201227068901062,
0.5601878762245178,
0.1006958931684494,
-0.30739912390708923,
-0.6775522232055664,
0.31381756067276,
0.3169165551662445,
-0.428879976272583,
0.2015734612941742,
... | |
different script this time, the one that show formatting toolbar for the text areas
```
Line 8: new nicEditor({buttonList : ['fontSize','fontFamily','fontFormat','bold','italic','underline','strikethrough','forecolor','bgcolor','removeformat'], iconsPath : '../nicEdit/nicEditorIcons.gif'}).panelInstance('<%= txtDescr... | [
-0.3396885395050049,
-0.2972920835018158,
0.8252338171005249,
-0.09995172172784805,
-0.32726815342903137,
0.26787376403808594,
0.29184690117836,
-0.17415405809879303,
-0.18733926117420197,
-0.7893204092979431,
-0.16547232866287231,
0.6141833662986755,
-0.3718384802341461,
-0.02415133640170... | |
I need to stretch main div height to the view-port height and place the footer at the bottom of the screen. could anybody solve this?
```
body{text-align:center;}
#main{width:200px;margin:0px auto;background:#cccccc;}
#header{height:20px;background:#00FFFF;}
#content{height:80px;background:#cccccc;}
#footer{background... | [
0.1634063720703125,
-0.13621094822883606,
0.5125895738601685,
0.003985993564128876,
0.18464894592761993,
0.14797505736351013,
0.10429254174232483,
-0.3735778033733368,
-0.04893897846341133,
-1.0142899751663208,
0.026897385716438293,
0.3037685453891754,
0.2177259922027588,
0.215256020426750... | |
I have a class in an external library subclassing UserControl and set to public. Now I want to use this usercontrol in my main WinForms app. I have added this external library to the references of the main app, but the user control haven't appeard in the Toolbox - I have been told it should appear.
I am doing this for... | [
0.2897379696369171,
0.03148488700389862,
0.24703778326511383,
0.15273618698120117,
-0.027888240292668343,
-0.48748156428337097,
0.313966304063797,
0.19522716104984283,
0.019192133098840714,
-0.7846135497093201,
-0.3205198645591736,
0.5893375277519226,
-0.048319261521101,
0.2626895010471344... | |
dialog that pops up (might take a few seconds for it to show)
4. Navigate to the external library, select the file and click Open.
All public controls from that library are now available for selection. | [
0.027387311682105064,
-0.08866235613822937,
0.6654722690582275,
0.40953928232192993,
0.3699200749397278,
-0.061260972172021866,
0.19669334590435028,
-0.031228728592395782,
-0.18750153481960297,
-0.5885637402534485,
-0.40872135758399963,
0.5678828954696655,
-0.3412024974822998,
0.0603750497... | |
I want to get the various user account passwords which are stored in my computer programatically using Visual C++. Are there any APIs to help me do this?
There is no way to retrieve windows passwords nor passwords to most other programs via Win32 APIs.
For Windows passwords you typically have to ask the user to enter ... | [
0.5872519016265869,
0.24380306899547577,
0.10056626051664352,
0.08987275511026382,
0.26226821541786194,
0.07468091696500778,
0.403631329536438,
0.10379794239997864,
-0.04418894276022911,
-0.7006325721740723,
-0.007143802009522915,
0.6385930776596069,
-0.015375364571809769,
0.16947443783283... | |
I'm trying to fade the background-color of a span tag using JQuery to emphasize when a change has occured. I was thinking the code would be someting like the following inside the click handler, but I can't seem to get it working. Can you show me where I went wrong?
Thanks Russ.
```
$("span").fadeOut("slow").css("backg... | [
0.32239603996276855,
0.07271208614110947,
0.5511634945869446,
-0.050560157746076584,
0.06479835510253906,
-0.057562004774808884,
0.33162248134613037,
0.19022095203399658,
-0.24662654101848602,
-0.4535592794418335,
-0.09916451573371887,
0.5671882629394531,
-0.1637406200170517,
0.08977421373... | |
need to check out the jQuery color plugin:
~~<http://plugins.jquery.com/project/color>~~
<https://github.com/jquery/jquery-color/>
And here's another helpful section of the jQuery docs site:
<http://docs.jquery.com/Release:jQuery_1.2/Effects#Color_Animations>
I've never actually done this so I won't try to give y... | [
0.4213278591632843,
-0.2004232257604599,
0.18271853029727936,
0.23100519180297852,
0.10652440041303635,
-0.059134528040885925,
-0.07211830466985703,
0.1888924092054367,
-0.29021382331848145,
-0.7214582562446594,
-0.00019614775374066085,
0.6682478189468384,
0.14298291504383087,
-0.043680809... | |
I'm compiling newlib for a bespoke PowerPC platform with no OS. Reading information on the net I realise I need to implement stub functions in a `<newplatform>` subdirectory of libgloss.
My confusion is to how this is going to be picked up when I compile newlib. Is it the last part of the `--target` argument to config... | [
0.3036389946937561,
0.376173734664917,
0.28211337327957153,
-0.21677915751934052,
-0.3797333538532257,
-0.37346380949020386,
-0.001403903472237289,
0.03606324642896652,
-0.005735555663704872,
-0.816782534122467,
0.1863877773284912,
0.7202062606811523,
-0.41707655787467957,
0.24840383231639... | |
gas and libbfd was most of the work).
Just had to tweak some files about floating point numbers, turn off some POSIX/SomeOtherStandard flags that made it not use some more sophisticated functions and write support code for `longjmp` / `setjmp` that load and store register state into the jump buffers. But you certainl... | [
0.2292003035545349,
0.20502981543540955,
0.2254980057477951,
0.020050760358572006,
0.1737588346004486,
-0.10404200851917267,
0.1652418076992035,
-0.20961640775203705,
-0.038606755435466766,
-0.512279212474823,
-0.12945149838924408,
0.7269570827484131,
-0.29597678780555725,
-0.0665891319513... | |
had to edit a file called `configure.host` too, which sets some options for your target (for example, whether an operation systems handles signals risen by `raise`, or whether newlib itself should simulate handling).
I used [this blog](http://spindazzle.org/ggx/) of Anthony Green as a guideline, where he describes po... | [
0.37330925464630127,
-0.06880752742290497,
-0.13802222907543182,
0.04166195169091225,
-0.18835680186748505,
-0.11285313963890076,
0.20805421471595764,
-0.11782591789960861,
0.0795251727104187,
-0.2801433205604553,
0.19138136506080627,
0.7099109292030334,
-0.05398479849100113,
-0.1368956118... | |
think the amount of work is certainly manageable. The one that made me nearly crazy was `libgloss`'s build scripts. I certainly was lost in those autoconf magics :) Anyway, i wish you good luck! :) | [
0.4354787766933441,
0.5604565143585205,
0.3851728141307831,
0.1514429897069931,
0.21700604259967804,
-0.37127938866615295,
0.42670226097106934,
0.7621736526489258,
-0.13536939024925232,
-0.4365026652812958,
0.17112894356250763,
0.4846024215221405,
0.21402020752429962,
0.07740285992622375,
... | |
My end result is that I want to launch another setup project after the first setup project closes. The problem is that since setup.exe is just a wrapper for the MSI package, WaitForExit is quitting when the setup.exe is finished and not foo.msi.
```
Using Process As New System.Diagnostics.Process
Process.StartIn... | [
0.7441310882568359,
0.20198865234851837,
0.49271851778030396,
-0.20280508697032928,
0.14088857173919678,
-0.41871681809425354,
0.24201497435569763,
0.04798799380660057,
-0.17698827385902405,
-0.5581499934196472,
-0.3557979464530945,
0.7708006501197815,
-0.19650597870349884,
0.4315814673900... | |
see if I can get the results that I want.
Our company decided to go with InstallAware Studio Edition. It was able to run setups after the installation was completely finished and everything else that I could possibly need. | [
0.9049193859100342,
-0.05681333690881729,
0.12119762599468231,
-0.08359435200691223,
0.09617055207490921,
-0.1935131698846817,
0.2217951864004135,
0.24033823609352112,
0.11714387685060501,
-0.7012744545936584,
-0.044477131217718124,
0.8329265117645264,
-0.015719987452030182,
-0.12300068140... | |
> **Possible Duplicate:**
>
> [When should you use 'friend' in C++?](https://stackoverflow.com/questions/17434/when-should-you-use-friend-in-c)
I see a lot of people recommending a function/class to be made a friend of another class here in SO though there are other alternatives. Shouldn't friend be sparingly used ... | [
-0.017023559659719467,
0.10481072217226028,
-0.0977059081196785,
-0.12849335372447968,
-0.040083400905132294,
0.18628181517124176,
0.3214583396911621,
0.2532382011413574,
-0.3669286370277405,
-0.7014504671096802,
-0.01893043890595436,
0.6699883341789246,
-0.19139523804187775,
-0.1272432804... | |
decision which solution is better isn't that clean-cut after all.
Personally, I prefer to avoid it when possible but I prefer to use it over method duplication: for example, I do not like to write a `print` method just to avoid making `operator <<` a `friend` because I don't see the benefit of the duplicate method. | [
0.06457775086164474,
0.05807311832904816,
-0.006358111742883921,
-0.03662138432264328,
0.11302202939987183,
-0.0336170420050621,
0.14012135565280914,
0.18974250555038452,
-0.1249944344162941,
-0.7589518427848816,
-0.008703903295099735,
0.4037551283836365,
-0.07891465723514557,
-0.028771232... | |
When drawing an Arc in 2D, using a Bezier Curve approximation, how does one calculate the two control points given that you have a center point of a circle, a start and end angle and a radius?
This isn't easily explained in a StackOverflow post, particularly since proving it to you will involve a number of detailed ste... | [
0.3622160851955414,
-0.16330978274345398,
0.28287962079048157,
-0.259184867143631,
-0.4239270091056824,
0.035295773297548294,
-0.17670774459838867,
-0.4115537106990814,
0.04358246549963951,
-0.5646673440933228,
0.19490772485733032,
0.5055308938026428,
-0.16953182220458984,
0.05144056305289... | |
Does C# allows partial interface? i.e., in ManagerFactory1.cs class, I have
```
public partial interface IManagerFactory
{
// Get Methods
ITescoManager GetTescoManager();
ITescoManager GetTescoManager(INHibernateSession session);
}
```
and in ManagerFactory.cs class, I have:
```
public partial interfac... | [
-0.5091580748558044,
-0.12552742660045624,
0.46868234872817993,
-0.1974576860666275,
-0.06657227873802185,
0.23516014218330383,
0.5056025981903076,
-0.26784175634384155,
0.007613583002239466,
-0.8391462564468384,
-0.27483683824539185,
0.4545243978500366,
-0.3936181366443634,
0.049571331590... | |
allowed.
Valid locations for the `partial` modifier (with C# 3.0 spec references):
* Classes (10.1.2)
* Structs (11.1.2)
* Interfaces (13.1.2)
* Methods (C# 3.0+) (10.2.7; 10.6.8)
Section 10.2 of the spec contains most of the general details for partial types.
Invalid locations:
* Enums
* Delegates | [
0.5236155986785889,
0.10383163392543793,
0.48613056540489197,
0.2859862744808197,
0.168900728225708,
-0.23313620686531067,
0.17131094634532928,
-0.281057745218277,
-0.13634519279003143,
-0.42649778723716736,
-0.5341112613677979,
0.19602151215076447,
-0.1841762512922287,
0.22087226808071136... | |
My program is written in C# NET 2.0,it's using external functions from a dll written in C++ using Microsoft Visual Studio 2008 SP1.
If I remove the dll from the directory the program is placed,the program crashes at the moment it should use the dll.That's normal.
But the users that are using my program get the same er... | [
0.16810600459575653,
0.3236751854419708,
0.18095065653324127,
-0.019023731350898743,
0.16842855513095856,
-0.23892168700695038,
0.4784928858280182,
0.08499899506568909,
-0.20905214548110962,
-0.5544795989990234,
0.0025693827774375677,
0.49140289425849915,
-0.3688473105430603,
0.28457883000... | |
fine.
[>>new thread<<](https://stackoverflow.com/questions/735346/cannot-load-c-dll-in-c)
Its most likely the wrong runtime. Make sure you are distributing the correct one. These will always work on your dev box because the runtimes are in the path. For testing software, I use a windows xp virtual machine. I set up th... | [
0.8535577654838562,
-0.05650745704770088,
0.3642304539680481,
0.22255361080169678,
0.1349952220916748,
-0.6591038107872009,
0.5614027976989746,
-0.14797940850257874,
-0.5264908671379089,
-0.7484549283981323,
-0.18458862602710724,
0.9643121957778931,
-0.10594990104436874,
0.0480409823358058... | |
The application handles users and objects, users rate objects with 3 features (one rate per feature).
**EDIT**: the last sentence is unclear : by features I mean criterias shared by all the objects
How efficiently design a database for such a system ?
What are the best-practices for designing a database dealing with... | [
0.009809795767068863,
0.2871864140033722,
0.3726615607738495,
0.23037222027778625,
-0.156274676322937,
0.37735316157341003,
0.30968114733695984,
-0.3741132318973541,
-0.2569665312767029,
-0.6453329920768738,
0.15377332270145416,
0.5920760035514832,
-0.07916020601987839,
-0.0785112455487251... | |
ratings that would track the user, the product, and three columns (one for each feature)
So you have your Users table, an Objects table, and your Ratings table which has the UserID and ObjectID as a combined primary key, that way you enforce the one rating per object per user standard. | [
0.20876576006412506,
-0.2995479106903076,
0.7607720494270325,
0.5253890752792358,
-0.15998531877994537,
0.13861645758152008,
-0.17878100275993347,
-0.5223245024681091,
-0.005928955506533384,
-0.5265108942985535,
0.18614298105239868,
0.5314420461654663,
-0.07995005697011948,
0.1974178999662... | |
> **HTML**
```
<div id="header">top of page</div>
<div class="message">hello, how are you</div>
<div class="message">I am fine</div>
```
> **jquery**
```
$(document).ready(function () {
$("#header").append('<div class="message">appended DIV</div>');
$('div.message').hover(
function () {
... | [
0.5231865048408508,
-0.19549788534641266,
0.970958948135376,
-0.10116911679506302,
-0.03278111666440964,
-0.1271415650844574,
0.4011521637439728,
-0.523868978023529,
-0.4621955454349518,
-0.7770249843597412,
-0.20437787473201752,
0.3719492554664612,
-0.3710620403289795,
-0.2848477661609649... | |
and hence alert, but the appended DIV will not and is 'dead.' How can the appended DIV react like the existing ones?
> **edit: in summary this was the solution:**
```
$('<span />').addClass('message').text('(mouse 1)').appendTo('#header');
$('<span />').addClass('message').text('(mouse 2)').appendTo('#header');
$('.... | [
0.14890556037425995,
-0.3542475402355194,
0.8829023838043213,
-0.2559944689273834,
-0.1740170568227768,
0.08143207430839539,
0.05036139860749245,
-0.433834969997406,
-0.2200121134519577,
-0.42932772636413574,
-0.31365126371383667,
0.708716094493866,
-0.6422660946846008,
-0.2874266803264618... | |
expect to hover over has no text.
Try:
```
$('<div />').addClass('message').text('appended DIV').appendTo('#header');
```
You will now see the text inside a new `div` with the `message` class attached. | [
0.44215357303619385,
-0.3130801022052765,
0.419239342212677,
-0.1876610964536667,
0.0418928824365139,
0.055664997547864914,
0.06837243586778641,
0.024118004366755486,
0.34564828872680664,
-0.6317146420478821,
-0.31876516342163086,
0.9990546107292175,
-0.2543293237686157,
-0.504504501819610... | |
Hope you can help. Trying to hide all < li > tags greater than the third tag in an < ul >. What's happening however is that after the first 3 < li > tags, ALL subsequent < li > regardles of :gt(2) are hidden in all subsequent < ul >.
Here's my HTML structure.
* LIST TITLE
+ item 1
+ item 2
+ item 3
+ should be h... | [
0.2578502297401428,
0.07045242190361023,
0.40654686093330383,
-0.06325559318065643,
-0.08862920105457306,
0.09602829068899155,
0.385794997215271,
-0.012290417216718197,
-0.1426791250705719,
-0.8923277854919434,
0.05642571300268173,
0.3282361924648285,
-0.17516814172267914,
-0.2685928940773... | |
li ul li:gt(2)").each(function () {
$(this).hide();
});
```
If you need more info let me know.
Thanks!
Try something like this:
```
var counter;
$("ul").each(function() {
counter = 1;
$(this).children("li").each(function() {
if (counter > 3) $(this).hide()
counter++;
});
});
``` | [
-0.10495546460151672,
-0.16911375522613525,
0.6517741084098816,
-0.2757238447666168,
-0.08013907074928284,
0.23457130789756775,
0.35487622022628784,
-0.4089219868183136,
0.03312508761882782,
-0.667820155620575,
-0.3926929235458374,
0.8017560243606567,
-0.6287575364112854,
0.107306294143199... | |
I am planning to write a code library to access some hardware at a low-level (i.e. flipping register bits and such).
Previously, I wrote everything as C functions and used extern "C" to make the library compile for both C and C++ code. So, both C and C++ users merely had to include the header file and call the functi... | [
0.535055935382843,
-0.02751380018889904,
-0.1819688081741333,
0.12349402904510498,
-0.31037554144859314,
0.18729907274246216,
-0.1224718764424324,
-0.11471289396286011,
-0.075318843126297,
-0.5320550203323364,
-0.1170247346162796,
0.41439229249954224,
-0.433608740568161,
0.0884347110986709... | |
can't extern "C" an entire class.
One thing that I was thinking of: write everything in standard C functions escaped with extern "C". Then, provide a wrapper class for C++, that has a bunch of inline methods that call these 'C' functions.
```
int foo_bar (int *address, int data) {...} // extern C stuff
int foo::bar ... | [
0.40334922075271606,
-0.010129162110388279,
0.440276175737381,
0.08085158467292786,
0.07564355432987213,
-0.2443588376045227,
0.37972474098205566,
-0.16658633947372437,
0.04006791487336159,
-0.47187384963035583,
-0.30800318717956543,
0.6459922194480896,
-0.582550048828125,
0.12610588967800... | |
in mind beyond just creating busywork for yourself. The C++ should be easier to work with than the C, or you're not gaining anything. | [
0.27276092767715454,
-0.11250191181898117,
-0.06445968896150589,
0.11405469477176666,
0.034101229161024094,
-0.1370885670185089,
-0.178540900349617,
0.2789713144302368,
-0.37234851717948914,
-0.620885968208313,
0.058458756655454636,
0.7400689721107483,
-0.09388033300638199,
-0.218103826045... | |
I am having trouble with Html.ActionLink when I have a route that takes more than one parameter. For example, given the following routes defined in my Global.asax file:
```
routes.MapRoute(
"Default", // Route name
"{controller}.mvc/{action}/{id}", | [
-0.1676720231771469,
-0.2452852576971054,
0.5492202639579773,
-0.2780713140964508,
-0.10794062167406082,
-0.09228003025054932,
0.24932098388671875,
0.013017301447689533,
-0.4863412380218506,
-0.9501941800117493,
0.14370819926261902,
0.23241302371025085,
-0.44842106103897095,
0.043423984199... | |
// URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
routes.MapRoute(
"Tagging",
"{controller}.mvc/{action}/{tags}",
new { controller = "Products", action = "Index", tags = "" }
);
routes.MapRoute(
"SlugsAfterId",
"{controller}.mvc/{action}/{i... | [
0.05500657856464386,
-0.18548835813999176,
0.8407034873962402,
-0.05434563383460045,
0.11257248371839523,
0.03582950308918953,
0.0396735742688179,
-0.08132527023553848,
-0.2279142290353775,
-0.9269157648086548,
-0.22676435112953186,
0.2808534502983093,
-0.32519784569740295,
0.4169822335243... | |
third route using:
```
<%= Html.ActionLink(Html.Encode(product.Name), "Details", new { id = product.ProductId, slug = Html.Encode(product.Name) }) %>
```
I end up with a URL like **[site-root]/Details/1?slug=url-slug** whereas I would like the URL to be more like **[site-root]/Details/1/url-slug**
Can anyone see wh... | [
-0.0516161285340786,
-0.22093859314918518,
0.5007135272026062,
-0.12962067127227783,
-0.13925975561141968,
0.037598732858896255,
0.24024029076099396,
-0.2881527841091156,
-0.22159963846206665,
-0.5091944932937622,
-0.05396551266312599,
0.46641603112220764,
-0.3886973559856415,
0.0049734832... | |
`slug` parameter. | [
-0.08798083662986755,
0.10154134035110474,
0.09537263959646225,
-0.059638895094394684,
-0.06389490514993668,
0.13341601192951202,
-0.41699597239494324,
-0.13051940500736237,
-0.22464118897914886,
-0.3146969676017761,
0.21885664761066437,
0.574194610118866,
-0.1460900604724884,
0.3797046840... | |
I am trying to create a WHERE clause that says
```
WHERE column_1 = TRIM(LEADING '20' FROM(DATEPART(year, GETDATE())))
```
Basically `column_1` contains the fiscal year but the fiscal year is in the database as 8 or 9 not 2008 or 2009.
So I need to figure a way to trim off at least the `'20'` so that the query wil... | [
0.06150791049003601,
-0.07961232215166092,
0.5506033301353455,
0.059745293110609055,
0.03655479848384857,
0.14928244054317474,
0.2868904769420624,
-0.08362700045108795,
-0.24717599153518677,
-0.4931395351886749,
-0.29072457551956177,
0.20693178474903107,
0.09373566508293152,
0.104445330798... | |
answer
print datepart(year,getdate()) % 100 | [
0.12446559220552444,
0.19514359533786774,
0.6293146014213562,
0.11659321188926697,
0.16741150617599487,
0.420804888010025,
0.25535234808921814,
-0.15086489915847778,
0.20099471509456635,
-0.13564148545265198,
-0.4838157594203949,
-0.33761370182037354,
0.13566361367702484,
0.130927100777626... | |
I'm trying to use gluOrtho2D with glutBitmapCharacter so that I can render text on the screen as well as my 3D objects. However, when I use glOrtho2D, my 3D objects dissapear; I assume this is because I'm not setting the projection back to the OpenGL/GLUT default, but I'm not really sure what that is.
Anyway, this is... | [
-0.22638367116451263,
-0.2676405608654022,
1.0053843259811401,
-0.31056681275367737,
-0.2554219365119934,
0.28476929664611816,
0.12721103429794312,
0.08060873299837112,
0.05790995806455612,
-0.7801620960235596,
-0.19688476622104645,
0.7803908586502075,
-0.32445254921913147,
0.3810389637947... | |
glLoadIdentity();
glDisable(GL_TEXTURE);
glDisable(GL_TEXTURE_2D);
glRasterPos2f(point.X, point.Y);
for (string::iterator i = s.begin(); i != s.end(); ++i)
{
glutBitmapCharacter(font, *i);
}
glEnable(GL_TEXTURE);
glEnable(GL_TEXTURE_2D);
glMatrixMode(GL_MODELVIEW);
gl... | [
-0.2851352095603943,
-0.33201026916503906,
1.0719101428985596,
-0.311301589012146,
-0.1594076007604599,
0.41346868872642517,
-0.10989173501729965,
-0.28391847014427185,
-0.33123481273651123,
-0.4219113290309906,
-0.23531542718410492,
0.7752237915992737,
-0.3305664658546448,
0.2160135954618... | |
assume they are still being rendered).
Point2f statusPoint(10, 10);
RenderString(statusPoint, GLUT_BITMAP_9_BY_15, "Loading...");
```
Your code looks okay. Most likely you've just messed up the matrix stack somewhere.
I suggest that you check if you forgot a `glPopMatrix` somewhere. To do so you can get the stack dep... | [
0.0139891617000103,
-0.119105763733387,
0.855279803276062,
-0.09952397644519806,
0.09570667147636414,
0.025258446112275124,
0.10230747610330582,
-0.11648369580507278,
-0.3693375885486603,
-0.9118527173995972,
-0.1685527265071869,
0.6892724633216858,
-0.17766474187374115,
-0.273928135633468... | |
the current matrix.
That should give you enough clues to find the bug. | [
0.1727331280708313,
-0.15705937147140503,
0.36803317070007324,
0.324064165353775,
0.22233428061008453,
0.19057117402553558,
-0.3231923580169678,
0.16330242156982422,
-0.3515707552433014,
-0.5247201919555664,
0.2567424476146698,
0.20928950607776642,
-0.4379759132862091,
0.10658928006887436,... | |
I've created a DataTable using reflection to get the properties from my class and set this as the DataContext for my Microsoft.Windows.Controls.DataGrid:
```
// Create the columns based on the data in the album info - get by reflection
var ai = new AlbumInfo();
Type t = ai.GetType();
dataTable.TableName = t.Name;
fo... | [
0.4357186257839203,
0.1281234323978424,
0.640239417552948,
-0.22398529946804047,
0.04446829482913017,
0.23327672481536865,
0.10819339752197266,
-0.6961620450019836,
-0.16492626070976257,
-0.5351373553276062,
0.04064151272177696,
0.3667217493057251,
-0.3298279047012329,
0.027130572125315666... | |
= p.PropertyType;
}
else
{
columnSpec.DataType = typeof(string);
}
columnSpec.ColumnName = p.Name;
dataTable.Columns.Add(columnSpec);
}
dataGridView.DataContext = dataTable;
```
AlbumInfo contains properties such as Title, Artist, BitRate, HasImage.
I'm trying to set the visibility o... | [
0.18820582330226898,
-0.07109588384628296,
0.644140899181366,
-0.12309040129184723,
0.1800137609243393,
-0.0015872848453000188,
0.21715909242630005,
-0.5696369409561157,
-0.31516149640083313,
-0.6893249750137329,
-0.2649666666984558,
0.5600109100341797,
-0.17293740808963776,
0.182750612497... | |
need to do when binding the DataTable to the DataGrid? I can't do anything in the XAML as I'm building the DataTable dynamically via reflection.
**EDIT:**
I've moved the code to the AutoGeneratedColumns event handler (which seems to get called twice) so as long as I check the Columns.Count I can access the data.
How... | [
0.21206028759479523,
0.12703368067741394,
0.44450318813323975,
-0.18929898738861084,
-0.18464364111423492,
-0.21029333770275116,
0.2853955626487732,
-0.1767532080411911,
-0.14607185125350952,
-0.7736824154853821,
0.03650152310729027,
0.6349924206733704,
-0.4126189947128296,
0.0529305264353... | |
DataGridColumn column = dataGridView.Columns[index];
column.DisplayIndex = columnData.DisplayIndex;
column.Visibility = columnData.Visible ? Visibility.Visible : Visibility.Hidden;
AddContextMenuItem(dataGridView.ContextMenu, columnData.Header, index++, columnData.Visible);
}
```
AddContextMenuItem is on... | [
-0.1586725264787674,
-0.04522791504859924,
0.557545006275177,
-0.15774869918823242,
-0.09611736238002777,
0.23866800963878632,
0.5672147870063782,
-0.5129966735839844,
-0.18517278134822845,
-0.17021894454956055,
-0.45630404353141785,
0.483913779258728,
-0.5103154182434082,
-0.0414674133062... | |
though it wasn't 100% right). However, this then led to the subsequent problem with trying to set both the visibility and display index.
I reported the issue with not being able to set both the display index and visibility on the Codeplex discussion board and have just got back this reply:
> This is a indeed a bug, a... | [
0.28874051570892334,
0.13489554822444916,
0.41079989075660706,
-0.01639767922461033,
-0.05056607723236084,
-0.24385814368724823,
0.5453799962997437,
0.0013492867583408952,
-0.24107486009597778,
-0.6748199462890625,
-0.016491230577230453,
0.5281975269317627,
-0.31062817573547363,
-0.0271744... | |
occur if the order is changed
> after the page has reached a steady
> state.
I'm not sure whether I'll check this work-around out or not. I was rewriting a WinForms app in WPF as a learning exercise and having this work isn't really essential to that.
**UPDATE**
I was using version 3.5.40320.1, labelled March 2009... | [
-0.07632257044315338,
0.10193006694316864,
0.7852995991706848,
-0.47821494936943054,
-0.06593520194292068,
-0.13740336894989014,
0.7748100161552429,
0.17222021520137787,
-0.2683984041213989,
-0.9585224390029907,
-0.22785870730876923,
0.3438277840614319,
-0.3094894289970398,
0.1887039840221... | |
I use a view with two partial views inside.
```
<div id="matches">
<% foreach (var item in Model)
{ %>
<% Html.RenderPartial("RenderMatchesListRowUserControl", item); %>
<% } %>
</div>
<div id="addMatchFormBox">
<% Html.RenderPartial("AddNewMatchUserControl");%>
</div>
```
The first parti... | [
-0.11110498756170273,
-0.04156112298369408,
0.4976740777492523,
-0.16427317261695862,
-0.14923381805419922,
0.20728647708892822,
0.2987959086894989,
-0.5828784704208374,
0.4216827154159546,
-1.0244094133377075,
0.06436894834041595,
0.5570504665374756,
-0.46621066331863403,
-0.0964749455451... | |
UpdateTargetId = "matches",
InsertionMode = InsertionMode.InsertAfter,
OnSuccess = "flashit",
OnFailure = "renderForm"
}))
{%>
<fieldset>
<legend>New Match</legend>
<p>
<label for="DurationBetweenMovesInDays">
Dauer (in Tagen) zwischen den Zügen:</label>
... | [
-0.2531358003616333,
-0.6141034364700317,
0.5847949981689453,
-0.09830346703529358,
0.11914629489183426,
-0.10721950232982635,
0.234235018491745,
-0.40100744366645813,
-0.03429165855050087,
-0.5262128710746765,
-0.36184388399124146,
0.7325883507728577,
-0.03636305779218674,
-0.095285430550... | |
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
<% } %>
```
Depending on the ModelState, the controller returns the partial view for the new match entry or the partial view for the form, to display the model errors.
```
if (Request.IsAjaxRequest()) {
return ModelState.IsValid ? ... | [
-0.2143040895462036,
-0.4569094777107239,
0.900518536567688,
-0.011854433454573154,
0.1433790624141693,
-0.01675296761095524,
0.2772742807865143,
-0.297955185174942,
0.1462780237197876,
-0.8958860039710999,
-0.12335295975208282,
0.7454429268836975,
-0.22782428562641144,
0.13607066869735718... | |
list because of the updatetargetid refers to the div element which contains the matches list. To avoid this, the updatetargetid must be changed to refer the div element containing the form. But i have no idea how to do this.
OKay. There is no way to achieve this in that way. I solved it with jQuery. | [
0.26553499698638916,
0.10683497041463852,
0.4500327408313751,
0.012737394310534,
-0.26964521408081055,
-0.4027712047100067,
0.1954362839460373,
-0.1907808780670166,
0.21096712350845337,
-0.5887064933776855,
0.12317181378602982,
0.615818440914154,
-0.5453493595123291,
0.0667215958237648,
... | |
I am wondering if it is possible to write php code to a file. For example:
```
fwrite($handle, "<?php $var = $var2 ?>");
```
I would like it produce the exact string in the file and not the eval'ed code. Is this possible?
I am currently getting the following output (where $var = 1 and $var2 = 2):
```
<?php 1 = 2 ?... | [
0.40794289112091064,
0.13963682949543,
0.37308308482170105,
-0.007172682322561741,
-0.3548315465450287,
0.11375651508569717,
0.34291955828666687,
-0.1579883098602295,
-0.03286196291446686,
-0.3167448043823242,
0.04542791470885277,
0.554995596408844,
-0.20615926384925842,
-0.082335881888866... | |
I have a table which links to another table in the ASP.NET membership schema.
Problem is, all the PKs for the ASP.NET tables are uniqueidentifier so mine has to be too. When I add a SqlDatasource and call its Insert() method, I get the following error:
Cannot insert the value NULL into column 'DiscountCode', table 'C... | [
0.044982392340898514,
0.23766295611858368,
0.18984223902225494,
0.018303077667951584,
-0.036156900227069855,
-0.18142347037792206,
0.20237873494625092,
-0.01932368613779545,
-0.1246543899178505,
-0.4552977979183197,
0.2988749146461487,
0.4435286521911621,
-0.2474726140499115,
0.58226585388... | |
go about fixing this? If I get rid of the data type part in the markup (so just leave the field/parameter name but not the data type stuff), I get another error so that is not possible.
Thanks
What do you mean by "there is no Guid data type"? What's wrong with `System.Guid`? Can't you just use `Guid.NewGuid()`, set th... | [
0.11842574179172516,
-0.10900716483592987,
0.25368401408195496,
0.14740772545337677,
0.12166320532560349,
-0.08142219483852386,
-0.017316581681370735,
-0.17463679611682892,
-0.22963038086891174,
-0.573131263256073,
-0.018656905740499496,
1.0138484239578247,
-0.479473739862442,
-0.007846768... | |
ask the database to populate the GUID field for you. | [
0.5863467454910278,
0.1797146052122116,
0.024808339774608612,
0.3393864035606384,
-0.07676772028207779,
-0.24568146467208862,
-0.15404854714870453,
0.3760612905025482,
0.24028202891349792,
-0.5350655913352966,
-0.037770193070173264,
0.34444674849510193,
-0.03611921891570091,
-0.02594842389... | |
I'm using PDF::FromHTML to generate a PDF from HTML(as the name of the module would imply) :)
I'm able to run it from the command line fine and receive my expected output - however when I use the **exact same code** in my web app, the output doesn't look correct at all - text is appearing in the wrong places and not a... | [
0.37053921818733215,
0.1002146378159523,
0.8832798600196838,
0.012760049663484097,
-0.18744400143623352,
-0.21669916808605194,
0.03423389047384262,
-0.14352889358997345,
-0.04941637068986893,
-0.8308774828910828,
-0.15537488460540771,
0.8316115140914917,
-0.13110047578811646,
-0.0945792198... | |
$filename = '/tmp/backup.html';
my $font = 'Helvetica';
my $encoding = 'utf-8';
my $size = 12;
my $landscape = 0;
my $pdf = PDF::FromHTML->new(
encoding => $encoding,
);
my $input_file = $filename;
my $output_file = "$input_file.pdf";
warn "$input_file\n$output_file\n";
$pdf->load_file($input_file);
$pd... | [
0.28382641077041626,
0.20334987342357635,
0.9201835989952087,
-0.26630887389183044,
-0.1848345249891281,
0.11317496746778488,
0.5543314814567566,
-0.4624866545200348,
0.005143989808857441,
-0.8984944224357605,
-0.5086978673934937,
0.5701122879981995,
-0.32377737760543823,
-0.12064281851053... | |
can't understand...
Good PDF contents at that block:
```
/Length 302 >> stream
**binary data
endstream endobj
10 0 obj << /Filter [ /FlateDecode ] /Length 966
```
Bad PDF contents:
```
/Length 306 >> stream
**binary data
endstream endobj
10 0 obj << /Filter [ /FlateDecode ] /Length 559
```
As you can see, the le... | [
0.04388216882944107,
0.19030657410621643,
0.5678880214691162,
0.1150481328368187,
-0.10804005712270737,
0.025160081684589386,
0.12825927138328552,
-0.060686323791742325,
-0.1269821673631668,
-0.7183114290237427,
-0.000021435653252410702,
0.5379698276519775,
-0.2092875838279724,
0.268262237... | |
I'm running this as my user on the command line versus running it from the web app. I don't know where I should start with debugging that, however.
In general, the CGI environment is different than your interactive login environment just like someone else's login environment is different than yours. The trick is to fig... | [
0.5187077522277832,
0.09057667851448059,
0.21319523453712463,
0.0399438738822937,
-0.09224086999893188,
-0.26368552446365356,
0.19449296593666077,
0.009830260649323463,
-0.42127111554145813,
-0.3122154474258423,
-0.016696441918611526,
0.6319937109947205,
-0.2538691461086273,
0.102074325084... | |
platform (i.e. is it a Windows versus Unix sorta thing)
* What's different about the environment variables?
* Does your CGI script use the same version of Perl?
* Does that perl binary have different compilation options?
* Are you using the same versions of the modules?
* If some of those modules use external libraries... | [
0.5313308835029602,
-0.24340513348579407,
-0.2123473733663559,
0.4272730350494385,
0.029993079602718353,
-0.08031971752643585,
0.11466745287179947,
-0.07677680253982544,
-0.5427548289299011,
-0.5420871376991272,
0.17579329013824463,
0.6839960217475891,
-0.14213842153549194,
-0.129709824919... | |
can start tracking it down from the command line.
Good luck. | [
0.3678170144557953,
0.24196657538414001,
0.42743781208992004,
0.20178288221359253,
0.12199214845895767,
-0.33922716975212097,
0.30563315749168396,
0.597159206867218,
-0.24134927988052368,
-0.5109389424324036,
-0.08768146485090256,
0.3313402533531189,
0.31762146949768066,
-0.290038734674453... | |
```
<asp:DataGrid ID="dgResetPassword" DataKeyField="user_id" OnItemCommand="resetSelect" CellPadding="10" HeaderStyle-BorderStyle="none" AutoGenerateColumns="False" runat="server" ForeColor="#333333" GridLines="None" Width="550px">
<Columns>
<asp:ButtonColumn DataTextField="sap_id" HeaderText="SAP ... | [
-0.2017415314912796,
0.1166050136089325,
0.40601301193237305,
-0.06867402791976929,
0.09005562216043472,
0.14575685560703278,
0.05254776403307915,
-0.36734306812286377,
-0.24388282001018524,
-0.5836992263793945,
-0.30008190870285034,
0.2075849175453186,
-0.1973702609539032,
-0.167040467262... | |
<asp:BoundColumn DataField="orgunit" HeaderText="Organization Unit"/>
</Columns>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditItemStyle BackColor="#999999" />
<SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle... | [
-0.25272828340530396,
-0.15065498650074005,
0.6342945098876953,
0.1119842529296875,
0.001410952303558588,
0.0940905436873436,
0.1778576374053955,
-0.5419026613235474,
-0.3530236780643463,
-0.6083157062530518,
-0.240107461810112,
0.1669817864894867,
-0.17794841527938843,
-0.1984014809131622... | |
</asp:DataGrid>
```
That is the grid, here is the function...
```
Sub resetSelect(ByVal s As Object, ByVal e As DataGridCommandEventArgs)
lblResponse.Text = [want to access text of username here]
lblResponse.Visible = True
lblID.Text = dgResetPassword.DataKeys.Item(e.Item.ItemIndex)
End Sub
```
How do ... | [
-0.39627158641815186,
-0.16592621803283691,
0.6156169772148132,
-0.14981944859027863,
0.01944698765873909,
0.21918071806430817,
0.323520690202713,
-0.4917084872722626,
-0.4614051878452301,
-0.6751506924629211,
-0.49995991587638855,
0.4860489070415497,
-0.29746466875076294,
0.02042351663112... | |
I'm writing a Flex app on top of a Java web application using BlazeDS. BlazeDS has logging inside of it, but I want to set it up to Use the same logging framework I have in my application.
Is there a way to setup BlazeDS to use Log4J? Or am I stuck with the Flex logging stuff that's already baked into BlazeDS?
No, ou... | [
0.5573182106018066,
-0.05518469586968422,
0.0855022668838501,
-0.058313868939876556,
-0.5152533650398254,
-0.08620044589042664,
0.3456948697566986,
-0.2732321321964264,
-0.34994375705718994,
-0.6213271021842957,
0.0860234797000885,
0.4696175456047058,
-0.5897665023803711,
-0.47057759761810... | |
class Slf4jTarget extends AbstractTarget {
// log4j levels: OFF - FATAL - ERROR - WARN - INFO - DEBUG - TRACE - ALL
// blazeds levels: NONE - FATAL - ERROR - WARN - INFO - DEBUG - ALL
@Override
public void logEvent(LogEvent event) {
Logger log = LoggerFactory.getLogger(event.logger.getCatego... | [
-0.09976974129676819,
-0.3244430124759674,
0.19869084656238556,
-0.07994173467159271,
0.1470615416765213,
-0.34382063150405884,
0.6567057967185974,
-0.30463171005249023,
0.1086120530962944,
-0.502276599407196,
-0.29634255170822144,
0.6109945178031921,
-0.5088571310043335,
-0.24645668268203... | |
else if (event.level >= LogEvent.WARN)
log.warn(event.message, event.throwable);
else if (event.level >= LogEvent.INFO)
log.info(event.message, event.throwable);
else if (event.level >= LogEvent.DEBUG)
log.debug(event.message, event.throwable);
else
... | [
0.42383989691734314,
-0.19153939187526703,
0.23870955407619476,
-0.06760769337415695,
0.43430984020233154,
-0.1016351506114006,
0.39521822333335876,
-0.42674902081489563,
-0.1692337542772293,
-0.5444708466529846,
0.0020573767833411694,
0.7282467484474182,
-0.3910675048828125,
0.04557511955... | |
use it, enable it in `services-config.xml`:
```
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<logging>
<target class="example.Slf4jTarget" level="Info">
</logging>
</services-config>
``` | [
0.22682097554206848,
-0.18938034772872925,
0.34475862979888916,
0.1659809798002243,
0.1747988909482956,
-0.23312756419181824,
0.10114510357379913,
0.23341500759124756,
-0.1589965969324112,
-0.8254829049110413,
-0.5806892514228821,
0.21780581772327423,
-0.24985505640506744,
-0.0965914800763... | |
```
SELECT
number, count(id)
FROM
tracking
WHERE
id IN (SELECT max(id) FROM tracking WHERE splitnr = 'a11' AND number >0 AND timestamp >= '2009-04-08 00:00:00' AND timestamp <= '2009-04-08 12:55:57' GROUP BY ident)
GROUP BY
number
```
How about this:
```
SELECT number, count(id)
FROM tracking
... | [
0.028685981407761574,
-0.12281791120767593,
0.29758888483047485,
-0.12462199479341507,
0.0607161708176136,
0.15694305300712585,
0.03044782020151615,
-0.6025046706199646,
-0.4684714674949646,
-0.2928822636604309,
-0.24981550872325897,
0.3529428243637085,
-0.3025098145008087,
-0.211633741855... | |
number >0 AND timestamp >= '2009-04-08 00:00:00' AND
timestamp <= '2009-04-08 12:55:57'
GROUP BY ident
) MID ON (MID.ID=tracking.id)
WHERE
GROUP BY number
``` | [
-0.07461830228567123,
-0.1743955910205841,
0.5224434733390808,
0.042211174964904785,
0.24069103598594666,
0.16100989282131195,
0.30787020921707153,
0.13126099109649658,
-0.12533554434776306,
-0.5525583028793335,
-0.37773001194000244,
0.1084013357758522,
-0.21788716316223145,
0.175489366054... | |
If an item is being deleted then I would like to fade it out and slide the other elements up to fill the empty space. Now, when I use `fadeOut()` the item doesn't have a height at the end which results in the other items jumping up (instead of sliding up nicely).
How can I `slideUp()` and element right after `fadeOut(... | [
-0.17148853838443756,
-0.42185959219932556,
0.5578168630599976,
-0.2774544060230255,
0.17019154131412506,
0.042018335312604904,
0.13941636681556702,
-0.23498204350471497,
-0.11630593240261078,
-0.4154379963874817,
-0.33819451928138733,
0.386865496635437,
-0.47991424798965454,
-0.0189259480... | |
does work.
Edit: This is the code I called it from. #slide-then-fade is the ID of a button element, article-text is a class on a div tag:
```
$(document).ready(function() {
$('#slide-then-fade').click(function() {
$('.article-text').fadeThenSlideToggle();
});
});
```
Edit 2: Modified to use the built-in sli... | [
0.1749662458896637,
-0.19521112740039825,
0.917959988117218,
-0.5068541169166565,
0.13947446644306183,
-0.039508260786533356,
-0.11894311010837555,
-0.540621280670166,
0.3009694516658783,
-0.4269134998321533,
-0.006901284214109182,
0.5555258989334106,
-0.6292150020599365,
-0.06071844324469... | |
I'm thinking through data access for an ASP.NET application. Coming from a company that uses a lot of Windows applications with Client Data sets there is a natural dendancy towards a DataSet approach for dealing with data.
I'm more keen on a Business Object approach and I don't like the idea of caching a DataSet in th... | [
0.3935544490814209,
0.04108195751905441,
-0.07300986349582672,
0.1768570989370346,
-0.12117589265108109,
-0.15470033884048462,
0.05261196196079254,
0.03971601650118828,
-0.41335687041282654,
-0.6740906834602356,
-0.016822917386889458,
0.5667510628700256,
0.10674309730529785,
0.051971569657... | |
and pretty dramatically simplify your data access. You *will* need to learn how to create and use ObjectDataSources but this is quite straightforward.
The other advantage of a data access layer (built using a separate project/DLL) is that it makes Unit testing much simpler. I'd also encourage you to build a Business ... | [
0.3753690719604492,
-0.04301178827881813,
0.055136848241090775,
0.4581106901168823,
-0.09971769899129868,
-0.09082841128110886,
-0.05328185856342316,
-0.2102622240781784,
-0.17143429815769196,
-0.4707494378089905,
-0.17407861351966858,
0.5530335307121277,
0.18272161483764648,
0.07908234745... | |
You do *not* want to be caching DataSets (or DAL objects, for that matter) in the session! You will build a Web app so that record modifications work through a Unique ID (or other primary key spec) and feed changes directly to the DAL as they are made. If you were to cache everything you would *dramatically* reduce the... | [
0.1281832605600357,
0.00938381813466549,
0.427961528301239,
0.08657184988260269,
0.019604865461587906,
-0.3455767035484314,
0.33173832297325134,
-0.013328354805707932,
-0.4433257579803467,
-0.48907798528671265,
-0.4500216245651245,
0.45180875062942505,
-0.21831907331943512,
-0.274567842483... | |
be wise to avoid DataSets. In my own work, I make extensive use of DataReaders to fill my ObjectDataSources (which is trivial due to the design of my DAL) and find it to be very efficient. | [
0.026928981766104698,
0.10433473438024521,
0.09516045451164246,
0.22501058876514435,
-0.10986116528511047,
0.05792054906487465,
0.20165079832077026,
0.06713727116584778,
-0.20707710087299347,
-0.6255956888198853,
-0.143637552857399,
0.5331495404243469,
-0.0704662874341011,
-0.0580322220921... | |
I understand that client side code must be readable from the browser but I wonder (since there are too many things that I ignore) if there are ways to obfuscate to code to the end user and, if not what is the best practice to "pack" the javascript code.
It is good practice to minify your JS with a tool such as [YUI Com... | [
0.15486513078212738,
0.24844786524772644,
0.15160679817199707,
-0.18633921444416046,
-0.40723106265068054,
-0.30645206570625305,
0.1825239062309265,
0.09734943509101868,
0.07572323083877563,
-0.5820745825767517,
-0.08001670986413956,
0.42398732900619507,
-0.19192153215408325,
0.11155824363... | |
Say I want to loop through a datareader and create a load of objects of a certain type but using a value from the datareader as the object name e.g.
```
String "string_" + <value from datareader> = new String();
```
So if I had values temp1,temp2 & temp3 coming out of the datareader I would have 3 new objects of typ... | [
0.5622471570968628,
0.24200774729251862,
0.12076520174741745,
0.15483051538467407,
-0.2386355996131897,
0.06676507741212845,
0.30947479605674744,
-0.24851825833320618,
-0.19075962901115417,
-0.46455419063568115,
0.11435268074274063,
0.2745459973812103,
-0.46160876750946045,
0.3086746931076... | |
you want the objects to have to their values:
```
var map = new Dictionary<String, String>();
map[...] = new String();
// ^
// |
// +---- substitute with whatever naming scheme you deem suitable
``` | [
-0.14810729026794434,
0.04912567883729935,
0.36572110652923584,
-0.13193900883197784,
0.13354383409023285,
-0.03185466304421425,
0.04166368767619133,
-0.20067578554153442,
-0.135354146361351,
-0.7775951623916626,
-0.3610876500606537,
0.7403143048286438,
-0.378194123506546,
-0.0058912290260... | |
I have a batch file that's calling the same executable over and over with different parameters. How do I make it terminate immediately if one of the calls returns an error code of any level?
Basically, I want the equivalent of MSBuild's `ContinueOnError=false`.
Check the `errorlevel` in an `if` statement, and then `ex... | [
0.29220330715179443,
0.15957091748714447,
0.3750283122062683,
-0.2716522812843323,
0.057554811239242554,
-0.04165684059262276,
0.3134782314300537,
-0.07040534913539886,
0.0353928804397583,
-0.29574549198150635,
-0.07347768545150757,
0.6669551730155945,
-0.32141053676605225,
0.2820894122123... | |
a `for` it gets a bit tricky. You'll need something more like:
```
setlocal enabledelayedexpansion
for %%f in (C:\Windows\*) do (
same-executable-over-and-over.exe /with different "parameters"
if !errorlevel! neq 0 exit /b !errorlevel!
)
```
**Edit:** You have to check the error after each command. There's n... | [
0.14663752913475037,
0.1953953355550766,
0.2109331339597702,
-0.19272349774837494,
-0.06667625904083252,
0.019718894734978676,
0.4454938471317291,
0.015550348907709122,
-0.21423295140266418,
-0.6604999899864197,
-0.08114331215620041,
0.8680657744407654,
-0.15193066000938416,
0.100716173648... | |
I'm trying to access the current hibernate session in a test case, and getting the following error:
> org.hibernate.HibernateException: No
> Hibernate Session bound to thread, and
> configuration does not allow creation
> of non-transactional one here at
> org.springframework.orm.hibernate3.SpringSessionContext.cu... | [
0.16178351640701294,
0.003194740042090416,
0.47279882431030273,
-0.2414039969444275,
-0.11623785644769669,
-0.09428150206804276,
0.6476108431816101,
-0.26705285906791687,
0.04811617359519005,
-0.6036732792854309,
-0.03291091322898865,
0.27733948826789856,
-0.30051305890083313,
0.1776023060... | |
Session session = sessionFactory.getCurrentSession();
session.beginTransaction();
Connection hsqldbConnection = session.connection();
IDatabaseConnection connection = new DatabaseConnection(hsqldbConnection);
// write DTD file
FlatDtdDataSet.write(connection.createDataSet(), ... | [
-0.12735028564929962,
-0.2536928355693817,
0.5543890595436096,
0.1307559311389923,
-0.06575556099414825,
-0.08722982555627823,
0.543939471244812,
-0.22396188974380493,
-0.2120457887649536,
-0.7046518921852112,
-0.3150268793106079,
0.4927293658256531,
-0.12109605967998505,
0.264296650886535... | |
@Resource
protected SessionFactory sessionFactory;
}
```
applicationContext.xml:
```
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans ... | [
-0.28369858860969543,
0.32151180505752563,
0.3100115954875946,
-0.200094074010849,
-0.24775490164756775,
0.2999287247657776,
0.21301139891147614,
-0.3458594083786011,
-0.38629236817359924,
-0.6481847167015076,
-0.22945758700370789,
0.3259918987751007,
-0.3537827730178833,
0.379588186740875... | |
<value>sa</value>
</property>
<property name="password">
<value></value>
</property>
</bean>
<bean id="sessionFactory" class="com.foo.spring.AutoAnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="entityPackages">
... | [
-0.3889707028865814,
0.0766289159655571,
0.2652624547481537,
-0.14328533411026,
0.17144817113876343,
0.13416802883148193,
0.23954719305038452,
-0.15958093106746674,
-0.3708609640598297,
-0.8172469139099121,
-0.3039148151874542,
0.15371601283550262,
-0.2384745478630066,
0.26922285556793213,... | |
<value>com.sample.model</value>
</list>
</property>
<property name="schemaUpdate">
<value>true</value>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect | [
0.07841963320970535,
-0.2910833954811096,
0.4304552972316742,
-0.1982511430978775,
-0.2042764127254486,
0.23224741220474243,
0.5624322891235352,
-0.33820611238479614,
-0.20661312341690063,
-0.5419573187828064,
-0.6865899562835693,
0.09511958062648773,
0.024391811341047287,
-0.1018003523349... | |
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
</beans>
```
Wrong, that will just fill your code with session management code.
First, add a transaction management bean in your context:
```
<bean id="transactionManager"
class="org... | [
0.13072165846824646,
-0.20852971076965332,
0.5720189809799194,
-0.05726245790719986,
-0.021329093724489212,
-0.315459668636322,
0.21175655722618103,
-0.47663047909736633,
-0.30876120924949646,
-0.6703662276268005,
-0.043825067579746246,
0.6816474795341492,
-0.4070068895816803,
-0.005392189... | |
AbstractTransactionalJUnit4SpringContextTests
```
public class BaseDALTest
extends AbstractTransactionalJUnit4SpringContextTests{
```
Third thing, annotate you test class with
```
@TransactionConfiguration
@Transactional
```
If your transaction demarcation is correct(surrounding your dao o... | [
-0.06771469861268997,
-0.004166265018284321,
0.11715555191040039,
0.06581520289182663,
-0.188287615776062,
-0.5270163416862488,
0.019855767488479614,
-0.2599557936191559,
-0.013277212157845497,
-0.48066502809524536,
0.21242783963680267,
0.6610096096992493,
-0.12533773481845856,
-0.18519505... | |
Just finished a little app that I want to distribute and at the moment for windows platform it is just an executable jar. Is there anyway to give this jar another image than the java cup?
Thanks
I think you're referring to the way that the jar file shows up in Windows Explorer? If so, it's probably an OS setting (need... | [
0.46308594942092896,
0.20599448680877686,
0.03261638432741165,
0.1387476623058319,
-0.10352832078933716,
-0.1387735903263092,
0.22865109145641327,
0.4192509949207306,
-0.2348904013633728,
-0.561565637588501,
0.33718204498291016,
0.44310352206230164,
-0.07735943794250488,
0.1944558471441269... | |
What I'm trying to do:
1. Display a modal view, where I get some user input
2. Display another one and get more input
3. Do some stuff with the input from 1. and 2.
Problem is: presentModalViewController:animated: is *non blocking*. That means I can't just do the steps 1.-3. sequentially.
How I tried to solve it:
V... | [
-0.1964160054922104,
0.10070940852165222,
0.6626567244529724,
-0.014156278222799301,
-0.163704976439476,
0.26473668217658997,
0.2895228862762451,
-0.3774210512638092,
-0.27867016196250916,
-0.6618202328681946,
-0.057890068739652634,
0.45424145460128784,
-0.7500186562538147,
-0.051024075597... | |
ViewController0 (might even be the same one). Now ViewController0 has all the data (or should) and can proceed to step 3.
Problem with this approach:
1. It looks like a horrible hack (there *has* to be a better way to do it).
2. It *doesn't work*. :-) The problem is when ViewController0 tries to display ViewControlle... | [
0.01731747016310692,
-0.03264997527003288,
0.768044114112854,
-0.21244224905967712,
0.07650187611579895,
-0.146309956908226,
0.4113750159740448,
-0.15213161706924438,
-0.36979007720947266,
-0.8068709373474121,
-0.15761391818523407,
0.6533020734786987,
-0.5436006784439087,
-0.18409408628940... | |
the operation of removing ViewController1!
So, any idea how I can either solve this problem in a simpler way or make it work this way?
I found the solution to this problem here: <http://forums.macrumors.com/showthread.php?t=513131> (lawicko's answer).
Thanks for your replies anyway. | [
0.2279525101184845,
0.16048023104667664,
0.5345613360404968,
0.24904726445674896,
-0.016093319281935692,
0.032985616475343704,
0.4171265959739685,
0.05372128635644913,
-0.31562769412994385,
-0.3220418691635132,
-0.18872211873531342,
0.7375591397285461,
-0.32694822549819946,
0.0317422933876... | |
I don't think such support exists in current languages. I think what I want to do could be solved by a "workflow engine". But the problem I have with workflow's is generally they are:
1. Declarative/verbose and I find a imperative style much more succinct
2. Heavyweight, I'll have a lot of simple though diverse little... | [
0.11706779897212982,
0.15412701666355133,
0.1257767230272293,
0.09246194362640381,
-0.16036103665828705,
-0.27567896246910095,
0.4549240469932556,
-0.2670482099056244,
-0.5600947141647339,
-0.4342029392719269,
-0.08229261636734009,
0.3675747811794281,
-0.3073720932006836,
0.004989355802536... | |
it as well.
Example
-------
Here is limited fictional example of what I'd like to do. The main issue is that at any point in a routine you may need to get user input. The time between inputs could be very long so the state of service will need to be serialized to disk.
```
def RunMachine(user)
var lever ... | [
0.3937009274959564,
-0.19174960255622864,
0.3472028970718384,
-0.11950904875993729,
0.1279243528842926,
0.17064452171325684,
0.048417698591947556,
-0.1522609144449234,
-0.3486766517162323,
-0.6424521207809448,
0.19796347618103027,
0.7440556883811951,
-0.3363644778728485,
0.1326206922531128... | |
var color = user.ChooseColor()
var shape = user.ChooseShape()
return Device(color, shape)
```
Update
======
I have a working "engine" in CPython. It piggy-backs on the iterator/yield support in python. So code looks like this:
```
def escape(self, you):
roll = yield self.game.rollDice(you)
... | [
0.09584758430719376,
-0.28481927514076233,
0.33396586775779724,
-0.13201536238193512,
0.4322996437549591,
0.08372080326080322,
0.012309491634368896,
-0.28932511806488037,
-0.20725739002227783,
-0.48368820548057556,
-0.17217612266540527,
0.6996541023254395,
-0.19666026532649994,
-0.11556826... | |
action. **CPython** however doesn't serialize iterators.
Since the whole state of the game can be defined as a sequence of commands, I serialize the game state up to the point at where a coroutine started then the remaining list of commands. So to save/restore looks like this:
```
def dumpGameState(game):
if gam... | [
-0.0836370587348938,
-0.37122008204460144,
-0.013938838616013527,
-0.2886783182621002,
0.09537027031183243,
0.2776707708835602,
0.11713399738073349,
-0.42821937799453735,
-0.4155840575695038,
-0.4361918568611145,
-0.2653806805610657,
0.43268999457359314,
-0.4153172969818115,
0.070588313043... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.