text
stringlengths
8
267k
meta
dict
Q: jQuery blur handler not working on div element? I don't understand why the jQuery blur handler isn't working in the most simple case. I'm literally creating a div 100px by 100px and setting a blur event on it, but it's not firing (JSFiddle): <div id="test">this is a test</div> $(document).ready(function() { $('...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rails intermediate table assosciations I have a User model and a Tag model. The User has Skills and Interests. A Skill is a Tag, and an Interest is a Tag. I have a table for Users, Tags, UsersSkills, UsersInterests. The last two being the intermediate table. How do I associate all this. The following is what I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Matching attributes list with or without quotes I'm trying to match a list of attributes that may have quotes around their value, something like this: aaa=bbb ccc="ddd" eee=fff What I want to get is a list of key/value without the quotes. 'aaa' => 'bbb', 'ccc' => 'ddd', 'eee' => 'fff' The code (ruby) looks like th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python 2.5 zlib trouble I am trying to deploy an app on google app engine using bottle, a micro-framework, similar to flask. I am running on ubuntu which comes with python 2.7 installed but GAE needs version 2.5, so I installed 2.5. I then realized I didn't use make altinstall so I may have a default version pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using Same Value of Key in Same Array How do I write this code correctly? The fourth line, I want to use the values of the two first keys all within the same array. $pixel_percents = array( "complete"=>.5 * 768, "wip"=>round(.2 * 768, 0, PHP_ROUND_HALF_DOWN), "remain"=>$pixel_percents["complete"] - $pixe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the difference between an MS Office Visual Studio Add-in, Shared Add-in, and Excel 2010 Add-in? I am using Visual Studio 2010 to create a new add-in for Excel. Ideally I would like it to work with Excel 2011 (Mac), 2010, and 2007. There are three template options to choose from when I start a new C# project. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using a loop to query in mongoDB I'm thinking of using mongodb as a replacement for a few mysql tables that require a lot of queries (often in while/for loops) to fetch all of the data. Mongo seems like a good fit because I can run javascript directly against the console and lay out all of the queries and receive th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Query to loop through data in splunk I've below lines in my log: ...useremail=abc@fdsf.com id=1234 .... ...useremail=pqr@fdsf.com id=4565 .... ...useremail=xyz@fdsf.com id=5773 .... * *Capture all those userids for the period from -1d@d to @d *For each user, search from beginning of index until -1d@d & see if t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: unix script - problem in making a text file I am writing a simple unix script as follows: #!/bin/bash mkdir tmp/temp1 cd tmp/temp1 echo "ab bc cj nn mm" > output.txt grep 'ab' output.txt > newoutput.txt I got following error message: grep : No such file or directory found output.txt but when I looked into the dir...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Probably simple php regex Sorry for the simple question that I could research, but i crashed a database today, been here 12 hours, and want to go home. I am rotating recursively through files trying to extract city, phone number, and email address so that I can match the city and phone to my database entries and upd...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Faster Paint on Flex Mobile I am trying to build an app that tracks touchpoints and draws circles at those points using Flash Builder. The following works perfectly, but after a while, it begins to lag and the touch will be well ahead of the drawn circles. Is there a way of drawing the circles that does not produce ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I perform these animated view transitions? I am brand new to Core Animation, and I need to know how to do 2 animations: * *I need to switch XIBs by fading through black (fully releasing the the first view controller) *I need to mimic the UINavigationController's pushViewController animation (switching XIB...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: android market - application update does not work I have a new version of my app on the market and an old one installed on tablet. I expect to see download/install option when I navigate to the application page on the market but instead I see "open" button as if the market version were already installed on the devic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Need advice on how to design this. Composition or inheritance? I'm trying to design a client / server solution. Currently it contains three projects. The client, the server, and a library that each use (because they both require a lot of the same stuff). For example, both the client and the server (in this case) rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Count users from table 2 in request to table 1 I have table with positions tbl_positions id position 1 Driver 2 Lobby 3 Support 4 Constructor and in other table i have users tbl_workers id name position status 1 John 2 3 2 Mike 3 2 3 Kate 2 3 4...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why do we have to put an asterisk on method parameter types in Objective-C? I'm starting out Objective-C and I was wondering, why do we have to put asterisks in the method parameter type? e.g. - (void)myMethodThatTakesAString:(NSString*)string; Thanks in advance! A: The asterisk means that the parameter is a point...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails Active Admin resource problem I recently have watched railscast 284 about active admin and wanted to implement it into my web app, however I am running into an issue when I add a resource. I get the following message every time I try to navigate to the created tab: NameError in Admin::LoadsController#index un...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Deferred bcast wakeup for condition variables - is it valid? I'm implementing pthread condition variables (based on Linux futexes) and I have an idea for avoiding the "stampede effect" on pthread_cond_broadcast with process-shared condition variables. For non-process-shared cond vars, futex requeue operations are tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: extjs4 - how to focus on a text field? I can't seem to be able to focus a field in a form in extjs 4. The doc lists a focus function for Text field (inherited from Component) but it doesn't do anything in terms of focusing to the input field. Here's a sample code from the docs Ext.create('Ext.form.Panel', { ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: (!IE) Problems with Blocking Code from IE I have (once again) been enhancing my template for a school site. However, I have run into another problem. I have noticed that the navigation bar does not render properly in any Internet Explorer version prior to IE9 (to be expected). I had seen the use of the !IE tag aroun...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Updating timestamps in mongoid How do I update/change the TimestampSequence on a Mongoid document in rails/ruby? If you dont know in Mongoid but know in MongoDB that will work as well. The class is Mongoid::TimestampSequence Thanks in advance A: Try this: Document.where(somecriteriahere: "criteriavaluehere").upd...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why calloc takes two arguments while malloc only one? IMO one is enough, why does calloc require to split it into two arguments? A: I'd guess that this is probably history and predates the times where C had prototypes for functions. At these times without a prototype the arguments basically had to be int, the typed...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Android Can I use C++ library via JNI interface and put my app in the marketplace? Thats it. I am looking to use a C/C++ Library in my Android app. So JNI to access the library functions. So 1) Can JNI be used inside an Android app. 2) Any restriction in putting my hybrid app Java/JNI android app into the andr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Automatically generated property {get; set;} vs {get; private or protected set;} in C# I see a lot of code uses automatically generated property like {get; private set;} or {get; protected set;}. What's the advantage of this private or protected set? I tried this code, but it's the same when I have Foo{get; set;}. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: django's DateField model field and acceptable values I'm having a bit of trouble with django's DateField model field. Shouldn't it be able to accept fiveDaysLater as a valid date object? When I try to add fiveDaysLater into the database, I get an error saying cannot add null value to date. However, the second I c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: webforms vs asp.net mvc for single page application - which to choose? I'm building a single page application (e.g. like gmail) and I was wondering which asp.net framework would be better? asp.net mvc allows you full control and is easier with heavy ajax sites, but it isn't very good when it comes to partial views (...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Rails - how does method access name fields with no call to a db and no form params? I'm a newbie watching a Lynda.com video about rails 3. The teacher creates a method like this to find a user def name "#{first_name} #{last_name}" end He says this will return first name and last name for this user, but I don't u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Prevent modification ("hacking") of hidden fields in form in rails3? So lets say I have a form for submitting a new post. The form has a hidden field which specify's the category_id. We are also on the show view for that very category. What I'm worried about, is that someone using something like firebug, might just ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How would one draw to the sub display of a ds as if it was a framebuffer? I need to draw raw pixel data to the Nintendo DS's "sub" screen, such as if I was drawing to the main screen in "framebuffer" mode or "Extended Rotation" mode. How can I do this with the current version of libnds (which seems to place restrict...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to box-shadow inset on just the Left, Bottom, Right -- not the top? I have the following box-shadow inset css3 styling: box-shadow: inset 0 0 10px 0 rgba(255, 255, 255, 1); The inset styling appears on all 4 sides of the box but I do not want styling on the top. How can I remove the styling from the top but kee...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How would I parse this XML with Ruby? Currently, I have an XML document (called Food_Display_Table.xml) with data in a format like this: <Food_Display_Table> <Food_Display_Row> <Food_Code>12350000</Food_Code> <Display_Name>Sour cream dip</Display_Name> .... <Solid_Fats>105.64850</...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Casting a C++ long type to a JNI jlong I am using JNI to pass data between C++ and Java. I need to pass a 'long' type, and am doing so using something like: long myLongVal = 100; jlong val = (jlong)myLongVal; CallStaticVoidMethod(myClass, "(J)V", (jvalue*)val); However in Java, when the 'long' parameter is retri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: MySQL Search Join Query I have a multiple input search form, that has 2 text boxes. One text box for "searchWords" and the other for "specificPeople". In the first text box, you may have "Dorchester Hotel London", and in the second, you may have "Brad Pitt/Angelina Jolie". Using ASP, I convert the second text box va...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++ Windows link subsystem question When using the windows SDK to compile a program writen in C++, if I specify -subsystem:windows,6.1, the width of the window is smaller. If I don't, or do -subsystem:windows without the 6.1, the width is normal. I'm curious why this does this, and if there's a way to make it stay t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What Could Make PHP Code from One Directory Pick Up Behavior from Another Directory? I'm having a weird problem. I have two code bases on one server. One is cutting edge stuff in my home directory. The other is a more stable release in the /var/www/... directory. I have noticed that when I pull the code from git...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Custom Logging for ServiceSecurityAuditBehavior in WCF 4.0? On my server, I would like to log security information to a database instead of the Windows Application or Security log. I am trying to figure out how to override or customize the ServiceSecurityAuditBehavior stuff to not just write to a Windows log. Is tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Freeing malloc'ed memory from circular linked list I apologize in advance if this is an incredibly dumb question... Currently I have a circular linked list. The number of nodes is normally held static. When I want to add to it, I malloc a number of nodes (ex. 100000 or so) and splice it in. This part works fine when...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: jQuery Mobile footer not fixed when listview dynamically added I am dynamically building a list view when a page loads and have my footer set to fixed but it doesn't work when the listview is dynamically added. How can I fix this? http://www.blueshoemobile.com/preview/buzzoffbase/categories.html?cat_id=96&cat_title=...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Program to measure small changes in reaction-time I need some advice on writing a program that will be used as part of a psychology experiment. The program will track small changes in reaction time. The experimental subject will be asked to solve a series of very simple math problems (such as "2x4=" or "3+5="). T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: RewriteRule to accept 3 parameters but 2nd & 3rd param are optional mydomain.com/MyFolder/parameter-1 I have this htaccess RewriteRule - RewriteRule ^([a-z0-9\-]+)/?$ index.php?c=$1 [NC,L] The htaccess file is inside [MyFolder] and this only accept a single parameter. How can do a RewriteRule to accept 3 parameter...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Importance of Cocos2D CCScenes? I recently followed Ray Wenderlich's Cocos2D tutorial for putting Cocos2D in a UIKit app. I am currently only using Cocos2D in only one of my UIViews. In the tutorial he uses a CCScene which is a specific .h and .m class in the project. In the scene is some code which I do not know th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: fancybox navigation arrows I've tried for hours to resolve this issue. I would sincerely appreciate some help. I'm trying to implement a jquery animation for the navigation arrows that appear once a [grouped] item is opened up in fancybox. The left or right navigation arrows appear after hovering over the #fancybox-...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Delphi TDBGrid How to change selected color when style is gdsGradient I'm just trying to use delphi XE, before that I've been a big fan of Delphi7. I see the new dbgrid allows to use themed and gradient styles. I'm using gradient and set rowselect, it has a property for gradient-start and -end for the column heade...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: EF 4.1 and "Collection was modified; enumeration operation may not execute." exception This has been driving me nuts for the last 2 days. I have 3 pretty basic classes (well, reduced for readability) public class Employee { public string Name { set; get; } virtual public Employer Employer { set; get; } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Sql server ide for refactoring Is there an IDE for SQL Server that includes refactoring? For an example, if I have a composite primary key on a table and I change it, sql management studio will drop all foreign keys referencing to this primary key (it will warn first). Is there a tool that generates the DROP stateme...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there any way to perform a callback on a specified thread? I am writing a library, and would like to be able to fire a callback on a specified thread, so the end-user does not have to worry about thread-safety. I tried using ExecutionContext, but that didn't work out too well, it would fire in the specified conte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Create a 2D array with a nested loop The following code n = 3 matrix = [[0] * n] * n for i in range(n): for j in range(n): matrix[i][j] = i * n + j print(matrix) prints [[6, 7, 8], [6, 7, 8], [6, 7, 8]] but what I expect is [[0, 1, 2], [3, 4, 5], [6, 7, 8]] Why? A: Note this: >>> matrix = [[0] * 3...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rails: How to insert a text_field without a form just to test the layout? I am just doing the layout for my app at the moment and I want to insert a text.field that does nothing just to see how it looks. How can I do this? A: There are a few ways that could do what you want. 1) just write the static HTML <input typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: MySQL Left Outer Join, MAX() and other columns I have one table which stores all outbound SMS text messages. The second table stores a number of delivery receipts for each message (between 1 and 20 delivery receipts per message). I have the following SQL: SELECT messages_sent.id, messages_sent.user_id, m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Quick C++ data to Java transfer I'm trying to transfer a stream of strings from my C++ program to my Java program in an efficient manner but I'm not sure how to do this. Can anyone post up links/explain the basic idea about how do implement this? I was thinking of writing my data into a text file and then reading th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Guice injection and RequestFactory: Extending ServiceLayerDecorator I searched for a solution to use Guice Dependency injection together with RequestFactory. I stumbled upon this: https://github.com/etiennep It wasn't working for me so I changed the InjectedServiceLayerDecorator.java implementation to this: https://...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Retreving date from Hibernate TImestamp I have a field with temporal type as Timestamp to save both date and time to the database. @Temporal(TemporalType.TIMESTAMP) @Column(name="date", nullable=false) private Date date; But when displaying the value to the user, I just want to show date part and truncate time par...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Calling an UnmanagedFunctionPointer in C# for custom calling conventions I have a function in a DLL: char __usercall MyUserCallFunction<al>(int arg1<esi>) Because I hate myself I'd like to call this from within C# using P/Invoke. Normally this can be done by getting a function delegate, a la: [UnmanagedFunction...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: jQuery append() is broken in IE? Is jQuery 1.6.4 append() is broken in IE? This code works everywhere but IE6+ $('<xml></xml>').append('<test>hello world</test>'); Is there a way to fix that? A: From the docs: jQuery( html, [ownerDocument] ) html A string of HTML to create on the fly. Note that this parses HTML, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Inheriting properties with accessibility modifier in C# I tried to inherit interface, and make some of the automatically generated set property as private. This is an example. public class MyClass { public interface A { int X {get; set;} } public interface B : A { int Y {get; se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you write a no-op statement? What is the best way to write a no-op statement in Delphi? Take this code: if a=b then SomeOldStatement else AnotherStatement; And say that you temporarily want to rem out SomeOldStatement. Would you just go for this solution: if a=b then //SomeOldStatement else AnotherSt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to update Sample Data in C# I have this sample data. Right now it is defined in a seperate C# file like this: public class SampleData{ public static ObservableCollection<Product> GetSampleData(){ ObservableCollection<Product> teams = new ObservableCollection<Product>(); } } and I load the obse...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Question about UITableView and deleteRowsAtIndexPaths My first question on stackoverflow (<< n00b). I'm working on my first project involving UITableViews and plists, and I'm having an issue. The property list consists of a dictionary holding 3 sections/categories (each an array) and a number of entries in each of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: AJAX with HTML? I have a email system I am building for a company that they want to send emails with it. I have a custom HTML editor for it. What I am wanting to do it post the contents to a external PHP file and have it add to the database. function schedule_eblast (html) { var answer = confirm("Are you sure y...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: internal css will not work My internal css won't work with the little code I have. This seems like a really stupid question but nothing I do helps. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <title>Ask Help</title> <style type = "text/css"> @font-face { font-fam...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Maintaining data sync between UITableView cells and array of model objects I have a UITableView where each cell corresponds to a model object.The list of these model objects are kept in an array inside a singleton object that manages the model objects. The UITableViewController subclass holds a instance variable tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using custom keywords to set link in javascript The script implications are more advanced, but I've condensed it down to this following problem: In a nutshell I have some keyword variables set with javascript. These keyword variables contain URLs. What I need is when a person inputs a keyword he will be taken to a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I differentiate between Android and iPad with media query? In a page I'm making, I'm writing a secondary stylesheet for mobile devices that overwrites selected parts of the first stylesheet. I'm using media queries in the following way: <link rel="stylesheet" href="assets/ui.css"> <link media="only screen a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Objective-C - C style string allocation leak? I have a very simple app. From the main screen I launch a new view ("learn view") that displays an image and a label. on the learn view there is a menu button and a next button. When the user taps the next button, the view updates the image and the label from char * arra...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JSON ajax and jquery, cannot get to work? I have the following script in my javascript... $.ajax({ type: 'POST', url: 'http://www.example.com/ajax', data: {email: val}, success: function(response) { alert(response); } }); And my php file looks like this... if ($_REQUEST['emai...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: can't seem to spot this error in BASH insists that there is a syntax error can't find the error here. when i run this program BASH comes up with "[ : 17: unexpected operator" i've tried it with a parameter ending in .c and with one in .java but neither seems to work. EXT=`echo $1 | cut -f2 -d"."` if [ "$EXT" == "c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C#/Android Compatible Compression Algorithm I have a lot of plain-text content (English). I have a C# tool for creating the content, and it will be consumed in an Android app. I need, therefore, to know my options for compression algorithms. What library can I use to compress/decompress, where I can compress in C# a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PyGTK custom timing I need to have a custom timing for a component of my program (essentially i'm counting turns, at the rate of around 20 turns per second). Each turn i need to process some information. However, I have to do this so that it could work with PyGTK. Any ideas on how to accomplish this? A: The simples...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WCF Service Reference Support Files Not Updating I have a VS 2010 solution containing a WCF service project and a unit test project. The unit test project has a service reference to the WCF service. Web.config for the WCF service project sets a number of binding attributes to other-than-default values: web.config: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Accessing Data inside of a .jar I am currently putting a program into a .jar, and have difficulties telling it where to get its data from. The data was inside of a file in the project, and I am sure that it is located in the jar as well. But I have no clue on how to get a path into a jar. I found the getClass().get...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: calling php function to delete a record from database doesn't work can you please have a look at these codes and let me know why mysql query doesn't work? in a php file I add a check box to my page with following code echo "<input type=checkbox name=box[] onClick=\"deleteLink('$ClickedWord','$rLinks');\"'>"; then i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Facebook Development - Simple question on best approach I am a PHP developer, but completely new to this Facebook stuff and am getting all confused. The whole Apps vs Pages vs Fan Pages terminology is driving me nuts. Please help! My client's requirements: 1) Display Like button on a single web page 2) When Like bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to parse content with ? I am using jsoup to parse a number of things. I am trying to parse this tag <pre>HEllo Worl<pre> But just cant get it to work. How would i parse this using jsoup?\ Document jsDoc = null; jsDoc = Jsoup.connect(url).get(); Elements titleElements = jsDoc.getElementsByTag("pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using Data.Typeable's cast with a locally defined data type I have a data type which I'm using to represent a wxAny object in wxHaskell, currently I only support wxAnys which contain a String or an Int, thus: data Any = IsString String | IsInt Int | IsUndefined I need a function (a -> Any) and I'm wondering i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JQuery script not working despite working in the console I am attempting to make the entire div of a Nivo slider on this site clickable so the visitor can navigate to a featured article. I developed the following script within Chrome's console to work out the bugs. var $j = jQuery.noConflict(); $j(function(){ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Some sort of “different auto-increment indexes” per a primary key values I have got a table which has an id (primary key with auto increment), uid (key refering to users id for example) and something else which for my question won’t matter. I want to make, lets call it, different auto-increment keys on id for each u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Constructing Strings using Regular Expressions and Boolean logic || How do I construct strings with exactly one occurrence of 111 from a set E* consisting of all possible combinations of elements in the set {0,1}? A: You can generate the set of strings based on following steps: Some chucks of numbers and their leg...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Android MediaStore won't set file name I am trying to get Android's MediaStore to write an image to the SD card with a specific file name. It does write the file, but does not use the title parameter passed with MediaStore.Images.Media.insertImage(cr, source, title, description) Here is my relevant code: PictureCa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using color as the 3rd dimension I have 3 dimensions that I want to plot, and I want the third dimension to be color. This will be in R by the way. For instance, my data looks like this x = [1,2,3,4,1,5,6,3,4,7,8,9] y = [45,32,67,32,32,47,89,91,10,12,43,27] z = [1,2,3,4,5,6,7,8,9,10,11,12] I am trying to use filled...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to alter these functions so that they recursively find the solution This is a question about Project Euler problem #67. (Find the maximum path down a triangle) I know it may be in bad taste to ask for help on these. I have these functions: def chooseBest(rowOfTriangle): if len(rowOfTriangle) == 1: re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: What is the maximum addressable space of virtual memory? Saw this questions asked many times. But couldn't find a reasonable answer. What is actually the limit of virtual memory? Is it the maximum addressable size of CPU? For example if CPU is 32 bit the maximum is 4G? Also some texts relates it to hard disk area. B...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Need help in GPS location on android I need a simple code snippet which can do the following. I need a function which can do the following. * *check if GPS is enabled. If not enabled, then enable it. *check for the current location, i.e get longitude and latitude *Disable the GPS. I don't need the continuous...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: lastchild.appendchild in Firefox and Chrome The following code var descriptdiv = document.createElement("div"); document.body.lastChild.appendChild(descriptdiv); works in IE, but doesn't work in FireFox and Chrome. How can I get it to work in those browsers too? A: What you're most likely seeing is Firefox/Chrome ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ajaxful-rating confirmation when casting vote - ruby on rails I'm running an app that uses Ajaxful-rating with Rails 3 right now, but several users have commented that it is tough to tell if you've actually voted. Ideally I'd like a small growl-ish window to appear that says "Thanks!" or "rated!" or something like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Good example of application that uses rails and backbone.js that handles authentication through backbone Does anybody know of a good example I could look at as to how to go about implementing authentication through backbone with rails? I haven't been able to find anything.. A: You have several possibilities. First ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MFC: how to erase a just drawn rectangle Could somebody tell me how to erase a rectangle that has just been drawn on an image? In the application, I have an image displayed on a document (MDI application). The user can select a portion of the image. I implemented this feature as letting the user start the selection ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverlight How to pass a selected row of datagrid to view model I have a datagrid within a view <Grid x:Name="LayoutRoot" Background="White" Width="600" MaxHeight="150"> <sdk:DataGrid x:Name="grid1" ItemsSource="{Binding Persons}" SelectedItem="{Binding MyList, Mode=TwoWay}"> </sdk:DataGrid> </Grid> Withi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I get this rotated anchor to be positioned against right side? What I'm attempting to do is place a slide-out panel jQuery thing to display some ancillary information about a selected recipe on my website. I used this example as a starting point for the slide-out panel. But the anchor that triggers the slid...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Custom Button - Background Doesn't Change I'm trying to make a custom button, my only problem is that the background doesn't change. I am aware that i need to set the background value as {TemplateBinding Background} but i cannot seem to find the right spot. I tried at but it just doesn't work. The button was create...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unable to cast transparent proxy in a dll when called from PowerShell, but successful in C# console app I'm attempting to create an open source library that spawn a new AppDomain and runs a PowerShell script in it. I have a static method that takes the name of the powershell file and the name of the AppDomain. The m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: OS X & Python 3: Behavior while executing bash command in new terminal? I've seen similar questions (e.g. Running a command in a new Mac OS X Terminal window ) but I need to confirm this command and its expected behavior in a mac (which I don't have). If anyone can run the following in Python 3 Mac: import subproce...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Animate CSS value left and opacity doesn't work with jQuery? Here is the code. I can't make opacity animate as well. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> <script type="text/javascript" src="https://ajax.googleap...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Backup not working with PHP Script I am using the script found at this blog post. What I am trying to do is output the SQL Code onto the screen and then using file_get_contents from my local web server to get the SQL Query and mysql_query it to my local database. The problem is when I do this it gives me an erro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to insert date and time in oracle? Im having trouble inserting a row in my table. Here is the insert statement and table creation. This is part of a uni assignment hence the simplicity, what am i doing wrong? Im using oracle SQL developer Version 3.0.04.' The problem i am having is that it is only inserting the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Adding html class tag under in Html.DropDownList I've been looking for answers on how to add an HTML class tag on my html.dropdownlist. here is the code <%: Html.DropDownList("PackageId", new SelectList(ViewData["Packages"] as IEnumerable, "PackageId", "Name", Model.PackageId))%> I want to add classes for options ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: OCaml: Pattern matching vs If/else statements So, I'm totally new to OCaml and am moving pretty slowly in getting my first functions implemented. One thing I'm having trouble understanding is when to use pattern matching abilities like let foo = [] -> true | _ -> false;; vs using the if else structure like let f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: ggplot heatmap legend doesn't represent negative numbers I'm trying to make a heat map for a data set that includes negative numbers: Ne BR Error 10000 0.00001 1.62 10000 0.000001 -1.03 10000 0.0000001 -0.124 100000 0.00001 36.73 100000 0.000001 5.86 100000 0.0000001 -0.79 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How are a java Runnable object's other methods called? I am given some skeletons of classes that I must implement (I personally don't really agree with the design of the program but I am not at mercy to change it :( ) and they work in this manner: I have a Game class which implements Runnable and represents a chess ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to reverse the order of displaying content of a list? Let's say I have a list of integers. var myList = new List<int>(); 1, 2, 3, 4, 5, ..., 10 Is there any function that allows me to display them in reverse order, i.e. 10, 9, 8, ..., 1 EDIT public List<Location> SetHierarchyOfLocation(Location location) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Matlab dependency management I am looking to apply dependency management to a large-scale Matlab project. This project imports a large number of java libraries, as well as some compiled C++ code, to the extent that some software best practices are now becoming more essential. Is anyone aware of something along the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7536645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }