text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
What program/programming language would be ideal for creating an Access like database on a Windows 5 CE hand held scanner?
We have tried Visual CE but it is not really something we can work with. Ultimately we would love to build a system where we scan a bar code, select a user from a drop down list, select basic opt... | [
0.4119749367237091,
0.049409881234169006,
0.13362836837768555,
0.23735497891902924,
0.1878538429737091,
0.12298789620399475,
-0.28498950600624084,
0.07191634178161621,
-0.09674651175737381,
-0.8260841965675354,
0.2205585390329361,
0.3203243911266327,
-0.11547291278839111,
0.334391862154006... | |
You can easily use Visual Studio 2005 and 2008 and do your development in VB.net or C# (Though it requires at least the professional version of these annoyingly). For a database backend, there is a SQl Server Ce that is a smaller version of SQL server designed to run on a ce device. | [
0.4254114031791687,
0.2532159388065338,
0.3222663104534149,
0.17680469155311584,
-0.26635900139808655,
-0.38136473298072815,
-0.13227005302906036,
0.23867450654506683,
-0.06787008792161942,
-0.6480668187141418,
0.05247168615460396,
0.45680567622184753,
-0.13496087491512299,
0.1374910324811... | |
I just want to get a quick htaccess redirection. ie:
domain.com/subfolderGreen --> domain.com/index.php?folder=subfolderGreen
(note that the subfolderGreen actually exists)
I've been trying but couldn't get to the regex needed.
thanks.
a.
ADDED:
Sorry, i want this to work for any subfolder, not just "subfolderGr... | [
0.30143502354621887,
-0.14271679520606995,
0.6840229630470276,
-0.04959142580628395,
0.2306310534477234,
-0.23390242457389832,
0.4169556498527527,
-0.00621787691488862,
-0.2228596806526184,
-0.6336289644241333,
0.19054007530212402,
0.45588967204093933,
-0.38084110617637634,
-0.001464197994... | |
Something any sophomore in CS should be able to answer, but I can't seem to wrap my head around it...
I have a set of bits, and I need to replace some of the bits with a different set. In a simplified example:
10101010 -original bit set
00001111 -mask showing replacement positions
00001100 -new bit values
10101100... | [
0.021037010475993156,
0.21911387145519257,
0.21073006093502045,
0.14399579167366028,
-0.13116689026355743,
-0.06721365451812744,
0.4514731168746948,
-0.3739539086818695,
-0.036733005195856094,
-0.43263718485832214,
-0.3812178671360016,
0.38534173369407654,
0.09162436425685883,
-0.280458450... | |
clear those bits to 0 before the | part.
The "& mask" part make sure that only proper bits in newbits are used. | [
-0.07520052790641785,
-0.048646483570337296,
0.5338802933692932,
-0.0829344317317009,
0.5720147490501404,
-0.19956627488136292,
0.27527865767478943,
-0.26687151193618774,
0.1908695101737976,
-0.28658196330070496,
-0.6467554569244385,
0.5420560240745544,
-0.06969545781612396,
-0.42968463897... | |
I am getting some junk data returned from a ToString() call on a DateTime object in C# and I'm afraid I'm stumped after poking around with it for a while.
The function is supposed to format dates to be compliant with RFC 822 (as required by the RSS spec) and looks like:
```
public static string FormatPubDate(DateTime... | [
0.5413398742675781,
0.09874938428401947,
0.9790071845054626,
-0.2836284041404724,
0.15737676620483398,
-0.35715436935424805,
0.1757291853427887,
0.013541560620069504,
-0.3951093852519989,
-0.43441781401634216,
-0.4351615607738495,
0.3347727656364441,
-0.28291431069374084,
0.438572138547897... | |
it's generating junk:
```
Console.WriteLine(FormatPubDate(new DateTime(2008, 12, 16, 13, 44, 33)));
Console.WriteLine(FormatPubDate(new DateTime(2008, 12, 17, 13, 44, 33)));
Console.WriteLine(FormatPubDate(new DateTime(2009, 3, 18, 4, 17, 20)));
Console.WriteLine(FormatPubDate(new DateTime(2009, 4, 30, 10, 44, 33)... | [
-0.4297049343585968,
0.02626630663871765,
0.9153317809104919,
-0.09441574662923813,
-0.12033174186944962,
0.07001572847366333,
0.4707910120487213,
-0.06736122071743011,
-0.37000128626823425,
-0.4167203903198242,
-0.20809654891490936,
0.5797438025474548,
-0.3200574517250061,
0.3356516659259... | |
_tmp + " UT";
``` | [
0.09478387981653214,
0.19877339899539948,
0.20950758457183838,
-0.3158060312271118,
-0.05705449730157852,
0.08184275031089783,
0.3147348463535309,
0.21762529015541077,
-0.10211274027824402,
-0.24216312170028687,
-0.4062006175518036,
0.6060768365859985,
-0.753689169883728,
0.164881810545921... | |
Maybe I'm dumb but ...
I have:
```
public interface IRequest
{
IList<IRequestDetail> Details { get; set; }
// stuff
}
public interface IRequestDetail
{
// stuff
}
```
I then have:
```
public class MyRequest : IRequest
{
IList<MyRequestDetail> Details {get; set; }
// stuff
}
public class MyR... | [
0.18453224003314972,
0.2288920283317566,
0.5178928971290588,
0.11245793849229813,
-0.12987171113491058,
0.041658394038677216,
0.2669607698917389,
-0.16986575722694397,
0.12158606201410294,
-0.8466418981552124,
0.30268776416778564,
0.3907513916492462,
-0.4048122763633728,
0.3275768756866455... | |
code I use a non-interface member (I have several requests that share common stuff, but then specialize).
I kind of understand why its wrong, but not fully!
I think, based on the question that the problem is that you want to treat Details as a generic list and enforce that it implements IRequestDetail. You also want i... | [
0.18341854214668274,
-0.0713786631822586,
0.1862422376871109,
0.23579686880111694,
-0.39816272258758545,
-0.19637806713581085,
0.23241177201271057,
-0.28350916504859924,
0.17002327740192413,
-0.8235695958137512,
0.12357472628355026,
0.6127845644950867,
-0.6332154870033264,
0.12214040756225... | |
public IList<MyRequestDetail> Details {get; set; }
// stuff
}
```
This should work for you.
**EDIT 2017-03-17**
In reply to @Robert's comment, see the expanded code below:
```
public interface IRequestDetail
{
}
public class MyRequestDetail : IRequestDetail
{
}
public interface IRequest<T> where T : IRequ... | [
0.5915329456329346,
-0.048919353634119034,
0.5940621495246887,
0.05410526320338249,
-0.17944689095020294,
0.22705739736557007,
0.0010332022793591022,
-0.4465729296207428,
0.0746447741985321,
-1.1034597158432007,
0.2087622582912445,
1.0309888124465942,
-0.4836040437221527,
0.258544832468032... | |
{
}
public void Foo()
{
var test = new MyRequest<MyRequestDetail>();
MyFunction(test);
}
}
``` | [
0.3324756324291229,
0.17568984627723694,
0.12214157730340958,
-0.33002278208732605,
0.1306435763835907,
-0.04099347069859505,
0.536997377872467,
-0.1920740157365799,
0.1811949908733368,
-0.4925481379032135,
-0.19945542514324188,
0.6112660765647888,
-0.28460144996643066,
0.30377089977264404... | |
I'm calling a webservice that is returning an unknown quantity of images in the form of an a collection of byte arrays. (I can't change this)
I need to display each image on a single aspx webpage.
I'm currently using the Microsoft.Web.GeneratedImage control;
<http://www.codeplex.com/aspnet/Release/ProjectReleases.asp... | [
0.4120575189590454,
-0.0309898778796196,
0.43753957748413086,
0.05213054642081261,
-0.318747878074646,
-0.02115771733224392,
0.17182090878486633,
-0.2595576345920563,
-0.45765599608421326,
-0.6299049854278564,
-0.10979993641376495,
0.4265311658382416,
-0.3300715386867523,
0.348474472761154... | |
Dim reportHub As New HubWrapper
Dim repCharts() As ReportHub.Chart = reportHub.ReportHubChart(Me.ddlReports.SelectedValue, ViewState("params"))
For Each chart As ReportHub.Chart In repCharts
Dim sessionKey As String = "img" & System.Guid.NewGuid().ToString
Dim imgParam As New Microsoft.Web.ImageP... | [
-0.18422238528728485,
-0.485363245010376,
0.9653255343437195,
-0.14217272400856018,
-0.6266525387763977,
0.06692817062139511,
0.4701883792877197,
-0.572912335395813,
-0.3547607660293579,
-0.45417311787605286,
-0.22307191789150238,
0.8230075836181641,
-0.47080206871032715,
0.045034203678369... | |
phChart.Controls.Add(img)
Next
End Sub
```
---
```
<%@ WebHandler Language="VB" Class="chartImageHandler" %>
Imports System
Imports System.Collections.Specialized
Imports System.Drawing
Imports System.Web
Imports Microsoft.Web
Public Class chartImageHandler
Inherits ImageHandler
Implements IRequiresSess... | [
-0.03730541095137596,
-0.010355415754020214,
0.9460527896881104,
0.08562406152486801,
-0.10256193578243256,
0.030272632837295532,
-0.06848353892564774,
-0.6524753570556641,
-0.24305953085422516,
-0.7714051604270935,
-0.1693255752325058,
0.6675345301628113,
-0.5881634950637817,
-0.028265994... | |
info;
* The images from the webservice are
coming from SQL Reporting Services.
* The images would generally be
changing all the time (no real
caching requirement).
* Images would be user specific.
* The webservice is only called once per page.
* I'm actually disposing of the image from
session state after the generate... | [
0.5076659917831421,
0.04676085337996483,
0.6219697594642639,
0.03707598149776459,
-0.09334436058998108,
-0.2917817234992981,
0.3767087161540985,
0.22352761030197144,
-0.19328203797340393,
-0.7956216335296631,
-0.29088738560676575,
0.49016377329826355,
-0.20829032361507416,
0.19902686774730... | |
I put unsuccessfully Zsh installed by MacPorts as my login shell by setting the following path to Settings
```
/opt/local/bin/zsh
```
I put it to the Advanced options at the User accounts too. I get the following error
[alt text http://dl.getdropbox.com/u/175564/macportsError.png](http://dl.getdropbox.com/u/175564/m... | [
-0.18992914259433746,
0.5699847936630249,
0.5658487677574158,
-0.15128983557224274,
0.22711141407489777,
-0.10591152310371399,
0.6409714818000793,
-0.3538115620613098,
-0.054548632353544235,
-0.7173631191253662,
-0.33732831478118896,
0.6683154106140137,
-0.1922033727169037,
0.2013310939073... | |
to that list, and you should be fine. You should then be able to change the shell (individually for each user) using `chsh`. | [
0.640954852104187,
0.062265824526548386,
0.15400473773479462,
-0.0486321821808815,
0.06305453926324844,
0.007166626863181591,
0.07367037981748581,
-0.07758311182260513,
-0.18595126271247864,
-0.5431504845619202,
-0.13612909615039825,
0.8043780326843262,
-0.16828610002994537,
0.030751224607... | |
I am a senior level developer but I haven't had a lot of formal training and I although I have used many design patterns and seen them used in my years as a developer, no one really went out of their way to say. "Oh this is an observer pattern, or this is a Singleton pattern."
Reading over some of the design patterns,... | [
0.42217952013015747,
-0.23533357679843903,
-0.20176459848880768,
0.07249773293733597,
-0.35592395067214966,
-0.29704123735427856,
0.21793358027935028,
0.3454875946044922,
-0.3182503879070282,
-0.7805498838424683,
0.3075711131095886,
0.29831188917160034,
-0.2416551262140274,
0.0063954349607... | |
implementation of the observer pattern in the common language runtime. The .NET languages implement observer directly in their language specific manner, using the framework's built-in support for this.
In most programming languages, the observer pattern requires customized development or libraries.
It comes for free ... | [
0.7078871726989746,
-0.02489078789949417,
0.27117037773132324,
0.169937402009964,
0.030286865308880806,
-0.32030218839645386,
0.13538290560245514,
0.05443112552165985,
-0.07362494617700577,
-0.6340184807777405,
-0.24752211570739746,
0.4192214906215668,
-0.7034839987754822,
-0.2595738768577... | |
How can I parse a float scanned from a sheet as text, containing commas?
```
txt = "1,903.44"
value = float(txt) # This fails due to ',' in string
```
UPDATE: Sorry I wasn't clear. I'm using jython 2.5, which doesn't have the locale module.
```
txt = "1,903.44"
value = float(txt.replace(',', ''))
```
If you need l... | [
-0.01743110828101635,
0.1751868575811386,
0.46289223432540894,
-0.19179821014404297,
-0.055926721543073654,
-0.17416857182979584,
0.5319451689720154,
-0.15562967956066132,
-0.03761821240186691,
-0.4841117262840271,
-0.14725661277770996,
0.6120362877845764,
-0.4526970088481903,
-0.181617647... | |
Say I have the following:
```
namespace SomeProject
{
public interface ISomething
{
string SomeMethod();
}
}
namespace SomeService
{
[DataContract]
public class CompositeType
{
[DataMember]
public ISomething Something { get; set; }
}
}
```
Now, in my calling code ... | [
0.26299741864204407,
0.15535186231136322,
0.3406396508216858,
-0.2392571121454239,
0.06089065223932266,
0.15905655920505524,
-0.006419097073376179,
0.012357448227703571,
-0.218809574842453,
-0.6131392121315002,
-0.11118147522211075,
0.2852044701576233,
-0.2994564175605774,
0.08233004808425... | |
interface. Is there a way to do this?
This is not how you want to use your WCF service. WCF is about transferring data, not implementation. You are confusing your client and your service layers by doing this.
However, **if you really want to do this**, you can tell the proxy generator in the client to re-use any exist... | [
0.4637271761894226,
-0.09304126352071762,
0.6753940582275391,
0.16287368535995483,
-0.33357593417167664,
-0.14934638142585754,
0.13017699122428894,
-0.29187166690826416,
-0.19052213430404663,
-0.9889699220657349,
0.3539285361766815,
0.611674964427948,
-0.5183082222938538,
0.029627319425344... | |
What the difference between jQuery's functions `val()` and `text()`?
Where would you use one over the other?
`.val()` works on input elements (or any element with a value attribute?) and `.text()` will not work on input elements. `.val()` gets the value of the input element -- regardless of type. `.text()` gets the in... | [
-0.11458906531333923,
-0.2627256512641907,
0.5991465449333191,
0.13210107386112213,
-0.2762969136238098,
0.1423574537038803,
0.014357459731400013,
-0.4841225743293762,
0.1575656533241272,
-0.6046013236045837,
-0.40761446952819824,
1.0596967935562134,
-0.3172697126865387,
-0.468655765056610... | |
attribute.
[`.val()`](http://docs.jquery.com/Attributes/val)
> Get the content of the value attribute
> of the first matched element | [
-0.037760283797979355,
-0.3017532229423523,
0.35737958550453186,
0.19068428874015808,
-0.08836518973112106,
-0.03315109759569168,
-0.059702567756175995,
-0.37044113874435425,
0.18719889223575592,
-0.5521918535232544,
-0.23878934979438782,
0.7134557962417603,
-0.029069047421216965,
-0.17493... | |
Say I have a class like this:
```
public class MyClass
{
public int Id { get; set; }
public DateTime Date { get; set; }
public string String1 { get; set; }
public string String2 { get; set; }
public string String3 { get; set; }
public string String4 { get; set; }
}
```
Is it possible to get ... | [
0.08890864998102188,
-0.06989195942878723,
0.39862972497940063,
-0.13242362439632416,
0.02254432439804077,
-0.07212899625301361,
-0.010101379826664925,
-0.09921050071716309,
0.09002136439085007,
-0.43777433037757874,
-0.05406729131937027,
0.180807426571846,
-0.18227116763591766,
0.45283725... | |
maps to Id, but then all other fields get serialized into XML (or otherwise)? I don't mind if these other fields have to go on a child object like the below, if that helps:
```
public class MyClass
{
public int Id { get; set; }
public AllOtherOptions Options { get; set; }
}
public class AllOtherOptions
{
... | [
-0.012967053800821304,
-0.39139464497566223,
0.34804609417915344,
0.09449271857738495,
0.289677232503891,
-0.2240050584077835,
-0.03986509144306183,
0.09841250628232956,
0.05351903662085533,
-0.8423663973808289,
-0.2709500193595886,
0.10852184891700745,
-0.0902351513504982,
-0.017407687380... | |
public string String4 { get; set; }
}
```
I am thinking about doing something similar for an upcoming project. The project requires collecting a lot of data but only a few elements need to be stored in a relational database. I haven't started experimenting but these are my thoughts so far.
You can map an XML data typ... | [
0.34023529291152954,
0.10546520352363586,
-0.06990205496549606,
0.15514439344406128,
0.07402017712593079,
-0.030225133523344994,
0.14940005540847778,
0.04815615341067314,
-0.23267146944999695,
-0.7347509264945984,
-0.11366484314203262,
0.32686033844947815,
-0.41383689641952515,
0.538698792... | |
a lot of work) or create an interceptor to do it. My thinking is that MyClass would implement an interface such as
```
public interface IXmlObjectContainer
{
void SerializeChildObjects();
void DeSerializeChildObjects();
}
```
and the interceptor would call those methods as needed. That's a proof of concept i... | [
0.2512795627117157,
0.08010648936033249,
0.26873570680618286,
0.04369847849011421,
-0.491033673286438,
-0.1269165575504303,
0.3555918335914612,
-0.24950096011161804,
0.008939455263316631,
-0.8408820033073425,
0.09855229407548904,
0.4900120198726654,
-0.396923691034317,
0.2132866084575653,
... | |
As a follow up question related to my [question regarding efficient way of storing huffman tree's](https://stackoverflow.com/questions/759707/efficient-way-of-storing-huffman-tree) I was wondering what would be the fastest and most efficient way of searching a binary tree (based on the Huffman coding output) and storin... | [
0.1254735291004181,
-0.25431883335113525,
0.3953646421432495,
0.10262740403413773,
-0.024938002228736877,
0.2741257846355438,
0.03916134312748909,
-0.13644567131996155,
-0.5112468004226685,
-0.5831401348114014,
0.1415821611881256,
0.3070608675479889,
-0.4387153387069702,
0.0495188161730766... | |
a note of it.
- break out of the search
+ enqueue left, and right node
Since this is a Huffman tree, all of the entries that I am looking for will exist. The above is a breadth first search, which is considered the best for Huffman trees since items that are in the source more often are higher up in the tree to get... | [
-0.047085314989089966,
0.11868379265069962,
0.316375732421875,
0.13778124749660492,
-0.0428214967250824,
-0.22811326384544373,
0.22053581476211548,
-0.03375237435102463,
-0.029869161546230316,
-0.7377280592918396,
-0.028899138793349266,
0.1830177903175354,
-0.2255236953496933,
0.3207873702... | |
all of the right/left paths in reverse order, for example, if we follow the head to the root, and we find out that from the root it is right, left, left, we get left, left, right. or 001 in binary, when what I am looking for is to get 100 in an efficient way.
Storing the path from root to the node as a separate value ... | [
-0.05036604031920433,
-0.1278640478849411,
0.16065089404582977,
-0.017201311886310577,
-0.20361296832561493,
0.37121421098709106,
0.3064665198326111,
-0.204093337059021,
-0.174886554479599,
-0.37265530228614807,
0.13904333114624023,
0.08543701469898224,
-0.24101947247982025,
0.095044583082... | |
that point storing the data would also take up huge amounts of memory.
Create a dictionary of value -> bit-string, that would give you the fastest lookup.
If the values are a known size, you can probably get by with just an array of bit-strings and look up the values by their index. | [
0.10205196589231491,
-0.004666463006287813,
0.01793649047613144,
0.47525158524513245,
0.05776989459991455,
-0.09725978225469589,
-0.04693249240517616,
-0.1391138881444931,
-0.046928729861974716,
-0.5986965298652649,
0.16191408038139343,
0.5465205311775208,
0.05353224650025368,
0.1418775022... | |
In implementing a basic Scheme interpreter in C# I discovered, to my horror, the following problem:
IEnumerator doesn't have a clone method! (or more precisely, IEnumerable can't provide me with a "cloneable" enumerator).
What I'd like:
```
interface IEnumerator<T>
{
bool MoveNext();
T Current { get; }
v... | [
0.08749970048666,
-0.07419389486312866,
0.1876983344554901,
-0.376341313123703,
0.10863398760557175,
-0.11425337940454483,
0.22851046919822693,
-0.4335883855819702,
0.028038958087563515,
-0.7780851125717163,
-0.025727128610014915,
0.6802619695663452,
-0.5488321185112,
-0.047940343618392944... | |
above... it would be easier than providing a Reset() method anyway!).
The absence of the Clone method means that any functional/recursive idiom of enumerating over a sequence won't work.
It also means I can't "seamlessly" make IEnumerable's behave like Lisp "lists" (for which you use car/cdr to enumerate recursively)... | [
0.33205661177635193,
0.3222005367279053,
0.2059076428413391,
-0.10715075582265854,
-0.09467924386262894,
-0.23085898160934448,
0.4473828375339508,
-0.3642100393772125,
-0.12978895008563995,
-0.5665602087974548,
-0.2051810920238495,
0.7809035778045654,
-0.29773110151290894,
0.03575547039508... | |
`Clone`, and you need `Clone`, so you shouldn't be using `IEnumerable`.
Or more accurately, you shouldn't be using it as the fundamental basis for work on a Scheme interpreter. Why not make a trivial immutable linked list instead?
```
public class Link<TValue>
{
private readonly TValue value;
private readonly... | [
0.6559335589408875,
-0.2954643964767456,
0.6407060623168945,
-0.18526925146579742,
0.19779588282108307,
-0.38300979137420654,
0.23400211334228516,
-0.11784566193819046,
-0.057326436042785645,
-0.9611316919326782,
-0.4535951018333435,
0.6169374585151672,
-0.569164514541626,
0.12859860062599... | |
{
get { return value; }
}
public Link<TValue> Next
{
get { return next; }
}
public IEnumerable<TValue> ToEnumerable()
{
for (Link<TValue> v = this; v != null; v = v.next)
yield return v.value;
}
}
```
Note that the `ToEnumerable` method gives you con... | [
0.39901936054229736,
-0.7128954529762268,
0.8958445191383362,
-0.07417913526296616,
0.009097499772906303,
-0.4233783483505249,
0.3729386627674103,
-0.3768519461154938,
-0.22118419408798218,
-0.7455275058746338,
-0.3246811628341675,
0.8855372071266174,
-0.08865568786859512,
0.03266517817974... | |
the standard C# way.
To answer your question:
> Can anyone suggest a realistic,
> useful, example of an IEnumerable
> object that wouldn't be able to
> provide an efficient "Clone()" method?
> Is it that there'd be a problem with
> the "yield" construct?
An IEnumerable can go anywhere in the world for its data.... | [
0.21483445167541504,
-0.21371348202228546,
0.3833082318305969,
0.15109437704086304,
0.2788064777851105,
-0.32415321469306946,
0.2047918736934662,
-0.14556533098220825,
0.020920658484101295,
-0.681998610496521,
-0.3079921007156372,
0.4442751109600067,
-0.2832813858985901,
0.143788143992424,... | |
meaningless). Secondly, the sequence is infinite - which is perfectly allowable. Sequences are lazy.
Another example:
```
IEnumerable<int> GetIntegers()
{
for (int n = 0; ; n++)
yield return n;
}
```
For both these examples, the "workaround" you've accepted would not be much use, because it would just e... | [
0.2168102115392685,
0.12502031028270721,
0.06606323271989822,
-0.09175687283277512,
0.04219432920217514,
-0.12249048054218292,
0.2359081655740738,
-0.25364893674850464,
-0.2949138581752777,
-0.2413332462310791,
-0.1874193698167801,
0.6251519918441772,
-0.3400273323059082,
0.188107937574386... | |
from a socket:
```
IEnumerable<byte> GetSocketBytes(Socket s)
{
byte[] buffer = new bytes[100];
for (;;)
{
int r = s.Receive(buffer);
if (r == 0)
yield break;
for (int n = 0; n < r; n++)
yield return buffer[n];
}
}
```
If there is | [
0.016173889860510826,
-0.15494805574417114,
0.34667935967445374,
-0.38903912901878357,
0.11714427918195724,
0.32979798316955566,
0.2801605463027954,
-0.2918769121170044,
-0.2040141075849533,
-0.4213160276412964,
-0.7360292077064514,
0.29089847207069397,
-0.08099070936441422,
0.271495997905... | |
some number of bytes being sent down the socket, this will not be an infinite sequence. And yet writing Clone for it would be very difficult. How would the compiler generate the IEnumerable implementation to do it automatically?
As soon as there was a Clone created, both instances would now have to work from a buffer ... | [
0.4160897731781006,
0.08683206886053085,
0.09257442504167557,
0.12387758493423462,
0.08837932348251343,
0.16516098380088806,
0.15202660858631134,
-0.08712448179721832,
-0.08810743689537048,
-0.6917432546615601,
0.07159526646137238,
0.3622872531414032,
-0.3322586715221405,
0.133084133267402... | |
sequence. It's a little cleaner than low-level `car`/`cdr` manipulation.
**Further question:**
> I wonder, what's the lowest level
> "primitive(s)" I would need such that
> anything I might want to do with an
> IEnumerable in my Scheme interpreter
> could be implemented in scheme rather
> than as a builtin.
The... | [
0.25198400020599365,
0.23035508394241333,
0.0003140853950753808,
-0.1570076197385788,
-0.025579925626516342,
0.08058886229991913,
0.015961889177560806,
-0.2426016926765442,
-0.007704298943281174,
-0.7616536617279053,
-0.09749852120876312,
0.307889461517334,
-0.37915360927581787,
0.02386519... | |
unifying lists and streams in section 4.2. | [
0.3600933849811554,
0.023823613300919533,
0.24708807468414307,
0.060593463480472565,
0.20855142176151276,
-0.325853556394577,
-0.08120608329772949,
-0.5233929753303528,
-0.20442689955234528,
-0.5068258047103882,
-0.2988280951976776,
0.14176639914512634,
-0.5815802216529846,
-0.052642595022... | |
I have two ListBoxes, lstAvailableColors and lstSelectedColors. Between each listbox are two buttons, Add and Remove. When a color or colors is selected in lstAvailableColors and the Add button is clicked, I want to remove them from lstAvailableColors and display them in lstSelectedColors. Also, if colors are selected ... | [
0.22379733622074127,
-0.17674419283866882,
0.4703550338745117,
-0.25302860140800476,
-0.10090889036655426,
0.44328975677490234,
-0.10174756497144699,
-0.19947806000709534,
-0.12271951884031296,
-0.60627681016922,
0.027378888800740242,
0.4618436396121979,
-0.5316796898841858,
0.111474663019... | |
Remove Button:
Add:
```
protected void btnAdd_Click(object sender, EventArgs e)
{
foreach (ListItem item in lstAvailableColors.Items)
{
if (item.Selected)
{
lstSelectedColors.Items.Add(item);
lstAvailableColors.Items.Remove(item);
}
}
}
```
Remove:
```
pr... | [
-0.3358217477798462,
-0.32948148250579834,
0.2947670519351959,
-0.2022268921136856,
0.36105257272720337,
0.3588958978652954,
0.22397473454475403,
-0.23396022617816925,
-0.3128013014793396,
-0.42360109090805054,
-0.6376673579216003,
0.45406660437583923,
-0.5511041879653931,
0.29047092795372... | |
{
lstAvailableColors.Items.Add(item);
lstSelectedColors.Items.Remove(item);
}
}
}
```
It's not possible to modify a collection while you're enumerating it in .Net. You need to separate out your enumeration and remove code into different blocks. Here is a quick sample on how to do th... | [
0.21204331517219543,
-0.4079999029636383,
0.3971773087978363,
-0.16413633525371552,
0.2639177441596985,
0.00655327457934618,
0.3026610016822815,
-0.45967647433280945,
-0.43062666058540344,
-0.5910496115684509,
-0.21561069786548615,
0.2734360992908478,
-0.5473244786262512,
0.385843366384506... | |
lstAvailableColors.Items)
{
if (item.Selected)
{
selected.Add(item);
lstSelectedColors.Items.Add(item);
}
}
foreach (ListItem item in selected)
{
lstAvailableColors.Items.Remove(item);
}
}
```
And here's a more concise version using LINQ
```... | [
-0.048295844346284866,
-0.4769544303417206,
0.5444507002830505,
-0.41793084144592285,
0.24286407232284546,
0.5621875524520874,
0.02183207869529724,
-0.4120689034461975,
-0.28239724040031433,
-0.5028149485588074,
-0.4077070355415344,
0.20673416554927826,
-0.5296528935432434,
0.2237691283226... | |
=> { lstAvailableColors.Items.Remove(x);});
```
**EDIT**
The LINQ version works in two parts. The first part is the first line which finds the currently selected items and stores the value in a `List<ListItem>`. It's very important that the line contain the .ToList() call because that forces the query to execute imm... | [
0.19592297077178955,
-0.4010114073753357,
0.6070016622543335,
-0.16260726749897003,
0.19773977994918823,
0.02599674090743065,
-0.0421772263944149,
-0.29526272416114807,
0.00509313540533185,
-0.5525304675102234,
-0.3217918574810028,
0.28262338042259216,
-0.5440893173217773,
-0.0261967070400... | |
Looking to move data from a table A to history table B every X days for data that is Y days old and then remove the data from history table B that is older than Z days.
Just exploring different ways to accomplish this. So any suggestions would be appreciated.
Example for variables
X - 7days
Y - 60days
z - 365days
Th... | [
0.464301198720932,
-0.144474059343338,
0.8152542114257812,
-0.08636091649532318,
0.29022350907325745,
-0.1604330837726593,
-0.22289502620697021,
-0.2004222422838211,
-0.3985588550567627,
-0.5031561851501465,
-0.21599683165550232,
0.390273779630661,
-0.026807595044374466,
0.3238667249679565... | |
INSERT
INTO b
SELECT *
FROM a
WHERE timestamp < _now - INTERVAL Y DAY;
FOR UPDATE;
DELETE
FROM a
WHERE timestamp < _now - INTERVAL Y DAY; | [
-0.07931740581989288,
-0.2597554922103882,
-0.049076251685619354,
-0.5239392518997192,
0.47382649779319763,
0.10550901293754578,
0.2223477065563202,
0.11965028941631317,
0.21501503884792328,
-0.4266984164714813,
-0.7221382260322571,
0.3579781651496887,
-0.3707692325115204,
0.16167816519737... | |
DELETE
FROM b
WHERE timestamp < _now - INTERVAL Z DAY;
COMMIT;
END
``` | [
-0.06699176132678986,
-0.09842824190855026,
0.22832562029361725,
-0.3300572633743286,
0.29917261004447937,
0.01031307689845562,
0.476367712020874,
0.08930590003728867,
-0.10159340500831604,
-0.2668030261993408,
-0.6982460021972656,
0.26274383068084717,
-0.14806151390075684,
0.5553840398788... | |
How do I get the absolute x,y coordinates for an HTML element on a page that may exist within a iFrame. The page is sometimes called on its own and sometimes is called from within an iFrame.
This is the function that I wrote to figure out the x,y position based on the offsetLeft and offsetTop of the element and the of... | [
0.10928467661142349,
0.1216617077589035,
1.0409893989562988,
-0.10241954028606415,
0.009011391550302505,
0.27316176891326904,
0.14637057483196259,
-0.3355514705181122,
0.11290303617715836,
-0.49010801315307617,
-0.06799288094043732,
0.251819908618927,
-0.2897515594959259,
-0.07970684766769... | |
curLeft += curObj.offsetLeft
curTop += curObj.offsetTop;
}
obj.x = curLeft;
obj.y = curTop;
}
```
This works great if the page is the top, but the problem is that if the page is run from within an iFrame I do not know the offset of the iFrame on the page.
Is there a way to get the exact, absolutes coordinates re... | [
-0.2364559918642044,
0.07509372383356094,
1.0059752464294434,
-0.07347967475652695,
-0.34759920835494995,
0.12038291990756989,
0.01198053453117609,
-0.07064371556043625,
-0.31938013434410095,
-0.5918785929679871,
-0.10461718589067459,
0.392511248588562,
-0.23695772886276245,
-0.25937095284... | |
your offset recursively through parents.
```
if (window.parent && window.parent.frames && window.parent.document && window.parent.document.getElementsByTagName) {
var iframes = window.parent.document.getElementsByTagName("IFRAME");
for (var i = 0; i < iframes.length; i++) {
var id = iframes[i].id || if... | [
0.49984151124954224,
-0.08854476362466812,
0.6935694813728333,
-0.14376236498355865,
0.13671283423900604,
0.3857332468032837,
-0.13931752741336823,
-0.5819932818412781,
-0.35820823907852173,
-0.8004225492477417,
0.04044511169195175,
0.3636511564254761,
-0.21101993322372437,
-0.178191736340... | |
plugin for jQueryUI. | [
-0.2592979669570923,
-0.5919954180717468,
0.02091134712100029,
0.18973538279533386,
-0.10776261985301971,
-0.1295478343963623,
0.13030996918678284,
0.4038916528224945,
0.18397986888885498,
-0.7511183023452759,
-0.3400314450263977,
0.5070053935050964,
-0.33260780572891235,
-0.16951902210712... | |
I have an array of arrays that looks like this:
```
fruits_and_calories = [
["apple", 100],
["banana", 200],
["kumquat", 225],
["orange", 90]
]
```
I also have a method I want to invoke on each element of the array:
```
fruits_and_calories.each do |f| eat(f[0], f[1])
```
I'd really like to be able to say ... | [
0.19330058991909027,
0.3804016411304474,
-0.009298497810959816,
-0.12776386737823486,
-0.0525125190615654,
0.49104219675064087,
0.140550896525383,
-0.1153537929058075,
-0.3195197582244873,
-0.6346040964126587,
-0.07192742824554443,
0.4279880225658417,
-0.23663486540317535,
-0.0941564813256... | |
use an Array at all, but to use a Hash:
```
fruits_and_calories = { :apple => 100,
:banana => 200,
:kumquat => 225,
:orange => 90}
fruits_and_calories.each do |name, calories|
eat(name, calories)
end
``` | [
0.04964763671159744,
0.2803441882133484,
-0.07624374330043793,
-0.20586936175823212,
0.02593361958861351,
0.3410393297672272,
0.16509117186069489,
-0.06922038644552231,
-0.29730933904647827,
-0.6526116132736206,
-0.2908182740211487,
0.334090918302536,
-0.3676563501358032,
-0.05831791087985... | |
I asked a question in which one of the response contained the following LINQ code:
```
var selected = lstAvailableColors.Cast<ListItem>().Where(i => i.Selected).ToList();
selected.ForEach( x => { lstSelectedColors.Items.Add(x); });
selected.ForEach( x => { lstAvailableColors.Items.Remove(x);});
```
Can someone expla... | [
0.1704152673482895,
-0.19313229620456696,
0.5451554656028748,
-0.2069639265537262,
-0.011005006730556488,
0.28064393997192383,
0.014744145795702934,
-0.3512538969516754,
0.1715836375951767,
-0.5079073309898376,
-0.19221945106983185,
0.5050361156463623,
-0.4816506803035736,
0.05665526539087... | |
// items that don't pass the test (Selected == true) are dropped
.Where(i => i.Selected)
// turn the stream into a List<ListItem> object
.ToList();
```
EDIT: As JaredPar pointed out, the last line above (`ToList()`) is very important. If you didn't do this, then each of the two `selected.ForEach` calls w... | [
0.11862759292125702,
-0.3162430226802826,
0.38501593470573425,
-0.35126712918281555,
0.0029447898268699646,
0.11392568796873093,
0.27645546197891235,
-0.5118741393089294,
-0.3577560484409332,
-0.20254603028297424,
-0.41175681352615356,
0.408298522233963,
-0.565680742263794,
0.1010732725262... | |
if (!listItem.Selected)
continue;
selected.Add(listItem);
}
```
The last two lines are just another way to write a foreach loop and could be rewritten as:
```
foreach (var x in selected)
{
lstSelectedColors.Items.Add(x);
}
foreach (var x in selected)
{
lstAvailableColors.Items.Remove(X);
}
``... | [
0.04177354276180267,
-0.28023627400398254,
0.5014997124671936,
-0.21035024523735046,
0.2487078309059143,
-0.01069885678589344,
0.17918258905410767,
-0.2118547409772873,
-0.08425905555486679,
-0.49672508239746094,
-0.34802868962287903,
0.4142055809497833,
-0.33297210931777954,
-0.1486701667... | |
I have this code up on my server [here](http://smplsite.com/sandbox2/process.asmx) (Yes I known ASMX is a bad idea but WCF doesn't work at all for some reason):
```
<%@ WebService Language="C#" Class="Test" %>
using System.Web;
using System.Web.Services;
[WebService(Namespace = "http://smplsite.com/smplAccess")]
[We... | [
0.5927812457084656,
0.17258208990097046,
0.33945900201797485,
-0.006688153371214867,
0.023960715159773827,
-0.0525570809841156,
0.6860063672065735,
-0.5852392911911011,
-0.09292526543140411,
-0.8635674715042114,
-0.08345483243465424,
0.3590700924396515,
-0.14930330216884613,
0.424375295639... | |
public int Get() { return i; }
}
class State
{
public int i = 5;
}
```
when I run the folloing code:
```
class Program
{
static void Main(string[] args)
{
var ser = new ServiceReference1.TestSoapClient();
Console.WriteLine(ser.Get());
ser.Set(3);
Console.WriteLine(ser.Ge... | [
0.15888962149620056,
0.12932586669921875,
0.7573404908180237,
-0.3018002510070801,
0.1501135230064392,
0.14116117358207703,
0.7756949663162231,
-0.266083300113678,
-0.005056692752987146,
-0.7397489547729492,
-0.3752361238002777,
0.3210192322731018,
-0.28158095479011536,
0.46361178159713745... | |
[Martin's](https://stackoverflow.com/questions/808168/is-this-supposed-to-work-this-way/808219#808219) solution
---
[This Seems related](http://msdn.microsoft.com/en-us/library/system.web.services.webmethodattribute.enablesession.aspx)
Edit: Added State object.
Web services are stateless, so they do not store their ... | [
0.16486385464668274,
-0.08241965621709824,
0.5766368508338928,
-0.018492484465241432,
0.18328526616096497,
0.08201637864112854,
0.6805953979492188,
-0.5261013507843018,
-0.26056843996047974,
-0.510834276676178,
-0.23375892639160156,
0.32506653666496277,
-0.2966049909591675,
0.3734662532806... | |
have to take care on the client side:
Since an ASP.NET session is identified by a cookie, you have to make sure that you are passing the same cookie to the server with every web method call. To do so, you have to instantiate a CookieContainer and assign it to the web service proxy instance:
```
static void Main(strin... | [
-0.012575884349644184,
-0.11950833350419998,
0.46423959732055664,
-0.11611264944076538,
-0.06319061666727066,
-0.05238904803991318,
0.47835275530815125,
-0.17265895009040833,
-0.386419415473938,
-0.8172823190689087,
-0.29064494371414185,
0.3321669101715088,
-0.302010715007782,
0.4672569036... | |
I'm writing a desktop app which needs a simple persistence layer - I found out about SubSonic and it's capability to work with SQLite. However I need to keep the database file in user's AppData folder and don't know how to put such value into app.config - I don't want to use absolute paths.
Can app.config somehow acce... | [
0.08658132702112198,
0.17343972623348236,
0.7396498322486877,
0.2818076014518738,
0.17057350277900696,
0.000981162185780704,
0.3521970510482788,
-0.049907080829143524,
-0.28141239285469055,
-0.8649090528488159,
0.09532014280557632,
0.719914436340332,
-0.4052765965461731,
-0.058709420263767... | |
run. | [
0.6730810403823853,
0.20180661976337433,
-0.41793084144592285,
0.13634854555130005,
-0.2934930622577667,
-0.2267301231622696,
0.6169453859329224,
0.032938387244939804,
-0.17860199511051178,
-0.45297911763191223,
-0.10691258311271667,
0.4426466226577759,
-0.5233787894248962,
0.0011246460489... | |
Does anybody have a clue how I might embed an ASP.NET 3.5 app inside a Visual Basic 6 application?
My other option is to provide a hyperlink inside the VB6 application that will open the ASP.NET app.....BUT I would prefer to embed the ASP.NET app within a tab control in VB6 if at all possible.
thanks in advance
For t... | [
0.4422456920146942,
0.15787120163440704,
0.231657013297081,
0.3490658700466156,
-0.07164990901947021,
-0.10627283900976181,
0.418321818113327,
0.2570568323135376,
-0.32590293884277344,
-0.5465860962867737,
-0.05888179689645767,
0.6417449116706848,
-0.16326113045215607,
0.07545971870422363,... | |
side, modify your MembershipProvider to honor a guid and username as evidence of successful authentication to the vb6 app.
There may be some additional security precautions you should take depending on how guarded your environment needs to be. | [
0.3776223659515381,
-0.005366350989788771,
0.2503228187561035,
0.3285091817378998,
-0.003165964502841234,
-0.24220140278339386,
0.2122323215007782,
-0.10479162633419037,
-0.1423577219247818,
-0.25848624110221863,
0.38832759857177734,
0.1991872638463974,
0.15787668526172638,
-0.268185228109... | |
**Duplicate:** [Choosing a STL container with uniqueness and which keeps insertion ordering](https://stackoverflow.com/questions/769097/choosing-a-stl-container)
I'm looking for a data structure that acts like a set in that it doesn't allow duplicates to be inserted, but also knows the order in which the items were in... | [
0.3249925673007965,
0.16360166668891907,
-0.05290813371539116,
0.30426791310310364,
-0.04883252829313278,
0.018431149423122406,
0.0024999191518872976,
0.0016537407645955682,
-0.7192569375038147,
-0.5458133816719055,
0.13479185104370117,
0.13718323409557343,
-0.46598032116889954,
0.34701564... | |
We have a website that deals with artists and venues and we're developing it in ASP.net MVC.
We have our artist views in a folder (Views/Artists/..), an ArtistsController, ArtistsRepository and adhere to the REST action names such as Show, New, Delete etc.
When we first mocked up the site, everything worked well in o... | [
0.6978628635406494,
-0.21716342866420746,
0.2901111841201782,
0.17903123795986176,
-0.29079386591911316,
0.04277457669377327,
-0.06177829951047897,
0.03309034928679466,
-0.35906264185905457,
-0.382024884223938,
0.2123052030801773,
0.4491752088069916,
-0.013959630392491817,
-0.1308246105909... | |
the routing to handle this. Our default Show route is:
```
routes.MapRoute(
"ArtistDefault",
"artists/{artistName}",
new { controller = "Artists", action = "Show", artistName = ""}
```
One way around this is for our website to visibly run on /artists, but have our control... | [
-0.06263735890388489,
-0.37409108877182007,
0.6509981155395508,
0.16858139634132385,
-0.07707399874925613,
-0.13510319590568542,
0.09302433580160141,
0.15541589260101318,
-0.33899274468421936,
-1.132812738418579,
-0.004770441446453333,
0.15870974957942963,
-0.2946799099445343,
-0.155051127... | |
went with when we started (but hey!).
Do you have any other recommendations? If possible we could also route depending on the verbs (so PostComment would be a POST so we could perhaps route to that action), but I'm not sure if that is advisable let alone possible.
Thanks
The 4th parameter to MapRoute allows you to s... | [
0.37379908561706543,
-0.36592864990234375,
0.4714594781398773,
0.16640570759773254,
-0.3075025975704193,
0.10028062760829926,
0.23398365080356598,
-0.17018742859363556,
-0.47981229424476624,
-0.5397912859916687,
0.10919862240552902,
0.4721437096595764,
-0.19497956335544586,
-0.224803104996... | |
Using ReportBuilder 7.X
Question
Is it possible to Control Print to File.
I need to change the Length of a field at print time
Example:
label2
In the setup - I set its length to 800 which is the max possible this field should ever be.
However, in many cases the record is less than that and i need to set it to the... | [
0.4438415467739105,
-0.15506930649280548,
0.2912600338459015,
0.11448138952255249,
-0.03056258149445057,
-0.41575050354003906,
0.21983619034290314,
-0.34836694598197937,
-0.19457660615444183,
-0.4416407644748688,
0.2378835678100586,
0.7821540236473083,
-0.31267616152763367,
-0.137051567435... | |
around to recompiling are application in Delphi 2009 and the new ReportBuilder....so, that is not an option at this point.
Thanks
Shane
If you want BASE64, you can find some very short implementation like [b64.c](http://base64.sourceforge.net/).
If you need more cryptocipher/certificate related stuff, try get openssl... | [
-0.05644363909959793,
0.07322749495506287,
0.2989436984062195,
0.24790450930595398,
-0.43008509278297424,
-0.6893349885940552,
0.3927210867404938,
0.2011784464120865,
-0.4375404119491577,
-0.1694381833076477,
-0.10771605372428894,
0.589935302734375,
-0.32055073976516724,
-0.176661416888237... | |
I have a strange problem with lxml when using the deployed version of my Django application. I use lxml to parse another HTML page which I fetch from my server. This works perfectly well on my development server on my own computer, but for some reason it gives me `UnicodeDecodeError` on the server.
```
('utf8', "\x85w... | [
0.03951042890548706,
0.3366398215293884,
0.31250348687171936,
-0.23429033160209656,
-0.2759964168071747,
-0.2683297097682953,
0.1719876080751419,
0.04703277349472046,
-0.24049298465251923,
-0.5703356862068176,
-0.028349393978714943,
0.4606163501739502,
-0.37012559175491333,
0.0112191699445... | |
called `hello` or something.
"\x85why hello there!" is not a utf-8 encoded string. You should try decoding the webpage before passing it to lxml. Check what encoding it uses by looking at the http headers when you fetch the page maybe you find the problem there. | [
-0.11423821747303009,
0.00686578918248415,
0.331589013338089,
-0.1372554749250412,
-0.2834288775920868,
-0.3295481204986572,
0.43033477663993835,
0.6008375883102417,
-0.13417461514472961,
-0.6320396661758423,
-0.21825554966926575,
0.14231233298778534,
-0.337774395942688,
0.3715534806251526... | |
I have a method I am using to execute a command on the local host. I'd like to add a timeout parameter to the method so that if the command being called doesn't finish in a reasonable amount of time the method will return with an error code. Here's what it looks like so far, without the ability to timeout:
```
public ... | [
0.39382413029670715,
0.05242373049259186,
0.1807347685098648,
-0.23715411126613617,
0.16005274653434753,
-0.23308376967906952,
0.31556957960128784,
-0.05872521921992302,
-0.06397019326686859,
-0.46513113379478455,
0.03823060914874077,
0.6692820191383362,
-0.3896755576133728,
0.485185056924... | |
final boolean printOutput,
final boolean printError)
throws IOException, InterruptedException
{
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec(commandLine);
if (printOutput)
{
BufferedReader outputReader = new BufferedReader(new I... | [
-0.12248750030994415,
-0.35259896516799927,
0.7739983201026917,
-0.352596253156662,
0.2968941330909729,
0.5353648662567139,
0.1289457231760025,
-0.24202534556388855,
-0.18537621200084686,
-0.7562970519065857,
-0.2653340697288513,
0.5367013216018677,
-0.29931995272636414,
0.2882239818572998... | |
}
if (printError)
{
BufferedReader errorReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
System.out.println("Error: " + errorReader.readLine());
}
return process.waitFor();
}
```
Can anyone suggest a good way for me to implement a timeout parameter?
```
... | [
0.17558158934116364,
-0.1055174395442009,
0.6630823612213135,
-0.29012811183929443,
0.35477811098098755,
0.31332510709762573,
0.12047912925481796,
-0.3142014741897583,
-0.05840079113841057,
-0.6538670659065247,
0.01853867620229721,
0.6163451671600342,
-0.2832930386066437,
0.307328343391418... | |
final boolean printError,
final long timeout)
throws IOException, InterruptedException, TimeoutException {
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec(commandLine);
/* | [
0.05986043065786362,
-0.24981732666492462,
0.554635763168335,
-0.26486220955848694,
0.3561170697212219,
0.35221490263938904,
0.2045675367116928,
-0.12520138919353485,
-0.10276833176612854,
-0.5710957646369934,
-0.19981855154037476,
0.5080337524414062,
-0.19747985899448395,
0.28508552908897... | |
Set up process I/O. */
...
Worker worker = new Worker(process);
worker.start();
try {
worker.join(timeout);
if (worker.exit != null)
return worker.exit;
else
throw new TimeoutException();
} catch(InterruptedException ex) {
worker.interrupt();
Thread.currentThread().interrupt()... | [
0.3266323208808899,
-0.21795833110809326,
0.4465368092060089,
-0.23722952604293823,
0.4638965427875519,
0.40749043226242065,
0.3276542127132416,
-0.2736166715621948,
-0.2145729959011078,
-0.6431862711906433,
-0.16446267068386078,
0.21118052303791046,
-0.5246375203132629,
0.6028603315353394... | |
this.process = process;
}
public void run() {
try {
exit = process.waitFor();
} catch (InterruptedException ignore) {
return;
}
}
}
``` | [
0.38883349299430847,
-0.2987169325351715,
0.2160273790359497,
-0.1380782574415207,
0.390348345041275,
0.06263495236635208,
0.5058733224868774,
0.01668711006641388,
-0.2621118426322937,
-0.3630726635456085,
-0.33805060386657715,
0.49827808141708374,
-0.4702824354171753,
0.6512415409088135,
... | |
So I've figured out how to add line numbers to vim (:set no or :set number) but how can I make it so that when I use my mouse in a terminal emulator to select a block of lines, it does not also select the numbers?
For example, say I have three lines that look like so in vim:
```
1 First line
2 Second
3 Third... | [
0.1994507908821106,
0.026636270806193352,
0.6693010926246643,
-0.08876345306634903,
-0.30426397919654846,
0.21272243559360504,
0.19576981663703918,
-0.14377522468566895,
-0.16326098144054413,
-0.5970767736434937,
0.04685773327946663,
0.42376428842544556,
-0.4761364758014679,
-0.02587247267... | |
selects the line numbers as well as all the space to the left and right of the line numbers.
Is there any way to change this behavior? BTW, I'm using the gnome terminal editor in gnome if that makes a difference.
AFAIK, that is not possible.
The only thing I can add at the moment is that you'd be better off with
```... | [
0.06825282424688339,
-0.23455710709095,
0.5546450018882751,
0.12232604622840881,
0.055929627269506454,
-0.021391965448856354,
0.38970568776130676,
0.2776661515235901,
-0.16109484434127808,
-0.8248119354248047,
0.006633203011006117,
0.7112127542495728,
-0.23775535821914673,
0.18057924509048... | |
Before I jump both feet in and waste my time learning something that I can't use for my needs, I have to ask:
Can I make a http connection to another website from within a java applet or a flash file?
Say I have a java applet that wants to load results from google. Will the JVM give me access to such a call? What abo... | [
0.3758784234523773,
-0.10082077980041504,
0.1445341855287552,
0.28089696168899536,
-0.13396887481212616,
-0.23275147378444672,
0.17480109632015228,
0.14021432399749756,
-0.255729615688324,
-0.5486036539077759,
0.0921826884150505,
0.46570247411727905,
-0.14908084273338318,
0.136557802557945... | |
Data loading is also not allowed if the calling file is from a network sandbox and the target resource is local."
Anyway if it isn't possible, will it fail on the user silently or will it ask for permission?
Thanks a lot.
This depends on the access level of the objects. As long as they are not Static (Shared in VB.NE... | [
0.39542368054389954,
-0.3427121341228485,
0.03466422110795975,
0.3392685353755951,
-0.19141924381256104,
-0.23097209632396698,
0.44769808650016785,
0.13545818626880646,
-0.6770041584968567,
-0.4752078354358673,
-0.11310235410928726,
0.43729114532470703,
-0.23619283735752106,
0.257171571254... | |
it is that we would need to see the code. | [
0.300077348947525,
0.3198104500770569,
0.03689173609018326,
0.07493364065885544,
0.2797723412513733,
-0.14180658757686615,
0.2120182067155838,
0.145761176943779,
-0.06155918166041374,
-0.5589942932128906,
0.07047925889492035,
0.34346893429756165,
0.08595181256532669,
0.06588958203792572,
... | |
I have an array of objects that I need to sort by a position attribute that could be an integer or nil, and I need the objects that have the nil position to be at the end of the array. Now, I can force the position to return some value rather than nil so that the array.sort doesn't fail, but if I use 0 as this default,... | [
-0.14171625673770905,
-0.10466981679201126,
0.35664835572242737,
-0.0447678305208683,
-0.07050081342458725,
0.347791463136673,
-0.05829416960477829,
-0.10341737419366837,
-0.07996634393930435,
-0.5999611616134644,
0.1984436959028244,
0.2806724011898041,
-0.02068447507917881,
0.277977973222... | |
is 'almost' always guaranteed to be at the end? or is there some other way i could cause the array.sort method to put the nil attribute objects at the end of the array? the code looks like this:
```
class Parent
def sorted_children
children.sort{|a, b| a.position <=> b.position}
end
end
class Child
def po... | [
-0.09657161682844162,
-0.2587200105190277,
0.27448415756225586,
0.016414400190114975,
0.3047606348991394,
-0.008043955080211163,
-0.019529961049556732,
-0.06690403819084167,
-0.28859156370162964,
-0.6660551428794861,
0.09421847760677338,
0.20593340694904327,
-0.15598814189434052,
0.3693858... | |
it's arbitrary
How about in `Child` defining `<=>` to be based on `category.position` if `category` exists, and sorting items without a `category` as always greater than those with a `category`?
```
class Child
# Not strictly necessary, but will define other comparisons based on <=>
include Comparable
def <=>... | [
-0.16457398235797882,
-0.04269363358616829,
0.0787881538271904,
0.18230383098125458,
0.07582665979862213,
0.16414229571819305,
-0.19217737019062042,
-0.23311907052993774,
-0.3308740556240082,
-0.5111436247825623,
-0.15403877198696136,
0.31362566351890564,
0.015274974517524242,
0.3225359916... | |
I'm using Glade-3 for my GUI design, but I keep hitting this problem. I don't see anything in the GTK+ documentation mapping signals to events or in Glade-3 (3.4.5). Is there a place in the GTK+ source code to find this information?
Note: It is important in this question to recognize that events and signals are NOT th... | [
-0.2584580183029175,
-0.003772398689761758,
0.41680648922920227,
-0.2621563673019409,
-0.1654626429080963,
-0.2031572461128235,
0.1660560667514801,
-0.2958361506462097,
-0.08361859619617462,
-0.7895404696464539,
-0.0999779999256134,
0.4969877004623413,
-0.3599545657634735,
-0.4908724129199... | |
you mean now, I found this table matching up the gtk signals and gdk events. [Here it is](http://developer.gnome.org/doc/GGAD/sec-gdkevent.html#TAB-WIDGETEVENTS). | [
-0.3666500747203827,
-0.289058655500412,
0.35509538650512695,
0.10876016318798065,
-0.16359765827655792,
-0.2737087607383728,
-0.015991616994142532,
0.13957734405994415,
-0.2511399984359741,
-0.2915686070919037,
-0.11153717339038849,
0.5806237459182739,
-0.347805917263031,
-0.1102295145392... | |
I'm kind of new in PHP. For some reason in other types of programming languages like JAVA I have no problem with using setters and getters for every single variable, but when I'm programming in PHP probably because it is so flexible it feels kind of like a waste of time. It feels simpler to just set the class attribute... | [
0.5392254590988159,
0.13611599802970886,
-0.09734559804201126,
0.13591204583644867,
-0.5424861311912537,
-0.3670189678668976,
0.1445186287164688,
0.15883049368858337,
-0.13499754667282104,
-0.5794652700424194,
0.41348475217819214,
0.6375949382781982,
-0.09611362963914871,
-0.10205972194671... | |
setters and getters? Why or why not? How do you guys do it most of the time?
The main problem with not using property accessors is that if you find out you ever need to change a field to a property later on – to make it a computed property in a subclass, for instance – you’ll break clients of your API. For a published ... | [
0.5631328821182251,
-0.011101840995252132,
0.004246505908668041,
0.475102961063385,
0.035044580698013306,
-0.42131081223487854,
0.034993186593055725,
-0.23850561678409576,
-0.3709176480770111,
-0.5477290153503418,
-0.16331154108047485,
0.7681369185447693,
-0.25563880801200867,
0.0785687863... | |
let you generate accessor boilerplate and hide it using code folding. This arguably makes using getters and setters mechanically fairly easy.
Note that some programming languages have features to synthesise the default field+getter+setter – Ruby does it via metaprogramming, C# has auto-implemented properties. And Pyth... | [
0.0811576247215271,
-0.08672461658716202,
-0.003542993450537324,
0.22894904017448425,
-0.13308747112751007,
-0.2843698561191559,
0.34707900881767273,
-0.21261699497699738,
-0.11519529670476913,
-0.4918261766433716,
-0.061506446450948715,
0.7849259972572327,
-0.36944863200187683,
-0.1021163... | |
I would like to know the best method for solving this problem:
I would like to create a blank template xml from a xml schema. All the required elements and attributes would be created and their values would be all empty strings.
The next step is how to determine which child xml nodes a certain node could have. eg. I w... | [
0.18359407782554626,
-0.1471855640411377,
0.22587184607982635,
0.38971248269081116,
0.12247398495674133,
0.15409541130065918,
-0.06428199261426926,
-0.11371462792158127,
-0.12794272601604462,
-0.7976498007774353,
-0.07964986562728882,
0.10903182625770569,
-0.10344838351011276,
0.3148525357... | |
tool that allows users to edit xml files in a more user friendly setting. For eg, They could add a new account to the 'account db' node and they would see that the only available node is an account node. Next, when they try to add children to the account node and the choices would be name node (required), password node... | [
0.055191520601511,
-0.1364842653274536,
0.18838393688201904,
0.25266560912132263,
0.066705122590065,
-0.060149870812892914,
-0.16402843594551086,
0.043760523200035095,
0.03273329883813858,
-0.7534610033035278,
-0.03483768552541733,
0.4702155292034149,
-0.008075499907135963,
0.0512676276266... | |
do I use to read a schema and parse it to get useful information for creating a xml? In my naivety I had hope that since xsd was xml in itself there would be some sort of DOM model that I could traverse through.
I would like this to be confined to my program so no use of external tools such as OxygenXml, VS, xsd.exe, ... | [
0.5533846616744995,
0.1072356253862381,
0.01687111333012581,
0.22624409198760986,
-0.13703885674476624,
-0.3702824115753174,
0.06129944697022438,
-0.11818192899227142,
0.06788112223148346,
-0.628382682800293,
0.09487879276275635,
0.5978279709815979,
-0.1267804205417633,
0.05723556503653526... | |
done something very similar on a project we worked on some time ago. To produce something that works most of the time is a lot of work, to product something that works all the time is loads of work!
Basically you need to load the XSD (the XmlSchema objects in .net allow you to do this). But the SOM object model they e... | [
0.6137158870697021,
-0.09504406154155731,
-0.31453996896743774,
0.30175361037254333,
0.006474934983998537,
-0.198234423995018,
0.16982360184192657,
0.06118043139576912,
-0.3217138350009918,
-0.708857536315918,
-0.042359691113233566,
0.4204152822494507,
-0.2305229753255844,
-0.0414849072694... | |
easily.
You next need to figure out where you are in the XML document with relation to your schema. Once you known were you are in the SOM you can then start to work out the available options.
To do this properly is 1,000' of lines of code and 4-12 man weeks of work. You may be able to get something basic together in... | [
0.5221024751663208,
0.03677688166499138,
0.37053319811820984,
0.20627817511558533,
0.13182714581489563,
-0.2594220042228699,
0.562998354434967,
-0.22761261463165283,
-0.18221646547317505,
-0.7305199503898621,
-0.03271574527025223,
0.37654921412467957,
0.49855488538742065,
-0.21492874622344... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.