text
stringlengths
8
267k
meta
dict
Q: Comparing array vs. database, unsetting values, without losing offset? I'm using a rather rudimentary process of checking an array of urls vs my database of urls which are unique. $sql = "INSERT INTO linkz (url, last_visited) VALUES ('".$url."', NOW())"; I then unset the value of the array if it errors via: if (!mys...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: why is constructor expected in instance definition in Haskell Can anyone explain this error: Syntax error in instance head (constructor expected) class Nullable v where default_val :: v instance Num a => Nullable a where -- error reported here default_val = 0::a Thanks A: First off, hackage has you covered....
{ "language": "en", "url": "https://stackoverflow.com/questions/7523240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: GTK - How to know that the dropdown list of the GtkComboBoxText gets shown A GtkComboBoxText consists of a text entry, a dropdown list and a button to show the dropdown list. I want to populate the contents of the drop down box of a GtkComboBoxText when the user clicks on the dropdown button. This is because the dro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: OpenGL- Simple 2D clipping/occlusion method? I'm working on a relatively small 2D (top-view) game demo, using OpenGL for my graphics. It's going for a basic stealth-based angle, and as such with all my enemies I'm drawing a sight arc so the player knows where they are looking. One of my problems so far is that when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Parsing Django QuerySet with JQuery using AJAX I am returning a QuerySet of 1 and my JQuery looks like this <script> $(document).ready(function(){ $("#search_form").submit(function(event) { event.preventDefault(); $.ajax({ type: "POST", url: "object/search/", ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: form_for wrong number of arguments (3 for 2) since upgrade to rails 3.1 this form_for used to work before I ported my application to rails 3.1 <div class="form-box" style="padding-left:1em;"> <% action = @existing_mass.nil? ? "add_to_power_plant": "update_power_plant_substrate"; submit_button_label = @ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: symlink or alias? Not sure what its called I want to redirect request on my local webserver much like "http://localhost/" redirects to my ServerRoot. I have seen it done with "http://www/" and also with "http://helpdesk/" How would I go about adding my own? A: Are you saying you want to redirect something like http...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET code rendered in Chrome looks different I was wondering why the following code: <asp:ComboBox ID="DropDown1" runat="server" Width="30px" AutoCompleteMode=None AutoPostBack=false DropDownStyle=DropDown EnableViewState="True"> </asp:ComboBox>&nbsp;<asp:Literal ID="myid1" runat="server" Text="Days"></asp:Liter...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NSTimer Pause / Playfile1, Pause / Playfile2 is there way to use NSTimer to play a number of sound files to completion in order, or how would I play 3 sound files, one after another, each starting after the previous completed. Each file is only 2 seconds and I figured I could do something with NSTimer, but the logic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Prompt window alert for opening new window I have an iframe of a website let name it foo.com what happen is that if the visitors click on the iframe on my website what happen now is that it will right away open a new window The iframe is a video embed.... So I just want to find out would it be possible if I want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Like button plugin goes wrong on IE (inside hidden div) I am having a problem with the visibility of my LIKE BUTTON social plugin. the problem only occurs on IE (it works just fine in Chrome & Firefox), and only to the type of "box_count". I tried multiple ways to implement the plugin (iframe, fb:like etc...) and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: "Faking" a JavaScript Constructor Context I am working on improving my JavaScript skills and I'm learning more about prototyping. I want to better understand the code in this question and any limitations or problems with it. One thing that hasn't been obvious is defining more complex constructors that do more than s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHPUnit: Use Mock to modify return value? I would like to have a PHPUnit Mock which executes a method like normal, but then modifies the return value in some way before the function returns. What I have I have a set of derived classes, similar to below: abstract class Base { abstract protected function getUrl();...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# client/server Question I'm incredibly confused as to what is going on here. I've been putting in break points and I just can't seem to understand. Basically, I have a client and a server. I want the client to send two separate strings of data. From putting in break points, I noticed that my client does in fact fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do users control permissions of Timeline actions that are published? According to https://developers.facebook.com/docs/beta/authentication/, the 'Default Activity Privacy' field in the Auth Dialogue can only have four values: None, Friends, Me only, or Public. I think this is either a huge oversight in the API o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generic methods in Java I have more of a .NET background, so I've been having some trouble coming up with a generic method I need in Java. Basically, I have a base class, call it AbstractBase, from which my domain objects inherit from (call them ClassA and ClassB). I want to write a method that returns a specific ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: explanation for "illegal type synonym family" I'm just curious why I have to write this, instance (HzMonad , Data.Suitable.Suitable α, γ ~ ExprTyp α) => VarDecl γ where var = varhz instead of this instance (HzMonad , Data.Suitable.Suitable α) => VarDecl (ExprTyp α) where var = varhz -- error Hz2/Lang...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Android & T-Mobile Internet Connection Problem So, this is a strange one. I have an app that uses permission INTERNET but am unable to access the Internet on any T-Mobile device. If the device is on wifi, the app works as intended. The app also has been tested with AT&T and Sprint devices and works as intended with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android: Amplitude value to Decibel value? I'm trying to get the decibel of noise being recored from mic on Android phone. I can get amplitude value and looking for the formula to convert it into decibel. I use following function of MediaRecorder to get amplitude. mediaRecorder.getMaxAmplitude() ; In another que...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: code for sending data from android to VB through wifi I want to create a food order system at the restaurant using the android and VB. so the waiter will use Android to transmit data to the cashier who use VB. Is it possible to connect Android to VB? anyone please help.. VB version i used is Visual Basic 2010. i use...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: using the ui library while iterating over a table in coronaSDK In CoronaSDK, I'm trying to make a certain code that creates a lot of buttons and plays sounds for each of those buttons more "efficient" by first creating a table of strings and then creating the buttons and handlers by iterating over the table. I'm us...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP Framework and ORM vs Stored Procedures I am in the process of picking a PHP framework for a web application I am starting. I have never really used a framework in the past but with this project there is a great need. I have been debating between the usual suspects; CakePHP, Zend Framework and Symfony. I have bee...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: codeigniter dynamic number of fields inserting I am using codeigniter and doing some insert and update operation on my table from the associative array (which comes from the external website) , where the number of fields are not always same. Here is my code. $url ="http://api.peerindex.net/1/profile/show.json?id=$...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Making a php script that supports modules Ok, this is kind of non-descriptive, but I wish to make a site in which I am able to add and remove "functions" via adding and removing php modules. Basically, is it possible to make a site like a framework where you can insert and remove various php modules, similar to how ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding a method to an instance of an object in Javascript and using the 'this' keyword inside it I have written a checkers game model which has a Board object that holds a bunch of Piece objects. The Piece objects have an event (pieceMoved) which they fire each time they are moved. I am using EaselJS to render this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Passing custom variables via paypal (IPN) gives me wrong values I've been trying to figure this out alone. However, there is something odd going on here. I've got a hidden custom field with the e-mail of a user (just in case they use another email at paypal), but - when the IPN request is done, the custom field is s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Undentified Publisher on a signed setup executable during install with Vista I have a setup executable which I have signed with a Verisign cert. The executable displays the correct publisher information during installation with XP and Win7, but on Vista it displays it as "Unidentified Publisher". I've checked each a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problem with aptana 3 plugin in eclipse indigo I used to code rails using eclipse with radrails plugin, now I have installed aptana 3 plugin in eclipse indigo(last version) and I have several problems: 1) Editor has black background and coloring is different. 2) I don't see the radrails perspective, just web. How co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523336", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is PHP's mail() function attachment support a bit broken on Windows? I had a ticket logged by a customer today reporting that PHP's mail() function was timing out on him on one of our Windows 2003 Server boxes when trying to send attachments. Upon investigating I was able to reproduce his problem. Messages containin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: inplace edit question i have a very nice inplace edit mootools inlineEdit Plugin and you can test it on this link http://dev.justinmaier.com/inlineEdit2/ but there is proplem in use it in my project becouse i use jquery and i try jQuery.noConflict(); but didn't work because the code is too complex i like the moo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java How to link library at runtime I have a java application and it needs linking some external library( actually jar file) to load at runtime. How can I do that? A: Not quite sure if link is the term you want to use, but in Java you typically just need to add your jar to the class path to make its classes and th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: parsing arithmetic expression in Scheme I know how to use stack to process an arithmetic expression string like `(1 + 2) * 3'. Is there a typical Scheme solution to this issue? A: It's a little hard to tell what question you're asking. In Scheme (or Racket), you'd almost certainly write such an evaluator "directly...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: radio_button in edit form I have a standard scaffold. In my edit action it looks like the value set with the radio button on the create action is not shown. How do I get the form to fill in the set value? <%= form_for([@rating]) do |f| %> <%= f.radio_button :environment, 1 %> <%= f.radio_button :environment, 2 %...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Mysql Command line not working on mac When I try to access mysql command line on my mac it gives me this error - it doesn't matter what mysql command, username, password, server or I use either: Launch of "mysql" failed: the PowerPC architecture is no longer supported. This happened right after I installed Mac OS X ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iphone @selector has two argument I have a method like this: -(void)A:(int)a B:(int)b{ } and want to put the method into a new thread: NSInvocationOperation *theOp = [[NSInvocationOperation alloc]initWithTarget:self selector:@selector(A:B:) object:nil]; but "EXC_BAD_ACCESS". A: The method you invoke with NSIn...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why has the statement "printfn" in F# different name in VS2010 object browser? I had know the difference between F# library and .NET library when I called their functions. But when I saw the statement "printfn" in VS 2010 object browser, I saw only the "public static T PrintFormatLine(... format)" instead of "print...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I call an arbitrary C function passed to another function? I'm writing a unit test framework (see SO for more details). Or view the code at GitHub. Safer Code describes a way to pass functions of arbitrary types. But how do I call such a function without knowing its types beforehand? Assume f needs no input, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What am I missing to apply this JQuery widget to dynamic elements? I have the following script: $(function() { $( 'input[id^="event_"' ).each(function() { this.datetimepicker({ stepMinute: 15 }); }); }); Typically applying the datetimepicker widget involves this code (which is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting a PCAP trace to NetFlow format I would like to convert some PCAP traces to Netflow format for further analysis with netflow tools. Is there any way to do that? Specifically, I want to use "flow-export" tool in order to extract some fields of interest from a netflow trace as follows: $ flow-export -f2 -m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to implement a "conditional foreign key" restriction? I have the following table definition: CREATE TABLE X ( A SOMETYPE NOT NULL, B SOMETYPE NOT NULL, C SOMETYPE NULL, PRIMARY KEY (A,B), FOREIGN KEY (A) REFERENCES Y (A) ); I want to add the following constraint: If C IS NOT NULL, then FOREI...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to create a new ASP.NET MVC web-site in Visual Studio? From asp.net/mvc i downloaded the MVC 3 Installer, and ran it: When it finished, i loaded Visual Studio and tried to create a "New" Web-site. But there's no option to create an ASP.NET MVC web-site: i expected to see something like what's shown on the ASP....
{ "language": "en", "url": "https://stackoverflow.com/questions/7523369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How is it possible to have more then 1 concurrent connection in IIS? From what I understand about the HTTP protocol is that it is stateless. This means (to me) that is, it is only ever serving one connection at a time. Even if there is 1,000,000 million users trying to access a site, it can only ever be serving one ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to make makefile for java with external jar file I need to make a makefile that compiles and executes my classes with an external jar file.. I have 4 classes;sync.java, FileSynchroniser.java, DirectoryTracer.java and SyncFileTracer.java. I also need to include gson-1.7.1.jar .. Heres my make file .SUFFIXES: .cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how do i include another project in github I have created a plugin for a javascript library and want to upload this to github as a new project. Within my plugin directory, i include the current code for the javascript plugin. So it's easy for users to get my plugin plus the javascript library, i thought i would i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: php variable loss at end of program I had asked a question before relating to what I believed to be the issue with my program, but was wrong in my assumption. So no, this is not a repeat of the same question. I had thought that I was using include() because a value wasn't being sent over, but through debugging I s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android font picker example? I'm looking to implement a font picker for my Android app. I already found some nice color pickers, can anybody point me to an example of a font picker that I can pop into my app? A: It should be pretty simple to make one using a ListView. Each row in the list could simply be a TextVie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Wordpress, Japanese sentence being displayed from right to the left I'm using Wordpress 3.2.1. In the back-end (admin area) everything is in English but I want to display some Japanese in the front-end. When editing a post I type Japanese and everything looks ok in the editor but once I save it and view the page it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Working with ctrl+c in vscmdshell I downloaded vscmdshell from the codeplex site. I was very much impressed with this tool . However I cannot break the current operation using ctrl+C in vscmdshell . I have downloaded the source code form the codeplex site , but I am not able to solve this issue . Can someone care ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Help Translating SQL to LINQ-to-Entities Well, I think trying to understand someone elses SQL can be trying enough but trying to convert said SQL to Entity Framework is another level of pain... I have this SQL: SELECT MAX(IntegerColumn) - MIN(IntegerColumn) / DateDiff(day, MIN(DateColumn) , MAX(DateCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using Hashtable to store properties to combat serialization versioning Other then the speed issues when accessing and hashtable and casting value types, is this really very bad? [Serializable] public class Cheat : ISerializable { public Cheat() { } public string Orange { get { return Convert.ToString(_mData...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I use Powermockito to mock the construction of new objects when testing a method in an anonymous class? I woud like to write a JUnit test to verify that the code below uses a BufferedInputStream: public static final FilterFactory BZIP2_FACTORY = new FilterFactory() { public InputStream makeFilter(InputStr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: PHP/SQL Activity/News Feed a.k.a Recent Activity Feed I need to learn how to create a well-designed PHP "recent activity" feed which displays the recent activity of users on the site along with their username, activity, and how long ago they performed that action/activity. I have no progress so far, any help is appr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Array values in SQL query? $sql = mysql_query("INSERT INTO `users` VALUES( '', '$form['name']', '$form['saddress']', '$form['apt']', '$form['zip']', '$form['homephone']', '$form['cellphone']', '$form['email']', '$form[' ']', '$form['c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to turn off Mongo (in Replica Set) properly without DB down? My server set up is like that: 2 x Servers . The mongoDB has replica set among both servers. Each is one node. and then I have my node.js server connect to the MongoDB. What happen was.. when I kill the secondary server. (shutting down the server)....
{ "language": "en", "url": "https://stackoverflow.com/questions/7523404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Fast way of converting a RouteValueDictionary to an anonymous object? I have a MVC3 RouteValueDictionary that I'd like to convert quickly to an anonymous type. for example: new RouteValueDictionary(){{"action","search"}} would be the same as new {action="search"} A: This isn't possible to do at run-time. The pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Has anyone used an SVN client with Visual Studio 11 Developer Preview? I know it's pre-release software and that not everything will work, but I wan't to try it out with a couple of projects I have in my SVN repository. I know I can use a tortoise svn and some other external SVN clients, but I'm looking more for som...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP string with SQL I forgot what was there command to format string (take care of ', \, /, etc) before you process it in mysql, like trim.... A: mysql_real_escape_string()?
{ "language": "en", "url": "https://stackoverflow.com/questions/7523414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: OpenGL - glDrawArray & VBO cause crashed? I found that we could not use VBO and Draw Array at the same time... it's cause crash.... I created a small project to test it, you can download it here: http://www.mediafire.com/?8jnqip7ca97u6vi it's a simple project init with OpenGL 1.1 (Creating a template Open GL in XCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: JSON.NET: Get a sub value? The Google Reverse Geocode API returns a json response: http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true How do I get the lat/long out of it using JSON.NET on Monotouch ? geometry": { "location": { "lat": 37.422...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to access the main activity's view from a custom widget? I have a custom "view" widget (CustomController) on my application's main screen. In the widget's constructor, I can access an image in the widget's xml file with the following code: (Note, img_cursor is an ImageView in "custom_controller.xml") public fina...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to format excel spreadsheet cells using Excel Macro Module? I am totally new to MS Excel and VBA Macro. I wanna know how to format cells or have an overall control on the spreadsheet using Macro VB. I have here a very simple code just to illustrate what I want to know. macro_format_test.xlsm: Private Sub Worksh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Adding HTML5 query selector to browsers dont't support it I'm using HTML5 selectors API aka querySelector all the time. Those selectors are really easy to use and handful. If you're not familiar with this API it's pretty much similar to jQuery selector API they get a CSS selector string and select right elements. Fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Notification Icon on HoneyComb is Too Dim I have an Android app that uses the NotificationManager to inform the user of certain events. When I call .notify(), the icon I specify is shown in the status bar. It works fine on various Android 2.2 and 2.3 phones. But on a Galaxy Tab 10.1 running Android 3.1 the notifi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ddply with lm() function How can I use ddply function for linear model? x1 <- c(1:10, 1:10) x2 <- c(1:5, 1:5, 1:5, 1:5) x3 <- c(rep(1,5), rep(2,5), rep(1,5), rep(2,5)) set.seed(123) y <- rnorm(20, 10, 3) mydf <- data.frame(x1, x2, x3, y) require(plyr) ddply(mydf, mydf$x3, .fun = lm(mydf$y ~ mydf$X1 + mydf$x2)) T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Getting text from QLineEdit to append to QTextEdit upon QLineEdit returnpressed() I'm trying to write a simple Qt program which takes text inside a QLineEdit and appends it into a QTextEdit object when the return key is pressed. Here is the code for my program: #include <QApplication> #include <QtGui> #define WIDTH...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Core Animation is not working with "alpha" value Before this code, my movie pic alpha is set to 0, CABasicAnimation* fadein= [CABasicAnimation animationWithKeyPath:@"alpha"]; [fadein setToValue:[NSNumber numberWithFloat:1.0]]; [fadein setDuration:0.5]; [[moviepic layer]addAnimation:fadein forKey:@"alpha"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Problem With Parameter Multiplied By Negative Value In Where Clause in OLE DB Source I've this query in my OLE DB Source, using a parameter inside it: select * from A where A.A_DATE >= DATEADD(d,-1*(CAST(? as int)),GETDATE()) with parameter X used. For sample case, I use X = 1. If I run the above query in the SQL S...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how do I manage facebook access token? I have an app which user can login using twitter and facebook to login, had no issues with twitter as the access token never expires, however facebook does. In my app I can connect fb account if user login twitter and vice versa. Facebook is basically used to share something to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does my clone fail in Scala? In the following I can clone the Hashtable but not the actual value val myHash = new HashMap[String, Int] myHash.put("A", 4) println(myHash("A").clone()) // fail myHash.clone() // works I get the error cannot resolve symbol clone A: You can't clone a number. Int doesn't hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Checking if custom control is already added to form I'm creating a custom C# control (form's title bar). One form can have only one title bar, and that's why i'm wondering something: When user (programmer) adds my title bar to his form, is there ANY way i can check if ParentForm already contains my title bar, and if...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why can't I use the plist I created? I created a plist called list.plist, I just can't read the information in it. NSString *path = [[NSBundle mainBundle] bundlePath]; NSString *datapath = [path stringByAppendingPathComponent:@"list.plist"]; NSArray *array = [[NSArray alloc] initWithContentsOfFile:datapath]; self.ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP: GD reference to binary I have a gd image reference (I've already manipulated the image how I want to), and now I want to store the image. Instead of saving it directly to a file, is there a way I can get the binary data, that way I can convert it to base64 then save the base64 string. The only option I've bee...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Any Alternatives of directly checking if any of the services has stopped? Because the Win32_Service class does not have a corresponding WMI event provider, the WITHIN keyword must be used to signify that the WMI polling mechanism should be used with a polling interval,using it to monitor if any of the services has s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why isn't this working javascript? I am using this to detect errors on my form... var error = false; if (val === '') { error = true; } if (error = true) { $('#joinForm .submit').click(function(event) { event.preventDefault(); }); } Simple really but not working, am I missing something stupid...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Arel Deprecation Warning when running rake db:create I'm trying to create an app in Rails 3.1 with mysql2 v 0.2.6. When running rake db:create, I get the following error: DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed. Database adatpers should define a visitor_for method which retu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Browsers behaviour when HTTPS response is not received Not sure if anyone knows what is the browsers behaviour when it didn't receive HTTPS response? For example: Normal Scenario: * *Browser request *Browser received loginpage.php HTML *Browser do a HTTPS POST with username & password *Browser received hom...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: A question about the code exception Env: VS 2008, C++ I have code like below: void HopeException(LPVOID nVerify) { char *p = NULL; p = (char *)nVerify; delete []p; } When I invoke the function "HopeException" with parameter not-NULL, like: HopeException(123); then I hope the program will...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get element which caused url change i have this js code using jquery $(window).trigger('hashchange'); on the bind event i want to get the src element like anchor tag etc $(window).bind("hashchange", function (e) { // .... element which caused this window event }); A: After looking through the source, specifically...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Print Local HTML using Cocoa I have a simple list of items that needs to be printed using Cocoa. I have a half-baked solution that uses an NSView with a custom drawRect: method, but it's fairly complex and not very easy to maintain. What I would like to have is an HTML string (which could be easily constructed from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: I try to save many lines in a txt file using isolated storage in WP7 but it will only saves one, how do I save many? I use this to save the score everytime the game is over IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication(); isf.CreateDirectory("Data"); StreamWriter sw = new StreamWriter(new ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iPad - Showing action sheet with picker view I'm adding picker view to action sheet which is working fine in iPhone. But in iPad, i'm not seeing the action sheet. I'm seeing one small rectangle at the middle of the screen in iPad. Here's the code that I wrote: NSString *actionSheetTitle = @"Select Date of Birth"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should Copy-Item create the destination directory structure? I'm trying to copy a file to a new location, maintaining directory structure. $source = "c:\some\path\to\a\file.txt" destination = "c:\a\more\different\path\to\the\file.txt" Copy-Item $source $destination -Force -Recurse But I get a DirectoryNotFoundExc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: jQuery - Add Ellipses, Break Line, But Do Not Truncate I would like to add ellipses to dynamic text contained within a scrollable div. However, I don't want the text to be truncated. I want the ellipses to be added, and then the text to continue on the next line. This is because the div only shows one line at a time...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Json.NET: Deserialization with list of objects I am processing JSON responses (displayed below) from a service on my Windows Phone 7 client. I am using Json.NET to deserialize them into an object, which contains List of products. But after I deserialize, when I looked into my serviceresponse object, I can see a lis...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SCRIPT5007: Unable to get value of the property 'SetReturnValue': object is null or undefined I have a page that works perfectly in all other browsers but breaks in IE. The error from the debugger is: SCRIPT5007: Unable to get value of the property 'SetReturnValue': object is null or undefined It happens when I cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Unable to use wx.NotificationMessage properly with wxPython I recently upgraded to the development release of wxPython (wxPython 2.9.2.4) since I needed the functionality of wx.NotificationMessage within my application. I have been trying unsuccessfully to create notification bubbles on certain user events due to so...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to load a different front page in drupal if a cookie is set? I'm trying to figure out how i'd write a module or something so that drupal will show the user 1 front page. If a cookie is set, they see a different one. So basically, I can't find the following even after googling. where would I do this? A module...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why there is no compile time error? Strange - Java I had an if statement checking some value, And encountered a weird bug(Not sure!). My code was incorrect syntactically and in result it produced a wrong result, however eclipse didn't raised any error while compiling. Why My below code worked? if((this.trackPointLis...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can Cairo draw directly onto a Gtk.Pixbuf? I have a fine, working system in C# that draws with Cairo commands in a render method. However, sometimes I would like to draw into a pixmap, rather than dynamically when the screen needs to be updated. For example, currently I have: public override void render(Cairo.Contex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Command line program for jailbroken iOS dies in iPad but not in iPhone 3G I'm trying to build a command line program to run in the terminal of jailbroken iOS devices. To keep it simple I tested with a simple hello world: #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello world!\n"); } Which I bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Simple PHP Session Question I have a login.php file that grabs from index.html's username and password form. The login.php checks to see if the user exists, logs them in, and meta directs them to the home page of the site. I lose the session variables when they go to the homepage... I have that page echoing them out...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.net url rewrite force lowercase I have: <!-- Force lowercase URLS --> <rewrite url="~/(.*[A-Z]+.*)$" to="~/handlers/permredirect.ashx?URL=${lower($1)}" /> Perm redirect simply 301 redirects to the new URL. This rule is meant to redirect any URL with an uppercase char to the lower case one. This however creates ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery - select all elements and remove their text Hello guys, I have spent about twenty minutes searching in vain for my answer, and need your help. There are thousands of requests for help on how to select elements with jQuery - but everyone wants to do with with some kind of condition, ie, only select an anchor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: AVFoundation Issue With Core Animation on Mac OS X 10.7 Lion With Mac OS X 10.7 Apple has introduced AVFoundation and I'm trying to generate a simple quick time movie containing an animated shape. The problem is that the core animation does not render and I end-up having only a blank "black" video. Below is the code...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: HTML/CSS - Internet Explorer floating issue Reference: http://webfreak.co.nz/contact.aspx If you go to this page on IE, the right block isn't floating inline, but it's all good in other browsers. What could be the problem here? View the source for the HTML and CSS. A: IE rounds up/down differently than modern brows...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Closing a Swing Frame, user vs system initiated close. How to tell the difference? When the user clicks the x to close the frame, I want to take one action. When Windows shuts down and triggers a close however, I wish to take a different action. Naturally, I will be using DO_NOTHING_ON_CLOSE or HIDE_ON_CLOSE and I k...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: I need to pass date/time dynamically to a JQuery widget. What is the best way to accomplish this? I am writing a script that utilizes the datetimepicker widget, which is an extension of JQuery's datepicker widget. The widget is applied dynamically to a generated list of events via this code: $(function() { $( 'i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: not familiar with c++ pointer, need help on the line *binSon[0].add(x);, it give me an error, an expression must have a class type, what do i do? struct Rectangle { tName Name; //name of the rectangle struct Rectangle *binSon[NDIR_1D]; //left and right son int Center[NDIR_1D]; int Length[NDIR_1D];...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Submitting multiple pull requests in Git with Github (General flow) I'm no git expert by any means, so I want to make sure the following flow is good: * *Find a repo I want to contribute to. (original repo) *Fork the original repo on github. (my fork) *Clone my fork to my machine, outside of any project I'm wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Editing the og:title in the open graph protocol I have a question about editing meta tags... when we created our app, it was in a private beta, so we titled it "OJO Agent Private Beta". However, we are now out of private beta and would like to change the meta tag accordingly. I understand FB policy regarding changin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }