text
stringlengths
8
267k
meta
dict
Q: How to set initial values of NSPopUpButton at startup in Cocoa I must be missing something obvious here. I'm trying to load a few items in an NSPopUpButton when the app starts. I added the following code in the init method: NSArray *listOfProfiles = [[NSArray alloc] initWithObjects:@"My Item 0", @"My Item 1", nil]; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What HTML5 Tags exactly I can use with html5boilerplate? I am wondering can we use tags like <aside> with Html5Boilerplate. If yes will it browser compatible? and what other tags we can use without fear of older browsers specially IE7 and IE8 A: According to the HTML5BoilerPlate site, it includes Modernizr. Moderni...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I strip parenthesis from a string in Ruby? I have a string, like this: "yellow-corn-(corn-on-the-cob)" and I would like to strip the parenthesis from the string to get something like this: "yellow-corn-corn-on-the-cob" I believe you would use gsub to accomplish this, but I'm not sure what pattern I would ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: PHP XML. IP validation My Xml looks like this example: <?xml version="1.0" encoding="UTF-8"?> <Allvotes> <vote score="2" ip="116.971.203.221"/> <vote score="5" ip="32.97.233.5"/> <vote score="3" ip="212.977.233.225"/> <vote score="5" ip="2.80.233.225"/> </Allvotes> When on my flash website (AS2), somebody p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Changing Property of a Style Dynamically I'm working on a WPF application. I have a Resource Dictionary in which I wrote custom Styles for the ToolTip and for the Button. Actually, for the button i've made two styles. One of them, has included an image to appear to the left of the content in the buttoon. <Style x:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Matching two files with awk codes There are two files first.file * *M1 *M2 *M3 ... second.file * *A1 M1 *A2 M1 *A2 M3 *A3 M2 *A3 M4 *A3 M5 .... I want to match first.file to second.file My result file should be like that: result.file * *A1 M1 *A2 M1 *A2 M3 *A3 M2 How can I do that with awk...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Simple HTTP server in Ruby using TCPServer For a school assignment, I am trying to create a simple HTTP server using Ruby and the sockets library. Right now, I can get it to respond to any connection with a simple hello: require 'socket' server = TCPServer.open 2000 puts "Listening on port 2000" loop { client = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: android google maps import are not recognized i tried to run the project which i found on this link http://www.anddev.org/google_driving_directions_-_mapview_overlayed-t826.html i tried to run it on android-sdk_r13-windows . i resolved class path error but still there are some error which i am unable to resolve like...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why unloaded class is still accessible in Cocoa? I loaded a class dynamically with [NSBundle load]. And unloaded it dynamically with [NSBundle unload]. Anyway it looks the class is still alive after unloading. My code is: // In separated bundle. @implementation EEExampleBundle + (void)test { NSLog(@"TTTTT"); } @...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: No current session context set error in my Nhibernate Test project I'm getting the error: No CurrentSessionContext configured (set the property current_session_context_class). I'm not sure what to put there, I have this: public class NhDbHelper { public NhDbHelper() { CreateSessionF...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Modifying a JSON object by creating a New Field using existing Elements I have a javascript object that goes like this: var obj = {"data": [ {"name":"Alan","height":1.71,"weight":66}, {"name":"Ben","height":1.82,"weight":90}, {"name":"Chris","height":1.63,"weight":71} ] ,"school":"Dover Secondary" } How do...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Am I missing something? Reading from database in PHP seems long-winded So, if I want to pull some data from my database (PHP, MySql), whether I'm writing for a class or hard-coded, I've been doing something along the lines of: $x = "SELECT <column(s)> FROM <table> WHERE <conditions>"; $y = mysql_query($x); while($re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the most bandwidth efficient video codec? Say I want to let my users upload videos to my website(using PHP) and also let them watch other videos. But I want it to work really bandwidth efficient and I want to somehow compress/convert the videos and make them smaller in size, with minimal loss of quality. Is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Assembler and c++ output text How can I display text with assembler in c++ code? I want to make a function with a parameter the string which will be displayed. A: In the assembler you can make the appropriate system calls to read or write. Your OS will have a description of the supported system calls, and generally...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the right way to rewrite Mozilla Thunderbird's thread pane? I have an idea about alternate standard view of e-mail clients, like Mozilla Thunderbird. I need to display expanded message bodies in one feed (like Google Reader displays RSS) instead of headers list + one message body. Let me visualize this. Stan...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Rails: filter index via dropdown and checkboxes I'm trying to filter an index page of products via a dropdown menu (locations) and a set of checkboxes (categories) and not being very successful with it. I can filter via a dropdown for either location or category. I can also combine the two dropdowns within the one f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why doesn't terse way of defining new hashes in Ruby work (they all refer to same object) I need to establish a number of Hashes, and I didn't want to list one per line, like this a = Hash.new b = Hash.new I also new that apart from for Fixnums, I could not do this a = b = Hash.new because both a and b would refer...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Disable text input history Possible Duplicate: How do you disable browser Autocomplete on web form field / input tag? I am building an application which will be accepting credit card data. I would like to make sure that the browser does not remember what has been typed into the text inputs for credit card number....
{ "language": "en", "url": "https://stackoverflow.com/questions/7540085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "116" }
Q: association id not getting set using accepts_nested_attributes_for and decent_exposure When I post a form to create a new inquiry with a child comment (in the app, inquiries can have multiple comments), the comment is not getting built. It works when remove the presence validations. So it has to do with the order in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I get a column from mySQL to show up in a select box via PHP? I have a form with one select box (pulldown list). I need to get a column from mySQL to appear in the select box. How do i make the connection? Are there any examples out there? A: <?php // connect to MySQL $query = "SELECT <col> FROM <table>"; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Close Chrome with extension Is it possible to close the entire application within a chrome extension? A: You would have to use the Chrome Windows API to close all windows: chrome.windows.getAll({}, function(windows){ for(var i = 0; i < windows.length; i++) chrome.windows.remove(windows[i].id); }); To just c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Run java application with maximum "maximum heap size" available How can I calculate the maximum "maximum heap size" avalable for java application * *in Windows using cmd commands? *in Linux using sh commands? I want to set -Xmx value as large as possible. I want to be sure that java will not complain that -Xmx...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to remove margin from every element that is the last element in a row? How to remove margin from every <li> of last column? I'm asking for every <li> which comes in last column when I have 9 <li> and 3 in each column. I'm not asking just to remove margin from last item of last <li> of a <ul> which I already know...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: HTML form data to XML and vice versa I have followed this tutorial and uploaded this on to my website and i am getting errors i would like to follow this example and understand it and create my own form that can save data to xml file and also display the xml data in the html page my website page for the above tutori...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: javascript closure tutorial from eloquent javascript the question is pretty similar to this thread Javascript..totally lost in this tutorial. function findSequence(goal) { function find(start, history) { if (start == goal) return history; else if (start > goal) return nu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS Webpage elements are not positioning correctly I am trying to code a design into HTML and CSS. It is a small snippet. I am having issues with the positioning and cant seem to put elements in their correct places. My webpage can be found at http://www.sarahjanetrading.com/js/j/index.html The design that I want to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Using Open Graph API, can I see when users Add To Playlist or Star tracks in Spotify? How would I access when a user (and a friend of a user) adds a song to a playlist, or stars a song in Spotify, Rdio etc? A: http://graph.facebook.com/me/music.listens http://graph.facebook.com/me/music.playlists You have to get th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: sqlite3_prepare_v2 no such table error I have a sqlite problem. My code above: -(NSString *) filePath { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [paths objectAtIndex:0]; NSString *dbPath = [documentsDir stringByAppendingPat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: UINavigationController back button action problem I have an UINavigationController and the first view is an UIView. I've setup two buttons and each one pushes another view , both UITableViewControllers. The first buttons works just fine. The problem is: when I'm in the second TableViewController and I tap on the bac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Bundler installs sqlite3 every time, but there's not sqlite in Gemfile Bundler keeps install sqlite3 every time, but i'm not using it in my project. I've chosen Postgres, but can not deploy it to Heroku. Bundler is the reason for that. Why it is? And what should i do? I was trying to make separate gemset for that. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Partial template specialization - member specialization Say I have this template class: template<typename T> class MyClass{ public: MyClass(const T& t):_t(t){} ~MyClass(){} void print(){ cout << _t << endl; } private: T _t; }; And I want to specialize it, so similarly I define: template<> class My...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: curl can not get complete response from a url i use curl in centos 5.5 and curl like below to get the response from the url: curl 7.21.2 (x86_64-unknown-linux-gnu) libcurl/7.21.2 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create a function that returns an acronym in matlab I need to create an m-file in Matlab that contains the following function: function acr = acronym(phrase) This function should compute and returns the acronym of the phrase as the result of the function; that is, if someone types any phrase in Matlab, this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Solving errors with a stacktrace I got an error that its stacktrace doesn't reveal where in my classes (& line number) the error lies. Is there another way I can locate the code that causes this error? I understand the error itself... but there are a couple of places in my code that could cause this and I can't repr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django seamless upgrades with CDN [I'm using AWS but I think this question is relevant to all CDNs] I'm looking to seamless deploy my Django server to the AWS cloud. All static content (e.g. images, javascript, etc.) go to the Amazon Cloudfront CDN. The problem is that I'm trying to make the upgrade as "atomic" as p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: click through yes/no questions from OPML one at a time Based on a flowchart noted as OPML nodes in my xhtml, I would like to dynamically (using jquery, without refreshing the page) get questions shown one by one, depending on the yes/no answer of the previous one, until a final message in the OPML is reached. For ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to iterate over an object in javascript with an unordered index I'm creating a playlist system where each song has a unique ID. When you add a song to the playlist array, its index is registered as its ID. Normally when looping over a javascript array, you grab the length and count up through the index. Is there...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I expose C functions to a custom virtual machine? I'm working on a virtual machine which I would like to be able to interface with C. Going the other way and exposing virtual machine functions to C code is fairly easy, what I can't wrap my head around is exposing C functions to a virtual machine. I'd like to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Concatenate where queries with or operator in a QueryBuilder QueryBuilder is defined in Microsoft.Windows.Data.DomainServices. It allows you to create a Query on a collection of type T and apply it later. When I need to concatenate where queries by && it is easy, for example you can do var query = new QueryB...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: CSS positioning for jquery plugin element The layout in question is here: http://www.davedaranjo.com/media.html This is probably an issue in standard positioning with css, but I've tried every positioning combination I can think of to achieve this: http://i.imgur.com/y1qRU.jpg Every time I try to move the player any...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Wordpress 4 Column menu on footer Does anyone know of any plugins or a simple way to have a 4 column menu on the wordpress footer populated with Categories / and or Pages please? Thanks A: If you have custom menus activated in your functions file in your theme you can add a custom menu to your footer quite easily, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Customizing Model Validation Feedback I want to change the way a validation message appears to the user in my nopCommerce web application. Currently, it appears as so: I want to change that, so that if and when the login credentials are incorrect, the input fields get a red border, and the text [ wrong credentials ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: c# generates JS to fill webform: how to verify it works? as continuation to: WebBrowser Control in a new thread how to fill an external web form with c# application? I want to fill a website (i.e. gmail) web-form. I thought to avoid the WebBrowser control overhead. I used JS. but the following code doesn't work (...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Raven DB Replication Setup Issue Can any one help me in setting up Raven DB Replication? Tried a lot of ways a lot of time but no success. Here is the story: 1) I downloaded the raven bundle. Make a copy of it. Run Raven.Server.Exe from both of the folders. Both instances run successfully on individual port. Then I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Last element in xml not getting picked up I have a python 3 script below that is supposed to download an xml file and split it into smaller files with only 500 items each. I am having two problems: * *the last item in the original xml is not present in the split files *if the original xml was 1000 items long it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JQGrid clicking ENTER on EDIT popup I have a form that i use in jqgrid in add/edit popup @using (Html.BeginForm("Action", "Controller", FormMethod.Post, new { id = "formId" })) { //... } When i click a row that form opens. If i press the textbox and click ENTER this form submits. And it submits as a regular post re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Custom control not being rendered The idea behind the control below is to be able to show a Label inside of a TextBox when there isn't any text. To do this, I just took a working control that is similar, a SearchTextBox, but has too much going on for what I need here. I suspect the control template in the style bel...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: OpenGL and multiple GPUs - General possibility I was wondering, is it possible to run a multi-window OpenGL application on more than one GPU simultaneously? To be more specific, let's say I've created an application with two windows each sharing it's GL context between each other. Now if I'd move one of those window...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Solr apply filters on stored data Is it possible to apply filters to stored data like we can apply filter when indexing. For example I use KeepWordFilter on a filed during indexing. But I don't want filtered data to be even stored. <fieldType name="text" class="solr.TextField" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: mysql get real row number i have this table mysql> select name from test; +---------+ | name | +---------+ | foo | | bar | | foobar | | anton | | budi | | anton S | +---------+ 6 rows in set (0.00 sec) how to know if first 'anton' is record number 4? is there any faster query than this... select ra...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: z-index problem with helper clone This is my code (please see http://jsfiddle.net/VCfSc/1/): $('.first').draggable({ cancel: null, helper: 'clone' }); $('.second').droppable({ over: function(event, ui) { $(this).css('z-index', 1); ui.helper.css('z-index', 0); } }); I am trying to ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: If you have equals/hashcode based on int, what's the optimal way to match a "full" object from another collection? Say you had this DTO class: public class MyObj{ private int id; private String displayName; private String backendData; public boolean equals(Object obj){ return id.equals(obj); } private int...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Reversed breadcrumb issue My navigation table looks like this. It based on a parent<->child scheme. I'm using following code to generate breadcrumb. function makeBreadcrumb($current, $lang, $db){ $q = $db->query("SELECT id, parent, $lang AS name FROM nav WHERE id = '$current'"); $row=$q->fetch_object();...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: .NET exception not caught I have a function that looks like this: try { _dbManager.InsertSearch(some data); } catch (Exception ex) { //do logging } _dbManager uses LINQ to insert data to a SQL database. Yesterday, the machine that hosts the database ran out of hard disk space and my program crashed. I got ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ListFragment and menu options I have added an options menu to a ListFragment, and I need to show a new ListFragment when users click on it. Is there something wrong with this? I am a bit confused on the correct way to start fragment.. A: Use a Transaction with the FragmentManager.
{ "language": "en", "url": "https://stackoverflow.com/questions/7540216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java Jease CMS, Index page setup I have converted my static website into Jease, through localhost:8080/cms, and I can access my website using the URL localhost:8080/index.html and from there I can browse around my entire website. What I am not sure about, how can I configure Jease to directly go to index.html page a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it better to use linq2sql to generate classes for stored procedures, or to call the stored procedures directly? I see tons of questions on LINQ to SQL vs Stored Procs. I'm more curious about the benefits of using them in tandem as relates to object mapping. I have my business objects defined, and I have stored pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What does /;/ and /^ +/ denote? I recently came across the statement : var cookies = document.cookie.split(/;/); and var pair = allCookies[i].split("=", 2); if (pair[0].replace(/^ +/, "") == "lastvisit") In the first statement what does /;/ in the argument of split denote ? In the second statement what does /^ +/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: working with IQueryable; not working I'm using linq-to-EF and I have this: public IQeuryable<base01> GetData() { var u = this.ObjectContext.base01; IQueryable<base01> u2 = u.OrderBy(o => o.article) .Select(l => new { Id = l.Id, article = l.article, lot = l.lot}) as IQueryable<base01>; return u2...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Running a macro till the end of text file in Emacs I have a text file with some sample content as shown here: Sno = 1p Sno = 2p Sno = 3p What i want is to remove the p from each of the columns. With this intention i write a macro: M-x //go to buffer C-x (//start the macro C-s = // search for equalto sign RET C-f C...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Strategies for simplifying math expressions I have a well-formed tree that represents a mathematical expression. For example, given the string: "1+2-3*4/5", this gets parsed into: subtract(add(1,2),divide(multiply(3,4),5)) Which is expressed as this tree: What I'd like to be able to do is take this tree and reduc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: JavaScript adds 0.000000002 to calculation Source: Pastebin Screenshot: Image <input alt="Flyer|49.80" type="checkbox" class="price" id="cb3" name="price_3" /> <input alt="CMS|199.99" type="checkbox" class="price" id="cb1" name="price_1" /> Hey folks! Maybe someone can give me a little hint to the problem in my sou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: library using Quartz PDF rendering routines statically compiled and then ported to Windows? is it possible to compile statically a c++ library under OSX which calls Quartz routines for PDF rendering and use it under Windows to be linked to a Windows c++ project? A: If you have added another compiler to OSX that tar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generate Random Number in .NET without using any Inbuilt Functions I was wondering how the Random functions in every programming language works so I want to generate a number by myself i.e. I don't want to use any inbuilt classes or functions. A: If you are curious how it works you can start with Wikipedia: Random ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SSH troubles pushing with Git I'm trying to set up a git repository on Assembla (assembla.com) and I'm having trouble making my first "push". I'm fairly ignorant of git, but I've previously successfully pushed to a repository on github. I'm using git on Windows Vista. When I run git bash from the relevant directory ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Need some help with a RegEx query Given the following string: someObject.SomeFunction.parameters[0] = new Thing('ValueName', 0); How to I get just the ValueName value? - using C# A: You can use String.Substring method or using regex: (?<=')(?:\\'|[^'])*(?=') e.g.: Regex.Match(input, @"(?<=')(?:\\'|[^'])*(?=')")....
{ "language": "en", "url": "https://stackoverflow.com/questions/7540236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Retrieve a cookie set in Python serverside G'day, I'm following a guide found here: http://www.doughellmann.com/PyMOTW/Cookie/ which has the code: c = Cookie.SimpleCookie() c.load(HTTP_COOKIE) to retrieve a cookie previously set (by the server), but my server does not have the HTTP_COOKIE variable, so how else can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using delegate() for dynamically added container Could you explain me how I can catch click event for dynamically added checkbox? I can do it, but can't understand one thing - why can't use delegate() for dynamically added container for checkbox. Code is like that: <p style="blue"> <input type="checkbox" name="first...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where can i find a CMS UML example? There are plenty of people saying that is it useless to develop your own CMS. I deduce that 'computer science' has enough experience in developing CMS. But I can not find an example of the UML of a CMS. An open source CMS or whatever, I need 'inspiration'. If you have a link, fee...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: left shift magic I have code: signed short a = -32740; float c; float b; b = (signed short)(a << 4); c = a << 4; printf("(signed short)(a << 4): %f\n", b); printf("(a << 4): %f\n", c); output: (signed short)(a << 4): 448.000000 (a << 4): -523840.000000 Why 16 senior registers not reset after the shift (c = a << 4;...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Free Powershell debugging tools Quest Power GUI Script Editor is a nice free tool for writing and debugging Powershell script. We have Windows XP SP2. Is there any similar debugger that let's you debug step through scriptthat is provided free of charge by Microsoft that works on XP? I suspect that it'll be easier t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: R bindings for Mapnik? I frequently find myself doing some analysis in R and then wanting to make a quick map. The standard plot() function does a reasonable job of quick, but I quickly find that I need to go to ggplot2 when I want to make something that looks nice or has more complex symbology requirements. Ggplot2...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to cache mvc3 webgrid results (so that col sort click doesn't? Can somebody please tell me how I can cache my webgrid results so that when I sort by column it doesn't re-run my stored procedure query every time? When clicking on a column link to sort, the stored proc (which is a little slow) that populates the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Implementing a javascript function to search in a div, getting textrange for the search How do I get the textrange to do a search for a div (or a form)? Are there scripts already available, or jquery functions that search the text of a div? I append a form to a div with this code: $('#'+card_id).append('<form...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: deflate and inflate (zlib.h) in C I am trying to implement the zlib.h deflate and inflate functions to compress and decompress a char array (not a file). I would like to know if the following syntax is correct ? Am I missing something or defined something incorrectly ? char a[50] = "Hello World!"; char b[50]; char c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Is it better to have two separate user tables or one? My web app is going to have two types of users that are 100% different - in fields, functions, and purpose on the site. The purpose of one type of user is to post blogs, and the purpose of the other is to read them and "follow" the posters. The ONLY stuff they ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to pass String from 2 activities to one? I have two activitys with lists. One for tablet's and one for regular density phones. When an item in the list is clicked it launches the same activity for either activity with list's. The problem is when an item is clicked i have getter and setter class that gets the UR...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: 2 divs problem with box shadow I have 2 divs where the first is on top and the second is below that... I have added shadow to the first div which is on top and looks well. box-shadow: 0px 5px 5px #000000; -moz-box-shadow: 0px 5px 5px #000000; -webkit-box-shadow: 0px 5px 5px #000000; But when i add a gradient css on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: To find the Nth node from last when visited nodes are getting deleted So the question is : find kth node frm last in a linked list if nodes a disappearing once read.This should be done in one pass only. Try avoiding extra memory . I am aware of the trivial solution to this problem where two pointers(P and Q lets say...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Changing Xxs in IntelliJ Idea I am working with IntelliJ Idea and I need to change the -Xxs. Where should I change it from? A: idea.vmoptions file under /bin in IntelliJ installation directory. A: For IDEA itself or for your app? If the first, see reply from Tomasz. If the latter, edit the VM options in the Run/De...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: A special text on a web site Assume that there is a web site which includes 3 different pages. I want to show a text one of the pages randomly, with is formatted with css. For instance the pages are below: hello-world.aspx hi-sun.aspx good-night-moon.aspx * When John enters to the site, the text will appear on hi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: CM7 for Milestone - build from source while kernel.org is down for maintenance I want to build CM7 for my Milestone but kernel.org being down makes that hard for me since all howtos and repos I found rely on it's existence - anyone knows a quick workaround? I already asked this question here: http://android.doshaska...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverlight 5 Application cannot get HasElevatedPermissions to be true I am using Silverlight 5 RC on a Windows 7 x64 OS running IE9. I am trying to get HasElevatedPermissions=True. I have made the necessary change to the Windows registry and signed the xap using a test certificate as documented here : http://pitor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javascript : 'Variable Not Defined' inside a self invoking function I wrote the following code that outputs the sum of squared iterating numbers: (function () { var i = 4, sum = 0; while(i--) sum+=i*i; })(); console.log(sum); The problem is I get the following error in console: sum is undefined unless I ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to add an object file to every link There is a bug in RHEL5's gcc-4.3.2 with which we are stuck. As a work-around we have extracted the missing object and put it in an object file. Adding this object file to every link makes the problem go away. While adding it directly to LDFLAGS seems like a good solution, thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: I want to prompt a user for the first 5 characters of a file then have it search for the files I'm trying to write a script that will prompt the user for the first 5 charters of a file name then have it search the directories for any files that start with that. Then I want it to check to see if a folder is created w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Encountering errors when replacing JPanels I'm in the process of creating a menu with several panels that are removed/added as the user navigates by clicking on buttons. After trying various things, I came to one that made the most sense to me but gives me errors. My error-producing "solution": public void actionPer...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which comments documentation format is better for JavaScript? Is there are any comments documentation format for JavaScript and processor for this format which generates HTML documentation? Currently I am using VSDoc xml comments for providing IntelliSense help at developing time, but as I know there is no documenta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Adding comments mod into Smarty Template PHP site My site is built around X-Cart 4.2.3, which is built around Smarty Templates. I am trying to figure out a way to add Facebook Comments to my dynamic product pages (https://developers.facebook.com/docs/reference/plugins/comments/). These have to have unique URLs for e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Remove html tags from string using jquery i want to know how to remove html tags from a string using jquery, html looks like this var string = '<p><marquee> some text </marquee>/p>'; now i want to remove all html tags and just want the plain text from it. thank you A: jQuery text() will help you like this : var wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: drupal form to calculate date I need a function to be able to retrieve the selected date from a date_popup in drupal form this is my form and the code that i've tried,Im doing a form for pregnancy calculator and im new in drupal i need to know how to implement the date calculation in my form.As testing i written a f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ' Div Wrapper ' Issue I am wanting to wrap all my content within a div wrapper. I want my content to be wrapped within a div wrapper that's width is 1040px. The problem is, I want the navigation bar to have a with of 100% so that it spans ones screen/ full resolution. By the way, the navigatioon bar will be below th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to assign tasks in Bugzilla? i intend to use bugzilla eclipse plugin for collaborating in my project we are a team working together in one project and i was wondering how can i assign task to another colleague in the project using bugzilla please guide me since, tutorials are very brief. A: Browse to the issue,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: File IO on a remote Windows system Given a Perl script that can be running on unix or Windows, how can I best read/write to a file on a windows host? Is there anything similar to File::Remote? A: I would try to mount the remote folder and then use the standard perl functions: use constant W_REMOTE_FOLDER = '\\ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NSPredicate compare with Integer How can I compare two NSNumbers or a NSNumber and an Integer in an NSPredicate? I tried: NSNumber *stdUserNumber = [NSNumber numberWithInteger:[[NSUserDefaults standardUserDefaults] integerForKey:@"standardUser"]]; fetchRequest.predicate = [NSPredicate predicateWithFormat:@"userID ==...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Help with nth-child(), selecting all children I might have missed something completely stupid, but I can't figure this out. I am working on some simple jquery practice and was looking to select the specified children from an aside element to get the width. However, when I would select it, the return value was null....
{ "language": "en", "url": "https://stackoverflow.com/questions/7540331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: validation error - Google +1 button I'm trying to remove the counter from the google +1 button, but am getting this result: there is no attribute "g:plusone:count" Here is the code: <div id="add" class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button" href="http://www.addthis.co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JQuery UI Dialog Issue with Multiple Dialogs I have several dialogs (jquery-ui-ified), they all look something like this: $('#options_dlg').dialog({ modal:true, stack:true, autoOpen:false, resizable:false, title:'Options', height:620, width:520, zIndex:20000 }); The issue I am exper...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Print various conformation of string in 2-D array I am presently trying to code a protein folding project in c. Where I will be given a 3-4 length string lets say BWB or BBWW… I have to store this string in 2-D array and print all possible combinations with this string. if the length of the string is n the length o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is c function prototype mismatch merely a warning please take a look at my codes below #include <stdio.h> void printOut() { static int i = 0; if (i < 10) { printOut(i); } } int main(int argc, char *argv[]) { return 0; } i guess there should be an error due to my invoking the non-existed function prototyp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7540341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }