instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Very basic question. I have a portal containing several servlets, one of which takes care of logging in (but only as an admin). How do I use HttpSessions between Servlets to know if the admin is signed in? Thanks in advance!
stackexchange/codereview
I need to find and replace all text matches in a case insensitive way, unless the text is within an anchor tag - for example: <p>Match this text and replace it</p> <p>Don't <a href="/">match this text</a></p> <p>We still need to match this text and replace it</p> Searching for 'match this text' would only replace the ...
stackexchange/codereview
I am trying to set an interval when some code runs but only need to do it based on the number of elements there are. Here's a quick example: 5 total elements Run code once every 20 seconds for each element that is found. Can someone please give me a basic example how to do this using plain JavaScript? Everything I have...
stackexchange/codereview
I created link in the grid panel, so that when I click on the link and it will open another tab in the tab panel. Currently I render the column cell output into html href with onClick event. But it seems that got error when the renderer method openrender() call the other method newtab(), which showing error function ne...
stackexchange/codereview
I tried using the binary installer and I get the same problem I am describing below. I have compiled it from source and used the instructions given on the Qt website, but I can't get Qt Creator to find Qt. I tried copying the Qt directory from /usr/local/Trolltech to /Developer/Applications/QT I have tried copying the ...
stackexchange/codereview
Ocaml's standard library contains various modules: List, Map, Nativeint, etc. I know that interfaces for these modules are provided (e.g. for the List module), but I am interested in the algorithms and their implementations used in modules' functions. Where can I find that?
stackexchange/codereview
In previous apps, I've loaded data into a UIWebView using 4 steps: 1. Use an NSURL Connection to grab the data from the web asynchronously 2. WHen the download is complete, convert the NSData object to a string, and manipulate the data prior to display. 3. Write the converted data out to the doc folder 4. Load the dat...
stackexchange/codereview
How can I remove the small rectangle that appears when a horizontal and vertical scrollbar appear?
stackexchange/codereview
I've looked at a couple different analytics programs (like Google Analytics) that will tell me what URL my users have entered my site from, and which URL they are going to when they exit. It certainly must be possible to gather this data somehow, I just can't find any code examples of how to do it. I would imagine tha...
stackexchange/codereview
There's a TinyMCE textarea on my website. When i click the "Save" button, the function save(); is called. It should lock the TinyMCE Editor while saving (assume save.php takes a few seconds to load). Even though formProgress(1) is the first line of code in my save() function, it won't be executed right away. The editor...
stackexchange/codereview
I have a project to send some email to end clients. My client need to know what exactly "Email Client" they use to read the mail. I know a hidden can get the open event and even the user agent they use, so by parsing user agent i can get most email clients info. But it's hard to detect some popular web mail clients li...
stackexchange/codereview
I have a ZIP file on my server. I want to create a PHP file, loadZIP.php that will accept a single parameter, and then modify a text file within the ZIP to reflect that parameter. So, accessing loadZIP.php?param=blue, will open up the zip file, and replace some text in a text file I specify with 'blue', and allow the ...
stackexchange/codereview
I'm trying to get a window to cover the whole screen. Its positioning and dimensions is fine but it gets covered by the Gnome panel. To complicate things I have two monitors and this app needs to support people with multiple screens. WINDOW_TYPE_HINT_SPLASHSCREEN is a good start. It covers both screens but not the pane...
stackexchange/codereview
I saw a similar question here on SO but I believe mine differs a little a bit. OK, so I have a simple view here: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<RootFinder.Models.QuadCalc>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" r...
stackexchange/codereview
I have an app in C++ which actually processes a binary file. The binary file is a collection of events say A/B/C, and on detecting event A in the file, the app handles the event in "handler A". Now i need to write another script in a custom language, which gets executed orthogonally to the binary file processing. The s...
stackexchange/codereview
I'm in the middle of learning PHP, and the following list-related problem has come up. The language doesn't really matter, so I'll give you this in pseudo-code. Pseudo-code answers are fine, of course. Say, there's a list of two different, repeating elements - two single characters, for instance. So my list looks rough...
stackexchange/codereview
I would like to use the attr() method on a html node, which I have a reference to in a normal variable in Javascript. Now, the problem is that this node is not returned by a jQuery selector, but with normal Javascript: var myNode = window.getSelection().getRangeAt(0).commonAncestorContainer; Now, I would like to do som...
stackexchange/codereview
Doctrine 1.x and 2 both offer some kind of Versionable support in the form of a separate auditing table that tracks changes over time. However, the versions appear to be intended for per-row use (ie, they all maintain their own version number) instead of database-wide, such as in Hibernate Envers, which gives every row...
stackexchange/codereview
I'm currently trying work on a plugin and I'm running into an issue. Basically, in the plugin options page, I have a form in which the user will input information for an opt-in email. However, I need different forms for each instance of the email form. I'm trying to put this together quickly, so rather than rewrite ...
stackexchange/codereview
I have a WPF listbox which is virtualized with a large number of rows. The listbox changes in size as I scroll through the entities. I've tried: <Setter Property="MinWidth" Value="{Binding Path=ExtentWidth, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ScrollViewer}}}" /> Sadly, I don't have enou...
stackexchange/codereview
I am trying to communicate with a web service that is developed by .NET, and I am writing my client in PHP. One of the headache right now, is generating the SignatureValue and for SignedInfo. <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorit...
stackexchange/codereview
I have a team registration app. A user signs up to be a part of the team. When they do so, the view adds a team member and adds the user into the auth db. However, when the team model returns invalid data, the user.save() method is adding the username, password and email. So, when a user corrects the team registration,...
stackexchange/codereview
I have a custom configuration section and i want to generate an xsd scheme using the xsd tool, however i get the following error : Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation. All rights reserved. Error: There was an error ...
stackexchange/codereview
I'm new to web security. Why would I want to use HTTP and then switch to HTTPS for some connections? Why not stick with HTTPS all the way?
stackexchange/codereview
part of forms.py class FormPublicar(forms.ModelForm): class Meta: model = Publicacao exclude = ('usuario', 'aprovado', 'cadastrado_em', 'slug') def enviar(self): titulo = 'mensagem enviada pelo site' destino = self.cleaned_data['emailp'] mensagem = u""" Message that will be sent after completin...
stackexchange/codereview
BufferedReader has easy methods for reading a file line by line. But there doesn't seem to be anyway to keep track of where you are, so you can get back to that place later. FileInputStream has file getChannel() which returns a FileChannel which can tell you the current position in the stream. So if you give a Buffe...
stackexchange/codereview
Please suppose you have the following statement stored in a VARCHAR2: UPDATE PLUTO SET FIELD1='',FIELD2='',FIELD3='TIGER',FIELD4='',FIELD5='SCOTT'; I would like to write a regular expression that simplifies the previous statement, by removing all the updates setting to NULL, because they are useless (NULL is the defau...
stackexchange/codereview
Can anyone offer an insight into my problem please? My app works when GPS is disabled, but FC's when starting while GPS is enabled. On a cold start it offers the option to turn on the GPS. After doing that, pressing the back arrow button it returns to the app activity (although the GPS icon is not visible in the status...
stackexchange/codereview
I developed a custom installer application because the Visual Studio Setup Projects is not sufficient customizable to fit my needs. I developed a validator and an Installer for Prerequisites like .NET framework, SQL Server, but I'm unable to start some executables like the one from .NET framework using Process.Start. I...
stackexchange/codereview
I am trying to download file through ajax request. I have below code in my php file to dowload $filedata="File data here" header("Content-type: application/octet-stream"); header("Content-Disposition:attachment; filename=report.txt"); header('Content-Transfer-Encoding: binary'); header("Pragma: public"); header("Expire...
stackexchange/codereview
My application is Web App Chat Room , it supports following features: 1.Create/Join/Close room 2.Send message in room (just live message, offline message might be supported in future) I have done logic for application, but I'm considering where to save chat room data (message,room information, and users in room) ? I ...
stackexchange/codereview
Somehow the tables don't appear in phpMyAdmin anymore, but we checked the MySQL data table and the files seem to be there. I could not read them and did not recognize them as any of the available format for import. At this point, what can I do to import the database with these files? (with extensions MYD .MYI .frm .opt...
stackexchange/codereview
I have a jsf snippet: <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"> <!-- Yandex.Metrika --> <img src="//mc.yandex.ru/watch/xxx" alt=""/> <!-- /Yandex.Metrika --> </ui:composition> But when I use it, web-client get HTML page whithout empty alt attribute in img element...
stackexchange/codereview
This is probably pretty stupid, but I'm still green to LDAP. So I hope someone can lend me a hand. I am using Apache Directory Studio to do my searches and I am confused about when I should be using a filter or when I should be breaking up my filter into two, using one part as the filter and the other as my search base...
stackexchange/codereview
Here my test code: [Test] public void Test_Delete_ShouldCancelLayoutView() { Expect.Call(TreeMasterService.Delete(1, null)).Return(null).IgnoreArguments(); Mocks.ReplayAll(); TestController.Delete(1); } here is the Testee: public void Delete(int id) { TreeMasterS...
stackexchange/codereview
I am trying to figure out how to pass the model object from controller to view in a following scenario: <% Html.Action("GetRequest", "The_Controller", new { requestId = 12 }); %> <% Html.RenderPartial("Request", ViewData.Model); %> The action should, and it does, call the controller's method which looks up the Request...
stackexchange/codereview
How can I make an Atom entry with C# and .NET 4 ? I need to make an entry with this structure: <entry xmlns="http://www.w3.org/2005/Atom" xmlns:f="XXX:aaa"> <title>title1</title> <summary>summary1</summary> </entry> I tried to do this with SyndicationItem class but entry contains more info than I need: Syndication...
stackexchange/codereview
I have this function inside my program: void CBar::NavigateComplete2(IDispatch *pDisp, VARIANT *URL) { try { UpdateBar(UpdateNavigateComplete); } catch (...) { ASSERT(0); } } I need to have the URL value from URL->bstrVal from this function and to copy it to a global variable so that my other function can...
stackexchange/codereview
I want to use Embedded FireBird with .NET 3.5. I have few queries: (1) Are there any new developments done on the embedded version by the FireBird community? (2) Are there any database file repair & optimize (shrink etc.) features in it? (3) Does it supports Triggers, Foreign Keys, PL/SQL type of things etc.?
stackexchange/codereview
I have created an AMI image and installed Hadoop from the Cloudera CDH2 build. I configured my core-site.xml as so: <property> <name>fs.default.name</name> <value>s3://<BUCKET NAME>/</value> </property> <property> <name>fs.s3.awsAccessKeyId</name> <value><ACCESS ID></value> </property> <property> ...
stackexchange/codereview
I have a MySQL database table with cross country running times in it. I am at a fork in the road and questioning whether I should convert the current datatype for the running times (varchar) to a decimal. The one aspect which attracts me to the varchar datatype is that I don't have to convert the incoming running resu...
stackexchange/codereview
This seems simple enough, but I can't get the background color of my list items in a sliding door menu in css to change. I've changed the left border (to green) and the text of each list item (to white), but I haven't been able to change the background color. Here's the code: .slidedoormenu { list-style-type: non...
stackexchange/codereview
I come to next problem after this post. After loading data, gray overlay covers everything on page, but grid data. The css div id responsible for that is lui_list. Any idea, how to solve this? That's how I'm running jqgrid scirpt: <script type="text/javascript"> jQuery(document).ready(function() { jQuery("#...
stackexchange/codereview
You will see from this code that it loads the content URL from the hash tag. Is there anyway to load only a single div element from that external page. $(function() { if(location.hash) $("#content_inload").load(location.hash.substring(1)); $("#nav a").click(function() { $("#content_inload").load(th...
stackexchange/codereview
I admit to being somewhat of a copy and paste JavaScript developer (with a strong background in other languages). I'm using the jQuery accordion, and using cookies to save the selected accordion section. I found some code which I integrated into my code. The key section is as follows. change: function (event, ui) { ...
stackexchange/codereview
I am using a detailsview to show a record from the database for editing - or for inserting a new record. When a checkbox in one of the fields is changed by the user I want to hide another field. To avoid unnecessary postbacks I want to use javascript. Here is a simplified version of what I have so far: <script type="te...
stackexchange/codereview
I am trying to write a routine that adds Contacts to my Android phone's AddressBook. I am getting the following exceptions: D/dalvikvm( 784): GC freed 2736 objects / 171696 bytes in 71ms E/IMemory ( 784): binder=0x5b5248 transaction failed fd=-2147483647, size=0, err=-2147483646 (Unknown error: 2147483646) E/IMemory ...
stackexchange/codereview
I wounder if there is some possible to know from which parent Iam coming from in the child so I can do different stuff depending on who the parent is of the activity.. This is how Iam going over to the child. But I don't know how to handle this in the child to check who is the parent. public void chooseLocation(V...
stackexchange/codereview
I've understood that blue dashes in features output means the step was skipped because something before it failed but in all of my scenario outlines I get blue dashes but also a line that says all passed. Here is my Scenario Outline. Scenario Outline: Attempt to assign a role when not authorized Given a <user_who_can...
stackexchange/codereview
I currently have a PHP CLI script using Zend Framework extensively which seems to be using a ever larger amount of memory as it runs. It loops through a large set of models retrieved from a database in batches of 1000. Calls to memory_get_usage() show that the memory usage of the script is always increasing. This is de...
stackexchange/codereview
I have an endpoint to a web service, I have a .wsdl file with the information in it, as well as a .xsd file. I have created a web reference application using the endpoint in VS. Now I want to send an xml file as a string and get some form of response from the service. HOW can I do this? I need a complete waalkthrough i...
stackexchange/codereview
I've been reading about the jQuery template plugin http://api.jquery.com/tmpl/ as a means of binding data to markup. All the examples seem to show that you define the template in a script new script tag. I'd actually prefer not to clutter my html <head> with all those script tags. Is there a better way to organize this...
stackexchange/codereview
I am working on a projection utility and have one last (more?) hurdle to clear... Here is the scenario: public class Person { public string FirstName { get; set; } public string LastName { get; set; } public int? AddressID { get; set; } public Address Address { get; set; } public string Otherpropert...
stackexchange/codereview
I tried profiling my application with OProfile recently. The data gathered is already very valuable to me, but I'm having difficulties with its precise interpretation. After running my app with oprofile set up and running, I generated the report and got: root@se7xeon:src# opreport image:test -l -t 1 Overflow stats n...
stackexchange/codereview
When looking through some code I took over, I came across this line: my @files = My::Module::DB::raw_info->search_like(customer_handle => $config->{client}, feed => $config->{site}, arrival =>"$date") I know that this returns an array from a package called My::Module::DB::raw_info. What I'm not sure of (and I am just...
stackexchange/codereview
I think I need a combo of hpricot and regex here. I need to search for 'a' tags with an 'href' attribute that starts with 'abc/', and returns the text following that until the next forward slash '/'. So, given: <a href="/abc/12345/xyz123/">One</a> <a href="/abc/67890/xyzabc/">Two</a> I need to get back: '12345' and '...
stackexchange/codereview
i am storing the connection string provided by the user at setup time to a txt file its a website by setup i mean first access of the admin to the site well its working but i need some code which can encrypt the password text and store to file so any one having access to the system can not understand the passward, also...
stackexchange/codereview
JSON serialization Python using simpleJSON How do I create an object so that we can optimize the serialization of the object I'm using simpleJSON 1,2 are fixed variables 3 is a fixed dict of category and score 4 is an array of dicts that are fixed in length (4), the array is a length specificed at run-time. The proc...
stackexchange/codereview
I am writing my code as suggested, public class A { public int id {get;set;} public string Astring {get;set;} } public class B : A { public string Bstring {get;set;} } builder.Entity<A>().MapHierarchy( u=> new { ... }).ToTable("A"); builder.Entity<B>().MapHierarchy( u=> new { ... }).ToTable("B"); ... = ...
stackexchange/codereview
I need a seed for an instance of C#'s Random class, and I read that most people use the current time's ticks counter for this. But that is a 64-bit value and the seed needs to be a 32-bit value. Now I thought that the GetHashCode() method, which returns an int, should provide a reasonably distributed value for its obje...
stackexchange/codereview
I'm diving into iOS development and I'm playing with touch events. I have a class named UIPuzzlePiece that's a subclass of UIImageView and it represents the puzzle piece objects that you can move around on the screen. My goal is to be able to move the puzzle pieces around on the screen with my finger. Currently, I ...
stackexchange/codereview
In my program I calculate very much concatenations of lists with single items (i. e. I often perform "concatenate(someList, <single-sized list containing one item>)" operations). How to make those concatenations and iterating through resultant lists as fast as possible? I have considered two implementations but may be ...
stackexchange/codereview
I have looked at the examples here on using ephem to calculate sunrise and sunset, and have that working great. I get in trouble when I try to calculate the midpoint between those two times. Here's what I have: import datetime import ephem o = ephem.Observer() o.lat, o.long, o.date = '37.0625', '-95.677068', datetime....
stackexchange/codereview
I am kind of stuck with a simple type check on a generic helper class I am writing. The idea will be clear if you take a look at the source code. It works nice for normal things, like DateTime and bool, but I got a problem with generics. How do I check for e.g. ObservableCollection < something > and count it. I do not ...
stackexchange/codereview
I have a simple C++ object that I create at the start of function F() to ensure two matched functions (OpDo, OpUndo) are called at the start and return of the F(), by using the object's constructor and destructor. However, I don't want the operation to be undone in case an exception was thrown within the body of F(). I...
stackexchange/codereview
I'm using SimpleXML to parse a YouTube search feed. I want to get the first result in the feed after searching for a term. Right now my code looks like this: set_time_limit(0); // Include needed files require_once "config.php"; $xml = simplexml_load_file('http://gdata.youtube.com/feeds/base/videos?q=V.I.P.+KE%24HA&cl...
stackexchange/codereview
I have a problem with a filter on my listview. In fact that work pretty well with an IndexAdapter, but not with a SimpleCursorAdapter. In the following example, if isCursor==false, the filter work pretty well but if it is == true, the filter does not work! By the way, the adapter work pretty well. if(isCursor){ mCu...
stackexchange/codereview
I have a presentation where the title slide has a black background so text colors have been set to white. The author names have to have superscript number corresponding to a footnote listing their institution. The footnotemark is note white. How can I make it white.
stackexchange/codereview
I have a function that takes as one of its parameters "void* buffer". In this function, I need to write to that memory location. However, doing something like *buffer = "Hello\0Hi\0"; doesn't work because I can't dereference a void* pointer. How do I put a string data into that memory location? Note that I need to cop...
stackexchange/codereview
I am trying to understand tail-recursion in Haskell. I think I understand what it is and how it works but I'd like to make sure I am not messing things up. Here is the "standard" factorial definition: factorial 1 = 1 factorial k = k * factorial (k-1) When running, for example, factorial 3, my function will call itself...
stackexchange/codereview
I'm not too familiar with Applescript, and I'm wondering if there's a way to do this... Is there a way to have iCal export each one of my calendars to a specific location? I can count the number of calendars I have in iCal and I can loop through them and want to do this task for each calendar... But, I'm not sure how t...
stackexchange/codereview
I'm trying to iterate through each column name from my results to place in the first row of my view. I'm using the execute sql way to querying the database. I've got this so far but it's not outputting what I need: <% for columns in @results %> <tr> <% @results.each do |column, value| %> <td><%= column %><...
stackexchange/codereview
The question title pretty much sums it up... I haven't been able to find any good resources that outline the pros / cons of using Phusion Passenger Standalone for Rails App Deployment. How does it compare to running Passenger Nginx or Passenger Apache? Do things like .htaccess continue to work as expected? Any insight ...
stackexchange/codereview
I'm hitting a strange error when running a query in nhibernate using linq. If I run the query in directly in mysql, everything works. If I rerun the linq query, I get no error, but only the id field (a string) is fetched. If I run the query many times, sometimes the first row is fetched correctly... The only thing my g...
stackexchange/codereview
I have a video in my application, but it's in portrait. I want to display it in landscape mode, but I don't have any idea how to do that. I used this code to make my video: - (IBAction)playMovie:(id)sender { NSString *filepath = [[NSBundle mainBundle] pathForResource:@"BAZO" ofType:@"m4v"]; NSURL *fileURL = [NS...
stackexchange/codereview
I need parse html page in c++ with libxml. I face a problem, when using some function doc = htmlParseDoc( (xmlChar*)ptr, NULL ); console notice a problem seems like parser broke on li>Now li - unpaired tag. Parser say number open tag li mismatch closed tags /li. Maybe some help what to do with this ? I presure for e...
stackexchange/codereview
How do you get code hinting/completion for chained functions in Komodo edit. I had it working in Komodo Edit 5, but I lost the ability when I upgraded to ver 6. Now it gives me code hinting for the first function, then any chained functions only give basic javascript code hinting.
stackexchange/codereview
Would someone confirm the best place for a partial view in ASP.NET MVC? My thinkings are if it's a global view that's going to be used in many places then SHARED. If it's part of a view that's been wrapped up into a partial view to make code reading easier, then it should go into the Views/Controller directory Am I cor...
stackexchange/codereview
I have two Collections in a Java class.The first collection contains previous data, the second contains updated data from the previous collection. I would like to compare the two collections but I'm not sure of the best way to implement this efficiently.Both collections will contain the same amount of items. Based the...
stackexchange/codereview
i'm trying to develop a simple multiplayer video game (2d) in C#, SDL.NET and obviously .NET. Two, or more player over internet, can control a car (class CAR) who move on the screen with X and Y. One PC is the server, others are client. So, i think "The only value to 'pass' between Players are the value of variable...
stackexchange/codereview
Hi I have 15 rows of data (user entries), each with 100 fields (answers to a survey via a radio button 1-6). Every answer from every respondent needs to be multiplied by either a factor of +1 or -1 From here I need the new positive or negative value to reside in the same table (or a new copy it doesn't really matter) Q...
stackexchange/codereview
If I had two controllers in my Pylons website that server up two different template files, what would be the best way to show the same piece of HTML on each template? For example, lets say I had a blog. The front page would show the list of recent entries and each entry would have a 'permanent link' linking to a page s...
stackexchange/codereview
I'm sure this can be answered really easily. I just do not find the intent id for this job. I want to show up that localization settings page, where the user can select "turn on localization through wifi..." Intent intent = new Intent( ??? ); startActivity(intent);
stackexchange/codereview
I have a hashtable in python of strings. So, each entry is a string. The strings could possibly start with "/" which implies they are file names. What would be a quick way to take a hashtable like this, and for each string in it that starts with a "/" verify whether the file exists? If the file does not exist, then the...
stackexchange/codereview
> map (++ "!") ["a", "b", "c"] ["a!","b!","c!"] > (++) "!" "a" "!a" These two lines don't make sense to me. When using ++ in map, it seems like the first parameter is appended to the second, but in the second list it's the other way around. How does Haskell reason about the behavior in the map function?
stackexchange/codereview
I am used to deliver DLLs that built on top of several static libraries(.lib) in the unmanaged environment. Now I need to do similar thing but most lower level libraries are already managed DLLs. For security reasons, I don't want include every functions in these managed libraries. Any suggestions?
stackexchange/codereview
This may be a school boy error, but I am trying to embed a UIAlertView after someone selects a contact property in the peoplePickerNavigationController that is NOT an address. What am I doing wrong to get a 'delegate' undeclared error! Could someone tell me conceptually why this is not working as I have made self a UIA...
stackexchange/codereview
I'm coming from C#, and recently I started to write some Ruby on Rails applications. My biggest problem with it is the documentation because I find it extremly difficult to use. For example, finding out how to call generator from my controller took me about 2 hours and then 15 minutes after that I found Rails::Generat...
stackexchange/codereview
How i can open an xml or xsl file inside the same assembly from source code in C#? Any ideas?
stackexchange/codereview
In python socketserver api, as well as xmlrpcserver, there are mentioned many times the request object,for example: SimpleXMLRPCServer.process_request(self, request, client_address): But I cannot find any description to this request object. What is it ? where in the python doc can I find the the expaination(it's attri...
stackexchange/codereview
I use BSD socket in my app to send and receive data on iphone4(iOS4.1),there are three situations in my app: app is running in foreground and screen locks, it's fine. app is running in background and screen does't lock, it's fine too(I use NSStream to send and receive data for keep app alive in background,it works fin...
stackexchange/codereview
if get an input from the user and i wanted to search the file for any results, and display the results: $searchValue = $_POST['search']; $handle = @fopen("home.txt","r"); # read line by line while (($buffer = fgets($handle, 4096)) !== false && // the condtion for the $searchValue) { echo '<tr>'; $array = e...
stackexchange/codereview
I have implemented in my app the mitigation to CSRF attacks following the informations that I have read on some blog post around the internet. In particular these post have been the driver of my implementation Best Practices for ASP.NET MVC from the ASP.NET and Web Tools Developer Content Team Anatomy of a Cross-site ...
stackexchange/codereview
Is there anyway to implement an repository that uses active directory (or any other data source than relational db) as the data source and can get entity objects that has the ability to lazy load their associations? An example: Two classes will be frequently used in various applications we are going to develop class U...
stackexchange/codereview
I am using 7zip to pack an installation (im using 7z because i need it to work in linux and windows). From what i've been reading the config.txt file can contains this: ;!@Install@!UTF-8! RunProgram="Installer.exe" ;!@InstallEnd@! But what if i need to run another exe before or after running installer.exe? Is it possi...
stackexchange/codereview
I'm trying to build a javacard webapplication with netbeans, but I'm getting a build error and don't know how to fix it: [Error] Unable to parse the class file webapplication2/WebApplication2.class. Exception while looking for class webapplication2.WebApplication2: java.io.IOException: Couldnt find: webapplication2...
stackexchange/codereview
I want to display image in image control but the image is on the different server. My application is Intranet based application. My image is stored on "C:\Project\Images\img123.jpg" and my server name is "MyServer". Can any one send me the code to display image in to the image control? I appreciate if any one help me o...
stackexchange/codereview
Can I populate a droplist in sitecore with a list of values by directly specifying them in the source field like Apples|Oranges|Grapes and have them show-up on the template instead of actually creating items for each value and then writing a query pointing to the parent?
stackexchange/codereview
OK so I gather that Interfaces are a way to enforce that an object implements a certain amount of functionality, without having to use inheritance. Kind of like a contract. And I semi see the point of them. But if all you have in the interface is: public interface animal{ void eat(object food); } and it has no ...
stackexchange/codereview
I've noticed that the latest version of IE 8.0.6001.18372 sends a duplicate http_accept, like this: IE8 image/jpeg, image/pjpeg, image/gif, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */* where image/pjpeg is dup...
stackexchange/codereview