text
stringlengths
8
267k
meta
dict
Q: Login failed when using custom Grails Spring Security filter I am using Grails with the Spring Security plugin. I have crafted a custom filter, authentication provider, and token and registered them as beans and into filter chain: SpringSecurityUtils.clientRegisterFilter('myFilter',SecurityFilterPosition.SECURITY_CO...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Right div fix width, left div extend to max width? I have two divs in the same line, div_left, div_right I'd like div_right have the fixed width 200px, and left_div extend to the max width and height of the left page, how could I write this with css? A: html: <div class="right"></div> <div class="left"></div> css:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create curvy corner for a HTML table ? *That should be compatible in IE6* I've a HTML table, i want to make its corners as curvy corners. I've tried but its working only in ff, chrome but not in IE6. I want it to be compatible in different versions of IE. Somebody please tell me how to make it compatible in I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android build configurations for multiple customers I have Android application that needs to be delivered to multiple customers. For every customer I have different graphics and configuration XML files which specify features and URLs. At build time we should be able to specify the customer for which the application...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Error in while running the android app I got the following error in my emulator while running the my android app. The application "myapplication name" on a phone(process com.dummies.android.myappname) has stopped unexpectly. Please try agaign please help me how to solve this error. A: This error is not helpful ( ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: "Invalid use of 'this' in non-member function" in objective-c context? Using Xcode. In this code (func is declared in interface), tells subj error, standing on string with 'self'. + (void) run: (Action) action after: (int) seconds { [self run:action after:seconds repeat:NO]; } What the... ? A: self is an inst...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Array initialization and method count increase ? What's the secret? This Question may be weird or i am plain dumb. >> Array.methods.count => 97 >> a = Array.new.methods => 167 What causes the increase in number of methods after an array has been initialized and assigned. A: You are counting two things: class-metho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RPM : How to get Requires(post) list Have generated rpm package with the spec file, where used Requires(post) to specify the required tools for the post installation section. So how to get the list of Requires(post) tools list from a rpm package ? rpm -qp --whatrequires .rpm - does not list any tools A: You are mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to exclude some values in sorting with MySQL? I have a table like this: id products_name sort 1 abc 0 2 xyz 1 3 pqr 2 4 qwe 0 I want to sort records through the sort column and in ascending order, but I don't want the rows with 0 at the top in the result set. The...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Variable substitution in bash I've recently discovered notify-send, which opens up a notification window, so I can do things like: compile && notify-send "Done!" || notify-send "Failed" This made me thing that maybe I want to create a variable: export NS="&& notify-send \"Done!\" || notify-send \"Failed\"" and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Git cli: get user info from username Is there a way to get the name of the user, given only their username? Something like this output git show <username> (I know this doesn't work) username: username name: First Last email: email@address I know I can do this with a GitHub api call, but would prefer to keep it with...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "104" }
Q: MFC C++: how can I lock a file to be used only in my process? I'd like to lock a couple of files to be only used by my process, denying any other application access to these files while my program is running. Of course I know that I can get exclusive access to a file using Createfile, but my application works differ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: HTML Form submission with javascript confirm delays on Google Chrome I realized that there's some delay on form submission with javascript confirmation on Google Chrome during my development. So I tried test with small html page to make sure whether the delay is caused by my application. But it still happening in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Image is chopping off while using SVG converter The image is chopping off when i am trying to convert svg file to png image using org.apache.batik.apps.rasterizer.SVGConverter. The java code is mentioned below. SVGConverter svgConverter = new SVGConverter(); svgConverter.setDestinationType(DestinationType.PNG); svgC...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to build an android project depending on another project I try to build an android project depending on OpenCV. But got cannot find symbol [javac] symbol : class utils [javac] location: package org.opencv [javac] Mat imagePointsMat = org.opencv.utils.vector_Point_to_Mat(im it looks like, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Complex SQL statement feasibility I am currently developing a database system for a school that will work with our booking system so students can book their courses and we can better track their activity. Right now I am faced with a complex issue, what I want to do is check which student contracts are valid, I can d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: google map with route in blackberry how to use google map with route in blackberry . i tried blackberry map with route but in my device (Storm 2) cant display map . i dont know what is the issue ? any one have idea ragarding google map in blackberry application than let me know. i tried this http://maps.google.com...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android MediaPlayer release(); error I have 2 activities and a static mediaplayer in my first activity I prepare and start the media player and jump to other activity. In the second activity I can pause and play this media player when I press back button on the second activity it goes to the first activity and than ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android screenshot - How to? Is there any neat way of accessing screenshot of android device programatically. I am looking for some 15-20fps. I found one code android\generic\frameworks\base\services\surfaceflinger\tests\screencap\scr eencap.cpp, i built the executable and put it in /data and changed the mode 77...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why does 'git checkout' work only for some branches? Here is the result of two checkouts: why the second is failing? 'git status' shows some files have been modified, but I am sure I haven't touched those files. praveensripati@MyMini:~/Hadoop/Git/hadoop-common$ git checkout branch-0.21 Switched to branch 'branch-0...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: html Text editor not displayed in ajax form I am using a Text Editor which will be displayed in a add form.I am loading the form through ajax.When i click the add button the add form will loaded in ajax.Now the problem is my HTML Text editors script files are not getting loaded in my ajax form.Simple text area alon...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: when I do order on a counter_cache it returns nil objects first? I have owns_count counter_cache on my items model. When i do Items.order("owns_cache DESC") , it returns me objects that are nil before other results. If I do "owns_cache ASC" , it is correct. What should I be doing? A: How NULLs get ordered depe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: retaining the time zone in NSDateFormatter I have to set a format string for a DateFormatter to convert a NSString to a NSDate. The string is in the format: 2011-01-31 12:45:00 +0200 (y-m-d h:m:s timezone) I'm using the format: @"yyyy'-'MM'-'dd' 'HH':'mm':'ss' 'Z" , but the timezone is converted to +0000 and the hou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Javascript - insert image tag at the position of the cursor in the textarea I know there are a few posts with the similar title, but they don't seem to refer to the same question. I'm trying to put the image tag at the position of the cursor inside of the specific textarea from withing the popup instantiated by the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Invokes and Delegates in C# Can someone explain the syntax in this block of code? Invoke((MethodInvoker) ( () => { checkedListBox1.Items.RemoveAt(i); checkedListBox1.Items.Insert(i, temp); checkedListBox1.Update(); } ) ); I'm using a backgroundwor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is a day always 86,400 epoch seconds long? While reviewing my past answers, I noticed I'd proposed code such as this: import time def dates_between(start, end): # muck around between the 9k+ time representation systems in Python # now start and end are seconds since epoch # return [start, start + 86400, star...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: Parallel Reduction in CUDA for calculating primes I have a code to calculate primes which I have parallelized using OpenMP: #pragma omp parallel for private(i,j) reduction(+:pcount) schedule(dynamic) for (i = sqrt_limit+1; i < limit; i++) { check = 1; for (j = 2; j <= sqrt_limit; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: didSelectRowAtIndexPath throws exception This is probably some simple mistake, I just can't seem to find it in my code. When ever I click a cell in my tableview I get an exception This is my interface: @interface MenuViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> @end I don't use XI...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to test if a connection to a Db is established successfully? I want to write a unit-test which asserts a connection string is valid so that a conenction is established to a SQL Db. if I have : string connectionString = GetCOnenctionString(); bool conenctionEstablished = false; How can I set 'conenctionEstablish...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Oracle not available error After a long struggle of installing any Oracle XE on my windows XP I gave up and decided to create my database manually. The setup file provided by Oracle skips fast the Creation of Database services phase and completes. But OracleXEService does not get installed. I've set evrything up, th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Solr : file entity processor and delta import I'm using solr 3.3 and i want to use delta import with file entity processor and tika entity processor. Full import works fine but the delta import parameter doesn't import the new documents. Thanks A: Changing following values in the data-config.xml will solved the pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Detecting a small curve Suppose you have a contour made of lines, arcs, etc. It can be of any size from 1e-6 to 1e+6. How can I detect tiny useless curves inside it? At the moment we are taking the diagonal of the contour bounding rect * 1e-9 and for very distorted contours (where width is for example many times big...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the best ways to show live data in Silverlight? I'm using a stream engine that updates my database every second with significant set of data. A: I would suggest looking into using a WCF Duplex Service. I found several articles about implementing it searching for "Silverlight WCF Duplex Service." You should...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: is request.getRequestDispatcher.forward() asynchronous? When I called one servlet from another inside single if statement I was shocked, that even if my forwarding method was called the flow didnt stopped and next methods were invoked (I had to put them into else statement to stop this). How come? Does this mean tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Embed Firefox/Gecko in WPF/C# I want to embed the current Gecko in my WPF-Project. I know there is the possibility with the Winforms-Host and the Skybound-Gecko-Library. But I do not use the standard wpf-theme for my application. It is another and the scrollbar of the control will not be styled. Furthermore, this i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Why does this CSS cause Firefox to hang/crash? The following CSS background-size and gradient, when applied to large divs, causes Firefox to hang/crash. Rendering gradients can be pretty intensive, but does anyone know why Firefox flat out crashes while Webkit handles similar CSS without failing? background-size: 4p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: no-scalable broken when hit inputbox in iphone web page I have disabled the touchstart and touchmove event to prevent the viewport to change. And also set 'width=device-width,user-scalable=no'. But when hit the inputbox, the viewport changed and the web page position changed. How to disable the viewport changing whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java Compile Error, cannot find symbol Getting the error "Cannot Fin Symbol", but I don't know what I am doing wrong. import java.util.Scanner; public class Exercise6_1{ public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.print("Enter number of students: "...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Doubt in Java interface implements interface Device { public void doIt(); } public class Electronic implements Device { public void doIt() { } } abstract class Phone1 extends Electronic { } abstract class Phone2 extends Electronic { public void doIt(int x) { } } class Phone3 extends Electroni...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to add custom margins and control their shape using css? I am trying to style h1 using following image... Currently my code as following... h1{ background:#add2cb; padding:15px 20px; color:#387475; font-size:16px; font-weight:bold; } But i want yours help to add left and right bottom curve using cs...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way to write an int array (image data) to file I have a large int array containing image data in the format ARGB (alpha, R, G and B channels, 1 byte each). I want to save it to file in onPause() to be able to reload it when the app is restarted. What do you think is the best way to do that? I found ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make a common id for more then one row i have a table in my database given like bellow Requestid(primary key,identity) studentid reqid 1 1 bc1 2 1 bc1 3 2 bc2 I want to g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Test if an element is focused using Selenium Webdriver I'm really surprised I can't find references on the internet to testing for element focus using Selenium Webdriver. I'm wanting to check when when a form submission is attempted with a mandatory field missed, focus is moved to the empty field. But I cannot see ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: celery get tasks count I am using python celery+rabbitmq. I can't find a way to get task count in some queue. Some thing like this: celery.queue('myqueue').count() Is it posible to get tasks count from certaint queue? One solution is to run external command from my python scrpit: "rabbitmqctl list_queues -p my_vho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Twitter Bootstrap.js Tabs says "ReferenceError: Can't find variable: $" I am new to JS and find the whole paradigm quite confusing. In trying to implement Twitter's Bootstrap.js library, I have tried to follow their instructions but have had absolutely no luck. Basically, I want to use the tabs plugin. This is exact...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to test Unicode "non-chars" (lsep, rsep etc.)? Is there an application or a utility for generating non-characters, such as U-2028 and U-2029 (line separators)? A: My preferred method is to type into a browser address bar eg: javascript:'A\u2028B\u2029C' and then copy and paste them from the page. If you really...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can a square root of a non-integer become an integer due to floating point rounding errors? In another unrelated Internet forum a question was asked on how to check if a square root of a given number is an integer. Now in and of itself that is a trivial homework question, but I started to wonder if the naïve approac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Fluent nHibernate QueryOver SQL 'CASE' equivalent Basically what I want to do is to write this piece of SQL: SELECT CASE WHEN t.type = 'a' THEN t.name ELSE t.otherName END as "Name" FROM myTable t in QueryOver A: maybe there is some nicer syntax possible, but this should do var resu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: CheckBoxList ASP.Net MVC 3 from database assumed that i have Roles table like this : tb_role RoleId Role_Name 1 SalesCreate 2 SalesEdit 3 AgentCreate 4 AgentEdit i want to list role for Sales in checkbox (SalesCreate and SalesEdit, so its only have 2 checboxes). I made my tb_role using aspn...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Encrypted SQL database? I'm looking for encrypted SQL database, I'm going to install it on client's machines, and I don't want client to database directly. I know this is not 100% secure, and I'm not interested in SQL Server, SQLite or Oracle. If you know any solutions of this kind please let me know. Thanks. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: int(11) vs. int(anything else) I'm new to web programming and doing different tutorials that I can find on the net. I did my research and found out that in int(11), 11 is the maximum display width for integers and it's the default value if unless the integer is UNSIGNED (in this case it's 10). When I see something l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Overwrite one css rule with another? A question about CSS. I am working on some dated code. This code has its own css rules which are linked to some 'css manager'... now I want to use jQuery UI with its nice and cute dialogues etc. Now my question is: I have a css rule say... #menu-bar{something} jQuery UI is u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there anyway I can use a BroadcastReceiver to catch DownloadManager.ACTION_DOWNLOAD_COMPLETE in Android? I am working on an android application which is related to security. It is about scanning an application after it is downloaded from android market. Is there anyway I can use a BroadcastReceiver to catch Downl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# CSS Asp: Menu problem I have a menu with a submenu. The following is the code for the menu on the site master <div id="menu"> <h2> Dashboard</h2> <asp:Menu ID="NavigationMenu" dir="rtl" runat="server" CssClass="menu" EnableViewState="false" Orientation="Vertical"> <Items> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Save data of custom metabox in Wordpress I added a meta-box to the edit link page & I can't save the data whatever I put in the field. How can I only update the meta-box without saving the data in the database? Here is my code: // backwards compatible add_action( 'admin_init', 'blc_add_custom_link_box', 1 ); /* Do...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Limited friend list in Open Graph I received a question from one of the users of my application, and I am doubting if this is a programming bug on our end. When requesting the friend list of the user, the API only returned 480 out of 580 friends. Is the friend list limited to this number? Or is it likely that the ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: IE6 compatibility. Page works fine everywhere but in IE6 I have pretty much the same markup for all pages of the website, and most of them are done via php includes (in other words, the largest chunk of the code is the same throughout all pages). All pages but one (dynamically generated) work as intended in all brow...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Disable dates in a jquery datepicker dynamically var birthDate; $(function() { var currentDate = new Date(); $("#BirthDate").datepicker({ dateFormat: "mm/dd/yy", showOn: "button", buttonImage: "../Images/cal.gif", buttonImageOnly: true, changeMonth: true, chang...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Customizing the edit page title in ActiveAdmin I am trying to change the page title to be the name of the item you are actually editing when you are on the edit page. I read in the active admin docs that you should use @page_title. The problem is I don't know where to put this for it to work for the edit page. A: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ajax request return value I have an Ajax call to my controller action looks like this: var m = $.ajax({ mtype: "GET", url: '@Url.Action("GetBrandForValidation")', data: { actionparameter: value }, async: false, cache: false }); As u can see i return actionparametter to my co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to remove special characters from a string? I want to remove special characters like: - + ^ . : , from an String using Java. A: This will replace all the characters except alphanumeric replaceAll("[^A-Za-z0-9]",""); A: That depends on what you define as special characters, but try replaceAll(...): String r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "117" }
Q: In JavaScript, manually controlling order of event listeners Assuming that FORM contains INPUT, have the following listeners: JavaScript function formFirst(e) { ... } function formLast(e) { ... } function inputFirst(e) { ... } function inputLast(e) { ... } function middle(e) { ... } document.getElementById('form')....
{ "language": "en", "url": "https://stackoverflow.com/questions/7552254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: PDF text selection on iOS I'm looking for ways to implement text selection over a parsed PDF in iOS. I already have the positions of all the glyphs by using the Quartz PDF parsing functions, but I don't know of a good way to implement the selection of the text without writing the selection logic and view from scrat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do backup applications detect renames? I recently noticed that SyncToy (by MS) can detect renamed and moved files. How do they do that? Is it only an elaborate guessing game based on file properties (last modification date, creation date, and file size)? A: One way to catch file renames, deletes and other is to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Apache Sling - OSGI framework exception when starting in Windows I received the following error message when starting Sling on Windows with Java 1.7 (see below). I'm using Sling 6 (http://www.apache.org/dyn/closer.cgi/sling/org.apache.sling.launchpad-6-standalone.jar). Any idea what could be wrong? Last time I tried...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Bluetooth on Android 2.2 : socket doesn't receive "connection canceled" I'm in process of writing Android 2.2 application with BT support. Two BT devices need to exchange messages. The problem I encountered happens when one of devices (server) crashes/switches off or somehow stops connection. It's socket is disappea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Session destroy In my working platform i endedup with a session_destroy problem function logout() { $_SESSION['id'] = ''; session_destroy(); } Here i unset the session id variable with a null value and uses the session_destroy() function to destroy the session. But the problem is that after logged out from my a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you compile CoffeeScript in a Jakefile? I would like to create a Jakefile which compiles some CoffeeScripts to install a NodeJS application. How do you do that? I tried with: https://gist.github.com/1241827 but it's a weak approach, definitely not classy. Any hints? A: Approx snippet I have used: var fs = re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why would real_connect return null? For some weird reason, the following code is returning null, while the manual states it should either return true or false. There is also no information in the mysqli object. Code // Initialize MySQLi $this->mysqli = new mysqli(); // Connect to the server var_dump($this->mysqli...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Insert Select Based on IF Condition on a Table Variable I have declared one Table Variable @OpeningTable. I want to insert the some values based on some conditions using Insert Select. I have written one statement which is given below: DECLARE @OpeningTable TABLE ( ItemID INT, OpeningBalance DECIMAL(15,3) )...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I log all outgoing email in Django? My Django application sends out quite a bit of emails and I've tried testing it thoroughly. However, for the first few months, I'd like to log all outgoing emails to ensure that everything is working smoothly. Is there a Django module that allows me to do this and makes th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Visual Studio Add-On and extensions performance monitoring? I'm using / testing a lot of extensions or add-on to Visual Studio. As my Visual Studio is quite low, I'm wondering if some extensions are causing high CPU load. Is there any way to monitor memory, disk and CPU usage per extension ? Google Chrome Task mana...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Stumbleupon API url encoding problem I am trying to work with the stumbleupon API to get information about the items on my site. Documentation: http://www.stumbleupon.com/help/badge-api-documentation/ Now it works perfectly except with some URL's... But http://lolbin.net/i/fp16jU82/that's-what-beer-is-for.htm for ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why UnManaged Export example is doesnt work in prism XE I'm trying to compile This Example for unmanaged export in XE but I getting (PE9) Unknown identifier "UnmanagedExport" error when build. * *Under Compatibility select "Allow unsafe code" *Under Build, find the General Section and change CPU Type to "x86" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: DWR sometimes die on the GAE server I'm creating web app on the Google App Engine. For the AJAX calling I use DWR. Latest DWR version doesn't work fine with gae, because of that I work with 2.0.6 version of the DWR. On the local machine application works good. But on the Google server some methods called with errors...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Generic Plugins Hi i write a some plugins it's look like that public class Person { public string Name; public string Surname; } public interface IWork { Type GetType {get;} } public interface IWorker<T> : IWork { T GetSingle(); T[] GetMultiple(); void DoWork(T object); } one plugin looks like that public Per...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does using (var connection = new SqlConnection("ConnectionString")) still close/dispose the connection on error? I have the following code try { using (var connection = new SqlConnection(Utils.ConnectionString)) { connection.Open(); using (var cmd = new SqlCommand("StoredProcedure", connect...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: point from n3290 :alignment A point from ISO standard n3290 draft ,Section 3.11:Alignment : 1st point Object types have alignment requirements (3.9.1, 3.9.2) which place restrictions on the addresses at which an object of that type may be allocated. An alignment is an implementation-defined integer val...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RapidXML is throwing exception ifstream fin("tree.xml"); if (fin.fail()) return 1; fin.seekg(0, ios::end); size_t length = fin.tellg(); fin.seekg(0, ios::beg); char* buffer = new char[length + 1]; fin.read(buffer, length); buffer[length] = '\0'; fin.close(); xml_document<>...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Add/Override behavior on Jaxb generated classes by extending them I have a web server responding with xml data and a client consuming it. Both share the same domain code. One of the domain objects looks like this: @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) @XmlRootElement(name = "image") public class Image { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Solving the invalid name for Python module warning in PyDev I encountered the Invalid name for Python module: ...filename (it'll not be analyzed) warning message in PyDev and I tried to resolve it by replacing - in the filename with _ but the warning didn't disappeared. One of the problems is that in fact this is n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Security matter: are parameters in url secure? I have developed myself in the last few months about web development in java (servlets and jsp). I am developing a web server, which is mainly serving for an application. Actually it is running on google app engine. My concern is, although I am using SSL connections, se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: android linearlayout background selector I am adding some Linearlayout views in a scrollview by inflating them dynamically. I have set the background of the added LinearLayout to a selector list. But after adding to scrollview, when I press the selected view, it does not show any affect of selector list. The example...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Creating a delta column to plot time series differences in R I have a set of motorsport laptime data (mld) of the form: car lap laptime 1 1 1 138.523 2 1 2 122.373 3 1 3 121.395 4 1 4 137.871 and I want to produce something of the form: lap car.1 car.1.delta 1 1 138 NA 2 2 122 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to read Nfc tags in android? How can i read and display the NDEF messages from NFC tags? Please help me. Can anyone provide the sample source code to read the Nfc tag? A: We have two option to read the nfc card. * *Read from cache Ndef ndef = Ndef.get(tag); if (ndef == null) { // NDEF is not...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to access AfxGetMainWnd() from CWinThread? I'm trying to create a worker thread in a class called ClientManager, but I can't get access to AfxGetMainWnd() from the new CWinThread, i.e: UINT ClientManager::WorkerThreadProc( LPVOID param ){ ClientManager *pThis = reinterpret_cast<ClientManager*>(param); re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: CheckStyle rules for Java Code Conventions from 1997 Is there a CheckStyle rule file that checks against the Java Code Conventions from September 12, 1997? A: According to the checkstyle homepage, it contains an example configuration file supporting the Sun Code Conventions. It does not say how supporting is define...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to create a barrier in multi-thread on android I need a barrier in my multi-thread project on Linux. I know the pthread_barrier_init() and pthread_barrier_wait(), but I want to run my project on android. It didn't have these functions. I know how to implement it with atomic add and atomic comparison. I want to u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Create RPM package with runtime libraries and executable file I have created a C++ application under redhat linux environment. Beside this application, I have also created many *.so libraries required by the application. The created application uses some Boost C++ libraries, e.g. -lboost_system, -lboost_thread and e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Loading 10k+ rows in iphone SQLite (FMDB) I am creating a dictionary app and I am trying to load the terms into an iphone dictionary for use. The terms are defined from this table (SQLite): id -> INTEGER autoincrement PK termtext -> TEXT langid -> INT normalized -> TEXT Normalized is used because I am writing in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best filename to include JQuery in an embedded application I'm using JQuery for an embedded system that is isolated from the outside word. Therefore jquery exists on the local server (the embedded system). The question is: what would be the best file name to include JQuery in my html? * *<script type="text/javasc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Reading a fortigate configuration file with Python Appologies for the really long drawn out question. I am trying to read in a config file and get a list of rules out. I have tried to use ConfigParser to do this but it is not a standard config file. The file contains no section header and no token. i.e. config sec...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: read parameter on js file Possible Duplicate: Pass vars to JavaScript via the SRC attribute May I know how to read get the p value on js file link like filename.js?p=value with local javascript in the js file? Any function to work like the $_GET['p'] in php? Thanks. A: try this: var tmp = location.href, it; if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: logback socketappender not working from webapp I use logback in my maven project and send logs using socketappender. However, the socketappender works only when i run a junit test but when I run my project from tomcat (open a web page) only console appender works. I used lilith and the sample server in the from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: find the next input field which is in next div-jquery I am getting the last element of the form which has got value, now i want to find the id of next input element which is in next div... var elem1 =$(':text[name^=distanceSlab][value!=""]').last(); var nextElemId = // find the id of next input element which is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Flex embedded string resource encoding I embed a text file into my Flex project and read its contents using code like this: [Embed(source = "../../data/abc.txt", mimeType = "application/octet-stream")] private var r_Abc:Class; ... var xx:ByteArray = new r_Abc(); var abc:String = xx.toString(); The contents of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to read large matrix from a csv efficiently in Octave There are many reports of slow performance of Octave's dlmread. I was hoping that this was fixed in 3.2.4, but when I tried to load a csv file that has a size of ca. 8 * 4 mil (32 mil in total), it also took very, very long time. I searched the web but could ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: IE with unordered list emty element In my *.ascx file I have a following code: <ul> <li><ctl:CustomControl id="ctl1" runat="server"/></li> <li><ctl:CustomControl id="ctl2" runat="server"/></li> <li><ctl:CustomControl id="ctl3" runat="server"/></li> </ul> User control named "CustomControl" may produce some ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: HappStack event files I am developing a game and chose Happstack for the persistence part. I find it quite easy to use, i made a quick example for myself to understand it: getAllObjects :: MonadIO m => m [Thing] getAllObjects = do elems <- query GetObjects return elems addAnObject ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why would printing a variable change its value? I have a small function, which is supposed to make a prediction based on a machine learning algorithm. The function wasn't working, so I put a print statement in to check on the value, and all of a sudden it started working. When I comment out the print line, it stops ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }