instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have created as custom task edit browser enabled Infopath form which successfully gets open when user clicks on Edit task. But by default it opens up in the WrkTaskIP.aspx page which is available in 12 hive..Layouts folder. Now the default WrkTaskIP form provides two following options as hyperlinks 1. Delete item, a...
stackexchange/codereview
I have a problem. Quartz keeps putting its log on all my log files. Can I redirect Quart's log to a separate file? Here is my logback.xml: <configuration debug="false"> <appender name="hcmut.cse.virtuallab.request" class="ch.qos.logback.core.FileAppender"> <file>log/hcmut.cse.virtuallab.request.log</file> <en...
stackexchange/codereview
I have a application built in Silverlight, which will run on a ATOM processor (was told around 1.6GHZ). So far tested another application with lesser functions on another Mini PC and it can still run smoothly. This application will be user interactive, and will have 4-5 different pages to be displayed. So to navigate f...
stackexchange/codereview
A combo box as an item renderer for a data cell in a Flex Datagrid has been demostrated at various blogs. What if that combo box has to have an external dataprovider that has to be set at the time of converting the renderer class to a ClassFactory. Can this be done? Or is there a workaround? Thanks in advance.
stackexchange/codereview
I am using the MVCContrib grid and I would like to add some html attributes to a cell depending on the value of a column. I need something like this column.For(c => c.Type.Equals("Type A") ? "show value and add attribute" : "just show value"); I tried this but it doesn't work. It shows the value on the grid as ...
stackexchange/codereview
I'm trying to do my own bookmarklet and I already tried to read some response in SO but nothing to answer the weird reaction I got from my script. I'm doing an AJAX call from my bookmarklet, so I do the little trick : var newScript = document.createElement("script"); newScript.type = "text/javascript"; newScript.src = ...
stackexchange/codereview
I'm trying to figure out a way to read GET method information from a form with javascript. Our IT department has our servers on lockdown, and as the web team we can only use javascript to accomplish our tasks. I'd use PHP if I could, but I can't. What I need to do is read data sent via GET method in js if possible, so ...
stackexchange/codereview
I have the following regular expression in a validation rule: ^[a-zA-Z0-9',!;?~>+&\"\-@#%*.\s]{1,1000}$ However, I can enter ====== which I believe should not be allowed. My thoughts is that somehow the - could cause trouble if not properly escaped or something but this is way over my head.
stackexchange/codereview
Choosing language I see http://github.com/ and OpenBSD.org got 2 examples how to. Github has a dropdown and openbsd.org just links. Which kind of UI for this use case could you recommend? I now take the parameter hl=el for instance for greek which switches i18n internals to greek or other language and present available...
stackexchange/codereview
I'm trying to get MailItem.To .CC and .From and from what I've read it's supposed to be a semicolon delimited string. I'm looking for "john@x.com;jane@x.com" but i'm getting back "John Smith;Jane Smith" which is funny because the outlook address book does not contain any contacts so the name is coming from the john sm...
stackexchange/codereview
I have a package X.pm with a method data_x(); I use instances of class X as keys of a hash %seen, say. Now the elements of keys %seen seem to have forgotten their blessing: use X; my( $x, $y, %seen ); $x = X->new(); $x->data_x( 1 ); print " x: ", $x, "\n"; print " x.data: ", $x->data_x(), "\n"; $seen{ $x } = 1...
stackexchange/codereview
I have a piece of code similar to this: //Foo.h OBJC_EXPORT MyObject *const myObj; // Foo.m MyObject *const myObj; @implementation Foo +(void) initialize { if (self = [Graph class]) { myObj = [Config get:@"Foo"]; // <--- ERROR! assignment of read-only variable 'Foo' // .... } } // ....
stackexchange/codereview
I have seen this code in most of the time. Here there are two variable names defined and in the implementation it synthesizing by assigning. Whats the purpose of doing some thing like this? Like keeping 2 separate variable names. Is this sort of a convention? Test.h @interface Test { id<something> _variable1; } @pro...
stackexchange/codereview
I know there is the SecureString class, but for most scenarios I don't think it's really useful. For example, let's say I have a client/server system. The server doesn't need an application made by me, it could be even SQL Server without integrated authentication. When the user enters his password on a form in the clie...
stackexchange/codereview
I have got a statement in my code: #if DEBUG==0 this works fine in gnu g++ but it fails in VC++. Can anyone explain what is wrong with this. I have already read msdn help on this topic. so, if debug is defined as 1 then this is false i.e.0, so it should work and similarly if debug=0 Can anyone suggest how to correct ...
stackexchange/codereview
I have to convert a lot of legacy SQL queries to stored procs (rewriting and tidying) and I'm looking for an efficient way to compare the results one by one to ensure I haven't modified the behaviour. I currently use SQLDelta but it requires me to pipe the results of each query into tables and transfer one to a separa...
stackexchange/codereview
Is it possible to create an add a custom menu to the main menu bar in Visual Studio within an Add-In? I want the Add-In to create a company specific menu if it does not already exist and then add its own specific command to that menu. That way if multiple Add-Ins are supplied then they can all add the commands to the s...
stackexchange/codereview
Other then Oracle, MySQL, and PostgreSQL, what is out there? Is there anything else used in a production environment? By production I mean it's used to support an active project or application and not an unstable system. I'm curious about other database systems (aside from NoSQL) that are applicable for use. Looking a...
stackexchange/codereview
We set a URL to view log file (.txt) file for our client. Some of our log file gave error with IE but works fine with chrome and firefox. here is what we wrote in text file 2010-10-15 08:34:18,867 [1] DEBUG - UserHostAddress 198.96.178.33 UserHostName 198.96.178.33 UserAgent Jakarta Commons-HttpClient/3.0.1 10/15/2...
stackexchange/codereview
I have an array of objects (Users) each user has an nsset named "devices" Is it possible to filter so the array returns all users who have a device with a specific name. NSPredicate *predicate = [NSPredicate predicateWithFormat:@"devices.category==%@", @"mobile"]; myArray = [allUsersArray filteredArrayUsingPredicate:pr...
stackexchange/codereview
I have a UTF-8 byte array of data. I would like to search for a specific string in the array of bytes in C#. byte[] dataArray = (some UTF-8 byte array of data); string searchString = "Hello"; How do I find the first occurrence of the word "Hello" in the array dataArray and return an index location where the string begi...
stackexchange/codereview
everything is the title java tutorial says: OuterClass.InnerClass innerObject = outerObject.new InnerClass(); this doesn't work for me: public class aching{ class pixel{ public char c; public int f; } public static void main(String[] args){ aching a = new aching(); aching.p...
stackexchange/codereview
I have a standard web server that serve web pages. I want to monitor traffic on port 80, intercept every http responses, and add/inject an additionnal header to them. The process will then act like a proxy between the web server and the client. Could you please give me some pointers? I'm already aware of SharpPCap, but...
stackexchange/codereview
I have a vertical left menu in my asp.net page. using jquery .load,i try to load other aspx page in the midlle div(content div) depending on the link click.Like this: $('#LeftMenu1_HyperLink1').live("click", function(event) { event.preventDefault(); $("#ContentDiv").load("mypage.aspx"...
stackexchange/codereview
I have the following line in my code, inside the click event handler of an ImageButton: Protected Sub FinaliseBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles FinaliseBtn.Click, SubmitPaymentViaChequeBtn.Click Dim str as String = sender.commandargument.ToString.ToLower End Sub Both Controls ar...
stackexchange/codereview
im having hardtime in memset and memcpy. can somebody trasnlate this for me, or suggestion on how this thing work? do{ memset(szSpeechBuf, 0x0, sizeof(char)*QSIZE); if((nBufIter+1)*QSIZE > nRawBufLen) { diff = nRawBufLen - (nBufIter)*QSIZE; if(diff < 0) { printf("DetectSpeech() erro...
stackexchange/codereview
I know there some object has nil? method, I want to know is there some method with nil?
stackexchange/codereview
I've recently learned OOP in PHP,.. and I though I'd try to write a class in PHP that generates tags for forms i.e. something that lets you generate forms. Its probably been done a billion times before/ or isn't a very good idea. I'm just doing it as an exercise. Anyway, how would I go about planning this? $form = new...
stackexchange/codereview
I dont't want to use any framework, but I need a Frontcontroller, Where I can get HELP?
stackexchange/codereview
How do I read and store the values of two page field values to an INI file? I created two key pairs at the INI section using ISTool. Now how do I link this up? The INI Section looks like this: [INI] Filename: {app}\prefs.ini; Section: AUTH; Key: USERNAME; String: Filename: {app}\prefs.ini; Section: AUTH; Key: PASSWO...
stackexchange/codereview
Ok, so you know when you're answering a question and are in the middle of typing it, and someone else posts an answer to your question and you get a little popup that says there is a new answer to the question? My question is how do you do that? I think I have the basic concept down... A question is answered, added to ...
stackexchange/codereview
Okay, so we have to store our clients` private medical records online and also the web site will have a lot of requests, so we have to use some scaling solutions. We can have our own share of a datacenter and run something like Zend Server Cluster Manager on it, but services like Amazon EC2 look a lot easier to manage,...
stackexchange/codereview
I know that Floyd–Steinberg dithering algorithm can't be implemented with pixel shader, because that algorithm is strictly sequential. But maybe there exist some higly parallel dithering algorithm which by it's visual output is similar to Floyd-Steinberg algorithm ? So the question is - What are dithering algorithms wh...
stackexchange/codereview
I want to create a simple search engine for learning purpose. I want to know how to index a simple blog site. A blog site has many pages and in every page there is a blogpost. But in every page there are other stuff in common as well ( header, footer, category block and other stuff ). In your opinion, How can I index t...
stackexchange/codereview
Using Notepad++ 5.7 I was modifying a .css file, when I blocked/selected a rule and accidentally pressed a key in combination with alt or ctrl and other keys in the lower left-hand side of the keyboard...not sure which keys. Moving on, a list of CSS values came up such as :first-letter a few hundred more. What key comm...
stackexchange/codereview
There's the code: HebrewCalendar Heb = new HebrewCalendar(); DateTime tmp = new DateTime(1964,2,3); MessageBox.Show(Heb.GetDayOfYear(tmp)); it's very basic and simple, but yet - i get an errors: Error 1 The best overloaded method match for System.Windows.Forms.MessageBox.Show(string)' has some invalid arguments.....
stackexchange/codereview
I have two tables: persons - person_id - fullname students - student_id _ person_id - father_id - mother_id In students table the last three columns store ids from persons table. What SELECT could retrieve the following data: - student name - father name - mother name We assume no WHERE, ORDER BY, or LIMIT for simpl...
stackexchange/codereview
I'm trying to get the hang of clojure in a selenium2/webdriver project using the webdriver-clj wrapper for webdriver. However, since the webinterface is heavily scripted, I need to have an option to wait until certain elements are created by the script, instead of on page load. So I was trying to create a wait-for func...
stackexchange/codereview
I've set up my htaccess this way to block hotlinking: RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mydomain\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(bmp|dtd|flv|jpeg|jpg|gif|png|psd|swf|tif|txt|mov|mpeg|mp3|xml)$ - [F,NC,L] The problem is that it works perfectly fine via HTML (such as <img> tags) but...
stackexchange/codereview
hey guys, i hope there are a few wordpress experts out there that can help me with ths. i'm using: the_post_thumbnail('medium'); to view a post-thumbnail that can be set for every post in the backend. however, if there is no postthumbnail set i want to print out a different image. any idea how i can check the function...
stackexchange/codereview
the jboss server does not work if redirect to HTTPS url(port 8443), and here is WAR package web.xml configuration: <security-constraint> <web-resource-collection> <web-resource-name>HtmlAdaptor</web-resource-name> <description>Security for all users</description> <url-pattern>/all/*</url-pattern> <http-...
stackexchange/codereview
I'm fetching the contents of a Windows-1251 encoded web site using file_get_html and want to serve it as UTF-8. I set the headers to UTF-8 using: header('Content-type: text/html; charset=UTF-8'); Then i output the data using iconv("cp1252","UTF-8",'"desc":"'.$desc); The output is no longer strange questions marks, but ...
stackexchange/codereview
I am doing validations in registration page.My requirement is if ValidationSummary error message is generated i,e,ValidationSummary is become true then i have to display that ValidationSummary message in that div element.If error is not generated then that div element is not visible. So i have to check whether Validati...
stackexchange/codereview
Is the concept of a strict modularity provided by OSGi frameworks in Java, available in any other programming language? I felt the concept of friend classes in C++ is somewhat similar, but it seems to be a much more granular control. I'm not sure if the friend concept can be applied at a namespace level. In other lan...
stackexchange/codereview
I have a table, representing a calendar, that can expand and collapse table rows. <tr class="parent" id="month1"> <th class="subheader">Januari</th> <th></th><th></th> </tr> <tr class="row child-month1" id="day-1"> <td class="date"> 1 januari 2010</td> <td>Bedrag </td> <td>-817.0 </td> </tr>...
stackexchange/codereview
I have this tab bar application, I have 1 tab setup correctly with a drill down navigation/table view controller which display information and details of Entity A ; And now I want to create a new tab which display another set of drill down and displaying information of Entity B which both entity has no relations. I...
stackexchange/codereview
I have an array containing dictionaries, and I want to show the values in a table view according to the "name" field in each dictionary. Suppose the name starts with "a"; then "b" and "c" are in different sections. The number of sections corresponds to the "name" field of the dictionaries. How do I get the number of ro...
stackexchange/codereview
How Gmail shows this alert "Exit this page? Your draft has Been modified. Your draft has Been modified. Click OK to continue or Cancel to stay on the current page." when you are writing a email and you try to close the browser tab?
stackexchange/codereview
I am beginning to learn Maven and ran into a problem when I am trying to compile the test source code in a maven project. My main java source code is dependent on a jar file so I have a dependency declared in my pom file as following: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/...
stackexchange/codereview
As part of my work, I often have to visualize complex 3 dimensional densities. One program suite that I work with outputs the radial component of the densities as a set of 781 points on a logarithmic grid, ri = (Rmax/Rstep)^((i-1)/(pts-1), times a spherical harmonic. For low symmetry systems, the number of spherical ...
stackexchange/codereview
Okay, final question and I'll have finished my number guessing game in Common Lisp! :D Whenever the game starts (or a new game begins after the first game), the following function is called. ;;; Play the game (defun play () ;; If it's their first time playing this session, ;; make sure to greet the user. (u...
stackexchange/codereview
I am using Apache Chainsaw with python (using the XMLLayout formatter, sending log messages to Chainsaw) How can I make Chainsaw display multiple log tabs, one for each logging source ? currently it displays all messages, regardless of which process sent them, to a single tab
stackexchange/codereview
I have seen some write about making a UIWebView editable. I would like to be able to compose a message containing both text and images the WYSIWYG way, and I thought that I might do it with a UIWebView. Is this a good solution and how do I do this? I have searched the web for examples, but found none. Thank you
stackexchange/codereview
In a derived class I have a function called evaluate() (it's a virtual in the base class). In this derived class i also have a function set_value() and hence i want get_value() as well. get_value() should return the exact same thing as evaluate() Is there anyway to say that a call to get_value is a call to evaluate()? ...
stackexchange/codereview
I have this array: array[0] = 18; array[1] = -10; array[2] = 2; array[3] = 4; array[4] = 6; array[5] = -12; array[6] = -8; array[7] = -6; array[8] = 4; array[9] = 13; how do I sort the array in asc/desc mode in C++?
stackexchange/codereview
How do you add a image to a tab label on a tab control? Just like this: But on a normal tab page like this: I understand to do this you need to a add a Imagelist and make a index of the images to be used but I haven't found any examples searching on google. Any help?
stackexchange/codereview
#include "ffmpeg/libavcodec/avcodec.h" #include "ffmpeg/libavformat/avformat.h" #include "ffmpeg/libswscale/swscale.h" #include "ffmpeg/libswscale/rgb2rgb.h" #include "ffmpeg/libswscale/swscale_internal.h" #include <stdio.h> #ifdef __MINGW32__ #undef main /* Prevents SDL from overriding main() */ #endif #include "...
stackexchange/codereview
I am using wordpress 3.01, and would like to list a number of child categories within a parent in this format. Without links. { 'cat1' , 'cat2' } Is this possible? http://codex.wordpress.org/Template_Tags/wp_list_categories this call seems like the right one, but I can't figure out how to list them without turning off ...
stackexchange/codereview
How can i make JS select every LI element inside a UL tag and put them into an array? <div id="navbar"> <ul> <li id="navbar-One">One</li> <li id="navbar-Two">Two</li> <li id="navbar-Three">Three</li> <li id="navbar-Four">Four</li> <li id="navbar-Five">Five</li> </ul> </di...
stackexchange/codereview
I wrote a code in C/C++ which forks a child process, duplicates the stdin/stdout into a pipe ends and calls execvp. Everything is working fine (i.e. the output from stdin/err/out is captured by the parent process) The problem is that the child stdout is buffered. so if the child code looks like this: printf("Enter any ...
stackexchange/codereview
I'm trying to write a templated user control that get's as a template the js code from the user, And minifies it on the fly (OnInit), and actually prints the minified JS. That means that I need a code that receives a string, and returns a string. All I found untill know are programs that uses the input \ output from th...
stackexchange/codereview
i wonder if it's possible to view my local test-environment set up with mamp on my iphone? e.g. i'm using mamp-pro and i set up a domain http://mydomain.com which shows /htdocs/mydomain.com in my browser. is there an easy way to view that page on my iphone as well. my iphone is in the same network - just my home netwo...
stackexchange/codereview
Well, the question pretty much summarises it. My db activity is very update intensive, and I want to programmatically issue a Vacuum Analyze. However I get an error that says that the query cannot be executed within a transaction. Is there some other way to do it?
stackexchange/codereview
Hi my VS is rendering my ASP.NET pages twice in the default IE browser when I press "View in browser" or "Start without debugging" button. This really puzzleds me.
stackexchange/codereview
As I am studying decorators, I noticed something strange : def f(): ... msg='aa' ... def a(): ... print msg ... msg='bb' ... def b(): ... print msg ... return a,b ... >>> a,b = f() >>> a() bb >>> b() bb >>> Why a() returns 'bb' and not 'aa' ??
stackexchange/codereview
Im an emacs newbie, I want emacs to be able to indent my code like this egg = spam.foooooo('vivivivivivivivivi')\ .foooooo('emacs', 'emacs', 'emacs', 'emacs') It's not possible to do this automatically by default (without manually inserting spaces or C-c >), since emacs always indents 4 spaces (unless Im spl...
stackexchange/codereview
So I'm attempting to read a file in an Eclipse Java project. The resource itself is in a linked folder that I've added using: New -> Folder. Advanced >> Link folder etc. I couldn't open the file so I wrote a simple method to find out what I could access: public static void main(String[] args) { File folder = new ...
stackexchange/codereview
I'm creating a web form that requires an user to upload a file in doc, docx or pdf format. On submit, the form gets posted to an email address along with the attached file. I have successfully implemented the posting of the form to the email address but don't know how to attach the file with it. Please help. public voi...
stackexchange/codereview
I am doing some server side coding with JavaScript (node.js) and I would like to write valid xml. I found two libs, but I am sure there are more/better!? http://goessner.net/download/prj/jsonxml/ (LGPL) not yet released: https://sourceforge.net/projects/jsonix (LGPL) Requirements: open source (for commercial usage) W...
stackexchange/codereview
I'm trying to figure out why this works: $joe = "hey joe"; $something = "joe"; print_r(${$something}); But this doesn't: $joe["where_you_going"] = "hey joe"; $something = "joe[where_you_going]"; print_r(${$something}); Why is this? Is there a way to do what I attempted in the second example?
stackexchange/codereview
I'm using the DebugKit component in my project but I want to turn it on only on the staging server and have it not load when running from the production server. I know I can turn it off with the debug config value but I want to keep that value at 1 for both servers. I tried conditionally defining a contstant 'DEBUG_KIT...
stackexchange/codereview
Hi I am using CTaskDialog class in my MFC application. I am trying to customize it. In this if i want to add hyperlinks, as of now there is no specific provision for this. But to add the buttons we can use "AddCommandControl" and can handle the button. If I want to implement similar to this AddHyperlinkControl and want...
stackexchange/codereview
I'd like to use a grid framework (e.g. blueprint/960.gs/...) with LESS(.js) but it looks there's some issues when you decide to go that way: For example with blueprint: The ie hacks stylesheet prevents to use the container/span-X classes as mixins given that the mixed-in classes will not appear in the html elements. f...
stackexchange/codereview
I started using eclipse CDT over Linux for some college exercises. I want the build function to compile without linking? Can i have the build to be as simple as: gcc -c -Wall ? Thanks
stackexchange/codereview
I'm using Core Data + sqlite as a data cache. The app reads in a file into core data, then uses Core Data to run the app. Saves are done to both the NSManagedObjectContext and to the file. I've noticed, though, if I quit the app and reload it without repopulating the Core Data database, some (but not all) of the data s...
stackexchange/codereview
So I have an application that needs to get a date focus so it can run appropriately. Given a particular date to focus on it needs to know what week it is in. I'm calculating weeks based on Monday dates. And I'm wondering if my focus on Mondays is excessive. public static DateTime PreviousMonday(this DateTime dt) { ...
stackexchange/codereview
I have a working snippet to use for a regular tree comprising nodes. Now I just need to fiddle with it to work for 2-3-4 trees, which should be easier, since each path is the same distance, since it's balanced, right? Methods I have at my disposal include getNextChild(), split(), and of course insert(). public int heig...
stackexchange/codereview
First of all apologies if this is a duplicate but I'm browsing via my mobile and am having problems searching. I'm new to android development and would like to know how to access the gmail contacts rather than phone contacts, I've followed a couple of tutorials and can list the contacts that are stored on the phone but...
stackexchange/codereview
i am using oscommerce for my client. i have integrate authorize.net payment module for payment using credit card. when i am checkout and confirm payment after enter credit card detail.. page is time out and give the following error. An error occurred while trying to report this transaction to the merchant. An e-mail ha...
stackexchange/codereview
This is purely a conceptual and design idea related to EF4. The example/scenario is a large ERP or CRM type system where companies may need to add traditional "user defined fields" to capture additional data. I know that the EF has some capabilities to push out the model to a database at run-time but the question reall...
stackexchange/codereview
Say I have this code in PHP : $query = mysql_query("SELECT ..."); the statement returns a resource object. Normally it would get passed to mysql_fetch_array() or one of the mysql_fetch_* functions to populate the data set. I'm wondering if the resouce object - the $query variable in this case can be cached in memcac...
stackexchange/codereview
I'm building a rather large filter based on an SearchObject that has 50+ fields that can be searched. Rather than building my where clause for each one of these individually I thought I'd use some slight of hand and try building custom attribute suppling the necessary information and then using reflection to build out ...
stackexchange/codereview
I have a task to optimize this query, any idea will be appreciated. SELECT DISTINCT `br`.`id` AS `branch_id` , `br`.`store_id` , `br`.`longitude` , `br`.`latitude` , `br`.`town_id` , `br`.`post_region` , `cb`.`cat0_id` , `cb`.`cat1_id` , `cb`.`cat2_id` , `...
stackexchange/codereview
I have always made my authentication codes by checking if the MD5 + salt of the pass provided by the user in the form was the same as the one stored in the DB, and if it was, i saved a session variable called "status", equal to 1. The, he was logged. I'm pretty sure this is wrong and insecure, but i never seen any oth...
stackexchange/codereview
In Solr, if we have a field in the schema with stored="true", and we change the analyzer associated with that field, is it possible to update just this field without reindexing all the documents? Could this be done using the "stored" values of the field with the new analyzer without going back to the original data sour...
stackexchange/codereview
I want to parse a websites news section. It has a RSS subscribe button but the outlook looks odd and I'm not sure how to parse it. http://www.networkroi.co.uk/DesktopModules/ArticleManager/ArticleRss.aspx?id=324&pid=0 It's not in XML which would have been a lot easier. Here is the news page with that link on it - http...
stackexchange/codereview
I have a large list of lists like: X = [['a','b','c','d','e','f'],['c','f','r'],['r','h','l','m'],['v'],['g','j']] each inner list is a sentence and the members of these lists are actually the word of this sentences.I want to write this list in a file such that each sentence(inner list) is in a separate line in the fi...
stackexchange/codereview
Let me start by saying I have never really worked with bits before in programming. I have an object that can be in 3 states and I want to represent those states using a 3 bit array. For example: I have a race car and it can go forward,left, and right at a stand still the bits would be 000 If the car was moving forwar...
stackexchange/codereview
Here is my JS: <script type="text/javascript"> function display(action, id) { if (action == 'show') { document.getElementById("explanation"+id).style.display = "block"; document.getElementById("link"+id).href= "javascript:display('hide', "+id+")"; document.getElementById("link"+id).innerHTML = "Close"; } if ...
stackexchange/codereview
Well, I would like to know if it's possible to detect by HTTP headers if request comes from <img tag. I assume that when request is called from <img tag, I'll not have */* header in HTTP_ACCEPT or I'm missing something. Regards EDIT: I've tried with few browser but i can't conclude nothing by HTTP_ACCEPT...
stackexchange/codereview
could someone help me out? I have done a straight forward MySQL query from a database to return all products. I have used the productGroupDesc to tell me which company and category they belong to. A typical entry looks like Company - Category So what im trying to do is categorise the products by first finding which co...
stackexchange/codereview
I have this in my shop.rb: def geocode_address if !address_geo.blank? geo=Geokit::Geocoders::MultiGeocoder.geocode(address_geo) errors.add(:address, "Could not Geocode address") if !geo.success self.lat, self.lng = geo.lat,geo.lng if geo.success end end # Checks whether this object has been geocoded or...
stackexchange/codereview
I have used get_next_by_FOO inside my view to display an absolute url for the following item within a set of records however when it gets to the end of the query set an error is raised. how do I stop my view from raising this error and instead just outputting some html letting me know that it has come to the end of the...
stackexchange/codereview
The context: I am working on an app that maintains a list of contacts along with their record IDs for it's own reference. When the user needs to change the number associated with a specific contact within the app, I am trying to display the ABPersonViewController so the user can choose the new number from the contact ...
stackexchange/codereview
Imagine we have 2 services: Product and Order. Based on my understanding of SOA, I know that each service can have its own data store (a separate database, or a group of tables in the same database). But no Service is allowed to touch the data store of another Service directly. Now, imagine we have stored the product ...
stackexchange/codereview
I have a Joomla controller that iterates a number of times over some Google Checkout XML code. What I want is during this iteration, POST data to another page - in the same site. so com_mycomponent/controllers/checkout_iterator.php //breaks up the xml into small parts and posts then to the executor, one at a time com...
stackexchange/codereview
I am working with Visual studio 2008. I want to work on WPF DataGrid control. I downloaded WPF toolkit and install it, and then added toolkit reference in my project, but it does not recognize Datagrid control, and does not show it in Toolbox, I even try to add it in toolbox through choose Item.. but when I click WPFT...
stackexchange/codereview
$from = $_SERVER['REQUEST_URI']; echo /marketing/clients.php?action=sendbook&issue=29 How to get clients.php?action=sendbook&issue=29 only? Thank you!
stackexchange/codereview
Please tell me what is the process of the provisional profile choose in our application when we create device build
stackexchange/codereview
I am designing a new server which needs to support thousands of UDP connections (somewhere around 100,000 sessions). Can someone explain select vs poll vs epoll? It will help me know which one to use.
stackexchange/codereview