text
stringlengths
8
267k
meta
dict
Q: Comparing DateTime values in SelectCommand I am working on ASP.net application with a MS Access database.I want to only display those list of entries whose DateTime value is greater than the present date and time. I am having difficulty in comparing in SelectCommand, as to how to pass the datetime parameter. My code...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python - Access protected network resource I need to open a file on my local network from a Python script. In the basic case is very simple: fh = open('\\servername\path\resource.txt', 'r') ... The problem is that the access to this network resource is protected. I tried something like: fh = open('\\servername\path...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: install php fork on ubuntu I'm trying to use fork in php for first time. when I use $pid = pcntl_fork(); if ($pid == -1) { die('could not fork'); } else if ($pid) { // we are the parent pcntl_wait($status); //Protect against Zombie children } else { // we are the child }(fork example in php.net) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What values need to be least selected to optimize indexes with database engine tuning advisor For MSSQL 2008 R2 database what values need to be selected minimum to find required indexes when profiler trace given to the database engine tuning advisor ? These are the values that can be selected at profiler http://img4...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# ToCharArray does not work with char* I have the following struct: [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)] unsafe public struct Attributes { public OrderCommand Command { get; set; } public int RefID { get; set; } public fixed char MarketSymbol[30]; } Now, I want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: iOS change accessibility focus Is there a way to set the accessibility focus programatically (App Store safe)? Any help will be greatly appreciated. A: To focus on element you can call. Swift: UIAccessibility.post(notification: .screenChanged, argument: self.myFirstView) ObjC: UIAccessibilityPostNotification(UIAc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Custom Grouping with Telerik Grid for MVC I wish to create a Telerik grid which can be grouped by different fields in the table, but I'm running into quite a problem - Telerik only allows me to designate a property to group by, and then that's it. What I want to do is to partly be able to designate the title of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Importing a class in Groovy I'm trying to import another class in groovy, but to no sucess so far. I've tried to run this example: http://www.chatsiri.com/?q=node/163 didn't work. Caught: groovy.lang.MissingPropertyException: No such property: readData A: There is a lot of typos in the Code, and it does not follow ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Capistrano destroys ssh public key authorisation I am quite out of my depths with a problem that I have faced with two different ssh-users on two different servers where I deploy to with Capistrano. I am sure I am not the only one to have come across this: * *I set up an ssh-connection from the command line with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: No session share and avoid navigation buttons in browser while opening application window We are using VBScript code to open the application window to avoid users having forward/back navigation while opening the IE8 window. This is the code used. Set WshShell = CreateObject("shell.application") Set IE=CreateObject("...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Quotation real usages I faced with the 'quotation' term and I'm trying to figure out some real-life examples of usage of it. Ability of having AST for each code expression sounds awesome, but how to use it in real life? Does anyone know such example? A: F# and Nemerle quotations are both used for metaprogramming, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I order groups alphabetically? It may be a bit more complicated then that, but here goes. This report lists overtime on a weekly basis. Each driver has worksheets that outline details of a given shift. The user selects a period of a week, and I have some formulas that fill variables with their hours worked fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Implement DataTemplate DependencyProperty in UserControl I'm trying to make an intertia touch scrolling list in a UserControl in Silverlight 4 using Expression Blend 4. I've already made the dependency properties in my UserControl which i want to work like the ListBox does. ItemSource is the list of objects i want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Task Pattern for Java Web Applications It's pretty common to see some flavor of the Task Pattern implemented on enterprise Swing applications. It just makes sense: you'll have a lot of complex user commands that may take (differing) long periods of time to complete, and you can't expect your users to just sit there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Drupal 7 example module, page not found, why? I wrote a simple test module example, 2 files, test.module, test.info, and enabled them in drupal 7 modules. I cleared all the cache, and still when i'm trying to go to localhost/drupal/hello , i get drupal 404 page not found, why is that? Here is my code: <?php functi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: aix java core zero size in my AIX 6.1 ,java 1.5.0 bash-3.2$ java -fullversion java full version "J2RE 1.5.0 IBM AIX build pap32devifx-20080811c (SR8a)" bash-3.2$ i am getting core by running java . but i see the size of core file is zero. i set ulimit -c unlimited and here below are deatils -rw-r--r-- 1 vyellep...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Run script when someone inserts or updates a row in certain Table I am using MYSQL under ubuntu. I want to run a certain program automatically when inserting or updating row in a certain table. The program is actually sending request to a php on the same server. The php script is implemented and it notifies all clie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using MessagePack with Android Has someone tried to use MessagePack with an Android app? Is it possible? I have tried to use the Jar from msgpack-java and received the following Exception: Caused by: java.lang.ExceptionInInitializerError at org.msgpack.Packer.pack(Packer.java:532) at org.msgpack.MessagePack.pac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Keep the scrollbars hidden in a Delphi dbgrid (even on resize) For our dbgrid we want the scrollbars to be constantly hidden. Since TDBGrid doesn't have a 'scrollbars' property, we use: ShowScrollBar(DBGrid1.Handle, SB_VERT, False); ShowScrollBar(DBGrid1.Handle, SB_HORZ, False); However when we resize the window (a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Existing Pages as Apps I have several existing Pages that when I login to https://developers.facebook.com/apps All show up in my Apps list. However the one page (not created my be but I am an admin) does not. How do I access this Page as an App (with out creating an new App that will create a second page) A: Faceb...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to inner join a derived table with Hibernate/NHibernate? (First i'd like to apologize if this is a duplicate, I can't find any good solution for it even though it must be simple) I'm creating reports from sales-data and need to output some aggregated values along with some non-aggregated/non-grouped ones, like N...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Order by performance problems I have an index problem with my order by statement. I have this query witch is runing fast: SELECT name from members where kat = 2 order by date DESC; I have a composite index on members table: kat_index(kat,date); Now my aplication has changed and i have added a query like this: SELE...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Create kml from csv in Python I am new to Python. I am working on gps files. I need to convert a CSV file having all the gps data to kml file. Below is the code in python I am using : import csv #Input the file name. fname = raw_input("Enter file name WITHOUT extension: ") data = csv.reader(open(fname + '.csv'), del...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Auto close Youtube Video when it's ended on an iPod Touch/iPhone I'm currently doing a mobile website. I have embedded Youtube videos in it. Thing is, when you open a youtube video in an iPod, it does its thing where it goes full screen, and at the end you must manually close the video to continue browsing. I was wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP birth checker error I currently have a registration form which checks a persons date of birth via three inputs day(dd) - month(mm) - year(yyyy) The code I am using to check: function dateDiff($dformat, $endDate, $beginDate) { $date_parts1=explode($dformat, $beginDate); $date_parts2=explode($dformat, $endDate...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Access violation reading location 0x00000000. 'new' keyword? I have two classes, A and Bar, both share a header file that has essentially Foo* foo in it. Class A instantiates an object Bar* bar. This works fine. However, if I make the instantiation of the object Bar* bar = new Bar(); I get an access violation when...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I make table headers repeat when printed? Possible Duplicate: CSS: Repeat table headers in print mode I can repeat the headers in Firefox but not IE or Chrome. I am using the thead and tbody tags (which work in Firefox) Also I have added <thead style="display:table-header-group;"> but it still wont work in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to draw rectangular in J2ME by canvas through drawline method This is first time I at a question in here. Im new in J2ME, and now im developing a small application, but i get problem when i wanna show data into table. But in J2me not support table there for that i know another way can represent for table such as...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to fix TextView on Java, Android I have the layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightSum="1"> <LinearLayout android:layout_weight="0.2" android:orie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to reference from drawable to style My app with tabs has two themes. In each theme tabs have different images in selected and unselected state. How I can properly reference to image by theme? For example. I have in themes.xml <?xml version="1.0" encoding="utf-8"?> <style name="LightTheme" parent="@android:styl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Bash: how to add subdirs to the PATH In .bashrc I have added a dir where I put some scripts. Is that possible - to add all its subdir automatically - so that I would not have to add them one-by-one manually? (and wouldn't have to visit .bashrc every time I'll make a dir there) Edit: Using Laurent Legrand's solution,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: HTML/CSS tiled border (left, bottom, right) How do I create borders from images in CSS/HTML without using CSS3? I have three border tiles: left, right, bottom. The should show up (repeat-x/y) to the left, to the right and to the bottom of my content container. I tried to build div containers around my content conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to give a string as input to cut command in perl I have a string say my $str = "Hello Hi Bye", and I want supply this string to cut command get the fields. Can anyone please help me how to do this? And what about this? I was actually trying to do like this...I have an array: my @str = ("hello hi bye","hello...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to store private encrypted user data in the database, but make them available to other chosen users? firstly, I apologize if my question sounds little confusing, I will try my best to describe my scenario as detailed as possible: I have website where user can input their personal data about themselves. They are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Open Graph Publishing I'll try my best not to make this too long winded. Basically, with Open Graph, if a user 'likes' a web page (in my example, a blog), you can set it up so that when a new post is added, an entry is shown in their news feed linking to it. For how this is allegedly done, see here: https://develope...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Query contacts across multiple mailboxes in 1 service call Is there a way, using Exchange Web Services Managed API, to query for a contact across multiple mailboxes using a single service call? I have a grid that loads contacts for the current user but as one of the grid columns I want to show a list of all other u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PC Lint error 714 In my CRC8.c I have this function: BOOL isCRCValid(const UINT8 *ptr, UINT8 Len, UINT8 CRCChar){ return CRCChar == generateCRC(ptr, Len); //generareCRC returns a UINT8 } It's is declared in CRC8.h, but PC Lint returns me the following. Info 714: Symbol 'isCRCValid(const unsigned char *, unsigne...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Restrict the use of a Clojure fn I have an application where Clojure code is evaluated either from the application classpath or as a remote file store resource. Only the administrator has access to the classpath location, but all users can provide their code on the remote store. In order to facilitate some operatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SVN not working after updating to xcode 4.1 for snow leopard I have recently updated my xcode to version 4.1 for snow leopard, but after that my life became miserable and all the repositories in Organizer are unable to connect and show red icons. Anybody has any idea how to fix that??? A: have you tried this: 1.ope...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Show only 2 rows preview of div content How to show only two rows preview of div content? If I use like substring in C# would cause HTML tag error issue. so, I wonder if I could do this? A: you could do this from css to the parent element overflow: hidden; height: necessary_height_to_show_only_2_rows; width: 100%; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: IE conditional comments working but tags visible? I have the magnificent HTML5 javascript shim linked to in my <head>. It works fine apart from it displays the tags at the top of the page ie: <!--[if lt IE9]> <![endif]--> When I view source, it looks absolutely fine and dandy. I have absolutely no idea what is going...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using PHP to remove a html element from a string I am having trouble working out how to do this, I have a string looks something like this... $text = "<p>This is some example text This is some example text This is some example text</p> <p><em>This is some example text This is some example text This ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529636", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Rails + Google Analytics I want to ask some question about using Rails (2.1.0) and Ruby (1.8.7). I have development mode and production. Production mode has a domain (for example blabla.online.com), development mode has an ip adress (for example 199.199.199.199). QUESTION: Do I need to create two different accounts ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Taking Data From Multiple Table using TestNG Data Provider I am Using Selenium RC with TestNG to do some kind of keyword driven testing.For the same purpose i want to read some data from an excel sheet and use it.Here I have used Data Provider annotation of TestNG.but My problem is that i want to read data from mult...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: image pop up problem When you hover or click on an image within the webpage a pop up appears. However, this new pop up image is hidden behind the div to the right. Is there any way of bringing it forward so it is visible instead? Thanks in advance. Paul A: The div with more z-index will appear above the the one wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JavaScript/ jQuery for Closing Browser FireFox / Chrome / IE As I need JavaScript / jQuery code for closing browser's ( FireFox / Chrome and IE..) As I have try with window.close(). But it only work for IE. Is any other way..? A: This worked for IE and Chrome. (window.close() worked for IE, then win.close for ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to write the stream to memory stream? public void doprocess(TcpClient client) { MemoryStream ms = new MemoryStream(); Stream clStream = client.GetStream(); byte[] buffer_1 = new byte[8192]; int count = clStream.Read(buffer_1, 0, buffer_1.Length); while (count > 0) { ms.Wri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WriteFile() crashes when trying to carry on multithreading I am working on an mfc dll that is accessed via a script and all this works fine. I have added a multi-threading component to it and am trying to use the WriteFile() function to write to my serial port, but somehow the WriteFile() function exits the applicat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Create content types available in multiple site collections I want to create a content type, lets call it MyDocument with some properties we need. However we have 10 departments each one with its own site collection. I want all documents to be created using MyDocument,across all site collections. Thanks A: In Sha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Encapsulating Logic in SQL - Best Practice Greetings and thanks for reading! I was wondering what the best practice for encapsulating stored procedure logic using a set-based SQL technique. For example, I have a product entry application that I am developing. While attempting to limit code duplication, I created a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to memory map a compressed file? We have large files with zlib-compressed binary data that we would like to memory map. Is it even possible to memory map such a compressed binary file and access those bytes in an effective manner? Are we better off just decompressing the data, memory mapping it, the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: how to block a user in facebook via api(coding) I am developing a windows app using c#.net. I want to block a user in facebook using api. Any one suggest me is there any methods to block a user in facebook via api A: There is a function to ban users from your app in the Facebook REST api here: https://developers.fa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Use a file as a buffer for a producer consumer system of two programs I have two programs one of which writes some entries into a file and the other one reads all the entries from the file an processes them. Currently, the files are executed sequentially. That means, the first programs produces the file completely a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How would it be possible to add a caption to the bottom of a table? I have a table which has a caption which appears on top of the table. I'd need another caption to appear at the bottom of the table. how would it be possible? <table> <caption>My Table - Start</caption> <tbody></tbody> <tfooter></tfoote...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Gitolite not updating authorized_keys file I have recently installed Gitolite in a Cygwin environment using SSH keys and everything else. I successfully installed Gitolite and had access to the gitolite-admin repository, configured and put the new keys. When I committed and pushed, everything was fine until I notice...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Timing of gridComplete event with Trirand's jqGrid I'm not convinced that the gridComplete event runs "after all the data is loaded into the grid and all other processes are complete," as specified in the documentation. I've got a grid that is loading correctly. In the gidComplete event, I'm triggering some filte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django test runner ignoring the --settings option I'm trying to use a different set of configs for testing my django app (like, using in-memory sqlite3 instead of mysql) and for this purpose I'm trying to use another settings module. I run my tests this way: python manage.py test --settings=test_settings But Django...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Scala: Can you use "foo match { bar }" in an expression without parentheses? Why are the parentheses needed here? Are there some precedence rules I should know? scala> 'x' match { case _ => 1 } + 1 <console>:1: error: ';' expected but identifier found. 'x' match { case _ => 1 } + 1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to access a file that is being used by another process in Windows? I see that this question has been asked many times in stackoverflow, as well as in other places. The questioners solved their problem by different methods. Most of these solutions are around how they designed their applications and locking level ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Multiple core usage on Adobe Flash 10 I'm developing a p2p mutliplayer game using adobe rtmfp server on facebook using flex 4. I have box2d for physics engine and the hardware acceleration is on. In 60fps, Average cpu cost for 6 players room is %40 for 1.86mhz intel core 2 duo. But in 8 and more players rooms, the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: If the where condition is on a joined table, will I get duplicated results? I have three tables, one is tasks which are tasks that factory workers complete by putting them into batches, which is another table, each task has a batch_id, multiple tasks can have the same batch_id. The third table is the batch_log where...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Add an image to Django admin header How do I display an image in the header of Django's admin (I refer to the place on the top of the page with the yellow title "Django administration" with blue background)? I've tried to so with the HTML tag of <img> with some absolute path (under the assumption that the server and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP error message I am getting the following error when attempting to buy something in the shop at www.1dt.biz/shop. I wondered if you could point me in the right direction on how I could fix it? Deprecated: Function eregi() is deprecated in /home/1dt/web/shop/includes/functions/general.php on line 1090 Deprecated:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Appending a Counter() list to a pygtk treestore (Python) I'm currently attempting to append a sorted list of items to a pygtk treestore. The list is a count of the times the number occurs in the original list, eg. 2 lots of 24 Generating the list from collections import Counter c = Counter(aSeries) l = c.items() l.s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: API Keys used to not be the APP ID? I'm upgrading our FB app to use the new SDK. Noticed that API Keys are now the same as the App ID. We're still sending over our old API Key for tokens. Are the old API Keys Obsolete/Deprecated... Should I change all of our to api keys to app id's? What's the logic behind this? Or...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way to handle SOAP type Exceptions in python In case the user enters data that is NOT on the web server being accessed by a WSDL, i get an error: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns3="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/enc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: can we store the value printed by printf() into a unsigned long variable? I have a following array and a printf() stament, char array[1024] = "My Message: 0x7ffff6be9600"; printf("%.14s", strstr(array, " 0x") + 1); The output of above printf() is 0x7ffff6be9600, can we store it into a unsigned long variable? A: L...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Pear is not recognized as internal or external? issue I have installed pear but when run from my command prompt i get "pear is not recognized as internal or external command" . can anyone tell me how to fix this issue? Thanks A: You need to add the pear bin directory to your $PATH variable. For windows: http://pea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sencha Touch Carousel randomisation I currently have a static carousel set up as below: varPanelTop = new Ext.Carousel({ defaults: { cls: 'homeTop' }, items: [{ html: '<img src="IMAGE ONE" />' }, { html: '<img src="IMAGE TWO" />' ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unable to create class instance I have a singleton class that implements two other abstract classes. My monkey::getMonkey fails because of thisMonkey = new monkey() returns "object of abstract class type "monkey" is not allowed". I know you cannot instantiate abstract classes, but my monkey implements two abstract c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++ Derived polymorphic class - does it contain an entire instance of Base, including a vptr? Say we have Class A { public: int _i; virtual int getI(); }; class B : public A { public: int _j; virtual int getI(); }; So assuming that the size of a class in memory is the sum of its members (i.e. ig...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CakePHP 1.3 or 2.0.0-RC2? I want to start developing in an MVC framework, specifically CakePHP. I see they have released 2.0.0-RC2 and was wondering if it is a waste of time to start an app in 1.3 when 2.0 is right around the corner. Should I start learning and developing in 2.0-RC2 rather as I'm guessing most of wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to discover if the screen is ON or OFF while developing in Android? How can I know if the screen is ON/OFF? A: If you simply wish to poll the current state you can do so this way. pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); boolean screen = pm.isScreenOn(); If you are looking to be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Wrong background images in EditText.setError(..) popup I'm using EditText.setError(..) to show up an error message if the user did not correctly fill in the formular. The app will be for Honeycomb. I tried with both android:style/Theme.Holo and android:style/Theme.Holo.Light. The Problem is that the background imag...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Running unit tests before building stage in multi-module maven project I have a multi-module maven project. In every module there are unit tests. When I make clean install tests run before every module and if all tests in one module are success it build successfully. If one test failure all other tests in that modul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails 3 - routing for admin section the structure of my admin section looks like this: controlers -> admin -> admin_controllers... views -> admin -> users -> data views -> admin -> settings -> data My routes looks like: resources :users, :user_sessions match 'login' => 'user_sessions#new', :as => :login match 'logo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Starting InstalledAppDetails for certain application is causes force close I am working on an application whose job it is to clear the browser history. As part of this process I send the user to the APPLICATIONS_DETAILS_SETTINGS screen for the browser so they can press the "Force Stop" button, which will close any w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: sqlite and python... fast and furious I implemented in python a program that builds some db from protein fasta file. A fasta file is a text file that contains some macromolecular sequences. You can read more about here. From each protein my program generate a list of peptides, they are pieces of proteins. For my g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: simulate different PC with different IP addresses in linux environment im new to linux environment and any help/feedback would be appreciated. Im actually trying to develop a client-server (MULTICAST) program, so, i would like to test one client sending information to different servers (one-to-many relationship). th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What javascript/php template libraries will parse the same template files? I originally was using Mustache.js but found that it does not work well for rendering large nested trees (it has no way of disambiguating variables of the same name in nested structures). I was happy to find a PHP version of Underscore.js, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529754", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Regex for dd/mm/yyyy and d/m/yyyy Possible Duplicate: Regex to validate dates in this format d/m/yyyy I can find regex for dd/mm/yyyy but does anyone know what it would be to also allow single digit dates and months (e.g. d/m/yyyy)? A: I think below is work for you ^((((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET Routing, make i possible to route to a .zip file for download I'm using ASP.NET Routing in my webapp. On my site I have a .zip file that I want to users to be able to download. But I get error saying: "There is no build provider registered for the extension '.zip'. " What I'm I doing wrong? A: For ASP.NET M...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to add a GEF editor to my multiplePage Editor? (eclipse RCP) I would like to add a GraphicalEditor to a multipage editor. However, when I simply call addPage(new MyEditor()); inside addPages(), I have an error since. Since my GEF editor extends GraphicalEditor, it cannot extend also FormPage. So, I made it im...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to change the color of JQgrid I have a jqGrid and it has a default color: blue. However I want to change it's color. What can I do? EDIT: I have that includes for jqgrid CSS: <link rel="stylesheet" href="/css/ui.jqgrid.css"/> <link rel="stylesheet" href="/css/ui.multiselect.css"/> <link rel="stylesheet" href="/c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to 'self-destruct' an application from within itself? I want the ability to uninstall an application from within itself. Example: UIAlertView pops up and says "This Application has Expired." The user hits 'Ok' and then the application proceeds to shut down and remove itself from the device. Is there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CSS lines are repeating using stylesheet_link_tag I'm trying to order my stylesheets in a rails3 app, but I've got an issue with the lines repeating themselves using the *stylesheet_link_tag* helper. In app/views/layouts/application.html.erb <%= stylesheet_link_tag :reset, :application, :event_calendar, :cache =>...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the elegant way to create HTML horizontal tabs? I am going to make a HTML web page. I am wondering what is the most elegant way to create HTML horizontal tabs (as a navigation bar) ? I would like to have selected tab and unselected tab have different colors. I guess I should use CSS for styling and maybe jQu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Altering numpy function output array in place I'm trying to write a function that performs a mathematical operation on an array and returns the result. A simplified example could be: def original_func(A): return A[1:] + A[:-1] For speed-up and to avoid allocating a new output array for each function call, I wou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Handling TLB Misses I want to see which pages are being accessed by my program. Now one way is to use mprotect with SIGSEGV handler to note down pages which are being accessed. However, this involves the overhead of setting protection bits for all the memory pages I'm interested in. The second way that comes in min...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Twitter-like Textbox Character Count with inline alert I would like to have a textbox character "count up" that will increase the count as a user types and display a text alert when the user crosses the required character but still allows user to continue typing. A: If you want to roll your own HTML <div> Type t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to send emails connecting to the SMTP server directly? I do not want to use mail() to send e-mail. I would like to connect to the SMTP server directly. Is there a class to do this job? A: SwiftMailer does this. http://swiftmailer.org/ A: Zend_Mail can do this for you: $tr = new Zend_Mail_Transport_Smtp('mail.e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Target "debug" does not exist in the project I am trying to do custom build, hence I am editing build.xml file. I have added 2 new targets, but now NetBeans are giving me error, when trying to debug - Target "debug" does not exist in the project.But I have added target of different names, no debug at all! Does it me...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Compiler gives error when struct is not initialized and if we try to access the property but not with variable I have one observation about struct. When I declare a property in Struct and if I don't initialize the Struct then it gives me the below error - "Use of unassigned local variable empStruct" PSeduo Code- str...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is the default path of debug.keystore on Mac? I am a new Mac user. I searched everywhere for debug.keystore file, but no luck. Is it possible that eclipse can't create the file? A: Using the Command+shift+G I found the files in .android directory, but for mac I found no "debug.keystore" file rather I found "de...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Is there any way to access Java library from flash? Flash is great tool for animations. I was wondering if I could send events to Java and receive results back. In other words call some functions in flash and get their results. A: Apache Thrift would probably be the best way. Unforutanetly its unclear if it support...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get a list from all opened forms of my software? I want to ask the user to close all opened forms before terminate my application. How can I automatically get a list from opened forms? I'm using Delphi 2006, and don't using form's Auto-Create, but I'm using the auto created form's referenced var with Applicat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Internal Error in Drupal 7 after posting from Windows / apache to Linux I recently upoaded my drupal 7 site from local windows system, running on apache 2, to a linux server. the local system was having php 5.3 and server has 5.2. ONce uploaded I am not able to go to any sub pages - it shows me an Internal server er...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to stream movies to Apple TV from iPad/iPhone while a UI is still on the iPad/iPhone Is it possible to stream a movie to Apple TV (either wirelessly or via WiFi) from an iOS device, while having a separate UI on the iPhone/iPad? The UI could for instance, act to control what is playing on the Apple TV...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Adding rows and columns to HTML with jQuery/JavaScript this is my html code: <h3>Ilm selles linnas</h3> <table> <tr> <th>id</th> <th>city_id</th> <th>temp</th> <th>date</th> </tr> <div id="info"></div> </table> this is my script: function(data) { $('#info').em...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Enable/Disable Asp.net Image button during postback I am trying to check if user is available or not in the database for that I have kept a button named "Check availability".Once when user clicks that he can checks whether the name exists in the database or not and changes the textbox background color to red if "exi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7529825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }