text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:172:in `specs_for'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:11:in `setup'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:114:in `setup'
from D:/ruby/lib/ruby/gems/1.8/gem... | [
0.505155086517334,
0.037470996379852295,
0.5658273100852966,
-0.1533253788948059,
0.2792621850967407,
0.12130197137594223,
0.2685450315475464,
-1.1945555210113525,
-0.167295902967453,
-0.1998957395553589,
-0.609407901763916,
0.6746940612792969,
-0.2513565123081207,
-0.3901643455028534,
0... | |
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
... | [
0.32153603434562683,
0.11880313605070114,
0.6828759908676147,
-0.06078263744711876,
0.07986117154359818,
0.18380236625671387,
0.3706718683242798,
-0.9840953946113586,
0.2442135065793991,
-0.5128542184829712,
-0.23502635955810547,
0.7158393263816833,
-0.12020639330148697,
-0.169103309512138... | |
command
```
gem install rake -v=0.8.7
```
Hope your issue will be solve........ | [
0.6516469120979309,
0.06488242745399475,
0.11734988540410995,
0.058773357421159744,
0.056799523532390594,
-0.05070085451006889,
0.5288092494010925,
-0.31996023654937744,
0.36677077412605286,
-0.4622696340084076,
-0.021460698917508125,
1.2827378511428833,
0.1792842596769333,
0.0266977474093... | |
After removing hash from URL using `window.location.hash=''` page getting reloaded in firefox.
**EDIT**
Example:
`wwww.Mysite.come/#page=1`
On a click of button I am removing hash value using following code
`window.location.hash=''`
After removing the hash page is getting reloaded in firefox.
I don't want to rel... | [
0.29695284366607666,
0.21663792431354523,
0.47748637199401855,
-0.019577937200665474,
0.09958287328481674,
-0.011906922794878483,
0.11892824620008469,
-0.32056888937950134,
-0.3337712585926056,
-0.6242877244949341,
-0.42514288425445557,
0.6356974244117737,
-0.5140679478645325,
0.1782710701... | |
in the browser without loading the new page using JavaScript](https://stackoverflow.com/questions/136458/change-the-url-in-the-browser-without-loading-the-new-page-using-javascript)
[How to remove the hash from window.location with JavaScript without page refresh?](https://stackoverflow.com/questions/1397329/how-to-re... | [
-0.3203355073928833,
0.05244846269488335,
0.5581082701683044,
-0.22932232916355133,
0.04925156012177467,
-0.24700453877449036,
0.289600133895874,
-0.45740023255348206,
-0.3493782579898834,
-0.683427631855011,
-0.5748408436775208,
0.5455108284950256,
-0.29735067486763,
-0.0316670686006546,
... | |
I am working on how to show guides when moving boxes like it is in Google Docs Drawing. I would prefer an open-source code or any type of guide before starting writing my own.
1. I do not need drag-n-drop across multiple browser windows so i don't need HTML5 Drag-n-Drop.
2. Also i am using jquery-ui-draggable for boxe... | [
0.46141210198402405,
-0.2955603301525116,
0.5526025891304016,
-0.008176236413419247,
-0.4733128249645233,
-0.10074611008167267,
-0.16948840022087097,
-0.07707101851701736,
-0.272294282913208,
-0.7696402072906494,
0.12916703522205353,
0.5699012279510498,
-0.36883744597435,
-0.23554208874702... | |
snapping-functions on top of jQuery ui, i've played with it for a bit,
and while it doesn't seem like fun at least it also doesn't seem to be very hard.
you can view the example on jsfiddle: <http://jsfiddle.net/x7uMh/103/>
**update: this works ~ jQuery 1.9 + jQueryUI 1.9. it breaks in newest jquery+ui.** couldn't b... | [
-0.04656071960926056,
-0.43921607732772827,
0.7320150136947632,
0.11537356674671173,
-0.3599700331687927,
0.18752990663051605,
0.022970322519540787,
0.15087920427322388,
-0.6120539903640747,
-0.4450162351131439,
-0.05277616158127785,
0.657471239566803,
-0.5689401030540466,
-0.2871593534946... | |
display: inline-block;
cursor: move;
position: absolute;
}
.guide{
display: none;
position: absolute;
left: 0;
top: 0;
}
#guide-h{
border-top: 1px dashed #55f;
width: 100%;
}
#guide-v{
border-left: 1px dashed #55f;
height: 100%;
}
```
html
```
<div class... | [
-0.05742444470524788,
-0.15623454749584198,
1.1219749450683594,
0.3194637894630432,
-0.40532737970352173,
0.2534347176551819,
-0.010215738788247108,
-0.36500096321105957,
-0.11355530470609665,
-0.43224844336509705,
-0.1075897142291069,
0.5431578755378723,
-0.3804325759410858,
-0.2551690340... | |
jquery ui)
```
var MIN_DISTANCE = 10; // minimum distance to "snap" to a guide
var guides = []; // no guides available ...
var innerOffsetX, innerOffsetY; // we'll use those during drag ...
$( ".draggable" ).draggable({
start: function( event, ui ) {
guides = $.map( $( ".draggable" ).not( this ), comput... | [
0.2217167615890503,
-0.350352942943573,
0.9682729840278625,
0.1389806717634201,
-0.0575803741812706,
0.07289562374353409,
0.34992149472236633,
-0.512737512588501,
-0.2544000744819641,
-0.4809783399105072,
-0.1493518054485321,
0.8886109590530396,
-0.24856753647327423,
-0.24646735191345215,
... | |
// iterate all guides, remember the closest h and v guides
var guideV, guideH, distV = MIN_DISTANCE+1, distH = MIN_DISTANCE+1, offsetV, offsetH;
var chosenGuides = { top: { dist: MIN_DISTANCE+1 }, left: { dist: MIN_DISTANCE+1 } };
var $t = $(this);
var pos = { top: event.originalEvent... | [
0.15644949674606323,
-0.3448621928691864,
0.6527706384658813,
-0.04656082019209862,
0.24309614300727844,
0.11649704724550247,
0.5884299874305725,
-0.6870976686477661,
0.08255044370889664,
-0.46749454736709595,
-0.12931402027606964,
0.7685748338699341,
-0.26668134331703186,
-0.2299870252609... | |
var h = $t.outerHeight() - 1;
var elemGuides = computeGuidesForElement( null, pos, w, h );
$.each( guides, function( i, guide ){
$.each( elemGuides, function( i, elemGuide ){
if( guide.type == elemGuide.type ){ | [
0.3827436864376068,
0.19889527559280396,
0.8877298831939697,
0.026783540844917297,
0.20683106780052185,
0.15870401263237,
0.535029411315918,
-1.0214227437973022,
0.0888265073299408,
-0.571388304233551,
-0.020849116146564484,
0.7798312306404114,
-0.4750741124153137,
-0.03250131756067276,
... | |
var prop = guide.type == "h"? "top":"left";
var d = Math.abs( elemGuide[prop] - guide[prop] );
if( d < chosenGuides[prop].dist ){
chosenGuides[prop].dist = d; | [
0.09903743118047714,
0.020735224708914757,
0.5009427666664124,
-0.12168365716934204,
0.23599199950695038,
0.14830487966537476,
0.5206711292266846,
-0.6253678202629089,
0.12968169152736664,
-0.36347609758377075,
-0.5052198767662048,
0.8596862554550171,
-0.2524881362915039,
-0.16480895876884... | |
chosenGuides[prop].offset = elemGuide[prop] - pos[prop];
chosenGuides[prop].guide = guide;
}
}
} ); | [
0.24086694419384003,
-0.24209049344062805,
0.5307735204696655,
-0.09250389784574509,
0.18657468259334564,
0.25172939896583557,
-0.08435963094234467,
-0.6260392665863037,
0.02335752174258232,
-0.46823421120643616,
-0.3680361211299896,
1.0248794555664062,
-0.5423943400382996,
-0.317984282970... | |
} );
if( chosenGuides.top.dist <= MIN_DISTANCE ){
$( "#guide-h" ).css( "top", chosenGuides.top.guide.top ).show();
ui.position.top = chosenGuides.top.guide.top - chosenGuides.top.offset;
}
else{
$( "#guide-h" ).hide();
ui.position.top = pos.top; | [
0.27849897742271423,
-0.016233211383223534,
0.6911517977714539,
-0.18044425547122955,
0.14492608606815338,
-0.11096281558275223,
0.21265123784542084,
-0.48542946577072144,
0.03697802871465683,
-0.21944580972194672,
-0.48847147822380066,
0.7280784249305725,
-0.19925634562969208,
-0.07756429... | |
}
if( chosenGuides.left.dist <= MIN_DISTANCE ){
$( "#guide-v" ).css( "left", chosenGuides.left.guide.left ).show();
ui.position.left = chosenGuides.left.guide.left - chosenGuides.left.offset;
}
else{
$( "#guide-v" ).hide();
ui.position.left = p... | [
0.451751172542572,
-0.06471818685531616,
0.4199294447898865,
-0.22527073323726654,
0.16575102508068085,
0.09332802891731262,
0.24685867130756378,
-0.5163068771362305,
0.15103569626808167,
-0.40958333015441895,
-0.2993326485157013,
0.6466408967971802,
-0.25925686955451965,
0.049449454993009... | |
}
},
stop: function( event, ui ){
$( "#guide-v, #guide-h" ).hide();
}
});
function computeGuidesForElement( elem, pos, w, h ){
if( elem != null ){
var $t = $(elem);
pos = $t.offset();
w = $t.outerWidth() - 1;
h = $t.outerHeight() - 1;
} | [
0.3615245521068573,
-0.24581629037857056,
0.6389703750610352,
-0.18434473872184753,
0.3089890778064728,
0.23944392800331116,
0.3914368152618408,
-0.556827187538147,
-0.03528450056910515,
-0.416414737701416,
-0.19866348803043365,
0.8151902556419373,
-0.3399962782859802,
-0.01607506908476352... | |
return [
{ type: "h", left: pos.left, top: pos.top },
{ type: "h", left: pos.left, top: pos.top + h },
{ type: "v", left: pos.left, top: pos.top },
{ type: "v", left: pos.left + w, top: pos.top },
// you can add _any_ other guides here as well (e.g. a guide 10 pixels to the le... | [
0.0721343457698822,
-0.0394706167280674,
0.572715163230896,
0.11542563885450363,
0.2801400125026703,
0.06121623516082764,
0.11894314736127853,
-0.5234456062316895,
0.09608003497123718,
-0.495042085647583,
-0.03320324420928955,
0.6052716970443726,
-0.43612465262413025,
-0.4004008173942566,
... | |
{ type: "h", left: pos.left, top: pos.top + h/2 },
{ type: "v", left: pos.left + w/2, top: pos.top }
];
}
```
hope that helps,
best, hansi. | [
-0.25204652547836304,
0.0069442447274923325,
0.45015180110931396,
0.12350600957870483,
0.2341354489326477,
0.16690658032894135,
0.1258702129125595,
-0.2052716463804245,
0.08225342631340027,
-0.7357186079025269,
-0.14989978075027466,
0.46096915006637573,
0.02693925052881241,
-0.049287874251... | |
I'm using `UILabel` for displaying the year value which i select through `UIPickerView`. I want the year field to be secure. In `UITextfield` we will use `setSecureTextEntry`, do we have anything similar for `UILabel`?
Thanks
This feature enables debugging how a browser treats a form without using a server. I think it... | [
0.4890781342983246,
0.082884281873703,
0.6071291565895081,
0.002543405396863818,
-0.273408979177475,
-0.45271340012550354,
0.14849984645843506,
0.1954309493303299,
-0.24208411574363708,
-0.7579025030136108,
-0.1554691344499588,
0.043954625725746155,
0.06596952676773071,
0.32662534713745117... | |
in applications, there are more flexible ways to generate a data URL. It could be convenient if one had a page that was going to extract the substituted form data, parse it, and do something with it, but the extra level of indirection in the data URI seems unnecessary. | [
0.3961857557296753,
-0.004659220110625029,
0.2675010859966278,
0.40878501534461975,
-0.3161318004131317,
-0.3848465085029602,
-0.07461144030094147,
0.02864501252770424,
-0.05081550404429436,
-0.6240310668945312,
-0.4379351735115051,
0.20392939448356628,
-0.23635844886302948,
0.182582676410... | |
i have override validate method and added errors using
`addFieldError("test", "test print");`
and in jsp used
`<s:fielderror />`
but the errors are not displayed in input.jsp.
Also my jsp content type is
`<%@ page contentType="text/html; charset=UTF-8"%>`
My struts.xml is like
```
<action name="test" c... | [
0.16665677726268768,
0.05532379075884819,
0.6809290051460266,
0.0012015330139547586,
-0.26570460200309753,
-0.0075319078750908375,
0.46606090664863586,
-0.859216570854187,
0.114206962287426,
-0.48860040307044983,
0.2466391623020172,
0.5123100876808167,
-0.27165624499320984,
-0.066616974771... | |
<param name="delay">100</param>
</interceptor-ref>
<result name="wait">Wait.jsp</result>
<result name="success">/Summary.jsp</result>
<result name="input" type="chain">test</result>
<result name="failure" type="chain">test</result>
</action>
```
Turns out that errors ... | [
0.15731395781040192,
0.050353385508060455,
0.21879616379737854,
-0.28547558188438416,
-0.3426145017147064,
0.24403907358646393,
0.4458463191986084,
-1.1591085195541382,
-0.6016720533370972,
0.14505457878112793,
-0.008011871948838234,
0.34740570187568665,
-0.4584920108318329,
-0.00452717253... | |
a view for action bar)
**Action foo**
```
package com.quaternion.action;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Result;
/** #1 SOMETHING WILL BE ADDED HERE TO FIX THE ISSUE**/
@Result(name="input", type="chain", location="bar")
public class Foo extends ActionS... | [
0.10271905362606049,
-0.2057466059923172,
0.7328135967254639,
-0.362058162689209,
-0.07885506749153137,
0.26095321774482727,
0.42723768949508667,
-0.4511735141277313,
-0.20117226243019104,
-0.4978613555431366,
-0.2994934916496277,
0.833872377872467,
-0.5495399832725525,
-0.0735753327608108... | |
this.name = name;
}
}
```
**Action bar**
```
package com.quaternion.action;
import com.opensymphony.xwork2.ActionSupport;
/** #2 SOMETHING WILL BE ADDED HERE TO FIX THE ISSUE**/
public class Bar extends ActionSupport{
}
```
**view for bar**: /WEB-INF/content/bar.jsp
```
<%@taglib prefix="s" uri="/struts-... | [
-0.12638671696186066,
0.0018984434427693486,
0.8835586309432983,
-0.11609112471342087,
-0.32000166177749634,
0.3394217789173126,
0.27936410903930664,
-0.7685738205909729,
-0.38307636976242065,
-0.6244818568229675,
-0.14291778206825256,
0.5195732712745667,
-0.4880281984806061,
-0.3565618395... | |
to add annotations and the imports to support them:
```
import org.apache.struts2.convention.annotation.InterceptorRef;
import org.apache.struts2.convention.annotation.InterceptorRefs;
@InterceptorRefs({
@InterceptorRef(value = "store", params = {"operationMode","STORE"}),
@InterceptorRef("defaultStack"),
})
... | [
0.2075553983449936,
0.21777795255184174,
0.8877772688865662,
-0.22374409437179565,
-0.43647539615631104,
0.059446003288030624,
0.522277295589447,
-0.5867222547531128,
0.13632111251354218,
-0.6739863753318787,
0.1230931207537651,
0.673331081867218,
-0.37514638900756836,
-0.16382130980491638... | |
I have been looking around all day after a good multiselect plugin looks as the same as a standard dropdown control. I have tried using jQuery UI MultiSelect Widget created by ehynds, dropdown-check-list and jQuery MultiSelect created by A Beautiful Site. These are really good plugins but I really want to use a plugin ... | [
0.591838538646698,
0.03199685737490654,
0.2705152928829193,
0.09681299328804016,
-0.16882972419261932,
0.04258912429213524,
0.36246636509895325,
0.2129446417093277,
-0.029477182775735855,
-0.944628894329071,
0.18725886940956116,
0.5051795840263367,
0.24662566184997559,
0.05069705843925476,... | |
We are trying to deploy a simple C# (framework 2.0) application which uses `HttpListener` class on a Windows XP SP3 system: the application aborts at initialization because `HttpListener.IsSupported` property is `false`.
**Question:** what could make `HttpListener` unsupported on a (reasonably) up-to-date XP system ?
... | [
0.3689412772655487,
0.167317733168602,
0.2821642756462097,
-0.019290434196591377,
0.04073410853743553,
-0.29018548130989075,
0.44241809844970703,
-0.12009580433368683,
-0.15870489180088043,
-0.5205172300338745,
-0.36572885513305664,
0.6724434494972229,
-0.3356265723705292,
-0.1209822222590... | |
HttpApiMinorVersion;
}
[DllImport("httpapi.dll", CallingConvention=CallingConvention.StdCall, SetLastError=true, ExactSpelling=true)]
internal static extern unsafe uint HttpInitialize(HTTPAPI_VERSION version, uint flags, void* pReserved);
```
On XP:
```
version.HttpApiMajorVersion = 2;
version.HttpApiMinorVersion ... | [
-0.34964218735694885,
-0.14454366266727448,
0.7345561385154724,
-0.17682339251041412,
0.019053304567933083,
0.2709951102733612,
0.760448694229126,
-0.3633151650428772,
-0.028044112026691437,
-0.4601655900478363,
-0.32190483808517456,
0.7264859080314636,
-0.4320002496242523,
0.1763959527015... | |
I'm trying to `openWithDefaultApplication` a downloaded file (stored into app documents directory) on iPad. I installed `PDFReaderLite`, still `openWithDefaultApplication` don't rexognizes extension `pdf`. What can I do to make `PDFReaderLite` be a default app for opening pdf?
Thank you in advance
<http://help.adobe.c... | [
-0.16734084486961365,
0.18789440393447876,
0.8248083591461182,
-0.03258482739329338,
-0.19562463462352753,
-0.1770348995923996,
0.43422970175743103,
-0.19767603278160095,
-0.06491110473871231,
-0.8181723356246948,
-0.1780761480331421,
0.7236244082450867,
-0.2691117227077484,
-0.01212532818... | |
I have the following XML structure:
```
<Main>
<Node1>Definite</Node1>
<Node2>Definite</Node2>
<Node3>Definite</Node3>
<Node4>Definite</Node4>
<Node5>Definite</Node5>
<Node6>Definite</Node6>
<A>Possible</A>
<B>Possible</B>
<C>Possible</C>
<D>Possible</D>
<E>Possible</E>
... | [
-0.19863858819007874,
0.05885559320449829,
0.1615867167711258,
-0.03331336751580238,
0.28800851106643677,
0.1507185697555542,
0.048580437898635864,
-0.1257079839706421,
0.5312632322311401,
-0.942800760269165,
-0.1563062071800232,
0.09829312562942505,
-0.023082420229911804,
0.05346305295825... | |
so that it always sits in the position shown below.
```
<Main>
<Node1>Value</Node1>
<Node2>Value</Node2>
<Node3>Value</Node3>
<Node4>Value</Node4>
<Node5>Value</Node5>
<Node6>Value</Node6>
<A>Value</A>
<B>Value</B>
<C>Value</C>
<D>Value</D>
<E>Value</E>
<ZZZ>Value</Z... | [
-0.4380267262458801,
-0.2603977620601654,
0.46479180455207825,
-0.29772254824638367,
0.29092928767204285,
0.04066257178783417,
-0.055280644446611404,
0.13747504353523254,
-0.3415814936161041,
-0.5882570743560791,
-0.3735450208187103,
0.03353319317102432,
0.09532926976680756,
0.147160902619... | |
<Node3>Value</Node3>
<Node4>Value</Node4>
<Node5>Value</Node5>
<Node6>Value</Node6>
<A>Value</A>
<B>Value</B>
<D>Value</D>
<ZZZ>Value</ZZZ>
<F>Value</F>
<G>Value</G>
<I>Value</I>
</Main>
```
Hope this is explained clear enough :)
well it is depending on which elements are r... | [
-0.23721027374267578,
-0.173282191157341,
0.21293677389621735,
-0.296978235244751,
0.19966809451580048,
-0.03640570119023323,
0.07773572206497192,
-0.43170562386512756,
-0.036655642092227936,
-0.5199275016784668,
-0.09341493248939514,
0.2913747727870941,
-0.265865683555603,
-0.030114691704... | |
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="F">
<ZZZ>Value</ZZZ>
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
```
if you can not say, there is a requiered element, you need ... | [
-0.1617256999015808,
0.0798618495464325,
0.3296601176261902,
-0.15418551862239838,
0.18322378396987915,
0.007211060728877783,
0.09939654171466827,
-0.7683503031730652,
-0.20780308544635773,
-0.6737282276153564,
-0.33726945519447327,
0.5806064009666443,
-0.5364668369293213,
-0.0833334475755... | |
</xsl:copy>
</xsl:template>
``` | [
0.2061329036951065,
0.53291255235672,
0.08391319960355759,
0.11640474200248718,
0.039550065994262695,
-0.48593419790267944,
0.08691208064556122,
-0.1893928200006485,
-0.06496312469244003,
-0.5361638069152832,
-0.5610863566398621,
0.2488541305065155,
-0.4479610323905945,
0.26492127776145935... | |
I`m trying to update time in datetime field as
```
UPDATE table_name
SET col_name=to_DATE('04/02/2012 00:12:00','MM/DD/YYYY HH24:MI:SS')
WHERE col_name1='rer';
```
After updating in db,The `output` is like this
`'04/02/2012 12:12:00'`
Extra `12` it's adding in Hour field,
how can I make this not to add ex... | [
0.1454043686389923,
0.22760725021362305,
0.4671596884727478,
-0.20656153559684753,
-0.028635293245315552,
0.05217583850026131,
0.206259086728096,
-0.17981216311454773,
-0.24500694870948792,
-0.6486504673957825,
0.03605923429131508,
0.5581293702125549,
-0.11570928990840912,
0.27833634614944... | |
like
```
SELECT col_name FROM table_name
```
the date is displayed using your session's NLS\_DATE\_FORMAT, which is probably 'MM/DD/YYYY HH:MI:SS'. In this format your date is displayed as '04/02/2012 12:12:00'. If you run following statement in your session
```
ALTER SESSION SET NLS_DATE_FORMAT='MM/DD/YYYY HH24:M... | [
-0.37328284978866577,
0.12311369925737381,
0.7773491144180298,
-0.24400897324085236,
-0.0682409256696701,
-0.11719118803739548,
0.29267457127571106,
0.2714090943336487,
-0.5087061524391174,
-0.8142541646957397,
-0.29886189103126526,
0.4098464548587799,
0.02266249619424343,
0.33891144394874... | |
I have searched this site and Google and even though the idea is pretty simple I can't figure it out.
I need to (like seen on YouTube) calculate the % of up-votes based on the amount up-votes and down-votes.
I have two vars, `$upvotes` and `$downvotes` now i need to calculate `$ratio`
For example
```
$upvotes = 3;
... | [
0.21041123569011688,
0.2919788360595703,
0.8756236433982849,
-0.20818069577217102,
-0.4303753972053528,
0.3552537262439728,
-0.12092713266611099,
-0.5537526607513428,
0.05338893085718155,
-0.3366488218307495,
0.3539411425590515,
0.5946365594863892,
-0.005602468270808458,
-0.259822189807891... | |
= 0;
``` | [
0.017893334850668907,
0.2879457175731659,
0.15869145095348358,
-0.40942636132240295,
0.12689559161663055,
-0.22944188117980957,
0.36584198474884033,
-0.11175939440727234,
0.24734431505203247,
0.1327783465385437,
-0.4488774538040161,
0.6446241140365601,
-0.5081831216812134,
0.27811318635940... | |
I am using Textbox\_Validating event to validate a textbox on one of my window form.
I wanted to validate the textbox, if the text of the texbox changes. So I called the validating event from the textbox\_Texchanged event. But it has a sideffect as soon as I press a key it fires the textchanged event and hence the text... | [
-0.08316134661436081,
0.09914802014827728,
0.7008354663848877,
-0.2765122652053833,
-0.12166685611009598,
-0.020003613084554672,
0.3512628972530365,
-0.3820059895515442,
-0.12407132983207703,
-0.5061041712760925,
-0.22910834848880768,
0.8589824438095093,
-0.335340678691864,
0.1161395385861... | |
txt8Ydere1_Validating(sender,null);
}
```
I would use the LostFocus event for the textbox. You could run your validation from that event.
See the [msdn](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.lostfocus%28v=vs.71%29.aspx) for more info. | [
0.3992414176464081,
0.004967581946402788,
0.3681504726409912,
-0.04979652538895607,
0.10081928968429565,
-0.1435788869857788,
0.4885226786136627,
0.07297693192958832,
-0.1846645176410675,
-0.3433806002140045,
-0.08508307486772537,
0.5574009418487549,
-0.3128868043422699,
0.0703638792037963... | |
I am getting the Resource id #3 error when I am trying to echo out the value of the column counter from the database. I want to get a single value only. Any ideas how can I do that ?
```
$Page = $_SERVER['PHP_SELF'];
$num = preg_replace("/[^0-9]/", '', $Page);
$query = "SELECT * FROM hitscounter WHERE page='$num';";
... | [
0.19868001341819763,
0.16806326806545258,
0.6816039085388184,
-0.2746869921684265,
-0.00022278344840742648,
0.14143231511116028,
0.5645296573638916,
-0.6151450872421265,
-0.3579796254634857,
-0.47800737619400024,
-0.2079671174287796,
0.5528351664543152,
-0.299015611410141,
0.23887671530246... | |
I want to know
How JQuery assign function name to $ ?
This is done at line `9384` of the uncompressed library (see <http://code.jquery.com/jquery-1.7.2.js>)
```
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
```
where `jQuery` on the right side of this assignment is the function-scoped ref... | [
0.12477759271860123,
0.08377567678689957,
0.6182940602302551,
0.23789335787296295,
-0.10964998602867126,
-0.1396888792514801,
0.1285550594329834,
0.4124388098716736,
-0.21248164772987366,
-0.6251446604728699,
-0.044895607978105545,
0.6001851558685303,
-0.3348627984523773,
0.225061342120170... | |
a look at [`jQuery.noConflict()`](http://api.jquery.com/jQuery.noConflict/) method | [
0.2297857403755188,
-0.19089189171791077,
0.1166997030377388,
0.04509946331381798,
-0.009156089276075363,
0.12793715298175812,
0.2280445247888565,
0.06968865543603897,
-0.47603923082351685,
-0.3523181676864624,
-0.043526701629161835,
0.4647619426250458,
0.03995460271835327,
-0.172702625393... | |
I structures like the following
```
typedef struct
{
char *ptr;
size_t used;
size_t size;
} buffer;
typedef struct
{
buffer *request;
buffer *uri;
buffer *orig_uri;
http_method_t http_method;
http_version_t http_version;
buffer *request_line;
/* strings to the header... | [
-0.10881566256284714,
0.03952382132411003,
0.35280466079711914,
-0.21260195970535278,
-0.1261131316423416,
-0.04416617006063461,
0.2251671403646469,
-0.4156363904476166,
0.024708086624741554,
-0.7415441870689392,
-0.19239908456802368,
0.0766156017780304,
-0.3454349935054779,
0.445259928703... | |
const char *http_if_none_match;
array *headers;
/* CONTENT */
size_t content_length; /* returned by strtoul() */
/* internal representation */
int accept_encoding;
/* internal */
buffer *pathinfo;
} request;
```
Now if I want to write(in a text file) the value of the member "htt... | [
-0.04115460067987442,
0.34438619017601013,
0.4099041819572449,
-0.24192871153354645,
-0.021067069843411446,
-0.18412719666957855,
0.3067186176776886,
-0.19302576780319214,
-0.11526551097631454,
-0.7708996534347534,
-0.16064666211605072,
0.49987655878067017,
-0.4235056936740875,
0.208913326... | |
the file
FILE *fp = fopen("myfile.txt");
// print
fprintf(fp, "%s\n", http_host->ptr);
// close the file
fclose(fp);
``` | [
0.1362699568271637,
0.12379748374223709,
0.7669833302497864,
-0.3567237854003906,
0.39837196469306946,
0.08224712312221527,
0.15389786660671234,
0.09341517835855484,
-0.23878490924835205,
-0.5225142240524292,
-0.7063469290733337,
0.5274001955986023,
-0.41878145933151245,
-0.064112439751625... | |
I'm wondering how I would go about the addition and subtraction of numbers in a set range and which would loop back on themselves, example below;
Range: 1 - 10
So if I now had the number 7 and added 5 to it, I would want the number go to 2
8, 9, 10, loop around to 1, 2.
And the same if I subtracted, so I have the n... | [
0.12003697454929352,
0.0719948559999466,
0.06234251707792282,
-0.24966660141944885,
0.17508235573768616,
0.46611490845680237,
0.1829073131084442,
-0.29413098096847534,
-0.26175668835639954,
-0.3394453227519989,
-0.014845279045403004,
0.32085609436035156,
-0.20812663435935974,
0.42671385407... | |
7;
$y = 5;
echo ($x + $y) % $d;
```
gives `2`;
With negative values you can just remove MINUS | [
0.20624205470085144,
0.05030876398086548,
0.22229982912540436,
-0.5522513389587402,
0.3241456151008606,
-0.0007897200994193554,
0.5049425959587097,
-0.08822109550237656,
0.005086992867290974,
0.06164904683828354,
-0.29865381121635437,
0.5650187134742737,
-0.42370495200157166,
0.41029807925... | |
I am executing the following sql in dbvisualizer
```
Select column1,column2,column3 from table group by column3;
```
It is showing the following error:
```
15:47:09 [SELECT - 0 row(s), 0.000 secs] [Error Code: 979, SQL State: 42000] ORA-00979: not a GROUP BY expression
... 1 statement(s) executed, 0 row(s) affe... | [
-0.19498568773269653,
0.2849556803703308,
0.3378971815109253,
-0.3838537633419037,
-0.09788691997528076,
0.12648934125900269,
0.733643114566803,
-0.5593041777610779,
0.016615210101008415,
-0.4318726658821106,
-0.010082217864692211,
0.3765908479690552,
-0.31857964396476746,
0.29014435410499... | |
$y) % $d;
```
gives `2`;
With negative values you can just remove MINUS | [
0.2933869957923889,
0.11274473369121552,
0.13693459331989288,
-0.3053499758243561,
0.1866307556629181,
0.07684988528490067,
0.4429260790348053,
-0.041925765573978424,
0.19555950164794922,
-0.16633090376853943,
-0.2863224148750305,
0.6035260558128357,
-0.5549761652946472,
0.3980984687805176... | |
In my Google App Engine based app, I am fetching data from a SOAP webservice.
The problem is that one of the tag contains binary 64 encoded data. I decode it using
```
decodedStr = base64.b64decode(str(content))
```
It seems that the decoding is not done correctly a I get garbage data in decodeStr. I think the prob... | [
-0.001195836579427123,
0.33808544278144836,
0.3330357074737549,
-0.11913421005010605,
-0.3003201484680176,
0.02947095036506653,
0.6548511385917664,
-0.33230772614479065,
-0.07115336507558823,
-0.6769529581069946,
-0.12729549407958984,
0.7758553624153137,
-0.5285027027130127,
-0.02985418587... | |
tell the receiving end that the end of the serialized string has been reached by passing it a special character. There are a million cases that can screw you over with this:
What if your struct contains a byte that is equal to that special character. Escape it with another special character. What if your struct conta... | [
-0.10850898176431656,
-0.11597095429897308,
0.22924108803272247,
0.4479113519191742,
-0.23733948171138763,
0.1414579302072525,
0.4532078802585602,
-0.05453319847583771,
-0.30199024081230164,
-0.16281186044216156,
0.027472184970974922,
0.46921271085739136,
-0.4133407771587372,
0.14758680760... | |
and then anyone who takes a look at the code later will spend two hours trying to figure out what's going on.
**(tl;dr) Instead...** just make the first 32 bits of the serialized string equal to the number of bytes in the string. This only costs 4 bytes per serialization, solves all your problems, you won't have to wr... | [
0.5562409162521362,
0.13936340808868408,
0.16470114886760712,
0.5257396697998047,
-0.2567313015460968,
0.060137707740068436,
0.46623075008392334,
0.18459172546863556,
-0.1907026618719101,
-0.6952804923057556,
0.0593767911195755,
0.608886182308197,
-0.20787128806114197,
-0.05853636935353279... | |
for every string:
struct s\_str
{
bool is\_null;
int size;
char\* str;
};
If it's null, simply set is\_null to true and you don't really have to worry about the other two.
If it's size zero, set is\_null to false and size to zero.
If str contains just a '\0', set is\_null to false, size to one, and str[0] to '\0'
... | [
-0.0839586853981018,
-0.1599714159965515,
0.18954414129257202,
-0.1322687715291977,
-0.2374437302350998,
-0.07605862617492676,
0.43741053342819214,
0.05418582633137703,
-0.3015509843826294,
-0.596836507320404,
-0.21190813183784485,
0.37109890580177307,
-0.2697123885154724,
-0.1510757952928... | |
I'm working with nested JSON-like data structures in python 2.7 that I exchange with some foreign perl code. I just want to 'work with' these nested structures of lists and dictionaries in amore pythonic way.
So if I have a structure like this...
```
a = {
'x': 4,
'y': [2, 3, { 'a': 55, 'b': 66 }],
}
```
..... | [
0.2830636203289032,
0.3828986883163452,
0.061331238597631454,
-0.29816392064094543,
-0.1554899662733078,
-0.09919147938489914,
0.2900737226009369,
-0.1344238519668579,
-0.048274584114551544,
-0.5277280807495117,
-0.1354411542415619,
0.5220098495483398,
-0.5684139728546143,
-0.1595954298973... | |
'x': 4,
'y': [2, 3, { 'a': 55, 'b': 66 }],
'z': 99
}
>>> aa.y[2].b = 999
>>> print a
{
'x': 4,
'y': [2, 3, { 'a': 55, 'b': 999 }],
'z': 99
}
```
Thus aa is a proxy into the original structure. This is what I came up with so far, inspired by the excellent [What is a metaclass in Python?](https://... | [
-0.17928363382816315,
0.27043572068214417,
0.12200283259153366,
-0.27672436833381653,
-0.29724234342575073,
0.32648563385009766,
0.3931492567062378,
-0.3098422586917877,
0.015838850289583206,
-0.35293471813201904,
-0.2338140457868576,
0.5308070182800293,
-0.4062248170375824,
-0.24441500008... | |
>>> a = { 'x':[5,8], 'y':5}
>>> aa = j2p(a)
>>> aa.y=7
>>> print a
{'x': [5, 8], 'y':7}
>>> aa.x[1]=99
>>> print a
{'x': [5, 99], 'y':7}
>>> aa.x[0] = {'g':5, 'h':9}
>>> print a
{'x': [ {'g':5, 'h':9} , 99], 'y':7}
>>> print aa.x[0].g
5
"""
if isinstance(x, list)... | [
-0.12207914143800735,
0.12305234372615814,
0.40777337551116943,
-0.12744741141796112,
-0.0996008813381195,
0.3266456127166748,
0.36809781193733215,
-0.7259024977684021,
-0.11203542351722717,
-0.4214537739753723,
-0.3322707414627075,
0.645844578742981,
-0.574001133441925,
-0.271330744028091... | |
return _list_proxy(x)
elif isinstance(x, dict):
return _dict_proxy(x)
else:
return x
class _list_proxy(object):
def __init__(self, proxied_list):
object.__setattr__(self, 'data', proxied_list)
def __getitem__(self, a):
return j2p(object.__getattribute__(self, 'data').__g... | [
-0.26715725660324097,
-0.08391783386468887,
0.500351071357727,
-0.25859469175338745,
-0.3292061984539032,
0.406737357378006,
0.24665306508541107,
-0.47165459394454956,
-0.1886218786239624,
-0.6187242269515991,
-0.2517959773540497,
0.46825289726257324,
-0.32823383808135986,
-0.0985160693526... | |
def __getattribute__(self, a):
return j2p(object.__getattribute__(self, 'data').__getitem__(a))
def __setattr__(self, a, v):
return object.__getattribute__(self, 'data').__setitem__(a, v)
def p2j(x):
"""p2j gives back the underlying json-ic json-ic nested
dictionary/list structure of an obj... | [
-0.08068011701107025,
0.10931186378002167,
0.42592543363571167,
-0.1242833361029625,
-0.21190831065177917,
0.0867675170302391,
0.36405855417251587,
-0.47175124287605286,
-0.21498192846775055,
-0.5037307143211365,
-0.469950407743454,
0.6482686400413513,
-0.28404760360717773,
-0.265384197235... | |
an elegant way of mapping a whole set of the `__*__` special functions, like `__iter__`, `__delitem__`? so I don't need to unwrap things using `p2j()` just to iterate or do other pythonic stuff.
```
# today:
for i in p2j(aa.y):
print i
# would like to...
for i in aa.y:
print i
```
There is [an attrdict libr... | [
-0.20185063779354095,
0.012622795067727566,
0.19426022469997406,
0.09253531694412231,
-0.32104116678237915,
-0.053550802171230316,
0.36287936568260193,
-0.20417386293411255,
-0.3606252074241638,
-0.397373229265213,
-0.20171432197093964,
0.523736834526062,
-0.28773003816604614,
-0.166098862... | |
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
j = '{"y": [2, 3, {"a": 55, "b": 66}], "x": 4}'
aa = json.loads(j, object_hook=AttrDict)
``` | [
-0.09421050548553467,
0.055073920637369156,
0.5029638409614563,
-0.2645514905452728,
-0.21524788439273834,
0.2637694776058197,
0.711169958114624,
-0.348792165517807,
-0.47310853004455566,
-0.34969186782836914,
-0.20254354178905487,
0.573331892490387,
-0.45511430501937866,
0.160051077604293... | |
Generally I keep directory specific settings in `.bashrc` and whenever I change directory execute the command `source .bashrc` to make those settings effective.
Now I was thinking of manipulating cd command in `~/.bashrc`, so whenever I cd to new directory and if any .bashrc exists there, it will be loaded automati... | [
0.20320361852645874,
-0.09644626826047897,
0.2764177918434143,
-0.05621456354856491,
-0.22701698541641235,
-0.5204550623893738,
0.4337659478187561,
-0.18699273467063904,
-0.06144159659743309,
-0.63515305519104,
-0.07064521312713623,
0.9417386054992676,
-0.27229824662208557,
0.0810874551534... | |
we have of other commands viz scp or others). So how can I achieve this ?
Also if `shopt -s cdspell` is supported then also I need to have cd spelled path in argument of $1.
You want the "builtin" command;
> builtin shell-builtin [arguments]
>
>
> Execute the specified shell builtin,
> passing it arguments, and re... | [
0.311297208070755,
-0.04267997667193413,
0.44167375564575195,
-0.17238427698612213,
-0.034698400646448135,
-0.4068050980567932,
0.26019108295440674,
-0.18502548336982727,
0.034394681453704834,
-0.7165828347206116,
-0.23675546050071716,
0.9987545609474182,
-0.3412949740886688,
0.05675908923... | |
if
> shell-builtin is not a shell builtin command.
From: <http://linux.die.net/man/1/bash>
So, you could have something like (untested, don't have a bash handy either);
```
function cd() {
builtin cd $1 \
&& test -e .bashrc \
&& source .bashrc
}
``` | [
0.4372546374797821,
-0.02837676741182804,
0.12841148674488068,
-0.21573854982852936,
0.10316722095012665,
-0.5491518974304199,
0.07021452486515045,
-0.1948520988225937,
-0.032442670315504074,
-0.5838550925254822,
-0.4156859517097473,
0.8043068051338196,
-0.3284984529018402,
-0.034558314830... | |
I hope anyone can help me out in this topic, even if it's not a specific programming question.
I'm writing a bachelor thesis, where I compare MySQL to MongoDB and I want to write something about Youtube, as the platform has to handle many requests with heavy dataload.
The only good resource which I found was this video... | [
0.609929084777832,
0.10041434317827225,
0.478751540184021,
0.26796308159828186,
0.040343742817640305,
-0.4349798262119293,
0.047650597989559174,
0.294869601726532,
-0.5036294460296631,
-0.38585394620895386,
0.5461609959602356,
0.43242472410202026,
0.23065504431724548,
0.2889462113380432,
... | |
MySQL. Are there any changes since then?
Where are the videos stored? Is there an entry in the MySQL table, which refers to the stored video?
Thanks in advance for the answer!
According to this, youtube still uses mysql: <http://code.google.com/p/vitess/wiki/ProjectGoals> | [
0.6031183004379272,
-0.36775127053260803,
0.5536983609199524,
0.23070022463798523,
-0.020649723708629608,
-0.121799036860466,
0.13003495335578918,
0.4483067989349365,
-0.7577217817306519,
-0.3682045340538025,
-0.14265967905521393,
0.24893565475940704,
-0.22961761057376862,
0.36310899257659... | |
I am using Gallery like this
```
<Gallery
android:id="@+id/gallery1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:spacing="2dp" >
</Gallery>
```
but when I am running the code I am finding gallery starting from middle and I wan... | [
0.20987717807292938,
0.09685802459716797,
0.790432870388031,
-0.2579669654369354,
-0.11463921517133713,
0.26663729548454285,
0.14782656729221344,
-0.43726465106010437,
-0.3413902819156647,
-0.8393881916999817,
-0.10746549814939499,
0.7024757862091064,
-0.34618350863456726,
-0.0872668102383... | |
My project needs to inspect .c and .dll files. it combines those informations to determine what it is supposed to call and then calls that.
I need to inspect the dlls to find which dll has which function. I have gotten so far as to map the dll to memory without initialising it. now i need to map the header to somethin... | [
0.16068235039710999,
-0.005645029712468386,
0.5036597847938538,
-0.08626976609230042,
-0.0391436330974102,
-0.13291408121585846,
0.002311088377609849,
-0.09392959624528885,
-0.21260662376880646,
-0.6346070170402527,
-0.1414055973291397,
0.7642244100570679,
-0.4733645021915436,
0.2267946600... | |
dwFlags);
public static string[] GetFKTNames(string dll)
{
IntPtr lib = LoadLibraryEx(dll, IntPtr.Zero, LoadLibraryFlags.DONT_RESOLVE_DLL_REFERENCES);
//INDICATES WHAT I WANT TO DO, BUT DOES NOT WORk
//Header header = GetHeader(lib);
//Unload(lib);
//return header.Names... | [
0.6779083609580994,
0.06353786587715149,
0.6523796916007996,
-0.1118331104516983,
0.09464031457901001,
-0.22110584378242493,
0.7423446774482727,
-0.14863677322864532,
-0.3740715980529785,
-0.4782359004020691,
-0.4276462197303772,
0.2963661551475525,
-0.22018693387508392,
0.2006731033325195... | |
is correct - i had no way to test it. I would love to read a book on that topic - so please comment if you know a good book that explains how that headerstuff works and what different headers are out there.
```
private static List<string> ListDLLFunctions(string sADllName)
{
List<string> names = new Li... | [
-0.019459843635559082,
0.0973416417837143,
0.6097446084022522,
-0.2039269059896469,
0.05341494455933571,
-0.09307947009801865,
0.26489967107772827,
-0.2515236735343933,
-0.27086973190307617,
-0.5490962266921997,
-0.3749711215496063,
0.7707184553146362,
-0.3813915252685547,
0.22692167758941... | |
// ImageExportDirectory = (_IMAGE_EXPORT_DIRECTORY*)
// ImageDirectoryEntryToData(LoadedImage.MappedAddress,
// false, IMAGE_DIRECTORY_ENTRY_EXPORT, &cDirSize);
// if (ImageExportDirectory != NULL)
// {
// dNameRVAs = (DWORD *)ImageRvaToVa(LoadedImag... | [
0.2244977504014969,
-0.27260899543762207,
0.45395374298095703,
-0.23005202412605286,
0.013691852800548077,
0.23468180000782013,
0.4186842739582062,
-0.5296338796615601,
-0.0831056460738182,
-0.4204659163951874,
-0.18475979566574097,
0.8189136981964111,
-0.45736560225486755,
0.1144072338938... | |
LoadedImage.MappedAddress,
// ImageExportDirectory->AddressOfNames, NULL);
// for(size_t i = 0; i < ImageExportDirectory->NumberOfNames; i++)
// {
// sName = (char *)ImageRvaToVa(LoadedImage.FileHeader,
// | [
0.18706358969211578,
-0.25955089926719666,
0.6269716024398804,
-0.14243534207344055,
-0.16746895015239716,
0.36191123723983765,
0.4270114302635193,
-0.46603986620903015,
-0.3815732002258301,
-0.5546355843544006,
-0.0669880360364914,
0.6069427132606506,
-0.4323621690273285,
0.08452651649713... | |
LoadedImage.MappedAddress,
// dNameRVAs[i], NULL);
// slListOfDllFunctions.push_back(sName);
// }
// }
FreeLibrary(LoadedImage); | [
-0.13497595489025116,
-0.4740602672100067,
0.2380146086215973,
-0.25277411937713623,
0.0285051092505455,
-0.19450466334819794,
0.24547536671161652,
-0.2134910225868225,
-0.24265190958976746,
-0.32086268067359924,
-0.2611023783683777,
0.465643972158432,
-0.7734975218772888,
0.10997322946786... | |
return names;
}
static void Main(string[] args)
{
List<string> names = ListDLLFunctions("KERNEL32.DLL");
}
```
I solved the problem for my usecase:
I load the lib into momory, copy it into a bytearray and then investigate it using PE information.
There are a couple of useful ressources for t... | [
-0.02188359573483467,
0.39220911264419556,
0.14708450436592102,
-0.0415705144405365,
-0.18543316423892975,
0.10337557643651962,
0.3234497308731079,
-0.21903438866138458,
-0.0122486911714077,
-0.5620866417884827,
-0.30706214904785156,
0.5314728021621704,
-0.11562205851078033,
0.141437947750... | |
format](http://www.simple-talk.com/community/blogs/simonc/archive/2011/03/15/100802.aspx)
* [joachim bauch article on loading dll](http://www.joachim-bauch.de/tutorials/loading-a-dll-from-memory/)
In retrospec i get how i could have used the other approaches to get my information. The Class that i have written is grea... | [
-0.11107326298952103,
0.1588311642408371,
0.27784696221351624,
-0.06921859085559845,
-0.41329634189605713,
0.11383252590894699,
0.012850306928157806,
-0.3488934636116028,
-0.011904965154826641,
-0.6695873141288757,
-0.3998681604862213,
0.6493712067604065,
-0.003201488172635436,
0.167668864... | |
static public extern bool FreeLibrary(IntPtr hModule);
public enum LoadLibraryFlags : uint
{
DONT_RESOLVE_DLL_REFERENCES = 0x00000001,
LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x00000010,
LOAD_LIBRARY_AS_DATAFILE = 0x00000002,
LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x00000040,
LOAD_... | [
-0.18496975302696228,
-0.21872293949127197,
0.6300951838493347,
-0.07032015174627304,
0.00328127876855433,
0.17885971069335938,
0.21016310155391693,
-0.18180325627326965,
-0.11624058336019516,
-0.42017555236816406,
-0.337541401386261,
0.6139876842498779,
-0.70758455991745,
0.23640738427639... | |
= GetDllSizeInMemory(dllpath);
dllInMemory = GetDLLCopy(dllpath, PESizeOfImage);
UInt32 VA_p_PE = 0x3C;
VA_PE = Get4ByteFromLocation(VA_p_PE, dllInMemory);
}
private byte[] GetDLLCopy(string dllpath, uint PESizeOfImage)
{
IntPtr libPtr = LoadLibraryEx(dllpath, IntPtr.Zero, L... | [
-0.18534456193447113,
-0.1282639503479004,
0.6336950063705444,
-0.19539788365364075,
0.08074790984392166,
0.11351539939641953,
0.2958882749080658,
-0.5380299091339111,
-0.12635581195354462,
-0.5280432105064392,
-0.6392136216163635,
0.746907651424408,
-0.25334450602531433,
0.171339333057403... | |
return dllInMemory;
}
private UInt32 GetDllSizeInMemory(string dllpath)
{
byte[] dllpreload = File.ReadAllBytes(dllpath);
UInt32 pp_PE = 0x3C;
UInt32 p_PE = Get4ByteFromLocation(pp_PE, dllpreload);
UInt32 p_PEOPTIONALHEADER = p_PE + 0x18;
UInt32 p_PESizeOfImage = p_P... | [
-0.23083466291427612,
-0.2204347550868988,
0.4517343044281006,
-0.0833049863576889,
0.07248738408088684,
0.33313190937042236,
0.1368636041879654,
-0.230173259973526,
0.014664022251963615,
-0.3827040195465088,
-0.53565514087677,
0.6782718300819397,
-0.18084414303302765,
-0.0745711624622345,... | |
filename)
{
File.WriteAllBytes(filename, dllInMemory);
}
public string GetDLLName()
{
UInt32 VAExport = GetVAExport(VA_PE, dllInMemory);
UInt32 VAName = GetVAName(VAExport, dllInMemory);
String Name = GetString(VAName, dllInMemory);
return Name;
}
public... | [
-0.06843931972980499,
-0.2949692904949188,
0.8259447813034058,
-0.3487006425857544,
0.06363268941640854,
0.3071661591529846,
0.5377947092056274,
-0.6090642213821411,
-0.1860765963792801,
-0.7500929236412048,
-0.6653279066085815,
0.4416755735874176,
-0.19429893791675568,
0.609148383140564,
... | |
UInt32 VAExport = GetVAExport(VA_PE, dllInMemory);
UInt32 VA_p_firstFKT = GetVA_p_firstFKT(VAExport, dllInMemory);
UInt32 VA_p_lastFKT = GetVA_p_lastFKT(VAExport, dllInMemory);
for (UInt32 VA_p_fkt = VA_p_firstFKT; VA_p_fkt <= VA_p_lastFKT; VA_p_fkt += sizeof(UInt32))
{
UInt3... | [
-0.6322973370552063,
-0.49583712220191956,
0.8659048676490784,
-0.29918596148490906,
-0.15656717121601105,
0.24438586831092834,
0.41902685165405273,
-0.613306999206543,
-0.33005180954933167,
-0.6693669557571411,
-0.6435645222663879,
0.4690687954425812,
-0.28874537348747253,
-0.093214266002... | |
return fkts;
}
private UInt32 GetVA_p_lastFKT(UInt32 VAExport, byte[] dllInMemory)
{
UInt32 first = GetVA_p_firstFKT(VAExport, dllInMemory);
UInt32 count = GetfktCount(VAExport, dllInMemory);
UInt32 last = first + (count - 1) * sizeof(UInt32);
return last;
}
private... | [
-0.50227952003479,
-0.41120195388793945,
0.7212051749229431,
-0.30302903056144714,
-0.21349835395812988,
0.2815278172492981,
0.23149614036083221,
-0.5289826989173889,
-0.4781310558319092,
-0.3994497060775757,
-0.39447829127311707,
0.24609245359897614,
-0.20547764003276825,
0.08906215429306... | |
= 0x14;
UInt32 VA_Count = VAExport + RVA_Count;
return Get4ByteFromLocation(VA_Count, dllInMemory);
}
private UInt32 GetVA_p_firstFKT(UInt32 VAExport, byte[] dllInMemory)
{
UInt32 RVA_p_FIRST = 0x20;
UInt32 VA_p_FIRST = VAExport + RVA_p_FIRST;
return Get4ByteFromLoca... | [
-0.2767139971256256,
-0.550075888633728,
0.7094036936759949,
-0.17959389090538025,
-0.09557781368494034,
0.2147890329360962,
0.15766756236553192,
-0.4603033661842346,
-0.4257829487323761,
-0.6739730834960938,
-0.6894647479057312,
0.6595502495765686,
-0.226174458861351,
0.038812875747680664... | |
UInt32 RVA_p_NAME = 0x0C;
UInt32 VA_p_NAME = VAExport + RVA_p_NAME;
return Get4ByteFromLocation(VA_p_NAME, dllInMemory);
}
private UInt32 GetVAExport(UInt32 VAPE, byte[] dllInMemory)
{
UInt32 RVA_p_EXPORT = 0x78;
UInt32 VA_p_EXPORT = VAPE + RVA_p_EXPORT;
return Get4B... | [
-0.44078248739242554,
-0.0637340247631073,
0.8539212346076965,
-0.1523357331752777,
0.15191631019115448,
0.3664185106754303,
0.3001142144203186,
-0.41017770767211914,
-0.3565788269042969,
-0.32314175367355347,
-0.8728503584861755,
0.6142891645431519,
-0.28816884756088257,
0.180932655930519... | |
int length = 0;
while (dll[location + length] != 0x00)
{
length++;
}
if (location > int.MaxValue) throw new Exception("uncastable");
return Encoding.UTF8.GetString(dll, (int)location, length);
}
private UInt32 Get4ByteFromLocation(UInt32 location, byte[] dll)
... | [
-0.06063544750213623,
-0.4137362241744995,
0.31411799788475037,
-0.17345279455184937,
0.3617996871471405,
-0.04308423027396202,
0.31290295720100403,
-0.3375553786754608,
-0.20217226445674896,
-0.5099727511405945,
-0.49279487133026123,
0.3810823857784271,
-0.3317200541496277,
0.260454118251... | |
byte[] partial = GetByteSubset(4, location, dll);
Array.Reverse(partial);
return BitConverter.ToUInt32(partial, 0);
}
return BitConverter.ToUInt32(dll, (int)location);
}
private byte[] GetByteSubset(int size, UInt32 location, byte[] dll)
{
byte[] val = new byte[size]... | [
-0.35155901312828064,
-0.34387773275375366,
0.624317467212677,
-0.3696006238460541,
0.04766200855374336,
0.5262399911880493,
0.2342558354139328,
-0.30419406294822693,
-0.3273679316043854,
-0.587321937084198,
-0.6574108004570007,
0.669824481010437,
-0.2506706714630127,
0.2500152587890625,
... | |
{
val[i] = dll[location + i];
}
return val;
}
}
``` | [
-0.07973127067089081,
-0.2990141212940216,
0.43628907203674316,
-0.1086951270699501,
0.24940526485443115,
-0.2977355718612671,
0.18219634890556335,
0.08177801221609116,
-0.045777712017297745,
-0.5813214182853699,
-0.6421177387237549,
0.7412384748458862,
-0.08553333580493927,
0.541693866252... | |
Ok so i update to eclipse adt to version 17 and I get this error
```
04-05 12:28:55.810: E/AndroidRuntime(5470): FATAL EXCEPTION: main
04-05 12:28:55.810: E/AndroidRuntime(5470): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.galeola.agentis/com.galeola.agentis.activity.GestionaleActivity... | [
-0.4959928095340729,
0.22859875857830048,
0.7284360527992249,
-0.17642895877361298,
-0.056609705090522766,
0.10532494634389877,
0.766838788986206,
-0.5674950480461121,
-0.33184072375297546,
-0.4270298182964325,
-0.2969134747982025,
0.5438159704208374,
-0.48684054613113403,
-0.0787085220217... | |
at java.lang.reflect.Method.invoke(Method.java:491)
04-05 12:28:55.810: E/AndroidRuntime(5470): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
04-05 12:28:55.810: E/AndroidRuntime(5470): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
04-05 12:28:55.810: E/And... | [
-0.5097867250442505,
0.09687166661024094,
0.6152197122573853,
-0.42494669556617737,
0.008593822829425335,
0.22231154143810272,
0.9400564432144165,
-0.628203272819519,
-0.4388827383518219,
-0.6712798476219177,
-0.367257684469223,
0.5964784026145935,
-0.2799823582172394,
0.006551672704517841... | |
applications, but with the libraries in /libs javadoc and javasources stops working, while if they are not in /libs javadoc and javasource works, so I don't understand why.
Ok so this is the bug and the solution is comment #8 <http://code.google.com/p/android/issues/detail?id=27490#c8> | [
-0.07135511934757233,
0.3110322952270508,
0.4850553274154663,
0.1018422544002533,
0.37737488746643066,
0.0264919251203537,
0.18497706949710846,
0.18610917031764984,
-0.3832789957523346,
-0.6156443357467651,
-0.28611674904823303,
0.5147790908813477,
-0.7601781487464905,
-0.13018742203712463... | |
I'm trying to create a crossword app. The game runs in a UIScrollView, because the player should be able to zoom, scroll etc. The largest crossword are 21x21 which means there need to be 441 touchable tiles. What i've tried so far were to create an UIView and added it as a subView to the UIScrollView. Then I call a met... | [
0.20384323596954346,
-0.08977411687374115,
0.3627210557460785,
0.22888286411762238,
-0.12240476906299591,
0.1049690917134285,
0.13385893404483795,
-0.20397265255451202,
-0.20991651713848114,
-0.9024282097816467,
0.04446480795741081,
0.41141435503959656,
-0.08013992011547089,
-0.02999525330... | |
works as it should, but when i test it on an iPhone 4 the UIScrollView lags a lot.
I don't know if this the way to do it? Can you maybe try to guide me in the right direction of how to do this so the UIScrollView won't lag on a device.
Thanks in advance.
Big `UIScrollView`s are difficult to make smooth without some s... | [
0.2070118486881256,
-0.08212012052536011,
0.5755160450935364,
0.22370073199272156,
0.0559113584458828,
-0.08059672266244888,
0.31162577867507935,
0.33141323924064636,
-0.3474830090999603,
-0.7622784376144409,
0.2176152765750885,
0.8051613569259644,
0.077512726187706,
-0.14003655314445496,
... | |
transparent you should make it the same color as its underlying view. This is something that does help.
Also, I have experienced better performance using `imageWithContentsOfFile:` in stead of `imageNamed:` for initializing images to be used in a `UIScrollView`. | [
0.23003558814525604,
-0.2674534022808075,
0.4466628134250641,
0.3322882652282715,
-0.33559513092041016,
-0.23590104281902313,
0.12491390854120255,
0.11912941932678223,
-0.06671090424060822,
-0.9209462404251099,
0.0589187853038311,
0.6954991221427917,
0.14969076216220856,
-0.069727584719657... | |
I have an image div like this
```
<div class="bgCover"> </div>
<div class="overlayBox" style="position: fixed; background-image: url(../images/header.jpg)" >
<div class="overlayContent">
<a href="javascript:void()" class="closeLink">Close</a>
</div>
</div>
```
I am using jQuery to open the ... | [
0.2554813623428345,
-0.032038360834121704,
0.7320008873939514,
-0.33283713459968567,
-0.15073682367801666,
-0.1979718804359436,
0.2611692547798157,
-0.3147972822189331,
0.17996105551719666,
-0.8333418965339661,
-0.32204604148864746,
0.358501672744751,
-0.325351744890213,
0.1454481482505798... | |
// IE in standards mode
return d.scrollTop;
}
// IE in quirks mode
return document.body.scrollTop;
} //end of getScrollTop()
function doOverlayOpen() {
...
showOverlayBox();
}
function showOverlayBox() {
var scroll = getScrollTop();
var top;
if (scroll <= 28) {
top ... | [
0.09037620574235916,
-0.15663321316242218,
1.108002781867981,
-0.2675904929637909,
0.011622525751590729,
-0.19455736875534058,
0.343570351600647,
-0.5610011219978333,
0.2416570633649826,
-0.3431629240512848,
-0.4330318570137024,
0.985326886177063,
-0.11877024918794632,
-0.06916423887014389... | |
top = (scroll + 2) ;
}
// set the properties of the overlay box, the left and top positions
$('.overlayBox').css({
display:'block',
position:'absolute',
left:( $(window).width() - $('.overlayBox').width() )/2,
top:top
});
// set the window background for... | [
0.015714477747678757,
-0.0681491270661354,
0.889374852180481,
-0.1699724644422531,
0.2615313231945038,
0.3176128566265106,
0.11020002514123917,
-0.36794313788414,
-0.0750117227435112,
-0.7263744473457336,
-0.22170954942703247,
0.4138491153717041,
-0.12220447510480881,
0.1180998831987381,
... | |
display:'block',
width: $(window).width(),
height:$(window).height()
});
}
```
This open the box with respect to the scroll bar. But the problem is once the overlayBox is open, and then i move the scroll bar, then this div remain at it's position. I want that if user move the scroll bar then this... | [
-0.17616228759288788,
0.18386071920394897,
0.8984649181365967,
-0.2911185622215271,
0.017652304843068123,
0.12349802255630493,
0.11009301990270615,
-0.20540669560432434,
-0.09770535677671432,
-0.7653264999389648,
-0.18621905148029327,
0.5456051826477051,
-0.21552029252052307,
0.19966790080... | |
function that checks if scrollbar moves then move the div accordingly. Do i need delegation here or... How can i do it?
Here are the images, in image 2 you can see, if i move the scrollbar then my image div don't move

![enter image description here]... | [
-0.10445401817560196,
-0.10491985827684402,
0.6558240056037903,
-0.21826030313968658,
-0.15133965015411377,
0.11618602275848389,
0.23448970913887024,
-0.42617735266685486,
0.020005250349640846,
-0.7031341195106506,
-0.06320007890462875,
0.7329802513122559,
-0.2170392870903015,
-0.225478723... | |
position:'fixed',
left:( $(window).width() - $('.overlayBox').width() )/2,
top:top
});
// set the window background for the overlay. i.e the body becomes darker
$('.bgCover').css({
display:'block',
width: $(window).width(),
height:$(window).height()
... | [
0.11353757977485657,
-0.21470893919467926,
1.0709141492843628,
-0.2361055314540863,
0.44950512051582336,
0.09475801885128021,
0.07624021172523499,
-0.09372603893280029,
-0.3772412836551666,
-0.7016123533248901,
-0.2867771089076996,
0.4575209617614746,
-0.15571752190589905,
0.17850781977176... | |
We have a Grails web application, running in tomcat7 behind Apache2. Everything works fine by using ProxyPass with the ajp protocol:
```
ProxyPass / ajp://localhost:9013/
ProxyPassreverse / ajp://localhost:9013/
```
where 9013 is our AJP port in tomcat's `server.xml`.
Now, our problem is this however. Our ... | [
-0.23186194896697998,
0.02088693529367447,
0.714542031288147,
0.1604733169078827,
-0.2728687524795532,
-0.000985221122391522,
0.5008691549301147,
-0.04629148542881012,
-0.22532199323177338,
-0.1379214972257614,
0.04803447797894478,
0.2308800220489502,
-0.14227186143398285,
0.09837840497493... | |
gives the *"Firefox has detected that the server is redirecting the request for this address in a way that will never complete."* error.
Am I correct in assuming that some redirecting with the AJP proxy is going bad? Can anyone provide some more information regarding how this setup will work?
---
On looking further,... | [
0.10965041816234589,
0.066971056163311,
0.6769707202911377,
0.11387208849191666,
0.02525106817483902,
-0.1861400157213211,
0.7549464106559753,
-0.16861100494861603,
-0.37733808159828186,
-0.4030693769454956,
-0.25894904136657715,
0.5420792698860168,
-0.18926391005516052,
-0.114397540688514... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.