instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
What is the difference between expired session and invalidate session? And also, how to make session expired in java? Please help me. Thanks in advance.
stackexchange/codereview
I have a recorded WAV file. I want to remove the background noise and separate the speech alone. Is there any C/C++ code available for achieving that, so I can integrate in my project? I have downloaded a code from Audacity but unable to integrate it. Is there is any third party library or C/C++ code available?
stackexchange/codereview
I'm trying to create simple shapes, Hexagon, Pentagon, Triangle, etc by having a starting Point and calculating where the other Points should be for each vertex. And i keep create straight lines or weird overlaping polygons. I use the method below to try to calculate the vertices for a Hexagon, then do a simple graphi...
stackexchange/codereview
Can rsync be done with a date filter, such that only files newer than some date are transferred? Right now I do rsync using an Applescript and it just backs up all of the files in a remote directory, regardless of date modified. If rsync cannot do date filtering natively, date filtering with Applescript would be accept...
stackexchange/codereview
How can I calculate a pie slice bounding rectangle. Radius (r), center point (x0, y0) , StartAngle (a0), EndAngle (a1) and drawDirection (clockwise or counterclockwise) variables are known.
stackexchange/codereview
Current implementation: Waits until parallelCount values are collected, uses ThreadPool to process the values, waits until all threads complete, re-collect another set of values and so on... Code: private static int parallelCount = 5; private int taskIndex; private object[] paramObjects; // Each ThreadPool thread shou...
stackexchange/codereview
Is there a function in C to read a file with a custom delimiter like '\n'? For example: I have: I did write \n to exemplify in the file is the LF (Line feed, '\n', 0x0A) this is the firstline\n this is the second line\n I'd like the file to read by part and split it in two strings: this is the firstline\n this is the...
stackexchange/codereview
I am using pthread win32 library to implement mqueue. But when it runs into following code, it throw #40 error should be ENOSYS, means system not supported. pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED); i = pthread_mutex_init(&mqhdr->mqh_lock, &mattr); pthread_mutexattr_destroy(&mattr); /* be sur...
stackexchange/codereview
Alrighty, I've been banging my head against the wall on this one for a while, so here it goes... I'm currently writing a Java (1.5) program that can upload very large (200MB+) text files to a DB2 CLOB Column, but have been running into a few issues. During my research, several code examples suggested that I use the Pre...
stackexchange/codereview
Please help me with T-SQL query in SQL 2008 to get value from between first double quote to second double quote. The string will have many double quotes. The XXX will be of variable length. E.g. it will return abc@pluto.com Column XXX Usr="abc@pluto.com" zone="fyrkkk="0" htyy"ukbpfrttt897="009" / Many thanks.
stackexchange/codereview
I'm using Zend_DB and trying to change the charset to utf8, here is the code: config.ini : [development] db.host = "localhost" db.username = "root" db.password = "toor" db.dbname = "db_whoopdiedo" db.charset = "utf8" bootstrap.php : class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { public function _i...
stackexchange/codereview
i want to know, if there is another way to readout a big file Hans //name Bachelor // study_path WS10_11 //semester 22 // age and not like this: fout >> name; //string fout >> study_path; //string fout >> Semester ; //string fout >> age; //int when my file turns to more than 20 line's i should make 20+ fouts?...
stackexchange/codereview
Could any one tell me how to do this? i need to change it into **xml schema**. The problem that I am facing is that I can't think of where to use elements and wehere to use attributes. IF i consider these as attributes:<xs:attribute name="name" type="xs:string" use="required"/>** - i will use this statement. But the...
stackexchange/codereview
I have wrote detector of breath based on apple's aurio Touch example application. But i can not figure how to set audio unit or audio session not to play sounds from audio input. Now when blowing in the mic, i can hear the breath from iphone speaker. How to prevent this? Here is apple's audio session init code: ...
stackexchange/codereview
I have this code: set_time_limit(0); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); ob_flush(); flush(); $start = time(); $secs = time() - $start; while ($secs <= 300) { echo "this script has been running for $secs seconds.\n...
stackexchange/codereview
I often have similar constructions: var t = from i in Enumerable.Range(0,5) select num(i); Console.WriteLine(t.Count()); foreach (var item in t) Console.WriteLine(item); In this case LINQ will evaluate num() function twice for each element (one for Count() and one for output). So after such LINQ calls I h...
stackexchange/codereview
I'm writing a php script which is interfacing with a SOAP client (which is internally using java). One of the calls requires that I pass Base64 encoded content. I'm passing it like this: (Edit 1) $content=file_get_contents('fileX'); fileX is a binary file which has been uploaded via POST and saved successfully in /tmp...
stackexchange/codereview
How do you delete an ActiveRecord object? I looked at Active Record Querying and it does not have anything on deleting that I can see. Delete by id, Delete the current object like: user.remove, Can you delete based on a where clause?
stackexchange/codereview
I suppose the title might be a little misleading, but I couldn't think of a better one. I have an array A[], all but one of whose elements occurs some number of times that is a multiple of 15, e.g. 2 occurs 30 times, 3 occurs 45 times. But one element occurs x times where x is not a multiple of 15. How do I print the n...
stackexchange/codereview
I have a Silverlight dataform bound to a model. Everthing works fine except when I edit a value in a textbox, do not tab out or click to another control and then hit the cancel button. The cancel event is triggered properly all properties are set back except the one bound to the textbox holding the focus. The value of ...
stackexchange/codereview
Is there some way to use the standard jQuery events with SlickGrid? For example. grid = new Grid($("#myGrid"), data, columns, options); grid.blur(function(){}); // this would be nice // this will let me add jQuery events to the whole grid, but // I lose the cell position/data $("#myGrid").blur(function(){}); Thanks...
stackexchange/codereview
I am very new to android development so forgive my ignorance. I need to be able to read some text from a remote webpage at say 15 minute intervals. The webpage itself contains just one word with no html tags or formatting. If this is possible if someone could point me in the right direction I'd appreciate it. Thanks
stackexchange/codereview
Im made a sort of autentication on my web application using GWT. So i make these functions in the GWTServiceImpl Class : public class PageMenuLogin extends FlowPanel { public PageMenuLogin() { PageMenuLogin.getService().isSetSession(new AsyncCallback<String>() { @Override public void...
stackexchange/codereview
I have this ActionListener that gets called in the EDT. My plot() function is computationally heavy, it can easily take five seconds. It made the GUI hang as expected. I added the SwingUtilities.invokeLater code and it still hangs. Shouldn't the GUI be responsive now that I am spawning a separate thread for my heave co...
stackexchange/codereview
Does anybody know how to get a SubTitle bar in the navigation bar, like the NYTimes does (where they say Latest News). This is clearly part of the navigation bar since it stays still. Here is what it looks like at the NYTimes (but a whole lot of other apps do the same). http://cl.ly/362d181Q3l2I111q2Q46
stackexchange/codereview
When I tried to un-install and install an executable foo.exe, Im geting the below error Error opening file for writing click abort to stop the installation I could find that some files were failed to get deleted while un-installation. And by using process explorer I can see that explorer.exe has still reference to som...
stackexchange/codereview
I have a web application I am automating with watir. The application has a browsing page which shows thumbnails for a set of templates. Each thumbnail is a link to the template. I need to open each template in a new tab or window and take a screen shot or print a pdf of the template to verify that it opens correctly an...
stackexchange/codereview
Is there a way to retrieve the number of sent SMS messages between specific dates in android? I would prefer an officially supported SDK functionality, this stating in your answer whether this is part of the official SDK would be helpful. I am aware of this stack overflow question but it seems to use the not officially...
stackexchange/codereview
Some time ago we released an app to the AppStore on a client's account. The client preferred a simple version number scheme, so the apps first version number was 1.0. Since it's release, however, there seems to be an unexpected need for minor changes to the content of the app on a regular basis, so a more precise versi...
stackexchange/codereview
In a C#/ASP.NET application, I have a form that renders much like the following (plus a lot more, but this is what matters): <form method="post" action=""> <input type="image" name="ctl15" src="cancel.gif" style="border-width:0px;" /> <!-- Server side, the above input is a System.Web.UI.WebControls.ImageButton. -->...
stackexchange/codereview
I need to visually represent multiple resources (vertically) and the time of the day (horizontally) as shown in this mockup: I need to be able to drag and drop the colored boxes into different available time slots. I also need to be able to display text in the boxes. We are using JQuery already (and FullCalendar) for ...
stackexchange/codereview
Is there disadvantages to using WebKit WebViews compared to using NSViews? I'm using a webview to create a UI for an application. The application itself does not have much interactivity. I have seen it mentioned, on this website & others, that using a WebView can be convient means of prototyping. However, with our tea...
stackexchange/codereview
public static BTNode<E> treeCopy(BTNode<E> source) { if(source == null) return null; else { BTNode left = BTNode.treeCopy(source.left); BTNode right = BTNode.treeCopy(source.right); return new BTNode(source.data, left, right); } } My questions is why can't I use...
stackexchange/codereview
My DBA is telling me that it's impossible to have an OrderBy in a SQL view. I'm having trouble with a 3rd party component that needs to have a view in a particular order. Is this true? Am I not able to sort within a view?
stackexchange/codereview
I was hoping you guys could help me on this one: how to handle errors and what to return? What I do, most of time, is make my functions/methods return two possible values. The intended value in case of success and FALSE in case of failure. This way I can use: if(function()) { ... } else { ... } I don't like to use exc...
stackexchange/codereview
First of all, my framework is Java EE 6 with JSF, managed bean, EJB and JPA. I write a simple program to query information from the database. So when I click a button, it trigger an event to a managed bean, where an event listener method will access EJB method. The EJB method will do a simple select query to an Entity....
stackexchange/codereview
when using a cellbrowser and adding that widget to a flowpanel (to be placed wherever, downstream), for some reason the end result is dead (a blank screen)...vs if I add directly to the rootpanel (or layout panel)
stackexchange/codereview
I'm hoping to write an open source IDE for a programming language I'm designing. I was wondering if anyone knew of any lightweight IDE's written in C++, that I could use as a starting place. Ideally I want to use something BSD licensed, however I'm willing to consider other licenses if it is required. Thank you in adva...
stackexchange/codereview
I have access_token for facebook application. Is there a way I can get the contact information(phone-number) of the user of my facebook application? Below is the url which returns me all the public information like name, location, education etc.. but not any contact information https://graph.facebook.com/me?access_toke...
stackexchange/codereview
I use last version of gstreamer plugins bad and I would like to try VDPAU. I test with the big buck bunny movie from blender foundation. I've try with this command : gst-launch-0.10 filesrc=/home/alex/big.mp4 ! mp4mux ! vdpauh264dec ! vdpauvideopostprocess ! vdpausink but it could not link mp4mux with vdph264dec. I als...
stackexchange/codereview
I'm about to introduce the Open Graph protocol to an existing HTML5 Web application and I'd like to include the necessary RDFa data without introducing any unnecessary crud. I've looked at the HTML+RDFa 1.1 draft and comparing it with Facebook's Open Graph protocol documentation, I just need to set the lang attribute o...
stackexchange/codereview
What is the difference b/w the following two codes. What is the use of using 'this' keyword in the constructor. Ex 1: public Product(string name){ this.Name = name; } Ex 2: public Product(string name){ Name = name; } I know this refers to the calling object. Just I couldn't able to get the difference? can some one pl...
stackexchange/codereview
I wrote this query and trying to also group by "D" but it is not working. Any help?? (select hr_id, max(delivery_dt)as maxd, (CASE WHEN max(delivery_dt) > '11-may-2010' then '< 6 MO' WHEN max(delivery_dt) > '11-may-2004' and max(delivery_dt) < '11-may-2010' then '7 - 78 MO' WHEN max(delivery_dt) > '11...
stackexchange/codereview
For the same registered application on App Engine, is it possible to have both Java and Python "applications"?
stackexchange/codereview
I have a standard data-entry type form built in ASP.NET. I am pretty green with CSS and am trying to line up the labels and text fields on the form. I am using the standard ASP.NET controls. I know from my CSS book and web sites that I could use the label for="" with the name of an input text box to follow and float...
stackexchange/codereview
I am trying to emulate "hardware" mouse clicks as it appears that some software blocks input from PostMessage for instance. I know there's SendInput, but that's not an option as I need this to be compatible in background windows as well. The solution seems to be a low-level mouse hook but I've searched around and could...
stackexchange/codereview
I want to know if exist a equivalent of (.net) list<somefixedclass> in vb6 I know that exist collection in vb6 but it uses object (variant) instead of a specific object. thanks.
stackexchange/codereview
I was receiving the following error unsupported format character 'a' (0x61) at index 16 def send_notification_email(sender, **kwargs): change = sender print "==========================================" mail_admins(subject="model %(model) has been changed by %(user)" % {'model'...
stackexchange/codereview
I get this error when i try to install my app from eclipse on my htc magic. Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY Please check logcat output for more details. Launch canceled! Logcat says: at.tomtasche.altitude requires unavailable shared library com.google.android.maps; failing! I developed an app ...
stackexchange/codereview
I am building a Rails application where I need to do a usability test of three different Views for the same application. My thought is to switch out the default view path depending on the subdomain. For example, I'd like to be able to define the paths something like: option1.mysite.com => views/option_1 option2.mysite....
stackexchange/codereview
I'm trying to use ActiveMQ-CPP with HornetQ. I'm using the ActiveMQ-CPP bundled example, but I'm having a hard time with it. The producer works like a charm, but the consumer gives me the following message: * BEGIN SERVER-SIDE STACK TRACE Message: Queue /queue/exampleQueue does not exist Exception Class END SERVER-S...
stackexchange/codereview
I might be tasked to make an e-commerce site. I can make it in Magento, osCMax, basically any PHP based prepackaged system. Here's the three main features. My boss is the admin. My boss' friends can register. My boss' friends can sell stuff. My boss gets a cut. Anybody got suggestions about what to use? Stories can hel...
stackexchange/codereview
I am trying to remove the cache using the HttpRuntime.Cache.Remove(key) but invain. I wonder what are the best practices for using HttpRuntime.Cache. Regards
stackexchange/codereview
I'm trying to install acts_as_tree plugin, i got no error from the command line but i still get : undefined local variable or methodacts_as_tree' for #` the vendor/acts_as_tree is empty and when i try install again i get : already installed: acts_as_tree (git://github.com/rails/acts_as_tree.git) i'm running rails 2.3.5...
stackexchange/codereview
the info file is right,the following is my module file code. when i access the http://localhost/drupal/mymenu why it can't work. <?php function mymenu(){ $item = array(); $item['mymenu'] = array( 'description'=>'test1', 'page callback'=>'mymenu_test', 'access arguments' => array('access mym...
stackexchange/codereview
I want the users of my website to be able to authorize Facebook access in their profiles, such that our servers can continuously use that authorization. I know how to do the authorization part, but what I get back is an access key that will eventually expire. This would require the user to log back in and re-authorize ...
stackexchange/codereview
My Win32 Application displays Menus as shown when running on Win 7: This is the Default for the themes Windows 7 as well as Windows 7 Aqua. Please note that the selected menu entry is only slightly different from the other entries. I think it is much too less highlighted and therefore i am looking for a way to give th...
stackexchange/codereview
I was told about textRange in IE, but I can't find equivalent in other browsers for it. I need a way to read the element's X,Y offsets that the viewer is seeing.
stackexchange/codereview
We have a bug to fix, and like any good TDD practitioner, I want to write a failing test to represent the bug first. The bug is in a method that takes a rather complex type as input. The bug will only reproduce when the complex type has a certain combination of property values set. So far I have reproduced the bug an...
stackexchange/codereview
select pid from table where pid is not (select top 10 pid from table1) What is the correct syntax for the above?
stackexchange/codereview
My c# application must fill a Word template and save the processing result to another file. We've been requested to lock the new document to prevent ANY modification. Now, I have tried with: wordDoc.Protect( Word.WdProtectionType.wdAllowOnlyReading, ref oMissing, ref password, ...
stackexchange/codereview
I have two tables. Table A and Table B. The columns are same. create table TableA ( id int , name varchar , last datetime ) create table TableB ( id int , name varchar , last datetime ) I m populating table A with mass data. and i would like to either insert or update the data in table A int...
stackexchange/codereview
I have no idea why this is not working, I'm learning rails and I'm following a book it says to do it like this: <%= form_for([@article,@article.comments.new ], :remote=>true, :html => {:style=>'display: none;' }) do |f|%> <div class="field"> <%= f.label :name %> <%= f.text_field :name %> <...
stackexchange/codereview
I am trying to create a set of services that send messages to each other using NServiceBus/MSMQ. I am doing so with NO XML configuration whatsoever, and I am also NOT planning on using the NServiceBus generic host for now (too much "black magic" with marker interfaces, profiles, containers and other crazy configuratio...
stackexchange/codereview
I am novice in android development and facing some problems. I have installed Eclipse helios along with ADT 0.9.9 and Android Windows SDK and android 2.2 package. I have developed a small app for testing (one button and EditText control which displays message when user clicks button), it complied successfully. But when...
stackexchange/codereview
Given a 2 processor Nehalem Xeon server with 12GB of RAM (6x2GB), how are memory addresses mapped onto the physical memory modules? I would imagine that on a single processor Nehalem with 3 identical memory modules, the address space would be striped over the modules to give better memory bandwidth. But with what kind ...
stackexchange/codereview
I have an object value, which is of some type, either @XmlRootElement-annotated, or not. I want to marshal it into XML: String value1 = "test"; assertEquals("<foo>test</foo>", toXml("foo", value1)); // ... @XmlRootElement class Bar { public String bar = "test"; } assertEquals("<foo><bar>test</bar></foo>", toXml("foo"...
stackexchange/codereview
I get an error when using razor helpers in an MVC 3 project (did put the cshtml file in app_code). Looks like the generated code is using a wrong assembly reference. using WebMatrix.Data; using WebMatrix.WebData; Compiler says: CS0246: The type or namespace name 'WebMatrix' could not be found (are you missing a using ...
stackexchange/codereview
I Have 21 entities with the same structure. Same Attribute too. Every entity contains these Attributes : AreaType ID IsActive LangID TXT ModuleType ID IsActive LangID TXT ... What I Need to perform a generic Crud. I already know that I need to create a generic repository. My problem is to perform a kind of gen...
stackexchange/codereview
I'm trying to implement drag'n'drop for a QGraphicsScene. Here are the events I've overloaded: void TargetScene::dragEnterEvent(QGraphicsSceneDragDropEvent *event) { bool acceptDrag = false; const QMimeData* mime = event->mimeData(); // Is an image present? if (mime->hasImage()) { QImage img = ...
stackexchange/codereview
I have a var in js which holds a click action. This action is bound to a few different divs: <div class="clickable"><div class="hidden">inner content 1</div></div> <div class="clickable"><div class="hidden">inner content 2</div></div> <div class="clickable"><div class="hidden">inner content 3</div></div> The js look...
stackexchange/codereview
Hello I have a function which signature is std::string f(double x, double param1, double param2, double param3); I would like to call it on a std::vector xvalues for the parameter x using something like std::transform for a particular value of param1, param2 and param3. It would be the equivalent of: double param1(1.)...
stackexchange/codereview
I'm a .Net C# Developer. I want to develop the media programming about video/audio codec, capture media from source, etc. I'm going to use the DirectShow Lib, but I read it on MSDN, and I'm very confused, because I'm a beginner. Do you have the best tutorials or some article that can make beginner understand to program...
stackexchange/codereview
I use a variety of editors and for the life of me I can't remember if this is a default feature of TextMate or if it's a setting I've turned on somewhere along the line but each time I click on a line (in the empty space part after content) the cursor moves to the exact position I've clicked rather than jumping to the ...
stackexchange/codereview
Hi all I need to write selector for this method. How can I do it? Thanx! - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath Here is the code where I need it: UIBarButtonItem *deleteButton = [[UIBarButtonItem alloc] initWithTitle:@"Delete User" style:UIBarButtonItem...
stackexchange/codereview
I have an emf model and i'd like to make a GMF editor to create instances of this metamodel.I'd like also some live constraints to avoid some connections between the components of my EMF model.e.g:My EMF consists of A,B,C,D components which derive from a General class called F and there is reference within F which conn...
stackexchange/codereview
I have some XML documents that I'd like to server from Sinatra. I did some searching but couldn't find anything specific. I did find the builder gem but I don't want to build the document from scratch. I tried to do something like this get '/' xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?> <name>My name</name> <a...
stackexchange/codereview
I am trying to write a vCard Parser and am having trouble unfolding lines. As you can see here: http://www.faqs.org/rfcs/rfc822.html look for "unfolding" it says that all the following are valid: Long string<return> <tab>continue Long string<return> <tab>(n*<tab>)continue Long string<return> <space>continue Long str...
stackexchange/codereview
I'm using Tomcat Maven plugin to deploy my war to Tomcat. When I run mvn tomcat:redeploy I notice that the packaging goal is always executed, even if it was run and no change was made. How can I skip that goal and only run the deployment itself?
stackexchange/codereview
There are 6 fields in the table called eblasts. ID, message, drop_dead, warning1, warning2 and due_date. drop_dead, due_date, warning1 and warning2 are all unix timestamps. I need to send an email if that time has past. So I want to look up the drop_dead date from the DB (which will be the latest time an email should b...
stackexchange/codereview
I use library which uses sfl4j-api for logging in android application. So I use slf4j-android to get logs, but I only got following messages: I/AndroidLoggerFactory( 267): Logger name 'org.apache.mina.util.NamePreservingRunnable' exceeds maximum length of 23 characters, using 'o*.a*.m*.u*.NamePreser*' instead. And no...
stackexchange/codereview
I'd like to have a custom usercontrol based on textbox where I could type in text (for example names) and the names would be then converted to custom items (that would have an X button to remove them, etc). This is what I would like: How can I achieve this? Can I replace a piece of text with a custom item? Thanks for ...
stackexchange/codereview
I am currently working on a project where I have to document (in a report) the data structures that are being exchanged between a client and a server. The format I use is JSON. I was thinking about using a JSON dump with placeholder data, but it quickly gets messy as there are quite a few imbricated dictionaries. Is t...
stackexchange/codereview
We are using JMeter in a heterogeneous environment and we would like to measure CPU and memory while we are producing heavy load on a server where our service or web application is running. What would you recommend to use? Is there any software solution (open source or commercial) available which records CPU and memory...
stackexchange/codereview
I have an assignment to create an algorithm to find duplicates in an array which includes number values. but it has not said which kind of numbers, integers or floats. I have written the following pseudocode: FindingDuplicateAlgorithm(A) // A is the array mergeSort(A); for int i <- 0 to i<A.length ...
stackexchange/codereview
I want to use Entity Framework and autogenerated classes in my application. I'm not interested on: persistance ignorance testing I only care about one thing: keep the application well organized keep things simple I read about Domain Drive Design and I'm interested on it because it claim to simplify complex applicat...
stackexchange/codereview
<p style="float: left; position: relative; left: 130px; top: 80px; display: none;" id="homehref"><a href="" style="color: white;">Home Page</a></p> I have this as my hidden element on the header of my site. Whenever i mouseover over the header logo i show this element. In firefox its working fine. But in IE 7 it shifts...
stackexchange/codereview
I'm trying to implement the "hyperspace" tween animation described at http://developer.android.com/guide/topics/resources/animation-resource.html ("Animation Resources") - however it does not seem to work as written. When I run the application, I just get a blank view below the application title bar. What am I doing wr...
stackexchange/codereview
Are there any CMS available in rails which we can extends as per need for ecommerce website ?
stackexchange/codereview
My XML schema has the rule: <xs:attribute name="A" type="xs:QName" use="required"/> I want to be able to provide a wildcard to my XML rule file for this tag e.g. <Element A="<wildcard_character>" Operation="doStuff"> Normally the value of the attribute is a regular qualified string name but I'd like to be able to provi...
stackexchange/codereview
My requirements are these: byte-code Virtual Machine C-like syntax Small implementation and code size Garbage Collection not necessary Would be used in constrained environments e.g. micro-controllers.
stackexchange/codereview
I am looking for a way to access javascript comments from some (other) javascript code. I plan on using this to display low level help information for elements on the page that call various js function without duplicating that information in multiple places. mypage.html: ... <script src="foo.js"></script> ... <span onc...
stackexchange/codereview
I notice that many (most?) people when working with Zend Framework add decorators and labels in the Form class itself. class User_Form_Add extends Zend_Form { public function init() { parent::init(); $username = new Zend_Form_Element_Text('username'); $username->setLabel('Username:') ...
stackexchange/codereview
Is anybody famaliar with how to use TTXMLParser. I can't find any documentation or sample code on it. Is it SAX or DOM? Does it support Xpath? Can I extract CDATA from elements? I have an application that already uses several Three20 modules it would be a shame to have to use another parser.
stackexchange/codereview
I need my app to talk to two different databases, which themselves are replicated(using Postgres streaming replication). The reason is that I want to have all the reads happening against one database and writes against the other. I use hibernate in my application. Is there an out of the box way to achieve this? -thank...
stackexchange/codereview
I have 2 strings, A and B. A contains "HelloHowAreYou". B contains "Bingo". I want to replace string A with string B resulting to "BingoHowAreYou". Any tips on how to do this? Even a keyword is suffice. I know this is kinda newbie, but i dont want to hunt all msdn doc just to find this simple things. As i said, a simpl...
stackexchange/codereview
My Google-Fu is failing this Android newbie today. Does anybody know of a good example showing how to launch an intent from a PreferenceScreen? Something like: <PreferenceScreen android:key="preference_some_new_layout" android:title="@string/pref_some_title"> <intent android:action="???...
stackexchange/codereview
So if a button is clicked on my site, a new link is generated: <a name="2" class="cld">mylink</a> Now, is there any way I can use a selector like $('.cld') to select this link that wasn't there when the page loaded? I guess it's possible to use onClick as an attribute in the link tag. If so, could you tell me how. I...
stackexchange/codereview
I came across an interesting problem today. I was altering a stored procedure and put a select statement at the very end. It was meant to be temporary and just for working with the data. I was surprised to find out later that the statement got saved and was executing whenever the SP ran. SET ANSI_NULLS ON GO -- Com...
stackexchange/codereview
How to Dispaly the username on all aspx pages....? Can any one help me in this context..... am thinking that by using "session object" we can able to do this...bt am not sure Can any send the code or links
stackexchange/codereview