text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Does anyone know of a javascript based Rich Text box that behaves a bit like an IDE so that in a management system I can provide a text area for CSS and/or one for HTML to be written into the box and the input is colour coded like it is if you edit in Notepad++, Visual Studio etc Customsiation of the colours would be s... | [
0.45117175579071045,
-0.010932665318250656,
-0.027316885069012642,
0.3177933692932129,
-0.07143516838550568,
-0.22185499966144562,
0.11949902772903442,
0.1681852489709854,
-0.3242909610271454,
-0.37292855978012085,
-0.03399565443396568,
0.31575003266334534,
-0.20942696928977966,
-0.2366274... | |
help!
Steve
[CodeMirror](http://marijn.haverbeke.nl/codemirror/) loks like what you want.
I was also going to suggest [Bespin](http://labs.mozilla.com/projects/bespin/) but I think browser technology needs to catch up with it (it uses HTML 5 etc.) | [
0.27819687128067017,
0.1800084263086319,
0.38252225518226624,
-0.028039369732141495,
-0.014115205965936184,
0.0789250060915947,
0.17574147880077362,
0.08986609429121017,
-0.6099331378936768,
-0.250346839427948,
0.04653981328010559,
0.24427840113639832,
-0.13517065346240997,
-0.361255764961... | |
A new feature in C# / .NET 4.0 is that you can change your enumerable in a `foreach` without getting the exception. See Paul Jackson's blog entry *[An Interesting Side-Effect of Concurrency: Removing Items from a Collection While Enumerating](https://web.archive.org/web/20160308065012/www.lovethedot.net/2009/03/interes... | [
0.1787320226430893,
0.19323603808879852,
0.37025269865989685,
-0.18075846135616302,
0.10790630429983139,
0.014844193123281002,
0.14971104264259338,
-0.3880653381347656,
-0.5838690400123596,
-0.30480897426605225,
-0.048740774393081665,
0.29840704798698425,
-0.5013957619667053,
0.41888007521... | |
foreach is immutable. This is very much by design.
As it says on [MSDN](http://msdn.microsoft.com/en-us/library/ttw7t8t6.aspx):
> The foreach statement is used to
> iterate through the collection to get
> the information that you want, but can
> not be used to add or remove items
> from the source collection to ... | [
0.14145655930042267,
0.34658530354499817,
0.4402328133583069,
-0.25243592262268066,
0.10216397792100906,
-0.356827974319458,
0.430533230304718,
-0.1283225566148758,
-0.11074026674032211,
-0.22651855647563934,
-0.21568642556667328,
0.2568158805370331,
-0.3601122796535492,
0.0961456149816513... | |
Every once in a while I will paste in some code and it will lose all its tabs and look pretty bad
I know that in the vs2008 xml viewer there is a button to format(indent) all the code to the correct hierarchy
Is there such a function or macro or shortcut key that i could apply this to a section of code (or to all the... | [
0.15370573103427887,
-0.1870884895324707,
0.790661096572876,
0.0774875357747078,
-0.07076700776815414,
0.022478366270661354,
0.047667331993579865,
-0.2349233478307724,
-0.22799360752105713,
-0.7146890163421631,
-0.10446339100599289,
0.5995404124259949,
-0.3600791394710541,
-0.1125552728772... | |
I need to use some string replacement in Perl to ease translations, i.e. replace many
```
print "Outputting " . $n . " numbers";
```
by something like
```
printf ("Outputting %d numbers", $n);
```
However, I'd like to replace printf with something easier to parse for humans, like this:
```
printX ("Outputting {n... | [
0.1800263524055481,
-0.03417929261922836,
0.3042137622833252,
-0.12954984605312347,
-0.20692917704582214,
-0.02992103062570095,
0.13379843533039093,
0.13293121755123138,
-0.16542163491249084,
-0.6621179580688477,
0.1583060324192047,
0.6572844386100769,
-0.35382238030433655,
-0.086241513490... | |
required example with something like this...
```
sub printX {
use Template;
my $tt = Template->new( START_TAG => '{', END_TAG => '}' );
$tt->process( \( $_[0] . "\n" ), $_[1] );
}
```
and you've got...
```
printX 'Outputting {num} numbers' => { num => 100 };
``` | [
0.15680155158042908,
0.06669250130653381,
0.26035037636756897,
-0.09674780815839767,
0.07936651259660721,
-0.030067887157201767,
0.18670311570167542,
-0.4957522451877594,
-0.20023758709430695,
-0.728725254535675,
-0.2538020610809326,
0.5773827433586121,
-0.1496179699897766,
-0.030477253720... | |
Is it possible to find out the full path to the script that is currently executing in KornShell (ksh)?
i.e. if my script is in `/opt/scripts/myscript.ksh`, can I programmatically inside that script discover `/opt/scripts/myscript.ksh` ?
Thanks,
You could use:
```
## __SCRIPTNAME - name of the script without the path... | [
-0.049487750977277756,
0.11852475255727768,
0.5317754149436951,
0.07143732160329819,
0.11502527445554733,
-0.11718324571847916,
0.46761929988861084,
0.12981973588466644,
0.07738417387008667,
-0.7996857166290283,
-0.23753850162029266,
0.6515501141548157,
0.09262014180421829,
-0.033755172044... | |
Currently I am using this one ( **edit: I missed to explain that I use this one for excluding exactly these words :p** ):
```
String REGEXP = "^[^(REG_)?].*";
```
but matches (exluding) also ERG, EGR, GRE, etc... above
P.S.
I removed super because it is another keyword that I must filter, figure an array list c... | [
0.012904970906674862,
-0.16144995391368866,
0.6613727807998657,
0.11807403713464737,
0.08373871445655823,
0.19087086617946625,
0.07946737110614777,
0.016326334327459335,
-0.17673729360103607,
-0.6961454153060913,
-0.14193256199359894,
0.6946229934692383,
-0.6417592763900757,
0.053849749267... | |
= "^(REG_|SUPER_)?.*";
```
---
**Edit** After you clarified that you want to match every word that does *not* begin with `REG_` or `SUPER_`, you could try this:
```
\b(?!REG_|SUPER_)\w+
```
The `\b` is a word boundary and the expression `(?!`*`expr`*`)` is a look-ahead assertion. | [
0.06267019361257553,
-0.07452062517404556,
0.3584124743938446,
-0.11697814613580704,
-0.015044738538563251,
-0.283137708902359,
0.1551174521446228,
-0.11502101272344589,
0.14813414216041565,
-0.3448348045349121,
-0.333339124917984,
0.5904868245124817,
-0.08359900116920471,
0.10256648808717... | |
I get this 'error' when running PEVerify on a custom generated assembly.
```
[MD](0x8013124C): Error: Method has a duplicate, token=0x06000023.
[token:0x06000021]
[MD](0x8013124C): Error: Method has a duplicate, token=0x06000021.
[token:0x06000023]
```
Besides this... | [
0.21719461679458618,
0.266075074672699,
-0.06456495821475983,
0.07473841309547424,
-0.06414733082056046,
0.010130766779184341,
0.43469345569610596,
-0.3158099055290222,
-0.3171233832836151,
-0.720019519329071,
0.10909464210271835,
0.49603715538978577,
-0.3431423306465149,
0.216721698641777... | |
been unable to track down where it comes from (as it does not affect assembly in any way).
Google, unfortunately does not reveal much on this error.
Can someone please provide some insight on this 'error' and how it could be caused?
Thanks :)
I solved the problem.
It is caused by emitting a method with the exact si... | [
0.6948123574256897,
0.04245619848370552,
0.09184349328279495,
-0.07663759589195251,
-0.3639357388019562,
-0.41858550906181335,
0.9845786094665527,
0.11755231022834778,
-0.4637851119041443,
-0.48521509766578674,
-0.026999522000551224,
0.12449667602777481,
-0.2149135321378708,
0.192097589373... | |
Having two InputStreams in Java, is there a way to merge them so you end with one InputStream that gives you the output of both streams? How?
As commented, it's not clear what you mean by merge.
Taking available input "randomly" from either is complicated by `InputStream.available` not necessarily giving you a useful ... | [
0.2801079750061035,
-0.5356689691543579,
-0.11838508397340775,
-0.018294233828783035,
-0.17575709521770477,
-0.08949483186006546,
-0.2045992761850357,
-0.11733962595462799,
-0.38851261138916016,
-0.9181202054023743,
0.2208898514509201,
0.212899848818779,
-0.5121530294418335,
0.154956713318... | |
channels.
If you want the full contents of the first input stream followed by the second: `new java.io.SequenceInputStream(s1, s2)`. | [
0.4287320375442505,
-0.45170724391937256,
0.34882569313049316,
0.060784049332141876,
0.11352528631687164,
0.0812111347913742,
-0.12255648523569107,
0.09712684154510498,
-0.19114816188812256,
-0.8516461849212646,
-0.06797200441360474,
0.3212367594242096,
-0.6322747468948364,
0.1073295697569... | |
I tried a few things but this week i feel like my brain's having holidays and i need to complete this thing.. so i hope someone can help me.
I need to create a filelist based on a hash which is saved into a database. The has looks like this:
```
['file1', 'dir1/file2', 'dir1/subdir1/file3']
```
Output should be li... | [
0.16845490038394928,
0.13477212190628052,
0.39055225253105164,
-0.018867062404751778,
-0.2080976665019989,
-0.017429733648896217,
0.008722885511815548,
-0.2178148329257965,
-0.2606678009033203,
-0.9691658020019531,
-0.011230925098061562,
0.31416618824005127,
-0.10863085836172104,
0.1482897... | |
</ul>
</ul>
</ul>
```
I'm using Ruby on Rails and try to achieve this in an RJS template. But this don't really matters. You can also help me with some detailed pseudo-code.
Someone know how to solve this?
---
Edit
Thanks to everyone for these solutions. Listing works, i extended it to a foldable solution to sh... | [
0.27458444237709045,
0.14861594140529633,
0.47849729657173157,
-0.016700688749551773,
-0.41042569279670715,
-0.13530440628528595,
0.44837355613708496,
-0.05229955539107323,
-0.31588494777679443,
-0.7474470138549805,
0.026552289724349976,
0.48653438687324524,
-0.4095882177352905,
0.21829678... | |
better understanding:
Currently:
```
[x] dir1
[x] dir2
[x] file1
```
gives me
a checkbox with the same value a sthe text displays, e.g "file1" for [x] file1. But what i need is a full path, e.g "dir1/dir2/file1" for [x] file1.
Does someone have another hint how to add this?
Here's a quick implementat... | [
-0.12945979833602905,
-0.10777634382247925,
0.2315828651189804,
-0.14992466568946838,
-0.05513440817594528,
-0.0024650758132338524,
0.21929436922073364,
-0.28522008657455444,
-0.17867779731750488,
-0.6955835819244385,
-0.029544252902269363,
0.4797646105289459,
-0.29961779713630676,
-0.1436... | |
path.split("/").inject("") do |sub_path,dir|
sub_path = File.join(sub_path, dir)
current[sub_path] ||= {}
current = current[sub_path]
sub_path
end
end
def print_tree(prefix, node)
puts "#{prefix}<ul>"
node.each_pair do |path, subtree|
puts "#{prefix} <li>[#{path[1..-1]}] #{File.basename(pa... | [
0.05360058695077896,
-0.31257888674736023,
0.5812006592750549,
-0.1312018781900406,
-0.15458916127681732,
0.011108899489045143,
0.4182385504245758,
-0.5923041701316833,
-0.225716233253479,
-1.0554630756378174,
-0.25199317932128906,
0.2800692617893219,
-0.5565900802612305,
0.047616779804229... | |
like this:
```
<ul>
<li>[dir1] dir1</li>
<ul>
<li>[dir1/subdir1] subdir1</li>
<ul>
<li>[dir1/subdir1/file3] file3</li>
<li>[dir1/subdir1/file5] file5</li>
</ul>
<li>[dir1/file2] file2</li>
</ul>
<li>[file1] file1</li>
</ul>
```
I hope this serves as an example of how you can get b... | [
-0.038589056581258774,
-0.15708354115486145,
0.19863563776016235,
-0.0835275650024414,
-0.1486625075340271,
-0.04297586530447006,
0.15776684880256653,
-0.3398323655128479,
-0.07460001856088638,
-1.073576807975769,
-0.040690794587135315,
0.46663206815719604,
-0.2361437976360321,
0.159918963... | |
I'm building a project with MFC Feature Pack. Is this project I have a window which includes a `CView`, which includes a `CListCtrl`-derived object. The object includes the `LVS_EDITLABELS` flag.
Somehow I cannot edit the `CListCtrl` icon labels by two-time clicking (not double-clicking) on the icon label. After I sel... | [
0.2149566113948822,
0.09932611882686615,
0.7748996019363403,
-0.13910388946533203,
0.09499035775661469,
-0.1233379915356636,
0.4868745803833008,
-0.041898708790540695,
-0.045483916997909546,
-0.5859442949295044,
-0.06134059280157089,
0.39836186170578003,
-0.5266990661621094,
0.373059004545... | |
labels.
I also found that:
* This problem occurs in VS2008. It doesn't occur in a similar project built in VS2003.
* I am able to edit the labels if I build a `CListView` instead of a `CView`+`CListCtrl`.
* I am also able to edit the labels if I build a `CFormView` and put the `CListCtrl` inside the resource dialog.... | [
0.13153593242168427,
-0.044710922986269,
0.3510614037513733,
0.06751909852027893,
-0.059909138828516006,
-0.2913002073764801,
0.31878483295440674,
-0.2581004500389099,
-0.1242620125412941,
-0.5931620001792908,
0.07810889184474945,
0.8108672499656677,
-0.31004419922828674,
0.190157413482666... | |
by dynamic creation
virtual ~vwTerminaisTeste();
CListCtrl m_lstTerminais;
protected:
DECLARE_MESSAGE_MAP()
virtual void OnDraw(CDC* /*pDC*/);
public:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
};
```
and the .cpp file:
```
// vwTer... | [
-0.19002264738082886,
-0.2524753212928772,
0.5429098010063171,
0.0028337507974356413,
0.2747264504432678,
0.4104485511779785,
0.3134029507637024,
-0.3309824466705322,
-0.40501153469085693,
-0.5673182606697083,
-0.45072442293167114,
0.5738345980644226,
-0.3957476317882538,
0.367968469858169... | |
CRect(0,0,1,1), this, 0);
m_lstTerminais.InsertItem(0, "Teste", 0);
return 0;
}
void vwTerminaisTeste::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
if (IsWindow(m_lstTerminais.GetSafeHwnd()))
m_lstTerminais.MoveWindow(0, 0, cx, cy);
}
```
This way I cannot edit labels.... | [
0.039180632680654526,
-0.07307739555835724,
0.6838902831077576,
-0.1527809351682663,
0.08378805965185165,
0.2106034755706787,
0.15583278238773346,
-0.2548213303089142,
-0.13743510842323303,
-0.5493084788322449,
-0.23991844058036804,
0.5798525214195251,
-0.34091949462890625,
0.2965340018272... | |
the input Array.
I've updated the solution to save the entire path as you required.
```
dirs = ['file1', 'dir1/file2', 'dir1/subdir1/file3', 'dir1/subdir1/file5']
tree = {}
dirs.each do |path|
current = tree
path.split("/").inject("") do |sub_path,dir|
sub_path = File.join(sub_path, dir)
current[sub_p... | [
-0.5065064430236816,
-0.215313121676445,
0.5220980644226074,
-0.24418656527996063,
-0.006657752674072981,
0.23824241757392883,
0.16474241018295288,
-0.565021276473999,
-0.22535189986228943,
-0.7501932382583618,
-0.3387117087841034,
0.4446929097175598,
-0.41610896587371826,
0.01065677776932... | |
tree
```
This code will produce properly indented HTML like your example. But since Hashes in Ruby (1.8.6) aren't ordered the order of the files can't be guaranteed.
The output produced will look like this:
```
<ul>
<li>[dir1] dir1</li>
<ul>
<li>[dir1/subdir1] subdir1</li>
<ul>
<li>[dir1/subdir1/f... | [
-0.10798649489879608,
-0.13817308843135834,
0.3637212812900543,
-0.22396749258041382,
-0.09750577062368393,
0.139089435338974,
0.405609130859375,
-0.018175391480326653,
-0.1530396044254303,
-0.941257655620575,
-0.09618216007947922,
0.20358823239803314,
-0.4048713147640228,
-0.1445590704679... | |
I'm working with the [NerdDinner](http://www.nerddinner.com/) sample [application](http://tinyurl.com/aspnetmvc) and arrived at the section which deals with the Virtual Earth map. The application stores some values for the longitude and latitude. Unfortunately on my system floating point numbers are stored with a comma... | [
0.3735610842704773,
-0.026390762999653816,
0.6547618508338928,
0.39973196387290955,
0.18683528900146484,
0.33336183428764343,
-0.00615924596786499,
0.09683412313461304,
-0.43353745341300964,
-0.8179190158843994,
0.21865060925483704,
0.07517287880182266,
0.28584325313568115,
0.3879182338714... | |
the application always uses dots. In a WebForms app I would have a common class which overrides the `System.Web.UI.Page.InitializeCulture()` method and I would be inheriting my pages from that class.
I am not sure about how to do the same with MVC. Do I need a customized `ViewPage` or something? Is there an **easy** w... | [
0.26512420177459717,
0.008007870987057686,
0.8173919320106506,
-0.0034445985220372677,
-0.21742291748523712,
0.05733238905668259,
0.13966470956802368,
0.13211122155189514,
-0.3751062750816345,
-0.9034166932106018,
-0.02755759283900261,
0.36259976029396057,
-0.4999542534351349,
0.3871279656... | |
public class NerdDinnerViewPage<T> : ViewPage<T> where T : class
{
protected override void InitializeCulture()
{
base.InitializeCulture();
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentCulture.Clone() as CultureInfo;
if (Thread.CurrentThread.... | [
0.7272517681121826,
-0.5440269112586975,
0.28675195574760437,
-0.07189429551362991,
0.33884650468826294,
0.1444949358701706,
0.19849209487438202,
-0.059811074286699295,
-0.03080323338508606,
-0.28177210688591003,
-0.07714957743883133,
0.36130696535110474,
-0.5055748224258423,
0.57732695341... | |
Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyDecimalSeparator = ".";
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = ".";
}
}
}
}
```
**Edit.aspx:**
```
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="... | [
-0.1732039600610733,
-0.02707841992378235,
0.62757807970047,
-0.04559584707021713,
0.0031363845337182283,
0.20904392004013062,
0.2365541309118271,
-0.1571120023727417,
-0.6612491011619568,
-0.5732202529907227,
-0.06485508382320404,
0.2878630757331848,
-0.15245123207569122,
0.70674997568130... | |
I'm trying to get hold of an object from another application using WCF. With built in classes it works fine but I run into probems when trying to return a custom interface type from the WCF operation.
Whether I include the interface in both applications separately, or specif it as a shared assembly, I get the same re... | [
0.0825168639421463,
0.05706710368394852,
0.12400920689105988,
-0.34220048785209656,
-0.040118101984262466,
0.13893891870975494,
0.479679137468338,
-0.2404869645833969,
0.06745319813489914,
-0.8929154872894287,
0.32505255937576294,
0.5377786755561829,
-0.5346192121505737,
0.2439873069524765... | |
get;
}
String StringTest {
[OperationContract]
get;
}
IOther OtherTest {
[OperationContract]
get;
}
}
[ServiceContract]
public interface IOther {
String StringTest {
[OperationContract]
get;
}
}
```
My server looks like this:
```
public par... | [
-0.050765424966812134,
-0.2210557907819748,
0.7177549600601196,
-0.1498923897743225,
0.010488489642739296,
0.1670517772436142,
0.33938997983932495,
0.30627691745758057,
0.12217359989881516,
-0.8376802206039429,
-0.14161443710327148,
0.5823104381561279,
-0.22446571290493011,
0.2166244983673... | |
private Base fb;
private ServiceHost host;
public MainWindow() {
InitializeComponent();
fb = new Base();
host = new ServiceHost(fb, new Uri[] { new Uri("net.pipe://localhost") });
host.AddServiceEndpoint(typeof(IBase), new NetNamedPipeBinding(),
"PipeReverse");
... | [
-0.12242386490106583,
-0.35360074043273926,
0.4967680871486664,
-0.35925230383872986,
0.14270688593387604,
0.34219446778297424,
0.40165624022483826,
-0.14208772778511047,
-0.10697831213474274,
-0.8264789581298828,
-0.45953866839408875,
0.48532721400260925,
-0.336900919675827,
0.62816578149... | |
host.Close();
}
}
```
And here is my implementation of the interface:
```
[Serializable]
[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)]
public class Base : MarshalByRefObject, IBase {
public int IntTest {
get { return 4; }
}
public string StringTest {
get { return ... | [
0.09572689235210419,
0.15713201463222504,
0.39134129881858826,
-0.08077432215213776,
0.18669556081295013,
-0.06658710539340973,
0.3984043300151825,
-0.3652096688747406,
-0.12167475372552872,
-0.8069114685058594,
-0.10780154168605804,
0.5181769728660583,
-0.34750640392303467,
0.383387237787... | |
{
[DataMember]
public string StringTest {
get { return "A string from Other"; }
}
}
```
The client looks like this:
```
public partial class Form1 : Form {
IBase obj;
public Form1() {
InitializeComponent();
ChannelFactory<IBase> pipeFactory = new ChannelFactory<IBase>(
... | [
-0.030952276661992073,
-0.41302287578582764,
0.8377923369407654,
-0.23404861986637115,
-0.07692025601863861,
0.13591697812080383,
0.2382010668516159,
-0.2855550944805145,
0.14648856222629547,
-0.9920296669006348,
-0.17555280029773712,
0.4818075895309448,
-0.32898586988449097,
0.26813599467... | |
obj = pipeFactory.CreateChannel();
}
private void button2_Click(object sender, EventArgs e) {
Console.WriteLine("Returns: " + obj.StringTest + " " +
obj.StringTest.Length);
Console.WriteLine("Returns: " + obj.IntTest);
Console.WriteLine(obj.OtherTest);
}
}
```
Every... | [
-0.20365428924560547,
-0.07059080898761749,
0.9334549903869629,
-0.3315786123275757,
0.1414380967617035,
0.30212295055389404,
1.067276954650879,
-0.3550640940666199,
0.3084844648838043,
-0.8153693079948425,
-0.023280082270503044,
0.4775899648666382,
-0.39608076214790344,
0.1577214300632476... | |
far as I can tell that is a broken pipe due to a faulted state but I can't figure out why, or more importantly how to fix it. Any ideas?
I have no config file as everthing is done in the code above so I don't know how to turn on tracing, otherwise I would have included that too.
The returned property **OtherTest** nee... | [
0.3802047371864319,
-0.013729781843721867,
0.1924390196800232,
0.2892038822174072,
0.04624365642666817,
0.03487739339470863,
0.3082386255264282,
-0.056083984673023224,
0.003958716988563538,
-0.7132195830345154,
0.4038664996623993,
0.3632485270500183,
-0.07944202423095703,
0.357363253831863... | |
I have an NSDocument which has the following structure:
```
@interface MyDocument : NSDocument
{
NSMutableArray *myArray;
IBOutlet NSArrayController *myArrayController;
IBOutlet MyView *myView;
}
@end
```
I instantiate the NSArrayController and the MyView in MyDocument.xib, and have made the connections... | [
-0.1672326922416687,
-0.032570455223321915,
0.6741589903831482,
0.05423282831907272,
-0.020456138998270035,
-0.05138266459107399,
0.22591206431388855,
0.17885051667690277,
-0.11321637779474258,
-1.0892316102981567,
-0.07981126755475998,
0.5914274454116821,
-0.16775928437709808,
0.202411279... | |
setContent:myArray];
// (This is another way to do it) [myArrayController bind:@"contentArray" toObject:self withKeyPath:@"myArray" options:nil];
[myView bind:@"myViewArray" toObject:myArrayController withKeyPath:@"arrangedObjects" options:nil];
}
```
In the debugger, I have verified that `myViewArray` is an ... | [
-0.08837338536977768,
0.08358488976955414,
0.6426201462745667,
-0.08806857466697693,
-0.18645815551280975,
-0.31742459535598755,
0.29475826025009155,
-0.41156110167503357,
0.03745715320110321,
-0.6444610357284546,
-0.07948938757181168,
0.629361093044281,
-0.36884012818336487,
0.03203777968... | |
of KVO.)
Is there something wrong with how I'm trying to update `myViewArray`? Is there something wrong with my programmatic binding? (I am trying to do this programmatically, because MyView is a custom view and I don't want to create an IB palette for it.)
You can't.
If the browser (i.e. JavaScript) is supposed to r... | [
0.38438880443573,
0.429322749376297,
0.44855859875679016,
0.10837208479642868,
-0.3320524990558624,
-0.24580390751361847,
0.4706207811832428,
-0.12600067257881165,
-0.07398312538862228,
-0.4396018385887146,
-0.07086953520774841,
0.8599604368209839,
-0.018387269228696823,
0.0698651224374771... | |
able to figure it out.
You can do SSL requests to encrypt the server connection, hiding the data from third parties. | [
0.5439601540565491,
-0.13360483944416046,
0.1492701768875122,
0.4938703775405884,
0.03328376263380051,
-0.4159051477909088,
0.35532528162002563,
0.18711787462234497,
-0.3411415219306946,
-0.5757456421852112,
-0.04231211915612221,
0.35705462098121643,
0.014361093752086163,
-0.04359498992562... | |
I have an unordered list, which has maybe 30 items. When one of these items are hovered over, the rest of the list items fade to 30% and the hovered item stays at 100%; when you move away from the list, they all fade back up to 100% and I have managed this.
My problems arises when you move from item to item, the other... | [
0.3326413333415985,
-0.12010352313518524,
0.7599555850028992,
-0.012870888225734234,
0.1164296492934227,
0.46092483401298523,
-0.09835150837898254,
-0.025029867887496948,
-0.3553454875946045,
-0.8610745072364807,
0.23407815396785736,
0.294584721326828,
0.037564393132925034,
0.2381681352853... | |
item. I also used jQuery to add a class to the current list item, so I could then fade the rest and remove it once you move away. I have used a wait function found on the jQuery Cookbook site (<http://docs.jquery.com/Cookbook/wait>)
Do you get me?
Here's my code so far:
```
$.fn.wait = function(time, type) {
tim... | [
0.3162500262260437,
-0.5070910453796387,
0.5753517150878906,
-0.08519439399242401,
0.08195443451404572,
0.3182443380355835,
0.19593855738639832,
-0.19275517761707306,
-0.2776646614074707,
-0.6016597151756287,
0.14755962789058685,
0.6305226683616638,
-0.2598811388015747,
0.27022385597229004... | |
$(self).dequeue();
}, time);
});
};
$("#sites li:not(#sites li li)").hoverIntent(function(){
$(this).attr('class', 'current'); // Add class .current
$("#sites li:not(#sites li.current,#sites li li)").fadeTo("slow", 0.3); // Fade other items to 30%
},function(){
$("#sites li:not(#sites li.cu... | [
0.3103744685649872,
-0.04502636566758156,
0.8814457654953003,
-0.20977593958377838,
0.3479210138320923,
0.12534396350383759,
0.352495402097702,
-0.3829132616519928,
-0.12458247691392899,
-0.8808134198188782,
-0.0207823459059,
0.6760120987892151,
-0.2732004225254059,
0.09485039114952087,
... | |
looks of things, your css selector can be simplified. I think you only want the topmost list item to fade in and out, but it's not clear from the example. This example highlights the topmost node and does the fading correctly. I think this is the effect you were going for, but I'm not 100% sure. I didn't use the wait()... | [
0.2821865677833557,
-0.3012310266494751,
0.2026279717683792,
-0.08400565385818481,
0.19810208678245544,
0.13009196519851685,
0.32906752824783325,
0.08904755115509033,
-0.18107710778713226,
-0.904352605342865,
0.0450761541724205,
0.27915918827056885,
-0.09471558034420013,
0.103859543800354,... | |
to fade in the list or other list items when you've entirely left the list. Don't use hoverIntent for that part, and handle the fading on the entire unordered list and it should be good to go.
The example: <http://jsbin.com/usobe>
Tinker with the example: <http://jsbin.com/usobe/edit>
```
<ul id="sites">
<li> site... | [
0.012561812065541744,
-0.15319791436195374,
0.1863383650779724,
-0.2936275899410248,
-0.07038413733243942,
-0.13565486669540405,
0.5219703912734985,
-0.20630626380443573,
0.3274192214012146,
-0.8410573601722717,
0.13983972370624542,
0.3972140848636627,
-0.33045169711112976,
0.0358118079602... | |
<li> site 5
</ul>
<script>
$(function() {
$("#sites").hover(
function() {},
function() {
$('#sites>li').fadeTo("fast", 1.0);
}
);
$("#sites>li").hoverIntent(
function(){
$(this).attr('class', 'current'); // Add class .current
$(this).siblings().fadeTo("fast", 0.3... | [
0.07799083739519119,
-0.21434807777404785,
0.8381592631340027,
-0.15480157732963562,
0.12386174499988556,
0.3518643081188202,
0.20732378959655762,
-0.3359675705432892,
0.02129753679037094,
-0.8408334255218506,
-0.19399084150791168,
0.3814157545566559,
-0.20548781752586365,
0.26702037453651... | |
$(this).removeClass("current"); // Remove class .current
$(this).fadeTo("fast", 1.0); // This should set the other's opacity back to 100% on mouseout
});
});
</script>
``` | [
0.04121898114681244,
-0.3476268947124481,
0.4962877631187439,
-0.36644604802131653,
0.5543467402458191,
0.036434147506952286,
0.49764302372932434,
-0.1790318489074707,
0.07462203502655029,
-0.4469895362854004,
-0.06177792698144913,
0.7511480450630188,
-0.4598352909088135,
0.108823962509632... | |
I have an ASP.NET site (VB.NET) that I'm trying to clean up. When it was originally created it was written with no error handling, and I'm trying to add it in to improve the User Experience.
```
Try
If Not String.IsNullOrEmpty(strMfgName) And Not String.IsNullOrEmpty(strSortType) Then
If Integer.TryParse(R... | [
0.010678929276764393,
0.013634316623210907,
0.678704559803009,
-0.2801515460014343,
0.06494355946779251,
-0.012977889738976955,
0.19966261088848114,
-0.4413670301437378,
-0.012942087836563587,
-0.5744823813438416,
-0.05274844542145729,
0.258508563041687,
-0.3501172363758087,
0.229155719280... | |
End If
MyDataGrid.DataBind()
If CType(MyDataGrid.DataSource, DataSet).Tables("Data").Rows.Count > 0 Then
lblCatName.Text = CType(MyDataGrid.DataSource, DataSet).Tables("Data").Rows(0).Item("mfgName")
End If
If MyDataGrid.Items.Count < 2 Then
cboSortTypes.Visible... | [
0.039252687245607376,
0.1814524233341217,
0.525982677936554,
-0.2677139341831207,
0.08861172199249268,
0.058535486459732056,
0.3168596029281616,
-0.4261365234851837,
-0.3228541314601898,
-0.45993146300315857,
-0.24532581865787506,
0.20540937781333923,
-0.5128328204154968,
0.539535760879516... | |
If
If MyDataGrid.PageCount < 2 Then
MyDataGrid.PagerStyle.Visible = False
End If
Else
lblCatName.Text &= "<br /><span style=""fontf-size: 12px;"">There are no items for this manufacturer</span>"
MyDataGrid.Visible = False
table_search.Visible = False
End If
Ca... | [
0.1212771013379097,
0.1761699765920639,
0.649448573589325,
-0.25776776671409607,
-0.09572301059961319,
0.24941757321357727,
0.22576196491718292,
-0.542554497718811,
-0.14993545413017273,
-0.5160776972770691,
-0.20961903035640717,
0.26959750056266785,
-0.4605170786380768,
0.0882557034492492... | |
MyDataGrid.Visible = False
table_search.Visible = False
End Try
```
Now, this is trying to avoid generating a 500 error by catching exceptions. There can be three items on the query string, but only two matter here. In my test environment and in Visual Studio when I run this site, it doesn't matter if that item i... | [
0.43371954560279846,
0.13680432736873627,
0.2788001298904419,
-0.13515479862689972,
-0.022648364305496216,
0.26416054368019104,
0.4130915403366089,
-0.24316532909870148,
-0.2017219513654709,
-0.7629331350326538,
0.040941789746284485,
0.5012044310569763,
-0.3655485510826111,
0.1710826307535... | |
am seeing two different code execution paths, despite the same URLs and the same code base.
The site is running on Server 2003 with IIS 6.
Thoughts?
EDIT:
In response to the answer below, I doubt it's a connection error (though I see what you're getting to), as when I add the SubCategoryID to the query string, the s... | [
0.1662866175174713,
0.351179301738739,
0.19428378343582153,
-0.029353244230151176,
-0.1739322692155838,
-0.259258508682251,
0.42487633228302,
0.16790181398391724,
-0.28480249643325806,
-0.7085328698158264,
0.19161595404148102,
0.5700419545173645,
-0.0411447174847126,
0.1802222728729248,
... | |
copied my files from my computer into my dev-test environment, I missed a file, which ironically caused it to work, rather than not. So in the end it would have functioned the same in both environments. | [
0.6652642488479614,
0.06915077567100525,
-0.04526465758681297,
0.3686167895793915,
-0.031592514365911484,
0.07534601539373398,
0.23728327453136444,
-0.023960720747709274,
0.10600706934928894,
-0.40134716033935547,
0.3264354169368744,
0.6624760031700134,
-0.060579877346754074,
-0.1744533926... | |
I'm trying to find a way to mark a USB flash device in a way that I can programmaticly test for without mounting it or changing the label.
Are there any properties I can modify about a device that will not cause it to behave/look differently to the user?
Running Ubuntu Jaunty.
Changing the VID/PID might make your de... | [
0.6641132235527039,
0.1296129673719406,
0.328544557094574,
0.12920095026493073,
0.033261194825172424,
-0.2929675877094269,
-0.07609421014785767,
0.17759822309017181,
-0.2076737880706787,
-0.4250155985355377,
0.20973820984363556,
0.5725288391113281,
-0.0004826026561204344,
0.291384875774383... | |
can be used for custom purposes - both nefarious and otherwise. | [
0.8801189064979553,
0.06032499670982361,
-0.11247347295284271,
0.3633224070072174,
0.4409677982330322,
-0.13076084852218628,
0.3437052071094513,
-0.11116573959589005,
-0.26466307044029236,
-0.1196528822183609,
-0.34666070342063904,
0.1257609724998474,
-0.1589127629995346,
0.111561551690101... | |
I'm using Git-Svn to interact with a Svn repository at work and I can't seem to find a way to effectively resolve conflicts for the life of me. I've read the other questions on this topic, but evidently I need something even more remedial because i always seem to end up in some kind of endless loop. I rebase, use merge... | [
0.10512519627809525,
0.015435643494129181,
0.3345741629600525,
0.22851261496543884,
-0.03488311544060707,
0.07567127048969269,
0.1432029753923416,
0.08788573741912842,
-0.2835080623626709,
-0.6587770581245422,
0.12567472457885742,
0.500352680683136,
-0.16507843136787415,
0.3017950057983398... | |
making me ask again, with some very specific details about how I'm going about this so that hopefully someone can tell me exactly where my process is screwed up.
My setup:
I have a remote branch (svn/trunk), a local branch (trunk) and another local branch that I typically work in (working-trunk). trunk was checked ou... | [
0.17403967678546906,
-0.042966075241565704,
0.6261791586875916,
-0.06146042421460152,
0.2559056580066681,
-0.019078638404607773,
0.33036649227142334,
-0.16842585802078247,
-0.36479806900024414,
-0.6475226879119873,
-0.12981538474559784,
0.5997520685195923,
-0.12010267376899719,
0.141313508... | |
I get a message asking whether I used `git add`, I `git rebase --skip`
When I get to the end of all the reported changes, everything just kind of stops and I guess maybe I'm not sure what to do at this point. Git shows nothing to be committed and I appear to be back on the trunk. Git then allows me to dcommit, but if ... | [
0.5159013271331787,
0.31337013840675354,
0.29475438594818115,
0.08755665272474289,
0.04327041655778885,
-0.0647083967924118,
0.28030893206596375,
0.2635997235774994,
-0.48162412643432617,
-0.3645530343055725,
-0.12276120483875275,
0.5753639340400696,
-0.30111414194107056,
0.173388302326202... | |
and frustration. Merges may be easy in Git, but I'm sure not finding that to be the case.
Thanks.
**UPDATE:** Just wanted to throw out a quick update to describe my workflow in case that's part (or all) of the problem.
To start, after cloning my repository with a `svn/` prefix, I have my `svn/trunk` remote branch. G... | [
0.32878541946411133,
-0.026575054973363876,
0.2696821391582489,
0.16445709764957428,
-0.20511141419410706,
0.008138174191117287,
0.42896389961242676,
0.28854838013648987,
-0.48683109879493713,
-0.5737608075141907,
-0.056705210357904434,
0.41527536511421204,
0.08158120512962341,
0.257823556... | |
remote trunk.
3. I delete the default master branch (when working with svn, I find it easier to think in terms of "trunk" rather than "master").
Once I have all of my branches, my typical workflow looks like this:
1. On **working-trunk**, I make my changes and commit them.
2. I `git co trunk` and do a `git svn rebase... | [
0.011378113180398941,
-0.03397808596491814,
0.5981318354606628,
0.08656591922044754,
0.22054263949394226,
-0.24252396821975708,
0.42927658557891846,
0.011690931394696236,
-0.25338858366012573,
-0.5437578558921814,
-0.1998167634010315,
0.7663163542747498,
-0.12259293347597122,
0.40512093901... | |
fatal flaw be somewhere in that process?
Thanks again.
I'd recommending using git rebase instead of git merge. Svn keeps a linear history and seems to get confused with git branch merges sometimes. Using git rebase ensures a linear history svn understands.
see:
<http://learn.github.com/p/git-svn.html> for a bit more ... | [
-0.131317138671875,
0.07982176542282104,
-0.14789853990077972,
0.09719660878181458,
-0.09641460329294205,
-0.15221647918224335,
0.5539580583572388,
0.1294652670621872,
-0.007551685441285372,
-0.6902996897697449,
0.014974694699048996,
0.519085168838501,
0.03297269344329834,
0.33083933591842... | |
I would like a simple way to ensure that all bindings I've declared in my xaml files go to real properties. Even better, I'd like to instantiate my wpf window in a unit test and call a method to ensure that the bindings are correct.
Unfortunately, wpf doesn't even throw an exception if I have something wrong. That lea... | [
0.4377385079860687,
0.22771741449832916,
0.33488568663597107,
-0.06124105677008629,
-0.13049907982349396,
-0.303876668214798,
0.3149912655353546,
-0.38779595494270325,
-0.06542707234621048,
-0.699980616569519,
-0.19790783524513245,
0.578903317451477,
-0.3387250304222107,
0.2194326221942901... | |
(bindingExpression != null)
{
var status = bindingExpression.Status;
}
```
If the `status` is `Unattached` then the expression hasn't resolved.
Of course, you wouldn't want to do this in a production app, but it might make sense in a debug or integration test scenario. | [
0.07430458068847656,
0.018382932990789413,
0.43773096799850464,
-0.18695269525051117,
0.2793181836605072,
-0.39848947525024414,
0.31659626960754395,
-0.09395784884691238,
-0.09948825091123581,
-0.4090973734855652,
-0.537360429763794,
0.44891107082366943,
-0.494546502828598,
0.4598722755908... | |
I have a RichBox(memo) that I'd like to add lines to.
Currently,I use this
```
RichBox1.text += "the line I'd like to add" + "\n";
```
Isn't there something like the method in Delphi below?
```
Memo.Lines.add('The line I''d like to add');
```
[AppendText](http://msdn.microsoft.com/en-us/library/system.windows.for... | [
-0.1336972564458847,
-0.17033220827579498,
0.7859489917755127,
-0.23434652388095856,
-0.051722846925258636,
-0.013864824548363686,
0.11578767001628876,
-0.030952690169215202,
-0.0009954619454219937,
-1.0448532104492188,
-0.05298212543129921,
0.22420042753219604,
-0.5167807340621948,
-0.061... | |
We develop an enterprise application for which we need to document the minimum hardware requirements for the following target deployments:
1. Thick-client
2. Database/application server (where we run several server side processes that need access to the database and a file server, which is often the same machine)
3. W... | [
0.7839552164077759,
0.4019027352333069,
0.362772673368454,
0.20146048069000244,
0.4526987075805664,
0.04613287001848221,
-0.20589478313922882,
-0.25481531023979187,
-0.0954589918255806,
-0.6505506634712219,
-0.1764306128025055,
0.7355791926383972,
0.1883585900068283,
-0.2498677521944046,
... | |
minimum recommendation for .NET on client or for IIS/SQL Server on the datbase) as a vague baseline.
In general we know the application size / expected database size for our application based on the client size.
After this we add some 'fudge' numbers based on observations made with Windows PerfMon. We watch the clien... | [
0.21478106081485748,
-0.11766137182712555,
0.39432960748672485,
0.13231880962848663,
0.05188225209712982,
-0.13143345713615417,
0.22965511679649353,
-0.3145734369754791,
0.04645546153187752,
-0.7952352166175842,
0.19784119725227356,
0.5389243960380554,
0.03040911629796028,
-0.0658307969570... | |
The System.pas file contains a fair amount of information on hard-coded VMT offsets, but it doesn't seem to actually say much about the structure of the VMT itself. What I'd really like to know is, is there any way to find out the size of a VMT at runtime, or in other words, how many virtual methods exist for a given c... | [
0.5273471474647522,
-0.443905770778656,
0.020255576819181442,
0.39971062541007996,
-0.11033638566732407,
-0.13667583465576172,
0.13127516210079193,
-0.04901544749736786,
-0.33161264657974243,
-0.6100088953971863,
0.260062575340271,
0.3566616475582123,
-0.11471886932849884,
-0.2037841826677... | |
simple way to find the number of virtual methods for a given class:
```
function GetVirtualMethodCount(AClass: TClass): Integer;
begin
Result := (PInteger(Integer(AClass) + vmtClassName)^ -
(Integer(AClass) + vmtParent) - SizeOf(Pointer)) div SizeOf(Pointer);
end;
```
This works because I happen to know that ... | [
-0.011552184820175171,
-0.4639347791671753,
0.5632808804512024,
0.22732456028461456,
0.04806040599942207,
0.22432394325733185,
0.23906144499778748,
-0.4627555310726166,
-0.35230153799057007,
-0.3351275622844696,
0.08668078482151031,
0.7188223004341125,
-0.30259180068969727,
0.1850156337022... | |
class reference, you can pass any TObject derived class into this function and get the number of virtual methods. | [
0.09449276328086853,
-0.2416684329509735,
0.017052358016371727,
0.41017118096351624,
-0.05144251137971878,
0.18196752667427063,
0.04758506640791893,
-0.06954494118690491,
0.020992480218410492,
-0.5077552199363708,
0.12975990772247314,
0.5465304851531982,
-0.31920093297958374,
0.25479653477... | |
Situation: My report uses several ReportViewer Textbox controls which grow and shrink, depending on the size of the bound text. When the text in the ReportViewer textbox control is too long to fit on the current page, a page break occurs ***before*** the textbox and it is then wholly rendered in the next page. This oft... | [
-0.04248005896806717,
0.14782388508319855,
0.5008431673049927,
0.06622380763292313,
0.3179771602153778,
0.027265729382634163,
0.2262248396873474,
-0.056103210896253586,
-0.4406789243221283,
-0.6242072582244873,
-0.19887173175811768,
0.09862794727087021,
0.021271133795380592,
0.249444574117... | |
wrapping the remainder to the next page. Anyone know if this is possible?
This is quite possible. The **KeepTogether** property of the textbox defaults to true, and is what keeps the textbox from splitting into more than one section. To get your textbox to wrap to the next page, just set **KeepTogether** to false. (Not... | [
0.443065881729126,
-0.14275534451007843,
0.39300549030303955,
0.15506206452846527,
-0.1142987534403801,
-0.18700873851776123,
0.5822767615318298,
-0.18031060695648193,
-0.6057305932044983,
-0.35278087854385376,
-0.22606869041919708,
0.48118463158607483,
0.04167310148477554,
0.2046837210655... | |
I've got a problem trying to apply a loading animation to my Flex application - a whole browser window occupant.
I'm subclassing DownloadProgressBar class as described on Adobe's [article](http://livedocs.adobe.com/flex/3/html/help.html?content=app_container_4.html) about this. `stageHeight` and `stageWidth`, reported ... | [
0.1476885825395584,
-0.0668882504105568,
0.6316735148429871,
-0.28056275844573975,
-0.15517538785934448,
0.37909767031669617,
0.23463857173919678,
-0.24226045608520508,
-0.23585861921310425,
-0.8910754919052124,
-0.06338046491146088,
0.5191649794578552,
-0.36815139651298523,
-0.03441348671... | |
var appWidth:Number = Application.application.width;
var appHeight:Number = Application.application.height;
x = (appWidth * 0.5) - (preloaderSWF.width * 0.5);
y = (appHeight * 0.5);
preloaderSWF.visible = true;
}
}
``` | [
-0.16499261558055878,
0.19417251646518707,
1.000146746635437,
-0.31511345505714417,
0.010431531816720963,
0.6454487442970276,
0.4711054563522339,
-0.2666834592819214,
-0.2308836579322815,
-0.47269347310066223,
-0.3402736783027649,
0.6519619226455688,
-0.37526559829711914,
0.052978627383708... | |
I have a list of string in java code:
```
List<String> keywords = new ArrayList<String>();
keywords.add("Apple");
keywords.add("Banana");
```
and I would like to display the keywords using Freemarker:
Apple, Banana
How to do that?
PS:
I read through the manual and found some articles suggesting using `<#list>`, bu... | [
0.11356861889362335,
0.18707795441150665,
0.20785318315029144,
-0.17654787003993988,
0.07118964195251465,
0.42418020963668823,
-0.04127229005098343,
-0.02971077337861061,
-0.5993574261665344,
-0.8173302412033081,
-0.22216498851776123,
0.26272737979888916,
-0.19329918920993805,
-0.110473379... | |
I'm running unit tests from inside VS2008 against a nHibernate application and would like to turn on logging during the unit tests so I can see a bit more of what is going on. I've copied and pasted another application's app.config that successfully logs nhibernate information into the unit tests app.config, but still ... | [
0.3375471830368042,
0.1414782553911209,
0.3291494846343994,
-0.023189203813672066,
-0.16261596977710724,
0.23500283062458038,
0.24571020901203156,
-0.3467603921890259,
-0.17744386196136475,
-0.624316930770874,
0.2610531151294708,
0.6715425848960876,
-0.1005682423710823,
0.1828576922416687,... | |
<maxSizeRollBackups value="10" />
<maximumFileSize value="100KB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d{HH:mm:ss.fff} [%t] %-5p %c - %m%n" />
</layout>
</appender>
<appender name="GeneralLog" type="log4net... | [
-0.07371213287115097,
-0.19010059535503387,
0.6209449768066406,
-0.11118277907371521,
-0.09756392985582352,
0.3429560363292694,
-0.07853622734546661,
-0.35504087805747986,
-0.7366970777511597,
-0.6037595272064209,
-0.19115778803825378,
0.6266794800758362,
0.04573589935898781,
0.06048160046... | |
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d{HH:mm:ss.fff} [%t] %-5p %c - %m%n" />
</layout>
</appender>
<appender name="DataLog" type="log4net.Appender.RollingFileAppender">
<file value="Logs/data.txt" />
<appendToFile value="true" />
<maximumFileSi... | [
-0.2977694272994995,
-0.13741327822208405,
0.5293638706207275,
-0.1468818336725235,
0.08829507231712341,
0.4234442114830017,
-0.09758727252483368,
-0.3366796672344208,
-0.6712006330490112,
-0.6311978697776794,
-0.13952600955963135,
0.619269847869873,
0.12812277674674988,
-0.103157922625541... | |
</layout>
</appender>
<!-- levels: DEBUG, INFO, WARN, ERROR, FATAL -->
<root>
<level value="DEBUG"/>
<appender-ref ref="GeneralLog" />
</root>
<logger name="NHibernate" additivity="false">
<level value="DEBUG"/>
<appender-ref ref="NHibernateFileLog"/>
</logger>
<lo... | [
0.03514835983514786,
-0.008516039699316025,
0.18532630801200867,
-0.15393193066120148,
-0.05413520708680153,
0.15578454732894897,
0.4919337034225464,
-0.5704543590545654,
0.04354271665215492,
-0.7440670132637024,
-0.28010430932044983,
0.418602854013443,
-0.19125019013881683,
0.206394314765... | |
created anywhere from log4net. Does the application that log4net runs under have to be a web or windows and not a testing application?
In the Test initializer, there needs to be a call:
```
log4net.Config.XmlConfigurator.Configure();
```
This will enable logging just fine. | [
0.5255497694015503,
-0.0302493367344141,
0.02234189212322235,
0.30100753903388977,
0.1356552094221115,
-0.20753271877765656,
0.18421296775341034,
0.05309884622693062,
-0.2668263614177704,
-0.6046845316886902,
-0.19774729013442993,
0.17102660238742828,
-0.23673518002033234,
-0.0426337011158... | |
I'm experiencing a frustrating issue with asp.net.
1. Open a fresh browser (cleared history, temp files etc...)
2. Load www.mysite.com/page.aspx?anystring=1234
3. The page will load as www.mysite.com/page.aspx. The querystring will be gone. Something redirected and deleted it.
**But:**
1. Open a fresh browser (clea... | [
0.299491286277771,
0.2045496255159378,
0.9202970266342163,
0.1485057771205902,
-0.24697105586528778,
-0.33932480216026306,
0.5099105834960938,
-0.08485441654920578,
-0.4492685794830322,
-0.7444813847541809,
-0.35492637753486633,
0.4614584445953369,
-0.13368017971515656,
0.20832890272140503... | |
ASP.Net will write a cookie and redirect to see if it gets a cookie back. I have not experienced this eating URL parameters before but this is one thing that does a redirect on first page view. | [
0.25463876128196716,
-0.24967627227306366,
0.35154491662979126,
0.20138058066368103,
-0.47671470046043396,
-0.21323668956756592,
0.27235040068626404,
0.3319993317127228,
-0.48197469115257263,
-0.9092759490013123,
0.07442795485258102,
0.38371720910072327,
-0.17587070167064667,
0.08107312023... | |
For some reason, transparent controls on a form turn opaque on some computers. I got reports of it happening on an "Acer Netbook" and a "Thinkpad x600". The application is built with Delphi 2007.
This is what it looks like:
[link](http://www.cleverbyte.com/updump/81feb63c514fe314e919296b3899ce1a/ss.jpg)
While it shou... | [
0.01358343381434679,
-0.024528319016098976,
0.5224588513374329,
0.07259818911552429,
0.11594913899898529,
-0.38215115666389465,
0.16350305080413818,
0.1762581169605255,
-0.1980651468038559,
-0.6315810084342957,
0.04336972534656525,
0.21996188163757324,
-0.39957377314567566,
0.0300012268126... | |
how to prevent this (other than workarounds like rendering the text to the background image)?
Edit: I managed to reproduce the problem on my laptop, which is running Windows XP in 32-bit color, and using certified ATI drivers.
Is there a TImage between the TLabel and the form? If that is the case then set the form's c... | [
0.33820298314094543,
-0.3074302673339844,
0.2574663758277893,
0.05295756086707115,
0.2042517513036728,
0.1111566498875618,
0.06578592211008072,
-0.09706121683120728,
-0.24836839735507965,
-0.2976941168308258,
-0.2263798862695694,
0.5940564870834351,
-0.3578888177871704,
-0.0084469234570860... | |
include paining the image directly onto the form (not using a TLabel) but I don't know if that would work. Another would be to create your own image control that descends from TWinControl (instead of TGraphicControl) and that can contain child controls. YMMV on those solutions though.
I suspect the reason it doesn't w... | [
0.3633107542991638,
-0.17315153777599335,
0.36539238691329956,
0.3614741563796997,
-0.19342778623104095,
0.033204369246959686,
0.1730664074420929,
-0.18336674571037292,
-0.13705746829509735,
-0.5514089465141296,
0.32170015573501587,
0.7133761644363403,
-0.39227551221847534,
0.1065072193741... | |
I was reading through some java code in a project I was working on and came along a method with something to this effect in it.
```
Object[] objs = null;
objs[0] = str1;
objs[1] = obj1;
for(String str: strArray)
{
objs[objs.length+1] = str;
}
```
I can't figure out what is going on here. I was hoping someone cou... | [
0.1961110383272171,
0.2548147737979889,
0.14723698794841766,
-0.15399529039859772,
0.04962696507573128,
-0.10970570147037506,
0.7427482008934021,
-0.130586639046669,
-0.26346343755722046,
-0.5936622619628906,
-0.05277366563677788,
0.46537914872169495,
-0.5569658279418945,
0.193184733390808... | |
What is best practice for protection/encryption of connection strings in ASP.NET rather than just storing as plain text in Web.Config
Take a look at [Programmatically encrypting a config-file in .NET](https://stackoverflow.com/questions/21965/programmatically-encrypting-a-config-file-in-net), it seems to cover this gro... | [
-0.03096882812678814,
-0.0864158347249031,
0.19487808644771576,
0.1381620317697525,
0.07442332804203033,
-0.4892471730709076,
-0.071620412170887,
-0.07644208520650864,
-0.43293052911758423,
-0.3324546813964844,
-0.2208329290151596,
0.3256641924381256,
-0.07448089122772217,
-0.0549381375312... | |
Does jquery support both function pageload() and $().ready() ?
Or is pageload() for ajax.net ?
It only supports $().ready() | [
0.08834374696016312,
-0.21254171431064606,
0.20812562108039856,
0.00790004339069128,
-0.015124610625207424,
-0.30190509557724,
-0.029570618644356728,
0.20222662389278412,
-0.13793958723545074,
-0.5124399662017822,
-0.08246461302042007,
0.7069130539894104,
-0.320458322763443,
-0.34139525890... | |
I have been programming in C# for a while and now I want to brush up on my C++ skills.
Having the class:
```
class Foo
{
const std::string& name_;
...
};
```
What would be the best approach (I only want to allow read access to the name\_ field):
* use a getter method: `inline const std::string& name() con... | [
0.08086071163415909,
0.2658800184726715,
0.035041142255067825,
-0.16569072008132935,
-0.02429116889834404,
-0.18613719940185547,
0.33337563276290894,
0.18798428773880005,
0.05990730598568916,
-0.35553842782974243,
0.11444134265184402,
0.8146604299545288,
-0.26245346665382385,
0.30348372459... | |
future.
In your case, you have a const field, so the above issues are not a problem. The main downside of making it a public field is that you're locking down the underlying implementation. For example, if in the future you wanted to change the internal representation to a C-string or a Unicode string, or something el... | [
0.12334802001714706,
-0.2649189531803131,
0.3161584734916687,
0.27502894401550293,
0.3431973457336426,
-0.2257661074399948,
-0.1269235461950302,
0.24122288823127747,
-0.22372856736183167,
-0.9133346676826477,
-0.2734990417957306,
0.5219094157218933,
-0.5173506140708923,
0.0953025296330452,... | |
above. This will maximize your future flexibility. | [
0.4368760287761688,
0.035476893186569214,
0.2878371477127075,
0.2251608818769455,
0.15110020339488983,
0.11325137317180634,
-0.02552144043147564,
-0.08089734613895416,
-0.2884989380836487,
-1.0512295961380005,
0.20292256772518158,
0.9425981640815735,
0.13943696022033691,
0.0848836749792099... | |
I have one user in my database, and I want to grant to him permission to read only one view, nothing more, no tables, nothing.
How can I do this?
Thanks a lot.
P.S.: I am using MS SQL Server 2005
```
USE DB1;
GRANT SELECT ON OBJECT:: View1 TO JohnDoe;
GO
```
Refer to [GRANT Object Permissions](http://msdn.microso... | [
-0.11632077395915985,
0.3500586748123169,
0.20227408409118652,
0.09608414024114609,
-0.07308854907751083,
-0.24823994934558868,
0.38803473114967346,
-0.054197099059820175,
-0.20148803293704987,
-0.507881760597229,
0.017762470990419388,
0.3828413784503937,
-0.16876046359539032,
0.2387672364... | |
I've recently ran into some code that checks `Page.IsCallBack` but I wasn't sure how it is different from `Page.IsPostBack`. Can anyone enlighten me?
**Edit**: Are they mutually exclusive or can both occur at the same time in a given situation?
**Page.IsCallBack**
> It is getting a value indicating whether the page r... | [
-0.010226729325950146,
-0.19688573479652405,
0.6981041431427002,
0.119788758456707,
-0.3564070761203766,
-0.2598462700843811,
0.3180525004863739,
-0.0720352977514267,
-0.2829475998878479,
-0.7413766384124756,
-0.07811439037322998,
0.29257017374038696,
-0.2518189251422882,
0.292355179786682... | |
first time or not. Unlike the IsCallBack, the ViewState is updated
Refer to [Page Life Cycle](http://edndoc.esri.com/arcobjects/9.2/net_server_doc/developer/adf/pagepost_clientcall.htm) for more detail that shows a diagram illustrating the **sequence of events**
**Edit -** To answer your new question
> Page.IsPostb... | [
-0.04518361762166023,
-0.37386825680732727,
0.7856616973876953,
-0.007111947517842054,
-0.1908653825521469,
-0.15205137431621552,
0.1274687647819519,
-0.28212112188339233,
-0.17061926424503326,
-0.8610230684280396,
-0.22308963537216187,
0.3924139440059662,
-0.08254662156105042,
0.126189813... | |
With NHibernate entities, you are meant to override Equals and GetHashCode. Is it a good idea to override the == operator to use the .Equals implementation also?
Yes, it is a more general .NET "best practice" to keep `Equals()`, `operator==` and `GethasCode()` consistent.
See [Guidelines for Overloading Equals() and O... | [
-0.24014291167259216,
0.15366971492767334,
0.24529923498630524,
-0.033059071749448776,
-0.025245515629649162,
-0.198820561170578,
0.18501028418540955,
-0.2403048276901245,
-0.10622355341911316,
-0.4907647967338562,
0.010265271179378033,
0.4883522689342499,
-0.6081665754318237,
0.1514182984... | |
I want to run a `tail -f logfile` command on a remote machine using python's paramiko module. I've been attempting it so far in the following fashion:
```
interface = paramiko.SSHClient()
#snip the connection setup portion
stdin, stdout, stderr = interface.exec_command("tail -f logfile")
#snip into threaded loop
print... | [
0.37599843740463257,
-0.13560974597930908,
0.2638951539993286,
-0.10042740404605865,
0.10379680246114731,
-0.3467189073562622,
0.5594804883003235,
0.04990607127547264,
-0.16734784841537476,
-0.6142364740371704,
-0.06722335517406464,
0.5548430681228638,
-0.3840616047382355,
0.13849297165870... | |
`readline()` blocks, and I could avoid threads if I had a non-blocking method of getting output- any thoughts?
1) You can just close the client if you wish. The server on the other end will kill the tail process.
2) If you need to do this in a non-blocking way, you will have to use the channel object directly. You ca... | [
0.1595766693353653,
-0.21253621578216553,
0.6493685245513916,
-0.06628754734992981,
-0.05509769544005394,
-0.22603632509708405,
0.3507808744907379,
0.13967274129390717,
-0.11246899515390396,
-0.8180557489395142,
-0.15008917450904846,
0.6226055026054382,
-0.2812228202819824,
0.2816743552684... | |
I'm performing this grep:
grep -l "Validation failed" \*.dbg
This returns a file listing. However, I'm most interested in the times modified of these files.
What would the proper command be?
Edit: the argument in the title was wrong.
xargs is my friend, apparently.
The answer is:
grep -l "Validation failed" \*.dbg |... | [
-0.07817821949720383,
0.27757808566093445,
0.49534159898757935,
-0.04085716977715492,
0.10682553052902222,
-0.05531525984406471,
0.5529206991195679,
0.10034330189228058,
-0.26892969012260437,
-0.34458479285240173,
-0.18798372149467468,
0.43038997054100037,
-0.15256249904632568,
0.033067848... | |
I have a 3d modeling application. Right now I'm drawing the meshes double-sided, but I'd like to switch to single sided when the object is closed.
If the polygonal mesh is closed (no boundary edges/completely periodic), it seems like I should always be able to determine if the object is currently flipped, and automati... | [
0.31161025166511536,
-0.0938083827495575,
0.4895295202732086,
0.25082308053970337,
-0.13384152948856354,
0.06229379028081894,
-0.11944561451673508,
0.13979972898960114,
-0.46192631125450134,
-0.6165363192558289,
0.1624731719493866,
0.382438063621521,
-0.04142807424068451,
0.231893450021743... | |
is a simple way to detect it.
One thing I was thinking was to take the bounding box, find the highest point, and see if its normal points up or down - if it's down, then the object is flipped.
But it seems like this solution might be prone to errors with degenerate geometry, or floating point error, as I'd only be lo... | [
-0.019873717799782753,
-0.05091535300016403,
0.38509586453437805,
0.34873175621032715,
-0.14749310910701752,
-0.1589263379573822,
-0.19093187153339386,
-0.17216384410858154,
-0.4297890067100525,
-0.2486310601234436,
-0.06471674889326096,
0.10821349918842316,
-0.18037565052509308,
0.3013046... | |
work.. :)
This is a robust, but slow way to get there:
Take a corner of a bounding box offset from the centroid (force it to be guaranteed outside your closed polygonal mesh), then create a line segment from that to the center point of any triangle on your mesh.
Measure the angle between that line segment and the nor... | [
0.21343141794204712,
-0.2505590617656708,
0.47212064266204834,
0.151645690202713,
-0.006648698356002569,
0.15115395188331604,
0.04764043167233467,
-0.72810298204422,
0.08912720531225204,
-0.920218825340271,
-0.002665555337443948,
0.42071300745010376,
-0.219229057431221,
-0.0305253472179174... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.