text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Consider two tables Bill and Product with a many to many relationship. How do you get all the bills for a particular product using Entity Sql?
You need to use some linq like this;
```
...
using (YourEntities ye = new YourEntities())
{
Product myProduct = ye.Product.First(p => p.ProductId = idParameter);
var bill... | [
0.5843487977981567,
-0.035161346197128296,
0.6487761735916138,
-0.03353239968419075,
0.1717255413532257,
0.3535599112510681,
-0.5269657373428345,
-0.6265632510185242,
-0.3260127007961273,
-0.55549556016922,
0.2967105507850647,
0.5319270491600037,
-0.04217033088207245,
0.24819225072860718,
... | |
I am getting the following Warnings while running tests using cc.net
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets (,): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processo... | [
0.4317713975906372,
0.3899189233779907,
0.19552461802959442,
-0.1886799931526184,
-0.011152775026857853,
-0.15969961881637573,
0.7250163555145264,
-0.4119042754173279,
-0.2637050449848175,
-0.4863602817058563,
-0.1871737837791443,
0.17353807389736176,
-0.43413859605789185,
0.33577102422714... | |
Namespace or type specified in the Imports 'NUnit.Framework' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Tests run: 0, Failures: 0, Not run: 0, Time: 0 seconds... | [
0.2501467168331146,
0.01169456634670496,
0.3175370395183563,
0.426890105009079,
-0.19263716042041779,
-0.27511802315711975,
0.4632891118526459,
-0.24123920500278473,
-0.16786491870880127,
-0.5260674357414246,
0.04435054957866669,
0.2518315017223358,
-0.1731649935245514,
0.12062039226293564... | |
is just an administrative piece of data that is required by the database ...
What would be the advantage of using 'admn' as primary key in this case ? | [
0.2385195642709732,
0.13908375799655914,
0.26606690883636475,
0.17937657237052917,
0.05268983915448189,
-0.2099533975124359,
-0.2259300798177719,
0.054967399686574936,
0.00985010340809822,
-0.14035432040691376,
-0.17494118213653564,
0.5795124173164368,
-0.0836738795042038,
0.40522053837776... | |
I want to have a bare git repository stored on a (windows) network share. I use linux, and have the said network share mounted with CIFS. My coleague uses windows xp, and has the network share automounted (from ActiveDirectory, somehow) as a network drive.
I wonder if I can use the repo from both computers, without co... | [
0.3202612102031708,
0.0450705923140049,
0.5192841291427612,
0.10943078249692917,
0.24432241916656494,
0.0414942167699337,
-0.016863618046045303,
0.006093919742852449,
-0.2237071543931961,
-0.7994177341461182,
-0.06661587953567505,
0.4640093445777893,
-0.05221923813223839,
0.175538539886474... | |
some problems with SMBFS), but I am not sure if there is any file locking done by the network/server/windows/linux - i'm quite sure there isn't.
So, has anyone used a git repo on a network share, without a server, and without problems?
Thank you,
Alex
PS: I want to avoid using an http server (or the git-daemon), ... | [
0.5339395403862,
0.041923150420188904,
0.37368565797805786,
0.3712303340435028,
0.06423848122358322,
-0.21366927027702332,
0.18717801570892334,
0.19271068274974823,
-0.5272925496101379,
-0.6762431263923645,
-0.010438688099384308,
0.3724321722984314,
-0.2691487669944763,
-0.0678013637661933... | |
of a network failure. Even so, we would have the required branches locally, and we'll be able to compile our sources.
But, we usually commit quite often, and need to rebase/merge often. From my point of view, the best option would be to have a central repo on the share (so the backups are assured), and we would both c... | [
0.4461926817893982,
-0.15656743943691254,
0.11450298130512238,
0.19119013845920563,
0.32142373919487,
-0.061125922948122025,
0.15765058994293213,
0.13819950819015503,
-0.4132425785064697,
-0.5299018025398254,
-0.09096607565879822,
0.5261015892028809,
-0.20825771987438202,
0.184840023517608... | |
each time we access the remote repo :), but it would be better to have it secured by the computers/network.
And, it is possible that GIT has an internal mechanism to do this (since someone can push to one of your repos, while you work on it), but I haven't found anything conclusive yet.
**Update 2:**
The repo on t... | [
0.2249636948108673,
-0.10970895737409592,
0.6074076890945435,
0.3269648253917694,
0.07659570872783661,
-0.1521446406841278,
0.058129340410232544,
-0.16417306661605835,
-0.30501383543014526,
-0.490342915058136,
-0.38272231817245483,
0.7769222259521484,
0.07374326139688492,
0.129722729325294... | |
get away with this is that most of the files in a Git repo--- all the ones that form the object database--- are named as a digest of their content, and immutable once created. So there the problem of two clients trying to use the same file for different content doesn't come up.
The other part of the object database is... | [
0.3283180892467499,
0.07969140261411667,
0.21016845107078552,
0.11440712958574295,
-0.2596057653427124,
0.11809077113866806,
0.2966487407684326,
-0.11526582390069962,
-0.3640827536582947,
-0.38962772488594055,
-0.21345172822475433,
0.5631117820739746,
-0.5669258832931519,
-0.03991461917757... | |
a temporary ".lock" file and then renames it over the target file. If the filesystem respects `O_EXCL` semantics, that's safe. Even if not, the worst that could happen would be a race overwriting a ref file. Although this would be annoying to encounter, it should not cause corruption as such: it just might be the case ... | [
0.07010067254304886,
-0.11590621620416641,
0.29830673336982727,
0.1320466548204422,
0.12003134191036224,
-0.16898244619369507,
0.030055169016122818,
-0.24147626757621765,
-0.43648865818977356,
-0.3540738821029663,
-0.27317479252815247,
0.2834741175174713,
-0.3618936538696289,
0.28625679016... | |
corruption is too much of a problem here--- it's true that things can go a bit wrong due to locking problems, but the design of the Git repo will minimise the damage.
(Disclaimer: this all sounds good in theory, but I've not done any concurrent hammering of a repo to test it out, and only share them over NFS not CIFS) | [
0.35374632477760315,
-0.06264441460371017,
0.2591080069541931,
0.43508052825927734,
-0.02198209799826145,
-0.28245115280151367,
0.09387396275997162,
-0.023782795295119286,
-0.1769578754901886,
-0.4163026809692383,
-0.020633123815059662,
0.6196051836013794,
-0.28445354104042053,
-0.08805917... | |
I have an application which receives GPS data from a mobile device as well as receiving co-ordinate data it also provides signal strength from the GSM network.
I am trying to plot the points on a map to display areas of good signal strength and areas of poor signal strength.
When I have a few points it all works well, ... | [
0.3735429346561432,
0.08822745829820633,
0.6004205346107483,
-0.2567216753959656,
-0.15420079231262207,
0.15741904079914093,
0.35129278898239136,
-0.3216000199317932,
-0.022872038185596466,
-0.7937377691268921,
0.07889019697904587,
0.3034846782684326,
-0.040641576051712036,
0.1113858148455... | |
that there may be thousands and thousands of readings and I need a way to average out those readings that are less than 0.5km from each other or I need to build the square (or circle perhaps) in SQL Server and average out the intersections.
I have no idea where to begin with this so any pointers to decent articles or s... | [
0.6430070996284485,
0.014800221659243107,
0.2886716425418854,
0.5293614864349365,
-0.2164178490638733,
-0.010752339847385883,
0.11278773099184036,
0.0691276341676712,
-0.1403212696313858,
-0.285308301448822,
0.44713646173477173,
0.2772367000579834,
-0.07900267839431763,
0.1281767338514328,... | |
have the following data:
```
x y signal_strenth
10.2 5.1 10
10.1 5.3 12
10.3 5.5 8
```
If we floor the x and y values, we get:
```
x y signal_strenth
10 5 10
10 5 12
10 5 9
```
Then we can average those values by the floored x and y to show that we have average signal strength in the rec... | [
-0.07599641382694244,
0.22993513941764832,
0.7367730140686035,
-0.01131939422339201,
-0.034089937806129456,
0.2104620635509491,
0.12477953732013702,
-0.4252529442310333,
-0.37142160534858704,
-0.8028727173805237,
-0.24032509326934814,
0.23555375635623932,
0.0014096972299739718,
0.128246948... | |
+ 1 as rectangle_ymax,
avg(signal_strength) as signal_strength
from table
group by floor(x), floor(y);
```
Now, admittedly, you'd ideally want to group data points by distance from point to point, and this groups them by a maximum distance that varies from 1 and to square\_root(2) =~1.44, flooring them into rectan... | [
-0.1689550131559372,
0.058915480971336365,
0.5563855171203613,
-0.1575675904750824,
-0.12050367146730423,
0.06151951104402542,
-0.10623058676719666,
-0.5282851457595825,
-0.41164061427116394,
-0.6132060885429382,
-0.4642133116722107,
-0.13686755299568176,
-0.019044505432248116,
0.053317323... | |
you can use `ceil()` or `round()` to do the same thing.
The whole point is to *collapse* a bunch of nearby measurements to one "measurement", and then take the average of the collapsed values. | [
-0.0019795780535787344,
0.14356465637683868,
0.07080283015966415,
-0.0014141954015940428,
-0.08029630780220032,
-0.09723928570747375,
0.13455568253993988,
-0.32575249671936035,
-0.1936708688735962,
-0.5347238779067993,
-0.05718004330992699,
0.18317025899887085,
-0.001548902248032391,
0.075... | |
I'm quite familiar with PHP dockblocks since it's been my job for the last 15+ years.
```
/**
* Description
*
* @tag bla bla
* @tag more bla bla
*/
```
What I'm trying to understand is if there is a standard like that for Delphi and/or FreePascal.
From my analysis on an awful lot of code I never seen any,... | [
-0.448924720287323,
-0.11910881847143173,
0.4325978457927704,
0.0485537052154541,
-0.29188117384910583,
-0.15128222107887268,
-0.03161996975541115,
-0.16774743795394897,
-0.4289371967315674,
-0.5737901926040649,
-0.061871469020843506,
0.5623998641967773,
-0.2411985993385315,
-0.20310583710... | |
syntax?
<https://stackoverflow.com/questions/673248/is-there-a-delphi-code-documentor-that-supports-current-delphi-syntax>
Code documentation for delphi similar to javadoc or c# xml doc
[Code documentation for delphi similar to javadoc or c# xml doc](https://stackoverflow.com/questions/236047/code-documentation-fo... | [
-0.04152698442339897,
0.059603895992040634,
0.22294846177101135,
-0.04229703173041344,
-0.06541406363248825,
-0.059041351079940796,
-0.007903559133410454,
-0.04463735222816467,
-0.4098895788192749,
-0.39031848311424255,
-0.3476431667804718,
0.4074053168296814,
-0.22324876487255096,
-0.3715... | |
I have a model called Question and another one called Answer.
```
class Question(models.Model):
text = models.CharField(max_length=140)
class Answer(models.Model):
user = models.ForeignKey(User)
question = models.ForeignKey(Question)
uncertain = models.BooleanField()
text = models.CharField(max_l... | [
-0.1335519552230835,
0.1378830075263977,
0.28640249371528625,
-0.13117530941963196,
-0.04821671172976494,
-0.013909358531236649,
-0.07629130780696869,
-0.32245078682899475,
-0.221471905708313,
-0.39314234256744385,
0.04568512737751007,
0.7072807550430298,
-0.19758205115795135,
0.0493450723... | |
I'd like to be able to loop through the QuerySet, e.g. `for q in questions` and then be able to see whether or not the user has answered it through something like `q.answered` which could be a boolean, or `q.answer` which could be the Answer object itself (or `None`).
Are you looking for something like this?
```
[ ite... | [
0.20744861662387848,
-0.03590724244713783,
0.0049257660284638405,
0.24057330191135406,
0.08910015225410461,
-0.016699455678462982,
0.1437898725271225,
-0.0516597256064415,
-0.2666126787662506,
-0.42509281635284424,
-0.06505807489156723,
0.11532179266214371,
-0.2964583933353424,
0.204731181... | |
can see if it's an empty list or tack on a .count() and see if the value is greater than 0. | [
0.30141791701316833,
-0.16724766790866852,
0.06680653244256973,
0.022505950182676315,
0.04268944635987282,
-0.1803729385137558,
0.15196038782596588,
-0.18894101679325104,
-0.16000621020793915,
-0.36527180671691895,
-0.10176150500774384,
0.41951191425323486,
-0.3117973506450653,
-0.04459516... | |
I'm trying to re-order a HTML table when the user clicks on the table header. Here is all I can do, but still doesn't work.
in the HTML:
```
// onClick on table header
var par='ASC';
sort(par);
```
from: ajax.js
```
function sort(orderByType)
{
$.ajax({
url: "sort.php",
type: "get",
data: "orderby="... | [
-0.030022718012332916,
0.06950011104345322,
0.6281472444534302,
-0.36050137877464294,
-0.0998186245560646,
0.24847939610481262,
0.7632098197937012,
-0.23364557325839996,
-0.29134467244148254,
-0.7576214075088501,
-0.34659451246261597,
0.5491398572921753,
-0.4591566324234009,
-0.04593541473... | |
where user_id = from_user
ORDER BY user_name".$orderBy);
while($row = mysql_fetch_array($result))
{
echo "<tbody><tr><td>"."•"."</td><td>".
$row["Time_Date"]."</td><td>". | [
0.10517547279596329,
-0.1789216697216034,
0.44106680154800415,
-0.5579400658607483,
0.38605087995529175,
0.18885429203510284,
0.4014521539211273,
-0.6580578684806824,
-0.19874334335327148,
-0.1407010555267334,
-0.19709211587905884,
0.20512542128562927,
-0.3730587959289551,
0.46478968858718... | |
$row["player_name"]."</td><td></td><td></td><tr><td></td><td colspan='4'>".
$row["msg_desc"]."</td></tr></tbody>";
}
mysql_close($con);
```
It doesn't see the `$orderBy`. And then I want to add the new order to my page - how could that be done?
Could the variable sent to function sort be dynamic, i.e. to be... | [
-0.3966979384422302,
0.06221381574869156,
0.8667486906051636,
-0.34266871213912964,
0.02713342197239399,
0.04083980619907379,
0.24087931215763092,
-0.05339342728257179,
-0.3826601505279541,
-0.5595413446426392,
-0.2813125550746918,
0.6922687292098999,
-0.5789466500282288,
0.429509043693542... | |
I have written a bunch of Perl libraries (actually Perl classes) and I want to use some of them in my Python application. Is there a natural way to do this without using SWIG or writing Perl API for Python. I am asking for a similar way of PHP's Perl [interface](http://devzone.zend.com/node/view/id/1712). If there is n... | [
0.6658246517181396,
0.00420948164537549,
0.02646918222308159,
-0.007004101295024157,
-0.5010474324226379,
-0.09227621555328369,
0.04217782989144325,
0.22725751996040344,
-0.31383568048477173,
-0.5550546050071716,
0.061526138335466385,
0.4853154122829437,
-0.17316082119941711,
0.10277032107... | |
a very natural manner. | [
-0.05400136858224869,
0.00042753005982376635,
-0.3518901467323303,
0.1189969852566719,
-0.23109997808933258,
-0.06956882774829865,
0.043608490377664566,
0.3506912887096405,
0.09813914448022842,
-0.4767126441001892,
0.12275560200214386,
0.03842367231845856,
-0.017442848533391953,
-0.1071852... | |
using dataadpter how to update data in database
```
myDataAdapter.Update(myDataSet);
```
A vague question at best merits a vague answer. | [
0.09043629467487335,
0.03548723831772804,
0.232915997505188,
0.379385381937027,
0.04277641698718071,
-0.3997844159603119,
0.06530725955963135,
-0.0564449205994606,
0.20192083716392517,
-0.6700621247291565,
-0.11459773033857346,
0.4919773042201996,
-0.18434377014636993,
-0.05968894064426422... | |
Why `double.Epsilon != std::numeric_limits<double>::min()`?
On my PC:
`double.Epsilon == 4.9406564584124654E-324` and is defined in .NET
`std::numeric_limits<double>::min() == 2.2250738585072014e-308`
Is there a way to get 2.2250738585072014e-308 from .NET?
They're different because [`double.Epsilon`](http://msdn.mic... | [
0.1910608857870102,
-0.1784539669752121,
0.08577831089496613,
0.028687113896012306,
-0.09857828915119171,
-0.1593472808599472,
0.2874583601951599,
-0.27317121624946594,
-0.175780788064003,
-0.7110163569450378,
0.05760800838470459,
0.339830607175827,
-0.3098774552345276,
0.07014758884906769... | |
i had this code in my .jsp file:
```
<li><a href="${pageContext.request.contextPath}/pages/client_home.jsp" id="home">Home</a></li>
<li><a href="${pageContext.request.contextPath}/pages/client_about.jsp" id="about">About</a></li>
```
and when i click the link, i got this error:
> HTTP Status 500 -
>
>
> type Ex... | [
-0.2627260684967041,
0.43297213315963745,
0.48250681161880493,
-0.169158935546875,
-0.27900612354278564,
0.08589151501655579,
0.527019202709198,
-0.3350414037704468,
-0.34375280141830444,
-0.719277560710907,
-0.030329210683703423,
0.2741096615791321,
-0.5224966406822205,
0.2420962005853653... | |
this into anything like a string etc. The value of the reference will change during compaction (as you've seen), but every previous value A will be changed to value B, so as far as safe code is concerned it's still a unique ID.
If the objects involved are under your control, you could create a mapping using [weak refe... | [
0.08970567584037781,
-0.20556101202964783,
0.3829960525035858,
0.2807474434375763,
0.10354086011648178,
-0.23322008550167084,
0.013583623804152012,
-0.24364347755908966,
-0.3162596523761749,
-0.760652482509613,
-0.07115679979324341,
0.3044988214969635,
-0.31312718987464905,
0.2414617538452... | |
Does anyone know of a simple Web MVC framework and Web Server for Java that is open source?
This is intended as a simple web server and framework for students in a tutorial class.
It's important these both the web server and MVC framework are simple, OSS so students can easily peer under the hood and the tutors can e... | [
0.5623480677604675,
0.39904478192329407,
-0.2036461979150772,
0.2231966257095337,
-0.15280748903751373,
-0.2304762750864029,
0.4136834740638733,
-0.04235218092799187,
-0.1782921999692917,
-0.4421124756336212,
0.34747061133384705,
0.4779856503009796,
0.16546526551246643,
-0.0112596293911337... | |
a look at [Stripes](http://www.stripesframework.org/), which does not have any compile time dependencies (apart from itself, apparently) at all and only requires [COS](http://servlets.com/cos/) and [Commons Logging](http://commons.apache.org/logging/) during runtime.
It's also very lightweight and quite easy to pick u... | [
0.6909468173980713,
-0.10792932659387589,
0.23549750447273254,
-0.04049583896994591,
0.19052141904830933,
-0.4118258059024811,
-0.04906320944428444,
-0.0735815167427063,
-0.47359904646873474,
-0.7079781889915466,
0.09441397339105606,
-0.09546420723199844,
-0.3535004258155823,
-0.0462425388... | |
Given this code:
```
#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
#include <boost/regex.hpp>
using namespace std;
using namespace boost;
int main ( int arg_count, char *arg_vec[] ) {
if (arg_count !=2 ) {
cerr << "expected one argument" << endl;
return EXIT_FAILURE... | [
-0.3072623312473297,
-0.09027538448572159,
0.6130402684211731,
-0.5383391380310059,
0.02513924613595009,
0.3365575075149536,
0.11171011626720428,
-0.4670727849006653,
-0.03422490134835243,
-0.3494088351726532,
-0.44077399373054504,
0.5832408666610718,
-0.5923945307731628,
-0.20688275992870... | |
endl;
} else {
cout << "No Match" << endl;
}
return 0;
}
```
Compiled with this command:
```
g++ -I /home/foolishbrat/.boost/include/boost-1_37 test.cc -o test
```
It gives this error:
```
test.cc: In function `int main(int, char**)':
test.cc:26: error: syntax error before `)' token
```
Wha... | [
-0.23738506436347961,
0.5479233264923096,
0.2445027083158493,
-0.16270066797733307,
0.15199832618236542,
-0.11583126336336136,
0.584015965461731,
-0.46842503547668457,
0.11691222339868546,
-0.21581892669200897,
-0.22129122912883759,
0.6655207872390747,
-0.2795029580593109,
0.15935489535331... | |
> >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<c... | [
-0.41692620515823364,
0.33784350752830505,
0.5429715514183044,
-0.0061753601767122746,
0.15450073778629303,
0.41143181920051575,
0.10417844355106354,
-0.6576451063156128,
-0.06583709269762039,
-0.4276695251464844,
-0.394992858171463,
0.7993805408477783,
-0.31604501605033875,
0.017012400552... | |
>::perl_matcher[in-charge](__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::match_results<__gnu_cxx::__normal_iterator<char const*... | [
-0.34220820665359497,
0.07650820165872574,
0.6689119935035706,
0.16212576627731323,
-0.015290791168808937,
0.4759043753147125,
-0.20118199288845062,
-0.6910372972488403,
-0.06508539617061615,
-0.33793994784355164,
-0.15227340161800385,
0.6740489602088928,
-0.4976034164428711,
0.01556975301... | |
to libraries>` to the build command | [
0.4204259514808655,
0.2607162594795227,
0.07979188859462738,
-0.08031917363405228,
-0.06330157816410065,
-0.1801842302083969,
0.19894380867481232,
0.19746311008930206,
-0.009954693727195263,
-0.7361316084861755,
-0.4167082607746124,
0.5459519028663635,
-0.19923458993434906,
0.2065567523241... | |
I work with a Panasonic hcm280a camera that can be controlled by my software, It generates a stream of jpeg files that are huge and I want to convert this stream to a FLV stream preferably with a good compressional ration
Does FFMpeg do that? I am basically looking for an off the shelve open source software (or commer... | [
0.6286084651947021,
0.18765273690223694,
0.19586722552776337,
0.22064156830310822,
-0.2816978991031647,
-0.1844947189092636,
-0.21379031240940094,
-0.0217885859310627,
-0.6039867401123047,
-0.35945242643356323,
0.04273521900177002,
0.5646237134933472,
-0.29553306102752686,
0.16714110970497... | |
excellent source of information video related, worth checking out the downloads and guides | [
0.3877716362476349,
-0.004622272681444883,
0.25003722310066223,
0.6269310116767883,
0.062097907066345215,
-0.5142746567726135,
0.22014789283275604,
0.38989388942718506,
-0.5081743597984314,
-0.30307823419570923,
0.13205188512802124,
0.5562902688980103,
0.6358928680419922,
0.247187942266464... | |
Would really like to be able to decorate my class with an attribute of some sort that would enforce the use of a using statement so that the class will always be safely disposed and avoid memory leaks. Anyone know of such a technique?
Well, there's one way you could sort of do it - only allow access to your object via ... | [
0.5393990278244019,
-0.20347203314304352,
0.10302209109067917,
0.06241832301020622,
0.13755978643894196,
-0.10322140902280807,
0.29825860261917114,
0.011926808394491673,
-0.36133915185928345,
-0.5754490494728088,
0.05633414909243584,
0.529596209526062,
-0.10396785289049149,
0.2758854627609... | |
= File.OpenRead(filename))
{
action(stream);
}
}
```
If the only things capable of creating an instance of your disposable object are methods within your own class, you can make sure they get used appropriately. Admittedly there's nothing to stop the delegate from taking a copy of the reference and tr... | [
0.4974946677684784,
0.037260573357343674,
0.025447135791182518,
0.1391865462064743,
0.19354262948036194,
-0.12781952321529388,
0.41519033908843994,
-0.22329135239124298,
-0.1151886135339737,
-0.5574265122413635,
-0.08378145843744278,
0.5227034091949463,
-0.30166709423065186,
0.263996303081... | |
Tomcat has an option to use APR for handling connections. What are the benefits of using that? Does anyone have firsthand experience with it?
If you don't plan to use a web server (for serving static content) in front of Tomcat then APR is supposed to improve things.
I've only indirectly used it via [JBoss Web](http:... | [
-0.2644542157649994,
0.21265488862991333,
0.44919949769973755,
-0.20091377198696136,
-0.35658061504364014,
0.25940150022506714,
0.04050451144576073,
0.24233299493789673,
-0.5374430418014526,
-0.28197699785232544,
0.12356981635093689,
0.4988142251968384,
-0.40332677960395813,
-0.19916124641... | |
I'm developing a winforms app with lots of different forms and user controls. Is there a recommended pattern that I could implement that notifies the user that there are unsaved changes on the current form/control when the form/control is exiting and also when the app is closing?
If you don't plan to use a web server (... | [
-0.0006594589212909341,
0.25322893261909485,
0.6456195116043091,
-0.2304821014404297,
-0.22412563860416412,
0.27088138461112976,
0.02156246267259121,
-0.03237602859735489,
-0.02116617001593113,
-0.5427266955375671,
0.05881804972887039,
0.5477690100669861,
-0.32992151379585266,
-0.090131804... | |
I try to insert millions of records into a table that has more than 20 indexes.
In the last run it took more than 4 hours per 100.000 rows, and the query was cancelled after 3½ days...
Do you have any suggestions about how to speed this up.
(I suspect the many indexes to be the cause. If you also think so, how can I... | [
0.31343021988868713,
0.23472854495048523,
0.4202718734741211,
0.3195496201515198,
0.21596559882164001,
0.02188263088464737,
0.20127277076244354,
0.07578132301568985,
-0.5094030499458313,
-0.6184994578361511,
0.15136507153511047,
0.28585195541381836,
-0.14746655523777008,
0.2949481904506683... | |
transaction per 100.000 rows.
---
Update on status:
The accepted answer helped me make it much faster.
You can disable and enable the indexes. Note that disabling them can have unwanted side-effects (such as having duplicate primary keys or unique indices etc.) which will only be found when re-enabling the indexes.
... | [
-0.47891220450401306,
0.18219943344593048,
0.2461708039045334,
0.21686594188213348,
-0.1766701191663742,
-0.0763368234038353,
0.45881661772727966,
-0.2755185067653656,
-0.1995488852262497,
-0.8276110291481018,
-0.32142481207847595,
0.926939845085144,
-0.6772138476371765,
-0.006790437735617... | |
What is the best way to compare to Images in the database?
I tried to compare them (@Image is the type Image):
```
Select * from Photos
where [Photo] = @Image
```
But receives the error "The data types image and image are incompatible in the equal to operator".
Since the Image data type is a binary and huge space f... | [
-0.08883774280548096,
0.16110371053218842,
0.15560200810432434,
0.20536048710346222,
-0.3323967456817627,
0.154917374253273,
-0.13425414264202118,
-0.3514905273914337,
-0.001233179122209549,
-0.788355827331543,
0.3188493549823761,
0.5218135118484497,
-0.24387870728969574,
0.321103513240814... | |
My workflow usually involves me making multiple changes to a file, each of which belongs to it's own conceptual unit of change across the project (= commit).
What I would like to be able to do is to add certain diffs (either a whole file, or only certain lines of a file) to a pending commit (which would probably have ... | [
0.4768051505088806,
-0.07823250442743301,
0.34917151927948,
-0.01631719246506691,
0.30397385358810425,
0.26734161376953125,
0.09272462129592896,
-0.34994006156921387,
-0.4885554611682892,
-0.7715377807617188,
-0.07515565305948257,
0.343860387802124,
-0.07602701336145401,
0.3098822832107544... | |
good candidate for this?
In svn, you can define [changelists](http://svnbook.red-bean.com/nightly/en/svn.advanced.changelists.html) and then commit only the files in a particular changelist.
Git goes a bit further, and allows you to record patches by interactively selecting changed chunks from a file with [git add -p]... | [
0.2393551915884018,
-0.10454145073890686,
0.5776810050010681,
-0.00635924469679594,
0.10820276290178299,
-0.016641415655612946,
0.06294611096382141,
-0.2346920222043991,
-0.5035553574562073,
-0.49580755829811096,
-0.07717953622341156,
0.5233042240142822,
-0.14858046174049377,
0.03092559985... | |
allow you to shelve selected changes at the granularity of patch hunks for later commits. This way of working does allow you to test properly before committing. | [
0.526097297668457,
-0.01678512804210186,
-0.0458839125931263,
-0.017086008563637733,
0.1453426629304886,
-0.03387031704187393,
0.2141217142343521,
-0.19719985127449036,
-0.24289388954639435,
-0.8654186129570007,
0.3689545691013336,
0.6578059792518616,
-0.03557718172669411,
-0.4114202857017... | |
I must process some huge file with gawk. My main problem is that I have to print some floats using thousand separators. E.g.: `10000` should appear as `10.000` and `10000,01` as `10.000,01` in the output.
I (and Google) come up with this function, but this fails for floats:
```
function commas(n) {
gsub(/,/,"",n)
... | [
-0.15484385192394257,
0.21272550523281097,
0.6310862302780151,
-0.13844338059425354,
0.0025324018206447363,
0.25469720363616943,
0.2622230350971222,
-0.31059515476226807,
-0.06896719336509705,
-0.6964576244354248,
-0.1755884438753128,
0.28955894708633423,
-0.010897872038185596,
0.245019599... | |
n
}
```
But it fails with floats.
Now I'm thinking of splitting the input to an integer and a < 1 part, then after formatting the integer gluing them again, but isn't there a better way to do it?
**Disclaimer:**
* I'm not a programmer
* I know that via some SHELL env. variables the thousand separators can be set, ... | [
0.22344651818275452,
0.29284802079200745,
0.4383847117424011,
-0.226951465010643,
-0.015717366710305214,
0.25154516100883484,
0.1889178603887558,
0.06793246418237686,
-0.06962748616933823,
-0.6010761260986328,
0.21968229115009308,
0.647179365158081,
0.023856936022639275,
-0.010843452066183... | |
should work if you just change over commas and periods. I'd test the current version first with 1000000.25 to see if it works with non-European numbers.
The following awk script can be called with `"echo 1 | awk -f xx.gawk"` and it will show you both the "normal" and European version in action. It outputs:
```
123,45... | [
0.23705428838729858,
-0.1816844493150711,
0.46725818514823914,
-0.21922853589057922,
-0.08517049252986908,
0.036060165613889694,
0.4206114709377289,
-0.21918772161006927,
-0.08920998871326447,
-0.3128505051136017,
-0.17241394519805908,
0.40377458930015564,
-0.2282727211713791,
-0.226732686... | |
length(n)
while (point > 3) {
point -= 3
n = substr(n,1,point)","substr(n,point + 1)
}
return n
}
function commaseuro(n) {
gsub(/\./,"",n)
point = index(n,",") - 1
if (point < 0) point = length(n)
while (point > 3) {
point -= 3
n = substr(n,1,point)"."substr(n... | [
-0.39371487498283386,
-0.15579389035701752,
0.8092540502548218,
-0.42541781067848206,
-0.07584838569164276,
0.0834776982665062,
0.20453567802906036,
-0.6348713040351868,
-0.299548476934433,
-0.2534882426261902,
-0.43724679946899414,
0.4129282534122467,
-0.13385118544101715,
-0.042483408004... | |
return n
}
{ print commas("1234,56789.1234") "\n" commaseuro("12.3456789,1234") }
```
The functions are identical except in their handling of commas and periods. We'll call them separators and decimals in the following description:
* gsub removes all of the existing separators since we'll be putting them back.
* poi... | [
-0.2958492636680603,
-0.01918085478246212,
0.530596911907196,
-0.36231598258018494,
0.17613403499126434,
0.29042765498161316,
0.02081879787147045,
-0.2977348566055298,
0.016407661139965057,
-0.2397591918706894,
-0.35436397790908813,
0.36087390780448914,
0.10033080726861954,
-0.124147221446... | |
I'm using jdi interfaces to create a debugger and when I use MethodEntryRequests to enable method entry tracing the debugged program slows down by factor of tens. I have set filter for main thread and suspend policy to SUSPEND\_EVENT\_THREAD. Classfilter is limited and if I print any received events it doesn't show mor... | [
0.13870303332805634,
0.18744966387748718,
0.20556879043579102,
-0.23338033258914948,
-0.21622440218925476,
-0.1251734495162964,
0.5285632610321045,
0.030035650357604027,
-0.34987497329711914,
-0.5251002311706543,
-0.04067321866750717,
0.39510852098464966,
-0.3912472426891327,
0.38148328661... | |
is anyway around this...
This used to be the case for all code running in debug mode but [it was enhanced in 1.4](https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/enhancements1.4.html)... now HotSpot works for 'full-speed' debugging except in the case of method entries and exits, watchpoints and when single... | [
-0.0417540967464447,
-0.1483890563249588,
0.11291186511516571,
0.3787700831890106,
0.04542415589094162,
-0.5626628398895264,
0.4029792547225952,
0.30678194761276245,
-0.1572917401790619,
-0.21858590841293335,
-0.2254861295223236,
0.18262828886508942,
-0.3667880594730377,
-0.172669932246208... | |
Assume that there is a 'Employee' table with salary as one of the columns.
I want to get the 'Top N'th maximum salary alone from the table.
How this can be fetched easily?
```
SELECT TOP 1 employee.name, employee.salary from (
SELECT TOP N employee.name, employee.salary
FROM employee
ORDER BY employee.s... | [
-0.04768073558807373,
0.20758871734142303,
0.540174126625061,
-0.1879301369190216,
0.008177485316991806,
0.4031659960746765,
-0.36793196201324463,
-0.27739500999450684,
-0.17171038687229156,
-0.5228411555290222,
-0.02568255551159382,
0.6284301280975342,
-0.10400862991809845,
0.281458646059... | |
I need to know how big a given in-memory buffer will be as an on-disk (usb stick) file before I write it. I know that unless the size falls on the block size boundary, its likely to get rounded up, e.g. a 1 byte file takes up 4096 bytes on-disk. I'm currently doing this using *GetDiskFreeSpace()* to work out the disk b... | [
0.16270704567432404,
0.13661950826644897,
0.5773885846138,
-0.12531678378582,
0.3457338213920593,
-0.09246208518743515,
0.18991872668266296,
-0.2751562297344208,
-0.177593395113945,
-0.8641771674156189,
-0.12528660893440247,
0.45038917660713196,
-0.13645026087760925,
0.2563870847225189,
... | |
dwBlockSize != 0)
{
dwSizeOnDisk = ((dwInMemorySize / dwBlockSize) * dwBlockSize) + dwBlockSize;
}
else
{
dwSizeOnDisk = dwInMemorySize;
}
```
Which seems to work fine, **BUT** *GetDiskFreeSpace()* only works on disks up to 2GB according to MSDN. *GetDiskFreeSpaceEx()* doesn't return the same information, so ... | [
-0.08321134746074677,
-0.10257217288017273,
0.48046785593032837,
0.059557341039180756,
0.008145266212522984,
-0.08047163486480713,
0.29717496037483215,
-0.15166601538658142,
-0.44568952918052673,
-0.7491797804832458,
-0.15467704832553864,
0.6691129803657532,
-0.2013450264930725,
0.04189265... | |
sector, I've used it myself for very similar-looking code ;-)
But if you want disk capacity too, you'll need an additional call to `GetDiskFreeSpaceEx()`. | [
0.2469588816165924,
-0.42156657576560974,
0.5042847990989685,
0.49765533208847046,
0.2099393904209137,
0.10162106901407242,
-0.10270139575004578,
0.5840120315551758,
-0.2946341633796692,
-0.8982759118080139,
-0.04992389306426048,
0.5819336175918579,
0.014879665337502956,
0.3450095951557159... | |
I'm currently working on a simple wxPython app that's essentially document based. So far I've been manually implementing the usual open/save/undo/redo etc etc stuff.
It occurred to me that wxPython must have something to help me out and after a bit of searching revealed the [docview package](http://www.wxpython.org/do... | [
0.7118273377418518,
0.08328428864479065,
0.21603280305862427,
-0.1313532143831253,
-0.04703092947602272,
0.009750374592840672,
0.1832568496465683,
0.08751138299703598,
-0.29268166422843933,
-0.7587162256240845,
0.04734336584806442,
0.46744054555892944,
0.03377705067396164,
0.19038549065589... | |
to specify the degree of thread safety required. In particular, do you need locking code to be emitted? | [
0.9181908369064331,
0.18390516936779022,
-0.02447585202753544,
0.030096549540758133,
0.18827404081821442,
-0.4866856336593628,
0.29919639229774475,
-0.4836999177932739,
-0.394839882850647,
0.08032596856355667,
-0.0572635680437088,
0.4268365800380707,
-0.28180092573165894,
-0.15106052160263... | |
I am using above method & it works well with one parameter in URL.
e.g. `Students/getstud/1` where controller/action/parameter format is applied.
Now I have an action in Students controller that accepts two parameters and return a JSON object.
So how do I post data with `$.getJSON()` using post method?
Similar meth... | [
-0.10150441527366638,
-0.2646806240081787,
0.44529175758361816,
0.12776894867420197,
-0.2420133501291275,
-0.00245975935831666,
0.046737104654312134,
-0.03531987592577934,
-0.10821662843227386,
-0.8338712453842163,
-0.3438553512096405,
0.2652148902416229,
-0.13738086819648743,
0.1082148328... | |
you want, although if are sending the contents of a an html form, you can use the [serialize](http://docs.jquery.com/Ajax/serialize) method to create the data for the POST from your form.
```
var dataToBeSent = $("form").serialize();
``` | [
0.3877514898777008,
-0.041957203298807144,
0.4512801766395569,
0.025404270738363266,
0.053172189742326736,
-0.09235259890556335,
0.240029439330101,
-0.02436758205294609,
-0.10717890411615372,
-0.6452420949935913,
-0.2857929468154907,
0.1353447288274765,
-0.3226928412914276,
0.2823783755302... | |
```
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[rptGGM]
(
@FromDate datetime,
@ToDate datetime,
@PartyName varchar(50),
@Type int
)
As
DECLARE @WhrStr VarChar(500)
SET @WhrStr =
CASE @Type
WHEN 1 THEN
' And E.ATAAir between '+ @FromDate +' And '+@ToDate
W... | [
0.01624169573187828,
-0.09898244589567184,
0.4125369191169739,
-0.22710329294204712,
0.0837770402431488,
0.24163025617599487,
0.22998642921447754,
-0.7505283951759338,
0.11273585259914398,
-0.41207486391067505,
-0.1858929693698883,
0.5990571975708008,
-0.32160452008247375,
0.16747012734413... | |
S.POString As [PO Numbers],
G.PartyName As [Exporter Name],
C.CargoDesc As [Cargo Description],
Dbo.ActualDate(A.ETA) As ETA,
Dbo.ActualDate(IsNull(E.ATAAir, D.ATASea)) As ATA,
S.SIString As [Supplier Invoices],
D.VesselName As [Vessel Name],
D.VoyageNo As [Voyage No],
... | [
0.0062888250686228275,
-0.43278223276138306,
0.596085786819458,
0.13590891659259796,
0.0861852765083313,
0.4703466594219208,
-0.3598264455795288,
-0.14412535727024078,
-0.15225069224834442,
-0.21175730228424072,
-0.4721710681915283,
0.2398281693458557,
0.0531037338078022,
0.292510300874710... | |
S.FileID=A.FileID
LEFT JOIN Party G ON G.PartyID = A.ExporterID
INNER JOIN Cargo C ON C.FileID = A.FileID
LEFT JOIN FileSea D ON D.FileID = A.FileID
LEFT JOIN FileAir E ON E.FileID = A.FileID
WHERE
G.PartyName='+@PartyName +' '+@WhrStr
)
```
While executing above procedure following error is coming
Msg 241,... | [
-0.17795494198799133,
-0.08303788304328918,
0.4091612696647644,
-0.1758756786584854,
0.004069743677973747,
0.11857230961322784,
0.26317301392555237,
-0.2612540125846863,
-0.39929360151290894,
-0.7419195175170898,
-0.14740373194217682,
0.2042814940214157,
-0.29748985171318054,
0.34882104396... | |
I have data held in the options variable, but in an event (OnChange) of a select list
this refers to the DOMElement and therefore this.options refers to the list of objects.
everywhere else I can have
```
var o = this.options;
```
but this is no use in this context.
How to get/set the widget information ?
Use th... | [
0.4053240120410919,
-0.19676105678081512,
0.6322053074836731,
-0.2043287307024002,
0.11929476261138916,
0.18441163003444672,
-0.21453125774860382,
-0.23485243320465088,
-0.03198397904634476,
-0.7316621541976929,
-0.18508592247962952,
0.6366426348686218,
-0.3541109263896942,
0.2551656067371... | |
change: "_onChange" // Note: function name must be passed as a string!
});
},
_onChange: function (event) {
// 'this' is now the widget instance.
},
``` | [
-0.0811796709895134,
-0.38423532247543335,
0.703697144985199,
-0.31640341877937317,
0.40919700264930725,
-0.02706283889710903,
-0.09779559075832367,
0.0001819347235141322,
-0.2512848675251007,
-0.48143941164016724,
-0.2805190980434418,
0.6180199384689331,
-0.5199750065803528,
0.31228041648... | |
Right now I'm having it with `Guid`s.
I certainly remember that throughout the code in some places this implicit conversion works, in others it does not. Until now I fail to see the pattern.
How the compiler decides when it cannot? I mean, the type method `Guid.ToString()` is present, isn't it called whenever this tr... | [
-0.14927805960178375,
0.06434966623783112,
0.23199531435966492,
-0.050866834819316864,
-0.06448786705732346,
-0.2552010416984558,
0.13075008988380432,
-0.0302021112293005,
-0.1656123399734497,
-0.7142727375030518,
-0.06191492825746536,
0.8522756099700928,
-0.32160311937332153,
0.2784433662... | |
return x.ToString();}
}
class WithExplicit {
public static explicit operator string(WithExplicit x) {
return x.ToString(); }
}
class WithNone { }
class Program {
static void Main() {
var imp = new WithImplicit();
var exp = new WithExplicit();
var none = new WithNone();
s... | [
-0.23752596974372864,
-0.48148223757743835,
0.41513562202453613,
-0.29811885952949524,
-0.04826417565345764,
0.21348503232002258,
0.4546763002872467,
-0.2721727192401886,
-0.1734849065542221,
-0.3459044396877289,
-0.5787083506584167,
0.8063806295394897,
-0.5180545449256897,
0.0742894560098... | |
string s3 = none.ToString();
}
}
``` | [
-0.33340391516685486,
-0.11497361958026886,
0.259654700756073,
-0.5593916177749634,
0.1818203181028366,
-0.17610734701156616,
0.3685324192047119,
-0.16856184601783752,
-0.1481996476650238,
-0.2556844651699066,
-0.39096546173095703,
0.630553662776947,
-0.5733286738395691,
0.1622298061847686... | |
The skeleton of the HTML is this
```
<div class="TwoCol">
<img src="imgurl"/>
<h1>A headline</h1>
<p>Some exciting text</p>
<ul>
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ul>
<p>More riveting text </p>
</div>
```
The CSS is
```
.TwoCol img{
float:left;
padding-right:5px;
border:none;
}
.TwoCol ... | [
-0.3483457863330841,
-0.06895466893911362,
0.8488744497299194,
-0.15204811096191406,
-0.539799153804779,
-0.02638145722448826,
-0.15118516981601715,
-0.2836751341819763,
-0.3738068640232086,
-0.7371231317520142,
-0.2454865574836731,
0.1334220916032791,
-0.4771224856376648,
-0.0365126430988... | |
and break the list into two sections.
I need an image sketching utility :)
This
```
IMG Headline
IMG Para1
IMG Item A
Item B
Item C
Para2
```
not This
```
IMG Headline
IMG Para1
IMG Item A
Item B
Item C
Para2
```
Thanks!
You could set the `<ul>` to
```
display: inline-block;
```
You might also want... | [
0.2383391261100769,
0.04306403174996376,
0.4693411886692047,
0.1772945076227188,
-0.542953372001648,
0.15241999924182892,
0.09524702280759811,
-0.3765179514884949,
-0.3439383804798126,
-0.5467700362205505,
-0.08438321948051453,
0.39305493235588074,
-0.33845067024230957,
-0.0656886994838714... | |
In response to [this error where pages are delivered incorrectly](https://stackoverflow.com/questions/246540/apache-tomcat-error-wrong-pages-being-delivered), we're considering a switch from Apache + Tomcat to Glassfish. This is inspired not by features, but by frustration with a fault that just won't go away.
The que... | [
0.11970816552639008,
0.05408920720219612,
0.3447572886943817,
-0.008849096484482288,
-0.45964065194129944,
0.1498706340789795,
0.37362658977508545,
0.21770113706588745,
-0.23039385676383972,
-0.5486100316047668,
-0.05951652675867081,
0.4086970090866089,
-0.4288550913333893,
0.1110884100198... | |
we use Glassfish 2 or 3? Version 3 seems to be a complete rewrite, and comments here and elsewhere suggests that a lot of people are sticking with 2.
* How well can Apache and Glassfish cooperate on the same server? For example, Apache could simplely `ProxyPass` all requests to selected domains over to Glassfish (as op... | [
0.5686492323875427,
0.1290816068649292,
0.3695938289165497,
-0.08910086005926132,
-0.3599412441253662,
-0.40352967381477356,
0.6472832560539246,
-0.18126706779003143,
0.03550538048148155,
-0.6723856329917908,
0.18098817765712738,
0.5714355707168579,
-0.4741196632385254,
-0.2235673516988754... | |
to Glassfish because of the need for a appserver with JMS.
> Should we use Glassfish in cooperation
> with Apache, or replace Apache
> entirely?
Strictly speaking you don't need Apache in front. Glassfish has some configuration options to create virtual domains like you get from Apache. More information [here](http... | [
0.10761567950248718,
0.11404392123222351,
0.5872515439987183,
-0.15712016820907593,
-0.42718201875686646,
-0.2734564542770386,
0.5769708156585693,
-0.1470874845981598,
-0.12892736494541168,
-0.4828711152076721,
-0.18668952584266663,
0.5611117482185364,
-0.6192641258239746,
-0.1930724978446... | |
of September 2009, and even then it doesn't support features such as High Availability clustering before 3.1 comes out. Some info [here](http://blogs.oracle.com/theaquarium/entry/update_on_glassfish_v3_plans). So personally I would have waited for 3.1, but that's just me :-)
> How well can Apache and Glassfish coopera... | [
0.030907591804862022,
-0.09082979708909988,
0.570982813835144,
-0.08337980508804321,
-0.3844320476055145,
-0.11087480187416077,
0.38875052332878113,
0.15719279646873474,
-0.06130542606115341,
-0.6677860021591187,
0.1661650389432907,
0.40414753556251526,
-0.18946082890033722,
0.009403332136... | |
I'm writing a library of Extension Methods for String and DateTime utility functions in C#. Can you please help me out by suggesting the useful utlity functions for String and DateTime you may want to be part of it ? With your suggestions I can make it more cohesive and Collective.
Thanks!
```
public static bool IsNul... | [
-0.05530262738466263,
-0.12323182076215744,
0.5356812477111816,
-0.5411544442176819,
0.19498437643051147,
0.22797361016273499,
0.07768985629081726,
-0.317951500415802,
0.11477615684270859,
-0.17977699637413025,
-0.0720042735338211,
0.627278208732605,
-0.4309188723564148,
0.180606871843338,... | |
= new string(chars);
}
return value;
}
public static string ToTitleCase(this string value) {
return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(value);
}
public static string ToTitleCaseInvariant(this string value) {
return CultureInfo.InvariantCulture.TextInfo.ToTitleCase(value);
}
```
Trivial, b... | [
0.30933770537376404,
-0.34110668301582336,
0.7070390582084656,
-0.06124991178512573,
0.1200527474284172,
0.18428681790828705,
0.11305168271064758,
-0.0673912912607193,
0.17813865840435028,
-0.33075782656669617,
-0.10482702404260635,
0.32273685932159424,
-0.5026394128799438,
0.4669662714004... | |
I'm making a web page in which I have a list of products, along with a field next to each product in which a customer is meant to enter the quantity they want to order. The list of products is generated from a database and therefore the number of products isn't known. Is there a way of POSTing the quantity of each prod... | [
0.6749252676963806,
0.020925411954522133,
0.22963301837444305,
-0.056944914162158966,
-0.13575318455696106,
0.2313695251941681,
-0.2769591212272644,
-0.09713032841682434,
-0.345802903175354,
-0.2907760739326477,
0.31708988547325134,
0.8023005127906799,
-0.18629178404808044,
0.2023991048336... | |
type="text" name="quantity[2]">
```
And then in PHP it will become an array you can loop over easily:
```
foreach ($_POST['quantity'] as $productId => $quantity) {
echo (int) $productId . ':' . (int) $quantity;
//etc.
}
``` | [
0.27319470047950745,
0.04920047149062157,
0.2634725868701935,
-0.2656388282775879,
-0.20650291442871094,
0.19765309989452362,
0.05794975161552429,
-0.35532093048095703,
-0.13986678421497345,
-0.08356484025716782,
-0.1252432018518448,
0.33987680077552795,
-0.3270859718322754,
0.028468312695... | |
I am working on a futur projects that will get information to a private website not from interface but from email. After some research, [posterous.com](http://posterous.com/) is doing something interesting, posting on personal blog from email. [flickr](http://www.flickr.com/) is doing the same thing with photo attached... | [
0.6493214964866638,
-0.00868042279034853,
0.5574476718902588,
0.1907588541507721,
-0.21490120887756348,
0.14312924444675446,
0.05637524649500847,
0.05662279576063156,
-0.2965812385082245,
-0.6684265732765198,
0.3446539342403412,
0.16272176802158356,
0.17324340343475342,
0.14186185598373413... | |
that can be done with php, but my qualification is not good enough to do that myself, but i can adapt some script for sure !.
Looking around quickly I found two scripts that hold promise:
<http://www.weberdev.com/get_example-4015.html>
and
<http://www.nerdydork.com/download-pop3imap-email-attachments-with-php.html>
... | [
0.4380619525909424,
-0.1531183272600174,
0.22206087410449982,
0.29526248574256897,
0.08231817185878754,
0.11347506940364838,
0.31614771485328674,
0.2025490254163742,
-0.07789725810289383,
-0.8960157036781311,
0.4033792018890381,
0.401298850774765,
0.10205934941768646,
-0.10378003120422363,... | |
I am a newbie to Flex 3 and Flash remoting and I can't decide which technique to use for frontend/backend communication.
I started of with XML, but it seems overhead to construct all XMLs in PHP, parse them in Flex, and for sending back data constructing again XMLs in Flex and then parsing them in PHP.
That's why I f... | [
0.2862895131111145,
0.09910767525434494,
0.3943556845188141,
0.07348484545946121,
-0.518502950668335,
-0.12906356155872345,
-0.04050614684820175,
-0.37932440638542175,
-0.19825874269008636,
-0.792890727519989,
0.1454465687274933,
0.5420679450035095,
-0.16714976727962494,
-0.198809862136840... | |
WebORP.
Would are the greatest disadvantages of AMFPHP? Any recommendations?
Thx a lot,
Martin
I don't know anything about WebORP but AMFPHP will definitely work better for you than the xml. AMF is a binary transport and is MUCH faster than transferring all of that ascii text and parsing it all out. Plus it will allo... | [
0.2837849259376526,
0.10757958143949509,
0.5067306160926819,
0.3700472414493561,
-0.559227466583252,
-0.17115885019302368,
-0.15469038486480713,
-0.15571992099285126,
-0.34317055344581604,
-0.9314637780189514,
0.12800957262516022,
0.3884181082248688,
-0.33049866557121277,
-0.07570426911115... | |
denominator. | [
0.14242781698703766,
0.14561443030834198,
0.10379151254892349,
-0.0366109237074852,
-0.11971227824687958,
0.26838576793670654,
-0.1044938862323761,
0.008769415318965912,
-0.19607022404670715,
-0.34198909997940063,
0.20053668320178986,
0.2886417508125305,
-0.48925289511680603,
0.12498690187... | |
I may be doomed by an impedence mismatch, but I'm trying to reconcile examples I've seen for IRepository and immutable objects.
I'm working on a cataloging application where hundrds of web requests operate on a 'working set' of products - a subset of the whole catalog tends to be in play at any given time.
At the sam... | [
0.5617128610610962,
0.3687213063240051,
-0.04083012416958809,
0.2809886038303375,
0.09071850776672363,
-0.04291100054979324,
0.040150389075279236,
0.09733990579843521,
-0.2580128312110901,
-0.6237795352935791,
0.04135746508836746,
0.3039033114910126,
0.1129237562417984,
0.5541683435440063,... | |
the same product object at the same time.
But this idea seems broken with many of the IRepository examples I've seen with Update/Delete methods - as soon as a thread can write to a product it seems like I open myself up to races and other nastiness.
So I envisioned an 'editor' model where changes to an entity are ma... | [
0.11834242194890976,
0.008717673830688,
0.23734907805919647,
0.12478791177272797,
0.06332198530435562,
0.0017366362735629082,
0.054218895733356476,
-0.033853381872177124,
-0.3805945813655853,
-0.4201161563396454,
-0.022487647831439972,
0.3045679032802582,
-0.44915467500686646,
0.3122187852... | |
a repository as I've seen them described?
A repository is only responsible for data retrieval/storage. A factory is responsible for creating new objects.
In your case, immutable objects are ok. However you need some method to invalidate superseeded products and remove them from the repository cache. Any dangling refer... | [
0.3860267400741577,
0.23731772601604462,
0.048567213118076324,
0.4595308303833008,
0.14847423136234283,
0.03623681142926216,
0.0771762803196907,
-0.06192658096551895,
-0.544574499130249,
-0.20952272415161133,
-0.2780640721321106,
0.42095598578453064,
-0.21913999319076538,
0.569995522499084... | |
is not changed. And Supersede would store the new product, invalidate the old and purge it from the cache.
In terms of a C# signature I could imagine the two storage methods to take the following appearance:
```
void Save(Product product);
void Supersede(Product oldProduct, Product newProduct);
```
I hope this hel... | [
0.25900933146476746,
0.16444385051727295,
0.3325459957122803,
-0.19840307533740997,
0.4093225598335266,
-0.03438323363661766,
0.24975180625915527,
-0.046629998832941055,
-0.3076728582382202,
-0.5443153381347656,
-0.36834990978240967,
0.44558411836624146,
-0.4366706311702728,
0.474405407905... | |
hy all, I have the following "wrong" dispatcher:
```
def _load_methods(self):
import os, sys, glob
sys.path.insert(0, 'modules\commands')
for c in glob.glob('modules\commands\Command*.py'):
if os.path.isdir(c):
continue
c = os.path.splitext(c)[0]
parts = c.split(os.path.... | [
-0.06330928951501846,
-0.06792905181646347,
0.601330041885376,
-0.07311045378446579,
0.3002879023551941,
0.0051008351147174835,
-0.13732022047042847,
-0.378811240196228,
-0.323862761259079,
-0.48798614740371704,
-0.49531224370002747,
0.5506836771965027,
-0.3954511284828186,
0.3096463084220... | |
_cmdClass = __import__(module).Command
for method_name in list_public_methods(_cmdClass):
self._methods[method_name] = getattr(_cmdClass(), method_name)
sys.path.pop(0)
```
It produces the following error:
ImportError: No module named commands.CommandAntitheft
where Command\*.py is placed in... | [
-0.25205114483833313,
0.15892307460308075,
0.5747343897819519,
0.09469248354434967,
0.21876347064971924,
0.2737054228782654,
0.3723941743373871,
-0.4537353217601776,
-0.653712272644043,
-0.5912426710128784,
-0.32474201917648315,
0.6408738493919373,
-0.25473806262016296,
0.12144596129655838... | |
continue
module = os.path.splitext(file)[0].rsplit(os.sep, 1)[1]
fd, filename, desc = imp.find_module(module,
['./modules/commands'])
try:
_cmdClass = imp.load_module( module, fd, filename, desc).Command
finally:
fd.close()
for method_name... | [
-0.18803995847702026,
-0.3417765200138092,
1.0900139808654785,
-0.2706991732120514,
0.6569486856460571,
0.22737550735473633,
0.2962692379951477,
-0.28749191761016846,
-0.3578696846961975,
-0.25516992807388306,
-0.3734128177165985,
0.6541038751602173,
-0.07041173428297043,
0.057294230908155... | |
self._methods[method_name] = getattr(_cmdClass(), method_name)
```
It still remains all risks suggested by bobince (tanks :-) )but now I'm able to load commands at "runtime"
A repository is only responsible for data retrieval/storage. A factory is responsible for creating new objects.
In your case, immutable objects... | [
0.2783639430999756,
0.2820230722427368,
0.38407570123672485,
-0.07145635783672333,
0.013024112209677696,
-0.08017568290233612,
0.4438880980014801,
-0.25053727626800537,
-0.35834819078445435,
-0.5817931890487671,
0.14886005222797394,
0.813892662525177,
-0.23775538802146912,
0.27043089270591... | |
via the factory. Your repository would only include three operation kinds: Retrieve (or Find), Save and Supersede. Where Save stores a new product, which is not changed. And Supersede would store the new product, invalidate the old and purge it from the cache.
In terms of a C# signature I could imagine the two storage... | [
0.43106016516685486,
-0.040716711431741714,
0.13166266679763794,
-0.05004080757498741,
0.34784024953842163,
0.2329511195421219,
0.09045109152793884,
0.006116958800703287,
-0.38099122047424316,
-0.5479090809822083,
-0.18852412700653076,
0.4360882043838501,
-0.3857637047767639,
0.40708619356... | |
This test fails when it is run with the NUnit console runner. It works if I run just that test with TestDriven.NET, but not if I run the entire suite with TestDriven.NET:
```
[Test]
public void BackgroundWorkerFiresRunWorkerCompleted()
{
var runner = new BackgroundWorker();
ManualResetEvent done = new ManualResetE... | [
0.13908110558986664,
-0.41758474707603455,
0.3185088634490967,
-0.00029038143111392856,
0.1525965929031372,
-0.13288043439388275,
0.980183482170105,
-0.5552510619163513,
0.05866844952106476,
-0.5532206296920776,
0.05540299043059349,
0.919930100440979,
-0.09926570951938629,
0.08044446259737... | |
workaround to make the test work?
I don't think that it has to do with the message pump, since tests usually run in a blocking fashion anyways. But it may be that the event is invoked on the "UI" thread, which uses a windows message which does not get handled.
So, if the problem was the message pump or windows message... | [
0.4185161888599396,
-0.3164002597332001,
0.3841453790664673,
-0.19935643672943115,
0.1896614134311676,
-0.06405724585056305,
0.705518364906311,
-0.5060469508171082,
-0.050299983471632004,
-0.49646443128585815,
-0.1391652375459671,
0.7511615753173828,
-0.357866108417511,
0.13424205780029297... | |
ColdFusion has a great cfimage tag that works perfectly. However, it doesn't allows vector formats to be manipulated. This caused me to continue searching for 3rd party tools to do some "image magic".
I decided to try ImageMagick with ColdFusion. I've read couple of posts that was saying 'I used to work with ImageMagi... | [
0.3257707953453064,
-0.0041850777342915535,
0.43462544679641724,
0.05195922031998634,
-0.47825032472610474,
-0.3312271535396576,
0.09239421039819717,
0.05734507367014885,
-0.1207561120390892,
-0.7814220190048218,
0.4229978322982788,
0.5998431444168091,
-0.5591649413108826,
0.03270876035094... | |
to browser. ImageMagick command 'convert image.eps image.jpg' runs perfectly from Windows command line, but not from ColdFusion.
2. Im4java and JMagick wrappers to run IM commands directly from Java objects. I created Java objects with CreateObject function and was trying to execute it's methods, but got only different... | [
0.150136798620224,
-0.11527276039123535,
0.5643072724342346,
-0.036901991814374924,
-0.2743818759918213,
-0.05313676595687866,
0.26468440890312195,
-0.44106557965278625,
-0.2580334544181824,
-1.0274810791015625,
0.06516293436288834,
0.5614032745361328,
-0.6839233040809631,
-0.3033888638019... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.