instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have opened a shelve using the following code: #!/usr/bin/python import shelve #Module:Shelve is imported to achieve persistence Accounts = 0 Victor = {'Name':'Victor Hughes','Email':'victor@yahoo.com','Deposit':65000,'Accno':'SA456178','Acctype':'Savings'} Beverly = {'Name':'Beverly Dsilva','Email...
stackexchange/codereview
I have used a lot of abstract classes both for polymorphism, and obviously inheriting common function in subclasses. I'm trying to use interfaces more. Yes, it's also use for polymorphism..for example using an IMyInterface param in a method that can take any subclass that implements IMyInterface. Ok, now the thing I do...
stackexchange/codereview
I am new to Spring and the bean concept, so sorry if asking the obviously. I have set up a Java project and used the Hibernate framework to make my connections to the DB (using hibernate tool on eclipse, really recommended btw). My basic setup was as follows: some hibernate pojos (generated by Hibernate tools), hiber...
stackexchange/codereview
Hi I am new to the java programming. I have a instance variable in a class which I should call to another class.It should not be static as per the requirements.The code given below## ` public class Card { private String no; private String text; public Vector totalCards = new Vector(); public String ge...
stackexchange/codereview
For my recipe-sharing website, I want to create a database and CakePHP models for the recipes and their ingredients. I created two tables: recipes and ingredients. The third table is a HABTM table for ingredients_recipes, which also stores the amount of ingredients needed for the recipes. How do I create a model for th...
stackexchange/codereview
as we know that 3-tire Architecture consist of Presentation tier , business logic and data base tier the business rules (like : stored procedures , triggers ...) are stored in data base tier , so when we want to replace the data base engine (like ms sqlserver) with new db engine (like oracle) these rules must be trans...
stackexchange/codereview
In order to make all my links looks like buttons, I've done that in my CSS: a { color: #06A; text-decoration: underline; margin: 10px 20px; padding: 10px 20px; /*background-color: #EEE;*/ border: #BBB solid 1px; } They look fine, however, they seem to mix-up, that is they are being positioned as if they ha...
stackexchange/codereview
I am going to build a client-server application. The client here is an iPad (or an android-based) tablet. The server is a normal pc. Both the clients and the server are connected to the same network (using WiFi). Is there a standard way (protocol) for communication between the clients and the server? Are there any fra...
stackexchange/codereview
This is weird. I have a UserControl (MyControl) with a button inside. I have added a command to this button whose command target is another user control which is again added to the same window. When I add the UserControl statically in xaml to the CustomControl's host space, the CommandBinding system works fine, where a...
stackexchange/codereview
It has been a while since I've touched GWT, but I was recently looking at GWT applications to see how they accomplished certain tasks. I noticed that if you go into AdWords (a GWT application), you can manipulate table information in-line. For example, if I go into my campaign and click the pencil icon next to the ad g...
stackexchange/codereview
I am trying to animate backgroundColor property of UILabel class and being unsuccessful so far. Here the snippet of my code -(void) blink { UIColor* originalColor = lblDescription.backgroundColor; lblDescription.backgroundColor = [UIColor yellowColor]; [UIView beginAnimations:nil context:NULL]; [UIView setAn...
stackexchange/codereview
I have found a tonne of leaks in my code. All of them come about when I play a sound or a song. Here is how I call a sound effect: [[SimpleAudioEngine sharedEngine] playEffect:@"myeffect.wav"]; Here is how I play a song: [[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"mysong.mp3"]; Am I somehow supposed to ...
stackexchange/codereview
I'm using an AutoCompleteExtender in ASP.NET/C# to retrieve data from my database, along with the primary key of the field. When a name is chosen, the details (name/pk) are retrieved even before clicking submit, and it then passes these onto a hidden field. The issue I have is that if the user types in an incorrect nam...
stackexchange/codereview
I'm looking to do the following timestamp1 = Time.now? timestamp2 = lastSave --- My func would be setting this if (compare (timestamp1 to timestamp2) > 5 seconds Any ideas on how to do this with JS? Thanks
stackexchange/codereview
An stock data download class has a BarList to which it either adds new bars or updates and replaces the last bar when the last bar changes realtime. Whenever this download class adds a new bar to the BarList class or changes its last bar, it also calls its NotifyOnBarsAdded or NotifyOnBarChanges. I'm trying to get the ...
stackexchange/codereview
I am using jcupload whats nice is all i need to write is the below and the flash+js does the rest <div id="jcupload_content"></div> However this is the ONLY flash on my site. If the user doesnt have flash (think ipod) i'd like to fallback to an html implementation. How do i do it? I know logically ppl wont be uploadin...
stackexchange/codereview
At the moment I'm using the wysiwyg module for Drupal with tiny_mce. However, it keeps inserting all kinds of superfluous spans and other trash elements in my markup. I want to use wysiwyg mostly for semantic markup with css classes, any inline styles are a problem, because I have to clean up my html by hand - sort of ...
stackexchange/codereview
Is there an easy pattern to working with ASP.NET Web Services to get the WebMethod (or some other identifier) to show up in the IIS logs? On our middle/web services/app server tier, most of our ASP.NET Web Service pages (asmx) have multiple WebMethods. It is nice not having to make multiple pages for each WebMethod, b...
stackexchange/codereview
Let's say I have a class in php, and it includes some functions. The class is named something. When I load the file on another file, I noticed it goes like: include("the_file_with_the_class.php"); $something = new something(true); now I can do OOP, I know, like $something->the_function, but what is that (true) in the ...
stackexchange/codereview
I made a favicon for my website. Naturally, on IE I have some trouble :) Why doesn't this work? <link rel="icon" href="./img/iconcab.ico" /> Dunno. Any ideas? Thanks :)
stackexchange/codereview
I am trying to add onchange handler to see which select option is currently selected and put it in a file. How can I do this? <select id="subtable" name="subtable" size="20" style="width: 400px"> <%= options_from_collection_for_select(@hauses, 'id', 'timebuild', @hauses.first.id), {}, {:onchange => catch()} ) %> </s...
stackexchange/codereview
Hey, I've been trying to figure out why this regular expression isn't matching correctly. List l_operators = Arrays.asList(Pattern.compile(" (\\d+)").split(rtString.trim())); The input string is "12+22+3" The output I get is -- [,+,+] There's a match at the beginning of the list which shouldn't be there? ...
stackexchange/codereview
i'm trying to write a php soap server but i keep getting the folow error on louding the wsdl file: WSDLSOAP-ERROR: Parsing WSDL: Couldn't load from 'files.wsdl' : Premature end of data in tag definitions line 2 the wsdl file looks like this: <?xml version="1.0" encoding="UTF-8"?> <definitions name="Tempera...
stackexchange/codereview
Upon generating a Vistual Studio project from a CMake build file, CMake generates a solution with a sub-project called RUN_TESTS.vcproj that runs all unit tests as a post build action. How can you invoke the RUN_TESTS from the command prompt using msbuild.exe? Running msbuild RUN_TESTS.vcproj from the build directory d...
stackexchange/codereview
I want to set a cookie to expire in 1 year if the 'remember me' checkbox is checked. I have a checkbox form input like: <%= check_box_tag 'remember', '', false, :class => 'checkbox' %> What will the value be when it gets posted? Will it be true/false or checked or 1 or? I set the value to '' in the helper.
stackexchange/codereview
When you want to call C from python, you write a module like this: http://docs.python.org/extending/extending.html Now, I have a question: I want to write a module for use in Python with C#. How can I get C# to interact with native Python ? (Note: I'm not interested in Python.NET or IronPython).
stackexchange/codereview
each() method in jQuery contains such a statement: callback.call( value, i, value ) I couldn't understand what this statement means exactly. I know what callback and call mean but I couldn't get the arguments of the function call: (value,i,value). What does this mean? The statement is used in a for block of each() ...
stackexchange/codereview
I was testing out the SQL Server 2008 change data capture feature on a table when it became stuck. There is only one table enabled for CDC. After performing various DDL changes to the table to test how CDC responds, I dropped the table. Previously in my testing, dropping the table also causes CDC to drop the CT table,...
stackexchange/codereview
So, I have a page on DomainA, and, using a Chrome extension, I'm injecting some javascript that inserts iframe that points to DomainB. $("body").append("<iframe id='someFrame' src='http://www.domainB.com' width='300' height='800'></iframe>"); I also inject a some javascript into DomainA that attempts to get the ifram...
stackexchange/codereview
I am doing a small study about what ORM to use for our next project. I have narrowed down to LLBLGen Pro / EF4. My question is: I am more convinced about EF4. Should we use EF4 alone or should we purchase LLBLGen Pro and select EF4 as target framework? Are there any advantages/disadvantages in doing so? Any guidance/...
stackexchange/codereview
I am using an S3-like storage server EMC called ATMOS. I have tried to access this server following examples in both the multipart-post gem and the rest_client gem. The only response I am ever able to receive is "400 - bad request". The server is active and my headers at least appear to be in order. I just don't know ...
stackexchange/codereview
I've a dropdown (multiple select). I choose a few values, they are highlighted correctly, but jQuery doesn't recognize them as selected. this works in firefox and chrome, doesn't work in IE. this is the code $("#myBox" +" option").each(function() { if ($(this).attr("selected") == true) { // do something ...
stackexchange/codereview
Environment: Linux / MySQL / PHP Problem: While connected to a webservice, I am getting a response that is compressed with the SharpZipLib .NET library. As of yet, I have not been able to find a way to decompress these responses outside of a .NET environment. Does anyone know a way to decompress this in a linux/php env...
stackexchange/codereview
Not sure if it's just the time of day, lack of coffee or over indulgence of sugar from last night. Besides that I'm trying to get this working. I do not want to change / modify / add a new web service method. I have an asmx web service: public UserLogin Login(UserLogin p_objUserLogin) { } I need to hook a JQuery aja...
stackexchange/codereview
How do I pass path with space to the CreateProcess() function? The following works STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); ZeroMemory( &pi, sizeof(pi) ); if( !CreateProcess(_T("c:\\installer\\ew3d.exe"), ...
stackexchange/codereview
I'm using Netbeans 6.9 to develop PHP code; testing happens locally on my PC (XAMPP); once done code is uploaded using Netbeans upload facility to the production web server. I recall reading about Netbeans capabilities running scripts when "building" the project, and looking for a primer about it. Particularly I'm look...
stackexchange/codereview
How do I add new to items to this Array? public static string[,] myArray = new string[,] { { "1", "1a" }, { "2", "2a" } }; public Form1() { InitializeComponent(); myArray.add("3", "3a"); // error for (int i = 0; i < myArray.GetLength(0); i++) { Console.WriteLine(myArray[i, 0] +", "+ myArray[i...
stackexchange/codereview
I am processing a csv file to import each rows in a Database. For each row, I've got to ask Google Maps API to get its latitude and longitude coordinates so I can take some milliseconds for each row. To give some feedback to the user, I choose to add each row with an AJAX POST request to the server API in order to chec...
stackexchange/codereview
i am using the ms chart control to make funny looking charts on a winform. what is the advantage of using a databinding instead of say something like this: using System.Windows.Forms.DataVisualization.Charting; using System.Data; using System.Data.OleDb; ... // Access database System.Windows.Forms.DataVisualization.Ch...
stackexchange/codereview
I am going to write an expression evaluator which only does addition and subtraction. I have a simple algorithm to do that; but, I have some implementation problems. I considered an expression as (it is a String) "(" <expression1> <operator> <expression2> ")" Here is my algorithm String evaluate( String expression ) ...
stackexchange/codereview
As we all know that we rarely get a chance to learn whats out there in the enterprise world when it comes to college. In my experience I have always seen people learning Core Java and may be some other languages and when they graduate they have no Idea about this enterprise jargon. I am in that boat now. I am a recent...
stackexchange/codereview
I work for a mid sized Architecture and Engineering firm, our sub group focusses on developing tech solutions for engineers, mappers and technical managers. So we're heavy on desktop based apps for GIS and Civil/Env Engineering (some web). The company sells the services that our Engineers and mappers produce and our te...
stackexchange/codereview
I've got an image map with 20 area elements, only four shown below. I want to style each area so that a blue border appears whenever a user hovers over it - all the area shapes are rectangles. <map id="mymap" name="mymap"> <area shape="rect" coords="0,0,223,221" href="http://..." /> <area shape="rect" coords="2...
stackexchange/codereview
I have an ASP.NET web forms site with a rather large menu. The HTML for the menu is dynamically generated via a method in the C# as a string. I.e., what is being returned is something like this: <ul><li><a href='default.aspx?param=1&anotherparam=2'>LINK</a></li></ul> Except it is a lot bigger, and the lists are nested...
stackexchange/codereview
I think what I'm trying to do is pretty simple, and I'm really not sure why this isn't working. I'm using Rails 3. Essentially, I'm just trying to select the distinct values from a column in an existing model, and print them out all. For the most part, this works but the .each loop in my view also ends up printing the...
stackexchange/codereview
How do I increase the jersey WS timeout? It is waiting on a call which takes around 2 minutes. It is timing out at WS layer. Do I have to increase client timeout as well? What are the defaults for these?
stackexchange/codereview
I am currently looking for a markup language to use in a project. I want to allow site vistors to edit a wiki like page using a markup language (not HTML). I am implementing this site in Ruby on Rails, and would prefer (although not bound) to use something that already has strong support in the form of a gem. There are...
stackexchange/codereview
I have 8 select fields with different options in each and im trying to pass each selected value into a querystring but im not sure how this work. <form method="post"> <fieldset> <legend class="hidden">Choose your options</legend> <ol> <li><label>option 1</label> <select> <option value=""...
stackexchange/codereview
I have this problem of scheduling tasks. Each task has a suggested start time T (it needs to start at [T-10, T+10]), takes L minutes to complete and uses a number of resources [R1, R2,...]. When a resource is being used, no other task can use it. Given that only the start time is flexible, my goal is to schedule the ta...
stackexchange/codereview
I'm constructing a LinkButton from my codebehind, and I need to assign the onclick to a method, and pass a parameter with it too. I have this so far: LinkButton lnkdel = new LinkButton(); lnkdel.Text = "Delete"; The method I want to pass it to looks like this: protected void delline(string id) { }
stackexchange/codereview
I am working on a website where the content has to be displayed in English, Polish, Slovak and Czech. Currently, everytime a special character used in the non-english languages (such as Á or â), it displays as just a normal A or a. I've traced the problem down to the database. Currently the collation is "Latin1_General...
stackexchange/codereview
I need to remove a feature completely from SharePoint with all its assemblies, folders and everything. I found that I can do this by SharePoint management shell, but I don't know how to find, open or download it!
stackexchange/codereview
I have a DLL and I would like to use some of its functions. #include <iostream> using namespace std; extern "C" __declspec(dllimport) int Initialize(char* localPort, char* adminServerName, int rpcTimeout); int main() { int res = Initialize("7864", "6000@kabc", 10000); return 0; } I don't have the DLL's .l...
stackexchange/codereview
how to give the fade in and fade out effect in embed tag and object Tag? '<object width="140" height="185"><param name="movie" value="http://www.youtube.com/v/blsg_rRAg0I?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="htt...
stackexchange/codereview
I have a date in the format YYMMDD. Is there anyway I can validate it in JavaScript? By validation I don't mean easier things like length, characters etc but rather if the date exists in real life. I'm hoping there is a faster / better way than breaking it in 3 chunks of 2 characters and checking each individually. Tha...
stackexchange/codereview
I have a data structure like the following @colors = qw(red blond green); @numbers = qw(349 1234.5678 3.14159265); @hats = qw(fedora porkpie bowler); my %hash = (colors => \@colors, numbers => \@numbers, hats => \@hats); I want to sort this according to the values of one of the arrays, maintaining the association of p...
stackexchange/codereview
My Gmail/Google username is not a username I generally go by, and one I'd rather forget. I don't seem to be able to change my Google username, but I contribute to a Google Code project using git svn. In Git, I can specify my name and e-mail address using my ~/.gitconfig file in the [user] section. Same with Mercurial a...
stackexchange/codereview
I'm writing an NSArray category to include the -objectAtRandom message that returns an object from a random index (something similar to Python's choice). Should I autorelease this object before returning it? I believe I shouldn't, but I'm not sure...
stackexchange/codereview
I want to configure all the actions in my controller using my app's config file. According to Catalyst::Controller I can do this in the controller itself: __PACKAGE__->config( action => { '*' => { Chained => 'base', Args => 0 }, }, ); So I tried this in my config: <controller Foo> <action "*"> ...
stackexchange/codereview
I am capturing video from my webcam and it is processed by a C# program then i want to stream it to a C++ program. this C++ program can be configured to get a video stream from a webcam so is it possible to send/stream my processed video to this program where the C++ program detect that stream as a video which is comin...
stackexchange/codereview
i was looking at http://www.2shared.com and when you upload something it shows how fast the file is being uploaded, and other info. does anyone know how i can do this under php/jquery ? ive used alot of loaders outthere and they dont work. most of them are under flash which i dont want to use.
stackexchange/codereview
can anyone please help me with a tutorial on how to implement a RTSP streaming server in java using gstreamer. link text
stackexchange/codereview
i am a new programmer and started with lua . i want to do the function that array a -b , the following are my program, it didn't work well function delTwo (a ,b) local i = 0 local lengthA = #a local lengthB = #b for i = 1 ,lengthA do for j =1 , lengthB do if a[i]==b[j] then a[i] = nil end end...
stackexchange/codereview
I use config module to store variables global to all modules. Is it a good place to parse the script arguments? (Note: config module is my own module, it just contains a bunch of global variables.) ----- config.py ----- from optparse import OptionParser parser = OptionParser() parser.add_option("-t", "--test", action ...
stackexchange/codereview
I have a generic list of type Element, for example. public class Element { public string Country { get; set; } public string City { get; set; } public int Population { get; set; } } With the following data. var elements = new List<Element> { new Element { Country = "Country A", City = "Barrie", P...
stackexchange/codereview
I'm wondering if this could be achieved. I know how to get the top 10 from my database using SQL. But I would like to take it a step further. My idea is to update the DIV every couple of seconds. First the script will check if there are any updates in the database, if so the DIV should be updated. I can do this on my ...
stackexchange/codereview
When I want to create private methods in Objective-C, what should I use? 1) The well known categories technique. 2) @private directive. (I'm doing iOS development).
stackexchange/codereview
I've seen a few examples of using delegate with multiple threads for async image loading with cocoa's URL loading system. I think the process goes like below. Thread 1 : give thread 2 an operation to perform, and a delegate which thread 2 will access upon completion. Thread 2 : upon completing the operation, calls a p...
stackexchange/codereview
My app has a feature for File Sharing through iTunes, and I want to get a notification/a method call after the process of syncing with iTunes is finished, so that I can reload my Table View with new data from iTunes. I have tried to override - (void)viewWillAppear: but it doesn't seem to run. Anybody knows how to do th...
stackexchange/codereview
Exising .net 2 app migrated to .net 4 and moved to an IIS7 Windows 2008 R2 server. We used to be able to run some code on the web page to export some stuff to excel. Now, when we do... we get the following error: The machine-default permission settings do not grant Local Activation permission for the COM Server applic...
stackexchange/codereview
In my JTable I have a number of actions that can accessed via popup menu or by selecting the configured shortcut. Selecting the action from the popup using mouse or keyboard is fine, and I can use the cursor keys to move to a field next to the original selection no problem. However if I use the shortcutkey instead it p...
stackexchange/codereview
Ive added a uiimageview as a subview to my cell.and then put a label on top of it so that it would seem like a button.But whwn the table is scrolled up or down the image seems to get painted again.This turns extremely ugly as my image has transparency effect which is lost as soon as it goes out of view and comes back...
stackexchange/codereview
Having probs here. I need to write the output of a PHP script to an HTML page to then be processed by DOMPDF so I can make a nice little PDF for some friends to use. When I use file_get_contents to get the contents of a "donor" PHP script, it does that - literally. It grabs the unevaluated PHP and holds it for me to d...
stackexchange/codereview
I'm planning to move a site from plain HTTP to HTTPS. Should I make any adjustments to the settings or my modules?
stackexchange/codereview
A bit of back story: I am currently trying to load a texture with OpenTK, so I am finding the next power of 2 (512,1024 etc) and creating a new bitmap with that size and drawing the original bitmap on: Bitmap bmp = new Bitmap(filename); width = bmp.Width; height = bmp.Height; int w2 = (int)PowerOf2(width); int h2 = (in...
stackexchange/codereview
I'm using the Panoramio API to create a little photo widget like the one you see here at this link. My code sets some options up for retrieving photos, namely by creating a bounding box around a lat/long pair and then returning all photos w/in those bounds. However, sometimes (depending on the coordinates), no photos ...
stackexchange/codereview
I'm trying to create an installer for my serviced component (queued component). Once the .NET DLL is installed on client machine, I want to register it as COM+ Application, as if by invoking regsvcs MyAssembly.dll. What is the best way to do it? Can I invoke regsvcs from Windows Setup program, once it has installed my ...
stackexchange/codereview
I've always added the file extension to a link "contact.php" is there anything wrong with excluding it and simply having <a href="contact">? seems to work fine, as Im having a lot of trouble with .htaccess removing the file extensions. thx
stackexchange/codereview
I am using php. Create a file leftcolumn.php which includes following codes.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-...
stackexchange/codereview
I'm working on Visual Studio Profesionnal 2010. In my solution I've got 2 projects The first is a web site with targeted .net runtime 2.0 the second is a dll with targeted .net runtime 2.0 I add the output of the second as assembly of the first. I build and rebuild and clean my solution result : Build succeeded But wh...
stackexchange/codereview
Hi I have developed the asp.net mvc 2 application. I have deployed it successfully on XP machine that having the IIS 5.1 . it is running fine. but I have updated some changes in my application on development machine . I want to deploy only these updates over the deployment machine that is XP machine. means only want ...
stackexchange/codereview
I am getting error message like... The tag handler class for "ui:include" (null) was not found on the Java Build Path when i placed or in my .xhtml file. What is the reason behind this.. I am using: jsf 1.2 RichFaces 3.3
stackexchange/codereview
I want to use the button style on another control. How can I call that bg?
stackexchange/codereview
I have a custom control derived from Control which is dynamically added to the form. The control can have negative values in Location and is by default painted relative to the top left corner. How can I get the control to have negative coordinates and painted relative to right bottom corner for example?
stackexchange/codereview
We are currently working on a very simple Webapp, and we would like to "obfuscate" ( what would be the right term? ) or encode somehow the request parameter, so we can reduce the chance an idle user from sending arbitrarily data. For instance, the url looks like /webapp?user=Oscar&count=3 We would like to have somth...
stackexchange/codereview
I have a contact model, this includes name, address, phone number, etc. I have a user model which should have_one contact. I have a Customer model which has_many contacts. I have a Producer model which has many contacts. A contact can be only a user, a user and a customer, a user and a producer, or any combination of t...
stackexchange/codereview
I have a project where I generate lots of code against many XSD. To keep things separate each set of XSD are bundled together within a project. I have multiple project that will see XSD in resources and generate code against them. My problem is when I try to access the XSD that are stored in the jar files I cannot ge...
stackexchange/codereview
I'm having trouble debugging any ASP Classic website on my workstation using any of the MS debugging environments available to me. I'm on Win XP SP3, using the builtin IIS 5.1. It started a few weeks ago, and happens across multiple projects. Something clearly changed in my environment, because it was working fine in t...
stackexchange/codereview
I came across the following code in a header file: class Engine { public: void SetState( int var, bool val ); { SetStateBool( int var, bool val ); } void SetState( int var, int val ); { SetStateInt( int var, int val ); } private: virtual void SetStateBool(int var, bool val ) = 0; virtua...
stackexchange/codereview
What kind of windows applications can receive system events? I mean events like closed by user. Windows forms, WPF applications and Windows services can do that. But I am not aware of any others.
stackexchange/codereview
IE9, Firefox 4, Opera 10.5, Safari 5, Chrome 4, WebKit 532.5 supports CSS3 border-radius. Latest jquerycurvycorners 2.1.1 uses -moz-border-radius and not border-radius to create corners to old browsers. How to replace it to border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, bord...
stackexchange/codereview
I have a (version controlled) folder of exported components of a VBA addin (i.e. a lot of cls, frm, frx, bas and txt files). Can someone give me a build script (can be a VB script, or something more complicated) that takes the name of this folder and produces a (working) XLA? I know you can programatically modify XLA ...
stackexchange/codereview
If I assign a piece of text to the Content property of a ContentPresenter, a TextBlock control is generated by the ContentPresenter at render time to contain that text. If I create a style that applies toTextBlock properties and assign it to that ContentPresenter, the does not appear to apply to the implicitly generate...
stackexchange/codereview
We have a web server that is running many web applications. When I took over this server, I noticed that the sites were not precompiled, so in an effort to clean it up, I precompiled the site using the Publish option in VS2008 (and allow the precompiled site to be updatable). When I deployed the site to the web server...
stackexchange/codereview
The HTML you see below is text I have scraped from a remote site, as-is, into a local variable. Now I need to parse the authorName and bookTitle from the HTML tags into their own variables, given the following consistent format of the scraped text: <p> William Faulkner - 'Light In August' <br/> William Faulkner ...
stackexchange/codereview
I would like the login form of my .net web forms app to use HTTPS but want the rest of the site to use HTTP only. What is the preferred method of doing this? The is .net 4.0 on IIS 7 (Win2k08 R2) I realize I can set up a new site listening on 443, but Session state would be lost between the sites. I don't want to track...
stackexchange/codereview
I have multiple classes that are quite different in their behavior, but at the same time, share common functions that have to access the member variables. So what I want to do, is to create a templated member function to avoid extra copy-paste code duplication. The final result should be like: ClassA::CallFoo() ClassB:...
stackexchange/codereview
I am working on a project right now that has a solr index of counts and ids. I am currently researching if it is possible to increment/decrement on solr directly, instead of having to retrieve the data, increment it with PHP, and then reinsert it into solr. I have spent an hour googling variations of this to no avail. ...
stackexchange/codereview
I would like to parse log files, I need to get only last IP from one or many divided by comma on beginning of the line: This is how the lines look like: 80.250.5.1 - - [26/Oct/2010:13:10:14 +0200] ... 80.250.5.1, 80.250.5.2 somethingA - [26/Oct/2010:13:10:14 +0200] ... 80.250.5.1, 80.250.5.2, 80.250.5.3 - somethingB [2...
stackexchange/codereview
I open a window, and want to perform some calculation on some condition. Problem is in IE, only first call of test (from ready) is performed from new window, but subsequent calls of test (set with setTimeout) are executed in parent window and not for new window (i.e. win). It works fine in FF. illustrating code (this...
stackexchange/codereview