instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have 2 divs(a,b) inside a div(x). so a has z-index 1 and b-2. the page displays fine and only when i hit submit it throws an error saying the object does not support the property and refers to document.getElementByID('button1').click(); Looks like this is a bug with IE. but I couldn't find any thing concrete to sta...
stackexchange/codereview
when loading a .dll file from lua it gives me this error: loop or previous error loading module 'wildcard' whats wrong? @edit: @lhf: ive changed the filename but now its giving me these errors: > dofile("_test.lua") _test.lua:1: module 'wildcard' not found: no field package.preload['wildcard'] no file...
stackexchange/codereview
Im trying to implement a save feature to save an html file. Currently it returns errors when I try and save. My code is - (BOOL)writeToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError { NSData *saveData = [[[editorView textStorage] string] dataUsingEncoding:NSUTF8StringEncoding]; [saveDa...
stackexchange/codereview
This is my SProcedure DELIMITER $$ DROP PROCEDURE IF EXISTS `etracking`.`validarAcceso` $$ CREATE PROCEDURE `etracking`.`validarAcceso` (IN pusuario VARCHAR(30),IN ppassword VARCHAR(10)) BEGIN DECLARE encontrado INT; SET encontrado = 0; IF encontrado = 0 THEN SELECT usuarios_distribuidores.nombre, usuarios_dist...
stackexchange/codereview
I'm attempting to capture a rendered screen from a Managed DirectX application. Typically, the way to do this is as follows: Surface renderTarget = device.GetRenderTarget(0); SurfaceLoader.Save(snapshotName, ImageFileFormat.Bmp, renderTarget); Which is (in my understanding) shorthand for something like: Surface rende...
stackexchange/codereview
I want to draw a rectangle with the top-left corner rounded with 3 sub-spaces in it. Something like this: _______ |_|_____| | | |_______| But for some reason I cannot get the inner two lines drawn. - (void) drawRect:(CGRect)rect{ CGContextRef context = UIGraphicsGetCurrentContext(); float cornerRadius = 25.0; ...
stackexchange/codereview
I'm using a program using libnet, and every time I use it, libnet fails to send any packets. Specifically, the function that fails is : libnet_write_ip. It returns -1 on every call. Any ideas what may cause that ? I'm on Mac OS X 10.6.4 Thanks so much in advance !
stackexchange/codereview
I have written a code that searches specific string from database table.what i want to implement is search like when we search friends on facebook means it returns results matching to the input given even if it is partial for example if i want to search ANDREW as soon as i enter single character results should start to...
stackexchange/codereview
I have a small multiplayer Flash game in which you can display a player profile by clicking at his or her avatar: const PROFILE_URL:String = 'http://myserver/user.php?id='; try { navigateToURL(new URLRequest(PROFILE_URL+id), '_blank'); } catch(e:Error) { } This works well, but now I'd like to extend the user.php, so...
stackexchange/codereview
I have a maven pom file for an open source project. This pom file has all the info like what other jars it depends on etc. I installed maven. Created a dir samprj and copied the pom file into that dir. Cd into that dir and ran mvn command without any arguments but I got bunch of errors. I am absolutely new to maven so ...
stackexchange/codereview
What does duck typing mean in software development?
stackexchange/codereview
Does anyone know where is the best place to forward thread messages to child controls? Basically, app has to catch registered thread messages in range msg_frst...msg_last and forward them to active frame/view. There are 3 overload points in MFC, or so it seems: DefWndProc OnWndMessage PreTranslateMessage Which is the c...
stackexchange/codereview
I have a base path /whatever/foo/ and $_GET['path'] should be relative to it. However how do I accomplish this (reading the directory), without allowing directory traversal? eg. /\.\.|\.\./ Will not filter properly.
stackexchange/codereview
I have 2 classes that inherit from a common base class. Each of these specialized classes load some data from a data base, process it and then save that information in text files. The first class represents the information as a XML document. The second class will store its information as a text file with delimiters ...
stackexchange/codereview
Hello I have a custom control. This custom control has it's DataContext set to an entity. In my custom control I then bind some TextBlocks to various properties of this entity. I would also like to bind a TextBlock to a property of the control's class. I do not want/need to set this property through the XAML. Somethi...
stackexchange/codereview
After a litte hunting through the docs I have decided on the following technique using "viewWithTag" to extract sub views from the main root view returned by loadNibNamed:owner:options: To start with I was a little confused as I assumed loadNibNamed:owner:options would return an array containing all my UI items (i.e. l...
stackexchange/codereview
How can I do something like the following with the facebook sdk? -> http://developers.facebook.com/docs/guides/canvas/#requests <- I don't need the first box, but the people picker would be necessary. Cheers!
stackexchange/codereview
I am trying to make a form which would check if an username is available or not. I started to use jquery.validationEngine (link) because it looks extremely simple. However, since I'm using codeigniter, I have a problem with that validation... Example on the mentioned site looks like: $("#formID").validationEngine({ aj...
stackexchange/codereview
I'm using the BLogger API (google) to try and search for certain strings (i.e.'John Doe is my friend' - and return the blog id/url/etc) on public blogs. All I have found until now returns only data for my own account, not all public accounts. Here's what I have now, it doesn't output much as I have no blogs set up myse...
stackexchange/codereview
I have the following code which I'm using to get the user to input an integer, check to make sure the input is valid, and if not, ask for input again. When the code is run, everything works fine until some invalid input is given, at which point the code loops without pausing to ask for input again until a stack overflo...
stackexchange/codereview
I am using a HashSet. I want to ensure that I don't have duplicate values. However, I am able to do so at the present moment. [Serializable()] public class SafetyObsDS { public int Count { get { return set.Count; } } HashSet<CompResults> set; public SafetyObsDS() { set = new Ha...
stackexchange/codereview
I've got an image gallery that is showing one image per row inside of a div. I don't want the next image to load until it reaches the edge of the viewport (to save on server resources). All the images are named sequentially in the same folder (img/1.jpeg, img/2.jpeg, img/3.jpeg, ...). I'm using a modified jQuery plugin...
stackexchange/codereview
So I rotate an image with php and make the background transparent. The problem is that I get jagged edges. Is there any way to like anti-alias the edges? I'm using http://www.exorithm.com/algorithm/view/rotate_image_alpha It was the only code i could find that would let me have transparency for the background
stackexchange/codereview
I need to be able to only extract the filename (info.txt) from a line like: 07/01/2010 07:25p 953 info.txt I've tried using this: /d+\s+\d+\s+\d+\s+(?.?)/, but it doesn't seem to work ...
stackexchange/codereview
I'm creating a custom master page for my SharePoint 2010 publishing site. There are images, css files and js files associated with this custom master page. Where should they be stored? I'm using the SiteAssets library for now - is this a good choice? Thanks.
stackexchange/codereview
I am bit stack with creating two UIViews which are switchable (each UIView has some of subviews). Since I do not IB, I wanna do that programmatically. I have tried adding my subviews to my first UIView, then the same with second one and then switching to view like this. if ([self.setView superview]) { [self.setVie...
stackexchange/codereview
I'm having some problems deleting a file in Windows with java. For some reason, java is keeping a lock on my file, and I don't know why. Here is my code: private byte[] getFileByteArray(File file) { try { RandomAccessFile raf = new RandomAccessFile(file, "r"); FileChannel channel = raf.getChannel();...
stackexchange/codereview
I have a procedure in a 3rd party database called GetDocumentHistory. This procedure returns all kind of information about a document and it's history. This procedure accepts DocumentId as the parameter - and does all kinds of internal business logic. When this executes I get everything I need back. What I need to do i...
stackexchange/codereview
Given 2 classes that are not related, one of which is a member of another inheritance hierarchy, how can I map an interface on both of the classes so that I can query against the interface and have the appropriate concrete type returned? E.g. public abstract class Survey { public Guid Id { get; private set; ...
stackexchange/codereview
I have two combobox which are linked i.e if you select one , another combobox will have corresponding data. I am using jQuery to call the struts action via ajax. From struts actions side, it is sending the latest data based upon the valuse selcted from first copmbobox but it is not reflected on the page. Do I have to r...
stackexchange/codereview
I want to copy a message from one IMAP server to another IMAP server. I don't want to alter any of the message data. I'm using python imaplib. This is the code I tried: typ, data = connection1.uid('FETCH', uid, 'RFC822') connection2.uid('APPEND', None, data[0][1]) But this raises an exception: imaplib.error: UID comm...
stackexchange/codereview
I have a strong C++ background and I'm just starting to use C#. In a test application I write the following construction (wf is an instance of a class that I just wrote myself): wf.m_button = new Button(); wf.m_button.FlatStyle = FlatStyle.System; But the compiler (Visual C# Express 2008, using .Net 3.5) gives me this...
stackexchange/codereview
i was wondering i am having jQuery Javascript Javascript Timers CSS DIVs    inside DIVs Tables inside Tables Table   inside DIVs DIVs     inside Tables and all possible combination of all of the above in one webpage and my website is consisted of such many pages and worst all these pages are generated with PHP... ...
stackexchange/codereview
I want to send email that contains special character like ®.When i send the email whit content type html and charset utf-8 it displays the email like this ®.Any suggestion to solve this? Thanks in advance.
stackexchange/codereview
want to change my NSTimer code to to use applicationSignificantTimeChange This is what I have right now. Basically I want to change the timer, instead of changing every 5 seconds for example I want these textLabels to change at 12am every night anyone help me out? //h file NSTimer *timer; IBOutlet UILabel *textLabel;...
stackexchange/codereview
In most framework unit testing implementations, you have a set of a tests and you execute those tests from a single [console] command. The tests run and a result is given. That result varies but generally it includes pass / fail. CodeIgniter’s unit testing framework appears different and I have noticed an extensive col...
stackexchange/codereview
I hope this is just a learning curve I'm going through. I create an arbitrary date. I want to find the Saturday following the third Friday. NSLog(@"Date: %@", [date description]); NSCalendar *calendar = [NSCalendar currentCalendar]; NSTimeZone *zone = [NSTimeZone timeZoneWithName:@"EST"]; [calendar set...
stackexchange/codereview
I am running the following queries against a database: CREATE TEMPORARY TABLE med_error_third_party_tmp SELECT `med_error_category`.description AS category, `med_error_third_party_category`.error_count AS error_count FROM `med_error_category` INNER JOIN `med_error_third_party_category` ON med_error_category.`id` = ...
stackexchange/codereview
So I keep triggering a System.InvalidOperationException some where in my code. It's extremely difficult to debug. Any time attach a debugger via VS2010 and run my code, when it gets to the System.InvalidOperationException, the debugger automatically detaches, instead of breaking. I've even gone into the debug settings...
stackexchange/codereview
I just started with WPF and would like some advice with the following: I have a menu that looks like this: <Menu Name="MenuBar" Grid.Row="0" HorizontalAlignment="Right" Style="{DynamicResource MenuBarStyle}"> <MenuItem Header="Settings" /> <MenuItem Header="Help" /> </Menu> And in my Window.Resourc...
stackexchange/codereview
Is it a good idea to implement business logic on the client side with JavaScript? What kind of logic should be there? Validation Logic? Related to GUI? What would you do if the same logic want to be used in another application (exposed) implementing it in JavaScript would mean you can't reuse that logic. On the other ...
stackexchange/codereview
org.hibernate.HibernateException: identifier of an instance of org.cometd.hibernate.User altered from 12 to 3 in fact, my user table is really must dynamically change its value, my Java app is multithreaded. Any ideas how to fix it?
stackexchange/codereview
We're about to start a project consisting of a search engine website. We need to implement a site that has social functionalities upon it's core search engine solution. Obviously, we need to choose a good web crawler along with a full text search engine. Since our team have good experience developing websites with Drup...
stackexchange/codereview
When a Facebook dialog is created with code like this NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: apiKey, @"api_key", nil]; [facebook dialog:@"stream.publish" andParams:params andDelegate:self]; is there the possibility to use sessions? I succeeded in publishing a post on a user's ...
stackexchange/codereview
Picking UIImage with the picker controller, set an UIButton image with the image, but the image is bigger then the button, instead of just fit the button. Whats wrong? Tnx
stackexchange/codereview
Existence error in user:nth1/3 ! procedure user:nth1/3 does not exist I have included module for lists : :- use_module(library(lists)). but still getting this error.. Can anyone please help?
stackexchange/codereview
In plain ASP.NET this is an easy job... just override the Page_PreInit and done! but how do I accomplish this under ASP.NET MVC2 ?
stackexchange/codereview
i am using a List of <Friend>, Friend is a class that i have with some info about a person, name, desc, etc... ok, this is the code on the start of the class: private List<Friend> friends; and later... in a method of the class: Friend a = new Friend("Pablo SáeZ", "Total", "39.68333", "-0.32667", new Date()); friends.a...
stackexchange/codereview
I've got a model method status(), which returns either - "OK", "WARNING", or "ERROR". The status can be displayed in Django admin by adding status to the list_display ModelAdmin option. What I would also like to do is activate a filter for status in Django admin. However, if I add status to the list_filter ModelAdmin o...
stackexchange/codereview
How can I upload a file with paperclip via the console or a in a rake task? I'm a little unsure how this works without a form. Has anyone dealt with this? update So I found this: image = Image.new(:storage => File.open('/path/to/my/image.png', rb)) But I guess this makes my question a little simpler, say my photo was...
stackexchange/codereview
Consider the following XML file content: <catalog> <cd> <title>Red</title> <artist>The Communards</artist> </cd> <cd> <title>Unchain my heart</title> <artist>Joe Cocker</artist> </cd> </catalog> How can I get the following with any existing tool or XSLT? <catalog> <cd><title>R...
stackexchange/codereview
I've been using Javascript closures to protect variables by making them local to the returned functions, such as: closure = function() { var secretVar = 'Secret'; return { "msg" : function() { console.log(secretVar); } }; }(); console.log(closure.secretVar); // Undefined closur...
stackexchange/codereview
Newbie Alert I want to basically read in a few files to get some data out of it. I want to parse this data into a hash table to eventually generate a bar graph. Here is the type of file, I am reading in. All the files are much more bigger and have many more entries: > Name CPU Time CPU Load Percentage > > --...
stackexchange/codereview
I am trying to solve a simple classification problem. The Problem: I have a set of text and I have to categorize them based on the content. Solution using Mahout: I understood that I have to convert the input to a sequence file to generate the model. Yes, I was able to do this. Now, how do I categorize my tes...
stackexchange/codereview
I am wondering what it the overhead of using WeakRef processing large data set? The task I want to perform is something like this: huge = get_array_of_weak_refs # 100000000 entries or more :) result = huge.length * huge.inject(0) { |accum, it| accum += it.total } # much more complicated, just a sample Assuming that ge...
stackexchange/codereview
#include <stdio.h> #include <stdlib.h> int main() { int num = 1; char* test[8]; sprintf(test[0],"%d",num); printf("%s\n",test[0]); }
stackexchange/codereview
I have two Eclipse Maven Java projects. A domain project that is laden with JPA annotations and a persist project that implements DAOs for the domain objects. The persist project depends on the domain project. Maven compiles everything and it all Just Works. My JPA persistence.xml file is located in the persist pro...
stackexchange/codereview
I'm using Spring MVC 3 and JSR 303. I have a form backing object that has beans of different types in it. Depending on a request parameter value, I'll have to choose a bean to validate and save. I can't use @Valid for validation since the bean to validate is not known until the runtime. I was able to inject a javax.va...
stackexchange/codereview
When building my app for distribution to the app store, I get the following warning: warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011) Executable=/Users/tijszwinkels/Dropbox/Documents/projects/iphone/BatteryLogger Pro/bu...
stackexchange/codereview
While reading the pigeonhole principle on Wikipedia, I come across - "collisions are inevitable in a hash table because the number of possible keys exceeds the number of indices in the array. No hashing algorithm, no matter how clever, can avoid these collisions". But isn't gperf doing this exactly? Please enlighten.
stackexchange/codereview
I want jQuery colorbox to open the picture on mouse hover and close on mouseout. Can you advice how I can do it?
stackexchange/codereview
i am using optional parameter in the following code. but that shows error "default parameter specifiers are not permitted" anybody help me sir. public void getno(int pvalu, string pname = "") { }
stackexchange/codereview
I have a CCK field called "link" and want to add it's content to the -Tag in the RSS-Feed generated by Views 2. Is there any variable to access this information in the row template of a view?
stackexchange/codereview
I have to create a lot of very similar classes which have just one method different between them. So I figured creating abstract class would be a good way to achieve this. But the method I want to override (say, method foo()) has no default behavior. I don't want to keep any default implementation, forcing all extendin...
stackexchange/codereview
I have a class with a dictionary object. Any class that derives from that class, I want to override the dictionary with it's own implementation. How can this be achieved as the virtual keyword is not valid here? Thanks.
stackexchange/codereview
We have a script, /scripts/ourscript.php and a file, /texts/elvis.txt. How can we change contents of this file, when we run ourscript.php?
stackexchange/codereview
I have to write a bunch of DTOs (Data Transfer Objects) - their sole purpose is to transfer data between client app(s) and the server app, so they have a bunch of properties, a serialize function and a deserialize function. When I've seen DTOs they often have getters and setters, but is their any point for these types ...
stackexchange/codereview
I started to program a simple encryption/decryption engine as a kick-start for a bigger project for my school. I use assembly to program it and the logic until now is the following: i do some parsing for the arguments in the command line to take the input filename and output filename, then i read the input file into an...
stackexchange/codereview
My rails version is 2.3.4. At first I install the gem gem install facebooker and then add these code to login page <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> <%= fb_connect_javascript_tag %> <%= init_fb_connect "XFBML" %> <%= fb_login_a...
stackexchange/codereview
I am developing a Web Application using SQL Server 2005 for the database, but will need to deploy the database to SQL Server 2000 in the production environment. We don't have a license for SQL Server 2000 (we've only got for 2005), and I've come accross a range of incompatibilites and issues when migrating the DB from ...
stackexchange/codereview
I have three variables here. $first= 'Start'; $second = 'End'; $testVar = 'Start here and here until the End more more more strings here'; How can i search $testVar if it contains Start and End strings, and i want to post Start up to the End string only.
stackexchange/codereview
Is there a way to convert DateTime object by some pattern to string of following pattern. "yyyy-MM-dd HH:mm:ss.fff" /// yyyy - the year as in 2005 /// yy - the year as in 05, leading zero if necessary /// MM - the month with two digits, leading zero if necessary /// dd - the day of the month wit...
stackexchange/codereview
I am developing a game application with majority of web content,but also have to provide support for iPhone. Here users have to first register on the server from the website,and based on their payment they are given membership type (gold,silver,etc) for the game. They can play the game on iPhone also,using registration...
stackexchange/codereview
Maybe this is a n00bish question, but I'm used to c++'s pointers and references and this is confusing me a bit. Let's say I have the following scenario in a VB.net application: Dim x As New Dictionary(Of String, MyType) 'I add stuff to x Dim y As MyObject= x("foo1") 'later... y = New MyType() 'now y and x("foo1") don't...
stackexchange/codereview
I have a table with 3 columns. This table contains many raws (millions). When I select rows from the table I frequently use the following where clauses: where column2=value1 and column3=value2 where column1=value To speed up the select query I want to declare column1 and column2 as indexes. My questions is if declar...
stackexchange/codereview
I'm using SL4 and RIA Services to build a new solution based on the Silverlight Business Application template. I have a problem with get huge data from server, in this table "Employee" i have about 20000 record. If i request Top(10000) records the application work fine. If i request all data this message show me: Load ...
stackexchange/codereview
I'm new to Qt. I installed Qt for VS2008 and integrated with my VS2010. I just want to know how to make HTTP requests. I've read about QtNetwork but QtHttp is obselete. I also know about libcurl and curlpp, but I have problems installing it, and making it work with Qt. What do you recommend, QtNetwork or curlpp? If QtN...
stackexchange/codereview
How can I create a shortcut of power options with C# code? This is my code: WshShellClass wshShell = new WshShellClass(); IWshRuntimeLibrary.IWshShortcut MyShortcut; MyShortcut = (IWshRuntimeLibrary.IWshShortcut)wshShell.CreateShortcut(@"C:\user\Administrator\power options.lnk"); MyShortcut.TargetPath = ???????; MyS...
stackexchange/codereview
I am working in Visual Studio 2010. The main feature of VS 2010 is Multi-Monitering. How to do that. I am having 2 systems (CRT, 17 inches). I had opened my appliction, by right clicking the tab, i got the FLOAT option.That particular screen comes seperately, i had draged to the edge of my system, but the screen is not...
stackexchange/codereview
I'm trying to figure out how to draw on a bitmap in android, and keep a copy of these changed bitmaps for an undo function. Bitmap b = ... Paint p = new Paint(); canvas.drawBitmap(b, new Matrix(), null); canvas.drawCircle(0,0,20,20); //does Bitmap b have the circle drawn on it next time? Or how do I get the bitmap aft...
stackexchange/codereview
A good example of what I'm trying to do could be seen in one of the following 2 samples: read from a file char by char, at the start of a new line, prefix a line number (or something) manipulating the original file. read from a file char by char, converting upper to lower, or lower to upper, manipulating the original f...
stackexchange/codereview
EDIT: This question was originally about checkboxes, but I am getting the same behavior with a dropdown list. The code: productInput = new DropDownChoice<String>("productInput", new PropertyModel<String>(this, "productSelection"), produ...
stackexchange/codereview
function removeComment(bID) { $('#submitChangeComment').attr('disabled', true); $.ajax({ type: "POST", url: "misc/changeComment.php", data: { mode: 'del', bID : bID, comment : $('input[name=Comment]:visible').val() }, success: functi...
stackexchange/codereview
Hi I have a custom BindingList Containing Products with the following information string ProductID int Amount; How would I make it possible to do the following. ProductsList.Add(new Product("ID1", 10)); ProductsList.Add(new Product("ID2", 5)); ProductsList.Add(new Product("ID2", 2)); The list should then contain 2 Pr...
stackexchange/codereview
Does anyone know if it is possible to make it so all websites or stores share the same order increment ID. Basically we are working with an ERP system that is allowing us to submit our Invoice number to be the actual order number in the system, the thing is though, they only need one number sequence not a different one...
stackexchange/codereview
So an optional parameter expected in the web POST request of an API I'm using is actually a reserved word in python too. So how do I name the param in my method call: example.webrequest(x=1,y=1,z=1,from=1) this fails with a syntax error due to 'from' being a keyword. How can I pass this in in such a way that no syntax...
stackexchange/codereview
I know in java, if you have a char variable, you could do the following: char a = 'a' a = a + 1 System.out.println(a) This would print 'b'. I don't know the exact name of what this is, but is there any way to do this in python?
stackexchange/codereview
Any body gotten on device debugging working wit hthe Galaxy Tab? I have a Stock Generic Galaxy Tab and Although Eclpise will let me "Run" my apps on the device, if I click "Debug" in eclpise instead it doesn't do anything nor does it try to connect to the debugger. Ideas? UPDATE: Solution was to explicitly set my appli...
stackexchange/codereview
I tried to use MD5 encryption for the iPhone app I'm creating. I created an md5.m file with the following code (copied from StackOverflow): #import <CommonCrypto/CommonDigest.h> NSString* md5( NSString *str ) { const char *cStr = [str UTF8String]; unsigned char result[CC_MD5_DIGEST_LENGTH]; CC_MD5( cStr, strlen...
stackexchange/codereview
I am getting the following the following errors when I try to compile in VS 2010. It is also complaining that string is undefined, which makes no sense, as I clearly included it. I understand what the errors mean, but they don't seem to make any sense: 1>c:\users\jon\documents\visual studio 2010\projects\project 2\proj...
stackexchange/codereview
Say I just have a plain old class with a public string property. What do I have to do to make intellisense work in the Xaml Editor? public class MyType { public string MyProp { get; set; } } EDIT: Thanks for the answers. Xaml intellisense does work by default even without having to comment up all of your types and...
stackexchange/codereview
When I try to compile my c++ dll I get this error mt.exe : command line error c10100a9: Some operation on the input manifests must be specified (even if it is just to pipe the input to the output). Use the /? option for help on usage and samples. I have disabled Manifest Tool from the properties menu, the only reaso...
stackexchange/codereview
I've written a page in PHP that takes user input and then I do a shell_exec to a Perl file after passing those parameters in. My Perl file basically generates a GD::Graph. When I run the script for the first time, there seems to be no issue and I get a valid image.gif file. However, running it a second time, doesn't ch...
stackexchange/codereview
A little pseudo code to provide some background: I have an ASPX with a placeholder and a button When the button is clicked it adds a web user control (uc1) to my placeholder The uc has a button When clicked it adds a different user controls (uc2) to the placeholder Stepping through the code, if I look at the placehol...
stackexchange/codereview
I'm currently working on an application that uses a view controller and a tabBar controller. When a tab is selected I'm using webservices to update this particular view. Each tab calls different services to display different types of data. I use the viewWillAppear method to call methods when the different tabs are sel...
stackexchange/codereview
In Python, how do you get the position of an item in a list (using list.index) using fuzzy matching? For example, how do I get the indexes of all fruit of the form *berry in the following list? fruit_list = ['raspberry', 'apple', 'strawberry'] # Is it possible to do something like the following? berry_fruit_at_position...
stackexchange/codereview
I have the following tracking pixel: <img id="pixel" alt="" width="1" height="1" src="https://domain.com/file.cfm?amount={tag_amount}&amp;tracking={tag_invoicenumber}&amp;transtype=sale&amp;merchantID=29562" /> I need to add a variable to the end of the image source. Here's the jQuery I'm playing with. $('img#pixel [s...
stackexchange/codereview
I need to develop an app that reads info from google calendar on Android. The question is, is there a way to connect to the local calendar or should I use the google calendar API and read the info from the internet? (or maybe another way) as far as I know, there are ways to connect to the local calendar, but non of ...
stackexchange/codereview
I essentially want to create a variable that would be executed every time. For the simplest example: $myvar = `write-host foo`; Then everytime I referenced $myvar, it would output foo: dir $myvar Directory of foo: The point being that the write-host foo portion would be re-executed everytime I reference $myvar
stackexchange/codereview
My friend Google told me I should put the classname.hbm.xml to where classname.java stays at. But it doesn't work, saying resource: AccountsRequest.hbm.xml not found AccountsRequest is the java class name. I use javac to compile. Not sure if it is the reason. AccountsRequest.java is at /WEB-INF/src/. EDITED: in hibe...
stackexchange/codereview