text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
"success" (in the sense of self-sufficiency), so that long term contributors may preferably be paid to work on the project, **without** affecting the open source nature of the project itself?
In other words, what are generally some of the more common revenue-creating mechanisms for open source software, and how can th... | [
0.4303308129310608,
0.19337277114391327,
0.21139298379421234,
0.37003734707832336,
0.08735285699367523,
-0.5343026518821716,
-0.0016644960269331932,
0.10844805091619492,
-0.42144349217414856,
-0.10171714425086975,
-0.6131713390350342,
0.3763502538204193,
0.34383925795555115,
0.063393108546... | |
[services](http://www.mysql.com/services/) like installation, customization, consulting, training, etc. Or Zend [contributes heavily](http://www.zend.com/en/company/) to PHP and offers [Zend framework](http://framework.zend.com/), but they also have a number of [commercial products](http://www.zend.com/en/products/) su... | [
0.6037377715110779,
-0.08742641657590866,
0.1118348017334938,
-0.1322687566280365,
-0.2715836763381958,
-0.09526640921831131,
0.09608650207519531,
-0.331902414560318,
-0.015385033562779427,
-0.5298621654510498,
-0.44131967425346375,
0.40914493799209595,
0.05401118844747543,
-0.076198533177... | |
When I display a JPEG in my WPF application (using the following code), it is shown significantly smaller than if I open the JPEG in the Windows Picture Viewer at actual size.
I've drilled into the properties of my ImageSource at runtime and my image has:
* a DPI of 219
* a Height of 238.02739726027397
* a Width of 3... | [
0.06146664917469025,
-0.09029342234134674,
0.6599975228309631,
-0.09811129420995712,
-0.4327723979949951,
0.36678245663642883,
0.27034053206443787,
-0.6037020087242126,
-0.36226722598075867,
-0.9607048630714417,
0.33228716254234314,
0.4052123427391052,
0.2898789942264557,
0.029428385198116... | |
Height that the ImageSource is reporting.).
My gut tells me this has something to do with WPF's use of device independent units (instead of pixels) but I can't make sense of it, and I still need to know how to display the image at the 'actual' size of 543x713 in my application.
```
<Window xmlns="http://schemas.micro... | [
-0.09390611201524734,
-0.07088997215032578,
1.0042803287506104,
-0.09988006949424744,
-0.29634541273117065,
0.14382334053516388,
0.050862494856119156,
-0.5086657404899597,
-0.34939029812812805,
-0.38467609882354736,
0.09354128688573837,
0.608453631401062,
0.27106380462646484,
0.11312271654... | |
size in inches, while the image viewer is displaying pixels. On most Windows systems, the screen resolution is assumed to be 96 DPI, so using that in your image will result in a one-to-one translation. | [
-0.005832651164382696,
-0.31953996419906616,
0.7516801357269287,
0.040932077914476395,
-0.18070383369922638,
0.19482560455799103,
0.1145496815443039,
-0.04726670682430267,
-0.520704984664917,
-0.8300974369049072,
-0.02364863082766533,
0.1477564424276352,
0.24270552396774292,
0.302024155855... | |
Why doesn't asp.net css link path work outside of the head tag?
I have this code in a master page:
```
<head runat="server">
<title>Untitled Page</title>
<link href="../CSS/default.css" rel="stylesheet" type="text/css" runat="server" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentP... | [
-0.07500915974378586,
0.0002769073471426964,
0.6392561197280884,
-0.08836684376001358,
-0.15249763429164886,
-0.05236009135842323,
0.2678716778755188,
-0.3402561843395233,
-0.22954045236110687,
-0.7827247977256775,
-0.0002575096150394529,
0.25688207149505615,
-0.18527592718601227,
-0.11366... | |
am wondering if this is just how it works or if I'm missing something.
ASP.NET does some magic rebasing of urls in link and script tags when you specify runat="server" on the head element of a master page.
There are some details of this strange behavior [here](http://aspnetresources.com/blog/more_on_url_rebasing_in_ma... | [
0.48254886269569397,
-0.0904778242111206,
0.2807447910308838,
0.19356414675712585,
-0.2152026742696762,
-0.45539984107017517,
0.4021722972393036,
0.41162344813346863,
-0.7609399557113647,
-0.5590909123420715,
0.11069206893444061,
-0.11494851112365723,
0.23910725116729736,
0.448332667350769... | |
I like to fetch the data with eager-loading using Linq2SQL. The code is similar as :
```
DataLoadOptions options = new DataLoadOptions();
options.LoadWith<Product>(c => c.ProductCompanies);
options.LoadWith<Product>(c => c.OrderDetails);
db.LoadOptions = options;
IEnumerable<Prod... | [
0.20793992280960083,
-0.13346578180789948,
0.6019285917282104,
0.022008968517184258,
0.05590778961777687,
0.07332572340965271,
-0.08574535697698593,
-0.3792610466480255,
-0.10912440717220306,
-0.5713085532188416,
0.11918503046035767,
0.6956104636192322,
-0.08377207070589066,
0.105212964117... | |
is a Linq2SQL issue? Do we have any workaround?
Thanks a lot!
**Update:**
I check the sql from SQL Profiler. I found both Leppie and Ian are correct. They are bounded in one transaction. But when I set it as lazy load, it opened multiple connection.
No, you didn't do anything wrong, Linq2SQL batches everything in a... | [
0.258690744638443,
-0.020114263519644737,
0.3454952538013458,
0.07226245105266571,
-0.039075493812561035,
-0.30597394704818726,
0.27778351306915283,
-0.15271110832691193,
-0.566430926322937,
-0.40184974670410156,
0.022203654050827026,
0.5510863065719604,
-0.2773336172103882,
-0.03368318080... | |
to rely on deferred execution (that is default). | [
0.08339856564998627,
-0.12373252958059311,
-0.30741214752197266,
-0.09261292964220047,
0.18312041461467743,
-0.2403901368379593,
0.4707086384296417,
-0.1280825138092041,
-0.12348020821809769,
-0.3515312671661377,
-0.4720439612865448,
0.7157924175262451,
-0.5380789637565613,
-0.238377451896... | |
I'm currently using Eclipselink, but I know now days most JPA implementations have been pretty standardized. Is there a native way to map a JPA entity to a view? I am not looking to insert/update, but the question is really how to handle the @Id annotation. Every entity in the JPA world must have an ID field, but many ... | [
0.3108515739440918,
0.007058692164719105,
0.0937090516090393,
0.09264685958623886,
-0.5145928859710693,
-0.3093445301055908,
0.2713591754436493,
0.14954346418380737,
-0.07067180424928665,
-0.7467909455299377,
0.09954270720481873,
0.3716408908367157,
-0.14755438268184662,
0.3325744569301605... | |
about doing this.
While using the `@Id` annotation with fields of directly supported types is not the only way to specify an entity's identity (see `@IdClass` with multiple `@Id` annotations or `@EmbeddedId` with `@Embedded`), the JPA specification requires a primary key for each entity.
That said, you don't need enti... | [
0.3264400064945221,
-0.056858792901039124,
0.03903459012508392,
0.3474486768245697,
-0.18854668736457825,
-0.3748098611831665,
0.04598177969455719,
-0.13680924475193024,
-0.0373179130256176,
-0.5269511938095093,
-0.08385362476110458,
0.5346391201019287,
0.025147439911961555,
0.174551203846... | |
My problem is, that I want to parse binary files of different types with a generic parser which is implemented in JAVA. Maybe describing the file format with a configuration file which is read by the parser or creating Java classes which parse the files according to some sort of parsing rules.
I have searched quite a ... | [
0.29764652252197266,
0.6003268957138062,
-0.47411224246025085,
0.0960308387875557,
-0.1834893673658371,
-0.13189376890659332,
0.34859466552734375,
0.07139799743890762,
-0.16528475284576416,
-0.5244337916374207,
0.16735586524009705,
0.6121496558189392,
-0.42946359515190125,
0.09096992015838... | |
wrong on that assumption.
Are there any frameworks which deal especially with easy parsing of binary files or can anyone give me a hint how I could use parser/compiler-generators to do so?
**Update**:
I'm looking for something where I can write a config-file like
```
file:
header: FIXED("MAGIC")
body: content(10... | [
0.23023736476898193,
0.18056371808052063,
0.26774126291275024,
0.1699647158384323,
-0.2995390295982361,
-0.0928172692656517,
0.29847314953804016,
-0.30719974637031555,
-0.3166881203651428,
-0.6910426020622253,
0.035610590130090714,
0.6655380725860596,
-0.10485666990280151,
-0.2261829227209... | |
this helps someone to get an idea, what I'm looking for.
give a try to [preon](http://preon.sourceforge.net/) | [
0.3597426116466522,
0.024540230631828308,
0.016242478042840958,
0.21682105958461761,
0.3369463384151459,
0.1860521286725998,
0.204420268535614,
0.43330204486846924,
-0.42917051911354065,
-0.5296924114227295,
0.08645036816596985,
0.12714675068855286,
0.426199734210968,
-0.07157477736473083,... | |
When the user select an item from a dropdownlist and presses a button, my application shows a list of data manually binded and filtered according the selected value. If the user presses the Refresh button of the browser, it asks for confirmation whether the user is sure they want to submmit the query again.
I don't wa... | [
0.3767756223678589,
-0.22556394338607788,
0.5852333307266235,
-0.011590699665248394,
-0.05196880176663399,
-0.15781380236148834,
0.2962137460708618,
-0.0021722810342907906,
-0.44365620613098145,
-0.5688151717185974,
-0.13608747720718384,
0.3838779032230377,
-0.22213616967201233,
0.14688901... | |
page load event for example:
```
// Check to see if the user submitted the form:
if (Page.IsPostBack){
// Get the Params collection - query and forms
NameValueCollection params = Request.Params;
StringBuilder query = new StringBuilder();
// Iterate over the params collection to build a complete
// query str... | [
-0.030211636796593666,
-0.22098207473754883,
0.7362053394317627,
0.024744566529989243,
-0.44265833497047424,
0.013948897831141949,
0.21670719981193542,
-0.7121828198432922,
-0.3416280150413513,
-0.5581105947494507,
-0.17913220822811127,
0.2810197174549103,
-0.4176552891731262,
0.0568825677... | |
if (i > 0){
query.Append("&");
}
// Start the query string
query.AppendFormat("{0}=", params.GetKey(i));
// Create a string array that contains
// the values associated with each key,
// join them together with commas.
query.Append(String.Join(",", pColl.GetValues(i));
}
Respon... | [
-0.0710698738694191,
-0.24886423349380493,
0.8978180885314941,
-0.2642455995082855,
0.09956184774637222,
0.07753071188926697,
0.23018647730350494,
-0.5424975752830505,
-0.21760883927345276,
-0.4983843266963959,
-0.40574392676353455,
0.7355579733848572,
-0.5016451478004456,
0.24548511207103... | |
you'll end up with this additional redirect in the history which might cause the users to have to click back twice to get back to your search form.
On the plus side, they can now bookmark the results page quite happily and return to their results without having to re-submit the form. | [
0.347441703081131,
-0.14684666693210602,
0.5994138717651367,
0.22157154977321625,
0.24584639072418213,
-0.32891151309013367,
0.32813724875450134,
0.1040692925453186,
-0.46547093987464905,
-0.5990452170372009,
-0.20335227251052856,
0.2650628387928009,
0.2116345316171646,
0.266360878944397,
... | |
I'm still pretty new to using Autofac and one thing I miss in the documentation and examples is how to make it easy to get to the configured container from different places in a web application.
I know I can use the Autofac controller factory to automatically resolve constructor injected dependencies for controllers,... | [
0.48732852935791016,
0.07904788851737976,
-0.091183140873909,
0.4176466763019562,
-0.012310280464589596,
-0.4576416611671448,
0.05473775789141655,
0.28014177083969116,
-0.15753424167633057,
-0.7388383746147156,
0.4497356712818146,
0.5370159149169922,
-0.2471095621585846,
0.0080911014229059... | |
objects that need to be created during runtime should be created by factory objects and not by the container. Otherwise you get Container.Resolve calls all through your code, tying it to your container. These extra dependencies defeat the purpose of using IoC. In most cases I can get by only resolving one or two depend... | [
-0.007791296113282442,
0.08710809051990509,
0.28950268030166626,
0.05960390716791153,
0.20300322771072388,
-0.08470117300748825,
0.14562150835990906,
-0.2597125172615051,
-0.12565749883651733,
-0.801678478717804,
-0.2528126537799835,
0.42223191261291504,
-0.4916529357433319,
0.208973705768... | |
{
// Initialize container
container = new WindsorContainer(new XmlInterpreter(new FileResource("castle.xml")));
// Register yourself
container.Kernel.AddComponentInstance<IContainer>(this);
}
public T Resolve<T>()
{
return container.Resolve<T>();
}
}
```
I wra... | [
-0.1545816957950592,
-0.31348052620887756,
0.5553145408630371,
-0.10744483768939972,
0.18093861639499664,
0.128958597779274,
0.007643494289368391,
-0.19190062582492828,
-0.21907828748226166,
-0.7555949091911316,
-0.3532125949859619,
0.5731213092803955,
-0.18664081394672394,
0.3658806979656... | |
IContainer injected. (the example is for Castle Windsor but it can probably be adapted for AutoFac) | [
-0.015385598875582218,
-0.3455832004547119,
0.7005926370620728,
0.04880314692854881,
-0.006202272605150938,
0.027913281694054604,
0.34085461497306824,
-0.24431174993515015,
-0.26564478874206543,
-0.5926668047904968,
-0.08195410668849945,
0.5086988210678101,
-0.4885053038597107,
-0.33972713... | |
I'm extending `Loader()`, is it possible to draw a border around the content without resorting to some hacks? I understand Loader can't have any additional children, otherwise I would just create a shape to the contents size and add it. But is there a way to coerce or cast the content object in order to use the drawing... | [
0.44976314902305603,
-0.21690896153450012,
0.6236146688461304,
-0.22740718722343445,
-0.19249075651168823,
-0.06203628331422806,
0.19278307259082794,
-0.40206262469291687,
-0.24799968302249908,
-0.673263669013977,
-0.18239359557628632,
0.5021712183952332,
-0.38902634382247925,
0.1837865263... | |
new Sprite();
container.addChild(content);
var border:Shape = container.addChild(new Shape()) as Shape;
border.graphics.lineStyle(2,0x000000);
border.graphics.drawRect(0, 0, content.width,content.height);
return container;
}
```
... But if you still annoyed you cannot use the Loader as a Display... | [
-0.1341456174850464,
-0.22901448607444763,
0.9533231258392334,
-0.2564474046230316,
-0.4209214150905609,
0.024859245866537094,
0.2408720850944519,
-0.37059953808784485,
-0.24797868728637695,
-0.5681294798851013,
-0.12540996074676514,
0.44079214334487915,
-0.4223644435405731,
0.284283310174... | |
public function load(url:String):void
{
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, eventCompleteHandler);
loader.load(new URLRequest(url));
}
private function eventCompleteHandler(event:Event):void
{
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, eve... | [
-0.015841718763113022,
-0.4280255138874054,
0.714625358581543,
-0.24059943854808807,
-0.1472298949956894,
0.3792864680290222,
0.10411413758993149,
-0.17536494135856628,
-0.207474946975708,
-0.7337059378623962,
-0.4525822103023529,
0.5728988647460938,
-0.3718089163303375,
0.2552427649497986... | |
addChild(border);
}
}
```
To be used like a Loader :
```
var test:LoaderBorder = new LoaderBorder()
addChild(test);
test.load(URL);
``` | [
0.1805698126554489,
0.03470611572265625,
0.16842490434646606,
-0.21436749398708344,
-0.11540904641151428,
-0.1630789041519165,
0.391495943069458,
-0.22422127425670624,
0.03481820598244667,
-0.5599055886268616,
-0.16714195907115936,
0.39392781257629395,
-0.3530454933643341,
0.35099205374717... | |
My website is written in Python and currently runs under mod\_python with Apache. Lately I've had to put in a few ugly hacks that make me think it might be worth converting the site to mod\_wsgi. But I've gotten used to using some of mod\_python's utility classes, especially `FieldStorage` and `Session` (and sometimes ... | [
0.5753342509269714,
0.3579210042953491,
0.2612682282924652,
-0.2841687798500061,
-0.2141578197479248,
-0.35244256258010864,
0.441600501537323,
0.2726750075817108,
-0.09070798009634018,
-0.6364122629165649,
-0.042307645082473755,
0.5419576168060303,
-0.15255464613437653,
0.08249273896217346... | |
use in WSGI, or could I/should I write my own?
(FYI: currently using Python 2.5)
Look at [Werkzeug](http://werkzeug.pocoo.org/). You may have to do some rewriting. You will probably be pleased with the results of imposing the WSGI world-view on your application. | [
0.28012704849243164,
0.13812267780303955,
0.1975405365228653,
-0.2819328010082245,
-0.08481841534376144,
-0.32628482580184937,
0.412410706281662,
-0.07214412093162537,
-0.23327527940273285,
-0.49381184577941895,
-0.2020435333251953,
0.38499221205711365,
-0.3761619031429291,
-0.480742663145... | |
Is it possible to add a copyright symbol or other "special" symbol in any way in a C# console application?
```
namespace test {
class test {
public static void Main() {
System.Console.WriteLine("©");
}
}
}
```
works for me flawlessly. Regardless of whether the console window is set to raster fonts o... | [
0.013271314091980457,
0.07977022230625153,
0.6766124367713928,
0.002727025654166937,
0.14927420020103455,
-0.10914652794599533,
-0.03413517773151398,
-0.12831296026706696,
0.11265156418085098,
-0.5496886372566223,
-0.27819523215293884,
0.48930132389068604,
-0.06443853676319122,
0.125481516... | |
directly:
```
System.Console.WriteLine("\u00a9");
``` | [
-0.12530307471752167,
0.393696129322052,
0.2884877622127533,
-0.16155201196670532,
0.34950894117355347,
0.18676863610744476,
0.2359314262866974,
0.06588061153888702,
0.2939157485961914,
-0.6872366070747375,
-0.39956358075141907,
0.43143749237060547,
-0.20222042500972748,
0.0634454116225242... | |
I can't seem to find it, trying to keyboard input in a wpf form spawned from a winforms form. Found this: <http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/442782b1-00a1-4e2e-9cc6-ae99b6699126/> But when I try to use it, VS2008 complains about not being able to find the System.Windows.Forms.Integration namespac... | [
0.10428488999605179,
-0.002014770172536373,
0.528394877910614,
0.00442907540127635,
-0.0476323664188385,
0.0017019544029608369,
0.1493690013885498,
0.07822128385305405,
-0.2762274742126465,
-0.8853495121002197,
0.14116154611110687,
0.3657463490962982,
-0.2042112797498703,
0.191045209765434... | |
> %ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.0\WindowsFormsIntegration.dll | [
-0.08528084307909012,
0.2124183177947998,
0.31686708331108093,
-0.02828042581677437,
0.14025089144706726,
0.040687207132577896,
0.3935376703739166,
-0.21462523937225342,
0.18949729204177856,
-0.8375762104988098,
-0.3697250485420227,
0.24623873829841614,
-0.27861517667770386,
0.109518058598... | |
I've created an AIR application, but it uses an external SWF for extra functionality. I want that SWF to be included in the install, but currently it's not. Is there anyway I can get FlexBuilder or any other tool to include this extra file in the installer? I've tried manually adding the file (as a .air file is just a ... | [
0.7929738759994507,
0.08845682442188263,
0.6100896596908569,
-0.0037847389467060566,
0.03987220674753189,
-0.2923443019390106,
0.1257406771183014,
-0.358755499124527,
-0.10957109183073044,
-0.6566470861434937,
-0.19901449978351593,
0.6111796498298645,
-0.48484912514686584,
-0.2082168608903... | |
the application's root folder). | [
-0.35661837458610535,
-0.058958012610673904,
0.5767802000045776,
0.21812276542186737,
0.3419053852558136,
-0.13158586621284485,
0.45271962881088257,
-0.15840768814086914,
-0.1309451162815094,
-0.48626506328582764,
-0.7219836711883545,
0.25827768445014954,
-0.2603302597999573,
0.34129467606... | |
I am writing an application which uses the Microsoft.Office.Interop.Excel assembly to export/import data from Excel spreadsheets. Everything was going fine (except for 1 based indexing and all those optional parameters!), until I tried to use conditional formatting. When I call Range.FormatConditions.Add I get a Missin... | [
0.29334938526153564,
0.18430091440677643,
0.28327634930610657,
-0.23807215690612793,
0.1038251742720604,
-0.19643542170524597,
0.18567395210266113,
0.00201370008289814,
-0.07607199251651764,
-0.5744072794914246,
-0.1536126285791397,
0.520669162273407,
-0.5141555070877075,
0.079585425555706... | |
Application app = new Application();
Workbook workbook = app.Workbooks[1];
Worksheet worksheet = (Worksheet)workbook.Worksheets[1];
Range range = worksheet.get_Range("A1", "A5");
FormatCondition condition = range.FormatConditions.Add(
XlFormatConditionType.xlCellValue,
... | [
-0.012094986625015736,
-0.03023841604590416,
0.859362781047821,
-0.09957221150398254,
0.4127805829048157,
0.30095648765563965,
0.3409106433391571,
-0.4883091151714325,
-0.13756492733955383,
-0.7955556511878967,
-0.5581604242324829,
0.41872143745422363,
-0.5874406695365906,
0.03054138645529... | |
200);
}
}
```
This may be a good link for you: <http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/8a91d154-f766-427a-963c-16dfa39e154a/> | [
0.16644011437892914,
0.0645931288599968,
0.5444611310958862,
0.11519327014684677,
0.28337562084198,
-0.045666541904211044,
0.20083199441432953,
0.25331562757492065,
-0.3524109423160553,
-0.6423732042312622,
-0.08682041615247726,
0.49128401279449463,
-0.13119181990623474,
0.3768185973167419... | |
let say i have that
```
Structure myStruct
Public myPoint As Point
Public myBool As Boolean
End Structure
```
how to I make a copy / clone of that structure?
I fixed that issue now,
example of the code I was using:
```
Dim myStruct(1) As myStruct
myStruct(0).myPoint = New Point(10, 10)
myStruc... | [
-0.1656126081943512,
0.19733670353889465,
0.9526026248931885,
-0.3037710189819336,
0.09913446754217148,
0.020174536854028702,
-0.25160372257232666,
0.028262602165341377,
0.15394406020641327,
-0.3613622188568115,
-0.2956811189651489,
0.2329556941986084,
-0.2774979770183563,
0.35027799010276... | |
myCopy = CType(myStruct.Clone, myStruct())
```
and another question, if that structure is used, let say, 10,000 times, should I created a class instead?
You're looking at 12 bytes per structure, so passing it around as a struct is cheaper than creating a word-sized reference to it on heap (in other words, using a cla... | [
0.47538164258003235,
0.027188127860426903,
0.44178956747055054,
0.3052505552768707,
0.112052783370018,
0.2787623703479767,
-0.10381495207548141,
-0.09309779107570648,
-0.15211763978004456,
-0.8663491606712341,
0.20268815755844116,
0.06374890357255936,
-0.3213028907775879,
0.230856508016586... | |
I have some SVG files that specifies `width` and `height` as well as `viewbox` like this:
```
<svg width="576pt" height="432pt" viewBox="0 0 576 432" > ...
```
but how to display them in the browser at a size I decide? I want them smaller and have tried:
```
<object width="400" data="image.svg"></object>
```
but... | [
0.21418555080890656,
0.25503790378570557,
0.5994813442230225,
-0.25656840205192566,
-0.2996414005756378,
0.13010583817958832,
0.3347410261631012,
-0.24557437002658844,
-0.2270558476448059,
-0.765498161315918,
0.10339346528053284,
0.5480105876922607,
0.01376181747764349,
-0.0460475906729698... | |
asked this back in 2009. As I now had the same issue again I noticed that using the `<img>` tag and width together with an svg works fine.
```
<img width="400" src="image.svg">
``` | [
0.2308083325624466,
-0.11870218068361282,
0.6424858570098877,
-0.1232062429189682,
-0.5065728425979614,
-0.12735877931118011,
-0.023800736293196678,
-0.4215649664402008,
-0.5108118057250977,
-0.5543603897094727,
0.3498726487159729,
0.47372573614120483,
-0.1595907062292099,
0.05769047886133... | |
I want to append some text to the title attribute of all elements of a certain class.
In that context, `$(this)` is not the element of `$('.theclass')`. Maybe you want to use [`each`](http://docs.jquery.com/Core/each):
```
$('.theclass').each(function() {
$(this).attr("title", $(this).attr("title") + "Appended tex... | [
0.16338331997394562,
0.17232072353363037,
0.3073292672634125,
-0.15326280891895294,
0.13967500627040863,
-0.034461140632629395,
0.19330435991287231,
-0.06426648050546646,
0.13714171946048737,
-0.37018683552742004,
-0.2547217905521393,
0.6602144837379456,
-0.34827086329460144,
0.26645845174... | |
I have an ASP.NET application that needs to send emails in Korean. These emails are sent in plaintext.
But when the emails are received, they look like this:
> ? First name? ??: ?????.
>
>
> ?? ???? ???? ?? ??? ??? ?? ???? ????
> ????? ???? ????. ??????? ??? ?????
> ???? ??? ??1-888-123-4567 ? ??????? ??
> info... | [
-0.06207815185189247,
-0.08819177746772766,
0.1254323124885559,
-0.08143747597932816,
-0.4119536578655243,
0.3319973349571228,
0.4647475779056549,
0.2643873393535614,
-0.18665657937526703,
-0.7525168657302856,
-0.22892211377620697,
0.1727904975414276,
-0.22156395018100739,
-0.0535411387681... | |
basically have 2 ways to encode email parts:
1. Using the Korean Code page for your email so people not using Unicode can still view it (charsets like `ISO-2022-KR` and `x-windows-949`, I don't know which of the 3 is the most common):
```
Content-Type: text/plain;
charset="EUC-KR"
Content-Transfer-Encoding: quoted-pr... | [
-0.12622664868831635,
0.06379586458206177,
0.2908656597137451,
-0.08370821177959442,
-0.20749706029891968,
0.11823612451553345,
0.31187090277671814,
0.08147123456001282,
-0.007994002662599087,
-0.39228570461273193,
-0.4546760320663452,
0.04404453933238983,
-0.2510467767715454,
-0.269030421... | |
of the MIME specification](http://www.aspnetmime.com/help/welcome/overviewmimei.html) | [
0.38991719484329224,
-0.2896319031715393,
0.06676053255796432,
-0.14762888848781586,
0.2290007472038269,
-0.2125496119260788,
0.19994410872459412,
0.014111077412962914,
-0.21931344270706177,
-0.4350018799304962,
-0.05701160430908203,
0.44691768288612366,
-0.07390286028385162,
0.02011928893... | |
I have been asked for these kind of languages, my first naive attempt brought two list
List A)
> *A programming language based on constraints rather than algorithms to solve the problems. eg. Prolog*
List B)
> *A programming language that contain visual tools to help develop a program. eg. VB*
Digging deeply into ... | [
0.5410976409912109,
0.14321881532669067,
0.06558478623628616,
0.34174928069114685,
-0.18100452423095703,
0.3336995244026184,
0.07402325421571732,
0.3329937756061554,
-0.3361364006996155,
-0.7126912474632263,
-0.22076278924942017,
0.5330657362937927,
-0.0996347963809967,
0.00783763732761144... | |
this to the main question:
> ***Oscar:** I've also found references to Prolog, Scheme, Heskell, Lisp while searching on the topic? Are these "more" 5th or are those like VB.*
>
>
> ***Charlie Martin:** Well, Lisp can't really be a 5th gen language because it's older than everything except, maybe, FORTRAN. And Scheme... | [
-0.07074271887540817,
-0.14008541405200958,
0.01951603777706623,
0.35843512415885925,
-0.2720968425273895,
-0.012976122088730335,
-0.04445749148726463,
0.1481347233057022,
-0.4865926206111908,
-0.4191393554210663,
-0.20206448435783386,
0.4256487786769867,
-0.16889776289463043,
0.0421462282... | |
based programming (like Prolog). Golly, that must have been back in the 80's. There was a big Japanese initiative, back when we thought Japan was Taking Over and Buying Everything.
The usual list of generations is:
1. Straight machine language, Goldstein
and von Neumann
2. Assembly languages
3. "High level" languages... | [
0.416565865278244,
0.05848367512226105,
0.19813141226768494,
0.1436222493648529,
-0.4833676517009735,
-0.3170819580554962,
-0.20341283082962036,
0.14735126495361328,
-0.04123000428080559,
-0.18290069699287415,
-0.20673924684524536,
0.4661397635936737,
-0.46605563163757324,
-0.1863845884799... | |
So I have been posting all over and have yet to get a solid answer:
I have created an image resizing class, with a crop method. The cropping works great. The issue that I am having is the background color that I specify in the `drawImage` function of `Graphics` is not working correctly. It defaults to black as the bac... | [
0.5225205421447754,
0.1111234724521637,
0.28132492303848267,
-0.17762339115142822,
0.03182348608970642,
0.16544784605503082,
-0.05890059098601341,
0.2173098623752594,
-0.20127956569194794,
-0.7863445281982422,
0.11834006011486053,
0.5616811513900757,
-0.30043038725852966,
0.300704568624496... | |
am taking a jpeg and overlaying it on top of a new `BufferedImage`, the new buffered image's background is not being set. Here is the code below that I am working with:
```
public void Crop(int Height, int Width, int SourceX, int SourceY) throws Exception {
//output height and width
int OutputWidth = this.Outp... | [
0.1565060168504715,
0.13430844247341156,
0.4327037036418915,
-0.2642299234867096,
0.03855232521891594,
0.12856930494308472,
0.12378943711519241,
-0.5647435188293457,
-0.1956750899553299,
-0.6738084554672241,
-0.13854220509529114,
0.578747034072876,
-0.2659190595149994,
0.024018920958042145... | |
= new BufferedImage(Width, Height, BufferedImage.TYPE_INT_RGB);
Graphics MyGraphics = NewImage.createGraphics();
MyGraphics.drawImage(this.OutputImage, -SourceX, -SourceY, OutputWidth, OutputHeight, Color.WHITE, null);
// Get Writer and set compression
Iterator MyIterator = ImageIO.getImageWritersByFo... | [
0.2179499715566635,
-0.11298952996730804,
0.9436394572257996,
-0.3422650694847107,
-0.08526301383972168,
0.5721079707145691,
0.20896252989768982,
-0.6690744161605835,
-0.3785843253135681,
-0.7243804335594177,
-0.1522151231765747,
0.6680971384048462,
-0.23524436354637146,
-0.141124278306961... | |
MyImageWriter.setOutput(MyMemoryCacheImageOutputStream);
//create new ioimage
IIOImage MyIIOImage = new IIOImage(NewImage, null, null);
//write new image
MyImageWriter.write(null, MyIIOImage, MyImageWriteParam);
}
//convert output stream back to inputstream
ByteArrayInputS... | [
0.07897978276014328,
-0.15482822060585022,
0.7308200001716614,
-0.17700740694999695,
-0.09374123066663742,
0.3699430525302887,
0.4250234365463257,
-0.3068203330039978,
-0.06479302048683167,
-1.0623623132705688,
-0.055969204753637314,
0.5287554264068604,
-0.3709426820278168,
0.1735098809003... | |
;; ^J to execute.
```
`set-frame-width` isn't interactive, so you can't run it with `M-x` but you could trivially write a set-frame-width-interactive, something like
```
(defun set-frame-width-interactive (arg)
(interactive "p")
(set-frame-width (selected-frame) arg))
```
Now `C-u 8 0 M-x set-frame-width-int... | [
-0.04319199174642563,
0.0031378846615552902,
0.4139993190765381,
-0.25975674390792847,
0.08865970373153687,
-0.024654638022184372,
0.22878548502922058,
-0.08210514485836029,
-0.36612245440483093,
-0.4906170070171356,
-0.15180346369743347,
0.7802132368087769,
-0.49426689743995667,
-0.268606... | |
I would like to implement IXmlSerializable on a class and only override either ReadXml or WriteXml, but not both. If I didn't implement IXMLSerializable on this class, the XMLSerializer would automatically serialize all members. I'd like that default behavior to apply for the non-overridden case. However, since IXmlSer... | [
-0.05182481184601784,
-0.023895733058452606,
0.47387534379959106,
0.08878803998231888,
-0.21618777513504028,
-0.2288168966770172,
0.3529750406742096,
0.24934111535549164,
0.07344786077737808,
-0.7266128063201904,
-0.13135112822055817,
0.5795261263847351,
-0.6350674033164978,
0.275672882795... | |
be trivial if there was a base class, but not so trivial since this is an interface.
Thanks!
The ability to perform actions before/after serialisation/deserialisation is provided with attributes. Mark a method with [OnDeserializedAttribute](http://msdn.microsoft.com/en-us/library/system.runtime.serialization.ondeseria... | [
-0.012147322297096252,
-0.08922029286623001,
0.3502485454082489,
0.1502947062253952,
0.08148854225873947,
-0.1895868331193924,
0.3229506313800812,
-0.24874566495418549,
-0.200435608625412,
-0.5851901173591614,
-0.2520284950733185,
0.45481938123703003,
-0.42552611231803894,
-0.1788703799247... | |
to completely override one of serialisation or deserialisation (and thus implement `IXmlSerializable` then you have to do both yourself.
It may be possible to make use of attributes and other mechanisms to avoid using `IXmlSerializable`, could you expand the question with details of *why* you need to implement just on... | [
0.13550665974617004,
-0.03985897824168205,
0.12577272951602936,
0.2903802990913391,
0.06694874912500381,
-0.560348629951477,
0.15384690463542938,
-0.037531569600105286,
-0.021447336301207542,
-0.601337194442749,
-0.2583726644515991,
0.6076857447624207,
-0.34914469718933105,
-0.054072979837... | |
I get the following error while trying to publish a wpf clickonce application.
Error
1
Publish failed with the following error: Unable to cast COM object of type 'EnvDTE.DTEClass' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM c... | [
0.06690394133329391,
-0.08974484354257584,
0.622599720954895,
-0.04912666603922844,
-0.22849789261817932,
0.008587589487433434,
0.6952069401741028,
-0.13898523151874542,
-0.10358452051877975,
-0.7248671054840088,
0.05588800832629204,
0.549518883228302,
-0.34540995955467224,
0.1609760224819... | |
serialisation/deserialisation is provided with attributes. Mark a method with [OnDeserializedAttribute](http://msdn.microsoft.com/en-us/library/system.runtime.serialization.ondeserializedattribute.aspx) for it to be called after an instance has been deserialised, just ensure the method has the right signature:
```
[On... | [
-0.008240872994065285,
-0.13572566211223602,
0.5335596203804016,
0.2174329161643982,
0.012997831217944622,
-0.28983426094055176,
0.39797675609588623,
-0.2463376671075821,
-0.3259652853012085,
-0.6093676686286926,
-0.39851510524749756,
0.5355340242385864,
-0.36859917640686035,
0.29790580272... | |
to make use of attributes and other mechanisms to avoid using `IXmlSerializable`, could you expand the question with details of *why* you need to implement just one of `ReadXml` or `WriteXml`. | [
0.3250795006752014,
-0.16661113500595093,
0.007774233352392912,
0.33383607864379883,
-0.07218073308467865,
-0.22906768321990967,
-0.07074850052595139,
0.2409331202507019,
-0.1468796283006668,
-0.5346102118492126,
-0.11657986789941788,
0.4676058292388916,
-0.2207835614681244,
0.017264276742... | |
I am not a database person, exactly, and most of my db work has been with MySQL, so forgive me if something in this question is incredibly naïve.
I need to delete 5.5 million rows from an Oracle table that has about 100 million rows. I have all the IDs of the rows I need to delete in a temporary table. If it were a ju... | [
0.28024497628211975,
0.35752421617507935,
-0.004665608983486891,
0.06394761055707932,
0.04871917888522148,
0.07252345234155655,
0.051841914653778076,
-0.04681581258773804,
-0.0035597067326307297,
-0.685615062713623,
0.3369003236293793,
0.2526486814022064,
-0.1823057383298874,
0.15066429972... | |
doing a loop, something like this:
```
DECLARE
vCT NUMBER(38) := 0;
BEGIN
FOR t IN (SELECT id FROM temp_table) LOOP
DELETE FROM table_name WHERE id = t.id;
vCT := vCT + 1;
IF MOD(vCT,200000) = 0 THEN
COMMIT;
END IF;
END LOOP;
COMMIT;
END;
```
First of all - is this doing what I think i... | [
0.31895074248313904,
-0.2248014509677887,
0.038754962384700775,
-0.16731566190719604,
-0.08066552132368088,
-0.015333980321884155,
0.5550242066383362,
-0.4506061375141144,
-0.43831485509872437,
-0.18938244879245758,
0.06836438924074173,
0.3411850929260254,
-0.5720603466033936,
0.1834383457... | |
batches of 200,000, or to have one SQL statement and commit all at once.
Ideas? Best practices?
**EDIT**: I ran the first option, the single delete statement, and it only took 2 hours to complete in development. Based on that, it's queued to be run in production.
The first approach is better, because you give the que... | [
0.2292633056640625,
-0.3500122129917145,
0.019010117277503014,
-0.017697086557745934,
-0.16150052845478058,
0.4663611948490143,
0.13712503015995026,
-0.24898770451545715,
-0.4946606755256653,
-0.4025881886482239,
-0.03446968272328377,
0.09276733547449112,
-0.2888675928115845,
0.12374801933... | |
massive DELETE in Oracle which you might want to read. | [
-0.09755642712116241,
0.30491676926612854,
-0.19440048933029175,
0.42198532819747925,
-0.29128795862197876,
-0.10133688151836395,
0.3975647985935211,
0.645404040813446,
-0.18542757630348206,
-0.2651887834072113,
-0.0026816062163561583,
0.3792388141155243,
-0.22837762534618378,
0.2432180792... | |
**Update 2: I solved this, see my answer.**
---
I am invoking queries in a Microsoft Access database from C# using OleDb, but I can't get my update queries to work.
No error is thrown, but updates are not persisted in the database.
Can anyone shed any light on this?
---
**SQL query in the database:**
```
UPDAT... | [
-0.30171725153923035,
0.030787678435444832,
0.7379752993583679,
-0.030581409111618996,
-0.010769358836114407,
-0.11609473824501038,
0.3163215219974518,
-0.3087804615497589,
-0.3506958484649658,
-0.668242871761322,
-0.2037597894668579,
0.6561379432678223,
-0.5293828248977661,
0.108382157981... | |
database containing a single table and a single query and ensuring access is closed when I run the C# to update the table.
The update is still not performed. I suspect it's a syntax issue (could also be a permissions issue?), but without any error messages it's pretty hard to debug!
Just solved the issue - it was the... | [
-0.10376762598752975,
-0.10744684934616089,
0.6188714504241943,
0.18158645927906036,
-0.021547358483076096,
-0.226791113615036,
0.15199340879917145,
-0.2520516812801361,
-0.4613865613937378,
-0.3774918019771576,
0.1559918373823166,
0.5455448031425476,
-0.4434918463230133,
0.536729454994201... | |
updating the invoking C# with the parameter name change got it writing to the database.
**BUT, there was one other little nasty:** leaving the parameter ordering in the C# as is, caused the LastPolledDtg field in the database to be updated with the minimum date (1899 or something). Re-ordering the addition of the para... | [
-0.005282438360154629,
0.13867825269699097,
0.7408738136291504,
-0.17386123538017273,
-0.08363686501979828,
-0.11944197118282318,
0.5583764910697937,
-0.16529728472232819,
-0.6494477987289429,
-0.8250671029090881,
0.007988116703927517,
0.5622605681419373,
-0.27778661251068115,
0.6495016217... | |
I would like to know how to put text into the clipboard like some popular websites are able to do. I have seen sites like www.photobucket.com and www.hulu.com somehow make copying to the clipboard automatic and cross browser. How can I do the same?
I saw a cross browser way to do it using flash, but it won't work with... | [
0.6789095401763916,
0.021737942472100258,
0.044533003121614456,
0.2636767625808716,
0.14786165952682495,
-0.08965807408094406,
-0.20580999553203583,
0.20212522149085999,
-0.19307197630405426,
-0.6939980387687683,
0.49829408526420593,
0.5313411355018616,
0.013767185620963573,
-0.25088742375... | |
I have a large number objects which are tree like structures. I have a problem that the amount of memory the application uses starts to approach >1GB which means performance on the machine drops off and that there are out of memory instructions.
I managed to solve this by using sqlite to put the objects to tables and ... | [
0.11095837503671646,
0.45854514837265015,
0.20800332725048065,
0.15034432709217072,
-0.06272418051958084,
-0.12688270211219788,
0.44057992100715637,
-0.012523860670626163,
-0.39239501953125,
-0.6933412551879883,
0.37585484981536865,
0.3546540141105652,
-0.25928524136543274,
0.2643133699893... | |
a solution would be to somehow mimick the sqlite procedure and use some file back storage - is there anything that exists in pure dot net already or is it a complicated roll your own situation?
When you start storing a very large number of objects, object allocation overhead becomes a real issue. For example, with .NET... | [
0.21798798441886902,
-0.2622777223587036,
0.14670898020267487,
0.37328362464904785,
0.1065317839384079,
0.10779699683189392,
-0.15227653086185455,
-0.15514759719371796,
-0.5294640064239502,
-0.7775331735610962,
0.1339332014322281,
0.3792867362499237,
-0.3948301076889038,
0.1035204082727432... | |
a "tree like structure." Without more detail about your application, I can't say for certain that this applies, but most tree structures require pointers to child nodes and (sometimes) pointers back to the parent nodes. As useful as trees are, they sometimes incur very large overhead. It's not uncommon for the parent a... | [
-0.07085664570331573,
0.1842883974313736,
-0.08727558702230453,
0.43343231081962585,
-0.06644482910633087,
0.07541805505752563,
0.33687201142311096,
0.08380108326673508,
-0.2226123809814453,
-0.6152955293655396,
-0.348751962184906,
0.18348710238933563,
-0.09976529330015182,
0.0865588933229... | |
sometimes very inconvenient value type semantics.
It's possible, too, to collapse many tree structures into arrays, eliminating child and parent links and thereby saving tremendous amounts of memory. This usually comes at the cost of more complicated code and some loss in runtime efficiency.
In my work, I regularly h... | [
0.1976778656244278,
0.4316183626651764,
-0.2227185219526291,
0.38944098353385925,
0.17922762036323547,
0.11769156903028488,
0.4744529724121094,
0.016053777188062668,
-0.580321192741394,
-0.5811352133750916,
-0.10946250706911087,
0.3878296911716461,
-0.036886442452669144,
0.2093304842710495... | |
keep the entire thing in memory, then I would suggest that you make your tree nodes structs if at all possible. You should also consider alternate ways to store your tree--ways that eliminate explicit links to parents or children. Without more more information about your particular application, I can't make more specif... | [
0.3407561480998993,
0.001666772412136197,
-0.0731692686676979,
0.455118328332901,
0.0937073826789856,
-0.018021145835518837,
0.16965827345848083,
0.2418695092201233,
-0.19343221187591553,
-0.5648492574691772,
0.03535104915499687,
0.32004043459892273,
-0.11942321807146072,
0.060660924762487... | |
I am building a simple blog which is viewed single-page (do not worry, it is progressively built) and thus I am sending AJAX requests which return HTML to be inserted into the page.
What is the most efficient way to store/cache information (HTML) to be added at a later time into the DOM?
How much information (old ent... | [
0.26636582612991333,
0.23079118132591248,
0.38484326004981995,
-0.01493697427213192,
-0.3947860896587372,
-0.19144241511821747,
0.21425510942935944,
0.007661419454962015,
-0.26821911334991455,
-0.6063486337661743,
0.00965213868767023,
0.3976835012435913,
-0.0161986593157053,
0.184846222400... | |
(e.g. getHTML.php?article=4) so that it returns the HTML without really sending an AJAX request (after it has already been requested once)?
Thanks in advance,
Willem
I would recommend that you cache them somewhere inside the DOM itself, either at their natural place or in a "cache" `div`, just hide them or their cont... | [
0.1737176477909088,
0.058621928095817566,
0.39659252762794495,
0.1228463426232338,
-0.3822818696498871,
-0.30024537444114685,
0.32036706805229187,
-0.41462621092796326,
-0.4308134913444519,
-0.6900821328163147,
-0.09426993876695633,
0.416620135307312,
0.08280710130929947,
-0.19051022827625... | |
browser might also perform caching for your AJAX replies just like for regular pages.
Check out [this Browser-Side Cache article](http://ajaxpatterns.org/Browser-Side_Cache) for ideas, too. | [
0.20306044816970825,
-0.1688757836818695,
0.027837742120027542,
0.5126832127571106,
-0.30363330245018005,
-0.2906378507614136,
0.09076832979917526,
0.5716347098350525,
-0.3184942305088043,
-0.8403034806251526,
0.05263327807188034,
0.2091497927904129,
0.0987241268157959,
-0.2918038666248321... | |
I am writing a very simple RMI server, and I am seeing intermittent `java.rmi.NoSuchObjectExceptions` in the unit tests.
I have a string of remote method calls on the same object, and while the first few go through, the later ones will sometimes fail. I am not doing anything to unregister the server object in between... | [
0.16018261015415192,
0.40389931201934814,
-0.05263892561197281,
-0.006769794039428234,
-0.060748886317014694,
0.004374106414616108,
0.5962913036346436,
-0.019738590344786644,
-0.25252172350883484,
-0.548798680305481,
0.1147225871682167,
0.2295873612165451,
-0.3287447690963745,
0.0420029535... | |
server code (though maybe inside of the RMI stack?).
I am running this on Mac OS X 10.5 (Java 1.5) through Eclipse's JUnit plugin, and the RMI server and client are both in the same JVM.
What can cause these exceptions?
**Keep a strong reference to the object that implements the `java.rmi.Remote` interface so that it... | [
0.3841879367828369,
0.20597511529922485,
0.4033074378967285,
-0.17696444690227509,
-0.30332493782043457,
-0.22783666849136353,
0.38505518436431885,
-0.11481193453073502,
-0.14085355401039124,
-0.6264970302581787,
-0.07089157402515411,
0.24162673950195312,
-0.37943822145462036,
-0.089107833... | |
and invoke with your choice of command line arguments:
* **`-gc`** (default) Explicitly instruct the JVM to make "a best effort" to run the garbage collector after the server is started, but before the client connects to the server. This will likely cause the `Remote` object to be reclaimed by the garbage collector *i... | [
0.064006507396698,
0.06844305992126465,
0.12958624958992004,
-0.343511164188385,
0.1366102695465088,
-0.4200528860092163,
0.36370986700057983,
-0.06304012984037399,
-0.17382939159870148,
-0.49401789903640747,
-0.6311185956001282,
0.6385257244110107,
-0.24385838210582733,
-0.010222698561847... | |
strong reference is held or released *unless there is a sufficient **delay** between the server start and the client call such that the system "naturally" invokes the garbage collector and reclaims the `Remote` object*.
* **`-hold`** Retain a strong reference to the `Remote` object. In this case, a class variable refer... | [
-0.16517382860183716,
-0.1480119526386261,
0.6548831462860107,
-0.14235778152942657,
0.13809481263160706,
-0.2855681777000427,
0.44180765748023987,
-0.15598148107528687,
-0.1824232041835785,
-0.11450553685426712,
-0.7993485331535339,
0.4765850603580475,
-0.2509221136569977,
0.4937278926372... | |
Inserting a delay provides time for the garbage collector to run "naturally." This simulates a process that "works" initially, but fails after some significant time has passed. Note there is no space before the number of seconds. Example: `-delay5` will make the client call 5 seconds after the server is started.
Progr... | [
0.19642911851406097,
-0.47513848543167114,
-0.044944945722818375,
-0.3307414650917053,
0.06479683518409729,
0.08531522750854492,
0.04644468054175377,
-0.09747143089771271,
-0.37981992959976196,
-0.4288230836391449,
0.06625087559223175,
0.3860236704349518,
-0.40977683663368225,
0.2237537950... | |
RMITest -nogc -hold
received: foo
$ java RMITest -nogc -release
received: foo
$ java RMITest -gc -hold
received: foo
$ java RMITest -gc -release
Exception in thread "main" java.rmi.NoSuchObjectException: no such object in table
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:... | [
-0.22597083449363708,
0.306617796421051,
0.7191681265830994,
-0.27490952610969543,
0.04390307515859604,
0.17010612785816193,
0.35184812545776367,
-0.41076937317848206,
-0.28341928124427795,
-0.11226415634155273,
-0.16263993084430695,
0.5480502843856812,
-0.3661133348941803,
0.3928620219230... | |
static final String REMOTE_NAME = RemoteOperations.class.getName();
private static final RemoteOperations classVariable = new RMITest();
private static boolean holdStrongReference = false;
private static boolean invokeGarbageCollector = true;
private static int delay = 0;
public static void main(f... | [
-0.25432074069976807,
-0.25417348742485046,
0.6863865852355957,
-0.16595342755317688,
0.14931626617908478,
0.32723748683929443,
0.3187372386455536,
-0.14448928833007812,
-0.2040083110332489,
0.04297683760523796,
-0.3169752061367035,
0.6215648651123047,
-0.2894664704799652,
0.58263659477233... | |
= true;
} else if ("-nogc".equals(arg)) {
invokeGarbageCollector = false;
} else if ("-hold".equals(arg)) {
holdStrongReference = true;
} else if ("-release".equals(arg)) { | [
-0.09417498111724854,
0.09727268666028976,
0.7241846323013306,
-0.10075336694717407,
0.19270074367523193,
-0.0873488336801529,
0.1280367523431778,
-0.4555806815624237,
0.050659485161304474,
-0.11342910677194595,
0.08020203560590744,
0.8924021124839783,
-0.2984928488731384,
-0.0116694942116... | |
holdStrongReference = false;
} else if (arg.startsWith("-delay")) {
delay = Integer.parseInt(arg.substring("-delay".length()));
} else {
System.err.println("usage: javac RMITest.java && java RMITest [-gc] [-nogc] [-hold] [-release] [-delay<seconds>]");
... | [
-0.11191494017839432,
-0.16856859624385834,
0.6890381574630737,
-0.03257317095994949,
0.4327317774295807,
0.06799845397472382,
0.09531202912330627,
-0.5439662337303162,
-0.46980229020118713,
0.04030697047710419,
-0.2071995735168457,
0.5921829342842102,
-0.25841718912124634,
0.4421071410179... | |
}
}
server();
if (invokeGarbageCollector) {
System.gc();
}
if (delay > 0) {
System.out.println("delaying " + delay + " seconds");
final long milliseconds = MILLISECONDS.convert(delay, SECONDS); | [
-0.2137458473443985,
-0.5172052979469299,
0.8025408387184143,
-0.30705729126930237,
0.10485529899597168,
0.4117850065231323,
0.17116405069828033,
-0.1661330908536911,
-0.29168054461479187,
-0.2886583209037781,
-0.19313202798366547,
0.2538265287876129,
-0.08741263300180435,
0.49609383940696... | |
Thread.sleep(milliseconds);
}
client();
System.exit(0); // stop RMI server thread
}
@Override
public String remoteOperation() {
return "foo";
}
private static void server() throws Exception {
// This reference is eligible for GC after this method returns | [
0.06268000602722168,
-0.11705610901117325,
0.7091130018234253,
-0.30521315336227417,
0.18849410116672516,
-0.08985532075166702,
0.28508618474006653,
-0.0008794596651569009,
-0.34028950333595276,
-0.2603950500488281,
-0.2953451871871948,
0.3523280918598175,
-0.47504153847694397,
0.837802469... | |
final RemoteOperations methodVariable = new RMITest();
final RemoteOperations toBeStubbed = holdStrongReference ? classVariable : methodVariable;
final Remote remote = UnicastRemoteObject.exportObject(toBeStubbed, 0);
final Registry registry = LocateRegistry.createRegistry(Registry.REGISTRY_PORT... | [
-0.32935136556625366,
-0.29603007435798645,
0.9190822243690491,
-0.13581137359142303,
0.16482174396514893,
0.33155572414398193,
0.36064645648002625,
-0.24884682893753052,
-0.09533815085887909,
-0.5751152634620667,
-0.28520679473876953,
0.4455500543117523,
-0.18199798464775085,
0.8647696375... | |
final RemoteOperations stub = RemoteOperations.class.cast(remote);
final String message = stub.remoteOperation();
System.out.println("received: " + message);
}
}
``` | [
-0.16829723119735718,
-0.1580154299736023,
0.6738577485084534,
-0.3577926456928253,
0.11869774013757706,
0.2061014622449875,
0.4779241681098938,
0.03794603794813156,
-0.133231982588768,
-0.5412627458572388,
-0.4049791097640991,
0.3710634112358093,
-0.1776048243045807,
0.6924339532852173,
... | |
I'm basically trying to duplicate the behavior of the iPod app on the iPhone, where when you select a song, the music player view slides in, and the navigation bar transitions to a new color.
My app is set up as a tabbed based application, with `UITabBarController` and a nested `UINavigationController` in each tab. In... | [
0.1399480253458023,
-0.12570716440677643,
0.6275661587715149,
0.025133678689599037,
-0.008633039891719818,
0.49163252115249634,
0.1343352049589157,
0.03870879486203194,
-0.08890055865049362,
-0.7490608096122742,
0.2110441029071808,
0.6803362965583801,
-0.013182380236685276,
0.2569145262241... | |
to the iPod "Now Playing" page, which is nearly perfect.
The final problem is that I'm unable to transition the color of the navigation bar, like how the navigation bar in the iPod app fades from blue to black. I'm able to force the color change after the new view appears (in `viewWillAppear`), but the change is abrup... | [
0.050652287900447845,
-0.1812238246202469,
0.5837770104408264,
-0.16290441155433655,
0.30271923542022705,
0.22913247346878052,
0.22012966871261597,
0.105622798204422,
-0.3290059566497803,
-0.6034604907035828,
0.1364724338054657,
0.6975961923599243,
-0.13992495834827423,
0.25819745659828186... | |
way to do it.
You can animate the status bar style change to create an effect that's pretty close.
```
- (void)viewWillAppear:(BOOL)animated {
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque animated:animated];
self.navigationController.navigationBar.barStyle = UIBarStyleBlackO... | [
0.1396917849779129,
-0.39162227511405945,
0.7751688957214355,
0.05959893763065338,
0.2787255644798279,
0.13003580272197723,
0.32558804750442505,
0.09498929977416992,
-0.43000170588493347,
-0.8073350787162781,
-0.25857675075531006,
0.5732281804084778,
-0.046704672276973724,
-0.0619075186550... | |
I have a page where I'm fetching a Wordpress main index to handle my 'news feed', imported via jQuery.ajax. I'm also using typeface.js on the same page to have better typeface control. I want to call typeface.js on the elements in the Ajax'd HTML. The problem is that I'm not sure how to do that, since the structure of ... | [
0.31323960423469543,
0.14953067898750305,
0.3631007969379425,
0.01341754850000143,
-0.5090598464012146,
-0.10810566693544388,
0.16000759601593018,
0.3993109166622162,
-0.20653186738491058,
-0.752551794052124,
0.06674614548683167,
0.26099544763565063,
-0.10003145039081573,
0.042003843933343... | |
your document you can call:
\_typeface\_js.renderDocument()
which will render the new content | [
0.3019162714481354,
0.13987849652767181,
0.782887876033783,
-0.09962045401334763,
0.16552148759365082,
-0.1149589940905571,
0.047803886234760284,
0.21308766305446625,
0.09733932465314865,
-1.085882544517517,
-0.43723633885383606,
0.4530651867389679,
-0.07511914521455765,
0.1141013056039810... | |
I'm wondering if there's some sort of runtime mechanism that would observe the queries that are running against my database server; record how many queries of each "type" are running; look at the performance of these queries; then, based on this runtime data, suggest what indexes need to be added/removed.
I'm working... | [
0.24377210438251495,
-0.12594766914844513,
0.35746321082115173,
0.14009611308574677,
-0.12546324729919434,
-0.17083023488521576,
0.026762839406728745,
0.12993894517421722,
-0.11473651975393295,
-0.6719446182250977,
-0.07606571912765503,
0.6305322051048279,
-0.053934451192617416,
0.25749498... | |
the callee always calls AddRef() before returning, and the caller (you) always Release() when you are done.
You can use CComPtr<> to make this simpler, and it just does the right thing.
Now if you need to hand this pointer out to another object that expects it to be usable beyond the lifetime of your object, then you... | [
0.3761869966983795,
0.1108032763004303,
0.4909297525882721,
-0.003126114374026656,
0.35379382967948914,
-0.570534348487854,
0.046875666826963425,
-0.15398822724819183,
-0.3335680365562439,
-0.31178849935531616,
-0.4190824627876282,
0.7398446202278137,
-0.40710458159446716,
0.12421230971813... | |
Are there any best practices or examples of how to best integrate Facebook connect with an existing ASP.NET Application using the Membership provider (or something similar). I'm sure I can get something going, but, it would be great if there was some information and best practices on this to mitigate any security conce... | [
0.6241025924682617,
0.038168638944625854,
0.1748642921447754,
0.20885050296783447,
0.15707392990589142,
-0.2626778781414032,
0.21925081312656403,
0.09380858391523361,
-0.5050420761108398,
-0.6006902456283569,
0.1967049092054367,
0.2947068512439728,
0.15021111071109772,
-0.20507551729679108... | |
helpful for any information relating to ASP.NET MVC.
Some useful links i have found to date:
* <http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=45825>
* [Facebook Connect and ASP.NET](https://stackoverflow.com/questions/323019/facebook-connect-and-asp-net)
Look into RPXNow:
<https://rpxnow.com/>
It'll... | [
0.5357896089553833,
-0.05325649678707123,
0.47561272978782654,
0.1583108752965927,
-0.20497442781925201,
-0.0007957276538945735,
0.2749027609825134,
0.05911684036254883,
-0.4887569546699524,
-0.7204835414886475,
0.08669496327638626,
0.45615339279174805,
0.0035635456442832947,
0.05120642855... | |
**How should I design a "Proper" OO Pong?**
The idea of Proper being that any element can be changed: The shape of the ball, the court, and the paddles, adding obstacles, and even "powerups", like "can stick the ball to the paddle".
The two more pressing questions, right now, are:
* Who checks for colissions? and
* ... | [
0.32892078161239624,
0.2719368040561676,
0.43773066997528076,
0.22612594068050385,
0.0054941740818321705,
-0.24654972553253174,
0.20162929594516754,
-0.009961835108697414,
-0.09547284245491028,
-0.49413833022117615,
0.14794595539569855,
0.4069805443286896,
0.020309118553996086,
-0.16903479... | |
the "game physics" object would store, among other things, references to other game objects like the ball and paddles. The game physics object would have an "update" method that would be called continuously as the game runs. Some of the steps this method would perform are:
* Get the current position of the paddles (wh... | [
-0.16668342053890228,
0.09745708107948303,
0.4511350691318512,
0.44615814089775085,
-0.036565326154232025,
0.1390225887298584,
0.3172944188117981,
-0.2715209424495697,
-0.3125941753387451,
-0.579692006111145,
0.12739361822605133,
0.40252190828323364,
-0.04734363406896591,
-0.02093076705932... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.