text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
and autonomous transactions).
> Can triggers be used correctly? Absolutely.
>
>
> The problem is - they are not used correctly in so
> many cases that I'd be willing to give
> up any perceived benefit just to get
> rid of the abuses (and bugs) caused by
> them. - Tom Kyte | [
0.4451625347137451,
0.029798146337270737,
-0.521378755569458,
0.38756757974624634,
0.010458940640091896,
-0.3040330708026886,
0.33470845222473145,
-0.21219761669635773,
-0.20382282137870789,
0.12898316979408264,
-0.22720572352409363,
0.689189612865448,
-0.4799787402153015,
-0.6043450832366... | |
I installed the wxWidgets source code, compiled it and am linking the libraries thus obtained with my application code. Now I need to use OpenGL in my wxWidgets application. How do I enable this?
For building on Windows with project files:
-------------------------------------------
Assume $(WXWIDGETSROOT) is the root directory of your wxWidgets installation.
1. Open the file $(WXWIDGETSROOT)\include\wx\msw\setup.h
2. Search for the `#define` for `wxUSE_GLCANVAS`.
3. Change its value from 0 to 1.
4. Recompile the library.
For building on Linux and other `./configure` based platforms:
--------------------------------------------------------------
Just use `./configure --with-opengl`
(A mashup answer from two partial answers given by others) | [
0.3204876482486725,
-0.12262523919343948,
0.6322197914123535,
-0.13876396417617798,
-0.09633849561214447,
-0.3792167603969574,
0.3679574131965637,
-0.05192175135016441,
0.10215073078870773,
-0.8881943225860596,
-0.1456010788679123,
0.7687071561813354,
-0.36436888575553894,
0.21141700446605... | |
I have over a million text files compressed into 40 zip files. I also have a list of about 500 model names of phones. I want to find out the number of times a particular model was mentioned in the text files.
Is there any python module which can do a regex match on the files without unzipping it. Is there a simple way to solve this problem without unzipping?
There's nothing that will automatically do what you want.
However, there is a python zipfile module that will make this easy to do. Here's how to iterate over the lines in the | [
0.48004814982414246,
0.13763107359409332,
0.2995031177997589,
0.1785445511341095,
0.21938306093215942,
0.12719222903251648,
0.08177253603935242,
-0.18702912330627441,
-0.22382132709026337,
-0.4896661937236786,
0.17872728407382965,
0.5839139819145203,
-0.419296532869339,
-0.0181648842990398... | |
file.
```
#!/usr/bin/python
import zipfile
f = zipfile.ZipFile('myfile.zip')
for subfile in f.namelist():
print subfile
data = f.read(subfile)
for line in data.split('\n'):
print line
``` | [
0.02960684709250927,
-0.327027291059494,
0.5503563284873962,
-0.05665479972958565,
0.20192505419254303,
0.3121434450149536,
0.06625165045261383,
-0.21636182069778442,
-0.2883760631084442,
-0.47208502888679504,
-0.6511343717575073,
0.3365713655948639,
-0.6760709881782532,
-0.262492895126342... | |
In my C/C++ program, I'm using [OpenCV](http://opencvlibrary.sourceforge.net/) to capture images from my webcam. The camera ([Logitech QuickCam IM](http://en.wikipedia.org/wiki/Quickcam)) can capture at resolutions **320x240**, **640x480** and **1280x960**. But, for some strange reason, OpenCV gives me images of resolution **320x240** only. Calls to change the resolution using **cvSetCaptureProperty()** with other resolution values just don't work. How do I capture images with the other resolutions possible with my webcam?
There doesn't seem to be a solution. The resolution can be increased to **640x480** using [this hack](http://tech.groups.yahoo.com/group/OpenCV/message/28735) shared by *lifebelt77*. Here are the details reproduced:
Add to **highgui.h**:
```
#define CV_CAP_PROP_DIALOG_DISPLAY 8
#define CV_CAP_PROP_DIALOG_FORMAT 9
#define CV_CAP_PROP_DIALOG_SOURCE 10
#define CV_CAP_PROP_DIALOG_COMPRESSION 11
#define | [
0.1685532033443451,
0.12137981504201889,
0.8514254689216614,
0.0442945770919323,
0.15071894228458405,
-0.03532712534070015,
-0.04917319118976593,
-0.23105460405349731,
-0.5655855536460876,
-0.7532274723052979,
0.08630482852458954,
0.836371123790741,
-0.2651990056037903,
-0.1306821256875991... | |
CV_CAP_PROP_FRAME_WIDTH_HEIGHT 12
```
Add the function **icvSetPropertyCAM\_VFW** to **cvcap.cpp**:
```
static int icvSetPropertyCAM_VFW( CvCaptureCAM_VFW* capture, int property_id, double value )
{
int result = -1;
CAPSTATUS capstat;
CAPTUREPARMS capparam;
BITMAPINFO btmp;
switch( property_id )
{
case CV_CAP_PROP_DIALOG_DISPLAY:
result = capDlgVideoDisplay(capture->capWnd);
//SendMessage(capture->capWnd,WM_CAP_DLG_VIDEODISPLAY,0,0);
break; | [
0.19127684831619263,
-0.32881447672843933,
1.0937509536743164,
-0.030938301235437393,
0.34337878227233887,
-0.04540606215596199,
-0.28407493233680725,
-0.556854248046875,
-0.5531749129295349,
-0.3450813889503479,
-0.28328484296798706,
0.860058605670929,
-0.31310024857521057,
0.192346468567... | |
case CV_CAP_PROP_DIALOG_FORMAT:
result = capDlgVideoFormat(capture->capWnd);
//SendMessage(capture->capWnd,WM_CAP_DLG_VIDEOFORMAT,0,0);
break;
case CV_CAP_PROP_DIALOG_SOURCE:
result = capDlgVideoSource(capture->capWnd);
//SendMessage(capture->capWnd,WM_CAP_DLG_VIDEOSOURCE,0,0);
break;
case CV_CAP_PROP_DIALOG_COMPRESSION: | [
0.03827163949608803,
-0.2908383905887604,
1.0357517004013062,
0.1464081108570099,
0.22477509081363678,
-0.1394486427307129,
-0.13366319239139557,
-0.31174981594085693,
-0.6065780520439148,
-0.32764479517936707,
-0.5616919994354248,
0.9456218481063843,
-0.24558277428150177,
0.14892013370990... | |
result = capDlgVideoCompression(capture->capWnd);
break;
case CV_CAP_PROP_FRAME_WIDTH_HEIGHT:
capGetVideoFormat(capture->capWnd, &btmp, sizeof(BITMAPINFO));
btmp.bmiHeader.biWidth = floor(value/1000);
btmp.bmiHeader.biHeight = value-floor(value/1000)*1000;
btmp.bmiHeader.biSizeImage = btmp.bmiHeader.biHeight * | [
-0.16195647418498993,
-0.20333905518054962,
0.8453978300094604,
-0.02343711443245411,
0.25176289677619934,
-0.015093309804797173,
-0.1418222337961197,
-0.6141818165779114,
-0.7682823538780212,
-0.3365482687950134,
-0.41950154304504395,
0.09860025346279144,
0.18260444700717926,
0.1054621413... | |
btmp.bmiHeader.biWidth * btmp.bmiHeader.biPlanes *
btmp.bmiHeader.biBitCount / 8;
capSetVideoFormat(capture->capWnd, &btmp, sizeof(BITMAPINFO));
break;
default:
break;
}
return result;
}
```
and edit **captureCAM\_VFW\_vtable** as following:
```
static CvCaptureVTable captureCAM_VFW_vtable =
{
6,
(CvCaptureCloseFunc)icvCloseCAM_VFW,
(CvCaptureGrabFrameFunc)icvGrabFrameCAM_VFW,
(CvCaptureRetrieveFrameFunc)icvRetrieveFrameCAM_VFW,
(CvCaptureGetPropertyFunc)icvGetPropertyCAM_VFW,
(CvCaptureSetPropertyFunc)icvSetPropertyCAM_VFW, // was NULL
(CvCaptureGetDescriptionFunc)0
};
```
Now rebuilt **highgui.dll**. | [
-0.08583560585975647,
0.01696253940463066,
0.5792220830917358,
-0.14752553403377533,
0.17493167519569397,
0.2183251976966858,
0.20283658802509308,
-0.6132561564445496,
-0.493827223777771,
-0.43726399540901184,
-0.3586108386516571,
0.6620494723320007,
-0.4509735405445099,
0.3298048079013824... | |
For example; with the old command prompt it would be:
```
cmd.exe /k mybatchfile.bat
```
Drop into a cmd instance (or indeed PowerShell itself) and type this:
```
powershell -?
```
You'll see that powershell.exe has a "-noexit" parameter which tells it not to exit after executing a "startup command". | [
-0.16442444920539856,
-0.07004235684871674,
0.2957425117492676,
-0.048542048782110214,
0.3995431065559387,
-0.2630501687526703,
0.23283831775188446,
0.30472639203071594,
-0.15361876785755157,
-0.5475988388061523,
-0.6581510305404663,
0.30668801069259644,
-0.4492036998271942,
0.244498908519... | |
I have a Flex swf hosted at <http://www.a.com/a.swf>.
I have a flash code on another doamin that tries loading the SWF:
```
_loader = new Loader();
var req:URLRequest = new URLRequest("http://services.nuconomy.com/n.swf");
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderFinish);
_loader.load(req);
```
On the onLoaderFinish event I try to load classes from the remote SWF and create them:
```
_loader.contentLoaderInfo.applicationDomain.getDefinition("someClassName") as Class
```
When this code runs I get the following exception
```
SecurityError: Error #2119: Security sandbox violation: caller http://localhost.service:1234/flashTest/Main.swf cannot access LoaderInfo.applicationDomain owned by http://www.b.com/b.swf.
at flash.display::LoaderInfo/get applicationDomain()
at NuconomyLoader/onLoaderFinish()
```
Is there any way to get this code working?
This is all described in [The Adobe Flex 3 Programming ActionScript 3 PDF](http://livedocs.adobe.com/flex/3/progAS_flex3.pdf) on page 550 (Chapter | [
0.22576898336410522,
-0.009476969949901104,
0.33125022053718567,
-0.3159138560295105,
-0.35125404596328735,
-0.12072481960058212,
0.4761299788951874,
-0.2339753806591034,
-0.36403322219848633,
-0.6503738164901733,
-0.21408389508724213,
0.641308069229126,
-0.24824507534503937,
0.14383120834... | |
27: Flash Player Security / Cross-scripting):
> If two SWF files written with ActionScript 3.0 are served from different domains—for example, <http://siteA.com/swfA.swf> and <http://siteB.com/swfB.swf>—then, by default, Flash Player does not allow swfA.swf to script swfB.swf, nor swfB.swf to script swfA.swf. A SWF file gives permission to SWF files from other domains by calling Security.allowDomain(). By calling Security.allowDomain("siteA.com"), swfB.swf gives SWF files from siteA.com permission to script it.
It goes on in some more detail, with diagrams and all. | [
0.003968693781644106,
0.08139462769031525,
0.5578888654708862,
-0.46087512373924255,
-0.18448799848556519,
-0.2667844295501709,
0.1488954722881317,
-0.17899000644683838,
-0.19224807620048523,
-0.5162408947944641,
-0.3077707588672638,
0.297325074672699,
-0.5019516944885254,
-0.1075634583830... | |
I am converting from existing CVS repository to SVN repository. CVS repository has few brances and I'd like to rename branches while converting.
Wanted conversion is like this:
```
CVS branch SVN branch
HEAD -> branches/branchX
branchA -> trunk
branchB -> branches/branchB
branchC -> branches/branchC
```
That is, CVS HEAD becomes a normal branch and CVS branchA becomes SVN trunk.
Both CVS and SVN repositories will be | [
-0.0032756049185991287,
-0.2990038990974426,
0.47130098938941956,
0.1009901911020279,
-0.010842321440577507,
-0.0749390721321106,
0.09826990216970444,
0.28136688470840454,
-0.17452748119831085,
-0.3211071789264679,
-0.2837252616882324,
0.2708934247493744,
0.06562349945306778,
0.81298452615... | |
on same linux machine.
How could this be done?
Also conversion where CVS branchA becomes SVN trunk and all other CVS branches are ignored might be enough.
> I am especially interested in preserving commit history. If I rename and move branches around in SVN after the conversion, will the history be preserved?
Yes. Subversion also keeps track of changes to the directory structure, and all version history is preserved even if a file is moved in the tree.
I recommend converting the repository with [cvs2svn](http://cvs2svn.tigris.org/), including branches and tags. Once the repository is in Subversion you can move the branches and tags | [
0.49262118339538574,
-0.27695393562316895,
0.20070034265518188,
0.07066679000854492,
-0.09367332607507706,
-0.453836590051651,
0.3549576997756958,
0.2067703753709793,
-0.48988601565361023,
-0.5997380018234253,
-0.21102654933929443,
0.6661333441734314,
-0.145062655210495,
0.4294358491897583... | |
around as you wish. This also keeps the history of the actual tags and branches being renamed, which may be interesting in a historical context later. | [
0.76158207654953,
-0.21304485201835632,
0.42594724893569946,
0.061235010623931885,
0.05392725020647049,
-0.5174534320831299,
0.4834056794643402,
0.2986767888069153,
-0.6663133502006531,
0.009042182937264442,
-0.1738983690738678,
-0.1334383338689804,
-0.06442371010780334,
0.2936021983623504... | |
With the *Visual Studio 2005 C++ compiler*, I get the following warning when my code uses the `fopen()` and such calls:
```none
1>foo.cpp(5) : warning C4996: 'fopen' was declared deprecated
1> c:\program files\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen'
1> Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
```
How do I prevent this?
It looks like Microsoft has deprecated lots of calls which use buffers to improve code security. However, the solutions they're providing aren't portable. | [
-0.1601341962814331,
0.48741382360458374,
0.36960700154304504,
-0.3475532531738281,
-0.13765504956245422,
-0.10631921142339706,
0.5320180654525757,
-0.06978952139616013,
-0.21678267419338226,
-0.42582252621650696,
-0.26327624917030334,
0.6114928126335144,
-0.3741857409477234,
0.25521641969... | |
Anyway, if you aren't interested in using the secure version of their calls (like **fopen\_s**), you need to place a definition of **\_CRT\_SECURE\_NO\_DEPRECATE** before your included header files. For example:
```
#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
```
The preprocessor directive can also be added to your project settings to effect it on all the files under the project. To do this add **\_CRT\_SECURE\_NO\_DEPRECATE** to *Project Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions*. | [
0.1953173726797104,
0.10881397873163223,
0.3305349349975586,
0.10159429162740707,
0.15761037170886993,
-0.30852794647216797,
-0.14784875512123108,
-0.11478285491466522,
-0.061538275331258774,
-0.8467785716056824,
-0.34939566254615784,
0.6392401456832886,
-0.08701412379741669,
0.11841198801... | |
I want to use the functions exposed under the OpenGL extensions. I'm on Windows, how do I do this?
**Easy solution**: Use [GLEW](http://glew.sourceforge.net/). See how [here](https://stackoverflow.com/questions/17370/using-glew-to-use-opengl-extensions-under-windows).
**Hard solution**:
If you have a **really strong reason** not to use GLEW, here's how to achieve the same without it:
Identify the OpenGL extension and the extension APIs you wish to use. OpenGL extensions are listed in the [OpenGL Extension Registry](http://www.opengl.org/registry/).
> Example: I wish to use the capabilities of the [EXT\_framebuffer\_object](http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt) extension. The APIs I wish to use from this extension are:
```
glGenFramebuffersEXT()
glBindFramebufferEXT()
glFramebufferTexture2DEXT()
glCheckFramebufferStatusEXT()
glDeleteFramebuffersEXT()
```
Check if your graphic card supports the extension you wish to use. If it does, then | [
0.3845183551311493,
0.23573200404644012,
0.7822360992431641,
-0.036686673760414124,
0.08694332093000412,
0.02252921648323536,
0.09437345713376999,
-0.15914863348007202,
-0.22455935180187225,
-0.9350859522819519,
-0.3242315649986267,
0.8155838847160339,
-0.16494859755039215,
0.0013376203132... | |
your work is almost done! Download and install the latest drivers and SDKs for your graphics card.
> Example: The graphics card in my PC is a **NVIDIA 6600 GT**. So, I visit the [NVIDIA OpenGL Extension Specifications](http://developer.nvidia.com/object/nvidia_opengl_specs.html) webpage and find that the [EXT\_framebuffer\_object](http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_framebuffer_object.txt) extension is supported. I then download the latest [NVIDIA OpenGL SDK](http://developer.nvidia.com/object/sdk_home.html) and install it.
Your graphic card manufacturer provides a **glext.h** header file (or a similarly named header file) with all the declarations needed to use the supported OpenGL extensions. (Note that not all extensions might be supported.) Either place this header file somewhere your compiler can pick | [
0.6507668495178223,
0.07415179908275604,
0.7905787229537964,
0.052644941955804825,
-0.03887557238340378,
-0.07464901357889175,
-0.07076046615839005,
-0.036756958812475204,
-0.3961140215396881,
-1.0462393760681152,
-0.17496167123317719,
0.64179927110672,
0.21314974129199982,
0.1010584533214... | |
it up or include its directory in your compiler's include directories list.
Add a `#include <glext.h>` line in your code to include the header file into your code.
Open **[glext.h](http://oss.sgi.com/projects/ogl-sample/ABI/glext.h)**, find the API you wish to use and grab its corresponding *ugly-looking* declaration.
> Example: I search for the above framebuffer APIs and find their corresponding ugly-looking declarations:
```
typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); for GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
```
All this means is that your header file has the API declaration in 2 forms. One is a wgl-like ugly function pointer declaration. The other is a sane looking function declaration.
For | [
0.40371793508529663,
-0.008237254805862904,
0.48996055126190186,
-0.056840915232896805,
-0.11415798962116241,
0.1381579339504242,
0.17985892295837402,
-0.1696786731481552,
-0.08532978594303131,
-0.5494250059127808,
-0.15598060190677643,
0.44695013761520386,
-0.632962703704834,
0.1576052457... | |
each extension API you wish to use, add in your code declarations of the function name as a type of the ugly-looking string.
> Example:
```
PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
```
Though it looks ugly, all we're doing is to declare function pointers of the type corresponding to the extension API.
Initialize these function pointers with their rightful functions. These functions are exposed by the library or driver. We need to use **wglGetProcAddress()** function to do this.
> Example:
```
glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC) wglGetProcAddress("glGenFramebuffersEXT");
glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC) wglGetProcAddress("glBindFramebufferEXT");
glFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) wglGetProcAddress("glFramebufferTexture2DEXT");
glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) wglGetProcAddress("glCheckFramebufferStatusEXT");
glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC) wglGetProcAddress("glDeleteFramebuffersEXT");
```
Don't forget to check the function pointers for *NULL*. If by chance | [
0.06076281890273094,
0.09936531633138657,
0.8459357619285583,
-0.2980937361717224,
-0.06350462138652802,
0.060708630830049515,
0.249113991856575,
-0.48106440901756287,
-0.07236295193433762,
-0.4082294702529907,
-0.4388492703437805,
0.6767494082450867,
-0.6533393859863281,
0.268936365842819... | |
**wglGetProcAddress()** couldn't find the extension function, it would've initialized the pointer with NULL.
> Example:
```
if (NULL == glGenFramebuffersEXT || NULL == glBindFramebufferEXT || NULL == glFramebufferTexture2DEXT
|| NULL == glCheckFramebufferStatusEXT || NULL == glDeleteFramebuffersEXT)
{
// Extension functions not loaded!
exit(1);
}
```
That's it, we're done! You can now use these function pointers just as if the function calls existed.
> Example:
```
glGenFramebuffersEXT(1, &fbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, colorTex[0], 0);
```
**Reference:** [Moving Beyond OpenGL 1.1 for Windows](http://www.gamedev.net/reference/articles/article1929.asp) by Dave Astle — The article is a bit dated, but has all the information you need to understand why this pathetic | [
0.2668726444244385,
0.0323951430618763,
0.6122245192527771,
-0.13607622683048248,
0.32897675037384033,
-0.19264915585517883,
0.4494248032569885,
-0.04747212305665016,
-0.3334277868270874,
-0.47310227155685425,
-0.543992817401886,
0.5507183074951172,
-0.3098200857639313,
0.40795308351516724... | |
situation exists on Windows and how to get around it. | [
0.22087079286575317,
0.29717010259628296,
0.26684918999671936,
0.3293975591659546,
0.2832253873348236,
0.025466376915574074,
0.08544819802045822,
0.020460015162825584,
-0.31934577226638794,
-0.9782745838165283,
-0.12175648659467697,
0.2704486846923828,
0.1203320324420929,
-0.03733912855386... | |
I would really like to see a proportional font IDE, even if I have to build it myself (perhaps as an extension to Visual Studio). What I basically mean is MS Word style editing of code that sort of looks like the typographical style in [The C++ Programming Language book](http://www.research.att.com/~bs/3rd.html).
I want to set tab stops for my indents and lining up function signatures and rows of assignment statements, which could be specified in points instead of fixed character positions. I would also like bold and italics. Various font sizes and even style sheets would be cool.
Has anyone seen anything like | [
0.419219046831131,
0.11337421834468842,
0.20856010913848877,
0.024078892543911934,
-0.40135419368743896,
0.09638453274965286,
-0.17452310025691986,
0.075267493724823,
-0.17064297199249268,
-0.6004921197891235,
0.17587018013000488,
0.408903568983078,
0.044677771627902985,
-0.207010999321937... | |
this out there or know the best way to start building one?
I'd still like to see a popular editor or IDE implement [elastic tabstops](http://nickgravgaard.com/elastictabstops/). | [
0.5045113563537598,
-0.34600716829299927,
0.35065191984176636,
0.21645601093769073,
-0.24119572341442108,
-0.2764810621738434,
0.42737847566604614,
0.527755081653595,
-0.5652464628219604,
-0.3393228054046631,
0.0374540351331234,
0.4446563422679901,
0.021508824080228806,
-0.2137282490730285... | |
I've been using Subversion for code control with TortoiseSVN to interface with the server for the past few months, and in general it's been going great! However, occasionally my FoxPro IDE will change the case of a file extension without warning where "*program.prg*" becomes "*program.**PRG***") TortoiseSVN apparently takes this to mean the first file was removed, becoming flagged as "missing" and the second name comes up as "non-versioned", wreaking havoc on my ability to track changes to the file. I understand that Subversion has it origins in the case-sensitive world of \*nix but, is there any way to control this | [
0.11600511521100998,
-0.08495823293924332,
0.3390103280544281,
-0.1989503800868988,
-0.10979413986206055,
-0.1024496778845787,
0.22765670716762543,
0.2816038131713867,
-0.7107067108154297,
-0.327649861574173,
-0.10820434987545013,
0.5247319936752319,
-0.29869920015335083,
0.429226130247116... | |
behavior in either Subversion or TortoiseSVN to be file name case-insensitive when used with Windows?
Unfortunately, Subversion is case-sensitive. This is due to the fact that files from Subversion can be checked out on both case-sensitive file systems (e.g., \*nix) and case-insensitive file systems (e.g., Windows, Mac).
[This pre-commit hook script](http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/case-insensitive.py) may help you avoid problems when you check in files. If it doesn't solve your problem, my best suggestion is to write a little script to make sure that all extensions are lowercase and run it every time before you check in/check out. It'll be a PITA, but maybe your best | [
0.07821904122829437,
-0.24678775668144226,
0.16538354754447937,
-0.17597627639770508,
-0.05518731102347374,
-0.28302064538002014,
0.6090368628501892,
0.19934217631816864,
-0.3143936097621918,
-0.38450273871421814,
-0.2960127294063568,
0.4135035276412964,
-0.38182491064071655,
-0.0056141996... | |
bet. | [
0.3646358549594879,
0.03722720965743065,
0.16470001637935638,
0.272568017244339,
0.32463136315345764,
0.034849025309085846,
-0.4014715850353241,
-0.027267437428236008,
0.17219483852386475,
-0.45781823992729187,
0.2073928415775299,
0.6847479939460754,
0.1671631932258606,
-0.1337487250566482... | |
I'm trying to retrieve a file from a server using SFTP (as opposed to FTPS) using Java. How can I do this?
Another option is to consider looking at the [JSch library](http://www.jcraft.com/jsch/ "JSch library"). JSch seems to be the preferred library for a few large open source projects, including Eclipse, Ant and Apache Commons HttpClient, amongst others.
It supports both user/pass and certificate-based logins nicely, as well as all a whole host of other yummy SSH2 features.
Here's a simple remote file retrieve over SFTP. Error handling is left as an exercise for the reader :-)
```
JSch jsch = new JSch();
String knownHostsFilename = "/home/username/.ssh/known_hosts";
jsch.setKnownHosts( | [
0.19461214542388916,
-0.004075862467288971,
0.25019165873527527,
-0.19069579243659973,
-0.1559312492609024,
-0.248360738158226,
0.46264588832855225,
-0.05156978592276573,
-0.16125908493995667,
-0.8677123188972473,
-0.34764599800109863,
0.15004809200763702,
-0.12991228699684143,
0.136552348... | |
knownHostsFilename );
Session session = jsch.getSession( "remote-username", "remote-host" );
{
// "interactive" version
// can selectively update specified known_hosts file
// need to implement UserInfo interface
// MyUserInfo is a swing implementation provided in
// examples/Sftp.java in the JSch dist
UserInfo ui = new MyUserInfo();
session.setUserInfo(ui);
// OR non-interactive version. Relies in host key being in known-hosts file
session.setPassword( "remote-password" );
}
session.connect();
Channel channel = session.openChannel( "sftp" );
channel.connect();
ChannelSftp sftpChannel = (ChannelSftp) channel;
sftpChannel.get("remote-file", "local-file" );
// OR
InputStream in = sftpChannel.get( "remote-file" );
// process inputstream as needed
sftpChannel.exit();
session.disconnect();
``` | [
-0.024788834154605865,
-0.24305346608161926,
0.8394176959991455,
-0.3066244423389435,
-0.14530429244041443,
-0.2601226568222046,
0.2473755180835724,
-0.43354514241218567,
-0.38694944977760315,
-0.5093802213668823,
-0.2566203474998474,
0.20585176348686218,
-0.3456229567527771,
0.33370205760... | |
What's the best way of implementing a multiple choice option in Windows Forms? I want to enforce a single selection from a list, starting with a default value.
It seems like a ComboBox would be a good choice, but is there a way to specify a non-blank default value?
I could just set it in the code at some appropriate initialisation point, but I feel like I'm missing something.
If you only want one answer from the group, then a RadioButton control would be your best fit or you could use the ComboBox if you will have a lot of options. | [
0.4543535113334656,
-0.33513155579566956,
0.18713541328907013,
0.184702530503273,
0.06278041005134583,
0.027504095807671547,
0.0607093907892704,
-0.3944803774356842,
-0.08367398381233215,
-0.5173398852348328,
0.01611701026558876,
1.005237102508545,
-0.31312429904937744,
-0.1317780464887619... | |
To set a default value, just add the item to the ComboBox's collection and set the SelectedIndex or SelectedItem to that item.
Depending on how many options you are looking at, you can use a ListBox with the SelectionMode property set to MultiSimple, if it will be multiple choice or you could use the CheckBox control. | [
0.07623003423213959,
-0.9351511597633362,
0.24159584939479828,
0.3001425564289093,
0.03921710327267647,
-0.033073920756578445,
-0.1731019914150238,
-0.24008946120738983,
-0.22870546579360962,
-0.7129431962966919,
0.036390773952007294,
0.447637677192688,
-0.3986639678478241,
0.0268347375094... | |
When I create a new project (or even when I edit the Sample Project) there is no way to add Description to the project.
Or am I blind to the obvious?
There's no such thing as a project description, really. There's a column in the Projects page which is used so you can see which project is the default, built-in inbox, and we couldn't think of anything better to put as the column header for that column. | [
0.8405091762542725,
0.23967337608337402,
-0.15033568441867828,
0.12252679467201233,
-0.12972991168498993,
-0.09286370128393173,
0.12154152244329453,
0.18809615075588226,
-0.15398581326007843,
-0.7042881846427917,
0.06233900040388107,
0.25787612795829773,
0.03521110862493515,
0.214652374386... | |
I've looked at several URL rewriters for ASP.Net and IIS and was wondering what everyone else uses, and why.
Here are the ones that I have used or looked at:
* [ThunderMain URLRewriter](http://www.codeproject.com/KB/aspnet/urlrewriter.aspx): used in a previous project, didn't quite have the flexibility/performance we were looking for
* [Ewal UrlMapper](http://web.archive.org/web/20070202012119/blog.ewal.net/2004/04/14/a-url-redirecting-url-rewriting-httpmodule/): used in a current project, but source seems to be abandoned
* [UrlRewritingNet.UrlRewrite](http://www.urlrewriting.net/149/en/home.html): seems like a decent library but documentation's poor grammar leaves me feeling uneasy
* [UrlRewriter.NET](http://urlrewriter.net/): this is my current fav, has great flexibility, although the extra functions pumped into the replacement regexs changes the standard .Net regex syntax a bit
* [Managed | [
0.017277792096138,
0.12000472843647003,
0.4699513912200928,
0.08715188503265381,
-0.11147325485944748,
-0.10886254906654358,
0.2969508767127991,
-0.2717193365097046,
-0.25225192308425903,
-0.4602726697921753,
0.004683964420109987,
0.31362229585647583,
-0.07396630197763443,
-0.0822509005665... | |
Fusion URL Rewriter](http://www.managedfusion.com/products/url-rewriter/): I found this one in a [previous question](https://stackoverflow.com/questions/2262/aspnet-url-rewriting#2268) on stack overflow, but haven't tried it out yet, from the example syntax, it doesn't seem to be editable via web.config
+1 UrlRewritingNET.URLRewrite -- used in several hundred services/portals/sites on a single box without issue for years! (@Jason -- that is the one you're talking about, right?)
and I've also used the URLRewriter.NET on a personal site, and found it, ah, interesting. @travis, you're right about the changed syntax, but once you get used to it, it's good. | [
0.18280383944511414,
0.25127682089805603,
0.5260177254676819,
-0.055547066032886505,
0.038546472787857056,
-0.20694079995155334,
-0.10536129772663116,
-0.05411534756422043,
-0.49295496940612793,
-0.486576110124588,
0.1184217557311058,
0.3800826072692871,
0.04505133256316185,
0.131710216403... | |
When I try to precompile a \*.pc file that contains a #warning directive I recieve the following error:
> PCC-S-02014, Encountered the symbol "warning" when expecting one of the following: (bla bla bla).
Can I somehow convince Pro\*C to ignore the thing if it doesn't know what to do with it? I can't remove the `#warning` directive as it's used in a header file that I can't change and must include.
According to the *Pro\*C/C++ Programmer's Guide* (chapter 5 "Advanced Topics"), Pro\*C silently ignores a number of preprocessor directives including #error and #pragma, but sadly not #warning. Since your warning directives are included | [
0.19919410347938538,
0.13600300252437592,
0.023235468193888664,
-0.21233601868152618,
0.23246434330940247,
-0.2242182046175003,
0.4706074297428131,
0.02587781473994255,
-0.2559620141983032,
-0.40252017974853516,
-0.2790018916130066,
0.559433102607727,
-0.3833702504634857,
0.079783879220485... | |
in a header file, you might be able to use the ORA\_PROC macro:
```
#ifndef ORA_PROC
#include <irrelevant.h>
#endif
```
For some reason, Pro\*C errors out if you try to hide a straight #warning that way, however. | [
0.3963482975959778,
0.03316382318735123,
-0.02938876673579216,
-0.209481343626976,
0.13811706006526947,
-0.2262316793203354,
0.10006146878004074,
0.17021046578884125,
-0.20233699679374695,
-0.3942457437515259,
-0.26904720067977905,
0.5045691132545471,
-0.4515814185142517,
0.010087643750011... | |
**Bounty:** I will send $5 via paypal for an answer that fixes this problem for me.
I'm not sure what VS setting I've changed or if it's a web.config setting or what, but I keep getting this error in the error list and yet all solutions build fine. Here are some examples:
```
Error 5 'CompilerGlobalScopeAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. C:\projects\MyProject\Web\Controls\EmailStory.ascx 609 184 C:\...\Web\
Error 6 'ArrayList' is ambiguous in the namespace 'System.Collections'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 13 28 C:\...\Web\
Error 7 'Exception' is ambiguous in the namespace 'System'. | [
0.2021375596523285,
0.34785133600234985,
0.27914848923683167,
0.11448414623737335,
-0.025965766981244087,
0.16200262308120728,
0.34503284096717834,
-0.15684688091278076,
-0.5622809529304504,
-0.6203418374061584,
0.021677769720554352,
0.5585276484489441,
-0.2743234932422638,
0.0537985190749... | |
C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 37 21 C:\...\Web\
Error 8 'EventArgs' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 47 64 C:\...\Web\
Error 9 'EventArgs' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 140 72 C:\...\Web\
Error 10 'Array' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\Controls\EmailStory.ascx.vb 147 35 C:\...\Web\
[...etc...]
Error 90 'DateTime' is ambiguous in the namespace 'System'. C:\projects\MyProject\Web\App_Code\XsltHelperFunctions.vb 13 8 C:\...\Web\
```
As you can imagine, it's really annoying since there are blue | [
-0.3744361996650696,
0.15389055013656616,
0.2500109076499939,
-0.17681993544101715,
0.28854456543922424,
0.05479208007454872,
0.37987589836120605,
0.4227754473686218,
-0.4440799653530121,
-0.7391115427017212,
-0.3672502934932709,
0.3941873610019684,
-0.27426841855049133,
0.1454388052225113... | |
squiggly underlines everywhere in the code, and filtering out relevant errors in the Error List pane is near impossible. I've checked the default ASP.Net web.config and machine.config but nothing seemed to stand out there.
---
*Edit:* Here's some of the source where the errors are occurring:
```
'Error #5: whole line is blue underlined'
<%= addEmailToList.ToolTip %>
'Error #6: ArrayList is blue underlined'
Private _emails As New ArrayList()
'Error #7: Exception is blue underlined'
Catch ex As Exception
'Error #8: System.EventArgs is blue underlined'
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Error #9: System.EventArgs is blue underlined'
Protected Sub sendMessage_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles | [
-0.6262930631637573,
0.03762958198785782,
0.6182860732078552,
-0.04152247682213783,
-0.17282962799072266,
0.3493487238883972,
0.32578834891319275,
0.089961476624012,
-0.2967873215675354,
-0.6175017356872559,
-0.18307751417160034,
0.33472350239753723,
-0.49358105659484863,
0.171804443001747... | |
sendMessage.Click
'Error #10: Array is blue underlined'
Me.emailSentTo.Text = Array.Join(";", mailToAddresses)
'Error #90: DateTime is blue underlined'
If DateTime.TryParse(data, dateValue) Then
```
---
*Edit*: GacUtil results
```
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil -l mscorlib
Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4318.0
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
The Global Assembly Cache contains the following assemblies:
The cache of ngen files contains the following entries:
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c5619
34e089, Custom=5a00410050002d004e0035002e0031002d003800460053002d003700430039004
40037004500430036000000
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c5619
34e089, Custom=5a00410050002d004e0035002e0031002d0038004600440053002d00370043003
900450036003100370035000000
Number of items = 2
```
```
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil" -l mscorlib
Microsoft (R) .NET Global Assembly Cache Utility. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All | [
-0.4242950975894928,
0.41347286105155945,
0.33876681327819824,
-0.12054678797721863,
-0.14245577156543732,
0.23490652441978455,
0.3298569917678833,
0.11409090459346771,
-0.47268927097320557,
-0.2104882448911667,
-0.27765581011772156,
0.2645423710346222,
-0.5721282362937927,
0.3786477446556... | |
rights reserved.
The Global Assembly Cache contains the following assemblies:
Number of items = 0
```
---
*Edit*: interesting results from ngen:
```
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen display mscorlib /verbose
Microsoft (R) CLR Native Image Generator - Version 2.0.50727.832
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
NGEN Roots:
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=5a00410050002d004e0035002e0031002d003800460053002d00330037004200430043003300430035000000
ScenarioDefault
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=5a00410050002d004e0035002e0031002d003800460053002d00330037004200430043003300430035000000
DisplayName = mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Native image = {7681CE0F-F0E7-F03A-2B56-96345589D82B} | [
-0.6477707624435425,
0.3569900691509247,
0.3037956655025482,
0.1714683622121811,
0.19814808666706085,
0.21913501620292664,
0.4137638509273529,
0.03766370564699173,
-0.4865856468677521,
-0.13418202102184296,
-0.27457982301712036,
0.3755365312099457,
-0.45691224932670593,
0.34766682982444763... | |
Hard Dependencies:
Soft Dependencies:
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ScenarioNoDependencies
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
DisplayName = mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Native image = {7681CE0F-F0E7-F03A-2B56-96345589D82B}
Hard Dependencies:
Soft Dependencies:
NGEN Roots that depend on | [
-1.0268487930297852,
-0.1790301352739334,
0.24999091029167175,
0.06984319537878036,
0.33339542150497437,
0.40205445885658264,
0.29403501749038696,
0.15629525482654572,
-0.30058392882347107,
-0.5569122433662415,
-0.34459391236305237,
0.9621610641479492,
-0.047497253865003586,
0.111479498445... | |
"mscorlib":
[...a bunch of stuff...]
Native Images:
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug info> <no debugger> <no profiler> <no instrumentation>
Granted | [
-1.0282061100006104,
0.010312843136489391,
0.9669615030288696,
-0.027034083381295204,
0.1974584460258484,
0.015353120863437653,
0.3773767948150635,
-0.044428352266550064,
-0.3810611367225647,
-0.22694554924964905,
-0.349019855260849,
0.5256730318069458,
-0.21311061084270477,
0.077063098549... | |
set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089:
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT
Processor: x86(Pentium | [
-0.5568738579750061,
0.04004582017660141,
0.46496614813804626,
0.1186290979385376,
0.21951840817928314,
0.03765121474862099,
0.29180288314819336,
-0.41342899203300476,
-0.11666524410247803,
-0.5308810472488403,
-0.44000372290611267,
0.7091315984725952,
-0.2896743714809418,
0.19220554828643... | |
4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug info> <no debugger> <no profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089:
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3} | [
-0.5299802422523499,
0.027542613446712494,
0.7893638610839844,
0.3252280056476593,
0.3123359680175781,
-0.03450094908475876,
0.5497606992721558,
-0.5118828415870667,
-0.4449515640735626,
-0.40578216314315796,
-0.2841460406780243,
0.7336106896400452,
-0.19557109475135803,
0.2766347229480743... | |
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug info> <no debugger> <no profiler> <no instrumentation> | [
-0.48765021562576294,
0.08217249065637589,
0.48867058753967285,
-0.188321053981781,
0.25984105467796326,
0.13039076328277588,
0.6037691831588745,
-0.11229678988456726,
-0.1810096651315689,
-0.45721256732940674,
-0.15989772975444794,
0.6432799696922302,
-0.1813601553440094,
0.06351943314075... | |
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089:
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT | [
-0.5225487351417542,
0.11787960678339005,
0.6776471734046936,
0.4898119568824768,
0.30800455808639526,
-0.1571178436279297,
0.24790915846824646,
-0.5676793456077576,
-0.02146974951028824,
-0.339255690574646,
-0.43285974860191345,
0.4714304208755493,
0.11593605577945709,
0.3021056354045868,... | |
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug info> <no debugger> <no profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089: | [
-0.5892703533172607,
-0.025641916319727898,
0.5161406397819519,
0.14554664492607117,
0.34893980622291565,
0.28205791115760803,
0.43246665596961975,
-0.2399759143590927,
-0.33054572343826294,
-0.41542479395866394,
-0.3281060755252838,
0.5061931014060974,
-0.1590808928012848,
0.2265221774578... | |
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug info> <no debugger> <no | [
-0.6297488212585449,
-0.08923181146383286,
0.5494616627693176,
-0.06463633477687836,
0.2239055186510086,
0.07539509981870651,
0.5884481072425842,
-0.08230996131896973,
-0.09823420643806458,
-0.5556777119636536,
-0.1963735669851303,
0.7070184350013733,
-0.25935935974121094,
0.12360741198062... | |
profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089:
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: | [
-0.4916302561759949,
0.035552360117435455,
0.6845424175262451,
0.08407876640558243,
0.0859057754278183,
0.055931299924850464,
0.3176213204860687,
-0.41048306226730347,
0.049528568983078,
-0.7350974082946777,
-0.15341539680957794,
0.766191303730011,
-0.08005865663290024,
0.2014591097831726,... | |
WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug info> <no debugger> <no profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089: | [
-0.8502070903778076,
-0.11148097366094589,
0.2625022530555725,
0.2065700739622116,
0.2836359441280365,
0.23494496941566467,
0.27800288796424866,
-0.13555437326431274,
0.19117902219295502,
-0.49533969163894653,
-0.2802223265171051,
0.7734166979789734,
-0.0026206073816865683,
0.0314337648451... | |
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug | [
-0.6156115531921387,
-0.08972645550966263,
0.5194491744041443,
-0.09434846043586731,
0.23341786861419678,
0.0817340835928917,
0.5983888506889343,
-0.05542018264532089,
-0.05827309191226959,
-0.5868558287620544,
-0.21247704327106476,
0.7319766879081726,
-0.25600558519363403,
0.1347671896219... | |
info> <no debugger> <no profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089:
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B} | [
-0.5112219452857971,
-0.017781969159841537,
0.4489075541496277,
0.4634501338005066,
0.5367963314056396,
-0.02121943049132824,
0.3933153748512268,
-0.24421994388103485,
0.033034272491931915,
-0.41935470700263977,
-0.18741653859615326,
0.6961328983306885,
-0.2849167585372925,
0.2864335775375... | |
OS: WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug info> <no debugger> <no profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089: | [
-0.9238052368164062,
-0.09521377831697464,
0.4116523861885071,
0.17201586067676544,
0.38093021512031555,
0.20557963848114014,
0.2758944034576416,
-0.059756193310022354,
0.017111118882894516,
-0.7625362873077393,
-0.32067131996154785,
0.7984556555747986,
-0.13593965768814087,
0.100057758390... | |
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: | [
-0.5948268175125122,
-0.11977235227823257,
0.5038811564445496,
-0.05525640770792961,
0.27987778186798096,
0.11705953627824783,
0.514931321144104,
-0.1107468381524086,
-0.10652540624141693,
-0.5902445316314697,
-0.1973060965538025,
0.7090504765510559,
-0.18784107267856598,
0.087469145655632... | |
<no debug info> <no debugger> <no profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089:
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: | [
-0.5050838589668274,
0.29744333028793335,
0.37127527594566345,
0.16283445060253143,
0.2509251832962036,
-0.0384843684732914,
0.5435327291488647,
-0.3365631401538849,
-0.050021544098854065,
-0.3584239184856415,
-0.3543856143951416,
0.46081212162971497,
-0.2553209066390991,
0.374033540487289... | |
{7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags:
Scenarios: <no debug info> <no debugger> <no profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, | [
-0.6878004670143127,
-0.04661771282553673,
0.48868346214294434,
0.28580325841903687,
0.442234605550766,
0.0690075010061264,
0.45784443616867065,
-0.29924649000167847,
-0.24548104405403137,
-0.5827351212501526,
-0.3159123957157135,
0.6605017185211182,
-0.0944918617606163,
0.2880960404872894... | |
PublicKeyToken=b77a5c561934e089:
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Source MVID: {D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Source HASH: bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
NGen GUID sign: {7681CE0F-F0E7-F03A-2B56-96345589D82B}
OS: WinNT
Processor: x86(Pentium 4) (features: 00008001)
Runtime: 2.0.50727.832
mscorwks.dll: TimeStamp=461F2E2A, CheckSum=00566DC9
Flags: | [
-0.7553719878196716,
-0.15438951551914215,
0.2822483479976654,
0.0855056568980217,
0.05408196523785591,
0.17823626101016998,
0.6103784441947937,
0.04318232461810112,
-0.12287980318069458,
-0.3406839072704315,
-0.15848256647586823,
0.4138089418411255,
-0.2095516175031662,
0.3914622068405151... | |
Scenarios: <no debug info> <no debugger> <no profiler> <no instrumentation>
Granted set: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>
File:
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\0fce8176e7f03af02b5696345589d82b\mscorlib.ni.dll
Dependencies:
mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089:
Guid:{D34102CF-2ABF-4004-8B42-2859D8FF27F3}
Sign:bbf5cfc19bea4e13889e39eb1fb72479a45ad0ec
```
There should only be one mscorlib in the native images, correct? How can I get rid of the others?
Based on the results of your | [
-0.3407762050628662,
0.06803452968597412,
0.36284875869750977,
0.3417000472545624,
0.405171275138855,
-0.08273821324110031,
0.49292153120040894,
-0.1444603055715561,
-0.4021309018135071,
-0.5081101059913635,
-0.2933955788612366,
0.6946033835411072,
-0.2184169739484787,
-0.09082210808992386... | |
gacutil output (thanks for doing that; I think it helps), I would say you need to try and run a repair on the .NET Framework install and Visual Studio 2005. I'm not sure if that will fix it, but as you can see from the output of the gacutil, you have none for 2.0.
From my VS2005 Command Prompt, I get:
```
Microsoft (R) .NET Global Assembly Cache Utility. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86
Number of items = 1
```
From my VS2003 Command Prompt, I get:
```
Microsoft (R) | [
-0.2472507655620575,
0.43221738934516907,
0.2623656690120697,
-0.282818466424942,
-0.33426737785339355,
0.14476396143436432,
0.3024102747440338,
0.18105056881904602,
-0.2941089868545532,
-0.5042117238044739,
0.014476734213531017,
0.6314265131950378,
-0.7431360483169556,
0.3025982081890106,... | |
.NET Global Assembly Cache Utility. Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
The Global Assembly Cache contains the following assemblies:
The cache of ngen files contains the following entries:
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=5a00410050002d004e0035002e0031002d003800460053002d00330037004200430043003300430035000000
mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=5a00410050002d004e0035002e0031002d0038004600440053002d00330037004200440036004600430034000000
Number of items = 2
``` | [
-0.29839888215065,
0.08318114280700684,
0.13875523209571838,
0.07932101935148239,
0.013351443223655224,
0.0712934359908104,
0.23544076085090637,
0.3159319758415222,
-0.5391014218330383,
-0.49071556329727173,
-0.051878202706575394,
0.23180821537971497,
-0.5859214663505554,
0.350704282522201... | |
> CREATE DATABASE permission denied in database 'master'.
> An attempt to attach an auto-named database for file
> C:\Documents and Settings\..\App\_Data\HelloWorld.mdf failed.
> A database with the same name exists, or specified file cannot be
> opened, or it is located on UNC share.
I've found these links:
* <http://blog.benhall.me.uk/2008/03/sql-server-and-vista-create-database.html>
* <http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=702726&SiteID=1>
Generally the user that you are using to run the SQL Server service will not have access to your personal user folders, that is why you're getting the error. You either need to change the credentials used for the service, or move the database to another folder, which did | [
0.5547213554382324,
0.3507692217826843,
0.4380076229572296,
-0.2560061812400818,
0.1288452446460724,
-0.2500706613063812,
0.419535368680954,
-0.09919371455907822,
-0.16241708397865295,
-0.5491945743560791,
-0.035744886845350266,
0.19632689654827118,
-0.24958573281764984,
0.4394260346889496... | |
the trick in your case. | [
0.13958989083766937,
0.008160073310136795,
0.09602221101522446,
0.07272250950336456,
0.09296024590730667,
-0.012595530599355698,
0.053252723067998886,
0.11459069699048996,
-0.028730720281600952,
-0.15621155500411987,
0.13154679536819458,
0.363054096698761,
0.1514996737241745,
-0.0265036001... | |
I've noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page, reading something like:
> 23 queries. 0.448 seconds
I was wondering how this is accomplished. Is it through the use of a particular Wordpress plug-in or perhaps from using some particular php function in the page's code?
Try adding this to the bottom of the footer in your template:
```
<?php echo $wpdb->num_queries; ?> <?php _e('queries'); ?>. <?php timer_stop(1); ?> <?php _e('seconds'); ?>
``` | [
0.27434611320495605,
-0.01587190292775631,
0.41599026322364807,
0.02161964401602745,
-0.21497374773025513,
0.22588743269443512,
0.3485579192638397,
-0.012333845719695091,
-0.32313063740730286,
-0.6542066931724548,
0.19082361459732056,
0.11375520378351212,
0.01780948042869568,
-0.0220949165... | |
Or, actually establishing a build process when there isn't much of one in place to begin with.
Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwieldy even with our modest apps, and we've had far too many issues crop up in the two years I have been a part of this team (and company). It's past time to do something about that, and the upshot is that we'll be able to kill two Joel Test birds with one stone (daily builds and one-step | [
0.53975909948349,
0.511387825012207,
-0.3312279284000397,
0.12642434239387512,
0.12182019650936127,
0.5364056825637817,
0.5343111753463745,
-0.16308511793613434,
0.05405938997864723,
-0.5810804963111877,
0.30121687054634094,
0.3203645348548889,
0.42623764276504517,
-0.2618040442466736,
-... | |
builds, neither of which exists in any form whatsoever).
What I'm after here is some general insight on the kinds of things I need to be doing or thinking about, from people who have been in software development for longer than I have and also have bigger brains. I'm confident that will be most of the people currently posting in the beta.
Relevant Tools:
Visual Build
Source Safe 6.0 (I know, but I can't do anything about whether or not we use Source Safe at this time. That might be the next battle I fight.)
Tentatively, I've got a Visual Build project that does this:
1. | [
0.6981461644172668,
0.13577401638031006,
0.08413860946893692,
0.06719315052032471,
-0.22249698638916016,
0.011238404549658298,
0.19039812684059143,
0.10634544491767883,
-0.0677194744348526,
-0.8923718929290771,
0.22995713353157043,
0.9121430516242981,
0.06871931254863739,
-0.32636892795562... | |
Get source and place in local directory, including necessary DLLs needed for project.
2. Get config files and rename as needed (we're storing them in a special sub directory that isn't part of the actual application, and they are named according to use).
3. Build using Visual Studio
4. Precompile using command line, copying into what will be a "build" directory
5. Copy to destination.
6. Get any necessary additional resources - mostly things like documents, images, and reports that are associated with the project (and put into directory from step 5). There's a lot of this stuff, and I didn't want to include it | [
0.7319530844688416,
0.09388966858386993,
0.3173524737358093,
0.39705950021743774,
0.3117496371269226,
-0.07748455554246902,
0.16894930601119995,
-0.31608641147613525,
-0.10499721020460129,
-0.8327551484107971,
-0.36732375621795654,
0.6252833008766174,
0.18903055787086487,
-0.23383000493049... | |
previously. However, I'm going to only copy changed items, so maybe it's irrelevant. I wasn't sure whether I really wanted to include this stuff in earlier steps.
I still need to coax some logging out of Visual Build for all of this, but I'm not at a point where I need to do that yet.
Does anyone have any advice or suggestions to make? We're not currently using a Deployment Project, I'll note. It would remove some of the steps necessary in this build I presume (like web.config swapping).
When taking on a project that has never had an automated build process, it | [
0.6292222738265991,
0.1132529228925705,
0.17972464859485626,
0.25613951683044434,
0.2924329936504364,
-0.09691940993070602,
0.09537627547979355,
0.09412669390439987,
-0.4483127295970917,
-0.5560945868492126,
0.21463452279567719,
0.6412978172302246,
0.11023704707622528,
0.09429296106100082,... | |
is easier to take it in steps. Do not try to swallow to much at one time, otherwise it can feel overwhelming.
1. First get your code compiling with one step using an automated build program (i.e. nant/msbuild). I am not going to debate which one is better. Find one that feels comfortable to you and use it. Have the build scripts live with the project in source control.
2. Figure out how you want your automated build to be triggered. Whether it is hooking it up to CruiseControl or running a nightly build task using Scheduled Tasks. CruiseControl or TeamCity is | [
0.3668123781681061,
-0.2927623987197876,
0.1626531481742859,
-0.028635350987315178,
0.05838015675544739,
-0.29636791348457336,
0.06286586076021194,
-0.08225566148757935,
-0.11962857097387314,
-0.9828677773475647,
0.024209577590227127,
0.7714241743087769,
-0.19340558350086212,
-0.7691611051... | |
probably the best choice for this, because they include a lot of tools you can use to make this step easier. CruiseControl is free and TeamCity is free to a point, where you might have to pay for it depending on how big the project is.
3. Ok, by this point you will be pretty comfortable with the tools. Now you are ready to add more tasks based on what you want to do for testing, deployment, and etc...
Hope this helps. | [
0.06792023032903671,
-0.3135455548763275,
0.5230749845504761,
0.42395973205566406,
-0.12840421497821808,
-0.3217717409133911,
0.049848224967718124,
0.19436509907245636,
-0.4173240661621094,
-0.6808563470840454,
0.3425978720188141,
0.7073357701301575,
0.14025983214378357,
-0.325777590274810... | |
What is the best way to disable `Alt` + `F4` in a c# win form to prevent the user from closing the form?
I am using a form as a popup dialog to display a progress bar and I do not want the user to be able to close it.
This does the job:
```
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
}
```
Edit: In response to pix0rs concern - yes you are correct that you will not be able to programatically close the app. However, you can simply remove the event handler for the form\_closing event before closing the form:
```
this.FormClosing | [
0.1809757947921753,
0.321146160364151,
0.6887481212615967,
-0.28008779883384705,
0.37116682529449463,
-0.12242081016302109,
0.5278427600860596,
-0.10760841518640518,
-0.02077828347682953,
-0.4342277944087982,
-0.44917047023773193,
0.6010458469390869,
-0.5224312543869019,
0.1148521676659584... | |
-= new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Close();
``` | [
-0.0380743183195591,
0.21299223601818085,
0.5715214014053345,
-0.45529940724372864,
0.3261245787143707,
-0.25376930832862854,
0.24983841180801392,
-0.3521062731742859,
-0.05206876993179321,
-0.5380171537399292,
-0.5325601696968079,
0.3136567175388336,
-0.5510390400886536,
0.252631604671478... | |
How do I convert function input parameters to the right type?
I want to return a string that has part of the URL passed into it removed.
**This works, but it uses a hard-coded string:**
```
function CleanUrl($input)
{
$x = "http://google.com".Replace("http://", "")
return $x
}
$SiteName = CleanUrl($HostHeader)
echo $SiteName
```
**This fails:**
```
function CleanUrl($input)
{
$x = $input.Replace("http://", "")
return $x
}
Method invocation failed because [System.Array+SZArrayEnumerator] doesn't contain a method named 'Replace'.
At M:\PowerShell\test.ps1:13 char:21
+ $x = $input.Replace( <<<< "http://", "")
```
The concept here is correct.
The problem is with the variable name you have chosen. $input is | [
0.12189358472824097,
0.06813935190439224,
0.5590802431106567,
-0.29808351397514343,
0.1068144142627716,
-0.04144208878278732,
0.504025936126709,
-0.4100336730480194,
-0.00901067815721035,
-0.65626060962677,
-0.14154288172721863,
0.6941043734550476,
-0.49706506729125977,
0.02925658039748668... | |
a reserved variable used by PowerShell to represent an array of pipeline input. If you change your variable name, you should not have any problem.
PowerShell does have [a replace operator](https://technet.microsoft.com/en-us/library/hh847759.aspx), so you could make your function into
```
function CleanUrl($url)
{
return $url -replace 'http://'
}
``` | [
0.410867303609848,
-0.3506341278553009,
0.41707849502563477,
0.1068110316991806,
0.17807435989379883,
-0.026735415682196617,
0.08154208213090897,
0.10803975909948349,
-0.1347133219242096,
-0.44173553586006165,
-0.1610107123851776,
0.6020639538764954,
-0.5523552894592285,
0.4464126229286194... | |
I have a setup project created by Visual Studio 2005, and consists of both a C# .NET 2.0 project and C++ MFC project, and the C++ run time. It works properly when run from the main console, but when run over a Terminal Server session on a Windows XP target, the install fails in the following way -
When the Setup.exe is invoked, it immediately crashes before the first welcome screen is displayed. When invoked over a physical console, the setup runs normally.
I figured I could go back to a lab machine to debug, but it runs fine on a | [
0.5047550201416016,
0.15662461519241333,
0.11462298780679703,
-0.18217754364013672,
-0.007480170577764511,
-0.2530570328235626,
0.24693715572357178,
-0.08257127553224564,
0.09871426969766617,
-0.878229022026062,
0.01728959009051323,
0.8710741400718689,
-0.3180268108844757,
-0.2318872958421... | |
lab machine over Terminal Server.
I see other descriptions of setup problems over Terminal Server sessions, but I don't see a definite solution. Both machines have a nearly identical configuration except that the one that is failing also has the GoToMyPC Host installed.
Has anyone else seen these problems, and how can I troubleshoot this?
Thanks,
I had LOTS of issues with developing installers (and software in general) for terminal server. I hate that damn thing.
Anyway, VS Setup Projects are just .msi files, and run using the Windows installer framework.
This will drop a log file when it errors out, they're called MSIc183.LOG (swap the | [
0.4928005337715149,
-0.04092416539788246,
0.37539514899253845,
0.29066431522369385,
0.3123374283313751,
-0.11167289316654205,
0.14716963469982147,
0.30079612135887146,
-0.11484038084745407,
-0.8652145862579346,
0.18994782865047455,
0.6620956063270569,
-0.4559507966041565,
0.155568405985832... | |
c183 for some random numbers and letters), and they go in your logged-in-user account's temp directory.
The easiest way to find that is to type `%TEMP%` into the windows explorer address bar - once you're there have a look for these log files, they might give you a clue.
* Note - Under terminal server, sometimes the logs don't go directly into `%TEMP%`, but under numbered subdirectories. If you can't find any MSIXYZ.LOG files in there, look for directories called `1`, `2`, and so on, and look in those.
If you find a log file, but can't get any clues from it, post | [
-0.1691834032535553,
0.33187514543533325,
0.13669459521770477,
-0.09415744245052338,
-0.022992147132754326,
-0.18815916776657104,
0.15826718509197235,
0.3747867941856384,
-0.7581588625907898,
-0.4600965678691864,
-0.17291229963302612,
0.03409481421113014,
0.015282749198377132,
0.1137850955... | |
it here. I've looked at more than I care to thing about, so I may be able to help | [
0.4646422266960144,
0.13526970148086548,
-0.11733861267566681,
0.14178380370140076,
0.3762173354625702,
0.1899447739124298,
-0.023141443729400635,
0.34711459279060364,
-0.36711540818214417,
-0.6366364359855652,
0.3317740559577942,
0.26780787110328674,
0.21969565749168396,
0.254060328006744... | |
We are planning on moving for MS Source Safe (ouch) to SVN. We are working mostly in a Microsoft environment (windows, Visual Studio, .NET) and we have developers in multiple sites. I heard about VisualSVN and integration with visual studio. On the other hand I can get someone to host SVN for me and use TortoiseSVN. Any recommendations? Any pitfalls I should avoid?
Hosting subversion is fantastically simple. At the risk of being labeled a brown nose (is there a badge for that?) Jeff Atwood did put up an article on installing subersion
* <http://blog.codinghorror.com/setting-up-subversion-on-windows/>
So really you could save yourself some money | [
0.6514180898666382,
-0.14178237318992615,
0.12441779673099518,
0.13460992276668549,
-0.15723150968551636,
-0.2683614492416382,
0.16019229590892792,
0.37287697196006775,
-0.27340537309646606,
-0.6161463260650635,
0.05018782243132591,
0.4086194634437561,
-0.31624653935432434,
0.0427018702030... | |
by running your own subversion server and you'll never have to worry about what happens to your code if your hosting company goes belly up.
I would start with tortoise because it is free and is really easy to use. If you find you really need integration with VS then by all means try out visual svn. In my experience source control <-> editor integration is most useful for automatically opening files when you edit them. Subversion doesn't require you to open files so that big advantage is gone. | [
0.4030410349369049,
-0.423142671585083,
0.11189118027687073,
0.09616910666227341,
-0.4171074330806732,
-0.23022578656673431,
0.24220529198646545,
0.42898061871528625,
-0.45383164286613464,
-0.6280697584152222,
0.07037709653377533,
0.45108145475387573,
-0.41144096851348877,
0.17957089841365... | |
we have a lot of users running in different shared and solo-owned repositories in Subversion. As part of our work, we do project-shared code and individual work, and we need to control access, ideally on a group basis.
Currenly, we use [SVNManager](http://svnmanager.sourceforge.net/) to allow users to manage access and create repositories. However, in order to get that working we had to do quite a bit of hacking.
Does anyone know of a free, open-source, linux-compatible SVN management system?
Thanks for your help.
I would recommend SVN Access: <http://www.jaj.com/projects/svnaccess/> or <http://freshmeat.net/projects/svnaccess/>
I have used it as is, and have modified it for an | [
0.532860279083252,
-0.07234489917755127,
-0.21565881371498108,
-0.0027323237154632807,
-0.2492789924144745,
-0.4151456654071808,
0.3043211102485657,
0.14367282390594482,
-0.4397986829280853,
-0.4377320110797882,
-0.029571980237960815,
0.18951578438282013,
-0.030964121222496033,
0.135754227... | |
enterprise-wide solution at my day job. | [
-0.1791190654039383,
-0.0709676444530487,
0.24814562499523163,
0.0639113113284111,
0.30339208245277405,
-0.006562041584402323,
0.14449651539325714,
0.16933709383010864,
-0.2864319086074829,
-0.3688371479511261,
-0.27731141448020935,
0.2899611294269562,
0.2401021122932434,
-0.04287325218319... | |
Given a list of locations such as
```html
<td>El Cerrito, CA</td>
<td>Corvallis, OR</td>
<td>Morganton, NC</td>
<td>New York, NY</td>
<td>San Diego, CA</td>
```
What's the easiest way to generate a Google Map with pushpins for each location?
I'm assuming you have the basics for Maps in your code already with your API Key.
```
<head>
<script
type="text/javascript"
href="http://maps.google.com/maps?
file=api&v=2&key=xxxxx">
function createMap() {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.44, -122.14), 14); | [
0.24115030467510223,
-0.3917871415615082,
1.090705156326294,
0.1787765771150589,
0.04537872597575188,
-0.055817440152168274,
0.3042348623275757,
-0.15656019747257233,
-0.09923785924911499,
-0.713519811630249,
-0.27836889028549194,
0.01794259250164032,
-0.38759303092956543,
0.28190454840660... | |
}
</script>
</head>
<body onload="createMap()" onunload="GUnload()">
```
Everything in Google Maps is based off of latitude (lat) and longitude (lng).
So to create a simple marker you will just create a GMarker with the lat and lng.
```
var where = new GLatLng(37.925243,-122.307358); //Lat and Lng for El Cerrito, CA
var marker = new GMarker(where); // Create marker (Pinhead thingy)
map.setCenter(where); // Center map on marker
map.addOverlay(marker); // Add marker to map
```
However if you don't want to look up the Lat and Lng for each city you can use Google's Geo Coder. Heres an example:
```
var address = "El Cerrito, CA";
var geocoder = new GClientGeocoder;
geocoder.getLatLng(address, function(point) { | [
0.3543641269207001,
0.1750439554452896,
1.0209572315216064,
0.25258639454841614,
0.003821267280727625,
0.030963387340307236,
0.03333131968975067,
-0.19227419793605804,
-0.11060655117034912,
-0.7135222554206848,
-0.013632522895932198,
0.25951382517814636,
-0.26903584599494934,
0.14670169353... | |
if (point) {
map.clearOverlays(); // Clear all markers
map.addOverlay(new GMarker(point)); // Add marker to map
map.setCenter(point, 10); // Center and zoom map on marker
}
});
```
So I would just create an array of GLatLng's of every city from the GeoCoder and then draw them on the map. | [
0.009037158451974392,
-0.16417884826660156,
0.8716915845870972,
-0.17138883471488953,
-0.18595634400844574,
-0.025302935391664505,
0.03750244528055191,
-0.13349129259586334,
0.015320844948291779,
-0.6680644750595093,
-0.28593605756759644,
0.465067595243454,
-0.4827268123626709,
0.223111689... | |
Is it possible to actually make use of placement new in portable code when using it for arrays?
It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm that this is correct), but I don't see how you can allocate a buffer for the array to go in if this is the case.
The following example shows the problem. Compiled with Visual Studio, this example results in memory corruption:
```
#include <new>
#include <stdio.h>
class A
{
public:
A() : data(0) | [
0.2612929046154022,
0.0564708448946476,
-0.276628702878952,
-0.2947535812854767,
0.024366406723856926,
-0.05161314085125923,
0.35755524039268494,
-0.35618671774864197,
-0.3008168041706085,
-0.49262216687202454,
-0.07110609859228134,
0.5384528636932373,
-0.36103689670562744,
0.0783085823059... | |
{}
virtual ~A() {}
int data;
};
int main()
{
const int NUMELEMENTS=20;
char *pBuffer = new char[NUMELEMENTS*sizeof(A)];
A *pA = new(pBuffer) A[NUMELEMENTS];
// With VC++, pA will be four bytes higher than pBuffer
printf("Buffer address: %x, Array address: %x\n", pBuffer, pA);
// Debug runtime will assert here due to heap corruption
delete[] pBuffer;
return 0;
}
```
Looking at the memory, the compiler seems to be using the first four bytes of the buffer to | [
-0.11463681608438492,
-0.14082200825214386,
0.4415571391582489,
-0.3525501489639282,
-0.031091995537281036,
0.5963536500930786,
0.38980692625045776,
-0.36181166768074036,
-0.44641703367233276,
-0.3903435468673706,
-0.15279892086982727,
0.5465510487556458,
-0.08208867162466049,
0.1874747872... | |
store a count of the number of items in it. This means that because the buffer is only `sizeof(A)*NUMELEMENTS` big, the last element in the array is written into unallocated heap.
So the question is can you find out how much additional overhead your implementation wants in order to use placement new[] safely? Ideally, I need a technique that's portable between different compilers. Note that, at least in VC's case, the overhead seems to differ for different classes. For instance, if I remove the virtual destructor in the example, the address returned from new[] is the same as the address I | [
0.26546144485473633,
-0.11244850605726242,
0.24741727113723755,
0.07437756657600403,
0.22219526767730713,
0.1956883817911148,
0.16754409670829773,
-0.46397820115089417,
-0.23938818275928497,
-0.7210611701011658,
-0.20396406948566437,
0.5057111382484436,
-0.1485879272222519,
0.3060999214649... | |
pass in.
Personally I'd go with the option of not using placement new on the array and instead use placement new on each item in the array individually. For example:
```
int main(int argc, char* argv[])
{
const int NUMELEMENTS=20;
char *pBuffer = new char[NUMELEMENTS*sizeof(A)];
A *pA = (A*)pBuffer;
for(int i = 0; i < NUMELEMENTS; ++i)
{
pA[i] = new (pA + i) A();
}
printf("Buffer address: %x, Array address: %x\n", pBuffer, pA);
// dont forget to destroy!
for(int i = 0; i < NUMELEMENTS; ++i)
{ | [
0.00888029858469963,
-0.05088327080011368,
0.3684879541397095,
-0.32887595891952515,
-0.05480823293328285,
0.1964799165725708,
0.6378411650657654,
-0.3461095690727234,
-0.1763906180858612,
-0.9449455142021179,
-0.11484729498624802,
0.04575458541512489,
-0.31154218316078186,
-0.068769760429... | |
pA[i].~A();
}
delete[] pBuffer;
return 0;
}
```
Regardless of the method you use, make sure you manually destroy each of those items in the array before you delete pBuffer, as you could end up with leaks ;)
*Note*: I haven't compiled this, but I think it should work (I'm on a machine that doesn't have a C++ compiler installed). It still indicates the point :) Hope it helps in some way!
---
Edit:
The reason it needs to keep track of the number of elements is so that it can iterate through them when you call delete on the | [
-0.04640577360987663,
0.0718567743897438,
0.19316157698631287,
-0.2472696453332901,
0.10916616767644882,
0.15541109442710876,
0.6603659391403198,
-0.25512245297431946,
-0.12292355298995972,
-0.5885005593299866,
-0.20350836217403412,
0.6270667910575867,
-0.41234520077705383,
-0.037331510335... | |
array and make sure the destructors are called on each of the objects. If it doesn't know how many there are it wouldn't be able to do this. | [
0.5553175806999207,
0.0344727598130703,
0.3606271743774414,
0.03229961916804314,
-0.19909080862998962,
-0.1125180795788765,
0.21515458822250366,
-0.2574942409992218,
-0.15356959402561188,
-0.6904284954071045,
-0.09411552548408508,
0.8836773037910461,
-0.20883184671401978,
0.046430457383394... | |
I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed.
Being new to JNI I've managed to find much documentation on the interface side of it and library generation side of it, but I've not found much on building the native library.
I've got an existing build based on ant for the pre-existing Java source, so I'm trying to work out if I should get ant to call make | [
0.5061475038528442,
0.0021929515060037374,
-0.07726076245307922,
-0.15513427555561066,
-0.17057184875011444,
-0.19192510843276978,
0.20565873384475708,
0.43118247389793396,
-0.3171297311782837,
-0.8168458342552185,
0.3050692677497864,
0.4282260239124298,
-0.13195404410362244,
0.13542957603... | |
to create the library or if it's best to get make to call ant after creating the library?
Neither option jumps out as being terribly nice, but both seem better than trying to get ant to call a compiler to compile the code and generate the library directly.
I strongly dislike make because of its implicit ruleset and treatment of whitespace. Personally I would use cpp tasks (<http://ant-contrib.sourceforge.net/cpptasks/index.html>) to do my C compilation. They are not as flexible as make but they are also far less complex and it will mean you don't have to burden your developers with learning make. | [
0.7893431782722473,
-0.016113225370645523,
-0.29228323698043823,
0.05955398455262184,
-0.27617427706718445,
0.04723285138607025,
0.0970645323395729,
-0.274273544549942,
-0.025014080107212067,
-0.5095537900924683,
0.1436050981283188,
0.4877218008041382,
-0.45308178663253784,
0.1939296424388... | |
What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users?
For example:
Let's say that I have a main page called **blog.php** (I know, creativity abounds). Let's also say that there is a page called **delete.php** which looks for the parameter **post\_id** and then deletes some entry from a database.
In this very contrived example, there's some mechanism on blog.php which sends a request via ajax to delete.php to delete an entry.
Now this mechanism is only going to be available to authenticated users on blog.php. But what's to stop someone from just | [
0.37490734457969666,
0.2041020393371582,
0.15013758838176727,
0.3009822368621826,
-0.39233168959617615,
-0.48860976099967957,
0.3806704878807068,
0.34912407398223877,
-0.5196732878684998,
-0.6182305812835693,
0.36245477199554443,
0.4482005536556244,
0.04480145126581192,
0.09545878320932388... | |
calling delete.php with a bunch of random numbers and deleting everything in site?
I did a quick test where I set a session variable in blog.php and then did an ajax call to delete.php to return if the session variable was set or not ***(it wasn't)***.
What's the accepted way to handle this sort of thing?
---
OK. I must have been crazy the first time I tried this.
I just did another test like the one I described above and it worked perfectly.
You were correct in trying to use session variables. Once your user authenticates, you should store that information in their session so | [
0.45908841490745544,
-0.1504063606262207,
0.1524173468351364,
0.2921764552593231,
-0.38953208923339844,
-0.3197057843208313,
0.4861926734447479,
0.1090540811419487,
-0.3059861361980438,
-0.2421705573797226,
0.4226369857788086,
0.6361891627311707,
-0.3885176479816437,
0.1379774808883667,
... | |
that each subsequent page view will see that. Make sure you are calling `session_start()` on both pages (blog.php and delete.php) before accessing $\_SESSION. Also make sure you have cookies enabled -- and if not, you should pass an additional parameter in the query string, usually PHPSESSID=<`session_id()`>. | [
0.1386183202266693,
0.09320046007633209,
0.5547342300415039,
-0.050784964114427567,
-0.0024470060598105192,
-0.3385546803474426,
0.6720144152641296,
0.2756178081035614,
-0.3898006081581116,
-0.7436292171478271,
-0.31671521067619324,
0.8421711325645447,
-0.03242340683937073,
0.0079044913873... | |
An [answer](https://stackoverflow.com/questions/15241/does-anyone-have-any-real-world-experience-of-csla#15357) to a Stack Overflow question stated that a particular framework violated a plain and simple OOP rule: Single Responsibility Principle (SRP).
**Is the Single Responsibility Principle *really* a rule of OOP?**
My understanding of the definition of Object Orientated Programming is "a paradigm where objects and their behaviour are used to create software". This includes the following techniques: Encapsulation, Polymorphism & Inheritance.
Now don't get me wrong - I believe SRP to be the key to most good OO designs, but I feel there are cases where this principle can and should be broken (just like database normalization rules). I aggressively | [
0.1761210560798645,
0.16150729358196259,
0.1482274830341339,
0.057338058948516846,
-0.14359372854232788,
-0.1460999995470047,
0.20034989714622498,
-0.27875104546546936,
-0.23349213600158691,
0.039692237973213196,
-0.3104795217514038,
0.2685003876686096,
-0.2687363028526306,
-0.018511271104... | |
push the benefits of SRP, and the great majority of my code follows this principle.
*But, is it a rule, and thus implies that it shouldn't be broken?*
Very few rules, if any, in software development are without exception. Some people think there are no place for *goto* but they're wrong.
As far as OOP goes, there isn't a single definition of object-orientedness so depending on who you ask you'll get a different set of hard and soft principles, patterns, and practices.
The classic idea of OOP is that messages are sent to otherwise opaque objects and the objects interpret the message | [
0.26408326625823975,
0.07574974745512009,
0.23515212535858154,
0.02406175620853901,
-0.1827717125415802,
-0.14026759564876556,
0.1009325385093689,
0.3108375668525696,
-0.35881802439689636,
-0.3269939422607422,
-0.5556686520576477,
0.4344182312488556,
-0.2968502938747406,
-0.308972626924514... | |
with knowledge of their own innards and then perform a function of some sort.
SRP is a software engineering principle that can apply to the role of a class, or a function, or a module. It contributes to the cohesion of something so that it behaves well put together without unrelated bits hanging off of it or having multiple roles that intertwine and complicate things.
Even with just one responsibilty, that can still range from a single function to a group of loosely related functions that are part of a common theme. As long as you're avoiding jury-rigging an element to take | [
0.48907172679901123,
0.047172389924526215,
0.0016326440963894129,
0.23945929110050201,
0.14787980914115906,
-0.03817671164870262,
0.08035998046398163,
-0.42524221539497375,
-0.3244166970252991,
-0.15917378664016724,
-0.5378326177597046,
0.3511880934238434,
-0.17550131678581238,
-0.10814256... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.