text
stringlengths
8
267k
meta
dict
Q: How do I draw a rotating prism in OpenGL? I'm trying to draw a simple crystal that rotates on its axis. I can get the shape right easily enough by drawing a pyramid and then drawing it again upside down, but I've got two problems. First off, even though I draw everything in the same color, two of the faces come out...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Enable and Disable Textboxes jquery I have enabled mutiple textboxes with jQuery. But I am not sure how to re-enable them if it the radio button is not selected. What modifications would I have to make to my current code? <script type="text/javascript"> $(document).ready(function() { $(":radio[id^=check]...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Export a java library in a .jar file I'm still pretty new to java and I'm VERY new to exporting .jar files. I've got a little game that I want to send to some friends and I was told in another question that I should export it to an executable jar file. Well I finally got that working on my computer but when I send i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: 'Confirmation token is invalid' when testing with Cucumber I'm trying to get a sign up form working with Devise; I'm testing it with Cucumber. When a user signs up, I send a confirmation e-mail. Something goes wrong when running my test, though. This is my scenario: Scenario: Signing in via confirmation Given ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rails, Alphanumeric validation in the controller In my app I let users select a username, just like the twitter signup page: https://twitter.com/signup When the user starts typing a username, I want in real-time to let the user know if the username is available & valid. The regex I've been using to validate the user...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: what is the order of source operands in AT&T syntax compared to Intel syntax? The Intel ISA reference documentation for this instruction is clear: VPBLENDVB xmm1, xmm2, xmm3/m128, xmm4 Select byte values from xmm2 and xmm3/m128 using mask bits in the specified mask register, xmm4, and store the values into xmm1. x...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I reflect changes made to ViewModels for other windows? My app contains the following moduls: SystemModel --> SystemViewModel --> SystemWindow SettingsModel --> SettingsViewModel --> SettingsWindow My SystemViewModel contain SettingsViewModel and other things. In my SystemViewModel I create some Instance that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How I can convert my json data to html? I have get $.getJSON('ajax/ajax-test.php', function( data ) { .... }); json data I am trying view: { "1": { "section":"painting", "category": { "1":"african", "2":"modern art" } }, "2": { "section":"antiq...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: problem with 2 elements in android layout I have the following layout for two things -> a back button and a title text view.the back button is supposed to to align to the left of the parent while the text is supposed to be at the centre. Somehow, its not working and I dont have any clue why. Can anyone kindly help m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Finding line number of a word in a text file using java I require searching a word in a text file and display the line number using java. If it appears more than once I need to show all the line numbers in the output. Can anyone help me please? A: Read the text file using Java class LineNumberReader and call method...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: apache SSLEngine On, in separate Vhost, or mix with :80? I'm unsure if I should create a separate Vhost in apache for HTTPS purposes. I need to pass the "SSLEngine" option and I'm wondering if that would hurt performance on normal http-requests? Does it matter if I use SSLEngine On inside a *:80 Vhost, like so: <Vir...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Trouble getting a list of cities from LS I'm struggling getting an array of LS cities... file_get_contents() returns an empty dropdown on their roadblock requiring you to select cities. Unfortunately it's empty... so then I thought it was coming from an ajax request. But looking at the page I don't see any ajax re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I make this REGEX ignore = in a tag's attribute? Alan Moore was very helpful in solving my earlier problem, but I didn't realise until just now that the REGEX he wrote for pulling out all of a tag's attributes will break prematurely if there's an equal sign in a URL. I've spent a good while on this, trying di...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how do I reload a div with a rails partial is there a way in rails to reload a div with a partial Controller def home @events = [] end def ajax_load_events ... @band = Band.find_by_name(@artist) begin artist = Bandsintown::Artist.new({ :name => @artist }) @events = artist.events rescu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JQuery mobile: reading from $.mobile.changePage I'm using jquery mobile 1.0b3 and i'm creating two pages where one page has to send data to the second page with a button. I know that a "a href" element could be rendered with a button but if i want to send some custom data from a page to another i can "override" mobi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to find apostrophe in string using PHP? I can't get to detect an apostrophe (') in a string. I tried if (strpos($username, chr(39)) > 0 ) if (strpos($username, '\') > 0 ) if (strpos($username, "'") !== FALSE)) without luck. What's the right way of doing it? A: you listed this one, and it should work: if (strp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to utilise google maps to replicate functionality similar to rightmoves' draw-a-search? I know this will be a complex solution. I would appreciate it if you could push me in the right direction. Please have a look at http://www.rightmove.co.uk/draw-a-search.html. I am interested in finding out how this is possi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Winform DataGridView Control With Extended Capabilities I am looking for a DataGridView control for Winforms which has the following capabilities with little or no programming (once the the control is bound to datasource). * *Disconnected Search/Filtering *Pagination *Backend/Frontend Column Groupping *Export...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: python: class attributes and instance attributes I'm new to python and learned that class attributes are like static data members in C++. However, I got confused after trying the following code: >>> class Foo: ... a=1 ... >>> f1=Foo(); >>> f2=Foo() >>> f1.a 1 >>> f1.a=5 >>> f1.a 5 >>> f2.a 1 Shouldn't f2.a als...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Javascript oop-like fail(?!?) Consider this: function f2(x) { return x+1; }; X = function(){ this.f1=function (x) { return 2*f2(x); } return this; }; then x = new X(); x.f1(1) works fine. But when i want to do this: X = function(){ this.f2 = function(x) { return x+1; }; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to have OpenGL draw on a memory surface? I am starting to learn OpenGL and I was wondering if it is possible to have it draw on a video memory buffer that I've obtained through other libraries? A: For drawing into video memory you can use framebuffer objects to draw into OpenGL textures or renderbuff...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Programmatically prevents battery charge Some computers (e.g. Dell, Vaio) come with software that prevents a battery from charging. This functionality allows me to use my laptop with battery (protected from power outage) and keep my battery from charging until it's down to, at most, 50% battery/charge remaining. I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: why would spaces in a Python tuple matter? I've been getting weird results and I finally noticed that my habit of putting spaces in a tuple is causing the problem. If you can reproduce this problem and tell me why it works this way, you would be saving what's left of my hair. Thanks! jcomeau@intrepid:/tmp$ cat haver...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: float <-> std::string conversion alternative? is there any alternative to atof, strtod, lexical_cast, stringstream or sprintf? that is: * *fast *C++ way (std::string instead of char*) *safe (no buffer overrun risk) *valid (return NaN if conversion couldn't be made) *no external library (independent) I prefe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Question Regarding Getters & Setters I know this might be a stupid question to many but I usually like to stick to correct/better implementation. In Java, when writing a getter/setter, would it be better to refer to the instance variable with this or access it directly? Thanks A: When writing a setter you are typic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: "Error: attempt to index local 'self' (a nil value)" in string.split function Quick facts, I got this function from http://lua-users.org/wiki/SplitJoin at the very bottom, and am attempting to use it in the Corona SDK, though I doubt that's important. function string:split(sSeparator, nMax, bRegexp) assert(sSepa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I keep the number pad always appear in uiview? I am making an uivivewcontroller which I want the number pad always appear like this. How can I make that? Plus, why the upper view which looks like a uitableviewcontroller seems unscrollable? Is that not a uitableview, how can it be made? All in all, I'd like t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JQuery script not working with IE8 I am using this marquee plugin for JQuery: http://www.givainc.com/labs/marquee_jquery_plugin.htm This creates a streaming ticker out of ul and li elements. I am using imbedded Ruby (Ruby on Rails) to provide the data. This works on the Mac using Safari and Firefox, and on Windows u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: adding class in jQuery not working in IE9 I am working on a menu for a WordPress theme. I am trying to style the menu such that on hover, menu items that don't have a submenu look one way, and menu items that DO have a submenu look a different way. I have the following jQuery $(document).ready(function(){ $('.me...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Update text with submitted data w/jQuery I have a form on a page. I have a link acting as submit button. The value is sent to a php page via ajax where the value is set into a session. After submit I swap the form with text field where the text is displayed. How do I use the text from the submitted form to display w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to search for string in file How could I search for string in text file in java? Would it have to be in a text file or could it read a .ini or some other file type example sound = off opengl = on openal = off I tried searching for it on google but I couldnt really find anything. Thanks in advance A: It looks l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Trying to post date via php with mySQL... Need help I'm trying to post the date and time at the time I create a new record. The record is created but the 'add_time' column is blank in mySQL. What's wrong with it? $date = date("Y-m-d G:i:s") ; $order = "INSERT INTO cartons_added (add_time, type, part_no, add_type,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Emacs like strict auto-indent in vim Emacs, while editing a C file, forces me to follow a particular indentation. When I press tab on an incorrectly indented line, it corrects the indentation. I want this behaviour from my vim editor. Till now I have done the following : set cindent set smartindent set autoindent s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: redirect with .htaccess a dynamic URL to a new static page How can I redirect with .htaccess a dynamic URL to a new static page, i.e. pages like: /page2.php?view=preview&image=33&category=2 /page2.php?view=thumbnailList&category=1 /page2.php?view=thumbnailList&category=3 etc, to: /index.php/photo-gallery There are...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Help with php function zip_open It's now 5am, and as much as I try to research, I can't find much information on this function set. Here's the code I have (shortened slightly): <?php $source = $_FILES["restore_file"]["tmp_name"]; $zip = zip_open($source); while ($zip_entry = zip_read($zip)) { echo zip_entry_name...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Manually Triggering Form Validation using jQuery I have a form with several different fieldsets. I have some jQuery that displays the field sets to the users one at a time. For browsers that support HTML5 validation, I'd love to make use of it. However, I need to do it on my terms. I'm using JQuery. When a user clic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "125" }
Q: Objective-c How to load a UIViewController in synchronous way my main application view load a UIVIewController for showing a disclaimer, user can or not accept, in a modal way. The disclaimer UIVIewController has 2 buttons, 'agree' and 'disagree'. If user clicks on 'disagree' the application close itself. If user cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Spring Jdbc Template returning Int as Long? I have 3 columns in my MySQL table, 2 are INTs and one VARCHAR. I am getting class cast exception: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer. Heres my code: List<Map<String, Object>> rows = getJdbcTemplate().queryForList(sql); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does KIF UIView:dragFromPoint:toPoint not result in touchesEnded:withEvent being called on my view? This question is about the iOS acceptance testing framework KIF. I have a test step which uses the KIF extension to UIView dragFromPoint:toPoint. I have a custom view class which implements touchesBegan/touches...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: A multi-conditional switch statement? This is something that I haven't seen in the PHPdoc for switch() so I'm not sure if it's possible, but I'd like to have a case which is multi-conditional, such as: switch($this) { case "yes" || "maybe": include "filename.php"; break; ... } Is this valid synta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: null session on page method I'm using InProc session state and for some odd reason, the session variables are always null when I'm using a page method. If I do this: var test = HttpContext.Current.Session["test"]; it's showing nothing when I'm running on a page method but if I continue debugging and open another pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Adding a CADisplayLink to Cocos2D I have Cocos2D in my app and I use it as the game engine for my game. At this point I need to have a game loop fire at the rate the screen refreshes. So this leads me to think that I need to use CADisplayLink. So how would I implement CADisplayLink so that my game loop which will co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I SELECT DISTINCT on one (excluded) column, but include other columns in the query? (ORACLE) So I have data arranged loosely like this: Table 1 - PEOPLE: person_id (primary key), parent_id, child_id, other_parent_fields, other_child_fields Table 2 - PARENTS: parent_id (auto incrementing primary key), other_f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When I type "rails server", I get an error "Could not find gem 'turn <>=0>' I am totally new to ror. Installed it today. Created the first app following Lynda instructions. Within the app folder, tried to run WEBrick but got this mistake: Could not find gem 'turn<>=0>' in any of the gem sources listed in your Gemfi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SetTextColor of TextView programmatically I have a ListView with a TextView in each row. I have a default color.xml with is set in the row.xml I have different colors for different states <selector xmlns:android="http://schemas.android.com/apk/res/android" > <!-- pressed --> <item android:color="#f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I create absolute paths for INCLUDEs and REDIRECTs that will work regardless directory nesting level? I have a problem similar to the one mentioned here, except I need a solution for ABSOLUTE PATHs: How to use a PHP includes across multiple directories/sub directories with relative paths The additional bit in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Having an Iframe with `a` tag with some id on it, how to create a new iframe that would follow that `a` url? We have a main web page with Iframe on it. So we have a web page loaded into Iframe. There is a link on it (a tag). We know its id. How to create a new Iframe on our main page that would follow that link? (li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Git/GitHub can't push to master I am new to Git/GitHub and ran into an issue. I created a test project and added it to the local repository. Now I am trying to add files/project to the remote repository. Here's what I did (and this worked) - git remote add origin git://github.com/my_user_name/my_repo.git Now when I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "155" }
Q: Require help understanding a prolog method for appending list elements append([],Xs,Xs). append([Head|Tail],List2,[Head|Tail2]):- append(Tail,List2,Tail2). The upper append method adds elements from first two parameter slots to the third param variable. ?-append([2,1], [3,4], X). ?-X=[2,1,3,4] The way I see it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Email to SMS script I am searching for a script that can forward emails to SMS. By Google'ng I found few PHP script. But I need in ASP.NET Is there any free script that automatically send emails to SMS. Or at least can anybody tell me how to get started to make my own script? A: Best bet would be to use an SMS Gate...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Xor encryption in PHP I'm new to Xor encryption, and I'm having some trouble with the following code: function xor_this($string) { // Let's define our key here $key = ('magic_key'); // Our plaintext/ciphertext $text =$string; // Our output text $outText = ''; // Iterate through each character for($i=0;$i<...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Zend Framework Bootstrap question I am new to Zend Framework. I have a master layout file and I want to add and remove css/js files dynamically. I plan on creating an XML file which contains which controller/actions should have which files added. I was thinking of having the constructor for the controller read the x...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Load pages using jQuery/Ajax in the same div that loads a page every 6 sec? On my index.php I have a header, sidebar, footer and the main part of it is the <div id="feed"> that loads engine.php every 6000 ms. I have a Contact page ( contact.php ) in my sidebar. Instead of copying my index.php to a new page, with hea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to update data in a List extends Map> I'm making use of a List<? extends Map<String,?>> that I populated with data. cursor.moveToFirst(); while (cursor.getPosition() < cursor.getCount()) { item.put("ProdName",cursor.getString(2)); item.put("ProdSize", cursor.getString(3)); item.put("ProdPack",cursor....
{ "language": "en", "url": "https://stackoverflow.com/questions/7548675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MS Access: Can't change the file type in the Save As dialog box I have an .mdb file created in access 2003 and I'd like to convert it to access 2007 .accdb but when I go to the Save as dialog it lets me save the file only as it's current format(.mdb) and there isn't any additional file formats in the drop down box. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: My posted date via php is off 1 hour... How to fix? My date is ahead 1 hour when I post to mySQL via php. I'm in Los Angeles. How can i make the time correct? Here is what I currently have: $date = date("m/d/y g:i A") ; A: see date_default_timezone_set like date_default_timezone_set('America/Los_Angeles'); A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cakephp mysql connect errors with remote database Just baked an app and got this on my cake homepage Warning (2): mysql_connect() [function.mysql-connect]: Premature end of data (mysqlnd_wireprotocol.c:554) [CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 561] Warning (2): mysql_connect() [function.mysql-c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C++ operator() optimization on vectors I'm writing numerical code, in which it is useful to define vector operations. E.g if x and y are n-long vectors full of floats, it is nice to have x^y result in a in the ith element of y equaling some arbitary function of the ith element of x. One simple way of doing this is: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to grab number after word in python I have a huge file containing the following lines DDD-1126N|refseq:NP_285726|uniprotkb:P00112 and DDD-1081N|uniprotkb:P12121, I want to grab the number after uniprotkb. Here's my code: x = 'uniprotkb:P' f = open('m.txt') for line in f: print line.find(x) print line[36:31 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: masking UIImageView when it leaves the UIViewController's frame I have an Advertisement UIViewController class that contains the following code. The frame is the exact dimension of the image. When it animates down I want it to disappear at the 76.0 point. I made the UIViewController's frame the same size as the imag...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: 2D Circle and rectangle intersection tests What I'm doing is testing to see what the level of intersection between a circle and rectangle. I would like to find whether the rectangle is completely inside the circle, partially intersecting it, or if there is no intersection at all. I've attached the code that I've com...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: QuantumGrid VCL - How to change the text of a Hyperlink column in the cell click event? Using: Delphi XE, Devexpress VCL. In the cell click event, I am trying to change the value of a cell in a hyperlink column in Devexpress's QuantumGrid VCL control. The column is a custom column and is not bound to the dataset. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why broadcastreceiver doesn't receive the broadcast? As mentioned in the question, and the following shows mu code .. AlarmActivity package adham.test; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view....
{ "language": "en", "url": "https://stackoverflow.com/questions/7548708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Regular Expression to match a string, that doesn't end in a certain string I an trying to write a regular expression to be used as part of a replace operation. I have many paths as follows: <ProjectReference Include="..\Common.Workflow\Common.Workflow.csproj"> <ProjectReference Include="..\Common.Workflow\Common.Wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Multi-level navigation menu options? I am doing a small web project for a friend's business. I'm looking for a plug and play navigation menu that I can use that supports multi-level navigation. I'd also like to have as much styling control as possible with the navigation menu. The best free menu I found on the we...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery UI Autocomplete ignore non alphanumeric letters I want to ignore all non alphanumeric letters from autocomplete input. For example if user inputs K P COLLECTION it can search K. P. COLLECTION. This is my code on http://jsbin.com/usupem Code: var autocomplete_data = data here... $( ".autocomplete" ).autocompl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Base Classes on Proxy Objects I have a webservice that is wrapped up by a data access object and is accessed by many different UI controls. The proxy objects look something like this: Public Class WebProxyObject1 ' Common properties, there are about 10 of these Public Name As String Public Address As St...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Alternate of BufferedImage in C++ I am using BufferedImage in my Java program for storing some information in an image. The problem is that I want to create a similar program in C++ but I can't find an alternate of BufferedImage.. Looking forward to some useful ideas. Thanks A: You can have a look at the cairo li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JavaScript timeout on iPad Safari vs. Win 7 Safari I am using the latest version of jqGrid (4.x) for an application displaying local data. * *Win7: All works fine on several browsers (Chrome, FF, IE, Safari). *In iPad's Safari the grid works excellent, but there is one issue: When I unload the grid because I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cron job not working in Whenever gem I have an application that contains a bunch of tasks, and every day I want to run a cron job that creates a DayTask for each Task in the database. A Task has_many DayTasks and these daytasks are what users will be checking off every day. I'm using the whenever gem but it doesn't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Validations not done while submitting rails form via jquery I did a simple rails form with two user inputs , name and email. I'm using rails 3.1, so I used :remote => true in my form_for tag. I also created a create.js.erb and added corresponding format.js in the users_controller.rb. I added the following lines in c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: copy rows from srce to dest ignoring records already in dest I have two tables in two seperate databases with slightly different structures: destTable: name, address, city, state, zip, country, email, phone, company srceTable: company, address, city, state, zip, country, name, email, phone When I try to use this sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Countdown with jQuery So, I have this outputted from my DB: 00:01:53 Inside a span tag <span class="jb_timer">00:01:53</span> So my question is, how can I make it countdown with jQuery? Thanks. A: Here's something that should get you started in the right direction: var remaining = $("span.jb_timer").text(), r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Data Virtualization not working I have been trying to gain performance by implementing virtualization for my ListView. I use the following article to achieve that : WPF: Data Virtualization By Paul McClean http://www.codeproject.com/KB/WPF/WpfDataVirtualization.aspx the problem is that instead of loading just a coup...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Second Activity shows blank screen after first Activity starts Intent Hi I'm trying to use an implicit intent to start a second activity. The TextView and Button work for Activity One, but when I click the button to start the second activity, I do not see any of the TextViews in the second activity. All I get is a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Set date format with existing records php mySQL. How? I have a mySQL with a table. There are 30 records all with a date column. How do I change all my existing records in my table to have today's date with is format? date_default_timezone_set('America/Los_Angeles'); $date = date("m/d/y g:i A") ; A: Here's the fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Android. Launch dialog from context menu I have a listView and want on long press show my custom dialog. How I cat to do this? All my attempts brought nothing to me. Dialog never shows, ANR is occurs. @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { su...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548756", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Seeking advice re: accessing MySql db via Android app I'm looking for some advice on the best approach to access a MySql db from an android app. I am trying to interface with a web site (not written by me) that uses PHP. I have access to the developer of the web site, but, he does not know android. The web site i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: generate a date string in HTTP response date format in C I'm trying to generate a date string from current time to put into HTTP response header. It looks like this: Date: Tue, 15 Nov 2010 08:12:31 GMT I only have the default C library to work with. How do I do this? A: Use strftime(), declared in <time.h>. #inclu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Data driven unit tests problem I'm having some troubles getting my unit tests to be setup to use an Excel .xlsx data source. My App.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="microsoft.visualstudio.testtools" type="Microsoft.VisualStudio.TestTools.UnitT...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Call an access function outside access with VB NET I would like to call a custom created function in access from VB NET. For example I created a myRoundNumber function in Access when i create a query in access with that function it works but outside it doesn't. A: You cannot use custom Access functions in a query o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Show different message to the hours | php here is my code, where i make mistake? Btw my time ZONE is UTC + 2:00. Thanks for answers in advance. <?php $current_time = date('H'); if ($current_time >18) { echo "Good night"; } if ($current_time <12) { echo "Good morning"; } if (($curre...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are there any difference between aspx and code behind when assigning text values asp.net 4.0 c# This is code behind assigning aspx.cs if (srLang == "tr") { lblUnWantedPrivateMessages.Text = "Özel Mesaj Almak İstemediğiniz Oyuncular"; lblPmBlockUserNameTitle.Text = "Oyuncu Adı:"; } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Any good simple DirectX samples for Windows 8 (Developer preview)? Are there any good tutorials on how to draw a simple triangle in DirecX for Windows 8 Developer preview? The game sample is too complex to understand the "basic" workings of the new DirectX version (which seems to be completely different from DirectX...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Disable or turn off the auto generation of mappings based on the POCO properties I am using the Code First constructs to connect to an existing database (which, I know is not code first technically). I do this so that I can mock out Fake Data Repositories using LINQ to Entities instead of LINQ to SQL. In the CTP3 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Refresh output line containing download percentage I'm writing a script that has to download several files from the www. To make it more expressive I've just added a download hook to calculate the downloading percentage of the file that has being downloaded. Printing it out on the terminal produces a lot of output b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: System.Windows.Interactivity: Could not load file or assembly 'System.Windows, Version=2.0.5.0 I am trying to reference System.Windows.Interactivity in order to support IsExpanded behavior command But as soon as i add a reference to this assembly, i get the error loading System.Windows 2.0. This appears to be a know...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Windows Media Encoder SDK - Figuring out when conversion is done in native C++ I use the Windows Media Encoder SDK to convert WAV files in the WMA format. It works pretty nice BUT I have a huge problem finding out when the process is done... The funny thign is that I have used parts of code from the SDK itself to ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .Net - LINQ query returning a single object? Is it possible to use a LINQ query to return a single object instead of a list? User user = (from User u in users where u.id == 5 select u); A: Use one of: .Single() // return a single .SingleOrDefault() // return a single or the default value if there are no...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Regex for "AND NOT" operation I'm looking for a general regex construct to match everything in pattern x EXCEPT matches to pattern y. This is hard to explain both completely and concisely...see Material Nonimplication for a formal definition. For example, match any word character (\w) EXCEPT 'p'. Note I'm subtracti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Facebook Cache won't flush? I just renamed my facebook application, but the Like button and the link sharer didn't change, even I used the debug tool (no more Linter tool ??). Any Idea how can I do that? A: you have to clear the facebook cache of your app/url. you can do this on the facebook url linter. http://deve...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Oracle jdbc creating a table, sequence and trigger I'm trying to create a table with a sequence and with a trigger for that sequence. When I do this within Oracle Express edition I have the following SQL statements. Which DO run correctly inside Oracle Express using the same user I log in with JDBC. CREATE table "TE...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.net Entity-Framework (Basic) Questions (ASP.net MVC 3.0 Razor, EF Code First) My first question is: where do I store my data? in the Initializer or in the .sdf? And my second question is this: I have a class for Songs, and one for Artists. This is from my Initializer: var Artists= new List<Artist>() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class error message: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationExcepti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Problem with sprite sheet The code below shows how I'm cutting my sprites, but the memory usage grows constantly. How can I fix? CGImageRef imgRef = [imgSprite CGImage]; [imgView setImage:[UIImage imageWithCGImage:CGImageCreateWithImageInRect(imgRef, CGRectMake(column*width, line, width, height))]]; CGImageRelease(i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: byte-code: Symbol's value as variable is void: org-babel-tangle-lang-exts I had Emacs working pretty well and then I restarted my computer. Now this block of code prevents me from loading my init-files: (require 'ob-clojure) (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . nil) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Multiply elements of a matrix along its third dimension For programming in MATLAB, how can I write a function that will take a stack of matrices in a variable (let's say M) and multiply them together and return in answer in an output argument. It would be preferred to put M as an input argument of the function. And ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Implementing URL shortener logic in JavaScript As a result of finding this interesting question, I decided to write an example in JavaScript which implemented the logic and contribute it back to the question. The problem is that I'm having some issues implementing the logic. I can speak Ruby which is what I'm basing...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the functional differences between iODBC and unixODBC? There are two major Open Source platform independent implementation of the ODBC. It is iODBC and unixODBC. Considering Unix as ODBC user platform and feature-wise, what are the real practical differences between these two implementations? A: I finally ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: how to run a python file on a linux server as a page I want to begin with the fact that I know nothing about linux, and I found a script that I would like to run on my server as a page, but when I goto the .py file it downloads the file!!! how am I suppose to run it?? am I suppose to use a php file and do a command ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }