text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Setup Project to your solution and having Visual Studio build an install package might be faster.
How to create a Setup project for a Windows Service in Visual Basic .NET or in Visual Basic 2005
(VB) <http://support.microsoft.com/kb/317421>
(C#) <http://support.microsoft.com/kb/816169> | [
0.9031020998954773,
-0.14368213713169098,
-0.06686616688966751,
0.04705679044127464,
-0.07437887042760849,
-0.17106656730175018,
0.1382826417684555,
-0.1757795363664627,
-0.2667364180088043,
-0.7280815839767456,
-0.2214653491973877,
0.5569644570350647,
-0.11117782443761826,
-0.437670141458... | |
Delphi components have `CreateWnd` and `CreateWindowHandle` (and `DestroyWnd` and `DestroyWindowHandle`). They're both intended to be overridden by descendants, right? And not intended to be called except by the underlying VCL implementation?
What's the difference between them; when should either of them be overridden... | [
0.2519955039024353,
-0.06231794133782387,
0.26443010568618774,
0.03723669797182083,
-0.00019528964185155928,
-0.29082807898521423,
0.01822751760482788,
0.12864360213279724,
-0.09275384992361069,
-0.49596282839775085,
-0.31581681966781616,
0.3575161099433899,
0.0393078438937664,
0.243538111... | |
you really need to do is to override CreateParams(). If all you want to do is to subclass (remember Windows style "subclassing?" See Petzold's seminal work on Windows programming) an existing control class and wrap it up in a VCL control, you do this from CreateParams. You can also control what style bits are set and o... | [
0.3561922013759613,
-0.2563205361366272,
0.01959420181810856,
0.22596023976802826,
-0.04190727323293686,
-0.47589311003685,
0.2064209282398224,
-0.11445439606904984,
-0.22628292441368103,
-0.6360639929771423,
-0.04715482518076897,
0.42527279257774353,
-0.34926173090934753,
0.32690787315368... | |
bit more with the window handle once it is created. For instance, if you have a control that is some kind of list, tree, or otherwise requires post-creation configuration, you'd do that here. Call the inherited CreateWnd, and when it returns (you know you have a valid handle if you return from CreateWnd because it will... | [
0.7793285846710205,
-0.8874161839485168,
0.26224225759506226,
0.31906336545944214,
-0.26646748185157776,
-0.352890282869339,
0.2728675305843353,
-0.38421574234962463,
-0.49926748871803284,
-0.4885288178920746,
-0.07088913023471832,
0.5753423571586609,
-0.03864329680800438,
0.29993724822998... | |
this.
**CreateWindowHandle();**
I had to go refresh my memory on this one, but it seems this is one is rarely, if ever, overridden. In the few cases inside VCL itself, it appears that it is used to work around specific Windows version and locale oddities with some controls, such as the TEdit and TMemo. The other more... | [
0.4540731608867645,
-0.18263305723667145,
0.30503910779953003,
0.16350635886192322,
0.013583440333604813,
-0.2162405401468277,
0.10886040329933167,
0.17231620848178864,
-0.18774941563606262,
-0.7298760414123535,
-0.03600450977683067,
0.21085508167743683,
-0.1734226793050766,
0.481958687305... | |
actually create the handle. So the only reason to overide this method is if the actual process of creating the handle is done via a means completely different than the old tried-and-true CreateWindowEx().
I did notice that your question was merely asking about the creation process, but there are corresponding methods ... | [
1.1751863956451416,
0.13842912018299103,
-0.05713268741965294,
0.539794385433197,
-0.2317553162574768,
-0.11103688925504684,
0.30272597074508667,
-0.03898935765028,
-0.11056829988956451,
-0.2770094871520996,
0.3848818242549896,
0.40468382835388184,
0.05511803925037384,
0.26574641466140747,... | |
I am looking at creating a small class generator for a project. I have been reading about CodeDOM so it the semantics of creating the classes does not appear to be an issue, but am unsure oh how to best integrate the generation into the development and deployment process.
1. How should I trigger the creation of the cl... | [
0.5395858287811279,
-0.3753889799118042,
-0.25110650062561035,
0.23672372102737427,
-0.06004418805241585,
-0.1648692488670349,
0.10780194401741028,
-0.11292342096567154,
-0.08996386080980301,
-0.6757632493972778,
0.16080857813358307,
0.5278692245483398,
-0.11089370399713516,
0.003191259689... | |
worry about this and just generate the classes into the same directory as the generator engine?
The answers to your question depend partly on the purpose of your generated classes.
If the classes are generated as a part of the *development*, they should be generated as text files and checked into your SCM like any ot... | [
0.7251627445220947,
-0.24392694234848022,
-0.21167708933353424,
0.3618287742137909,
0.05235491320490837,
0.009220460429787636,
-0.034353721886873245,
0.10100866854190826,
-0.2680242359638214,
-0.527036726474762,
0.2633450925350189,
0.7156111598014832,
-0.21621815860271454,
-0.0300907678902... | |
I'm trying to look up this problem but I don't know what it's called. The premise is this:
Given m machines and j jobs, where each job can only be assigned to machines i through j, I need to assign the jobs to machines so that I maximize busy machines at one time. I am only concerned with how they are assigned at time... | [
0.1499651074409485,
-0.003480050712823868,
0.02064957283437252,
-0.03720320388674736,
0.2280264049768448,
0.59296715259552,
-0.021287819370627403,
-0.024200914427638054,
-0.541047990322113,
-0.8773393034934998,
0.034647781401872635,
0.34829312562942505,
-0.43814119696617126,
0.421561837196... | |
algorithm](http://en.wikipedia.org/wiki/Scheduling_algorithms) | [
-0.26106518507003784,
-0.2705710530281067,
0.12933333218097687,
-0.0757480338215828,
0.4428311586380005,
0.2083030790090561,
-0.22388853132724762,
-0.254277765750885,
-0.90347820520401,
-0.7252753376960754,
0.11444587260484695,
0.5669540762901306,
-0.6285991072654724,
-0.12188796699047089,... | |
I have two triggers After Insert or Update and Instead of Insert. It appears that the after trigger is not running or sending the correct data.
I have verified the correct operation of Z\_UpdateStageTable stored procedure and the Instead of Insert trigger. Removing the Instead of Insert trigger doesn't have any affect... | [
0.28149083256721497,
0.2090064287185669,
0.33705127239227295,
-0.19175498187541962,
0.17540912330150604,
-0.1191195547580719,
0.2645328938961029,
-0.45137086510658264,
-0.1344563364982605,
-0.5554395914077759,
-0.1418069452047348,
0.8503183126449585,
-0.5219539999961853,
0.0015097884461283... | |
NOCOUNT ON;
DELETE FROM Z_MobileSyncFilters WHERE UserID = (SELECT UserID FROM INSERTED);
INSERT INTO Z_MobileSyncFilters
SELECT *
FROM INSERTED;
END
```
After Insert, Update:
```
TRIGGER [UpdateStageTable]
ON [dbo].[Z_MobileSyncFilters]
AFTER INSERT,UPDATE
AS
BEGIN
SET NOCOUNT ON;
DECLARE @AllWos AS VARCHA... | [
0.016546428203582764,
-0.027640054002404213,
0.8004404306411743,
-0.15623052418231964,
0.3802047371864319,
0.283138632774353,
0.1885794848203659,
-0.5919807553291321,
-0.30494827032089233,
-0.2770537734031677,
-0.5387882590293884,
0.7861119508743286,
-0.3285585641860962,
-0.084401518106460... | |
parameterless sql statement, say) to test whether the trigger's being called. It's possible that the sproc's not being called with what you think it's being called with. | [
0.06533721089363098,
-0.233252614736557,
0.2767557203769684,
0.1909256875514984,
-0.2476915568113327,
-0.1531347632408142,
-0.008464626036584377,
-0.19540220499038696,
-0.31259721517562866,
0.06280332058668137,
-0.08715324848890305,
0.6065738797187805,
-0.3912469446659088,
0.04774944856762... | |
Currently using SAS as measurement engine and Business Objects as display layer. Looking to develop a new, faster, slicker solution. Has anyone developed or purchased a campaign measurement reporting system? This solution should measure everything from email stats, web stats, customer activity, lift, ROI, etc.
Ok.. I... | [
0.5097314119338989,
0.23057837784290314,
0.32520660758018494,
0.051752086728811264,
-0.3120989501476288,
-0.1236024722456932,
-0.016779908910393715,
0.07580267637968063,
-0.372717946767807,
-0.4719983637332916,
0.065134197473526,
0.02920459397137165,
0.0018988566007465124,
-0.0591765530407... | |
I've a table with large number of rows (10K+) and it primary key is GUID. The primary key is clustered. The query performance is quite low on this table. Please provide suggestions to make it efficient.
You need to use newsequentialid() instead see here [Some Simple Code To Show The Difference Between Newid And Newsequ... | [
0.05371449515223503,
0.18961158394813538,
0.5565818548202515,
-0.07474520057439804,
-0.12531588971614838,
-0.12486583739519119,
-0.12630286812782288,
0.1753058135509491,
-0.16149649024009705,
-0.8618189096450806,
-0.009477976709604263,
0.1576801985502243,
-0.24311178922653198,
0.5826420783... | |
I'm making a little memory leak finder in my program, but
my way of overloading new and delete (and also new[] and delete[])
doesn't seem to do anything.
```
void* operator new (unsigned int size, const char* filename, int line)
{
void* ptr = new void[size];
memleakfinder.AddTrack(ptr,size,filename,line);
... | [
0.2072392851114273,
0.0435948446393013,
0.41576170921325684,
-0.19426870346069336,
0.13893993198871613,
-0.03683735802769661,
0.6254706382751465,
-0.1731211096048355,
-0.4482421875,
-0.6204677820205688,
-0.17384697496891022,
0.7842451333999634,
-0.40235435962677,
0.18992002308368683,
0.1... | |
in a base class and derive all your objects from this class or use a namespace or a template allocator parameter. Why, you may ask. Because in case your program is more than a single file and using STL or other libraries you are going to screw up.
Here's a distilled version of `new` operator from VS2005 `new.cpp`:
``... | [
0.14681513607501984,
-0.17593257129192352,
0.04064996913075447,
-0.19927263259887695,
0.024781713262200356,
-0.08277826011180878,
0.14924681186676025,
-0.5009490251541138,
-0.31706559658050537,
-0.482503741979599,
-0.06420499086380005,
0.4672178030014038,
-0.4559646248817444,
-0.0243707895... | |
// report no memory
static const std::bad_alloc nomem;
_RAISE(nomem);
}
return (p);
}
``` | [
-0.09406296163797379,
0.2829233705997467,
0.11070504039525986,
-0.32364585995674133,
0.22677569091320038,
0.22199195623397827,
0.49967142939567566,
0.030690442770719528,
-0.24063946306705475,
-0.4427928030490875,
-0.3882054090499878,
0.5800362229347229,
-0.28046366572380066,
0.212583646178... | |
I find myself breaking strings constantly just to get them on the next line. And of course when I go to change those strings (think logging messages), I have to reformat the breaks to keep them within the 80 columns.
How do most people deal with this?
"A foolish consistency is the hobgoblin of little minds, adored by ... | [
0.012426620349287987,
0.28915101289749146,
0.5217054486274719,
0.2975858747959137,
0.03086497262120247,
-0.08949875086545944,
0.12659303843975067,
0.14888247847557068,
-0.34815719723701477,
-0.4599800407886505,
-0.0333380289375782,
0.12241165339946747,
-0.10315074026584625,
-0.008822764270... | |
turned on in Komodo. That way, I know when I've run over. The questions are "why?" and "is it worth fixing it?"
Here are our common situations.
**logging messages**. We try to make these easy to wrap. They look like this
```
logger.info( "unique thing %s %s %s",
arg1, arg2, arg3 )
```
**Django filter expressio... | [
0.34159141778945923,
-0.14516492187976837,
0.27395400404930115,
0.10655926913022995,
-0.056402336806058884,
-0.06860809773206711,
-0.06613205373287201,
0.0759037435054779,
-0.39682361483573914,
-0.3906823992729187,
0.00573123712092638,
0.6679880023002625,
-0.27803319692611694,
-0.183552637... | |
is sensible. We avoid it, however.
**Unit Test Expected Result Strings**. These happen because we cut and paste to create the unit test code and don't spend a lot of time refactoring it. When it bugs us we pull the strings out into separate string variables and clean the `self.assertXXX()` lines up.
We generally don'... | [
0.4797108471393585,
0.00009049820801010355,
-0.03620860353112221,
0.22130993008613586,
0.08922170102596283,
0.15283866226673126,
0.6142063736915588,
-0.1442878544330597,
0.429058313369751,
-0.4520985782146454,
0.06891445815563202,
0.7060282826423645,
0.10059063881635666,
-0.320500671863555... | |
them up and leave an intermediate result lying around. If we were functional purists, we might have gas with intermediate result variables, but we're not purists. | [
0.4016933739185333,
0.3633038103580475,
0.15722598135471344,
0.3635454475879669,
0.14174769818782806,
0.17628948390483856,
-0.0390910804271698,
-0.11895221471786499,
0.3632013201713562,
-0.4239906668663025,
0.04501444846391678,
0.772338330745697,
-0.07471642643213272,
-0.19879528880119324,... | |
I have a native C dll that exports one function besides DllEntryPoint, FuncX. I'm trying to find out how FuncX communicates with it's caller, because it has a void return type and no parameters. When I call it from a C# harness, I get an AccessViolationException - Attempted to read or write protected memory.
I have a ... | [
0.24757187068462372,
0.21714915335178375,
0.052110202610492706,
-0.008572148159146309,
-0.26634952425956726,
-0.115859754383564,
0.12829911708831787,
0.22400592267513275,
-0.18799683451652527,
-0.3232189416885376,
-0.07791115343570709,
0.6589202880859375,
-0.3654330372810364,
0.50814551115... | |
I can, however, disassemble it in IDA Pro, but don't know how to, if I can, try and debug it in there.
I would try loading the DLL itself into IDA Pro. Hopefully C# preserves the native call stack, and you can look at the code around where the DLL crashes.
Side note: the [Decompiler plugin](http://www.hex-rays.com/dec... | [
0.1556561291217804,
0.09773758798837662,
0.0033925308380275965,
0.27072590589523315,
-0.11007501929998398,
-0.25050562620162964,
0.30887022614479065,
0.12117404490709305,
0.032283760607242584,
-0.549415647983551,
-0.14052899181842804,
0.7827096581459045,
-0.3160107731819153,
0.157124876976... | |
I have the following table:
```
uid | key | email
-----------------
1 | 1 | test@test.com
2 | 2 | test@test.com
3 | 3 | test@test.com
4 | 4 | test@test.com
5 | 4 | test@test.com
6 | 4 | test@test.com
7 | 6 | abce@test.com
8 | 7 | defg@test.com
```
I'd like to grab all of the rows wit... | [
0.41974738240242004,
0.3295113742351532,
-0.022295309230685234,
-0.017204007133841515,
0.08373462408781052,
0.035251863300800323,
0.4059405028820038,
-0.35694363713264465,
0.2692141532897949,
-0.8266118168830872,
0.21455982327461243,
0.2192544788122177,
-0.2304442971944809,
0.2042750269174... | |
1 | test@test.com
2 | 2 | test@test.com
3 | 3 | test@test.com
```
```
SELECT MIN(uid) as uid, key, email
FROM Keys k INNER JOIN
(SELECT email FROM KEYS GROUP by email HAVING COUNT(email) > 1 ) k2
ON k.email = k2.email
GROUP BY key, email
HAVING COUNT(key) = 1
``` | [
0.1754743754863739,
-0.06724374741315842,
0.09608865529298782,
0.0619991160929203,
-0.12058848142623901,
0.19488632678985596,
0.34663164615631104,
-0.4259507954120636,
0.3619452714920044,
-0.7684394121170044,
-0.1497548371553421,
0.18169236183166504,
-0.0950155034661293,
0.2822776138782501... | |
jQuery 1.3.2, ASP.NET 2.0. Making an AJAX call to a PageMethod (WebMethod) returns the full/whole page instead of just the response. A breakpoint on the page method shows it's never getting hit. I have the [WebMethod] attribute on my method, and it *is* public static, returns string and accepts no params. I even tried ... | [
-0.2778405249118805,
-0.09564560651779175,
0.5123331546783447,
-0.28117725253105164,
-0.7756437659263611,
-0.17932583391666412,
0.5373485684394836,
-0.03812701255083084,
-0.42199254035949707,
-0.4435065984725952,
-0.151566281914711,
0.6947516202926636,
-0.3115427792072296,
-0.0862024500966... | |
feel like I'm following this to the T, but still no luck.
The jQuery call I'm making is:
```
jQuery.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: '{}',
dataType: 'json',
url: 'MyPage.aspx/SomePageMethod',
success: function(result){
alert(result);
}
});
... | [
-0.3563632071018219,
0.03130623698234558,
0.8741494417190552,
-0.09313958138227463,
-0.41600510478019714,
0.04825468361377716,
0.5397881269454956,
-0.13150134682655334,
-0.14035488665103912,
-0.6412654519081116,
-0.229349285364151,
0.648004949092865,
0.02578933723270893,
-0.062587551772594... | |
Headers
Host localhost:2624
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
Accept application/json, text/javascript, */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection kee... | [
0.2363961637020111,
0.19099245965480804,
0.39981603622436523,
0.21785038709640503,
-0.143364816904068,
-0.2579967677593231,
0.3984539210796356,
-0.10460864007472992,
-0.22809317708015442,
-0.6326814889907837,
-0.20796974003314972,
0.5179298520088196,
-0.48968246579170227,
0.139786437153816... | |
I need to add timezone information to a db table with user maintained locations. The data will be accessed mostly from Java code but there is also some PL/SQL and Win32 (Delphi) code which needs to understand the timezone information.
It seems straight forward to use the id from java.util.TimeZone. Java can easily con... | [
0.34056660532951355,
-0.2244277447462082,
0.3235424757003784,
0.4875321686267853,
0.24889497458934784,
-0.10220931470394135,
-0.06077616661787033,
0.014914433471858501,
-0.125533327460289,
-0.6993409395217896,
0.19335097074508667,
0.6673365235328674,
-0.12241337448358536,
0.079721219837665... | |
timezone picklist in Windows. The registry does not contain it at all; see
```
\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
```
Here I can only pick either -09:00 or -10:00. So, if I were to store the timezone like this, how can I get to the actual offset/DST infos in Windows (without Java)? Hopefully thi... | [
0.21311117708683014,
-0.13539932668209076,
0.47950029373168945,
0.16261278092861176,
0.3054790198802948,
-0.0516427643597126,
-0.3406260013580322,
0.06482359766960144,
-0.08562001585960388,
-0.6475239396095276,
0.08750933408737183,
0.33055710792541504,
0.04296078160405159,
0.18339766561985... | |
can be associated with those values, the location's timezone enables me to convert the date/time value to UTC or any other timezone whenever needed.
I realize that instead of DATE a TIMESTAMP\_TZ data type or something similar would be more appropriate. However, this would require a data migration (for which the TZ is... | [
0.4094970226287842,
-0.10709304362535477,
0.3202296197414398,
0.2595168948173523,
0.4324037730693817,
0.07810661941766739,
0.08464937657117844,
0.28062647581100464,
-0.34723055362701416,
-0.5771796107292175,
-0.23031865060329437,
0.29015347361564636,
-0.15089835226535797,
0.369480043649673... | |
local time but I need to know for some of them which TZ that means.
I can give a little background, if not a real answer.
Many systems use the [Olson](http://en.wikipedia.org/wiki/Zoneinfo) implementation of timezone data. So those names work in many systems (most Unix, Java, Oracle I think). Microsoft does their own ... | [
0.4483468234539032,
-0.10700646042823792,
0.4493046700954437,
0.4208712577819824,
0.593661367893219,
-0.2612283229827881,
0.41769465804100037,
0.972269594669342,
-0.4032629728317261,
-0.7256184220314026,
0.0325811430811882,
0.32841190695762634,
0.11341516673564911,
0.11980357021093369,
0... | |
this is what I would like to be able to do.
```
/// <summary>
/// Gets the session factory.
/// </summary>
/// <value>The session factory.</value>
public ISessionFactory SessionFactory
{
get
{ | [
0.14073458313941956,
0.11450561136007309,
0.41053691506385803,
-0.1885756403207779,
0.19417209923267365,
-0.02208610624074936,
0.27714774012565613,
-0.044429078698158264,
-0.21956412494182587,
-1.123435616493225,
-0.14687253534793854,
0.7716891765594482,
-0.41104018688201904,
0.10070446133... | |
if (_sessionFactory == null)
{
#if(NUNIT)
_sessionFactory = Fluently.Configure()
.Database(SQLiteConfiguration.Standard | [
0.03198189660906792,
-0.1311209797859192,
0.5479574203491211,
-0.1685630828142166,
0.06488553434610367,
0.012120804749429226,
0.9755631685256958,
-0.1738092303276062,
-0.15186242759227753,
-0.6334205269813538,
-0.1589106321334839,
0.7578833699226379,
-0.4096970856189728,
0.1529533118009567... | |
.UsingFile(DbFile)
.ShowSql())
.Mappings(m => | [
0.08882220089435577,
-0.15195031464099884,
0.5641977190971375,
0.07471130043268204,
-0.1657407283782959,
0.10137807577848434,
0.40723171830177307,
-0.32047104835510254,
-0.09487313777208328,
-1.1125012636184692,
-0.25679251551628113,
0.4664897918701172,
-0.4530578851699829,
-0.071824572980... | |
m.FluentMappings.AddFromAssemblyOf<ForeignFormat>())
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();
#else
_sessionFactory = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2005 | [
-0.34077030420303345,
0.005647966638207436,
0.5134638547897339,
-0.42913317680358887,
0.27301737666130066,
0.13971568644046783,
1.1266257762908936,
-0.12455257773399353,
-0.18779104948043823,
-0.7912603616714478,
-0.23333239555358887,
0.9042022824287415,
-0.3393828570842743,
0.269390106201... | |
.ConnectionString(c => c
.Server(".\\sqlexpress") | [
-0.18436172604560852,
0.016645947471261024,
0.4257049560546875,
0.2275240570306778,
0.1395169198513031,
-0.26096582412719727,
0.15904812514781952,
0.11270739138126373,
-0.3572506308555603,
-0.7895273566246033,
-0.022781673818826675,
0.21984514594078064,
-0.466390460729599,
0.57706999778747... | |
.Database("mPort")
.TrustedConnection()) | [
0.10677524656057358,
-0.3052244782447815,
0.24975870549678802,
0.7064163088798523,
0.11070290952920914,
-0.148152157664299,
0.4000599980354309,
-0.21433301270008087,
-0.3816035985946655,
-0.7797437310218811,
-0.2336064875125885,
0.34235888719558716,
-0.4732646644115448,
0.1393759846687317,... | |
.ShowSql()
) | [
-0.053332336246967316,
-0.3478965759277344,
0.4588221609592438,
-0.03183241933584213,
-0.32265573740005493,
-0.3504161238670349,
0.14849264919757843,
-0.06477328389883041,
-0.4271533787250519,
-0.7481312155723572,
-0.058909766376018524,
0.4019778370857239,
-0.5574125051498413,
0.2038290053... | |
.Mappings(m => m
.FluentMappings.AddFromAssemblyOf<ForeignFormat>())
.BuildSessionFactory();
#endif
}
return _sessionFactory; | [
-0.12716539204120636,
0.03009970486164093,
0.6462321877479553,
-0.3802889585494995,
0.29788294434547424,
0.14331138134002686,
1.1558609008789062,
-0.21862167119979858,
-0.12404235452413559,
-0.8765279054641724,
-0.31920182704925537,
0.855774462223053,
-0.4070468842983246,
0.400092303752899... | |
}
}
```
is it possible to #if conditional if you are running a unit test?
[#if](http://msdn.microsoft.com/en-us/library/4y6tbswk.aspx) is a compiler directive, so you'd need to compile your code differently when you're going to run tests vs. when you're going to run it "for real". You can define compiler flag... | [
0.6199605464935303,
-0.06733900308609009,
-0.20167526602745056,
-0.009898156858980656,
-0.0051939706318080425,
-0.22267916798591614,
0.3864881098270416,
-0.014239264652132988,
0.0041001541540026665,
-0.5611395835876465,
-0.17598067224025726,
0.6291395425796509,
-0.08407119661569595,
0.0940... | |
to be constantly recompiling when you want to switch between running unit tests and running the real application.
Dependency injection or mocking would serve you much better. | [
0.3812710642814636,
0.04099925607442856,
-0.1647680550813675,
0.3978361189365387,
-0.06616219878196716,
0.057040825486183167,
0.4299812316894531,
-0.14209890365600586,
-0.017177773639559746,
-0.41884419322013855,
0.3328738808631897,
0.6725504398345947,
-0.14500480890274048,
-0.200458079576... | |
How can I query a particular website with some fields and get the results to my webpage using php?
let say website xyz.com will give you the name of the city if you give them the zipcode. How can I acehive this easliy in php? any code snap shot will be great.
If I understand what you mean (You want to submit a query t... | [
0.6485610604286194,
0.04434984549880028,
0.5798033475875854,
0.21123036742210388,
-0.40984979271888733,
-0.38549816608428955,
0.16248713433742523,
-0.0860106572508812,
-0.09208878874778748,
-0.6796895265579224,
-0.18435081839561462,
0.014259866438806057,
-0.524524986743927,
-0.092090085148... | |
// set url
curl_setopt($ch, CURLOPT_URL, "example.com");
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
?>
```
You c... | [
0.05113017186522484,
-0.15819326043128967,
0.7654598951339722,
-0.03373183682560921,
0.21145319938659668,
-0.17979729175567627,
-0.016600754112005234,
-0.40000659227371216,
-0.06995774805545807,
-0.47861751914024353,
-0.2962198555469513,
0.21386155486106873,
-0.33403220772743225,
0.2490397... | |
after the curl\_close() function.
That will return something like this (numbers changed):
```
Latitude: 53.5100
Longitude: 60.2200
``` | [
-0.026544541120529175,
0.24302692711353302,
1.0649389028549194,
-0.23943500220775604,
0.2691343128681183,
0.010181511752307415,
-0.00029893754981458187,
-0.18292750418186188,
-0.15150009095668793,
-0.4757381081581116,
-0.14050094783306122,
0.17879194021224976,
-0.20398350059986115,
0.19925... | |
Is it possible to write an infinite for loop in VB.NET?
If so, what is the syntax?
```
For i as Integer = 0 To 1 Step 0
```
If that's not hacky enough, can also write:
```
For i As Integer = 0 To 2
i -= 1
Next
``` | [
0.2420429140329361,
-0.2593330442905426,
0.17246469855308533,
-0.022720741108059883,
0.1309552639722824,
-0.0200393907725811,
0.5691948533058167,
0.0002817028434947133,
-0.2047451287508011,
-0.3525909185409546,
-0.005422277841717005,
0.3209826648235321,
-0.6241502165794373,
0.0632006451487... | |
I have got postfix installed on my machine and I am updating virtual\_alias on the fly programmatically(using python)(on some action). Once I update the entry in the /etc/postfix/virtual\_alias, I am running the command:
```
sudo /usr/sbin/postmap /etc/postfix/virtual_alias 2>>/work/postfix_valias_errorfile
```
But I a... | [
0.12160129845142365,
0.03566519543528557,
0.3779314160346985,
-0.07561656832695007,
0.02744760736823082,
-0.017739087343215942,
0.47680845856666565,
0.0696839913725853,
-0.06941661983728409,
-0.740157961845398,
-0.1253644973039627,
0.6164628267288208,
-0.3755219876766205,
0.268726795911788... | |
you can configure sudo to not need a password for `/etc/init.d/postfix`.
sudo configuration (via visudo) allows NOPASSWD: to allow the command without a password. See <http://www.sudo.ws/sudo/man/sudoers.html#nopasswd_and_passwd>
```
<username> ALL = NOPASSWD: /etc/init.d/postfix
```
or something similar. | [
-0.46826204657554626,
-0.23988883197307587,
0.48348119854927063,
0.16638268530368805,
-0.06252478808164597,
-0.283833771944046,
0.7591705322265625,
-0.2512887716293335,
-0.05084038898348808,
-0.8864746689796448,
-0.47807466983795166,
0.5369088649749756,
0.0967797189950943,
0.18761280179023... | |
My personal style with C++ has always to put class declarations in an include file, and definitions in a `.cpp` file, very much like stipulated in [Loki's answer to *C++ Header Files, Code Separation*](https://stackoverflow.com/a/280048). Admittedly, part of the reason I like this style probably has to do with all the ... | [
0.4037315547466278,
0.2520151436328888,
-0.20073433220386505,
0.015969768166542053,
-0.4992043375968933,
-0.28996121883392334,
0.28717026114463806,
-0.09560149908065796,
-0.12634646892547607,
-0.6215689778327942,
-0.2430068850517273,
0.5547033548355103,
-0.28990596532821655,
-0.11897208541... | |
not saying this is a valid alternate style, or even a slightly better style, but rather this is the new universally-accepted style that everyone is now using for C++.
I'm not as limber as I used to be, so I'm not really anxious to scrabble up onto this bandwagon of his until I see a few more people up there with him. ... | [
1.0458108186721802,
0.1883407086133957,
0.267229288816452,
0.2909560203552246,
0.06912737339735031,
-0.43074265122413635,
0.31703129410743713,
0.13585664331912994,
-0.4513465166091919,
-0.0718691423535347,
-0.17878110706806183,
0.3140273690223694,
-0.16278871893882751,
0.016957387328147888... | |
put code in .cpp files (or whatever extension you like) and declarations in headers.
There is occasionally some merit to putting code in the header, this can allow more clever inlining by the compiler. But at the same time, it can destroy your compile times since all code has to be processed every time it is included ... | [
0.7221128940582275,
0.33162352442741394,
-0.2502935826778412,
0.2751213312149048,
0.00872789230197668,
-0.20696868002414703,
0.21924109756946564,
0.007482896558940411,
-0.30799514055252075,
-0.5375721454620361,
-0.15218175947666168,
0.3635621666908264,
-0.3914475440979004,
0.10391110926866... | |
true. templates. Many newer "modern" libraries such as boost make heavy use of templates and often are "header only." However, this should only be done when dealing with templates as it is the only way to do it when dealing with them.
**EDIT:** Some people would like a little more clarification, here's some thoughts o... | [
0.7386714816093445,
-0.03269447758793831,
-0.20699340105056763,
0.14515531063079834,
-0.30520308017730713,
-0.5219770669937134,
0.6181233525276184,
-0.32754403352737427,
-0.18390409648418427,
-0.5717759728431702,
-0.05102795362472534,
0.7188060283660889,
-0.4410906434059143,
-0.44120696187... | |
compile of a single 1K file with boost included. 14s may not seem to be "exploding", but it is certainly a lot longer than typical and can add up quite quickly when dealing with a large project. Header only libraries do affect compile times in a quite measurable way. We just tolerate it because boost is so useful.
Add... | [
0.19950495660305023,
-0.17385856807231903,
-0.1990206390619278,
0.5356073379516602,
-0.4497365355491638,
-0.4115346372127533,
0.21871213614940643,
-0.07182303816080093,
-0.5569416284561157,
-0.49657076597213745,
-0.03231018781661987,
0.28810790181159973,
-0.24350924789905548,
-0.0728474259... | |
libs (unless you resort to the abomination that is a singleton) as you will run into multiple definition errors. **NOTE:** C++17's inline variables will make this particular example doable in the future.
As a final point, when using boost as an example of header only code, a huge detail often gets missed.
Boost is li... | [
0.16325221955776215,
0.089469313621521,
0.1899244487285614,
-0.05200883001089096,
-0.28758907318115234,
-0.54994136095047,
0.4441317021846771,
-0.0377013236284256,
-0.29785874485969543,
-0.5637710094451904,
-0.2082453966140747,
0.6229702234268188,
-0.4163041114807129,
-0.1802171915769577,
... | |
change from compile to compile). When you split things between header/source and better yet, use forward declarations to reduce includes, you can save hours of recompiling when added up across a day. | [
0.45584192872047424,
-0.22115105390548706,
0.03447020426392555,
0.20499594509601593,
-0.27972307801246643,
-0.1277225762605667,
0.07265365868806839,
-0.4812777638435364,
-0.46955540776252747,
-1.016076922416687,
0.09735005348920822,
0.27114248275756836,
-0.3193197548389435,
0.1371894776821... | |
Is there some way to specify a directory (let's say "C:\images") and move every .jpg file from there to another directory (say "D:\media") but preserve the directory structure (so if the file were "C:\images\paintball\july\07\headshot.jpg" after moving it would be "D:\media\paintball\july\07\headshot.jpg")?
I'm using ... | [
0.35200005769729614,
-0.15633797645568848,
0.09711384028196335,
0.14640958607196808,
0.10640721023082733,
-0.1974232941865921,
0.14719215035438538,
-0.026991095393896103,
0.005254531744867563,
-0.5878517627716064,
0.04496043920516968,
0.863725483417511,
-0.21950966119766235,
-0.12371417135... | |
Okay, so I need to make C go the shortest path from A to B. A to B is the hypotenuse of my right triangle, and I need to give C the arctan of said triangle. How do I do this, and does the formula have a name?
Arctan would result in degrees or radians so your A and B most likely have coordinates like (x, y). Then you do... | [
0.2561693489551544,
0.1905532032251358,
0.3898368179798126,
-0.0077752042561769485,
-0.20650948584079742,
0.11224019527435303,
0.024682870134711266,
-0.265938937664032,
-0.29338735342025757,
-0.5131382346153259,
0.1771841198205948,
0.3423958718776703,
-0.011871680617332458,
0.3011934161186... | |
out meaningfully. | [
0.6933924555778503,
0.38909175992012024,
0.09738033264875412,
-0.2868337035179138,
-0.8067415356636047,
0.0718105137348175,
0.10962635278701782,
-0.06488905102014542,
0.07461558282375336,
0.07751719653606415,
-0.22093935310840607,
-0.06983499228954315,
-0.31314578652381897,
0.2318548709154... | |
One of the features of the Flash app I'm working on is to be able to stream a webcam to others. We're just using the built-in webcam support in Flash and sending it through FMS.
We've had some people ask for higher quality video, but we're already using the highest quality setting we can in Flash (setting quality to 1... | [
0.4394446909427643,
0.03562978655099869,
0.434736967086792,
0.19667643308639526,
-0.10612804442644119,
-0.4566654860973358,
0.06607633084058762,
0.10570785403251648,
-0.1423899233341217,
-0.7158156633377075,
-0.018974199891090393,
0.7567185163497925,
-0.20698025822639465,
-0.07938634604215... | |
to get MP4 to work at all.
According to the [Flex documentation](http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/net/NetStream.html#publish()) the only thing I need to do to use MP4 instead of FLV is prepend "mp4:" to the name of the stream when calling publish:
> Specify the stream name as a string
> with the p... | [
0.20531505346298218,
0.013926725834608078,
0.6580258011817932,
-0.14168411493301392,
-0.3283080756664276,
-0.2545608580112457,
0.3968454897403717,
-0.48406359553337097,
-0.5202789306640625,
-0.317796528339386,
-0.16469159722328186,
0.8665468692779541,
-0.6598565578460693,
-0.13171881437301... | |
my logging on the server side doesn't show any streams starting.
Here's the relevant code:
```
// These are all defined and created within the class.
private var nc:NetConnection;
private var sharing:Boolean;
private var pubStream:NetStream;
private var format:String;
private var streamName:String;
private var camera... | [
0.28671857714653015,
-0.13312102854251862,
0.7078143954277039,
-0.19188381731510162,
0.20407511293888092,
0.10497639328241348,
0.3901233375072479,
-0.21060124039649963,
-0.40521055459976196,
-0.4640600085258484,
-0.15376423299312592,
0.5251704454421997,
-0.3071468472480774,
0.3605452179908... | |
name = "mp4:" + streamName;
} else {
name = streamName;
}
//pubStream.publish(name, "live");
pubStream.publish(name, "record");
}
```
Arctan would result in degrees or radians so your A and B most likely have coordinates like (x, y). Then you do arctan((By - Ay) / (Bx - Ax)) if I remember correctly, here ... | [
0.37662678956985474,
0.08070871233940125,
0.6154815554618835,
-0.10246266424655914,
-0.06838729977607727,
0.0970231220126152,
0.22048136591911316,
-0.22816921770572662,
-0.038585249334573746,
-0.34272685647010803,
0.018047520890831947,
0.5023961067199707,
-0.20774595439434052,
0.3476014435... | |
I wanted a Django model with 2 foreign keys from the same table. It's an event table which has 2 columns for employees: the 'actor' and the 'receiver'. But I get this error:
> Error: One or more models did not validate: tasks.task: Intermediary
> model TaskEvent has more than one foreign key to Employee, which is
> am... | [
-0.19429916143417358,
-0.12871001660823822,
0.13720673322677612,
0.06059675291180611,
-0.23136208951473236,
0.21967391669750214,
-0.08395282924175262,
-0.23932725191116333,
-0.2138291597366333,
-0.3916342854499817,
0.38361677527427673,
0.6064093112945557,
-0.45628321170806885,
0.0214116442... | |
done this yet, but I used **inspectdb** to generate the models.py file from an existing DB that does exactly that - this is what inspectdb threw back, so it should work:
```
creator = models.ForeignKey(Users, null=True, related_name='creator')
assignee = models.ForeignKey(Users, null=True, related_name='assignee')
``... | [
0.12036372721195221,
0.14200854301452637,
0.34891414642333984,
0.009593801572918892,
0.07862778753042221,
-0.17909853160381317,
0.16111083328723907,
-0.06438992917537689,
-0.15862418711185455,
-0.5521532893180847,
0.24118484556674957,
0.4110592007637024,
-0.28996679186820984,
0.28124165534... | |
Is there any way to check if a array exists or has a value in a specific element?
I have this line of code
```
if (rummen[positionX, positionY].Levandesaker[0].alive == true)
```
And it works fine as long as it exists. But what I want to do is
```
if (rummen[positionX, positionY].Levandesaker != null)
{
if (ru... | [
0.07605165988206863,
0.3266173005104065,
0.11024600267410278,
-0.2708098292350769,
0.03750663250684738,
-0.04271490126848221,
0.5834489464759827,
-0.5346606969833374,
-0.11093541979789734,
-0.47196710109710693,
-0.07612905651330948,
0.4078870415687561,
-0.22757357358932495,
-0.118392199277... | |
{
}
}
```
I'm not entirely sure which array you're talking about now that I think about it. Are you referring to Levandesaker or rummen? | [
0.48894044756889343,
0.378064900636673,
-0.012934607453644276,
-0.022911930456757545,
-0.1939389407634735,
0.2620384097099304,
-0.40276288986206055,
0.14412537217140198,
-0.7057337164878845,
-0.5024370551109314,
-0.09812671691179276,
0.5593723654747009,
-0.2861696779727936,
0.3999432027339... | |
I have a byte[] that represents a .png file. I am downloading this .png via a WebClient. When the WebClient has downloaded the .png I reference via a URL, I get a byte[]. My question is, how do I load a byte[] into a System.Windows.Controls.Image element in WPF? Thank you.
Note: This is complementary to the question I... | [
0.26720917224884033,
0.08631186932325363,
0.4507031738758087,
0.17265532910823822,
-0.052288275212049484,
-0.16260495781898499,
-0.10962742567062378,
-0.15693220496177673,
-0.46880853176116943,
-0.5625818967819214,
-0.18626154959201813,
0.4869678020477295,
-0.1297854632139206,
-0.022110901... | |
I don't know how to create a ruby method that accepts a hash of parameters. I mean, in Rails I'd like to use a method like this:
```
login_success :msg => "Success!", :gotourl => user_url
```
What is the prototype of a method that accepts this kind of parameters? How do I read them?
If you pass paramaters to a Ruby ... | [
-0.05355233699083328,
0.3197488486766815,
0.061019498854875565,
0.20318663120269775,
-0.0025281994603574276,
-0.1917908489704132,
0.4600256383419037,
-0.36182209849357605,
-0.32981497049331665,
-0.4215635657310486,
-0.18643786013126373,
0.7348869442939758,
-0.31557145714759827,
0.182524636... | |
I'm not sure if this is possible in ASP.NET, but here is the problem I have: some of the data lists on my web application are displayed using a [GridView](http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview(VS.80).aspx); however, because some of these lists can contain a lot of data, they sometim... | [
0.1273469775915146,
0.05651584267616272,
0.38710689544677734,
0.15149915218353271,
0.045947931706905365,
-0.06075941026210785,
-0.012621130794286728,
0.0857875794172287,
-0.6084355115890503,
-0.7717389464378357,
0.07326405495405197,
0.33970463275909424,
0.04822828248143196,
0.3048747777938... | |
then access it the next time there is a postback.
So is this even possible? If so can someone point me in the direction of more information on how to do this? If it is not possible, does anyone have any suggestions on how I might be able to solve this problem?
You can use a different store for your viewstate besides t... | [
0.28687939047813416,
0.11534802615642548,
0.301067054271698,
0.17608655989170074,
0.004523358307778835,
-0.33290088176727295,
0.4670872688293457,
0.02461266703903675,
-0.23940372467041016,
-0.5873682498931885,
0.24782302975654602,
0.5104373693466187,
0.10782621055841446,
0.0158751141279935... | |
Is there a way to explicitly specify a user/domain/password when using windows authentication for MS SQL?
I mean in the connection string.
Edit:
I would like to connect to another SQL server with a specific username and password on a different computer so impersonating I don't think is possible.
No, there isn't - yo... | [
0.19450104236602783,
0.14275655150413513,
0.16053442656993866,
0.23808488249778748,
0.2100142389535904,
-0.2522088587284088,
0.2340882420539856,
0.17946459352970123,
-0.22426189482212067,
-0.5956462621688843,
0.04259554296731949,
0.45159679651260376,
-0.3217618763446808,
0.2400405704975128... | |
to be a separate process, not your main application), or you can look into something like Database Roles:
[MSDN Article](http://msdn.microsoft.com/en-us/library/aa905188(SQL.80).aspx)
**UPDATE**: Since you've stated that you're in a workgroup (I assume both the client and server are), then [this blog post](http://blo... | [
0.4691491425037384,
-0.062010765075683594,
0.4119377136230469,
0.06278618425130844,
0.23246552050113678,
-0.33361178636550903,
0.3911066949367523,
0.14079171419143677,
-0.502392590045929,
-0.4361115097999573,
0.005683753173798323,
0.45334839820861816,
-0.06007102131843567,
0.02174299582839... | |
I have the concrete types for interfaces configured at startup, but I want to create instances of the concrete type at runtime with setting properties or setting different values in the constructor. All the creating of instances I see have the knowledge of what the concrete type is, at runtime I don't know the concrete... | [
0.27632102370262146,
-0.18474173545837402,
-0.0674208328127861,
0.19597862660884857,
0.1993263214826584,
-0.1389532834291458,
0.38605478405952454,
-0.25898995995521545,
0.12793733179569244,
-0.6918932795524597,
0.24671240150928497,
0.7114545702934265,
-0.18173274397850037,
0.18053384125232... | |
.WithCtorArg("name").EqualTo("Jeremy")
.WithCtorArg("count").EqualTo(4)
.WithCtorArg("average").EqualTo(.333);
});
}
```
OR:
```
var container = new Container(x =>
{
x.ForConcreteType<SimplePropertyTarget>().Configure
.SetProperty(target =>
{
target.Nam... | [
0.34133249521255493,
-0.3362793028354645,
0.5783469676971436,
-0.0613851398229599,
0.03512570634484291,
0.5448379516601562,
0.26370203495025635,
-0.4565483331680298,
-0.07629717886447906,
-0.5044692158699036,
0.16604669392108917,
0.5695123076438904,
-0.29127946496009827,
0.1980057805776596... | |
});
});
```
I want to do something similar...but don't know the concrete type....only the abstract class or interface (would have properties in this case). The concrete type is configured though.
Found the answer with direction from Jeremy Miller (author of StructureMap). Here is where he pointed me to:
<http://stru... | [
0.13415786623954773,
0.06993526220321655,
0.13685494661331177,
-0.10242774337530136,
-0.2515224814414978,
0.2012048065662384,
0.25704869627952576,
-0.7002335786819458,
-0.0037350705824792385,
-0.5594207644462585,
0.08569534868001938,
0.47893500328063965,
-0.6032584309577942,
0.103496707975... | |
With("user").EqualTo("userName").
With("password").EqualTo("password").
GetInstance<IDatabaseRepository>();
``` | [
-0.06360703706741333,
0.016740210354328156,
0.2674536108970642,
0.1829899549484253,
-0.07423032075166702,
0.19039954245090485,
0.1123112216591835,
-0.37098559737205505,
0.09104631841182709,
-0.660546600818634,
-0.1253122240304947,
0.7732850313186646,
-0.28825274109840393,
0.166840121150016... | |
I set the border for the table event\_calendar tr to be red, it works in everything except IE 6 & 7. What is wrong with my CSS?
```
table#event_calendar tr {
border:1px solid red;
}
<div class="content-body">
<table id="event_calendar">
<tr class="calendarHeader">
<th><div class="calendarMonthLinks"><... | [
-0.010649641044437885,
0.09876108169555664,
0.8211586475372314,
-0.15028473734855652,
-0.16721667349338531,
0.12299153208732605,
0.2774205505847931,
-0.21693214774131775,
-0.24660608172416687,
-0.5757590532302856,
0.4791315793991089,
0.4739192724227905,
-0.059214893728494644,
-0.0041579403... | |
<td class="calendarDayHeading">Tuesday</td>
<td class="calendarDayHeading">Wednesday</td>
<td class="calendarDayHeading">Thursday</td>
<td class="calendarDayHeading">Friday</td>
<td class="calendarDayHeading">Saturday</td>
</tr>
</table>
</div>
```
IE does not honor the border prope... | [
0.2955588698387146,
-0.11390077322721481,
0.7363178133964539,
-0.04649543762207031,
0.1843787580728531,
-0.21515020728111267,
0.3104628622531891,
-0.402599960565567,
-0.42907166481018066,
-0.4787118434906006,
-0.0803956687450409,
0.05021655932068825,
-0.16045281291007996,
0.011837570928037... | |
like this for you (I haven't tested it myself, so I'm not sure if this is exactly right, but I think you can riff on it.)
```
table#event_calendar {
border-collapse: collapse;
border-right: 1px solid red;
border-left: 1px solid red;
}
table#event_calendar td, table#event_calendar th {
border-top: 1px ... | [
-0.1266133189201355,
-0.04814307019114494,
0.9015449285507202,
-0.0634065493941307,
0.07563576847314835,
-0.020877251401543617,
0.08743848651647568,
0.1509571373462677,
-0.6654601097106934,
-0.6491400003433228,
0.15349680185317993,
0.5702330470085144,
-0.309357613325119,
0.0156054412946105... | |
I want to print a table mixed with string and float values, as tab delimited output printout. Sure I can get the job done:
```
>>> tab = [['a', 1], ['b', 2]]
>>> for row in tab:
... out = ""
... for col in row:
... out = out + str(col) + "\t"
... print out.rstrip()
...
a 1
b 2
```
But I ... | [
0.18809774518013,
0.2928412854671478,
0.3392251133918762,
-0.15021580457687378,
-0.18767176568508148,
0.011622187681496143,
0.058855149894952774,
-0.21493637561798096,
-0.3827626705169678,
-0.5716472864151001,
0.009800557047128677,
0.725277304649353,
-0.5864349007606506,
-0.219464018940925... | |
row with specified delimiter, if not the whole table. Little googling (from [here](http://skymind.com/~ocrow/python_string/)) and it is already shorter:
```
>>> for row in tab:
... print "\t".join([str(col) for col in row])
...
a 1
b 2
```
Is there still a better, or more Python-ish, way to do it?
Your shor... | [
-0.17984366416931152,
-0.00047795899445191026,
0.6484261751174927,
-0.04427243024110794,
-0.09092166274785995,
0.004554540850222111,
-0.10004241019487381,
-0.31006431579589844,
-0.3114740550518036,
-0.6534919738769531,
-0.10550587624311447,
0.5666227340698242,
-0.31022271513938904,
-0.1730... | |
headers, escape sequences... | [
0.08902405202388763,
-0.08783171325922012,
-0.3135496973991394,
0.6287029981613159,
0.29070353507995605,
-0.37107059359550476,
0.42754483222961426,
-0.005494100507348776,
-0.1656457483768463,
-0.4518437385559082,
-0.33699190616607666,
-0.13453496992588043,
-0.46483272314071655,
-0.08060509... | |
I am trying to create a slideshow using Javascript and an asp.net image control. I am unable to add filter property to the image control. Any suggestions
? or is it possible to set the filter in javascript?
ex:
I want to be able to add style="filter:revealTrans(duration=2,transition=23)" to the image in "" control.
T... | [
0.6513000130653381,
-0.23980970680713654,
0.48848873376846313,
0.07493425905704498,
-0.13655705749988556,
-0.4186805486679077,
0.20395833253860474,
-0.36458298563957214,
-0.19057413935661316,
-0.6560777425765991,
-0.032398052513599396,
0.45456063747406006,
-0.43120458722114563,
-0.06617490... | |
I have an existing PDF and I can use FdFWriter to input to text boxes. It works well. Now I have an image. I have read the documentation and looked at many examples but they all create new documents and insert an image. I want to take an existing PDF and insert an image into either an image field or as the icon image o... | [
0.39043155312538147,
0.16250531375408173,
0.4476846158504486,
0.22300490736961365,
-0.18300220370292664,
-0.2289736568927765,
0.027499375864863396,
-0.27111393213272095,
-0.21524326503276825,
-0.9142981767654419,
0.08205712586641312,
0.5228633284568787,
-0.18400394916534424,
0.198016300797... | |
delete the original. This original changes and the name "original" only means the source file in this context. There are many PDF files like this that need an image.
Thank you for any help.
Edit - I am very thankful for the code below. It works great, but the problem for me is that the existing PDF has digital signat... | [
0.06054546684026718,
-0.09449131786823273,
0.44563087821006775,
0.3152693510055542,
0.07560382783412933,
-0.2637333273887634,
0.2137770801782608,
0.1659054160118103,
-0.4371560513973236,
-0.7862325310707092,
-0.3925356864929199,
0.5067452788352966,
0.02621479704976082,
0.35010024905204773,... | |
them that state "invalid signature."
In case it matters I am using a Topaz signature pad to create my signatures, which has it's own security. Merely copying the PDF will not corrupt it but the process below will.
I am trying to put the image on the existing document, not a copy of it, which in this case matters.
Al... | [
0.2991395592689514,
0.23056071996688843,
0.7219122052192688,
0.3978053331375122,
-0.0756707414984703,
-0.16305066645145416,
-0.02587299793958664,
-0.30559277534484863,
-0.3904252052307129,
-0.6222697496414185,
-0.13620315492153168,
0.32616108655929565,
-0.12133175134658813,
0.0349683091044... | |
and add extra content such as watermarks, pagenumbers, extra headers, PdfStamper is the object you need. I have successfully used the following code to insert an image into an existing pdf file to a given absolute position:
```
using System.IO;
using iTextSharp.text;
using iTextSharp.text.pdf;
class Program
{
sta... | [
0.0920422226190567,
-0.048624370247125626,
0.802328884601593,
-0.12065679579973221,
0.15551473200321198,
0.24443110823631287,
0.018294963985681534,
-0.363326758146286,
-0.2059406191110611,
-0.7197893857955933,
-0.12515516579151154,
0.7095543146133423,
-0.22553831338882446,
0.05946357548236... | |
{
var reader = new PdfReader(inputPdfStream);
var stamper = new PdfStamper(reader, outputPdfStream);
var pdfContentByte = stamper.GetOverContent(1);
Image image = Image.GetInstance(inputImageStream);
image.SetAbsolutePosition(100, 100);
pdfContent... | [
-0.28329265117645264,
-0.40837952494621277,
0.9482023119926453,
-0.004801181610673666,
-0.23517228662967682,
0.3481791913509369,
0.06162869185209274,
-0.4926031231880188,
-0.09236659854650497,
-0.7363232970237732,
-0.5359229445457458,
0.571178674697876,
-0.43211251497268677,
-0.12326383590... | |
stamper.Close();
}
}
}
```
When you insert the image you have the possibility to resize it. You can take a look at [transformation matrix](http://itextsharp.sourceforge.net/tutorial/ch10.html) in the iTextSharp documentation. | [
0.2884182631969452,
-0.09930471330881119,
0.3092355728149414,
-0.05879447981715202,
0.037354759871959686,
-0.06906795501708984,
-0.3011075258255005,
-0.18241342902183533,
-0.4067039489746094,
-0.4514847993850708,
-0.42922359704971313,
0.41656553745269775,
-0.252751886844635,
-0.05063258856... | |
I have a site that's mostly made in flash. And the flash triggers shadowbox. But when shadowbox kicks in, the site isn't visible behind the box.
Any thoughts?
If you want to change the contents of an existing PDF file and add extra content such as watermarks, pagenumbers, extra headers, PdfStamper is the object you n... | [
0.4646834135055542,
-0.0520482137799263,
0.5764214396476746,
-0.11338052153587341,
0.09635519981384277,
-0.10476560145616531,
0.36308610439300537,
0.13713477551937103,
0.004073416348546743,
-0.9061087965965271,
-0.009089237079024315,
0.6070177555084229,
-0.39396247267723083,
0.188518017530... | |
inputPdfStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read, FileShare.Read))
using (Stream inputImageStream = new FileStream("some_image.jpg", FileMode.Open, FileAccess.Read, FileShare.Read))
using (Stream outputPdfStream = new FileStream("result.pdf", FileMode.Create, FileAccess.Write,... | [
-0.21982404589653015,
-0.4624166190624237,
0.7812032699584961,
-0.03873879089951515,
-0.4131324887275696,
0.2495025098323822,
0.013016704469919205,
-0.5590906143188477,
-0.12491181492805481,
-0.761002242565155,
-0.18951469659805298,
0.513187825679779,
-0.41161999106407166,
-0.0240392498672... | |
Image image = Image.GetInstance(inputImageStream);
image.SetAbsolutePosition(100, 100);
pdfContentByte.AddImage(image);
stamper.Close();
}
}
}
```
When you insert the image you have the possibility to resize it. You can take a look at [transformation matrix](http://itex... | [
0.02108875848352909,
-0.16359303891658783,
0.7529998421669006,
-0.054395318031311035,
-0.08948902040719986,
0.08185551315546036,
-0.15503975749015808,
-0.30134713649749756,
-0.23813191056251526,
-0.7594869136810303,
-0.5288489460945129,
0.6073824763298035,
-0.27791380882263184,
-0.05609786... | |
How to build modular web site with Zend framework. I have pages in db, every page is represented as url. Every page has 1toN contents. Every content has controller, action and position (+other now not important columns). So, one request is one page and multiple contents (multiple actions). How can I build all actions b... | [
0.189697727560997,
0.07737327367067337,
0.4258004128932953,
-0.12602487206459045,
-0.31176912784576416,
0.18483121693134308,
0.10927006602287292,
-0.6873283386230469,
-0.32807648181915283,
-0.6907652020454407,
-0.02955070696771145,
0.3129778802394867,
-0.16787248849868774,
0.17027097940444... | |
called actions from layout view, but I do not like this approach:
```
foreach ($contents as $item) {
echo $this->action($item['action'], $item['controller'], null, array('content' => $item));
}
```
Thanks.
**p.s.**
adepretis's code is similar to my, views of my actions are run inside layout, which means that w... | [
0.029099147766828537,
-0.04336480796337128,
0.3561146557331085,
-0.17724478244781494,
-0.16320838034152985,
0.3977614939212799,
0.3072730302810669,
-0.605903148651123,
-0.40036362409591675,
-0.6842599511146545,
0.0476619228720665,
0.60758376121521,
-0.4198853075504303,
-0.04481763020157814... | |
I can do this easier please write it down.
I found my answer on other forum. Here is the asnwer:
**MyPlugin**
```
class MyPlugin extends Zend_Controller_Plugin_Abstract
{
public function routeStartup(Zend_Controller_Request_Abstract $request)
{
$action_stack = new Zend_Controller_Action_Helper_Action... | [
-0.1741226464509964,
-0.43202486634254456,
0.6539434790611267,
-0.14593181014060974,
-0.13942690193653107,
0.01510259322822094,
0.18773068487644196,
-0.5950737595558167,
-0.29968902468681335,
-0.5537823438644409,
-0.0980457067489624,
0.5228501558303833,
-0.3436205983161926,
-0.201265767216... | |
$action_stack->actionToStack('index', 'edo', 'default', array('position' => 'center'));
$action_stack->actionToStack('left', 'edo', 'default', array('position' => 'left'));
$action_stack->actionToStack('right', 'edo', 'default', array('position' => 'right'));
}
}
```
**BaseController**, that ever... | [
-0.4097253382205963,
-0.6444348692893982,
0.5439735651016235,
-0.025047680363059044,
0.22961391508579254,
0.06581305712461472,
0.20773103833198547,
-0.6353545188903809,
-0.35295870900154114,
-0.29624220728874207,
-0.6487480401992798,
0.6801475286483765,
-0.4747962951660156,
-0.080500282347... | |
}
}
```
**Layout**.phtml
```
<div>
<h2><u>LEFT:</u></h2>
<?=$this->layout()->left?>
</div>
<div>
<h2><u>CENTER:</u></h2>
<?=$this->layout()->center?>
</div>
<div>
<h2><u>RIGHT:</u></h2>
<?=$this->layout()->right?>
</div>
```
This is what I wanted, if anyone has a better solution please ans... | [
-0.13946247100830078,
0.06354031711816788,
0.4011377692222595,
-0.07298700511455536,
0.1689336746931076,
0.1506415158510208,
-0.3602501153945923,
-0.1905238777399063,
0.2757115364074707,
-0.8621994853019714,
-0.16959285736083984,
0.559349000453949,
-0.1975070983171463,
0.05331498757004738,... | |
Does the OnSessionStart / Session\_Start event still only fire once (total) in a server farm environment, or since requests are handled by multiple servers, could it fire up to once per server?
ASP.NET / IIS6 or 7
It should **not** be assumed that the server is using Sticky Sessions.
With a default installation of II... | [
0.03518256917595863,
-0.1519271731376648,
0.3935227394104004,
-0.10033038258552551,
0.12461211532354355,
-0.12163922190666199,
0.47334277629852295,
0.00019714797963388264,
-0.599550187587738,
-0.6714500188827515,
-0.3442479968070984,
0.543369710445404,
-0.3667283058166504,
0.16945154964923... | |
a server farm you are usually best off disabling Session state completely. Here is how you do it:
<http://support.microsoft.com/kb/306996>
If you do depend on Session your best option is probably the ASP.NET State Server Service. All the servers in your farm will use a single server for Session state, and that will en... | [
0.41314032673835754,
-0.2639836072921753,
0.10045312345027924,
-0.20166915655136108,
-0.16553731262683868,
-0.24303853511810303,
0.5331405401229858,
-0.2163412868976593,
-0.40038278698921204,
-0.9073638319969177,
0.02560378797352314,
0.5096181035041809,
-0.25106576085090637,
0.074455179274... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.