text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
in mind that statements 2 and 3 are different to the first one.
How? Well, you're doing a left outer join and your WHERE clause isn't taking that into account (like the ON clause does). At a minimum, try:
```
SELECT col1, col2
FROM table1, table2
WHERE table1.person_uid = table2.person_uid (+)
AND table1.period = tab... | [
-0.39595890045166016,
-0.13867680728435516,
0.044541776180267334,
-0.10905298590660095,
-0.050067320466041565,
0.14510010182857513,
0.051036834716796875,
-0.21095934510231018,
-0.3580301105976105,
-0.6152852177619934,
-0.1118331104516983,
0.5043761134147644,
0.07515320926904678,
-0.1277727... | |
I'm implementing a DFA as close as I can to the formal definition as a learning exercise (and blogging material)
I planned on using a java.util.Set where a set is involved in the definition.
The definition involves a set of tuples to define the legal state transitions: (state,symbol) -> nextState.
I have a Transitio... | [
-0.17222198843955994,
-0.1905183494091034,
0.4085735082626343,
-0.06827455013990402,
0.05020808428525925,
0.31398630142211914,
0.041401319205760956,
-0.35790377855300903,
0.15124723315238953,
-1.0176234245300293,
-0.08313632756471634,
0.15089160203933716,
-0.17959502339363098,
0.1506232470... | |
I anticipated building a Transition object using these two to pull out the matching Transition from the Set, which would then tell me the next state, and I can iterate.
But - I don't see any way of extracting a member of a java.util.Set for further use. I can remove(Object o), but that just return boolean.
What am I ... | [
0.1110830307006836,
-0.1341623216867447,
0.07518874853849411,
-0.0744422897696495,
-0.02146247588098049,
0.014805969782173634,
0.06832631677389145,
-0.22924844920635223,
-0.11585284024477005,
-0.8963485956192017,
0.07373057305812836,
0.28566277027130127,
-0.36613112688064575,
0.12284370511... | |
I'm trying to built a SharePoint Web Part that has as part of it a service reference to *Another* SharePoint server that I need to call from within vb code. However when I try to call the remote web service for the first time, I get the following in the log:
---
Could not find default endpoint element that references... | [
0.5005175471305847,
0.05592641234397888,
0.7212129831314087,
-0.25225958228111267,
0.07784993201494217,
0.05960283428430557,
0.3609510660171509,
-0.2546543478965759,
-0.19478586316108704,
-0.9209977388381958,
-0.006284072529524565,
0.47629234194755554,
-0.2960861325263977,
0.55424225330352... | |
configurationName)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
at System.Servic... | [
-0.1536186784505844,
-0.2329503297805786,
0.7570982575416565,
-0.14536459743976593,
-0.0747779980301857,
-0.10983152687549591,
0.38293296098709106,
-0.47977858781814575,
0.03745296224951744,
-1.1081489324569702,
-0.16513629257678986,
0.46274450421333313,
-0.3316800892353058,
0.347967416048... | |
In [zsh](http://www.zsh.org/), how can I set up the line editor such that `backward-kill-word` stops on a directory separator? Currently in my bash setup, if I type
```
cd ~/devel/sandbox
```
and then hit `C-w` point will be right after `devel/`. In my zsh setup, point would be after `cd` . I'd like to set up zsh so... | [
-0.23971238732337952,
0.277673602104187,
0.430215984582901,
-0.4109072685241699,
-0.17274190485477448,
-0.12461092323064804,
0.14697974920272827,
-0.27817490696907043,
-0.031157298013567924,
-0.5282595157623291,
-0.047780733555555344,
0.4721635580062866,
-0.3494943678379059,
0.096006557345... | |
After searching around somewhat thoroughly, I noticed a slight lack of functions in PHP for handling [IPv6](http://en.wikipedia.org/wiki/IPv6). For my own personal satisfaction I created a few functions to help the transition.
The `IPv6ToLong()` function is a temporary solution to that brought up here: [How to store I... | [
0.21178270876407623,
0.05898839235305786,
0.4225725829601288,
0.017476936802268028,
-0.11379359662532806,
0.09494829177856445,
0.04627666249871254,
-0.36605292558670044,
-0.391310453414917,
-0.3251340687274933,
0.016911344602704048,
0.30168166756629944,
-0.2327447235584259,
0.3007584810256... | |
static $Mask = '::ffff:'; // This tells IPv6 it has an IPv4 address
$IPv6 = (strpos($Ip, '::') === 0);
$IPv4 = (strpos($Ip, '.') > 0);
if (!$IPv4 && !$IPv6) return false;
if ($IPv6 && $IPv4) $Ip = substr($Ip, strrpos($Ip, ':')+1); // Strip IPv4 Compatibility notation
elseif (!$IPv4) return $Ip; // ... | [
-0.10146774351596832,
-0.36561766266822815,
0.5816987156867981,
-0.17210760712623596,
0.1866016834974289,
-0.040668148547410965,
0.4686036705970764,
-0.3974460959434509,
-0.34950074553489685,
-0.21541787683963776,
-0.5145174860954285,
0.5610461235046387,
-0.5938016176223755,
0.044854253530... | |
($Ip[$i] > 255) return false;
$Part7 = base_convert(($Ip[0] * 256) + $Ip[1], 10, 16);
$Part8 = base_convert(($Ip[2] * 256) + $Ip[3], 10, 16);
return $Mask.$Part7.':'.$Part8;
}
/**
* Replace '::' with appropriate number of ':0'
*/
function ExpandIPv6Notation($Ip) {
if (strpos($Ip, '::') !== false)
... | [
-0.24287016689777374,
-0.4661219120025635,
0.532797634601593,
-0.2624777555465698,
0.006207829341292381,
0.34740540385246277,
0.2283279150724411,
-0.5092900395393372,
-0.3324345648288727,
-0.42358872294425964,
-0.46961304545402527,
0.44328561425209045,
-0.252882182598114,
0.006033489014953... | |
*
* @see https://stackoverflow.com/questions/420680/
*/
function IPv6ToLong($Ip, $DatabaseParts= 2) {
$Ip = ExpandIPv6Notation($Ip);
$Parts = explode(':', $Ip);
$Ip = array('', '');
for ($i = 0; $i < 4; $i++) $Ip[0] .= str_pad(base_convert($Parts[$i], 16, 2), 16, 0, STR_PAD_LEFT);
for ($i = 4; $i ... | [
-0.18825684487819672,
-0.039349574595689774,
0.5352881550788879,
-0.1604231745004654,
0.12541581690311432,
0.24967697262763977,
0.2622970938682556,
-0.6905320286750793,
-0.330305278301239,
-0.19277746975421906,
-0.4373708665370941,
0.44948622584342957,
-0.25071412324905396,
0.0389196984469... | |
base_convert($Ip[0], 2, 10) + base_convert($Ip[1], 2, 10);
}
```
For these functions I typically implement them by calling this function first:
```
/**
* Attempt to find the client's IP Address
*
* @param bool Should the IP be converted using ip2long?
* @return string|long The IP Address
*/
function GetRealRemo... | [
-0.008570482954382896,
0.0005128165357746184,
0.6896152496337891,
-0.08627316355705261,
0.01197357103228569,
0.25014764070510864,
0.5012496113777161,
-0.7709141969680786,
-0.285454124212265,
-0.3005698025226593,
-0.10260595381259918,
0.43665963411331177,
-0.3732808232307434,
0.069723688066... | |
$Ip = substr($Ip, 0, ($CommaPos - 1));
$Ip = IPv4To6($Ip);
return ($ForDatabase ? IPv6ToLong($Ip, $DatabaseParts) : $Ip);
}
```
Someone please tell me if I'm reinventing the wheel here or I've done something wrong.
This implementation converts IPv4 to IPv6. Any IPv6 address it doesn't touch.
How about [`ine... | [
-0.0521874874830246,
0.05611051991581917,
0.19312380254268646,
0.03738946467638016,
-0.08594337850809097,
-0.15598897635936737,
0.12602601945400238,
-0.19952833652496338,
-0.4293892979621887,
-0.3629850447177887,
0.12030378729104996,
0.4182170331478119,
-0.30313044786453247,
0.329694390296... | |
Ok, so I have an object named "Business" (I know, I know, "Business Business Object")
When it saved its foreign keys are getting lost somehow. Everything else is saving. I have stepped through the code and followed the object up until the
session.SaveOrUpdate(businessObject);
method. The object at that point is inta... | [
0.030428001657128334,
0.25458234548568726,
0.27385252714157104,
-0.2023029327392578,
0.3683502972126007,
-0.14398303627967834,
0.42115142941474915,
0.052972469478845596,
-0.3787531554698944,
-0.7096550464630127,
0.03501944988965988,
0.5052459239959717,
-0.02640487253665924,
0.3789437115192... | |
<many-to-one insert="false" update="false" name="_User" column="UserId" class="HQData.Objects.User, HQData" />
<many-to-one insert="false" update="false" name ="_SubCategory" column="SubCategoryId" class="HQData.Objects.SubCategory, HQData"/>
```
Here is where the object is being loaded and saved:
```
HQData.Ob... | [
-0.2135920375585556,
0.07538238167762756,
0.4930173456668854,
-0.2620408833026886,
0.07576572149991989,
0.14886923134326935,
0.283517062664032,
-0.3585299253463745,
-0.3311154544353485,
-0.5595048069953918,
-0.24990636110305786,
0.8320836424827576,
-0.4432085156440735,
0.1281304955482483,
... | |
business._SubCategory = CategoryManager.GetCategory(Convert.ToInt32(ddlCategory.SelectedValue.Trim()));
business.Name = ControlHelper.Sanitize(txtName.Text.Trim());
business.Address1 = ControlHelper.Sanitize(txtAddress.Text.Trim());
business._Township = TownshipManager.GetTownshipByC... | [
-0.27355071902275085,
-0.042366862297058105,
0.3951234221458435,
-0.33763831853866577,
0.013814055360853672,
0.2154393047094345,
0.6178790330886841,
-0.29442352056503296,
-0.15091292560100555,
-0.6632706522941589,
-0.6358062028884888,
0.04410141706466675,
-0.4269064962863922,
0.37092989683... | |
business.Website = ControlHelper.Sanitize(txtWebsite.Text.Trim());
business.AboutUs = ControlHelper.Sanitize(txtAboutUs.Text.Trim());
business._User = UserManager.GetCurrentUser();
BusinessManager.SaveBusiness(business);
```
Thank you for your help.
Set the insert update propertie... | [
0.20508818328380585,
0.34884634613990784,
0.16919107735157013,
-0.2522948980331421,
0.2536885440349579,
-0.09840645641088486,
0.5935037136077881,
-0.04953320324420929,
-0.06144856661558151,
-0.5813811421394348,
-0.32510703802108765,
0.775238573551178,
-0.3935081362724304,
0.107872553169727... | |
I've got a wx.Toolbar and I'd like to make the buttons larger. I've searched and can't seem to find any concrete documentation on how to do this.
I'm also wondering how well this will translate across platforms; what will happen to the buttons and icons on OSX?
It depends on what you want to change: is it the size of ... | [
0.37890300154685974,
-0.04306027665734291,
0.7652509212493896,
-0.13873523473739624,
-0.026485491544008255,
0.2484954297542572,
0.046230144798755646,
-0.15947739779949188,
-0.5617250204086304,
-0.932054340839386,
-0.0033975939732044935,
0.7175377607345581,
-0.3963991403579712,
-0.060298305... | |
bigger ones. The easiest way is to use [wx.ArtProvider](http://docs.wxwidgets.org/2.6/wx_wxartprovider.html):
```
wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE, wx.ART_TOOLBAR, (24, 24))
```
So, summing it up:
```
# Define the size of the icons and buttons
iconSize = (24, 24)
# Set the size of the buttons
toolbar.SetT... | [
-0.007592536974698305,
-0.19026735424995422,
0.7884801626205444,
-0.16988535225391388,
-0.08950497210025787,
0.5134028196334839,
-0.028193870559334755,
-0.46332165598869324,
-0.7180101275444031,
-0.8052796125411987,
-0.045760251581668854,
0.5598599910736084,
-0.38106927275657654,
-0.177367... | |
I'd like to cache objects in ASP.NET MVC. I have a `BaseController` that I want all Controllers to inherit from. In the BaseController there is a `User` property that will simply grab the User data from the database so that I can use it within the controller, or pass it to the views.
I'd like to cache this information... | [
0.14191584289073944,
0.1400965303182602,
0.2549034059047699,
0.16816218197345734,
0.018697448074817657,
-0.20415018498897552,
-0.05514528229832649,
-0.20067662000656128,
-0.03153901547193527,
-0.8414664268493652,
0.09966782480478287,
0.24409325420856476,
-0.32395613193511963,
0.37064447999... | |
still use the cache (shared among all responses) and session (unique per user) for storage.
I like the following "try get from cache/create and store" pattern (c#-like pseudocode):
```
public static class CacheExtensions
{
public static T GetOrStore<T>(this Cache cache, string key, Func<T> generator)
{
var r... | [
0.2555251717567444,
-0.28157395124435425,
0.4576922655105591,
-0.016416292637586594,
0.3185602128505707,
-0.012827578000724316,
0.3610652983188629,
-0.14738759398460388,
-0.09251496195793152,
-0.537096381187439,
-0.2334343045949936,
0.3976638615131378,
-0.11924892663955688,
0.2213809937238... | |
.Cache
.GetOrStore<User>(
$"User{_userId}",
() => Repository.GetUser(_userId));
```
You can adapt this pattern to the Session, ViewState (ugh) or any other cache mechanism. You can also extend the ControllerContext.HttpContext (which I think is one of the wrappers in S... | [
0.3069697618484497,
-0.3795313537120819,
0.4530789852142334,
0.27778998017311096,
0.14343656599521637,
-0.3422648012638092,
0.2674404978752136,
-0.0064969127997756,
-0.2950984537601471,
-0.9443658590316772,
-0.09122991561889648,
0.403937429189682,
-0.353323757648468,
0.49594178795814514,
... | |
room for mocking the cache. | [
-0.051090989261865616,
0.1966293901205063,
-0.16961027681827545,
0.13956741988658905,
-0.07572571188211441,
0.09767121076583862,
0.0919741690158844,
0.12906600534915924,
-0.11058437824249268,
-0.17132940888404846,
0.24919523298740387,
0.1350044310092926,
0.07372540235519409,
-0.07127294689... | |
I need to get the path to the native (rather than the WOW) program files directory from a 32bit WOW process.
When I pass CSIDL\_PROGRAM\_FILES (or CSIDL\_PROGRAM\_FILESX86) into SHGetSpecialFolderPath it returns the WOW (Program Files (x86)) folder path.
I'd prefer to avoid using an environment variable if possible.
... | [
0.380825012922287,
0.40263471007347107,
0.4072485864162445,
0.03215807303786278,
-0.2995995879173279,
-0.04331165552139282,
0.4474431574344635,
-0.2575432360172272,
-0.05715714022517204,
-0.8787851929664612,
0.2509772479534149,
0.5524053573608398,
0.04993276670575142,
0.11552398651838303,
... | |
I need to get the paths to "Program Files (x86)" and "Program Files".
I appreciate all the help and, especially, the warnings in this thread. However, I really do need this path and this is how I got it in the end:
(error checking removed for clarity, use at your own risk, etc)
```
WCHAR szNativeProgramFilesFolder[MA... | [
0.36720767617225647,
0.205601304769516,
0.5214463472366333,
-0.1165488138794899,
0.2336122840642929,
-0.2070399671792984,
0.4393157660961151,
-0.20332957804203033,
-0.19788116216659546,
-0.9654184579849243,
-0.08096092939376831,
0.70805424451828,
-0.28164422512054443,
-0.10783872753381729,... | |
According to [this](http://www.vitalygorn.com/blog/post/2007/11/Code-Metrics-in-Visual-Studio-2008.aspx) blog the build in code metrics feature in VS2008 Team Edition is suppose to be smart enough to skip generated code. It's not. Is there an option somewhere that I need to set?
The real answer to this question is I ga... | [
0.25888437032699585,
-0.0931096151471138,
0.06760447472333908,
0.16868242621421814,
-0.20153188705444336,
-0.33234983682632446,
0.4272674322128296,
-0.12092564254999161,
-0.044776272028684616,
-0.532390296459198,
0.14405933022499084,
0.6931431293487549,
-0.03636562079191208,
-0.06408017873... | |
I want to test my software on different Windows Operating Systems. I plan to do it using Virtual Machine software, either VMWare or Microsoft Virtual PC.
I would like to be able to test Windows 7, Windows Vista, Windows XP and Windows 98 in both 32 and 64 bit flavors, and possibly at differing service pack levels.
Wh... | [
0.7184396386146545,
0.058787040412425995,
0.23253262042999268,
0.2516302168369293,
-0.18181708455085754,
-0.04990250617265701,
0.18432928621768951,
0.06969460844993591,
0.1130063608288765,
-0.36419913172721863,
0.2031945139169693,
0.39033645391464233,
0.0630204826593399,
0.0945276841521263... | |
valid. I'm moving the accepted answer over to Michael Burr, whose link still provides a good number of OS images, and for free as well.
You can get VPC images of installed OS's from Microsoft at no cost for a select number of OS/IE configurations:
* <http://www.microsoft.com/Downloads/details.aspx?FamilyID=21eabb90-95... | [
0.5197449326515198,
0.4034207761287689,
0.5543999075889587,
0.33893150091171265,
0.3883078396320343,
-0.2588701844215393,
0.1790398359298706,
-0.20187020301818848,
-0.2438899427652359,
-0.18897347152233124,
-0.10573842376470566,
0.2817130386829376,
0.10321352630853653,
0.4805957078933716,
... | |
available images are:
* WinXP SP3 with IE6
* WinXP SP2 with IE7
* WinXP SP3 with IE8 Beta
* Vista with IE7
* WinXP to Windows 8.1, IE6 to IE11
For other OS's, your best bet is something like the MSDN or Technet subscription mentioned elsewhere. | [
0.4616518020629883,
-0.3627992868423462,
0.37517446279525757,
0.22675877809524536,
-0.10362255573272705,
0.06360992044210434,
0.0574742928147316,
0.24988971650600433,
-0.23286859691143036,
-0.8593953847885132,
-0.2982085943222046,
0.46791785955429077,
-0.06915901601314545,
-0.3113196194171... | |
I have a bunch of documents in a MarkLogic xml database. One document has:
```
<colors>
<color>red</color>
<color>red</color>
</colors>
```
Having multiple colors is not a problem. Having multiple colors that are both red is a problem. How do I find the documents that have duplicate data?
Everything MarkLogic re... | [
0.2533741891384125,
0.2945510745048523,
0.5677595138549805,
0.0472981221973896,
0.0951254665851593,
-0.07754925638437271,
0.07890559732913971,
-0.24017128348350525,
-0.25457605719566345,
-0.8004134893417358,
0.031251490116119385,
0.22990772128105164,
-0.238337904214859,
0.10558979213237762... | |
I realize that a whole lot of code cannot fit here, but I am asking for general direction or pointer.
I have .NET user controls nested six deep for an interactive gadget with (outer to inner) of : wrapper, tabs, panels, lists, rows, items.
I am trying to get a reference to an ancestor control from a nested control.
... | [
-0.0908297523856163,
0.23476648330688477,
0.21357856690883636,
0.009370604529976845,
0.2782020568847656,
0.1595890074968338,
0.23659303784370422,
0.08710722625255585,
-0.0016513819573447108,
-1.0877418518066406,
0.16888798773288727,
-0.023941732943058014,
-0.06028063967823982,
0.6103134155... | |
that is not recommended either, since structure or IDs can change....
Is there a decent alternative?
Remember that components are best made ignorant. You never want any control to have any knowledge of anything above itself in the hierarchy and to have interface-only knowledge of controls below itself in the hierarchy... | [
0.2905905246734619,
0.09943769872188568,
0.10089576989412308,
0.39654216170310974,
0.019055576995015144,
-0.07257140427827835,
0.2784357964992523,
-0.17764869332313538,
-0.0362415611743927,
-0.4893573820590973,
-0.05519705265760422,
0.43599724769592285,
-0.4098605215549469,
0.0777415111660... | |
not a perfect solution as your control is not totally ignorant of others but at least you will no longer have to know how to get the `MyTab` reference - it will be provided to you.
So I would create a property called something like `ParentTab` and set this property equal to the `MyTab` reference somewhere in the page ... | [
0.08866750448942184,
-0.17852644622325897,
0.28039655089378357,
0.5309242606163025,
0.14802438020706177,
-0.1414203941822052,
0.0851040631532669,
0.011935829184949398,
0.1394171416759491,
-0.6963061690330505,
0.004926856141537428,
0.2423299252986908,
-0.15823961794376373,
0.318779170513153... | |
I have a cube in SSAS 2005 that calculates running sums over millions of records. The current implementation is using a PeriodsToDate sum function in MDX and it is horribly slow, taking 15 minutes or more to return results in some cases. There are a huge number of solutions to this problem so I am hoping someone else h... | [
-0.18207623064517975,
0.17216582596302032,
0.4498887360095978,
-0.04914678633213043,
-0.18018144369125366,
0.03311969339847565,
0.08320599794387817,
-0.18880902230739594,
-0.4516829550266266,
-0.42195722460746765,
0.4474390745162964,
0.02917833812534809,
-0.0864456370472908,
0.366349786520... | |
Celko, I know they look nice on paper but the cross join solutions are horribly slow as your data grows), using a script task in SSIS (or is there a better way to do this in integration services) or using MDX in Analysis Services?
Any other ideas?
Took me little while to figure this out where it would work with and wi... | [
0.10370797663927078,
-0.03889550641179085,
0.6386612057685852,
0.08020088821649551,
-0.040221381932497025,
0.0007056433823890984,
-0.052233122289180756,
-0.2574210464954376,
-0.3239074945449829,
-0.5287656188011169,
-0.037746548652648926,
0.15982253849506378,
-0.12576361000537872,
0.447640... | |
,[Measures].[RunningTotal]
} on columns,
nonempty([Deferred Revenue Date].[Standard Calendar].[Date], [Measures].[Deferred Revenue Amount]) on rows
from
DW;
```
One trick is the nonempty() clause which will only return values in the calculated measure column if there are intersections with the dimension and m... | [
0.010564486496150494,
0.10997600108385086,
0.3134884238243103,
0.06585149466991425,
-0.12288050353527069,
-0.03485571965575218,
0.5371308922767639,
-0.0927511602640152,
-0.35307490825653076,
-0.24645498394966125,
-0.07531237602233887,
0.530819833278656,
-0.29430091381073,
0.325830072164535... | |
to come as close as I could to what you were trying to do. I wrote a query similar to yours for my cube and it ran in 43 seconds. This new one runs in about 2 seconds and we have quite a bit of data, so it should run much faster for you as well, assuming you have aggregations built, etc.
The problem with MDX is there'... | [
0.6173288226127625,
-0.013690100982785225,
0.28417253494262695,
0.08620280027389526,
-0.22823922336101532,
-0.12207270413637161,
0.4957287907600403,
0.07947491854429245,
-0.18749290704727173,
-0.7439680695533752,
0.5105658769607544,
0.25347262620925903,
-0.28000783920288086,
-0.11305569112... | |
I've got a problem on a *WebForms* application where a user selects some criteria from drop downs on the page and hits a button on the page which calls this method:
```
protected void btnSearch_Click(object sender, EventArgs e)
```
They then click on button to download a zip file based on the criteria which calls th... | [
0.446004182100296,
0.0777977854013443,
0.4775680601596832,
-0.021731873974204063,
0.32795313000679016,
-0.3193422555923462,
0.3336617648601532,
-0.009786252863705158,
-0.14427773654460907,
-0.880094051361084,
-0.2800833582878113,
0.3270624279975891,
-0.29852861166000366,
0.3618941605091095... | |
it fires the `btnSearch_Click` event again.
`Response.ContentType` and `Response.AddHeader` has been set up correctly.
The problem is, that `btnSearch` appends criteria so basically it is being appended twice and causing problems.
Is there something I can do to prevent this?
This is a VS2008 web application using C... | [
0.39955824613571167,
-0.09868679195642471,
0.493460476398468,
0.016957534477114677,
-0.14589732885360718,
-0.20603398978710175,
0.3833041787147522,
-0.2821325361728668,
0.0016630191821604967,
-0.7388331890106201,
-0.1788852959871292,
0.4801293611526489,
-0.41920578479766846,
0.147898316383... | |
Is it a good practice to develop web-service and web-site in two different languages, on two different servers? E.g. right now I create a Java web-service running on Glassfish and Ruby on Rails presentation layer running in the same server.
I'd like to leave web-service on the same server but use Ruby 1.9, running in ... | [
0.36901164054870605,
0.140145406126976,
-0.02061665616929531,
0.02177681215107441,
-0.08036690950393677,
0.15621747076511383,
-0.1312936395406723,
-0.10173331946134567,
-0.40872883796691895,
-0.8175951242446899,
-0.01211592461913824,
0.44093912839889526,
-0.3536299467086792,
0.000411654618... | |
[ps](http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/ps/ps.c). | [
-0.22603672742843628,
-0.00879902858287096,
0.6732320785522461,
-0.13738001883029938,
0.07080776989459991,
-0.022190699353814125,
-0.16036923229694366,
0.0944136455655098,
-0.5602513551712036,
-0.5025306940078735,
-0.723816990852356,
-0.03209933638572693,
-0.24819377064704895,
0.1028863266... | |
I'm trying to send a WOL package on all interfaces in order to wake up the gateway(which is the DHCP server, so the machine won't have an IP yet).
And it seems that I can only bind sockets to IP and port pairs...
So the question is: How can a create a socket(or something else) that is bound to a NIC that has no IP?
(... | [
0.4116458594799042,
-0.04364996775984764,
0.36747831106185913,
0.0753844678401947,
-0.3463815152645111,
-0.4539380371570587,
0.3578643798828125,
0.049188412725925446,
-0.20831739902496338,
-0.6894446015357971,
-0.2593719959259033,
0.5473343729972839,
-0.29058462381362915,
0.369288116693496... | |
not even the NIC with the default route on my Vista machine). And I can not seems to find a way to bind a socket to an interface which has no IP address. (like DHCP clients do this)
@Arnout: Why not? The clients know the MAC address of the gateway. I just want a send a WOL packet like a DHCP client does initially...(D... | [
0.4786909818649292,
-0.06259237974882126,
0.3529720604419708,
0.1241527572274208,
-0.36836913228034973,
-0.5158661007881165,
0.457834929227829,
0.011530461721122265,
-0.15994757413864136,
-0.7650940418243408,
-0.14355015754699707,
0.6055365204811096,
-0.1803664118051529,
0.2165482640266418... | |
interface.
And there is good wrapper for .net: <http://www.tamirgal.com/home/dev.aspx?Item=SharpPcap>
(I would have prefered a solution which requires no extra libraries to be installed...)
**UPDATE:** Here is what I came up for sending a WOL packet on all interfaces:
```
//You need SharpPcap for this to work
priv... | [
-0.15238581597805023,
0.02811763435602188,
1.085471749305725,
-0.06578636914491653,
-0.06391359865665436,
0.04769371449947357,
0.3559376001358032,
-0.48382803797721863,
-0.08891289681196213,
-0.8681910634040833,
-0.03439844027161598,
1.0988373756408691,
-0.2021307349205017,
0.2528832852840... | |
return;
}
foreach (NetworkDevice device in devices)
{
//Open the device
device.PcapOpen();
//A magic packet is a broadcast frame containing anywhere within its payload: 6 bytes of ones
//(resulting in hexadecimal FF FF FF FF FF FF), followed by sixteen repetitions
... | [
0.3638398349285126,
-0.1628403514623642,
0.587428092956543,
0.053544074296951294,
0.08801379054784775,
0.03515876457095146,
0.3217064440250397,
-0.23391832411289215,
-0.1764821857213974,
-0.40559259057044983,
-0.14635363221168518,
0.41706958413124084,
-0.2883848547935486,
0.136326000094413... | |
int counter = 0;
for (int y = 0; y < 6; y++)
bytes[counter++] = 0xFF;
//now repeat MAC 16 times
for (int y = 0; y < 16; y++)
{
int i = 0;
for (int z = | [
0.05581509694457054,
0.007159440778195858,
0.7297909259796143,
-0.4304196834564209,
0.1406603753566742,
0.30566585063934326,
0.7122654914855957,
-0.2847527861595154,
-0.5417683720588684,
-0.22355856001377106,
-0.27029430866241455,
0.6346951723098755,
-0.09929117560386658,
0.313965022563934... | |
0; z < 6; z++)
{
bytes[counter++] =
byte.Parse(MAC_ADDRESS.Substring(i, 2),
NumberStyles.HexNumber);
i += 2; | [
-0.07948406785726547,
0.0999222844839096,
0.4821445643901825,
-0.4557599425315857,
0.13417768478393555,
0.10622735321521759,
0.33467164635658264,
-0.44975724816322327,
-0.015422952361404896,
-0.2500382959842682,
-0.47568944096565247,
0.45835545659065247,
-0.24171477556228638,
0.32261866331... | |
}
}
byte[] etherheader = new byte[54];//If you say so...
var myPacket = new Tamir.IPLib.Packets.UDPPacket(EthernetFields_Fields.ETH_HEADER_LEN, etherheader);
//Ethernet
myPacket.DestinationHwAddress = "FFFFFFFFFFFFF";//it's buggy if you don't have lots of "F"s... (I don't reall... | [
-0.07863162457942963,
-0.2973322868347168,
0.7134695649147034,
-0.08944228291511536,
0.43218526244163513,
-0.09728937596082687,
0.5412272810935974,
-0.12259826064109802,
-0.4507754445075989,
-0.7475190162658691,
-0.1363086849451065,
0.619829535484314,
-0.4148561954498291,
-0.07353245466947... | |
myPacket.EthernetProtocol = EthernetProtocols_Fields.IP;
//IP
myPacket.DestinationAddress = "255.255.255.255";
try { myPacket.SourceAddress = device.IpAddress; }
catch { myPacket.SourceAddress = "0.0.0.0"; }
myPacket.IPProtocol = IPProtocols_Fields.UDP;
myPacket.TimeToLi... | [
-0.2744119465351105,
-0.24911905825138092,
0.5403447151184082,
0.014635173603892326,
0.41925615072250366,
0.28483837842941284,
0.2994977831840515,
-0.06537790596485138,
-0.5351744890213013,
-0.8585600256919861,
-0.20306873321533203,
0.31406649947166443,
-0.23318025469779968,
0.200367495417... | |
= bytes.Length - EthernetFields_Fields.ETH_HEADER_LEN; //Set the correct IP length
myPacket.IPHeaderLength = IPFields_Fields.IP_HEADER_LEN;
//UDP
myPacket.SourcePort = 9;
myPacket.DestinationPort = 9;
myPacket.UDPLength = UDPFields_Fields.UDP... | [
-0.3009723424911499,
-0.3371812701225281,
0.5669676661491394,
-0.10132137686014175,
0.0577453076839447,
0.06733694672584534,
0.03970487788319588,
0.04364880546927452,
-0.5353808403015137,
-0.24580374360084534,
-0.22272989153862,
0.37953510880470276,
-0.22695527970790863,
0.2669996023178100... | |
myPacket.UDPData = bytes;
myPacket.ComputeIPChecksum();
myPacket.ComputeUDPChecksum();
try
{
//Send the packet out the network device
device.PcapSendPacket(myPacket);
}
catch (Exception e)
{ | [
-0.15586119890213013,
-0.40891751646995544,
0.27584755420684814,
-0.09501270949840546,
0.23995432257652283,
0.20625387132167816,
0.4690993130207062,
0.005299917422235012,
-0.21986296772956848,
-0.6054720282554626,
-0.21307975053787231,
0.28599974513053894,
-0.44290807843208313,
0.214794486... | |
Console.WriteLine(e.Message);
}
device.PcapClose();
}
}
``` | [
-0.296362042427063,
0.11974215507507324,
0.6043650507926941,
-0.041995853185653687,
0.48231014609336853,
-0.04901769384741783,
0.03087186999619007,
0.22514313459396362,
0.08522822707891464,
-1.0037940740585327,
-0.20358218252658844,
0.6164768934249878,
-0.42988869547843933,
0.3801278173923... | |
Anyone know if it possible at run-time to know how many pixels high an asp.net gridview is?
I have a gridview on the left of my page. On the right side, I populate with random images that vary in height and I would like to (as close as possible) match the total height of the gridview with the sum total heights of the ... | [
0.2814999222755432,
-0.12019485980272293,
0.5417919158935547,
0.18955644965171814,
-0.43884336948394775,
0.06250449270009995,
-0.0398172102868557,
0.1218256875872612,
-0.2616044878959656,
-0.9349687695503235,
0.42652636766433716,
0.40868887305259705,
0.18475492298603058,
0.0301821120083332... | |
can vary depending on if they are long lines wrapping, I'd prefer to try and get a better height estimate...
Thx!
use [$.post](http://docs.jquery.com/Ajax/jQuery.post)
e.g
```
$.post(someUrl, { textData: $('#someInput').val() } );
```
$.post is just a simple wrapper around $.ajax.
```
$.ajax({ type :"post",
... | [
0.2202797383069992,
-0.17872969806194305,
0.34285521507263184,
0.056015290319919586,
-0.4479341208934784,
0.21205763518810272,
0.2584177553653717,
0.4227167069911957,
-0.0033878134563565254,
-0.7743241190910339,
-0.21129822731018066,
0.12906436622142792,
0.009882433339953423,
0.03910627961... | |
I think my question is somewhat similar to [CaptainPicard's](https://stackoverflow.com/questions/258590/how-do-i-import-svn-branches-rooted-in-different-directories-into-git-using-git-s "How do I import svn branches rooted in different directories into git using git-svn?") but dissimilar enough that I feel compelled to... | [
0.2377660721540451,
0.05899009853601456,
0.3440096378326416,
0.13603539764881134,
0.039848871529102325,
-0.052693091332912445,
0.03579718992114067,
0.07359147071838379,
-0.5974397659301758,
-0.30593863129615784,
0.06591654568910599,
0.2624334394931793,
-0.06298990547657013,
0.2671961486339... | |
tags. In an effort to pair this down some I did another svn clone of just the directory in trunk I wanted to work with but including all branches obviously pulls down all the history and objects for those.
So my question is this, is there some way to tell git to only fetch certain branches. For example only fetch bran... | [
0.5094190239906311,
-0.2539215683937073,
0.5225520730018616,
0.2633064389228821,
-0.11122824996709824,
-0.42786991596221924,
0.18373462557792664,
0.02427835576236248,
-0.43317288160324097,
-0.49445536732673645,
0.054439958184957504,
0.18351557850837708,
-0.30480697751045227,
0.131081894040... | |
of matching branches/\* only branches matching mybranchset\*
In `git svn` commands, you can only use the asterisk wildcard to specify all members of a directory (`directoryname/*`) and not filename variations (`fileprefix*`). That may change in the future if `git svn` is revised to make use of SVN's new merge tracking.... | [
0.05963137373328209,
-0.2688383460044861,
0.825057327747345,
0.08597031980752945,
0.12745103240013123,
0.21461889147758484,
0.47115999460220337,
-0.015723232179880142,
-0.687052845954895,
-0.6642411947250366,
-0.12333688139915466,
0.36551418900489807,
-0.4126532971858978,
0.041034832596778... | |
file commits, so they will be duplicated when they change.
I suggest you use
```
$ git gc --aggressive
```
to repack your repo. It prunes duplicates and handles more optimizations than `git repack`. | [
0.22908444702625275,
0.036751460283994675,
0.14034511148929596,
0.239352285861969,
0.10778244584798813,
-0.13933496177196503,
0.032592467963695526,
0.09855105727910995,
-0.30913496017456055,
-0.5264872908592224,
-0.06559699028730392,
0.7967885136604309,
-0.3704700171947479,
0.2085544764995... | |
I would like to write this as a user defined function:
```
private double Score(Story s){
DateTime now = DateTime.Now;
TimeSpan elapsed = now.Subtract(s.PostedOn); | [
0.5152800679206848,
-0.48975151777267456,
0.5087510943412781,
0.04003133624792099,
0.46934616565704346,
-0.21446414291858673,
0.5068541765213013,
0.08028080314397812,
-0.35229089856147766,
-0.3568063974380493,
-0.012869718484580517,
0.33430081605911255,
-0.0991288349032402,
0.2770195603370... | |
double daysAgo = elapsed.TotalDays;
return s.Votes.Count + s.Comments.Count - daysAgo;
}
```
Is this possible to do with a UDF?
You can, but if you're using SQL Server 2000, you'll have to pass in the value of "now"--UDFs can't generate any | [
0.3811629116535187,
-0.10193944722414017,
0.4214273691177368,
-0.08935892581939697,
0.07360827177762985,
-0.10333121567964554,
0.019179692491889,
-0.21941415965557098,
-0.4860118329524994,
-0.18978939950466156,
-0.17979252338409424,
0.232216477394104,
-0.3971777558326721,
0.229111075401306... | |
non-deterministic values themselves [in SQL Server 2000](http://wardyit.com/blog/blog/archive/2006/02/15/84.aspx).
This untested stab at it might be close:
```
CREATE FUNCTION dbo.GetStoryScore (
@Now DATETIME, @Posted DATETIME, @Votes INT, @Comments INT
) RETURNS FLOAT AS
BEGIN
RETURN @Votes + @Comments - DAT... | [
0.10524345934391022,
-0.007829923182725906,
0.5765073895454407,
0.12417151778936386,
-0.18637749552726746,
0.032720886170864105,
0.20725755393505096,
-0.4572048485279083,
-0.1905657798051834,
-0.24884033203125,
-0.133714959025383,
0.3439207971096039,
-0.027731679379940033,
0.16605605185031... | |
SQL, don't forget the `dbo.` in front of the function name.
* If you're using SQL Server 2005, you can remove the @Now variable and use GETDATE() inline, instead. | [
0.2537301480770111,
-0.06411333382129669,
0.22443632781505585,
-0.057392243295907974,
-0.33626216650009155,
-0.2570763826370239,
0.32192447781562805,
0.24167458713054657,
-0.016018392518162727,
-0.20269261300563812,
-0.01466259453445673,
0.5106974840164185,
-0.33798274397850037,
0.27326315... | |
Python for Windows by default comes with IDLE, which is the barest-bones IDE I've ever encountered. For editing files, I'll stick to emacs, thank you very much.
However, I want to run programs in some other shell than the crappy windows command prompt, which can't be widened to more than 80 characters.
IDLE lets me ... | [
0.38563933968544006,
-0.029862718656659126,
-0.2300236076116562,
-0.27552688121795654,
-0.29923152923583984,
0.11526233702898026,
0.3037886619567871,
0.5909768342971802,
-0.49332860112190247,
-0.17744694650173187,
0.013121969997882843,
0.9533556699752808,
-0.5262774229049683,
-0.2790521085... | |
and the IDLE docs doesn't seem to give much help about using IDLE's shell but not it's IDE.
Any advice from the stack overflow guys? Ideally I'd either like
* advice on running programs using IDLE's shell
* advice on other ways to run python programs in windows outside of IDLE or "cmd".
Thanks,
/YGA
For an interac... | [
0.34516194462776184,
-0.033862363547086716,
-0.15191154181957245,
0.021397607401013374,
-0.21973687410354614,
-0.22595131397247314,
-0.002246659714728594,
0.28698763251304626,
-0.2246064990758896,
-0.7881813049316406,
0.2745198607444763,
0.9094811081886292,
-0.2284747064113617,
-0.07086535... | |
GUI). I wrote a [tutorial on how to use Winpdb](http://code.google.com/p/winpdb/wiki/DebuggingTutorial) to help get people started on using graphical debuggers. | [
-0.12302525341510773,
-0.04120895266532898,
0.27570897340774536,
-0.008540106937289238,
-0.2620544135570526,
-0.1307319551706314,
0.16810205578804016,
-0.055704277008771896,
0.07185830920934677,
-0.5154860019683838,
0.032869212329387665,
0.8469990491867065,
-0.3171456456184387,
-0.43088188... | |
Say that I have two resources, Project and Task. A Project can have many Tasks; A Task belongs to one Project. Also say that I have Task nested under Project in routes.rb:
```
map.resources :projects do |project|
project.resources :tasks
end
```
Can one programmatically discover this relationship? Basically, I nee... | [
0.02043403871357441,
-0.16743293404579163,
-0.21703475713729858,
0.21791045367717743,
-0.012312761507928371,
-0.03772866353392601,
0.31450751423835754,
0.08719503879547119,
-0.3368426561355591,
-0.8253636360168457,
0.1785890907049179,
0.3391234278678894,
-0.20787514746189117,
0.40677741169... | |
use this relationship to detect if a parent object is available:
```
if object.respond_to?(:parent)
# do something
end
```
Moreover, you can use polymorphic routes if the routes are set up correctly:
```
polymorphic_url([object.parent, object])
``` | [
0.0188310369849205,
-0.12282130122184753,
0.16100595891475677,
-0.014449624344706535,
0.16947980225086212,
-0.33715349435806274,
0.282427042722702,
0.13150571286678314,
0.03795445337891579,
-0.5068902373313904,
-0.22843314707279205,
0.04484718292951584,
-0.35060641169548035,
0.358411788940... | |
Given:
```
/images: list of all images
/images/{imageId}: specific image
/feed/{feedId}: potentially huge list of some images (not all of them)
```
How would you query if a particular feed contains a particular image without downloading the full list? Put another way, how would you check whether a resource state con... | [
0.1754235476255417,
-0.06625840812921524,
0.13535209000110626,
0.17249447107315063,
-0.18140438199043274,
-0.05386997014284134,
-0.04560856893658638,
-0.22149810194969177,
-0.06394617259502411,
-0.7517111897468567,
-0.004199489485472441,
0.6499868631362915,
-0.3996599018573761,
0.164036691... | |
its proprietary id, something that REST frowns upon. Ideally I should be using the opaque image URI. Another option is:
```
Issue HTTP GET against /feed/{feedId}?contains={imageURI} to check for existence
```
but that feels a lot closer to RPC than I'd like. Any ideas?
There's nothing "un-RESTful" about:
```
/feed/... | [
0.3229678273200989,
0.07391846925020218,
0.4182659089565277,
-0.009460646659135818,
-0.2711774706840515,
-0.1577799767255783,
-0.030610261484980583,
-0.021511493250727654,
0.14930053055286407,
-0.6323315501213074,
0.0806879922747612,
0.576838493347168,
-0.3657298684120178,
0.18259221315383... | |
are of the original /feed/{feedid}, it simply a subset.
Finally, there's nothing that says that there even exists a /feed/{feedid}/image/{imageURL}. If you want to work with the sub-resources at that level, then fine, but you're not required to. The list coming back will likely just be a list of direct image URLS, so ... | [
0.845701277256012,
0.007011918816715479,
0.5963521599769592,
0.16477201879024506,
-0.1781921088695526,
-0.2320929765701294,
-0.15990932285785675,
0.1914299875497818,
-0.11466000974178314,
-0.7217305898666382,
-0.1274372786283493,
0.5421960353851318,
-0.5395074486732483,
0.06104483082890510... | |
I am looking for a good eCommerce CMS.
I need to be able to sell services and products, it must be open source that it can be customised wherever needed.
I am very familiar with PHP and Mysql, and somewhat familiar with python and ruby, so a PHP solution would be preferred.
Some of the best PHP carts:
[Magento](ht... | [
0.5647416710853577,
0.10743105411529541,
0.7531260251998901,
0.27310800552368164,
-0.08804187923669815,
0.2232857495546341,
0.013378331437706947,
0.4017261862754822,
-0.2546723186969757,
-0.3539184033870697,
-0.17354781925678253,
0.38834816217422485,
0.09687486290931702,
-0.086108282208442... | |
products and get paid for this.
[InterSpire](http://www.interspire.com/shoppingcart/) - Not Free.
[FoxyCart](http://foxycart.com) - Not Free. Hosted checkout that uses your templates. Works well with a CMS like Modx or Expression Engine.
[LemonStand](http://lemonstandapp.com/) - Not Free. | [
0.6314831376075745,
-0.2831391394138336,
0.5231558084487915,
0.35289475321769714,
0.05780902877449989,
-0.0431903600692749,
0.17720328271389008,
0.47171565890312195,
-0.16338412463665009,
-0.3314022421836853,
-0.2947671115398407,
0.45472535490989685,
0.06642655283212662,
0.0812786221504211... | |
I am working on a project where I need to deal at the byte level with integers. Since saving space is a primary consideration, I only need very small (and variable length ints).
Is there a way that I can turn the int '4096' into 3 bytes? or '1053' into a 2 bytes?
Obviously I cna do it manually = (byte[0] \* 256) + (b... | [
0.27688220143318176,
0.37345439195632935,
0.21479752659797668,
-0.07095344364643097,
0.07431574165821075,
0.23633761703968048,
0.06415212899446487,
-0.12824411690235138,
-0.5897784233093262,
-0.5107011795043945,
0.21611730754375458,
0.23940230906009674,
-0.04336857795715332,
0.006056054960... | |
You have to understand that the processor is 32-bit, meaning it has 4 byte registers, so that's how it's going to want to store and access things. To force a 3-byte "int" you'll have to keep it in a byte array, and extract it from the array to an aligned address before use. That means that if you store it short, the co... | [
0.17153477668762207,
0.10343724489212036,
0.23095177114009857,
0.07172571867704391,
0.08548925071954727,
0.5292384028434753,
0.059114448726177216,
-0.17670919001102448,
-0.4618118703365326,
-0.6603675484657288,
-0.035905104130506516,
0.5415980219841003,
-0.20783871412277222,
-0.13338612020... | |
consideration, especially when talking 1 byte per element? The perf penalty for element access may change you mind about how critical that one byte is.
I'd argue that if that 1 byte truly is important, that maybe, just maybe, you're using the wrong language anyway. The number of bytes you'd save my not installing and ... | [
0.1533811092376709,
0.14629949629306793,
-0.08131138980388641,
0.07002518326044083,
-0.1410256177186966,
0.19757914543151855,
0.34823763370513916,
0.02529975399374962,
-0.38705024123191833,
-0.27914464473724365,
-0.04979594796895981,
0.5386257767677307,
-0.18330733478069305,
-0.34236195683... | |
Quick (and hopefully easy) question: I need to trigger a download of a PDF file that's generated by a PHP file. I can do this:
```
<a href="download.php">Download</a>
```
but should I be doing this another way? Javascript maybe? The above works but the window shows "Loading..." until the download starts. I'd like to... | [
0.4665490984916687,
0.007736926432698965,
0.4408493638038635,
0.20894722640514374,
0.09163852035999298,
-0.21736390888690948,
-0.025909423828125,
0.16960102319717407,
-0.34562182426452637,
-0.7903907299041748,
-0.01589549519121647,
0.6885221600532532,
0.018298009410500526,
-0.1188343241810... | |
problem with a direct URL is that if the PHP script errors it'll replace th econtent of the existing page, which is not what I want.
**EDIT**
Yes javascript, something like:
```
<a href="download.php" onclick="this.innerHTML='Downloading..'; downloadPdf(this);">Download</a>
```
If you need to actually understand wh... | [
0.009918507188558578,
0.028283944353461266,
0.7495906352996826,
-0.02881561405956745,
-0.20118826627731323,
-0.1862562596797943,
0.16987791657447815,
-0.010398096404969692,
-0.01639745384454727,
-0.578663170337677,
-0.1304052621126175,
0.435752272605896,
-0.28500229120254517,
0.19517527520... | |
el.innerHTML = "Download";
}
iframe.style.display = "none";
document.body.appendChild(iframe);
}
``` | [
-0.16458280384540558,
0.17357443273067474,
0.5235750675201416,
-0.12184563279151917,
0.28607723116874695,
-0.11971723288297653,
0.3220411539077759,
-0.002460111863911152,
-0.01917378604412079,
-0.6286747455596924,
-0.48698362708091736,
0.6798852682113647,
-0.3600825369358063,
0.29994156956... | |
So recently on a project I'm working on, we've been struggling to keep a solution's code base and the associated database schema in synch (Database = SQL Server 2008).
Database changes occur fairly regularly (adding columns, constraints, relationships, etc) and as a result it's not uncommon for people to do a 'Get La... | [
0.2415381371974945,
0.10745318233966827,
0.21443191170692444,
0.0350978709757328,
-0.011841957457363605,
-0.37457600235939026,
0.1811581403017044,
-0.09554482251405716,
-0.183771550655365,
-0.7439735531806946,
0.005685626994818449,
0.5095895528793335,
-0.2828655540943146,
0.179438948631286... | |
the database from T-SQL scripts. The solution is a .Net & ASP.net solution with LINQ to SQL underlying as the ORM.
Anyone have ideas on an approach to take (automated or not) which would keep everyone up to date with the latest database schema?
Continuous integration with MSBuild is an option, but only helps pick up... | [
0.17979711294174194,
-0.06648784130811691,
0.47136741876602173,
0.4640241265296936,
0.10680810362100601,
-0.36105743050575256,
0.015455417335033417,
-0.2941455543041229,
-0.23517510294914246,
-0.3476615250110626,
0.00259585352614522,
0.4748733937740326,
-0.05920752137899399,
-0.10382613539... | |
the correct schema is being used, that way at least it becomes obvious, and you avoid silent bugs and people complaining that stuff went crazy all of the sudden.
As for the schema version, you could use some database specific functionality if available, but i personally prefer to declare a schema version table and kee... | [
0.5557443499565125,
0.08713259547948837,
0.32548031210899353,
0.2677331268787384,
0.05749288201332092,
-0.6687923073768616,
0.29743316769599915,
0.04419388249516487,
-0.18351289629936218,
-0.573103666305542,
-0.13082252442836761,
0.5547595024108887,
-0.18064308166503906,
-0.188086301088333... | |
Is there a way to list what units/classes are in a Delphi compiled package?
You could create a new package, add your .dcp to its requires clause, add a new unit to it and use code completion in the uses clause - it will show you all available units in all required packages. If your .dcp is the only required package and... | [
0.28163817524909973,
-0.34085613489151,
0.25826162099838257,
0.22159609198570251,
0.06600680202245712,
-0.4474334120750427,
-0.028323868289589882,
-0.14435029029846191,
-0.06648587435483932,
-0.46277567744255066,
-0.27304965257644653,
0.7051193118095398,
-0.33131030201911926,
-0.1521039605... | |
I have the following requirement
I have a Employee class:
```
public class Employee
{
public int ID{get; set;}
public string EmpFName{get; set;}
public string EmpLName { get; set; }
}
```
I want to do something like this when creating values
```
var Emp = new List<Employee>[]{
new Empl... | [
0.24186716973781586,
0.21946266293525696,
0.41915979981422424,
-0.03240014240145683,
0.23117274045944214,
0.1665744185447693,
0.5325709581375122,
-0.32160472869873047,
-0.0022789982613176107,
-0.5800141096115112,
-0.20220234990119934,
0.4160563051700592,
-0.1362123340368271,
0.136351168155... | |
do this?
You're already nearly there. This code should work:
```
var emp = new List<Employee>
{
new Employee{ID=1, EmpFname="matt", EmpLName="Cook"},
new Employee{ID=2, EmpFname="mary", EmpLname="John"}
};
```
The features involved here are implicit typing, object initializers and collection initializers. Al... | [
0.14861612021923065,
0.038368016481399536,
0.29363876581192017,
0.05035531520843506,
0.5248897671699524,
0.09772452712059021,
0.3475016951560974,
-0.24670886993408203,
-0.1526978462934494,
-0.6392271518707275,
0.08288794755935669,
0.5714054107666016,
-0.10872086137533188,
-0.15723283588886... | |
i have this block of xslt if-else case and was wondering if there's a way for me to do straight comparison with unicode character?
Something along the lines of the code shown below? Or does xslt have some built in function which i can use for this purpose? i.e. change the unicode into html entities and compare via th... | [
0.23487335443496704,
0.3246658146381378,
0.2299618124961853,
0.23233045637607574,
-0.30716729164123535,
-0.07429637014865875,
0.22330981492996216,
-0.13766741752624512,
0.0023855865001678467,
-0.5289826989173889,
-0.12679733335971832,
0.4637582302093506,
-0.1579653024673462,
0.084179937839... | |
<xsl:if test="status='تم المحاولة'">
<font color="#00CC00"><xsl:value-of select="status" /></font><br/>
<!--a href="/Elearning_Platform/xfiles/reports/view_reports.modcgi?asm_lid={@lom_id}&did={@dispatch_id}&rm_student_id={@person_id}&report_type=2">[View Resu... | [
-0.009425549767911434,
0.008872965350747108,
0.5565025806427002,
0.06370139867067337,
0.21024951338768005,
-0.016892584040760994,
0.09202861785888672,
-0.6507301926612854,
-0.15300361812114716,
-0.4395638704299927,
-0.366804301738739,
0.7042859792709351,
-0.11663690954446793,
-0.2178620100... | |
</xsl:if>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise> | [
-0.5514729619026184,
-0.12492609024047852,
0.27017441391944885,
-0.23817986249923706,
0.17747099697589874,
-0.22253063321113586,
0.13922308385372162,
0.13689889013767242,
-0.14873728156089783,
-0.416019082069397,
-0.7775604128837585,
0.36866697669029236,
-0.48660194873809814,
0.01305440999... | |
</xsl:choose>
```
Unity is NOT a way to dynamically load modules. You could look at the Microsoft Extensibility Framework to dynamically load modules, which I hear is great.
Personally I built a similar system and used an article on CodeProject for guideance, but I can't find it now. I did find this (which is similar... | [
0.04143466800451279,
-0.24925188720226288,
0.06684435158967972,
0.0894908756017685,
-0.18120470643043518,
-0.34545838832855225,
0.2197200059890747,
-0.05135968700051308,
-0.520394504070282,
-0.46143975853919983,
-0.06721379607915878,
0.46903085708618164,
-0.49159541726112366,
-0.0447144247... | |
I have to write a C++ Application (using the Qt Framework for the GUI) that can edit data stored in xml files described by a xsd schema file. Is there a tool to convert the xsd schema into C++ Classes?
Sounds to me like [CodeSynthesis](http://www.codesynthesis.com/products/xsd/) is exactly what you are looking for. It'... | [
0.4575175940990448,
0.058505889028310776,
-0.08072786033153534,
0.17390067875385284,
0.03347446769475937,
-0.19492286443710327,
-0.07826588302850723,
0.16852451860904694,
0.24172262847423553,
-0.7483697533607483,
-0.003661059308797121,
0.4395514726638794,
-0.20230068266391754,
0.0650696158... | |
Talking about hibernate and others ORMs, the ORMs evangelists talk about SQL like the assembly language for Databases.
I think is soon to assert this, but I guess can be true on a near future, not sure.
**UPDATE:** The analogy I was referring means *SQL* is to *assembly* what *ORM* is to *C/Java/C#*. Of course, an ex... | [
0.6017765402793884,
0.1732393503189087,
0.2817620635032654,
0.0398130863904953,
-0.21003985404968262,
-0.35039791464805603,
0.25596556067466736,
0.11554588377475739,
-0.15402580797672272,
-0.670943558216095,
0.256761372089386,
0.7058840990066528,
-0.21046514809131622,
-0.13024139404296875,... | |
to do, including what registers you want to use etc.
SQL is a very high level language where you describe the semantics of what you want, and then a query optimiser decides how to execute it, so you don't even control what gets executed. It's an extremely powerful and flexible language of which any ORM offers at most... | [
0.5914978981018066,
0.031237762421369553,
0.2867012917995453,
0.277245432138443,
0.05911465734243393,
-0.2956286668777466,
-0.10634900629520416,
-0.14498576521873474,
-0.24443665146827698,
-0.26659125089645386,
-0.21254532039165497,
0.6925610899925232,
-0.3017963469028473,
-0.3571343123912... | |
at a higher level of abstraction than most mainstream programming languages. | [
-0.09620092064142227,
0.06917092204093933,
-0.031085245311260223,
0.24489454925060272,
-0.010953836143016815,
-0.023887373507022858,
0.050643254071474075,
-0.045964378863573074,
0.11421157419681549,
-0.34150218963623047,
-0.5961499214172363,
0.6584381461143494,
-0.08154837042093277,
-0.162... | |
We are a small team of developers planing to develop a php application. (let's say a CRM system)
Our main goal is to make it a plug-in-enabled application so that clients' developers can write plug-ins add new features to the system without changing the application's core code.
These changes may include:
1) adding ne... | [
0.5345717668533325,
0.2436295449733734,
0.37717682123184204,
0.14141863584518433,
0.1759037971496582,
-0.1940484195947647,
0.04044683650135994,
-0.05267937853932381,
-0.022254856303334236,
-0.46581336855888367,
0.03580227494239807,
0.2736218571662903,
-0.20738345384597778,
-0.0332326628267... | |
information)
Since this is going to a medium to large-scale application we need to plan it carefully.
At the moment our plan is to write the core application structure and implement the requirements as plug-ins, so that each time a client needs a change we only need to upgrade a specific plug-in.
I just need the gur... | [
0.5586884021759033,
-0.01005525141954422,
0.34204038977622986,
0.4103701412677765,
0.135978564620018,
-0.22850073873996735,
0.3439285159111023,
-0.03242306411266327,
-0.2041643261909485,
-0.671865701675415,
0.18805477023124695,
0.4419856667518616,
0.349729061126709,
0.13699966669082642,
... | |
I have an Entity with a OneToOne relation that is fetched lazily:
```
@Entity
public class Person {
@Id
private Integer id;
@Column(length=60)
private String address;
@OneToOne(fetch=FetchType.LAZY)
@JoinColumn(name="idProvince")
private Province province;
}
```
This is the test I do, t... | [
-0.25455617904663086,
-0.2786148488521576,
0.4732969403266907,
0.008738256059587002,
-0.12489168345928192,
-0.07923886179924011,
0.09141655266284943,
-0.4356130063533783,
-0.25152796506881714,
-0.3218860626220703,
0.058522529900074005,
0.2131168097257614,
-0.2543356120586395,
0.13673500716... | |
exception I get (the same exception when I use this plugin with a Struts2 Action and the @JSON annotation):
```
com.googlecode.jsonplugin.JSONException: java.lang.IllegalAccessException:
Class com.googlecode.jsonplugin.JSONWriter can not access a member of class
org.postgresql.jdbc4.AbstractJdbc4Statement with modifi... | [
-0.07713774591684341,
0.27395007014274597,
0.3432028889656067,
-0.18867133557796478,
-0.08785685896873474,
0.231315016746521,
0.6274300217628479,
-0.35881558060646057,
-0.18108761310577393,
-0.5156486630439758,
-0.042837340384721756,
0.48864489793777466,
-0.6825854778289795,
0.067627675831... | |
and that makes it fail.
My question is : **Is it possible to serialize objects that contain lazily loaded attributes ?**
please check the following url
<http://ellislab.com/forums/viewthread/67697/> | [
0.30991944670677185,
0.02796429581940174,
0.10208912938833237,
0.489582896232605,
0.0798102617263794,
-0.3287208080291748,
0.3278369903564453,
0.16233162581920624,
-0.4548746645450592,
-0.4770642817020416,
0.22471249103546143,
0.4032585024833679,
0.014040487818419933,
0.4250170588493347,
... | |
It's easy to set `CssClass` in the code-behind, but this runs the risk of overwriting existing classes.
I need to set certain elements to `ReadOnly = true;` and I'd like to apply a style as a visual cue that the item cannot be altered...easy enough:
```cs
.CssClass += " ReadOnlyStyle";
```
But at times I will *also... | [
0.3354042172431946,
0.2681333124637604,
0.2243879735469818,
-0.02576737478375435,
0.10545084625482559,
-0.07181654870510101,
0.3177845776081085,
-0.18613944947719574,
-0.1562976986169815,
-0.6439433097839355,
-0.1077440083026886,
0.4838050603866577,
-0.09676828980445862,
0.0821767076849937... | |
that it works no matter what scenario:
```
static class WebControlsExtensions
{
public static void AddCssClass(this WebControl control, string cssClass)
{
List<string> classes = control.CssClass.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
cla... | [
0.3872288763523102,
-0.1699265092611313,
0.5337499380111694,
0.008441770449280739,
0.45240694284439087,
0.027293873950839043,
0.3103744387626648,
-0.2159508764743805,
-0.3911014497280121,
-0.5916076302528381,
-0.5077784061431885,
0.42544203996658325,
-0.42773687839508057,
0.147910580039024... | |
public static void RemoveCssClass(this WebControl control, string cssClass)
{
List<string> classes = control.CssClass.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
classes.Remove(cssClass);
control.CssClass = classes.ToDelimitedString(" ");
... | [
-0.029536914080381393,
-0.2623416781425476,
0.42820391058921814,
0.07448828965425491,
0.3180031478404999,
0.17545950412750244,
0.4526060223579407,
-0.1966898888349533,
-0.11162785440683365,
-0.4294883608818054,
-0.4856666028499603,
0.30801790952682495,
-0.4341758191585541,
0.49412855505943... | |
delimiter)
{
StringBuilder sb = new StringBuilder();
foreach (string item in list)
{
if (sb.Length > 0)
sb.Append(delimiter); | [
-0.24626457691192627,
-0.34295105934143066,
0.7164148092269897,
-0.517008900642395,
-0.0476706363260746,
0.3892538249492645,
0.4889186918735504,
-0.7973024249076843,
-0.12792769074440002,
-0.4504237771034241,
-0.5778416395187378,
0.20974858105182648,
-0.532272458076477,
0.3411484658718109,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.