text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
In Java, static and transient fields are not serialized. However, I found out that initialization of static fields causes the generated serialVersionUID to be changed. For example, `static int MYINT = 3;` causes the serialVersionUID to change. In this example, it makes sense because different versions of the class would get different initial values. Why does any initialization change the serialVersionUID? For example, `static String MYSTRING = System.getProperty("foo");` also causes the serialVersionUID to change. To be specific, my question is why does initialization with a method cause the serialVersionUID to change. The problem I hit is that I added a new
[ -0.061180636286735535, -0.3287992775440216, 0.1586466282606125, -0.34962594509124756, -0.13452762365341187, -0.11475817859172821, 0.27331021428108215, 0.0012652648147195578, -0.2753850519657135, -0.47018876671791077, 0.16798560321331024, 0.43454238772392273, -0.7698116898536682, 0.37962129...
static field that was initialized with a system property value (getProperty). That change caused a serialization exception on a remote call. You can find some information about that in the [bug 4365406](http://bugs.sun.com/view_bug.do?bug_id=4365406) and in the [algorithm for computing **serialVersionUID**](http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/class.html#4100). Basically, when changing the initialization of your `static` member with `System.getProperty()`, the compiler introduces a new `static` property in your class referencing the `System` class (I assume that the `System` class was previously unreferenced in your class), and since this property introduced by the compiler is not private, it takes part in the `serialVersionUID` computation. **Morality**: always use explicit `serialVersionUID`, you'll save some
[ -0.18860773742198944, -0.25431302189826965, 0.3610612154006958, -0.053421322256326675, -9.389034971718502e-7, -0.1702158898115158, 0.018430298194289207, 0.10933025181293488, -0.47686779499053955, -0.2579972445964813, -0.21348747611045837, 0.35397061705589294, -0.5274022221565247, 0.4297760...
CPU cycles and some headaches :)
[ 0.16012220084667206, 0.3976060748100281, 0.12658831477165222, -0.09178446978330612, 0.00639391178265214, 0.14314714074134827, 0.2850956320762634, 0.04728427901864052, -0.33066022396087646, -0.5179104804992676, 0.08950072526931763, 0.5683029890060425, -0.10459484159946442, 0.077370308339595...
Is there any library (or even better, web service) available which can convert from a latitude/longitude into a time zone? I looked fairly deeply into this question for a project I am working on. GeoNames.org and EarthTools.com are both good options for many situations but with the following serious flaws: * GeoNames.org finds the time zone by searching for the nearest point in their database that contains a time zone field. This often leads to the wrong result near borders. It is also painfully slow, leading to query times on the order of a couple seconds per request. It also doesn't return
[ 0.33326801657676697, -0.02769201435148716, 0.28865373134613037, 0.5522056221961975, 0.11353066563606262, -0.27898523211479187, 0.21044306457042694, 0.5038800239562988, -0.16889196634292603, -0.8183281421661377, -0.01715080998837948, -0.19474224746227264, -0.12137424200773239, 0.49596709012...
a valid time zone if there is no item in their database near the query point. GeoNames also restricts the number of queries that can be made per day, making bulk operations difficult. * EarthTools.org uses a map and is able to return queries quickly, but it doesn't take into account daylight savings time for most locations, and it returns a raw offset rather than a time zone ID (i.e., they return "GMT-7" instead of "America/Chicago"). Also, I just looked at their page while preparing this post and Google Chrome warned about malware on their site. That is new to me
[ 0.3853488862514496, 0.025503123179078102, 0.40118110179901123, 0.34832239151000977, 0.29116368293762207, -0.2914809286594391, 0.4535505175590515, 0.23899845778942108, -0.21928533911705017, -0.8312692046165466, -0.1624683141708374, -0.12416107952594757, -0.028218790888786316, 0.423918843269...
and it may change, but is obviously a cause for concern. These flaws meant that these existing tools were not suitable for my needs so I rolled my own solution and have published it for general use. You can find it here: <http://www.askgeo.com/> AskGeo is based on a time zone map of the world, so it returns a valid time zone for every valid latitude and longitude. It returns the standard time zone ID (e.g., "America/Los\_Angeles") used on Linux and most other operating systems and programming frameworks. It also returns the current offset, taking full account of daylight savings time. It is extremely easy
[ 0.3011254370212555, -0.10006259381771088, 0.891659677028656, 0.3261825144290924, 0.3144558370113373, -0.10764825344085693, -0.11152516305446625, -0.09979516267776489, -0.20336198806762695, -0.5685418844223022, -0.04029969498515129, 0.18084995448589325, -0.2196994572877884, -0.1899561882019...
to use and usage is documented on the main page of the site. The API supports batch queries, so if you need to do a lot of look-ups, please use the batch interface rather than bog down our servers with serial requests. The bulk queries are also much faster, so everybody wins. When we first launched this, we built it on Google App Engine (GAE) and made it free to all users. This was possible because GAE's prices were so low at that time. Since then, our server load has increased substantially and GAE's prices went way up. Both factors combined
[ 0.4804965853691101, 0.10065033286809921, 0.3050212264060974, 0.13164879381656647, 0.15936489403247833, 0.06341096758842468, 0.02269853837788105, 0.06633991003036499, 0.0238836407661438, -0.49458587169647217, 0.11636091023683548, 0.5136895179748535, -0.13105720281600952, 0.1958906054496765,...
led us to switch to Amazon Web Services for hosting and to start charging for commercial use, while keeping the service free for non-profit, non-commercial open source projects, and researchers. For commercial users, we provide 1000 free queries to let potential customers evaluate the API to make sure it meets their needs. See the web site for pricing and terms. The underlying library was written in Java and due to popular demand, we also released the library under a commercial license. Full documentation of the library and pricing details are on the web site. I hope this is useful. It certainly was
[ 0.6873852610588074, 0.17475152015686035, 0.009854050353169441, 0.06895271688699722, -0.00727361673489213, -0.12335444241762161, 0.033731747418642044, -0.028055034577846527, -0.0014494428178295493, -0.4632308781147003, -0.024817943572998047, 0.3730345666408539, -0.09092457592487335, -0.0468...
useful for the project I was working on.
[ 0.1356932371854782, 0.14271768927574158, -0.13197661936283112, 0.15474307537078857, 0.00019980465003754944, -0.18658457696437836, -0.09473360329866409, 0.27297741174697876, 0.05949917808175087, -0.36969301104545593, 0.15547357499599457, 0.15603359043598175, 0.28642538189888, -0.00409955671...
this kind of follows on from another [question](https://stackoverflow.com/questions/41290/file-access-strategy-in-a-multi-threaded-environment-web-app) of mine. Basically, once I have the code to access the file (will review the answers there in a minute) what would be the best way to **test** it? I am thinking of creating a method which just spawns lots of [BackgroundWorker](http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx)'s or something and tells them all load/save the file, and test with varying file/object sizes. Then, get a response back from the threads to see if it failed/succeeded/made the world implode etc. Can you guys offer any suggestions on the best way to approach this? As I said before, this is all kinda
[ 0.4881024956703186, -0.09517563879489899, 0.12672409415245056, 0.25036507844924927, 0.09770416468381882, -0.149038627743721, 0.1558946818113327, 0.09366623312234879, -0.40609848499298096, -0.5497422218322754, 0.17566362023353577, 0.4004940688610077, -0.1272190511226654, 0.01083781477063894...
new to me :) ### Edit Following [ajmastrean's](https://stackoverflow.com/questions/41568/whats-the-best-way-to-test-a-method-from-multiple-threads#41572) post: I am using a console app to test with Debug.Asserts :) --- Update ------ I originally rolled with using [BackgroundWorker](http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx) to deal with the threading (since I am used to that from Windows dev) I soon realised that when I was performing tests where multiple ops (threads) needed to complete before continuing, I realised it was going to be a bit of a hack to get it to do this. I then followed up on [ajmastrean](https://stackoverflow.com/questions/41568/whats-the-best-way-to-unit-test-from-multiple-threads#41589)'s post and realised I should really be using the [Thread](http://msdn.microsoft.com/en-us/library/system.threading.thread(VS.80).aspx) class for working with concurrent operations. I will now refactor using this method
[ 0.16149701178073883, 0.01941842772066593, 0.5397886037826538, 0.19471026957035065, 0.04024408012628555, -0.0844549834728241, 0.22235937416553497, -0.3199369013309479, -0.322522908449173, -0.6404405832290649, 0.03226293995976448, 0.5061339139938354, -0.04974967613816261, 0.04191262647509575...
(albeit a different approach). In .NET, `ThreadPool` threads won't return without setting up `ManualResetEvent`s or `AutoResetEvent`s. I find these overkill for a quick test method (not to mention kind of complicated to create, set, and manage). Background worker is a also a bit complex with the callbacks and such. Something I have found that works is 1. Create an array of threads. 2. Setup the `ThreadStart` method of each thread. 3. Start each thread. 4. Join on all threads (blocks the current thread until all other threads complete or abort) ```cs public static void MultiThreadedTest() { Thread[] threads = new Thread[count]; for
[ 0.2492472380399704, -0.07232765108346939, 0.285294771194458, -0.06557897478342056, -0.22022534906864166, -0.20529673993587494, 0.470641553401947, -0.22361433506011963, -0.4903373420238495, -0.7735249400138855, -0.002148545114323497, 0.35803163051605225, -0.3915638327598572, 0.3859544992446...
(int i = 0; i < threads.Length; i++) { threads[i] = new Thread(DoSomeWork()); } foreach(Thread thread in threads) { thread.Start(); } foreach(Thread thread in threads) { thread.Join(); } } ```
[ -0.04738430678844452, -0.04789028689265251, 0.5968211889266968, -0.44409292936325073, 0.3237622082233429, 0.08579336851835251, 0.23261818289756775, -0.3538164496421814, -0.30710044503211975, -0.6854158043861389, -0.22702926397323608, 0.3362034261226654, -0.3655283749103546, 0.7132791876792...
I wonder what the best practice for this scenario is: I have a Sharepoint Site (MOSS2007) with an ASPX Page on it. However, I cannot use any inline source and stuff like Event handlers do not work, because Sharepoint does not allow Server Side Script on ASPX Pages per default. Two solutions: 1. Change the `PageParserPath` in *web.config* as per [this site](http://blogs.msdn.com/kaevans/archive/2007/04/26/code-blocks-are-not-allowed-in-this-file-using-server-side-code-with-sharepoint.aspx) ``` <PageParserPaths> <PageParserPath VirtualPath="/pages/test.aspx" CompilationMode="Always" AllowServerSideScript="true" /> </PageParserPaths> ``` 2. Create all the controls and Wire them up to Events in the *.CS* File, thus completely eliminating some of the benefits of ASP.net I wonder, what the best practice
[ 0.12337116152048111, -0.002393268281593919, 0.4900769889354706, 0.1326955258846283, 0.008505649864673615, -0.42138659954071045, 0.4426073133945465, -0.21623896062374115, -0.18352176249027252, -0.7585925459861755, 0.025701018050312996, 0.3604786992073059, -0.363489031791687, 0.0071191266179...
would be? Number one looks like it's the correct choice, but changing the *web.config* is something I want to use sparingly whenever possible. So in that case I would wrap it up in a feature and deploy it via a solution. This way I think you will avoid the issue you are seeing. This is especially useful if you plan to use this functionality within other sites too. You can also embed web parts directly in the page, much like you do a WebControl, thereby avoiding any gallery clutter.
[ 0.6867852210998535, -0.19811782240867615, 0.2882385849952698, 0.1489163190126419, 0.027251627296209335, -0.015178415924310684, -0.20969006419181824, 0.08651843667030334, -0.22798630595207214, -0.6032325029373169, 0.15815101563930511, 0.43412262201309204, -0.167062908411026, 0.1091938167810...
I am about to write an audio file converter for my side job at the university. As part of this I would need sample rate conversion. However, my professor said that it would be pretty hard to write a sample rate converter that was *both* of good quality *and* fast. On my research on the subject, I found some functions in the OSX CoreAudio-framework, that could do a sample rate conversion (AudioConverter.h). After all, an OS has to have some facilities to do that for its own audio stack. Do you know a similar method for C/C++ and Windows, that
[ 0.379146009683609, 0.18726985156536102, 0.3287031948566437, 0.17954379320144653, 0.0039101033471524715, -0.3254006803035736, 0.013727927580475807, -0.06605195999145508, 0.021525679156184196, -0.5824334025382996, 0.13129514455795288, 0.7484965324401855, -0.266203373670578, 0.179194435477256...
are either part of the OS or open source? I am pretty sure that this function exists within DirectX Audio (XAudio2?), but I seem to be unable to find a reference to it in the MSDN library. Try Secret Rabbit Code (= SRC = Sample Rate Conversion ) It's GPL, it's fast and it's high quality. <http://www.mega-nerd.com/SRC/license.html>
[ 0.5052312016487122, 0.1485140472650528, 0.02850458398461342, 0.13086387515068054, 0.13383197784423828, -0.31368288397789, 0.40194788575172424, -0.12029165029525757, -0.18028870224952698, -0.2775203287601471, 0.18668915331363678, 0.6874319314956665, -0.31297996640205383, 0.11190015822649002...
I come from a Java background, where packages are used, not namespaces. I'm used to putting classes that work together to form a complete object into packages, and then reusing them later from that package. But now I'm working in C++. How do you use namespaces in C++? Do you create a single namespace for the entire application, or do you create namespaces for the major components? If so, how do you create objects from classes in other namespaces? Namespaces are packages essentially. They can be used like this: ``` namespace MyNamespace { class MyClass { }; } ``` Then in code: ``` MyNamespace::MyClass* pClass = new
[ 0.47775477170944214, 0.1896355003118515, -0.06821556389331818, -0.18210111558437347, -0.220308318734169, 0.09549527615308762, 0.14392311871051788, -0.05188769847154617, -0.1746038794517517, -0.9034138321876526, -0.04283176735043526, 0.26938194036483765, -0.24730785191059113, 0.210874095559...
MyNamespace::MyClass(); ``` Or, if you want to always use a specific namespace, you can do this: ``` using namespace MyNamespace; MyClass* pClass = new MyClass(); ``` **Edit:** Following what [bernhardrusch](https://stackoverflow.com/questions/41590/how-do-you-properly-use-namespaces-in-c#41624) has said, I tend not to use the "using namespace x" syntax at all, I usually explicitly specify the namespace when instantiating my objects (i.e. the first example I showed). And as you asked [below](https://stackoverflow.com/questions/41590/how-do-you-properly-use-namespaces-in-c#41615), you can use as many namespaces as you like.
[ 0.05346598103642464, 0.2754547894001007, 0.48089373111724854, -0.08821650594472885, -0.23479203879833221, -0.2250714749097824, 0.20664328336715698, 0.1414504200220108, -0.21780428290367126, -0.7446177005767822, -0.18684546649456024, 0.40398886799812317, 0.03362462297081947, 0.2571640312671...
We are working on a large project with a measure of new/modified GUI functionality. We've found in the past that we often introduced new problems in related code when adding new functionality. We have non-technical users perform testing, but they often miss parts and allow bugs to slip through. Are there any best practices for organizing the UI testing of a WinForms project? Is there any way to automate it? There are GUI testing tools that will click buttons and stuff for you but they're pretty fragile in my experience. The best thing to do is to keep your UI layer as thin as
[ 0.49618059396743774, 0.06578037142753601, 0.031954292207956314, 0.323777973651886, 0.2187722772359848, -0.12929093837738037, 0.15835313498973846, -0.02051711641252041, -0.01597176119685173, -0.5905243754386902, 0.2075379341840744, 0.7252137064933777, 0.013644562102854252, -0.14233659207820...
possible. Your event handler classes should optimally be only one or two lines that call out to other more testable classes. That way you can test your business logic in unit tests without having to actually do a button click.
[ 0.18269401788711548, -0.48314395546913147, -0.08824548870325089, 0.37196803092956543, 0.25161227583885193, -0.013522964902222157, 0.1416943222284317, -0.07398035377264023, -0.15245166420936584, -0.6644922494888306, 0.025162348523736, 0.5069383978843689, -0.188585102558136, -0.3036467432975...
Is there any way to convert a bmp image to jpg/png without losing the quality in C#? Using Image class we can convert bmp to jpg but the quality of output image is very poor. Can we gain the quality level as good as an image converted to jpg using photoshop with highest quality? ``` var qualityEncoder = Encoder.Quality; var quality = (long)<desired quality>; var ratio = new EncoderParameter(qualityEncoder, quality ); var codecParams = new EncoderParameters(1); codecParams.Param[0] = ratio; var jpegCodecInfo = <one of the codec infos from ImageCodecInfo.GetImageEncoders() with mime type = "image/jpeg">; bmp.Save(fileName, jpegCodecInfo, codecParams); // Save to JPG ```
[ 0.36479225754737854, -0.10578477382659912, 0.558414876461029, 0.1912139356136322, -0.25132253766059875, 0.2502446472644806, -0.13257339596748352, -0.7007890939712524, -0.2823546826839447, -0.54691082239151, -0.07792505621910095, 0.4237331449985504, -0.3256526589393616, 0.001779400394298136...
As someone with some winforms and client applications experience - is it worth going back and learning the way traditional ASP .NET pages work, or is it okay with moving straight into ASP .NET MVC? I'm kind of looking for pitfalls or traps in my knowledge of general C#, that I won't know from the screencast series and things on the ASP .NET site. Here is the great thing about MVC. It works closer to the base of the framework than normal ASP.NET Web Forms. So by using MVC and understanding it, you will have a better understanding of how WebForms work.
[ 0.620442271232605, 0.07865089923143387, 0.3641519546508789, 0.10741378366947174, -0.21750804781913757, -0.3515879213809967, 0.024096228182315826, 0.22911326587200165, -0.3405616879463196, -0.5440556406974792, 0.06989901512861252, 0.7324115037918091, -0.07998756319284439, -0.024689130485057...
The problem with WebForms is there is a lot of magic and about 6 years of trying to make the Web work like Windows Forms, so you have the control tree hierarchy and everything translated to the Web. With MVC you get the core with out the WinForm influence. So start with MVC, and you will easily be able to move in to WebForms if needed.
[ 0.40879184007644653, -0.08028978854417801, 0.4409288763999939, 0.23703083395957947, -0.14927656948566437, -0.5433737635612488, 0.12925080955028534, -0.21503378450870514, 0.010603400878608227, -0.7115947008132935, 0.08435121923685074, 0.4474937617778778, -0.4036916196346283, 0.1612964123487...
I'm hearing more and more about domain specific languages being thrown about and how they change the way you treat business logic, and I've seen [Ayende's blog posts](http://ayende.com/blog/tags/domain-specific-languages) and things, but I've never really gotten exactly why I would take my business logic away from the methods and situations I'm using in my provider. If you've got some background using these things, any chance you could put it in real laymans terms: * What exactly building DSLs means? * What languages are you using? * Where using a DSL makes sense? * What is the benefit of using DSLs? DSL's are good in situations where you
[ 0.6964782476425171, 0.2729036211967468, 0.04799424484372139, 0.4180251359939575, -0.22228865325450897, -0.2568575441837311, 0.3726499378681183, 0.13662497699260712, -0.3504379987716675, -0.4055924415588379, -0.14488796889781952, 0.2589636445045471, 0.016877707093954086, 0.3368106782436371,...
need to give some aspect of the system's control over to someone else. I've used them in Rules Engines, where you create a simple language that is easier for less-technical folks to use to express themselves- particularly in workflows. In other words, instead of making them learn java: ``` DocumentDAO myDocumentDAO = ServiceLocator.getDocumentDAO(); for (int id : documentIDS) { Document myDoc = MyDocumentDAO.loadDoc(id); if (myDoc.getDocumentStatus().equals(DocumentStatus.UNREAD)) { ReminderService.sendUnreadReminder(myDoc) } ``` I can write a DSL that lets me say: ``` for (document : documents) { if (document is unread) { document.sendReminder } ``` There are other situations, but basically, anywhere you might want to use a macro language, script a workflow, or allow
[ 0.03737521171569824, 0.08652728796005249, 0.5638415217399597, 0.043409835547208786, 0.3925246596336365, -0.15807296335697174, 0.22275342047214508, -0.3000694811344147, -0.021877117455005646, -0.6859486103057861, -0.3169918656349182, 0.6055650115013123, -0.2729894816875458, -0.0074057141318...
after-market customization- these are all candidates for DSL's.
[ 0.2829359769821167, -0.5472794771194458, 0.5567626357078552, 0.15795516967773438, 0.059497494250535965, -0.19764164090156555, -0.21042650938034058, -0.24194665253162384, -0.2979699671268463, -0.1320379227399826, -0.1579662412405014, 0.4949098825454712, -0.1371372491121292, 0.14939591288566...
I just saw a really cool WPF twitter client that I think is developed by the Herding Code podcast guys [HerdingCode](http://www.herdingcode.com/) called [Witty](http://code.google.com/p/wittytwitter/). (or at least, I see a lot of those guys using this client). This project is currently posted up on Google Code. Many of the projects on Google Code use Subversion as the version control system (including Witty). Having never used Subversion, I'm not sure what to do to download the code. On the source page for this project ([google code witty source](http://code.google.com/p/wittytwitter/source/checkout)) it gives the following instruction: **Non-members may check out a read-only working copy anonymously over HTTP.**
[ 0.6224621534347534, -0.08054465055465698, 0.09184839576482773, -0.05802425742149353, -0.4304066300392151, -0.5458825826644897, 0.4515412747859955, 0.5933839678764343, -0.2844323515892029, -0.4559590220451355, -0.01981259696185589, 0.3343593180179596, -0.30266010761260986, -0.05509265512228...
***svn checkout <http://wittytwitter.googlecode.com/svn/trunk/> wittytwitter-read-only*** I'm confused as to where I am supposed to enter the above command so that I can download the code. I have installed SVN and Tortoise (which I know almost nothing about). Thanks for any help or simply pointing me in the right direction. ...Ed (@emcpadden) After you install Tortoise (separate SVN client not required), create a new empty folder for the project somewhere and right click it in Windows. There should be an option for `SVN Checkout`. Choosing that option will open a dialog box. Paste the URL you posted above in the first textbox of
[ 0.048495929688215256, 0.05073796585202217, 0.6696739792823792, -0.0007088371785357594, 0.08822553604841232, -0.1402721107006073, 0.745266318321228, 0.44305619597435, -0.2912394106388092, -0.8418135643005371, -0.348493367433548, 0.6100682020187378, -0.11531119793653488, 0.001601171912625432...
that dialog box and click "OK".
[ 0.09201313555240631, 0.47461387515068054, 0.200992614030838, 0.10111802071332932, 0.31679901480674744, -0.13495752215385437, 0.2977471649646759, 0.2805844247341156, -0.460929274559021, -0.1402159184217453, -0.17407776415348053, 0.6746050119400024, -0.3182034194469452, 0.2287670522928238, ...
I am re-factoring some code and am wondering about the use of a `lock` in the instance constructor. ``` public class MyClass { private static Int32 counter = 0; private Int32 myCount; public MyClass() { lock(this) { counter++; myCount = counter; } } } ``` Please confirm 1. Instance constructors are thread-safe. 2. The lock statement prevents access to
[ -0.028287600725889206, 0.20802362263202667, 0.28962185978889465, -0.18312574923038483, 0.1680174469947815, -0.13610713183879852, 0.4336796998977661, -0.12150906026363373, -0.20560984313488007, -0.532157838344574, -0.02549668960273266, 0.5500507950782776, -0.2996702790260315, 0.446796745061...
that code block, not to the static 'counter' member. If the intent of the original programmer were to have each instance know its 'count', how would I synchronize access to the 'counter' member to ensure that another thread isn't new'ing a `MyClass` and changing the count before this one sets its count? *FYI - This class is not a singleton. Instances must simply be aware of their number.* @ajmastrean I am not saying you should use the singleton pattern itself, but adopt its method of encapsulating the instantiation process. i.e. * Make the constructor private. * Create a static instance method that returns the type. * In the
[ 0.47162455320358276, -0.014781051315367222, 0.08283286541700363, 0.11662451922893524, -0.2689335346221924, -0.06202083081007004, 0.47108858823776245, -0.04903760552406311, -0.12650446593761444, -0.44101202487945557, 0.23854169249534607, 0.19262027740478516, -0.44018274545669556, 0.34017741...
static instance method, use the lock keyword before instantiating. * Instantiate a new instance of the type. * Increment the count. * Unlock and return the new instance. ### EDIT One problem that has occurred to me, if how would you know when the count has gone down? ;) ### EDIT AGAIN Thinking about it, you could add code to the destructor that calls another static method to decrement the counter :D
[ -0.07203999161720276, -0.134643092751503, 0.4800229072570801, 0.029755502939224243, -0.2344866544008255, 0.1004558727145195, 0.41702917218208313, -0.20360489189624786, -0.36177557706832886, -0.5697276592254639, 0.03073827736079693, 0.693324089050293, -0.6229764819145203, 0.2934907972812652...
I have tried both of : ``` ini_set('include_path', '.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes'); ``` and also : ``` php_value include_path ".:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes" ``` in the .htaccess file. Both methods actually **do work** but only intermittently. That is, they will work fine for about 37 pages requests and then fail about 42 pages requests resulting in an require() call to cause a fatal error effectively crashing the site. I'm not even sure where to begin trying to find out what is going on! --- @[cnote](https://stackoverflow.com/questions/41836/setting-include-path-in-php-intermittently-fails-why#41877) > Looks like you duplicated the current directory in your include path. Try removing one of the '.:' from your string. The in script version was originally ``` ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'lib' . PATH_SEPARATOR
[ 0.12063223123550415, -0.07565741240978241, 0.3122766315937042, -0.18481245636940002, 0.08601938933134079, -0.20586027204990387, 0.6906006336212158, -0.16180400550365448, -0.23868641257286072, -0.7573556303977966, -0.0854758694767952, 0.6794230937957764, -0.5526800155639648, 0.0537027269601...
. 'app' . DIRECTORY_SEPARATOR . 'classes'); ``` and thus the .:.: was coming from the existing path: ``` ini_get('include_path') ``` I tried removing it anyway and the problem persists. It turned out the issue was related to a PHP bug in 5.2.5 Setting an "admin\_flag" for include\_path caused the include path to be empty in some requests, and Plesk sets an admin\_flag in the default config for something or other. An update of PHP solved the issue. <http://bugs.php.net/bug.php?id=43677>
[ 0.1918267458677292, 0.316652774810791, 0.24028179049491882, -0.3693028688430786, 0.25271689891815186, 0.06771007180213928, 0.6271570324897766, -0.26325300335884094, -0.0655694380402565, -0.433710515499115, -0.46515345573425293, 0.5667470693588257, -0.9180305600166321, 0.1351371854543686, ...
I'm about to start testing an intranet web application. Specifically, I've to determine the application's performance. Please could someone suggest formal/informal standards for how I can judge the application's performance. Use some tool for stress and load testing. If you're using Java take a look at [JMeter](http://jakarta.apache.org/jmeter/). It provides different methods to test you application performance. You should focus on: * **Response time**: How fast your application is running for normal requests. Test some read/write use case * **Load test**: How your application behaves in high traffic times. The tool will submit several requests (you can configure that properly) during a period of time. *
[ 0.506662130355835, -0.09270275384187698, 0.1650836169719696, 0.3443603515625, -0.22705423831939697, -0.3982295095920563, 0.2926207482814789, -0.2648404836654663, -0.13717783987522125, -0.8230850100517273, 0.30682602524757385, 0.4998020529747009, 0.12655732035636902, -0.3393774926662445, ...
**Stress test**: Do your application can operate during a long period of time? This test will push your application to the limits Start with this, if you're interested, there are other kinds of tests.
[ 0.7644057869911194, -0.0618700347840786, -0.12393452227115631, 0.1795729398727417, 0.4197143316268921, -0.37949931621551514, 0.42145100235939026, -0.056497007608413696, 0.058141618967056274, -0.43023860454559326, 0.19152866303920746, 0.46482300758361816, 0.23751485347747803, -0.23792527616...
If I run the following query in SQL Server 2000 Query Analyzer: ``` BULK INSERT OurTable FROM 'c:\OurTable.txt' WITH (CODEPAGE = 'RAW', DATAFILETYPE = 'char', FIELDTERMINATOR = '\t', ROWS_PER_BATCH = 10000, TABLOCK) ``` On a text file that conforms to OurTable's schema for 40 lines, but then changes format for the last 20 lines (lets say the last 20 lines have fewer fields), I receive an error. However, the first 40 lines are committed to the table. Is there something about the way I'm calling Bulk Insert that makes it not be transactional, or do I need to do something explicit to force
[ -0.10627614706754684, 0.1519695371389389, 0.44215819239616394, -0.206527441740036, -0.07589790225028992, 0.05686812475323677, 0.029737865552306175, -0.12792162597179413, -0.11093246936798096, -0.5730192065238953, -0.04682815447449684, 0.47326621413230896, -0.2031526118516922, -0.1025641784...
it to rollback on failure? `BULK INSERT` acts as a series of individual `INSERT` statements and thus, if the job fails, it doesn't roll back all of the committed inserts. It can, however, be placed within a transaction so you could do something like this: ``` BEGIN TRANSACTION BEGIN TRY BULK INSERT OurTable FROM 'c:\OurTable.txt' WITH (CODEPAGE = 'RAW', DATAFILETYPE = 'char', FIELDTERMINATOR = '\t', ROWS_PER_BATCH = 10000, TABLOCK) COMMIT TRANSACTION END TRY BEGIN CATCH ROLLBACK TRANSACTION END CATCH ```
[ 0.033887069672346115, -0.18271377682685852, 0.28648290038108826, -0.1447843611240387, 0.12393268197774887, 0.20480632781982422, -0.0889018103480339, -0.23403653502464294, -0.15901893377304077, -0.3289496898651123, -0.13553668558597565, 0.6600696444511414, -0.016232142224907875, -0.03117751...
Is there a way to find the name of the program that is running in Java? The class of the main method would be good enough. Try this: ``` StackTraceElement[] stack = Thread.currentThread ().getStackTrace (); StackTraceElement main = stack[stack.length - 1]; String mainClass = main.getClassName (); ``` Of course, this only works if you're running from the main thread. Unfortunately I don't think there's a system property you can query to find this out. **Edit:** Pulling in @John Meagher's comment, which is a great idea: > To expand on @jodonnell you can also > get all stack
[ -0.027996279299259186, 0.008879241533577442, 0.11395008862018585, -0.04653346166014671, 0.19575831294059753, -0.4999202787876129, 0.4450738728046417, 0.020105578005313873, -0.31317082047462463, -0.4437229633331299, -0.008356155827641487, 0.5638642311096191, -0.43087223172187805, 0.16324427...
traces in the system > using Thread.getAllStackTraces(). From > this you can search all the stack > traces for the "main" Thread to > determine what the main class is. This > will work even if your class is not > running in the main thread.
[ 0.2230202704668045, -0.42671653628349304, 0.2762227952480316, 0.06230172887444496, 0.19726483523845673, -0.22987103462219238, 0.26567399501800537, 0.043866775929927826, -0.12973973155021667, -0.9617220163345337, 0.18935362994670868, 0.2587588429450989, -0.47065404057502747, 0.0319824777543...
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#) for several months now. For the most part my IDE is set up fairly standard but I have been wondering what are some suggestions in terms of plugins/settings that you find to be the most useful? **Update**: Thanks for all the great suggestions. It looks like a general consensus that I should look into 'Resharper' along with some eye-candy with themes and custom fonts. --- **Themes** * [Consolas Font Pack for Visual Studio 2005/2008](http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&displaylang=en) * [Scott Hanselman's Visual Studio Themes Gallery](http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx) * [Visual Studio Theme Generator](http://frickinsweet.com/tools/Theme.mvc.aspx) **Free Tools** * [PowerCommands for Visual Studio 2008](http://visualstudiogallery.msdn.microsoft.com/en-us/df3f0c30-3d37-4e06-9ef8-3bff3508be31) *
[ 0.2593037486076355, -0.053260888904333115, 0.5169423818588257, 0.035894040018320084, -0.3720163404941559, 0.10234750062227249, -0.04416178911924362, -0.3402155041694641, -0.22327156364917755, -0.7077113389968872, -0.0020085603464394808, 0.7539360523223877, 0.34418678283691406, 0.1362978070...
[GhostDoc](http://submain.com/products/ghostdoc.aspx) * [HyperAddin](http://www.codeplex.com/hyperAddin) * [RockScroll](http://www.hanselman.com/blog/IntroducingRockScroll.aspx) * [CodeRush XPress](http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/) * [.NET Reflector](http://www.red-gate.com/products/reflector/) - (Not a plugin but still useful) **Paid Tools** * [Resharper](http://www.jetbrains.com/resharper/) - Free (Open Source), $49 (Academic), $199 (Personal), $349 (Commercial) * [CodeRush with Refactor!™ Pro](http://www.devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/) - $249 **[Resharper](http://www.jetbrains.com/resharper/)** is definitely a great tool. It has a moderate learning curve but is easy to pick up for some simple things and add mastery later. It is a good price for students and kinda expensive for the rest of us. Resharper is similar to CodeRush, but seems to have a larger following. **[PowerCommands](http://www.visualstudiogallery.com/ExtensionDetails.aspx?ExtensionID=df3f0c30-3d37-4e06-9ef8-3bff3508be31)** is a great set of add-ons that comes free from Microsoft. Things like "Open in Windows
[ 0.2282322645187378, -0.16297991573810577, 0.727587103843689, 0.3137962520122528, -0.20028935372829437, -0.18062295019626617, 0.2959735691547394, -0.1646093875169754, -0.0728372260928154, -0.39424991607666016, -0.10884802788496017, 0.5005577802658081, 0.1561458259820938, 0.01606527343392372...
Explorer", "Command Prompt Here", and Copy/Paste references. A discussion regarding **add-ins** is [floating around here somewhere](https://stackoverflow.com/questions/2767/do-you-have-any-recommended-add-onsplugins-for-microsoft-visual-studio). For straight-up customization, **changing colors** is fun, easy, and gives you a big bang for your buck. I prefer a slightly personalized version of [Rob Conery's TextMate theme for Visual Studio.](http://blog.wekeroad.com/2007/10/17/textmate-theme-for-visual-studio-take-2/) Once you get colors you like, you can just [export the settings](http://msdn.microsoft.com/en-us/library/zbhkx167(VS.80).aspx) and carry them with you wherever you go. Related to colors and themes, the [**Consolas** font pack](http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&displaylang=en) is pretty nifty and easy on the eye. And like John recommends, a [mastery of **keyboard shortcuts**](https://stackoverflow.com/questions/20507/give-me-awesome-visual-studio-keyboard-short-cuts) will pay big dividends.
[ 0.19639766216278076, -0.16332583129405975, 0.3926039934158325, -0.11612727493047714, -0.16078345477581024, -0.312759131193161, 0.027954617515206337, -0.1087864488363266, -0.16629964113235474, -0.567827582359314, -0.0202956460416317, 0.8756662607192993, -0.12397594004869461, 0.0866749510169...
What is a good data structure for storing phone numbers in database fields? I'm looking for something that is flexible enough to handle international numbers, and also something that allows the various parts of the number to be queried efficiently. **Edit:** Just to clarify the use case here: I currently store numbers in a single varchar field, and I leave them just as the customer entered them. Then, when the number is needed by code, I normalize it. The problem is that if I want to query a few million rows to find matching phone numbers, it involves a function, like ``` where
[ 0.2027885913848877, 0.11198235303163528, 0.19385527074337006, 0.07846492528915405, 0.00038287564530037344, 0.07581909745931625, 0.025859983637928963, -0.03126215189695358, -0.24057693779468536, -0.40455126762390137, 0.10875748097896576, 0.3782005310058594, -0.273016095161438, 0.18940290808...
dbo.f_normalizenum(num1) = dbo.f_normalizenum(num2) ``` which is terribly inefficient. Also queries that are looking for things like the area code become extremely tricky when it's just a single varchar field. **[Edit]** People have made lots of good suggestions here, thanks! As an update, here is what I'm doing now: I still store numbers exactly as they were entered, in a varchar field, but instead of normalizing things at query time, I have a trigger that does all that work as records are inserted or updated. So I have ints or bigints for any parts that I need to query, and those fields are indexed to
[ 0.08588588237762451, 0.08223547041416168, 0.291608065366745, -0.13094836473464966, -0.22284309566020966, -0.08764111250638962, 0.1888943761587143, -0.25894051790237427, -0.2169269174337387, -0.513462483882904, 0.040997669100761414, 0.39046359062194824, -0.2962641417980194, 0.16736055910587...
make queries run faster. First, beyond the country code, there is no real standard. About the best you can do is recognize, by the country code, which nation a particular phone number belongs to and deal with the rest of the number according to that nation's format. Generally, however, phone equipment and such is standardized so you can almost always break a given phone number into the following components * C Country code 1-10 digits (right now 4 or less, but that may change) * A Area code (Province/state/region) code 0-10 digits (may actually want a region field and an area field separately, rather
[ 0.2566632926464081, 0.03963972255587578, 0.3291500508785248, 0.3823624551296234, 0.14488978683948517, -0.06536653637886047, 0.46695199608802795, -0.0706268846988678, -0.569944441318512, -0.4104785919189453, -0.31314218044281006, -0.019392095506191254, 0.04703175276517868, 0.188162028789520...
than one area code) * E Exchange (prefix, or switch) code 0-10 digits * L Line number 1-10 digits With this method you can potentially separate numbers such that you can find, for instance, people that might be close to each other because they have the same country, area, and exchange codes. With cell phones that is no longer something you can count on though. Further, inside each country there are differing standards. You can always depend on a (AAA) EEE-LLLL in the US, but in another country you may have exchanges in the cities (AAA) EE-LLL, and simply line numbers in the rural
[ 0.6718495488166809, -0.3715056777000427, 0.6109506487846375, 0.4997537434101105, 0.13617753982543945, -0.1329459846019745, 0.21174213290214539, -0.1837863177061081, -0.2982454299926758, -0.6930077075958252, -0.04425729438662529, 0.09390491992235184, -0.33220887184143066, 0.2153189331293106...
areas (AAA) LLLL. You will have to start at the top in a tree of some form, and format them as you have information. For example, country code 0 has a known format for the rest of the number, but for country code 5432 you might need to examine the area code before you understand the rest of the number. You may also want to handle `vanity` numbers such as `(800) Lucky-Guy`, which requires recognizing that, if it's a US number, there's one too many digits (and you may need to full representation for advertising or other purposes) and that in
[ 0.3962964713573456, 0.18953156471252441, 0.634928286075592, 0.08805938810110092, -0.005632820073515177, -0.27247121930122375, 0.12051074206829071, -0.10298077762126923, -0.6464676260948181, -0.2141389399766922, -0.3158773183822632, 0.09086605906486511, -0.2570246160030365, 0.18119007349014...
the US the letters map to the numbers differently than in Germany. You may also want to store the entire number separately as a text field (with internationalization) so you can go back later and re-parse numbers as things change, or as a backup in case someone submits a bad method to parse a particular country's format and loses information.
[ 0.5551946759223938, 0.05772566422820091, 0.31757816672325134, 0.08429620414972305, 0.09651967138051987, -0.07868900150060654, 0.36954107880592346, 0.23417481780052185, -0.4910365045070648, -0.4161718785762787, -0.2502839267253876, -0.019086293876171112, -0.1726149171590805, 0.1625206321477...
When I do a file search on eclipse it includes the `.svn` directories by default. I tried excluding them from the build path but they still appear on file search results. Spaceman is right. With Helios, choose `Project -> Properties -> Resource -> Resource Filters` and then add an `exclude` filter for type "Folder" with name `.svn`.
[ 0.17128179967403412, 0.023725928738713264, 0.08205931633710861, 0.038577206432819366, -0.2064349204301834, -0.13032549619674683, -0.016942089423537254, -0.19738119840621948, 0.047682203352451324, -0.7700537443161011, -0.21944627165794373, 0.46321341395378113, -0.283416211605072, 0.02743225...
I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM Projection. The 10 TM projection is similar to UTM, but it is a custom projection for the province of Alberta, Canada. I think (with some effort) I could code it myself but would rather not reinvent the wheel if it's been done already. Grab [PROJ Cartographic Projections library](https://proj.org) - open source library. Suggested parameters for 10TM: > +proj=tmerc +lon\_0=-115 +k\_0=0.9992 +x\_0=500000 +datum=NAD27 According to [this post](http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0311/msg00336.html) you may need to: > change the ellps to GRS80 if your 10TM > data is referenced to the NAD83 datum > (instead of NAD27/clrk66). You may > also
[ -0.02442050725221634, -0.03833320736885071, 1.0492349863052368, 0.10503581166267395, -0.2705894410610199, 0.1648351103067398, 0.1443527191877365, -0.014140309765934944, -0.4568789303302765, -0.7416626811027527, 0.056143783032894135, -0.12125568091869354, -0.10455486923456192, 0.06599956005...
need to change the false northing > (y\_0) to be -5000000 if your 10TM > coordinates for Alberta are less than > 5,000,000 (an AltaLIS "standard"). I should mention that proj.4 is *the library* to get for any kind of geographic coordinate system transformation. There's pretty much no transformation it can't do. I also recommend reading [Map Projections-A Working Manual (Paperback) by John Snyder](https://pubs.er.usgs.gov/publication/pp1395) if you are into these kinds of things.. it's a classic. :) (fixed the link)
[ 0.14379878342151642, 0.20840489864349365, 0.43394047021865845, 0.062193844467401505, -0.061808496713638306, -0.047604355961084366, 0.6284748315811157, 0.12493399530649185, -0.2655573785305023, -0.5521111488342285, 0.05451194569468498, -0.4445852041244507, -0.32858806848526, 0.1453156620264...
I'm creating an application which lets you define events with a time frame. I want to automatically fill in the end date when the user selects or changes the start date. I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference. In JavaScript, dates can be transformed to the number of milliseconds since the epoc by calling the `getTime()` method **or** just using the date in a numeric expression. So to get the difference, just subtract the two dates. To create a new date based on
[ 0.42158547043800354, -0.18294206261634827, 0.2311420887708664, 0.08170312643051147, 0.12292026728391647, 0.1311093270778656, 0.024171773344278336, -0.07248814404010773, -0.23894362151622772, -0.6415607333183289, 0.055282194167375565, 0.12603996694087982, -0.10680665820837021, 0.23988723754...
the difference, just pass the number of milliseconds in the constructor. ``` var oldBegin = ... var oldEnd = ... var newBegin = ... var newEnd = new Date(newBegin + oldEnd - oldBegin); ``` This should just work **EDIT**: Fixed bug pointed by @bdukes **EDIT**: For an explanation of the behavior, `oldBegin`, `oldEnd`, and `newBegin` are `Date` instances. Calling operators `+` and `-` will trigger Javascript auto casting and will automatically call the `valueOf()` prototype method of those objects. It happens that the `valueOf()` method is implemented in the `Date` object as a call to `getTime()`. So basically: `date.getTime() === date.valueOf() === (0 + date) === (+date)`
[ 0.12638667225837708, 0.03399106487631798, 0.286623477935791, -0.465080201625824, 0.2193026840686798, -0.07048751413822174, 0.25196197628974915, -0.26501643657684326, -0.08705703914165497, -0.4718947112560272, -0.05394314229488373, 0.56086665391922, -0.384551465511322, 0.45860716700553894, ...
I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application. On OSX, I can open a window in the finder with ``` os.system('open "%s"' % foldername) ``` and on Windows with ``` os.startfile(foldername) ``` What about unix/linux? Is there a standard way to do this or do I have to special case gnome/kde/etc and manually run the appropriate application (nautilus/konqueror/etc)? This looks like something that could be specified by the [freedesktop.org](http://freedesktop.org) folks (a python module, similar to `webbrowser`, would also be nice!). ``` os.system('xdg-open "%s"' % foldername) ``` `xdg-open` can be used for files/urls also
[ 0.2942819595336914, 0.23574985563755035, 0.4506664276123047, 0.13098320364952087, 0.09211204200983047, -0.21700143814086914, 0.17244696617126465, 0.2845267355442047, -0.19730043411254883, -0.812601625919342, -0.28577208518981934, 0.5921151638031006, -0.17017962038516998, 0.2643759250640869...
What is the fastest method of parsing an XML file in C#? I'm using .Net 2.0 If you're using .Net 2 then the XmlReader and XmlDocument are about it. If you can use .Net 3.5 then the new Linq to Xml methods are a big improvement.
[ 0.12961804866790771, 0.04055294021964073, 0.5561678409576416, 0.12299664318561554, -0.11549659073352814, -0.474505215883255, -0.35102102160453796, 0.12264940142631531, -0.1796688735485077, -0.6947316527366638, 0.15742920339107513, 0.6854533553123474, -0.21229100227355957, -0.40264219045639...
What's going on here? printf.sh: ``` #! /bin/sh NAME="George W. Bush" printf "Hello, %s\n" $NAME ``` Command line session: ``` $ ./printf.sh Hello, George Hello, W. Hello, Bush ``` UPDATE: `printf "Hello, %s\n" "$NAME"` works. For why I'm not using `echo`, consider echo.sh: ``` #! /bin/sh FILE="C:\tmp" echo "Filename: $FILE" ``` Command-line: ``` $ ./echo.sh Filename: C: mp ``` The [POSIX spec for `echo`](http://www.opengroup.org/onlinepubs/009695399/utilities/echo.html) says, "New applications are encouraged to use `printf` instead of `echo`" (for this and other reasons). Your NAME variable is being substituted like this: ``` printf "Hello, %s\n" George W. Bush ``` Use this: ``` #! /bin/sh NAME="George W. Bush" printf "Hello, %s\n" "$NAME" ```
[ 0.2732834219932556, 0.353191077709198, 0.011632183566689491, -0.10173870623111725, 0.18049953877925873, -0.2321014106273651, 0.5633395314216614, -0.3410492241382599, -0.30962562561035156, -0.14537844061851501, -0.4255828559398651, 0.3141895830631256, -0.8178514838218689, 0.2279430031776428...
I have a library I created, ### File *mylib.c:* ``` #include <mylib.h> int testlib() { printf("Hello, World!\n"); return (0); } ``` ### File *mylib.h:* ``` #include <stdio.h> extern int testlib(); ``` In my program, I've attempted to call this library function: ### File *myprogram.c*: ``` #include <mylib.h> int main (int argc, char *argv[]) { testlib(); return (0); } ``` When I attempt to compile this program I get the following error: ``` In file included from myprogram.c:1 mylib.h:2 warning: function declaration isn't a prototype ``` I'm using: `gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)` What is the proper way to declare a function prototype? In C `int foo()` and `int foo(void)` are different functions. `int foo()`
[ 0.4782637655735016, 0.31438151001930237, 0.05813226476311684, -0.2810550034046173, 0.11813247948884964, -0.07489479333162308, 0.5639761090278625, -0.19666922092437744, 0.10249686986207962, -0.5342366099357605, 0.1458122730255127, 0.25518330931663513, -0.5635478496551514, 0.4334272444248199...
accepts an arbitrary number of arguments, while `int foo(void)` accepts 0 arguments. In C++ they mean the same thing. I suggest that you use `void` consistently when you mean no arguments. If you have a variable `a`, `extern int a;` is a way to tell the compiler that `a` is a symbol that might be present in a different translation unit (C compiler speak for source file), don't resolve it until link time. On the other hand, symbols which are function names are anyway resolved at link time. The meaning of a storage class specifier on a function (`extern`, `static`) only
[ -0.23850715160369873, 0.058003466576337814, 0.34214141964912415, -0.18143513798713684, -0.1791802942752838, -0.10082153975963593, 0.17030556499958038, -0.14462625980377197, -0.06985554844141006, -0.500849187374115, -0.32278984785079956, 0.5100277662277222, -0.39508333802223206, 0.022506823...
affects its visibility and `extern` is the default, so `extern` is actually unnecessary. I suggest removing the `extern`, it is extraneous and is usually omitted.
[ 0.0013020711485296488, -0.18715526163578033, 0.23510946333408356, -0.1443280279636383, -0.24562276899814606, 0.08106603473424911, 0.38749849796295166, 0.590464174747467, 0.0947045385837555, -0.593738317489624, -0.6523261666297913, 0.4699692130088806, -0.09534873813390732, -0.19915321469306...
This is an adapted version of a question from someone in my office. She's trying to determine how to tell what ports MSDE is running on for an application we have in the field. Answers to that narrower question would be greatly appreciated. I'm also interested in a broader answer that could be applied to any networked applications. I've always liked the sysinternals app TCPView, which can now be found [here](http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx). Good luck.
[ 0.3837894797325134, -0.23248910903930664, 0.45331794023513794, 0.2699655294418335, 0.2739056646823883, -0.431444376707077, 0.2626661956310272, 0.49175190925598145, -0.5259106755256653, -0.8283162713050842, 0.01628577895462513, 0.27830177545547485, 0.20657344162464142, 0.4455758333206177, ...
The company I work for makes hardware that communicates to the computer though a serial port. Third party companies write software that communicates with our hardware. There are times when I need to diagnose our hardware. However, a third party software app connects to the serial port when Windows starts up, blocking any other connection. I don't know the name of this application/service and it's not always the same one. Is there any way to either: * Find the name/pid of the app/service that is currently using a given serial port or * Steal the serial port connection from another app. vb.net preferably, but
[ 0.779650092124939, 0.48376139998435974, 0.2521446943283081, 0.16957899928092957, 0.16506144404411316, 0.0008214674307964742, 0.10166618973016739, 0.3842568099498749, -0.26732704043388367, -0.6227832436561584, -0.04662702977657318, 0.45091721415519714, -0.14356273412704468, 0.53366762399673...
I'll take a language agnostic answer as well. You can use the [process explorer](http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) tool also from SysInternals to search for open handles. In this case you would want to search for 'Serial' since it uses device names that may not map to com port numbers. (e.g. COM1 is \Device\Serial0 on my system). If you want to take control of the serial port from another app I think you would need co-operation of the driver.
[ -0.030843671411275864, 0.2761267423629761, 0.3171218931674957, 0.18790778517723083, -0.015280812978744507, 0.3509056568145752, 0.22654284536838531, 0.1737198531627655, -0.41806280612945557, -0.8257454037666321, -0.21992741525173187, 0.5628006458282471, -0.0014475217321887612, 0.31102830171...
I would like to flash a success message on my page. I am using the jQuery `fadeOut` method to fade and then remove the element. I can increase the duration to make it last longer, however this looks strange. What I would like to happen is have the element be displayed for five seconds, then fade quickly, and finally be removed. How can you animate this using jQuery? The new `delay()` function in jQuery 1.4 should do the trick. ``` $('#foo').fadeIn(200).delay(5000).fadeOut(200).remove(); ```
[ 0.3462926745414734, -0.05657189339399338, 0.42225173115730286, -0.29225677251815796, 0.08809628337621689, -0.09795072674751282, 0.27613842487335205, -0.23625418543815613, -0.15178431570529938, -0.3081481456756592, -0.16340753436088562, 0.5257817506790161, -0.4979264438152313, 0.02799244225...
It seems that IE6 ignores any form of cache invalidation sent via http headers, I've tried setting Pragma to No Cache and setting Cache Expiration to the current time, yet in IE6, hitting back will always pull up a cached version of a page I am working on. Is there a specific HTTP Header that IE6 does listen too? `Cache-Control: private, max-age=0` should fix it. From classic ASP this is done with `Response.Expires=-1`. Keep in mind when testing that just because your server is serving pages with caching turned off doesn't mean that the browser will obey that when it has an old
[ 0.1780080795288086, 0.2609773576259613, 0.45851072669029236, -0.18404625356197357, -0.28317221999168396, -0.3453156650066376, 0.6310733556747437, 0.30580243468284607, -0.33024683594703674, -0.7315373420715332, -0.4617059528827667, 0.4588530659675598, -0.12389236688613892, 0.344215035438537...
cached page that it was told was okay to cache. Clear the cache or use F5 to force that page to be reloaded. Also, for those cases where the server is serving cached content it you can use `Ctrl+F5` to signal the server not to serve it from cache.
[ -0.03550319746136665, -0.010164218954741955, 0.615705668926239, 0.07844436168670654, 0.0032171423081308603, -0.2113073319196701, 0.4782276451587677, 0.09077952057123184, -0.24885648488998413, -0.4230990707874298, -0.6837933659553528, 0.5059798955917358, -0.4073605239391327, 0.1692363321781...
Any good suggestions? Input will be the name of a header file and output should be a list (preferably a tree) of all files including it directly or indirectly. If you have access to GCC/G++, then the [`-M` option](http://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#Preprocessor-Options) will output the dependency list. It doesn't do any of the extra stuff that the other tools do, but since it is coming from the compiler, there is no chance that it will pick up files from the "wrong" place.
[ 0.3133264482021332, -0.11564940214157104, 0.30608341097831726, 0.1253052055835724, -0.045858148485422134, 0.001682270085439086, -0.203060582280159, 0.041569873690605164, -0.20194293558597565, -0.4783748686313629, -0.20619623363018036, 0.43632397055625916, -0.3751924932003021, -0.0392989441...
I have the next function: ``` function setImagesWidth(id,width) { var images = document.getElementById(id).getElementsByTagName("img"); for(var i = 0; i < images.length;i++) { // If the real width is bigger than width parameter images[i].style.width=width; //} } } ``` I would like to set the css width attribute of all my img tags to
[ 0.3016231954097748, -0.1780271679162979, 0.7198089957237244, -0.2662941813468933, -0.0963318943977356, -0.1830778568983078, 0.09022562205791473, -0.30306708812713623, -0.0837734192609787, -0.799391508102417, -0.007473339326679707, 0.5432561039924622, -0.2723844349384308, 0.1680454164743423...
a particular value only when the image real width is bigger than the attribute value. If it is possible, i would like a solution which does not use any particular framework. --- `images[i].offsetWidth` returns 111 for an image of 109px width. Is this because 1px each side border? @Sergio del Amo: Indeed, if you check out my link you'll see that you want `clientWidth` instead. @Sergio del Amo: You cannot, unfortunately, accept your own answer. But you do have an extraneous period in the "px" suffix, so let's go with this, including the `clientWidth` change: ``` // width in pixels function setImagesWidth(id, width) {
[ 0.2530740201473236, 0.1459573358297348, 0.8035117387771606, 0.17963972687721252, -0.1496054232120514, -0.113065205514431, -0.09801193326711655, -0.3822382688522339, -0.2988848388195038, -0.1851198971271515, 0.2114320993423462, 0.6279709935188293, -0.28110650181770325, -0.2265600711107254, ...
var images = document.getElementById(id).getElementsByTagName("img"); var newWidth = width + "px"; for (var i = 0; i < images.length; ++i) { if (images[i].clientWidth > width) { images[i].style.width = newWidth; } } } ```
[ 0.08131146430969238, -0.14199747145175934, 0.8441453576087952, -0.3096778392791748, 0.06744720786809921, -0.06102436035871506, 0.2714729905128479, -0.4417107403278351, -0.20963765680789948, -0.658056914806366, -0.39279890060424805, 0.5799455642700195, -0.35299888253211975, 0.23857903480529...
I'm wondering how to use a VideoDisplay object (defined in MXML) to display video streamed from FMS via a NetStream. The [Flex3 docs](http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html) suggest this is possible: > The Video Display ... supports progressive download over HTTP, streaming from the Flash Media Server, and streaming from a Camera object. However, later in the docs all I can see is an attachCamera() method. There doesn't appear to be an attachStream() method like the old Video object has. It looks like you can play a fixed file served over HTML by using the source property, but I don't see anything about how to attach a NetStream. The
[ 0.21944402158260345, -0.1588955968618393, 0.8120036721229553, -0.05802009254693985, -0.13388675451278687, -0.348481148481369, -0.03636052832007408, -0.25312092900276184, -0.4658234715461731, -0.5378410220146179, 0.005616326350718737, 0.7861481308937073, -0.2672841250896454, 0.1312774419784...
old [Video](http://livedocs.adobe.com/flex/3/langref/flash/media/Video.html) object still seems to exist, though it's not based on UIComponent and doesn't appear to be usable in MXML. I found [this blog post](http://blog.flexexamples.com/2008/03/01/displaying-a-video-in-flex-using-the-netconnection-netstream-and-video-classes/) that shows how to do it with a regular Video object, but I'd much prefer to use VideoDisplay (or something else that can be put directly in the MXML). Unfortunately you can attachNetStream() only on Video object. So you are doomed to use em if you want to get data from FMS. By the way attachCamera() method **publishes** local camera video to the server so be careful ;)
[ 0.300422340631485, 0.026296045631170273, 0.9192112684249878, 0.1518588364124298, 0.05871616303920746, -0.4036296308040619, 0.03800943121314049, -0.22894568741321564, -0.402250200510025, -0.6079355478286743, -0.06211715191602707, 0.5708845257759094, -0.08290034532546997, 0.3674842417240143,...
How do you write the syntax for a While loop? C`#` ---- ``` int i = 0; while (i != 10) { Console.WriteLine(i); i++; } ``` VB.Net ------ ``` Dim i As Integer = 0 While i <> 10 Console.WriteLine(i) i += 1 End While ``` PHP --- ``` <?php while(CONDITION) { //Do something here. } ?> <?php //MySQL query stuff here $result = mysql_query($sql, $link) or die("Opps"); while($row = mysql_fetch_assoc($result)) { $_SESSION['fName'] = $row['fName']; $_SESSION['lName'] = $row['lName']; //... } ?> ``` Python ------ ``` i = 0 while i != 10: print i i += 1 ``` In PHP a while loop will look like this: ``` <?php while(CONDITION) { //Do something here. } ?> ``` A real world example of this might look something like this ``` <?php //MySQL query
[ 0.25238069891929626, -0.06569407135248184, 0.4882127344608307, -0.14224079251289368, 0.1795700043439865, -0.029147420078516006, 0.3708394467830658, 0.013161053881049156, -0.11613595485687256, -0.20476488769054413, -0.12405455112457275, 0.5782744884490967, -0.3903285264968872, -0.2429209053...
stuff here $result = mysql_query($sql, $link) or die("Opps"); while($row = mysql_fetch_assoc($result)) { $_SESSION['fName'] = $row['fName']; $_SESSION['lName'] = $row['lName']; //... } ?> ```
[ 0.19027459621429443, 0.15044888854026794, 0.8387451767921448, -0.09193893522024155, 0.46913841366767883, -0.3928888738155365, 0.16899751126766205, -0.25039881467819214, -0.368919312953949, -0.26749542355537415, -0.27222713828086853, 0.5296187400817871, -0.22959034144878387, 0.4415163695812...
Essentially I want to know if in VB.NET 2005 if using a sqlcommand and then reusing it by using the NEW is wrong. Will it cause a memory leak. EG: ``` try dim mySQL as new sqlcommand(sSQL, cnInput) // do a sql execute and read the data mySQL = new sqlcommand(sSQLdifferent, cnInput) // do sql execute and read the data catch ... finally if mysql isnot nothing then mysql.dispose mysql = nothing end if ``` EDIT: put try catch in to avoid the comments about not using them Just to extend what Longhorn213 said, here's the code for it: ``` Using mysql as SqlCommand = new SqlCommand(sSql, cnInput) ' do
[ 0.44889864325523376, -0.06043659523129463, 0.40332868695259094, -0.1385052651166916, -0.04797382652759552, -0.5639451146125793, 0.24221624433994293, -0.16131426393985748, -0.3702133595943451, -0.3554927706718445, 0.16338278353214264, 0.7243553996086121, -0.17771027982234955, 0.257042199373...
stuff' End Using Using mysql as SqlCommand = new SqlCommand(otherSql, cnInput) ' do other stuff' End Using ``` (edit) Just as an FYI, using automatically wraps the block of code around a try/finally that calls the Dispose method on the variable it is created with. Thus, it's an easy way to ensure your resource is released. <http://msdn.microsoft.com/en-us/library/htd05whh(VS.80).aspx>
[ 0.4553411602973938, -0.015323543921113014, 0.5376124978065491, 0.0976327508687973, 0.23740807175636292, -0.44585829973220825, 0.09075214713811874, -0.17201948165893555, -0.33426332473754883, -0.39163485169410706, -0.22198140621185303, 0.1469099223613739, -0.4532012641429901, 0.218177437782...
X Windows has special processes called Window Managers that manage the layout of windows and decorations like their title bar, control buttons etc. Such processes use an X Windows API to detect events related to windows sizes and positions. Are there any consistent ways for writing such processes for Microsoft Windows or Mac OS/X? I know that in general these systems are less flexible but I'm looking for something that will use public APIs and not undocumented hacks. Just to extend what Longhorn213 said, here's the code for it: ``` Using mysql as SqlCommand = new SqlCommand(sSql, cnInput) ' do stuff' End Using Using mysql as
[ 0.46299970149993896, 0.17021317780017853, 0.3577553629875183, 0.04271429032087326, -0.21512280404567719, -0.35640063881874084, 0.06166793406009674, 0.15688274800777435, -0.28485220670700073, -0.6697191596031189, -0.11118913441896439, 0.3160974979400635, -0.48563191294670105, 0.212654829025...
SqlCommand = new SqlCommand(otherSql, cnInput) ' do other stuff' End Using ``` (edit) Just as an FYI, using automatically wraps the block of code around a try/finally that calls the Dispose method on the variable it is created with. Thus, it's an easy way to ensure your resource is released. <http://msdn.microsoft.com/en-us/library/htd05whh(VS.80).aspx>
[ 0.39303305745124817, -0.09515479952096939, 0.3279629945755005, -0.027233360335230827, 0.09062870591878891, -0.396919846534729, 0.09883633255958557, -0.279727578163147, -0.24353213608264923, -0.4723869860172272, -0.1374259889125824, 0.2575775682926178, -0.3945145905017853, 0.331868648529052...
I'm writing a C# POS (point of sale) system that takes input from a keyboard wedge magcard reader. This means that any data it reads off of a mag stripe is entered as if it were typed on the keyboard very quickly. Currently I'm handling this by attaching to the KeyPress event and looking for a series of very fast key presses that contain the card swipe sentinel characters. Is there a better way to deal with this sort of input? Edit: The device does simply present the data as keystrokes and doesn't interface through some other driver. Also We use
[ 0.37597641348838806, -0.04235803335905075, 0.6860409379005432, 0.37516993284225464, -0.021830322220921516, 0.01807052083313465, -0.09133496135473251, -0.2147892713546753, -0.11822740733623505, -0.5583126544952393, 0.04398650303483009, 0.4717778265476227, -0.15227186679840088, 0.03692694008...
a wide range of these types of devices so ideally a method should work independent of the specific model of wedge being used. However if there is no other option I'll have to make do. One thing you can do is that you should be able to configure your wedge reader so that it presents one or many escape characters before or after the string. You would use these escape characters to know that you are about to have (or just had) a magcard input. This same technique is used by barcode reader devices so you application knows to get focus or
[ 0.19481852650642395, -0.2694331407546997, 0.18945787847042084, 0.16188369691371918, 0.018974563106894493, 0.039508894085884094, 0.23667487502098083, -0.3638370931148529, -0.16847136616706848, -0.61542147397995, -0.09541670978069305, 0.3820372223854065, -0.31347590684890747, -0.144702538847...
handle the data input from the device. The negative to this approach is that you have to properly configure your external devices. This can be a deployment issue. This assumes that your devices simply present the data as keystrokes and don't interface through some other driver.
[ 0.0822187289595604, 0.19547855854034424, 0.2874312102794647, 0.4886133670806885, 0.1422148495912552, -0.2368653118610382, 0.1564619243144989, -0.23515018820762634, -0.12691885232925415, -0.32804685831069946, -0.23222582042217255, 0.8769497275352478, -0.10060060024261475, -0.080585263669490...
``` class Foo { static bool Bar(Stream^ stream); }; class FooWrapper { bool Bar(LPCWSTR szUnicodeString) { return Foo::Bar(??); } }; ``` `MemoryStream` will take a `byte[]` but I'd *like* to do this without copying the data if possible. You can avoid the copy if you use an [`UnmanagedMemoryStream()`](http://msdn.microsoft.com/en-us/library/system.io.unmanagedmemorystream.aspx) instead (class exists in .NET FCL 2.0 and later). Like `MemoryStream`, it is a subclass of `IO.Stream`, and has all the usual stream operations. Microsoft's description of the class is: > Provides access to unmanaged blocks of memory from managed code. which pretty much tells you what you need to
[ -0.06890100985765457, -0.09881213307380676, 0.2570140063762665, -0.01076087448745966, 0.058005440980196, -0.15705245733261108, 0.10094687342643738, 0.05363524332642555, -0.080104760825634, -0.4983808100223541, 0.10502687096595764, 0.5083538293838501, -0.42458924651145935, 0.297717958688735...
know. Note that `UnmanagedMemoryStream()` is not CLS-compliant.
[ 0.19354447722434998, 0.13462354242801666, 0.18510602414608002, 0.05371404066681862, 0.2853076457977295, -0.8158581852912903, 0.37194615602493286, 0.25107672810554504, -0.07937575876712799, -0.284414142370224, -0.15428395569324493, 0.45787087082862854, -0.26930859684944153, 0.22493766248226...
I'm almost certain I know the answer to this question, but I'm hoping there's something I've overlooked. Certain applications seem to have the Vista Aero look and feel to their caption bars and buttons even when running on Windows XP. (Google Chrome and Windows Live Photo Gallery come to mind as examples.) I know that one way to accomplish this from WinForms would be to create a borderless form and draw the caption bar/buttons yourself, then overriding `WndProc` to make sure moving, resizing, and button clicks do what they're supposed to do (I'm not clear on the specifics but could probably
[ 0.3176475167274475, 0.0026069339364767075, 0.5604734420776367, 0.04189465939998627, 0.012823226861655712, -0.11250834167003632, 0.17323701083660126, -0.2392580211162567, -0.2149902731180191, -0.5327339768409729, -0.08805318176746368, 0.8038217425346375, -0.1477600485086441, -0.104414686560...
pull it off given a day to read documentation.) I'm curious if there's a different, easier way that I'm overlooking. Perhaps some API calls or window styles I've overlooked? I believe Google has answered it for me by using the roll-your-own-window approach with Chrome. I will leave the question open for another day in case someone has new information, but I believe I have answered the question myself. Here's an article with full code sample on how to use your own custom "chrome" for an application: [http://geekswithblogs.net/kobush/articles/CustomBorderForms3.aspx](https://web.archive.org/web/20200718062913/http://geekswithblogs.net:80/kobush/articles/CustomBorderForms3.aspx) This looks like some really good stuff. There are a total of 3 articles in it's series,
[ 0.57393479347229, 0.11933474242687225, 0.266611784696579, -0.03205229714512825, -0.6142631769180298, 0.23452651500701904, 0.045800648629665375, 0.019255034625530243, -0.4860345423221588, -0.5240487456321716, 0.0725933238863945, 0.40806296467781067, 0.004781132563948631, 0.01087426114827394...
and it runs great, and on Vista too!
[ 0.49573031067848206, 0.2406075894832611, 0.22847002744674683, -0.11091844737529755, 0.32687121629714966, -0.263881653547287, 0.3268693685531616, 0.8060359954833984, -0.289527952671051, -0.3519720733165741, 0.4769793748855591, 0.23135432600975037, 0.412702739238739, 0.20551767945289612, 0...
As a long time Microsoft developer, I find [MSDN](http://en.wikipedia.org/wiki/Microsoft_Developer_Network) to be an invaluable resource. However, when tinkering at home I am not able to play with the best latest technologies and the different offerings coming from Microsoft as I cannot justify paying such a hefty price for what is essentially a pastime. The [Express editions](http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express) are great, but fall flat when trying to use the more advanced feature I am used to from the versions I use at work. I cannot get the latest betas and play with the new offerings, not legally, anyway. Apart from getting an [MVP](http://en.wikipedia.org/wiki/Microsoft_Most_Valuable_Professional), how would one go
[ 0.32074788212776184, 0.1498701274394989, -0.10973215848207474, 0.13908545672893524, -0.21770073473453522, -0.27987509965896606, 0.00550160463899374, 0.09825734794139862, -0.15650126338005066, -0.5366173386573792, -0.016228677704930305, 0.39479854702949524, 0.20307126641273499, -0.078361712...
about getting an MSDN subscription for an acceptable price for a non-professional environment? --- I am aware of the Empower program, but I thought it was geared towards getting *commercial* software to market. If this is not the case, it appears like the way for me to go. Thanks! There is an Empower program that Microsoft has available. It gives you several Premium subscriptions for cheap, with the catch that you have to be an ISV working towards an actual product. [This](https://partner.microsoft.com/global/program/40066412) (Not available anymore - broken link) gives you all the software you'll need for development, and even a few "real world" licenses
[ 0.5625970363616943, -0.04612172767519951, 0.17386768758296967, 0.44963186979293823, 0.21438713371753693, -0.35218772292137146, 0.12247801572084427, 0.30008643865585327, -0.1834203004837036, -0.35600173473358154, 0.00611364608630538, 0.5615990161895752, 0.11427336931228638, -0.1608132123947...
for certain apps (like Office) After a couple of years, you have to pay full price though. The logic being that you should have a product on the market, and can afford it.
[ 0.49740225076675415, 0.21418525278568268, 0.4671293795108795, 0.2039029896259308, 0.3963218927383423, -0.25280842185020447, 0.03573516756296158, 0.39908522367477417, -0.20448707044124603, -0.5085253715515137, -0.10498933494091034, 0.4829832911491394, 0.15191271901130676, 0.0233895257115364...
Is there a reasonable way to extract plain text from a Word file that doesn't depend on COM automation? (This is a a feature for a web app deployed on a non-Windows platform - that's non-negotiable in this case.) Antiword seems like it might be a reasonable option, but it seems like it might be abandoned. A Python solution would be ideal, but doesn't appear to be available. I use catdoc or antiword for this, whatever gives the result that is the easiest to parse. I have embedded this in python functions, so it is easy to use from the parsing system (which
[ 0.04676501452922821, 0.0004850242694374174, 0.16235464811325073, 0.13868406414985657, -0.07413837313652039, 0.04286344721913338, 0.2982277274131775, 0.13747665286064148, -0.08781551569700241, -0.6304156184196472, -0.09584859758615494, 0.7157076001167297, -0.31755632162094116, -0.2793607115...
is written in python). ``` import os def doc_to_text_catdoc(filename): (fi, fo, fe) = os.popen3('catdoc -w "%s"' % filename) fi.close() retval = fo.read() erroroutput = fe.read() fo.close() fe.close() if not erroroutput: return retval else: raise OSError("Executing the command caused an error: %s" % erroroutput) # similar doc_to_text_antiword() ``` The -w switch to catdoc turns off line wrapping, BTW.
[ -0.012413962744176388, 0.04626375064253807, 0.745291531085968, -0.43443337082862854, 0.004649272654205561, 0.12228669971227646, 0.4338763356208801, -0.351709246635437, 0.11995585262775421, -0.4976818561553955, -0.49839624762535095, 0.884884774684906, -0.5373465418815613, -0.175562009215354...
We have a client that has Oracle *Standard*, and a project that would be ten times easier addressed using OLAP. However, Oracle only supports OLAP in the *Enterprise* version. Migration to enterprise is **not** possible I'm thinking of doing some manual simulation of OLAP, creating relational tables to simulate the technology. Do you know of some other way I could do this? Maybe an open-source tool for OLAP? Any ideas? You can simulate OLAP functionality using client side tools pointed at a relational database. Personally I think the best tool for the job is probably [Tableau Desktop](http://www.tableausoftware.com/). This is an amazingly sophisticated front end analytics
[ 0.3792513310909271, 0.13068360090255737, 0.20992116630077362, 0.14327749609947205, 0.06747129559516907, -0.06626110523939133, -0.06156056001782417, 0.26366978883743286, -0.2833988666534424, -0.8220072984695435, 0.16374556720256805, 0.5138047933578491, -0.2568267583847046, -0.10724640637636...
tool that will make your relational data look multidimensional without much effort, and the tool itself is really mind blowing. They have a free trial so you can take it for a spin. We use Tableau heavily for our own analysis and have been very impressed. Of course, this tool also works with multidimensional databases as well, so if you end up with some cubes at the end of the day you can continue to use the Tableau front end. As for open source, you could try out [Palo](http://www.jedox.com/en/enterprise-spreadsheet-server/excel-olap-server/palo-server.html) - an open source MOLAP server and Excel front end. If you are
[ -0.015479282476007938, -0.020221589133143425, 0.40057989954948425, 0.25182756781578064, -0.20100072026252747, -0.1168789342045784, -0.3282961845397949, 0.11936167627573013, -0.41107168793678284, -0.6481444835662842, 0.08086569607257843, 0.5294368267059326, 0.05436604470014572, -0.014799113...
interesting in building your own reporting front end and use .NET there are a number of components (such as the [DevExpress PivotGrid](http://demos.devexpress.com/ASPxPivotGridDemos/Default.aspx) or the several tools from [RadarSoft](http://www.radar-soft.com/)) that will do the same thing, but will require some elbow grease to get wired together.
[ 0.6126952767372131, -0.09929319471120834, 0.3152151107788086, 0.3543066084384918, -0.09723114222288132, -0.4136195778846741, -0.032976992428302765, -0.358503520488739, -0.2998735010623932, -0.4677181541919708, 0.36637672781944275, 0.47963184118270874, 0.1340019851922989, -0.386847496032714...
Is it possible to delete an GAE application after it has been created? I made a mistake while typing the name and now have a dummy application that I haven't been able to remove. With the new Google Cloud console, you can still disable GAE applications as before (App Engine --> Settings --> Disable). They cannot currently be deleted. However you can delete the entire project by going to IAM --> Settings --> Shut Down. This button is in the header and a bit tricky to spot. It looks like this: [![enter image description here](https://i.stack.imgur.com/5EnZv.png)](https://i.stack.imgur.com/5EnZv.png) --- As of [AppEngine SDK 1.2.6](http://googleappengine.blogspot.com/2009/10/app-engine-sdk-126-released-with.html) it's possible to [delete
[ -0.2467212975025177, -0.015075950883328915, 0.4227684736251831, 0.00030323563260026276, -0.21671578288078308, -0.05527420714497566, 0.3651427924633026, 0.17767779529094696, -0.4053252041339874, -0.3310154378414154, -0.22395457327365875, 0.44361239671707153, -0.5053355693817139, 0.305937528...
apps completely](http://code.google.com/appengine/kb/adminconsole.html#delete_app). But beware, the app-id won't be usable again.
[ 0.35622739791870117, 0.38712748885154724, 0.693963885307312, 0.1366855353116989, 0.07583897560834885, -0.21097031235694885, 0.4302971065044403, -0.013174193911254406, -0.28027376532554626, -0.36756443977355957, -0.42578834295272827, 0.5136318206787109, -0.5880118608474731, -0.0605810061097...
I'm thinking about making a networked game. I'm a little new to this, and have already run into a lot of issues trying to put together a good plan for dead reckoning and network latency, so I'd love to see some good literature on the topic. I'll describe the methods I've considered. Originally, I just sent the player's input to the server, simulated there, and broadcast changes in the game state to all players. This made cheating difficult, but under high latency things were a little difficult to control, since you dont see the results of your own actions immediately. [This GamaSutra
[ 0.43829160928726196, -0.2232678234577179, -0.05584586784243584, 0.08084074407815933, -0.11041906476020813, -0.040675170719623566, 0.028367793187499046, 0.014642230235040188, -0.08973611146211624, -0.7808985114097595, 0.37776079773902893, 0.761711061000824, -0.24608774483203888, -0.05723410...
article](http://www.gamasutra.com/features/19970919/aronson_01.htm) has a solution that saves bandwidth and makes local input appear smooth by simulating on the client as well, but it seems to throw cheat-proofing out the window. Also, I'm not sure what to do when players start manipulating the environment, pushing rocks and the like. These previously neutral objects would temporarily become objects the client needs to send PDUs about, or perhaps multiple players do at once. Whose PDUs would win? When would the objects stop being doubly tracked by each player (to compare with the dead reckoned version)? Heaven forbid two players engage in a sumo match
[ 0.05594112351536751, -0.0908399447798729, 0.24029161036014557, 0.15785261988639832, -0.2978794574737549, -0.4071716368198395, 0.04380844905972481, -0.013288273476064205, -0.30507469177246094, -0.2865299582481384, 0.19527193903923035, 0.5552825331687927, -0.1104777604341507, 0.1534105539321...
(e.g. start pushing each other). [This gamedev.net bit](http://www.gamedev.net/reference/articles/article1370.asp) shows the gamasutra solution as inadequate, but describes a different method that doesn't really fix my collaborative boulder-pushing example. Most other things I've found are specific to shooters. I'd love to see something more geared toward games that play like SNES Zelda, but with a little more physics / momentum involved. * Note: I'm not asking about physics simulation here -- other libraries have that covered. Just strategies for making games smooth and reactive despite network latency. Check out how Valve does it in the Source Engine: <http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking> If it's for a first person shooter you'll
[ -0.17665603756904602, -0.112332284450531, 0.14837856590747833, 0.3447742462158203, -0.4891290068626404, -0.13754911720752716, 0.038342151790857315, -0.3135784864425659, -0.15474313497543335, -0.4144132733345032, 0.40411198139190674, 0.7436822056770325, -0.07279568910598755, 0.0148763451725...