text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
is already an object with that name in the project.
I have recently looked into my own POCO to consume the database, but have not been able to connect the dots to create a solution.
EDIT: Changed from "Two datasources" to "Two sets of tables in the same database". This was obviously confusing, my apologies.
Is it pos... | [
0.24923884868621826,
-0.09629293531179428,
0.19382606446743011,
0.26971831917762756,
0.16898168623447418,
-0.07760929316282272,
0.017397917807102203,
0.30175942182540894,
-0.33952322602272034,
-0.7284675240516663,
0.11024681478738785,
0.05936901271343231,
-0.18182167410850525,
0.2982952594... | |
I am trying to get the hang of C++ pointers and objects, through a small project implementing a simple Vehicle Routing Problem. Even though my code is currently working, I can't shake the feeling that my approach is completely wrong. What bugs me, are snippets of code such as :
```
std::map<const Route*, double>::ite... | [
0.02720610797405243,
0.06040751188993454,
0.33551162481307983,
0.023465150967240334,
0.09618023782968521,
-0.03516609966754913,
0.22460532188415527,
-0.24861952662467957,
-0.1650388538837433,
-0.4799407720565796,
-0.05437665060162544,
0.5320983529090881,
-0.20945456624031067,
0.16346679627... | |
return destination;
};
```
and
```
int Destination::getDemand() const {
return demand;
};
int Departure::getSupply() const {
return supply;
};
```
Am I completely off track here, am i missing something or is this type of situtation something normal?
Html.DropDownListFor has 6 overloads and all of them ta... | [
-0.09210221469402313,
-0.4847951829433441,
0.7164766192436218,
0.059279438108205795,
0.22043024003505707,
0.12643200159072876,
0.178054541349411,
-0.29065173864364624,
-0.4121909439563751,
-0.46514180302619934,
-0.15914078056812286,
0.4893287420272827,
-0.3614243268966675,
0.49268576502799... | |
ID=1, Itemstring="My Item1" },
new MyClass() { ID=2, Itemstring="My Item2" },
new MyClass() { ID=3, Itemstring="My Item3" }
}
model.ListToUse = model.MyClassList
.Select(x => new SelectListItem{ Value = x.ID, Text = x.Itemstring })
.ToList();
```
In the view:
```
@Html.DropDownListFor(x => x.ID, Mode... | [
-0.26874032616615295,
-0.35443419218063354,
0.7161628007888794,
-0.22249485552310944,
-0.05811099335551262,
0.22017082571983337,
0.21272169053554535,
-0.5098692774772644,
-0.4198737144470215,
-0.6067637205123901,
-0.19034643471240997,
0.3645232319831848,
-0.3215261399745941,
0.178694158792... | |
Can some body tell me the reason why we usually put const and & with some object which is passed in the constructor for example.
```
Book::Book(const Date &date);
```
The confusion that i have here is that usually & sign is used in the some function because the value is passed by reference and whatever changes happe... | [
0.5361721515655518,
0.3241336941719055,
0.4761142432689667,
0.09027062356472015,
-0.05607756972312927,
-0.26924121379852295,
0.12339524179697037,
0.03896329179406166,
-0.02376350574195385,
-0.44414299726486206,
-0.0847562849521637,
0.323318749666214,
-0.08588068187236786,
0.091606438159942... | |
unnecessary copy. Take, for example, the following code:
```
Book::Book(Date date):
date_(date)
{
}
```
When you call this constructor it will copy `date` twice, once when you call the constructor, and once when you copy it into your member variable.
If you do this:
```
Book::Book(const Date &date):
date_(date)
{
... | [
0.32821187376976013,
0.31395700573921204,
0.3295084834098816,
-0.06503177434206009,
0.09886506199836731,
-0.14050979912281036,
0.1716575026512146,
-0.2575528919696808,
-0.23276516795158386,
-0.5353766679763794,
-0.039489369839429855,
0.7807407379150391,
-0.5186783075332642,
0.3034645617008... | |
I am using the CreateEventLink method of the ComponentResources class to create a link to a delete event on my page called UserList using the following:
```
resources.createEventLink("delete", user.getUserId()).toURI();
```
The UserList page uses datatables to create a list of user's data and a delete link. When th... | [
0.26535680890083313,
0.0812615305185318,
0.4491724669933319,
-0.19173945486545563,
0.021126078441739082,
-0.14992542564868927,
0.33032914996147156,
-0.06338612735271454,
-0.23880541324615479,
-0.7965406775474548,
-0.15647263824939728,
0.49350211024284363,
-0.3518657088279724,
0.43657523393... | |
will stay on the Userlist page, but my datatable will reset itself to the first page.
After some research I haved discovered that the fnStandingRedraw plugin from datatables will fix this issue: `http://datatables.net/plug-ins/api`
Going through the documentation I have learned that I should use:
```
javaScriptSu... | [
0.08026538044214249,
-0.08717714250087738,
0.7104266881942749,
-0.42022591829299927,
0.09601008147001266,
0.019708318635821342,
0.18423102796077728,
-0.24029585719108582,
-0.4965042173862457,
-0.9292502403259277,
-0.3783888816833496,
0.4713308811187744,
-0.4399537742137909,
-0.094071716070... | |
// or when a record was modified it could be in the middle of the table
// that is probably not supposed to be there - due to filtering / sorting
// so we need to re process filtering and sorting
// BUT - if it is server side - then this should be handled by the server - so skip this step
if(oSettin... | [
0.10804849863052368,
-0.05137858912348747,
0.2823084890842438,
0.009348428808152676,
0.2808380722999573,
-0.152413010597229,
0.5122948884963989,
-0.344946026802063,
-0.3000236451625824,
-0.7335869073867798,
-0.12155964970588684,
0.25117629766464233,
-0.26360517740249634,
0.3996230661869049... | |
oSettings.oApi._fnReDraw(oSettings);
//iDisplayStart has been reset to zero - so lets change it back
oSettings._iDisplayStart = before;
oSettings.oApi._fnCalculateEnd(oSettings);
}
//draw the 'current' page
oSettings.oApi._fnDraw(oSettings);
};
```
However I get the error:... | [
-0.21673637628555298,
-0.07098344713449478,
0.7539949417114258,
-0.0923207625746727,
0.2979111671447754,
-0.0009209014824591577,
0.4831657409667969,
-0.14750269055366516,
-0.38092854619026184,
-0.700431227684021,
-0.40566286444664,
0.7926901578903198,
-0.14269231259822845,
0.07625732570886... | |
plugin to separate js file, so you can use it not only through tapestry initializer but also from other js.:
```
(function($) {
$.fn.dataTableExt.oApi.fnStandingRedraw = function(oSettings) {
if(oSettings.oFeatures.bServerSide === false){
var before = oSettings._iDisplayStart;
oSet... | [
0.026300663128495216,
-0.42958495020866394,
0.5623644590377808,
-0.14343509078025818,
0.24118906259536743,
0.052474331110715866,
0.37848687171936035,
-0.18602177500724792,
-0.16472551226615906,
-0.8813084959983826,
-0.31860458850860596,
0.6010884046554565,
-0.41222772002220154,
0.207899674... | |
oSettings._iDisplayStart = before;
oSettings.oApi._fnCalculateEnd(oSettings);
}
// draw the 'current' page
oSettings.oApi._fnDraw(oSettings);
};
})(window.jQuery);
```
So you can use it from other places as:
```
var oTable = $('.dataTable').dataTable();
oTable.fnStandingRedra... | [
-0.11732403188943863,
-0.12225326895713806,
0.8568183183670044,
-0.25262558460235596,
-0.13937656581401825,
0.23753635585308075,
0.12163195013999939,
-0.18158623576164246,
-0.47595977783203125,
-0.9243944883346558,
-0.438444584608078,
0.39514392614364624,
-0.3286653161048889,
0.00420171860... | |
sorting, filtering) and you do ajax request to delete row and delete this row from DataTable manually from js. | [
-0.40429893136024475,
-0.19548875093460083,
0.2243492156267166,
0.11377966403961182,
-0.04334694519639015,
0.046533096581697464,
-0.052068233489990234,
-0.2560800015926361,
-0.3449349105358124,
-0.8663722276687622,
-0.449405312538147,
0.3419695794582367,
-0.3147267997264862,
0.141097545623... | |
I have a asp.net website with c# code behind and using visual studio 2010.
I added a reference to a com object "Microsoft Excel 14.0 Object Library" to manage excel files in my website. I works well in debug, on my computer where I have excel installed, but when I publish the website and deploy it on my server, it cra... | [
0.12156417965888977,
0.44936904311180115,
0.34208595752716064,
0.0941949114203453,
-0.22114288806915283,
0.05181132256984711,
0.4425129294395447,
-0.2090299278497696,
-0.15723899006843567,
-0.6392607688903809,
0.2685685157775879,
0.360310822725296,
-0.3630305230617523,
0.1559886932373047,
... | |
local, like a dll, so that the website is able to use it even if excel is not installed?
There's a notion of PIA assemblies for Microsoft Office libraries. Basic idea is the following: to build solution you need to reference only PIA assemblies, that reference real office assemblies themselves. They may be distributed ... | [
0.20069168508052826,
0.02198544144630432,
0.04954415559768677,
0.296674519777298,
-0.1411539763212204,
-0.0108870854601264,
0.2435808628797531,
0.10421286523342133,
-0.14836537837982178,
-0.6386362910270691,
-0.07932280004024506,
0.4252578914165497,
-0.25002753734588623,
0.0516126081347465... | |
solution would be to check if office is installed and dynamically load the necessary assembly. Ideally, excel module should be isolated from the rest of the application. | [
-0.029166927561163902,
0.03835555911064148,
0.03696250915527344,
0.10179382562637329,
0.20462799072265625,
-0.2989717125892639,
0.09022907167673111,
-0.2556934654712677,
-0.13305878639221191,
-0.4101089537143707,
-0.41370975971221924,
0.31615370512008667,
-0.4024348855018616,
-0.2217064052... | |
I'm trying to check if `server-running-p` is available in my .emacs file before calling it. I already have the following:
```
(if (not (server-running-p))
(server-start))
```
But on some computers where I use Emacs, calling `(server-running-p)` gives an error because said call is not available. So I want to chec... | [
-0.15023933351039886,
0.37102004885673523,
0.5036148428916931,
-0.07382230460643768,
0.16610100865364075,
0.16963104903697968,
0.2926967442035675,
0.07638359814882278,
-0.35156258940696716,
-0.42072030901908875,
-0.157663494348526,
0.6543532609939575,
-0.5007041096687317,
0.032855339348316... | |
of weird object is `server-running-p` anyway that `boundp` returns `nil`, but calling it succeeds?)
This is on Emacs 23.2.1, if it makes any difference.
---
Actually found the answer. You have to use `fboundp` for this instead of `boundp`, for some reason.
`boundp` checks to see if a *variable* is bound. Since `serv... | [
-0.34505796432495117,
0.1949108988046646,
0.6637476086616516,
0.4265619218349457,
0.03423019126057625,
-0.541129469871521,
0.10069165378808975,
0.49977925419807434,
-0.3538758158683777,
-0.3270062506198883,
0.07350277155637741,
0.029147032648324966,
-0.36697864532470703,
0.4888211786746979... | |
Part of my n00b server:
```
TcpClient client = tcpListener.AcceptTcpClient();
Thread clientThread = new Thread(new ParameterizedThreadStart(handleClientRegistration));
clientThread.Start(client);
...
//and in the clientThread we wait for data
bytesRead = clientStream.Read(message, 0, 4096);
```
Now I'd like to write... | [
0.34792864322662354,
0.28656890988349915,
0.5209818482398987,
-0.0027377456426620483,
-0.053715724498033524,
0.0005507585010491312,
0.4219026267528534,
-0.10118914395570755,
-0.18852286040782928,
-0.6405790448188782,
0.07683515548706055,
0.5441965460777283,
-0.16532525420188904,
0.39602738... | |
you can fake all the received data you want.
E.g. Mocking the socket (simplified example):
Create an interface ISocket with all the methods you need:
```
public interface ISocket
{
ISocket Accept( int port );
byte[] Receive( int numberOfBytes );
bool Send( byte[] data );
void Disconnect();
bool C... | [
0.32568880915641785,
0.0662655308842659,
0.35579898953437805,
0.0308513380587101,
-0.23871880769729614,
0.26984065771102905,
0.4175719916820526,
-0.018953923135995865,
0.1052655577659607,
-0.7336153984069824,
0.14848090708255768,
0.5644121170043945,
-0.656033992767334,
0.3379836082458496,
... | |
Socket( AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp );
}
// implement all methods of ISocket by delegating to the internal socket
}
```
Wherever you would normally use a System.Net.Sockets.Socket, pass a ISocket instead. When you need to new up a Socket use Tc... | [
0.36361056566238403,
0.02475803904235363,
0.0681934729218483,
0.15755267441272736,
0.20445068180561066,
0.13873645663261414,
-0.05468630790710449,
-0.008527294732630253,
-0.13207915425300598,
-0.8546718955039978,
-0.07897303998470306,
0.3232104182243347,
-0.30444666743278503,
0.33849287033... | |
you can then pass a different implementation of ISocket (the Mock) (possibly created through the factory). You could implement your own mock by creating a second implementation of ISocket called MockSocket which returns test data in Receive or you could use on of the countless mock frameworks to do that for you.
```
p... | [
0.4779766798019409,
-0.011242557317018509,
0.20346689224243164,
0.14057062566280365,
-0.32018494606018066,
0.3707694411277771,
0.37701931595802307,
-0.373610258102417,
-0.06284961849451065,
-0.7004581093788147,
0.038231365382671356,
0.4911661446094513,
-0.2903101444244385,
-0.0547406673431... | |
{
return testData;
}
// you need to implement all members of ISocket ofcourse...
}
```
This might seen like a lot of effort, but in all but toy systems the boundary api should be hidden behind a thin layer not only for testing but also to stay flexible. If, for instance, you want to use a more pow... | [
0.6493843197822571,
-0.10772152990102768,
0.017917998135089874,
0.3553246557712555,
0.07986009120941162,
-0.4944629967212677,
0.02509908564388752,
-0.1571105420589447,
0.10823281109333038,
-0.5928108096122742,
0.09760867804288864,
0.5801413059234619,
-0.2645362615585327,
0.0892120674252510... | |
This is also the reason why programming to an interface instead of programming to a concrete implementation is usually a good idea: you can easily switch implementations (but that doesn't mean you should create interfaces to ALL your classes). If this all confuses you read more about mocking (like here: <http://en.wiki... | [
0.3266924023628235,
0.2750016450881958,
-0.14066104590892792,
0.24563418328762054,
-0.35305020213127136,
0.08307388424873352,
0.6190862059593201,
0.19456098973751068,
-0.30894988775253296,
-0.8445056080818176,
0.37046343088150024,
0.5620859861373901,
-0.252395361661911,
0.1500788778066635,... | |
Trying to use Jbuilder to create some JSON views for my app, but the views are coming out empty. Using the builder code in the console, however, works just fine.
Controller code:
```
@placements = Placement.all
respond_to do |format|
format.html
format.json
end
```
Jbuilder view (index.json.builder):
```
Jbuil... | [
-0.08547437191009521,
-0.004454117268323898,
0.6598984003067017,
-0.3768373727798462,
-0.2549213767051697,
0.2995763421058655,
0.4511324465274811,
-0.3690890073776245,
-0.1608303338289261,
-0.9048148393630981,
-0.0984654352068901,
0.36897245049476624,
-0.1971622109413147,
0.229664161801338... | |
json: @placements}
end
```
Has anyone else seen this problem?
@Robin - It was rendering the wrong template, but I had the wrong extension. I was using `builder` instead of `jbuilder`. | [
0.46418559551239014,
0.17667517066001892,
0.041676219552755356,
-0.2999383509159088,
-0.0608927346765995,
0.006665817927569151,
0.35414087772369385,
0.06689925491809845,
-0.28111380338668823,
-0.5622032284736633,
-0.08561550080776215,
0.6014519929885864,
-0.2386619597673416,
0.102815620601... | |
**Use case**: User fills out a form to add a product and register at once. When the user has submitted the combined form, the app authenticates the user and is logged in (assume validations passed) without the need to confirm or login.
I've removed the confirmable feature out, but when the user fill out the form, it ... | [
0.5147223472595215,
-0.009259235113859177,
0.5770571231842041,
-0.20175044238567352,
0.21292096376419067,
0.03480677306652069,
0.06696716696023941,
-0.3992982804775238,
-0.060224298387765884,
-0.5465816259384155,
-0.08299250155687332,
0.04556131735444069,
-0.27409446239471436,
0.0558828972... | |
I want to know if there's a shortcut/hotkey to switch between XAML to the designer. Doing WPF I like to code XAML full screen then check the design full screen. I've looked up Google, without success.
Something similar to the F7 shortcut to switch between code/design in winform probly exist for wpf.
You can switch fr... | [
0.33406469225883484,
-0.20154233276844025,
0.3908607065677643,
-0.06695440411567688,
-0.21048977971076965,
-0.08796090632677078,
0.298085480928421,
0.09962709993124008,
0.06531285494565964,
-0.866252601146698,
0.01937733218073845,
0.7467595934867859,
-0.1289122998714447,
0.1774147450923919... | |
I am using the following models in my django application and want to query across multiple fields. I looked around different places but couldnt find out what i exactly need.
```
class Attempt(models.Model, object):
'''Creates an Attempt Entity which is a subclass of models.Model class'''
attemptID_f = models.A... | [
-0.2556340992450714,
0.41152313351631165,
0.4281490743160248,
-0.26050761342048645,
0.14741672575473785,
0.09980121999979019,
0.2390681952238083,
-0.3889894187450409,
-0.05131327360868454,
-0.6411285400390625,
-0.2671731114387512,
0.4814024865627289,
-0.349295973777771,
-0.2034953385591507... | |
true = right, false = wrong", blank=True, default=False)
timeOfSubmission_f = models.DateTimeField("Time of Submission", null=False)
compilerVersion_f = models.ForeignKey(CompilerVersion, verbose_name = "Compiler version of the Attempt",null=False)
class Question(models.Model, object):
'''Creates the entit... | [
-0.35223254561424255,
0.07663291692733765,
0.3157237470149994,
-0.08842761069536209,
0.20723079144954681,
0.09542296826839447,
0.2619807720184326,
-0.4146729111671448,
-0.0661005824804306,
-0.41219669580459595,
-0.5650675892829895,
0.3454235792160034,
-0.285794198513031,
0.0249061156064271... | |
= models.FloatField("Time Limit for Question",null=False)
class Type(models.Model):
'''Creates the entity Type which is a subclass of models.Model class'''
typeID_f = models.AutoField(primary_key=True)
typeName_f = models.CharField("Type Name" , max_length = 30 , null = False)
typesm = Attempt.objects.fil... | [
-0.213650643825531,
0.11740037798881531,
0.5238750576972961,
-0.15692660212516785,
0.10341081023216248,
0.1254994422197342,
0.15874464809894562,
-0.5465903878211975,
-0.1970759928226471,
-0.5473474860191345,
-0.18102507293224335,
0.48448267579078674,
-0.259523868560791,
-0.1394157856702804... | |
querying the `Attempt` model.
See: [Lookups that span relationships](https://docs.djangoproject.com/en/1.4/topics/db/queries/#lookups-that-span-relationships) | [
0.04922639578580856,
0.18017566204071045,
-0.015942778438329697,
-0.07365711033344269,
-0.1094571202993393,
-0.29556286334991455,
0.1589219719171524,
-0.4152631163597107,
-0.33040958642959595,
-0.24872291088104248,
-0.07301715016365051,
0.5009649395942688,
-0.28714480996131897,
-0.34051290... | |
I'm working on creating an app for in house distribution enterprise level. I've created the app and tested hosting it on my own server and even getting the click to install working. Now though I have some updates to the app, I make the edits and I even see them in the simulator. When I build and archive the app things ... | [
0.7119446992874146,
0.22720716893672943,
0.38174891471862793,
-0.07827968895435333,
0.2127547711133957,
0.1637156456708908,
-0.07454194128513336,
0.05363568663597107,
-0.08464381843805313,
-0.7115890979766846,
0.21504871547222137,
0.28078383207321167,
0.03657016158103943,
0.090874239802360... | |
Then I upload the app to my server and update any links to point to this new app. The click to install still works properly, but it installs the old version of the app. I've even tried this on a new device. Is there some step I'm mission that tells Xcode some version to build? If so, I don't get is how the simulator sh... | [
0.27693620324134827,
0.0729086622595787,
0.43276938796043396,
0.22788402438163757,
0.043822742998600006,
0.022981353104114532,
0.3931635618209839,
-0.031083494424819946,
-0.20247328281402588,
-0.7385756373405457,
-0.010566159151494503,
0.7336823344230652,
-0.08040859550237656,
0.0487806834... | |
after build and archive is only 1.4MB (the update involves a lot of added images), so is the build for archive is not even getting the new files?
I figured it out and thought I should post it in case it helped someone else.
I cleaned the project.
Build > Clean - not 100% on what "Clean" is supposed to mean/do, but it... | [
0.8882182240486145,
0.06343328952789307,
0.17178140580654144,
0.1166631281375885,
-0.035045936703681946,
-0.20916925370693207,
0.29818615317344666,
-0.20970121026039124,
-0.08556938171386719,
-0.6311514973640442,
0.174849733710289,
0.3276534676551819,
0.14174088835716248,
0.094473421573638... | |
According to [LogEntries documentation](https://logentries.com/doc/appharbor/ "LogEntries documentation") Account key should be filled in Web.config file. At the same time, it exists in AppHarbor configuration variables.
Can I read the value from the configuration variables instead of using hard-coded value?
the le\_nl... | [
0.15635870397090912,
-0.06979303807020187,
0.4323013126850128,
0.1285828799009323,
0.3258386254310608,
0.1473468840122223,
0.2523609697818756,
-0.07882416248321533,
-0.4638323187828064,
-0.7557047605514526,
-0.05360198765993118,
0.9715330004692078,
-0.13916750252246857,
-0.1563805341720581... | |
local machine, in which case the config variables should be pasted into your web.config in the appSettings section which is now included in the web.config.transform of the le\_nlog package | [
-0.05604906752705574,
-0.2032003402709961,
0.38599497079849243,
0.11514214426279068,
0.24153007566928864,
0.15595360100269318,
0.31490853428840637,
0.26380103826522827,
-0.35413849353790283,
-1.1590803861618042,
-0.4797740578651428,
0.8142052292823792,
-0.5850122570991516,
-0.2473562359809... | |
Are there any tools which generate a project layout for python specific projects, much similar to what maven accomplishes with `mvn archetype:generate` for java projects.
It is the good news: you do not need any tool. You can organise your source code in any way you want.
Let recap why we need tools in the java world... | [
0.34845802187919617,
-0.07316843420267105,
-0.4165852963924408,
0.05853268504142761,
-0.19120661914348602,
-0.2596902549266815,
0.148288756608963,
0.015358311124145985,
-0.4208308756351471,
-0.5137245655059814,
-0.18791687488555908,
0.5598204135894775,
-0.29583844542503357,
-0.005213240627... | |
convention for file location. You want to have tools to automate this.
Secondly, different artefacts require use of different goals and even additional maven projects (e.g. a ear project requires a few jars and war artefacts). There are so many files to create you want to have tools to automate this.
The complexity m... | [
0.31193166971206665,
0.04694345220923424,
-0.2311825454235077,
0.11247886717319489,
0.08581163734197617,
-0.2922136187553406,
0.19324025511741638,
-0.19977626204490662,
-0.5746932625770569,
-0.7054991722106934,
-0.22773584723472595,
0.6842559576034546,
-0.1875760853290558,
0.07145457714796... | |
a bigger size (LOC or team size), it makes sense to group `.py` files into modules in whatever way makes sense to you and your peers.
At the end of the days, it is about striking a balance between ease of maintenance and readability. | [
0.3019345998764038,
-0.08063215017318726,
0.06884375959634781,
0.36145174503326416,
0.38558006286621094,
-0.5316356420516968,
-0.30921608209609985,
-0.3748311996459961,
-0.6794801950454712,
-0.5726281404495239,
-0.5891414284706116,
0.20483367145061493,
0.09369059652090073,
-0.2229525595903... | |
Im trying to make a curtain effect where when the function is executed while the curtain is down it will go up and vice versa. Heres what i have so far.
HTML
```
<div id="curtain"></div>
```
CSS
```
#curtain {
width: 791px;
height: 449px;
background: url(/assets/curtain.png) no-repeat;
position: ab... | [
0.14415672421455383,
-0.38991886377334595,
0.7143750190734863,
-0.35840657353401184,
0.171265110373497,
0.3503633141517639,
0.4849624037742615,
-0.49569180607795715,
-0.281645268201828,
-0.5198737382888794,
-0.3260148763656616,
0.3928723633289337,
-0.5264995098114014,
0.21074248850345612,
... | |
{backgroundPosition:"(0 -250px)"},
{duration:500})
} else {
$('#curtain').stop().animate(
{backgroundPosition:"(0 0)"},
{duration:500})
}
}
$("#wall-right").click(function() {
$("#frame").attr('src', 'http://player.vimeo.com/video/27748543');
curtain();
});
```
Nothi... | [
0.17099736630916595,
-0.3929956257343292,
1.0118457078933716,
-0.14355571568012238,
0.023122387006878853,
-0.08379286527633667,
0.24629490077495575,
-0.1485326588153839,
-0.41854482889175415,
-0.5323437452316284,
-0.020093517377972603,
0.7051272988319397,
-0.23504801094532013,
0.1414729654... | |
id="curtain" class="closed"></div>
```
And update your JavaScript.
```
var $curtain = $("#curtain");
var curtain = function() {
var isClosed = $curtain.hasClass('closed');
if (isClosed) {
$curtain.removeClass("closed").stop().animate({
"background-position-y" : "-250px"}
, 2000);
} else {
$... | [
0.12259449809789658,
-0.3373127579689026,
0.8229774832725525,
-0.2203286737203598,
0.26212242245674133,
0.25600695610046387,
0.17672249674797058,
-0.4432061016559601,
-0.37635231018066406,
-0.7161782383918762,
-0.14580288529396057,
0.30922791361808777,
-0.5326048135757446,
0.49024882912635... | |
I'm new to the android framework and I wonder if it is possible to call the same activity from a TabHost? I have 3 tabs and every tab populate a list but different values. I want to filter the list in the tabs. Every tab's data build from the list, that's why I don't want to make 3 different Activity. It is possible wi... | [
0.3194025158882141,
0.0439455509185791,
0.22847767174243927,
0.07389944046735764,
-0.25268056988716125,
0.01625903882086277,
0.21749988198280334,
-0.15708665549755096,
-0.5881698131561279,
-0.29584062099456787,
0.04398634284734726,
0.5355432629585266,
-0.34862425923347473,
-0.4896918535232... | |
with the correct AspectJ libraries. That is you'll just use its pom file that it generates. You can try to use plain Eclipse and download all the plugins (which is what I do) but its PITA to get everything setup correctly.
The key thing is to get the AspectJ compiler to run instead of the regular Java compiler. This r... | [
0.5513703227043152,
-0.008553138934075832,
-0.08566167205572128,
-0.004707179497927427,
-0.6902925372123718,
-0.17856353521347046,
0.08459044992923737,
0.18136106431484222,
-0.11779255419969559,
-0.7803293466567993,
0.0343501977622509,
0.7411196231842041,
-0.2917134463787079,
-0.4232778549... | |
"add natures" "Or convert to...".)
You'll also in Eclipse need to add the Spring Aspects jar to the "Aspect Libraries" which is not the classpath/buildpath. | [
0.2629629969596863,
-0.32172924280166626,
0.09468217194080353,
0.10362116992473602,
-0.42985987663269043,
0.0013784320326521993,
0.08076810836791992,
-0.2729911506175995,
-0.08369489759206772,
-0.649901270866394,
-0.11649371683597565,
0.7488494515419006,
-0.2197190225124359,
-0.64647805690... | |
I don't know either my implementation have bugs or `StringBuilder` is going wrong. From the stackoverflow, i got to know that `Java Strings` are immutable. Currently i am doing some string processing in a recursive fashion using `StringBuilder`. To make recursion more clear and understandable i am using a `Queue` to st... | [
0.029972070828080177,
0.1656302958726883,
0.14822499454021454,
-0.3109169602394104,
-0.01221766509115696,
0.0024766819551587105,
0.369888573884964,
-0.019228287041187286,
-0.25363191962242126,
-0.5147976875305176,
0.11229000240564346,
0.48071756958961487,
-0.44618678092956543,
0.2825384438... | |
resultant `StringBUilder` is added to the `Queue`. Then an element(`StringBuilder`) is removed from the `Queue` and processed with for loop in the same previous manner. This process is repeated until the `Queue` is not empty. Below is my code snippet-
```
Queue<StringBuilder> q = new LinkedList<StringBuilder>();
... | [
0.01883566565811634,
-0.0839582085609436,
0.7158379554748535,
-0.3705747723579407,
-0.11243981868028641,
0.3904319107532501,
0.2557830512523651,
-0.6952680349349976,
-0.40001562237739563,
-0.2794232964515686,
-0.026681801304221153,
0.21952562034130096,
-0.2268410474061966,
0.39384570717811... | |
/*
* Here i am matching charAt(i) with charAt(i+1) and based on
* the characters matching decision is done
*/
StringBuilder rep = new StringBuilder(len - 1);
rep = sb; | [
-0.18308839201927185,
-0.3054293990135193,
0.40606391429901123,
-0.3603593707084656,
-0.31345438957214355,
0.4463315010070801,
0.38317734003067017,
-0.5572525262832642,
-0.3023715913295746,
-0.4423118829727173,
-0.18716613948345184,
0.2739178240299225,
-0.2205374836921692,
0.05969068780541... | |
rep.replace(i, i + 2, replace);//replace is a string which is a character
q.add(rep);
}
}
```
This gives me `StringIndexOutOfBoundsException`. However i am not changing the content of original `StringBuilder`, which is sb. I am just creating a copy of `sb` which is `rep`, then replacing... | [
0.07229559868574142,
-0.1099158450961113,
0.5164315104484558,
-0.36575934290885925,
-0.27205294370651245,
0.27163439989089966,
0.40974122285842896,
-0.48048391938209534,
-0.31082260608673096,
-0.551222026348114,
-0.2178337723016739,
0.7056745886802673,
-0.6853291392326355,
0.27219253778457... | |
are now pointing to the same StringBuilder instance. | [
0.27603596448898315,
0.1259111911058426,
0.3667271137237549,
0.05180228874087334,
-0.1102108433842659,
-0.2067558765411377,
0.00923896860331297,
0.38456231355667114,
-0.3853635787963867,
-0.8282164335250854,
-0.024293266236782074,
0.21936295926570892,
-0.057403262704610825,
0.3603885471820... | |
I was recently working on a project that involving connection to a POP3 Server. I was using this piece of C# from CodeProject(<http://www.codeproject.com/Articles/6062/A-POP3-Client-in-C-NET>), had complied it into a DLL and was using it in VB.NET.
I'd connected to my Hotmail Account (not many mails) and it seems to w... | [
0.31340596079826355,
0.07316398620605469,
0.5071139335632324,
-0.078780397772789,
-0.21649061143398285,
0.03823934867978096,
0.45750316977500916,
0.3575489819049835,
-0.4667811393737793,
-0.4114783704280853,
0.19791074097156525,
0.29841819405555725,
-0.3802556097507477,
0.08746998012065887... | |
which is about 5 times less than the actual inbox size.

255 Emails in my Inbox?? Online it shows me 2,414 emails in my Inbox.
And secondly, my MAIN QUESTION is that how does one fetch the LATEST email from the POP3 Mailbox. What I've fetched here was an e-mail with ID 1! I wan... | [
0.12648838758468628,
-0.15354998409748077,
0.516606867313385,
0.23723691701889038,
-0.35391363501548767,
0.26004016399383545,
0.2573986351490021,
-0.10117339342832565,
-0.6111457347869873,
-0.5812715291976929,
0.09947159141302109,
0.37769925594329834,
0.12994608283042908,
0.087385065853595... | |
"RETR 1" command fetches me the oldest email and not the latest one! Any known work-around?
I think your question is answered here: "Incorrect message count using STAT command" <http://groups.google.com/group/Gmail-Help-POP-and-IMAP-en/browse_thread/thread/8be2c0b2bf383c15/7c57310cd5b11fc9?pli=1>
[Update on 2016-06-30... | [
-0.07989176362752914,
-0.12789252400398254,
0.8382931351661682,
0.03177759423851967,
-0.2920086681842804,
0.14567269384860992,
0.47005969285964966,
-0.15592944622039795,
-0.40887734293937683,
-0.5147073268890381,
-0.47004804015159607,
0.5205183029174805,
-0.4354039132595062,
0.228685930371... | |
I'm trying to send post data between pages with Post. Not a form - like I may be passing validation error between pages or something (using it in several places).
The cURL is executing fine, but it's just tacking on the new page at the bottom. How can I execute a cURL Post and load the following page?
So my goal is t... | [
0.5336683392524719,
0.10503726452589035,
0.44149520993232727,
-0.07318667322397232,
-0.40826359391212463,
-0.1633995920419693,
0.4645945131778717,
0.0411108061671257,
-0.10310730338096619,
-0.6747781038284302,
0.2403692901134491,
0.014218563213944435,
-0.3737446665763855,
0.254884392023086... | |
session as sending private data between pages.
Thanks
```
$ch = curl_init($some_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'myvar=something');
curl_exec($ch);
curl_close($ch);
```
I doubt the code has any relevance, as it's about performing a task not code syntax (there may be ... | [
0.1558273732662201,
-0.07013221830129623,
0.74739009141922,
0.12859566509723663,
-0.44580963253974915,
-0.2036389410495758,
0.7953459620475769,
0.08296491205692291,
-0.37359726428985596,
-0.5791168212890625,
-0.5198860168457031,
0.5731294751167297,
-0.3387245535850525,
0.09071410447359085,... | |
I read the MSDN documentation and examples [here](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.parameters.aspx) and I know that the correct syntax for a `Paramters.Add` call is :
```
command.Parameters.Add("@ID", SqlDbType.Int);
command.Parameters["@ID"].Value = customerID;
```
Whe... | [
0.19545207917690277,
0.15063954889774323,
0.6111270189285278,
-0.18638795614242554,
-0.075304314494133,
0.22876036167144775,
0.3042985796928406,
-0.41471007466316223,
-0.27883341908454895,
-0.29673585295677185,
-0.11289303749799728,
0.5962162017822266,
-0.5096536874771118,
0.10542757809162... | |
work properly when the code is executed ?
There is no difference in terms of functionality. In fact, both do this:
```
return this.Add(new SqlParameter(parameterName, value));
```
The reason they deprecated the old one in favor of `AddWithValue` is to add additional clarity, as well as because the second parameter i... | [
0.5618136525154114,
0.13604892790317535,
0.2732103765010834,
-0.19246849417686462,
-0.03624439239501953,
-0.34407079219818115,
0.5945718288421631,
-0.589584469795227,
-0.11880860477685928,
-0.48441818356513977,
-0.19541481137275696,
0.9830607175827026,
-0.438187837600708,
-0.03760450333356... | |
calling the `Add(string name, SqlDbType type)` overload! This is because 0 is implicitly convertible to enum types. So these two lines:
```
command.Parameters.Add("@name", 0);
```
and
```
command.Parameters.Add("@name", 1);
```
Actually result in two different methods being called. `1` is not convertible to an ... | [
-0.03984178975224495,
0.10194425284862518,
0.07699155062437057,
-0.12611430883407593,
-0.13196629285812378,
-0.0029172420036047697,
0.2166081964969635,
-0.3096352219581604,
0.17075392603874207,
-0.4171929955482483,
-0.12446311861276627,
0.6718995571136475,
-0.5887365341186523,
0.1355262100... | |
I am working on an Android Application in which a 3d scene is displayed and the user should be able to select an area by clicking/tapping the screen. The scene is pretty much a planar (game) *board* on which different objects are placed.
Now, the problem is how do I get the clicked area on the board from the actual ... | [
0.03226912394165993,
0.0995802953839302,
0.8964673280715942,
-0.2985711097717285,
0.07648105919361115,
0.5147898197174072,
0.15861569344997406,
-0.10695800185203552,
-0.28040969371795654,
-0.5908170342445374,
0.0373506098985672,
0.4624991714954376,
0.008143030107021332,
0.14325551688671112... | |
different thread than the GL-thread.
My new plan is to still use gluUnProject, but with a `winZ` of 0, and then project the resulting point onto the board (the board stretches from `0,0,0` to `10,0,10` in model space), However, I can't seem to figure out how to do this?
I would be very happy if anyone could help me... | [
-0.036781322211027145,
-0.10317851603031158,
0.7320010662078857,
-0.16262918710708618,
0.11467648297548294,
0.2109522819519043,
-0.16312699019908905,
0.02611818164587021,
-0.5078326463699341,
-0.7445110082626343,
0.15136516094207764,
0.1492891162633896,
-0.20328323543071747,
0.307802557945... | |
x is the touch event and the black square is the board (grey subdivisions represent a square of one unit). I need to figure out where on the board the touch has happened (in this case it is in square 1,1).
So, I managed to solve this by doing the following:
```
float[] clipPoint = new float[4];
int[] viewport = new in... | [
-0.13546040654182434,
-0.08006054908037186,
1.0498842000961304,
0.003202645806595683,
-0.02630036137998104,
0.1262960284948349,
-0.3676876425743103,
-0.2772120237350464,
-0.04365190491080284,
-0.8096529245376587,
0.2797214388847351,
0.41232720017433167,
-0.12942726910114288,
0.134113743901... | |
vMatrix, 0, pMatrix, 0, viewport, 0, clipPoint, 0);
//Get a point representing the 'camera':
float eyeX = lookat[0] + eyeOffset[0];
float eyeY = lookat[1] + eyeOffset[1];
float eyeZ = lookat[2] + eyeOffset[2];
//Do some magic to calculate where the line between clipPoint and eye/camera would intersect the y-plane:
f... | [
0.36295557022094727,
-0.34657835960388184,
1.2037299871444702,
0.11330558359622955,
0.0630267933011055,
0.2780090868473053,
-0.05055147036910057,
-0.6729491353034973,
-0.2245534360408783,
-0.4551008343696594,
-0.06386183947324753,
0.9387749433517456,
-0.323173463344574,
0.07995593547821045... | |
I am trying to use matplotlib to create a graph to reflect real time results. I am probably not doing this correctly, because moving the window, changing windows, or clicking things causes the graph to freeze. Below is an example of what I mean.
```
import matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.m... | [
-0.028004398569464684,
-0.086275115609169,
0.6844028830528259,
-0.08204551041126251,
-0.2609750032424927,
0.4662086069583893,
0.2242066115140915,
-0.22149664163589478,
-0.3093154728412628,
-0.7077903151512146,
-0.04722193628549576,
0.32675901055336,
-0.603930652141571,
-0.01470348704606294... | |
ax.bar(indexs, heights, zs = rows, zdir='y', color=colors, alpha=0.8)
plt.ion()
plt.draw()
plt.show()
plt.ioff()
return varse
varse = 0
plt.ion()
fig = plt.figure()
plt.ioff()
while(1):
varse = function1(fig, varse)
```
The way I solved was to use tk as a gui:
```
import matplotlib
matplotlib.use('TkAgg... | [
-0.22279822826385498,
0.000991491717286408,
0.6625935435295105,
-0.1004384458065033,
-0.2452811300754547,
0.5374829769134521,
0.15724322199821472,
-0.7200049161911011,
-0.256714791059494,
-0.5036251544952393,
-0.24654656648635864,
0.6607212424278259,
-0.6493146419525146,
-0.173919558525085... | |
indexs = np.arange(5)
heights = [varsi,varsi/2,varsi/3,0,0]
ax.bar(indexs, heights, zs = rows, zdir='y', color=colors, alpha=0.8)
return fig
class App():
def __init__(self):
self.root = tk.Tk()
self.root.wm_title("Embedding in TK")
self.fig = plt.figure()
self.... | [
-0.13587088882923126,
0.14994113147258759,
0.6074563264846802,
-0.09901406615972519,
-0.05953751504421234,
0.622093677520752,
0.22113844752311707,
-0.5003799200057983,
-0.3004271686077118,
-0.5333897471427917,
-0.2684234082698822,
0.37889209389686584,
-0.4746854603290558,
-0.00055374670773... | |
self.ax.set_ylabel('Y')
self.fig = function1(self.fig, self.ax)
self.canvas = FigureCanvasTkAgg(self.fig, master=self.root)
self.toolbar = NavigationToolbar2TkAgg( self.canvas, self.root )
self.toolbar.update()
self.canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=1)
... | [
-0.1001816987991333,
-0.11793427914381027,
0.7033684849739075,
-0.326674222946167,
-0.04082497954368591,
0.2260843962430954,
0.41253381967544556,
-0.49961552023887634,
-0.3718888461589813,
-0.7323833107948303,
-0.17570486664772034,
0.7317022085189819,
-0.4114924371242523,
-0.30265790224075... | |
self.fig = function1(self.fig,self.ax)
self.canvas.show()
self.canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=1)
now = time.strftime("%H:%M:%S")
self.label.configure(text=now)
self.root.after(1000, self.update_clock)
app=App()
```
This allows me to retain control of t... | [
0.014987265691161156,
0.1101725772023201,
0.8932480812072754,
-0.35087060928344727,
-0.1615654081106186,
0.2546001374721527,
0.6841164231300354,
-0.32470619678497314,
-0.4803733229637146,
-0.832295835018158,
0.05956601724028587,
0.5376269817352295,
-0.22857540845870972,
0.02061841450631618... | |
I have the below code:
```
Sheet1.Range("AB3").Value = Application.WorksheetFunction.AverageIfs( _
.Range("AB5:AB" & CStr(i)), _
.Range("AB5:AB" & CStr(i)), _ | [
0.16563504934310913,
0.396241694688797,
0.6719948649406433,
-0.46101129055023193,
-0.06883451342582703,
0.12300552427768707,
0.5150853395462036,
-0.5722652673721313,
0.2616317570209503,
-0.7331013679504395,
0.19906650483608246,
0.46877777576446533,
-0.241762176156044,
0.13984203338623047,
... | |
">=0", .Range("AB5:AB" & CStr(i)), "<>N/A")
```
To get the average of a range and exclude `-ve` values and `N/A` values, but there is a moment when all range is `N/A`, so I'm getting the following error:
```
unable to get the average property of the worksheetfunction class
```
To avoid that I tried this:
```
She... | [
0.06873621046543121,
0.2911052107810974,
0.2936040759086609,
-0.4296930134296417,
-0.18222567439079285,
0.12391359359025955,
0.5612910985946655,
-0.7265039086341858,
0.14480486512184143,
-0.4945664703845978,
-0.05137960985302925,
0.6423555612564087,
-0.3202575147151947,
-0.0387723669409751... | |
.Range("AB5:AB" & CStr(i)), _
.Range("AB5:AB" & CStr(i)), ">=0", _
.Range("AB5:AB" & CStr(i)), "<>N/A"), "N/A")
```
But | [
0.15680639445781708,
0.3028775751590729,
0.49071311950683594,
-0.3914145827293396,
0.22734500467777252,
0.14993342757225037,
0.45624497532844543,
-0.47327834367752075,
-0.01001041941344738,
-0.3930359184741974,
-0.5465842485427856,
0.5718080997467041,
-0.2010396420955658,
0.134530633687973... | |
with no luck. Any help will be appreciated.
EDIT:
In excel it works ok, but not in vba (in the code behind)
Just doing a little test in excel it works fine:
```
=IFERROR(AVERAGEIFS(AF5:AF10,AF5:AF10,"<>n/a"),"N/A")
```
in the above formula if data in range "AF5:AF10" is all "n/a", the formula returns "N/A" which ... | [
-0.0743887796998024,
0.20515529811382294,
0.4067206084728241,
-0.17591772973537445,
-0.1794879138469696,
0.1633363515138626,
0.4387938976287842,
-0.7118517756462097,
-0.04767502099275589,
-0.48567280173301697,
0.21596644818782806,
0.650837779045105,
-0.11886478960514069,
-0.336176753044128... | |
& CStr(i) & ",""<>n/a""),""N/A"")"
Sheet1.Range("B3").Value = Sheet1.Range("AB3").Value
End Sub
Sub Test2()
Dim strFormula As String
Dim i As Long
i = 10
strFormula = "=IFERROR(AVERAGEIFS(AF5:AF" & CStr(i) & ",AF5:AF" & CStr(i) & ",""<>n/a""),""N/A"")"
Sheet1.Range("AB3").Value = Application.Evaluate(strFormula)
End ... | [
-0.019437283277511597,
0.09553258866071701,
0.992638349533081,
-0.23931364715099335,
-0.12411875277757645,
0.23260638117790222,
0.5044646263122559,
-0.7183806896209717,
-0.1110275611281395,
-0.2968953847885132,
-0.36693859100341797,
0.39500266313552856,
-0.36535564064979553,
0.156371727585... | |
I am using NHibernate 3.0 and was comparing Query and QueryOver
```
var p = _prepo.Query<Party>()
.Where(c => c.Person.LastName == "Bobby")
.FirstOrDefault();
```
The above works, I get proxy class for p.Person if I view the object graph.
```
var p = _prepo.QueryOver<Party>()
.Wh... | [
-0.5241747498512268,
0.1181703433394432,
0.38590049743652344,
-0.2556082010269165,
-0.16164670884609222,
0.3258596360683441,
0.35659003257751465,
-0.23519651591777802,
-0.12786827981472015,
-0.6441253423690796,
-0.05683025345206261,
0.3521023094654083,
-0.17596128582954407,
0.2018475830554... | |
familiar with the Linq provider but when using `QueryOver` you have to use a join to do a query like that:
### Example 1
```
IQueryOver<Cat,Kitten> catQuery =
session.QueryOver<Cat>()
.JoinQueryOver(c => c.Kittens)
.Where(k => k.Name == "Tiddles");
```
### Example 2
```
Cat catAlias = null;
Kitten kit... | [
-0.08017726242542267,
0.030847353860735893,
0.7200974225997925,
-0.05983063206076622,
0.19787263870239258,
-0.06377145648002625,
-0.028353242203593254,
-0.38535723090171814,
-0.1791839450597763,
-0.4242296814918518,
-0.24197867512702942,
0.05875171720981598,
-0.30156761407852173,
0.3803444... | |
I'm aware that I can `<exec executable="cp" failonerror="true">`, however, I'd really rather have a task that I can call from any OS that can use all (or at least most) of the attributes to `copy`, but which doesn't suck away the permissions on unix.
I am wondering if there is already a solution out there, or will I h... | [
0.520206868648529,
0.5412276983261108,
0.24260656535625458,
0.1866002082824707,
0.32531028985977173,
-0.44225528836250305,
0.15698513388633728,
0.10918065905570984,
-0.34241974353790283,
-0.5953917503356934,
0.10318204015493393,
0.7894896864891052,
-0.14439775049686432,
0.27842918038368225... | |
neat things copy does.
```
<!-- ==================================================================== -->
<!-- Copy files from A to B -->
<!-- <copy> would do this job, if it weren't such a useless pile of fail -->
<!-- and could manage to preserve execute bits on Linux | [
0.23159344494342804,
0.13910020887851715,
0.1354001760482788,
0.13778984546661377,
0.11378852277994156,
-0.5502622723579407,
0.38355526328086853,
0.1513356864452362,
-0.26180002093315125,
-0.5440680384635925,
0.04161866754293442,
0.6308609247207642,
-0.33350610733032227,
0.2937845289707184... | |
-->
<!-- ==================================================================== -->
<macrodef name="internal-copydir">
<attribute name="fromdir" default="NOT SET" />
<attribute name="todir" default="NOT SET" />
<sequential>
<if>
<os family="windows" />
<then>
<c... | [
-0.17293840646743774,
0.19338177144527435,
0.5386191010475159,
0.10487072169780731,
-0.04474686086177826,
-0.15042375028133392,
-0.09682168066501617,
-0.5815648436546326,
0.173980250954628,
-0.711285412311554,
-0.12476708739995956,
0.9607648253440857,
-0.26895368099212646,
0.18398274481296... | |
</copy>
</then>
<else>
<exec executable="rsync" failonerror="true">
<arg value="-a" />
<arg value="@{fromdir}/" | [
0.27395543456077576,
0.31667521595954895,
0.2513068914413452,
-0.20959150791168213,
0.14361552894115448,
-0.21803952753543854,
0.3820496201515198,
-0.32160985469818115,
-0.14067785441875458,
-0.08938093483448029,
-0.39014849066734314,
0.5905377864837646,
-0.41395145654678345,
0.09392462670... | |
/>
<arg value="@{todir}/" />
</exec>
</else>
</if>
</sequential>
</macrodef>
<!-- ==================================================================== -->
<!-- Copy file from A to B | [
0.03349059075117111,
0.23522202670574188,
0.35660189390182495,
0.06408786028623581,
0.2327241152524948,
0.0629294142127037,
0.0466303750872612,
-0.3718477487564087,
0.005384697113186121,
-0.5522036552429199,
-0.33073481917381287,
0.5007836818695068,
-0.5373566150665283,
0.23903463780879974... | |
-->
<!-- <copy> would do this job, if it weren't such a useless pile of fail -->
<!-- and could manage to preserve execute bits on Linux -->
<!-- ==================================================================== -->
<macrodef name="internal-copyfile">
<attribute name="file" default="NOT SET" /... | [
0.019650999456644058,
0.11320225894451141,
0.22183619439601898,
0.12899672985076904,
0.12728366255760193,
-0.15466050803661346,
0.09060805290937424,
-0.11592094600200653,
-0.06608010828495026,
-0.6210271716117859,
-0.13344360888004303,
0.8644989728927612,
-0.4514874517917633,
0.02694791182... | |
<os family="windows" />
<then>
<copy file="@{file}" tofile="@{tofile}"/>
</then>
<else>
<exec executable="cp" failonerror="true">
<arg | [
0.05440327897667885,
0.3550504744052887,
0.2272823601961136,
-0.14293654263019562,
0.41233742237091064,
0.14796945452690125,
0.15888863801956177,
-0.07836013287305832,
-0.34933751821517944,
-0.3000461459159851,
-0.46822589635849,
0.6966712474822998,
-0.2578871548175812,
0.15913444757461548... | |
value="@{file}" />
<arg value="@{tofile}" />
</exec>
</else>
</if>
</sequential>
</macrodef>
```
I wrote this one too.
```
<!-- ==================================================================== -->
<!-- Copy file to a directory | [
0.03288949653506279,
0.23035399615764618,
0.4833437204360962,
0.002440820448100567,
-0.1021997332572937,
0.050943631678819656,
0.16152697801589966,
-0.1578134298324585,
0.06628879904747009,
-0.5825827717781067,
0.2911872863769531,
0.2718350291252136,
-0.3636396527290344,
-0.268528848886489... | |
-->
<!-- <copy> would do this job, if it weren't such a useless pile of fail -->
<!-- and could manage to preserve execute bits on Linux -->
<!-- ==================================================================== -->
<macrodef name="internal-copyfiletodir">
<attribute name="file" default="NOT S... | [
-0.05287819355726242,
0.0936192125082016,
0.3004380166530609,
0.09221158176660538,
0.10490547865629196,
-0.16769760847091675,
0.08959943056106567,
-0.21962831914424896,
-0.019161077216267586,
-0.6434394717216492,
-0.12360876053571701,
0.9282747507095337,
-0.45722299814224243,
0.06892496347... | |
<os family="windows" />
<then>
<copy file="@{file}" todir="@{todir}"/>
</then>
<else>
<exec executable="cp" failonerror="true"> | [
0.05573829263448715,
0.37616729736328125,
0.36551129817962646,
0.09742668271064758,
0.4058035910129547,
0.0010883701033890247,
0.2084687352180481,
-0.07551141828298569,
-0.289380818605423,
-0.2457357496023178,
-0.43942469358444214,
0.7130816578865051,
-0.12910261750221252,
0.22657786309719... | |
<arg value="@{file}" />
<arg value="@{todir}/" />
</exec>
</else>
</if>
</sequential>
</macrodef>
```
I'm not aware of one. As mentioned in the Ant documentation, this is because there was no mechanism to manipulate file permissions in the JRE. [Ant Copy task... | [
-0.10611771792173386,
-0.15193001925945282,
0.11519833654165268,
-0.28023698925971985,
-0.05301592871546745,
-0.11589327454566956,
0.33732298016548157,
-0.0016554944450035691,
-0.29338181018829346,
-0.7260614633560181,
-0.04527098312973976,
0.36468246579170227,
-0.5786244869232178,
-0.0287... | |
of thing, so perhaps in a future version of Ant this will be possible. This will likely take a very long time, as I think Ant is only moving to Java 5 for version 1.9.
I guess you might be able to simulate the behavior you are looking for by conditionally running OS specific commands based on the OS? | [
0.31889888644218445,
-0.30872559547424316,
0.320973664522171,
0.100511834025383,
0.05918264761567116,
-0.12628623843193054,
0.6352723240852356,
0.06116190552711487,
-0.23442131280899048,
-0.6093326807022095,
0.2364833503961563,
0.5927732586860657,
-0.3522575795650482,
-0.07973860949277878,... | |
Has Java always maintained source-code backward compatibility during its development?
More precisely: given two Java versions X and Y with X < Y, is any program for Java X also a valid program for Java Y, with the same semantics?
E.g. X = Java 2 (or 1.2 with the old numbering) and Y = Java 5.
Or is there only compati... | [
0.16814397275447845,
0.16546133160591125,
0.02351689338684082,
-0.22128206491470337,
-0.24925467371940613,
-0.3711981773376465,
0.31885597109794617,
-0.1954701542854309,
-0.19425342977046967,
-0.2687416970729828,
-0.10662087053060532,
0.49845537543296814,
-0.39664164185523987,
0.0056486269... | |
have to follow? Compile directly with a Java 5 compiler? Compile with a Java 2 compiler and run on JVM 5?
Sun, and now Oracle, have always been extremely careful with backward compatibility with regards to Java.
**Binary compatibility**: You should be able to run Java code compiled with older versions on newer version... | [
0.7242082953453064,
0.3527721166610718,
0.14520147442817688,
-0.213865265250206,
-0.0069213067181408405,
-0.5470529794692993,
0.37846672534942627,
-0.1778472363948822,
-0.07546830922365189,
-0.5029694437980652,
-0.1445412039756775,
0.48901012539863586,
-0.4642884433269501,
0.00149302917998... | |
older versions of Java, `enum` was a valid identifier, but not on Java 5. Also, importing classes from the default package has been removed (I think since Java 1.4). So you can't do:
```
import SomeClassName;
```
anymore on Java 1.4 or newer.
In the documentation of every JDK release there is a document about backw... | [
0.21676814556121826,
0.21172963082790375,
0.18377873301506042,
-0.11326371133327484,
-0.15137989819049835,
-0.3277718722820282,
0.3065621554851532,
-0.34856265783309937,
-0.05053267627954483,
-0.4516342580318451,
-0.3621458113193512,
0.5990026593208313,
-0.3833160996437073,
0.2571639418601... | |
I've got the following code (it's not the full code, but the rest doesn't matter). I'm trying to set the boolean "ignoreLength" to either true or false based on what the user picks in an Alertdialog. However, when the code is like this, I get this error:
"Cannot refer to a non-final variable ignoreLength inside an inn... | [
0.5194865465164185,
0.1575891673564911,
0.8065111041069031,
-0.30699047446250916,
0.051423873752355576,
0.13517878949642181,
0.5835209488868713,
-0.29035186767578125,
-0.21607960760593414,
-0.45894375443458557,
-0.15753775835037231,
0.6107479929924011,
-0.8166946768760681,
-0.1641705185174... | |
android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class PassGenActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
// Interface -- Default
super.onCreate(savedInstanceState);
set... | [
0.24833349883556366,
-0.3614040017127991,
0.9243729114532471,
-0.33113187551498413,
-0.12165569514036179,
0.03922882303595543,
0.48221442103385925,
-0.7383810877799988,
-0.09144146740436554,
-0.7301795482635498,
-0.6708327531814575,
0.5017677545547485,
-0.6674365997314453,
-0.0860806405544... | |
// Fill Arrays
createArray characters = new createArray();
lowerCase = characters.getArrayLower();
upperCase = characters.getArrayUpper();
numbers = characters.getArrayNumbers();
symbols = characters.getArraySymbols();
// Pressing the button WOOOSH!
button_generate.setOnClickListener(new ... | [
-0.18448033928871155,
-0.4099014103412628,
0.9648202657699585,
-0.2788955867290497,
0.16116096079349518,
0.3900446891784668,
0.4858728051185608,
-0.6307822465896606,
-0.36280158162117004,
-0.4989066421985626,
-0.15542246401309967,
0.7643448710441589,
-0.114810511469841,
0.05978909134864807... | |
boolean lowerCaseEnabled = true; // needs interface option
boolean upperCaseEnabled = true; // needs interface option
boolean numbersEnabled = true; // needs interface option
boolean symbolsEnabled = true; // needs interface option
// Set up length based on input from Ed... | [
-0.3191307485103607,
-0.27428364753723145,
0.5458875894546509,
-0.06819334626197815,
-0.07210276275873184,
0.43960532546043396,
0.13188670575618744,
-0.3326406180858612,
-0.12497574090957642,
-0.6072950959205627,
-0.1872468888759613,
0.703380823135376,
-0.21781080961227417,
-0.569103658199... | |
0;
try {
length = Integer.parseInt(edit_length.getText().toString());
} catch(NumberFormatException nfe) {
Toast.makeText(PassGenActivity.this, "Can't parse " + nfe, Toast.LENGTH_LONG).show();
}
if (length < 1) { | [
0.4792245924472809,
-0.14861685037612915,
0.3752361238002777,
-0.496280699968338,
0.0015393198700621724,
-0.15746277570724487,
0.6446768641471863,
-0.32730916142463684,
-0.08506660908460617,
-0.4391631782054901,
-0.4914592504501343,
0.2501221001148224,
-0.2382086217403412,
0.30915597081184... | |
length = 1;
edit_length.setText("1");
Toast.makeText(PassGenActivity.this, "Password length can't be less than 1, set it to 1.", Toast.LENGTH_LONG).show();
};
if (length > 100) { | [
0.22785717248916626,
0.20278915762901306,
0.5800638794898987,
-0.48968732357025146,
0.19425900280475616,
-0.2945038378238678,
0.4468017518520355,
-0.22343535721302032,
0.07440013438463211,
-0.5557653903961182,
-0.5636659264564514,
0.5504636764526367,
-0.027471136301755905,
0.14357897639274... | |
AlertDialog.Builder alert = new AlertDialog.Builder(PassGenActivity.this);
alert.setTitle("Warning");
alert.setMessage("You are trying to create quite a long password, are you sure?");
alert.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
... | [
0.19142787158489227,
-0.28167736530303955,
0.4660629630088806,
-0.14109370112419128,
0.6010380983352661,
-0.3194829225540161,
0.6455056071281433,
-0.4329971969127655,
0.06004653126001358,
-0.4211598336696625,
-0.2512063980102539,
0.6171068549156189,
-0.39773473143577576,
-0.199430108070373... | |
ignoreLength = true;
}
});
alert.setNegativeButton("No", null);
alert.show(); | [
0.16289371252059937,
-0.2844123840332031,
0.424823135137558,
-0.6203323602676392,
0.2912774980068207,
-0.146864116191864,
0.5997639298439026,
-0.42930522561073303,
-0.2539752721786499,
-0.0010666894959285855,
-0.5270588397979736,
0.6548421382904053,
-0.5884592533111572,
0.08192040771245956... | |
}
Password password = new Password();
password.fillPassword(lowerCase, upperCase, numbers, symbols);
// Generate password
password.setPassword(lowerCaseEnabled, upperCaseEnabled, numbersEnabled, symbolsEnabled, length);
text_pass.setText(password.getPasswor... | [
-0.25527581572532654,
-0.1702934056520462,
0.5788265466690063,
-0.265949010848999,
0.4330192506313324,
-0.2157074213027954,
0.28623467683792114,
-0.3488155007362366,
0.05143088847398758,
-0.8769067525863647,
-0.6085243225097656,
0.857236921787262,
-0.33692458271980286,
-0.1431436985731125,... | |
}
}
```
Mark's answer caused an obscure crash when cardboard.setItems(filteredItems) was called. However, since the filtering code is actually manipulating the actual references, it turns out that setItems() method is actually not needed. I pulled it out, and it now filters properly. | [
0.11075247824192047,
0.23556311428546906,
0.38376307487487793,
-0.08752883225679398,
0.23159420490264893,
-0.2617868185043335,
0.35232701897621155,
0.12130331248044968,
0.0024071603547781706,
-0.49366921186447144,
0.07322946935892105,
0.32260218262672424,
-0.5788068771362305,
0.23320686817... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.