text
stringlengths
8
267k
meta
dict
Q: Not getting all data when making .ajax call I am trying to get data from a page that generates the following object displayed as text in the body and pre tag, but it seems not to get all 4 key|value pairs (only 3)? Please note that I have changed the urls of the jSON output and and removed most of the data to shorte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: mongodb in production We are planning to use mongodb in production for a subset of data. In past, I have read that mongodb has issues with blocking writes and write durability. Are they resolved with 2.0 release? Are there anything else which one should be careful of, before deploying mongodb in production? A: Ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Form submit a signature captured using SVG I came across an example SVG signature capture by @heycam here: Capture Signature using HTML5 and iPad Example: http://mcc.id.au/2010/signature.html Much simpler than any previous example I have seen, and it works with mouse and touch! But how would I submit the result as p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Ruby Class variable and on access assignments I have a module that has multiple class variables. I'm looking for a class level getter implementation that will only instantiate the @@ variable when the class tries to access it like the following module MyProducts @@products = nil def self.get_product...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I specify a customers default shipping address in a database table? Here is a simple example: Assume I have a customer table that has a one-to-many relationship with the address table (a customer can have multiple shipping addresses but a shipping address can only belong to a single customer). Customer Table ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can I load a google map into a div container? I have current code that loads my google map into a colorbox but I'd like to load it into a div tag that can be loaded into a colorbox from another page. Here is my current colorbox code (works) $.fn.colorbox({width:"643px", height: "653px", inline:true, href:"#map_conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET activation code I'm going to install a ASP.NET in a third party server, I would like some way to protect this code against copying it to other server so I was thinking in some way of activation code... Given I'm not very advanced in encryption I thought: * *Generating a code with the_install_domain+some_s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jquery selectable plugin to select the first level childs, not the childs of childs <ol id="selectable"> <li class="ui-widget-content"> <div><input type="checkbox" /></div> <div>Item1</div> <div>Khanput</div> <div>1/2/3</div> <div>15:03:16</div> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: keydown function not enabling alert function in jquery I have this code right now: $(document).ready(function () { $("div#main-edit").click( function() { var cursorExists = $("input#cursor").length; if (cursorExists == false){ $("div#cursor-start").append("<input type='text' id = 'cursor' />"); $("input#curso...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I cascade delete a collection in Hibernate? Let's say I have two entities, a Post and a Comment (in ColdFusion): component persistent="true" table="post" { property name="Id" fieldtype="id"; property name="Comments" fieldtype="one-to-many" cfc="Comment" fkcolumn="post_id" cascade="all"; } component p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Parse Binary Data I have an application that receives data in binary form through Bluetooth. I read the data using inputstream from a bluetoothsocket to a byte[]. But I must parse all messages, because they must have a given format to be valid. All messages are in binary. My solution was to convert the byte[] to a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: saving state between program restarts How can I declare a variable which would save sting forever? I mean if the user closes and restarts the program, this string value is not lost. How can this be done? A: There are a number of different ways to store state for an application. The approach really depends on the ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Tomcat Application Manager won't authenticate I'm running a local Tomcat 6.0 server. I can get to the main admin page from a browser. I've created a user for the Tomcat Application Manager by configuring tomcat-users.xml like so: <tomcat-users> <role rolename="manager-gui" /> <user username="myUsername"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Azure Table Storage & Dynamic TableServiceEntity I am looking for a way to create objects in the Azure Table Storage that are essentially dynamic in nature. In other words they have no defined class structure of exposed properties, except for the base ones required by TableServiceEntity. In other words, like a JSON...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Updating a bare git repository from a git-svn cloned remote repository I have a remote SVN repository (X) where a freelance developer is committing his work. However, in my company we work with GIT and are using git-svn to interoperate GIT and SVN. That's ok! So, I've cloned the SVN repository (X) into a GIT local r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Request object, what are the pros and cons? Let's say I have the following method: public Stream GetMusic(string songTitle, string albumName) { ... } A colleague of mine is convinced that this a bad method signature. He would like me to use a Request object, which would transform the method signature into this: pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I fetch only the top 20 objects from core data I need to find the 20 objects most recently viewed (date-stamped) by the user. Each object has a property in the core data model called dateVisited. When the user views a particular object, the dateVisited property is assigned the current date stamp. So, I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: c++ Passing *this as reference during construction of self Is the following safe? I know, strictly speaking, dereferencing a pointer before the thing to which it points has been properly constructed seems dangerous, but I imagine the compiler will just provide a pointer without actually doing any dereferencing. Well...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to include package data with setuptools/distutils? When using setuptools, I can not get the installer to pull in any package_data files. Everything I've read says that the following is the correct way to do it. Can someone please advise? setup( name='myapp', packages=find_packages(), package_data={ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "184" }
Q: How to detect a framed image from a photo in iOS I'm wondering if there's a way to, after allowing a user to take a photograph, analyze the photograph and find a framed image within it. (For example, if someone took a photograph of a framed family portrait or something, I want to be able to programmatically sense th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: uart problem with linux and user written operating system statement: i have tried almost all the options for getting to work, trying to send data thru UART from a intel pentium 2 system using a device driver in polled io mode written by me, its very simple the code can be seen in http://pastebin.com/8snzeaXu also th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't include SendGrid in my Rails3 project I'm very new to ruby and rails (3 days and counting), so my problem is probably something stupid. However, it seems to be something stupid that couldn't be resolved by searching for answers online. :( I'm creating a simple blog app following this guide: http://guides.rubyo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In DirectX 11, how to create and register two buffers in SwapChain (DXGI_SWAP_CHAIN_DESC) I am a beginner of DirectX 11, and following the book Beginning DirectX 11, in chapter 2, there is a code for creating a buffer using the following code: DXGI_SWAP_CHAIN_DESC swapChainDesc; ZeroMemory( &swapChainDesc, sizeof( s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Passenger Error message: Could not find cancan-1.6.5 in any of the sources I'm trying to deploy a Rails app to a Ubuntu 10.04 Lucid. I keep on getting this error: Error message: Could not find cancan-1.6.5 in any of the sources (Bundler::GemNotFound) Even though the gem is there. I packaged the gems and did a bundle...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL database structure question How would one structure a database where you have City, State, and Country, and Cities sometimes have states and sometimes don't? Would you simply put State_ID (default NULL) and Country_ID in City or is there a better way to approach it? A: Your approach seems spot on. If there is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ABMultiValueRef memory leak? When I use Instruments, it complains of a memory leak on emailProperty. Analyzer complains about mobileLabel. The code snippet is below. Given that I use release and CFRelease, is there an obvious reason why it's complaining? Thanks in advance for any responses. // Email is a multi v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Splitting a file into multiple files I have a text file which has DXS.... 1Line 2Line DXE DXS 1Line 2Line DXS I need code to read the above file and write into the another file till it sees the DXE. So basically I will have multiple files which will consist of lines from DXS till DXE. In the above case I will have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-5" }
Q: Parallels Plesk + IIS7 asp.net 4.0 error: Unrecognized attribute 'targetFramework' I'm using a godaddy VPS with parallels plesk. Since my application is asp.net 4.0 I get the error: "Unrecognized attribute 'targetFramework' I realize it's because the application pools are set to asp.net 2.0, which I can't change in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Converting iphone app to universal woes? I've converted my app to a universal app in xCode 4. This created me my MainWindow-iPad.xib automatically and modified my info.plist to include the iPad version of my Main Nib File Base Name....(MainWindow-iPad). Sadly though, my app appears to be still using my iphone versio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I get a list of all my facebook status posts of all time? I want the easiest way to download all the status updates I've done since inception of my account? A: You can go to https://www.facebook.com/settings and click on download facebook data at the bottom. A: Go to https://www.facebook.com/settings, clic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: insanity is free() In my simple C program (gnu linux) I am getting the rss value from proc/stat. int GetRSS() returns the RSS value from proc/stat for my process. In this instance: printf("A RSS=%i\n", GetRSS()); char *cStr = null; cStr = malloc(999999); if (cStr != NULL) { printf("B RSS=%i\n", GetRSS()); f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: JSESSIONID getting changed I have a web app that makes heavy use of jQuery.ajax() and jQGrid. In a typical flow: * *User comes to index.html *Does userid/password authentication via ajax *On success, they are directed to home.html *home.html does multiple ajax requests to populate items on the page. *These re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Launching OpenMPI/pthread apps with slurm On Cray computers such as an XE6, when launching a hybrid MPI/pthreads application via aprun there is a depth parameter which indicates the number of threads each process can spawn. For example, aprun -N2 -n12 -d5 Each process can spawn 5 threads which the OS will distribu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python Distance Formula Calculator My assignment is to make a distance calculator that finds the distance between two locations, and I chose to use Python. I've put all the locations into coordinate points, but I need to know how to pick two of these by name, then apply the distance formula to them: (sqrt ((x[2]-x[...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Grails tab order I was recently given a project to modify and I know very little about Grails. All I need to do is edit the code to make it so the user does not have to use a mouse, so I need to set the tab order. How do I do that? Thanks! A: Set the tabindex property on the fields in the .gsp files, just like an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: asp.net: how do i prevent users from posting the same data multiple times i have a little asp.net web application. it is a front end to a sql-server-2008 database. after they fill out all the data, they will press submit and the data will be sent to the database. after this point if the user refreshes the page, the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to remove multiple line breaks from RSS feed? How to remove multiple <br> tags from a RSS feed? I tried those two but it doesn't make any change. str_replace("<br/><br/>","&",$entry->description); str_replace("<br><br>","&",$entry->description); str_replace("&lt;br/&gt;&lt;br/&gt;","&",$entry->description); s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SAP cProjects replication: Set task-level WBS When creating a project in cProjects I am using BADI BADI DPR_FIN_GECCO_ATTR to manipulate the external WBS ID that is created in SAP PS. SAP accepts the ID that I pass for the Phase level, but for the Task level SAP appends a string "/TTO" to the end of my WBS ID. Any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Left Join Hangs I am trying to figure out what could be causing a left join to hang. I've narrowed a problem down to a specific table but I can't for the life of me figure out what might be going on. Basically, I have two tables, lets call them table A and table B. When I left join table A to table B (its a 1 to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Problem with closing login form after user is authenticated ,using VB I have a very generic login form created that allows a user to access a application. My problem is getting the log in form to close after the application form is loaded. I have described the specifics in the comments of the code. Any help would be...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is the ICMP ECHO data length compared to the size of timeval in the original ping source code? I've been reading through the original ping program code (http://www.ping127001.com/pingpage/ping.text) out of interest, just to see how it was done. I get most of it, but there is one conditional that I don't underst...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Effects of z-index on drag and drop between two divs I have two container divs and want to drag and drop elements between them. I can drag and drop elements from the second container to the first but not the other way around. The problem is that the elements of the first container seem to have a lower z-index than...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: android XPath, copy nodes from one document to another Hi I need to copy nodes from one XML into another one: String _sPathOfrObj = "/response/grp/ofr/obj"; String _sPathHotelData = "/main/hotelData"; String _sPathStatus = "/main/status"; xpath.reset(); NodeList status = (NodeList) xpath.evaluate( _sPathStatus, deta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: handle SMS- onReceive to trigger event in another activity/class so, what i'm trying to do is change some ui elements which are expanded in my main activity- and i want the changes to be triggered by the onReceive, which is from broadcastreceiver extended in a different separate class. I'd like to do something like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Having a problem with external .js file and using google loader? This code works PERFECTLY fine when I include the jQuery within the html document; however, it stops working completely if I put it into an external javascript file. I referenced the jQuery library before referencing the external js file, so I'm not su...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to force to show and hide virtual Keyboard if no hardware keyboard is available? How can I detect that the telephone does not have hardware keyboard and only in that case to force showing the virtual one? And how can I hide it? I tried putting the focus like this but it doesn't work: View exampleView = (View)fin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is causing my CSS to behave this way? I have the following html for a simple navigation: <header> <div class="login"> <ul> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> </ul> </div> </header> I have the following css: header { height: 145px; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to include external files into html with javascript / jquery? I have several files (header.html, nav.html, footer.html). I was wondering if there's a way to include these files into index.html while the page loads (or before) using plain js or jquery library. I know it's better to do it from server-side, but rig...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: HELP: Stopping ruin a HTML design I have some BBCode-like code for my forum: [quote] opens a table, tr, td... [/quote] closes the table, tr and td... But when the user writes another [/quote] it adds another </td></tr></table>, and this closes the table the 'forum body' was in. I know there is probably a simple sol...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does this function overloaded for three integer types fail to compile? This attempt to define a function overloaded for three sizes of integers fails. Why? byte hack(byte x) { return x+1; } unsigned short hack(unsigned short x) { return x+2; } unsigned int hack(unsigned int x) { return x+3; } The com...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522336", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Right shift and signed integer On my compiler, the following pseudo code (values replaced with binary): sint32 word = (10000000 00000000 00000000 00000000); word >>= 16; produces a word with a bitfield that looks like this: (11111111 11111111 10000000 00000000) Can I rely on this behaviour for all platforms and C+...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Pointer made from an integer in C on an embedded platform I came across the follow line of code: #define ADCA (*(volatile ADC_t*)0x200) It is for embedded C code for an AVR microcontroller. ADC_t is a union. I know that (volatile ADC_t*)0x200 its a pointer to an absolute memory address but I am still not quite ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I create a local database inside a Microsoft Visual C++ 2010 Express project? How can I create a local database inside a Microsoft Visual C++ 2010 Express project? I can't find this simple answer in the web. The only answer I've found is for Visual Studio: using project > add new item > local database. But t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: CGContextMoveToPoint before CGContextShowText call Does CGContextMoveToPoint work with CGContextShowText? I'm trying to draw to a PDF. Without any translating of the CTM, if I draw text, I see it in the bottom left side of the screen. Then I try to move to point (100,100), and the text is still there. But if I t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: yield between different processes I have two C++ codes one called a and one called b. I am running in in a 64 bits Linux, using the Boost threading library. The a code creates 5 threads which stay in a non-ending loop doing some operation. The b code creates 5 threads which stay in a non-ending loop invoking yield()...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Haxe enum assign value I need to port a C-like enum to Haxe: enum Items { item1, item2=0x00010000, item3=0x00010001, item4, }; But Haxe doesn't allow default value it seems. How can I do this? My real enum has hundreds of entries and for those with default values I must preserve the values. A: You would typically ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Programming style from "Game Coding Complete" I have recently read Mike McShaffry's Game Coding Complete and noticed the code style I haven't seen elsewhere yet. The more important things I noticed were the names of base classes defining interfaces starting with an I like IActor, protected member variables' names st...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Custom event does not reach caller I made a custom event that's supposed to be fired when a specific function within a class is executed. I listen for this event from within my main script, frame one of my timeline. See the code to understand my question a bit better. My CustomEvents.as package { import flash.e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: use ConfigurationManager to store user values in a file that is separate from the app config Ok, I've just about given up on this. I would like to be able to record user preferences using a user config file, which would be referenced from the app config file. I am trying to do this with ConfigurationManager and an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to create tables with password fields in mysql? Should I create the password column as a regular varchar and then insert like this: sha1($pass_string) Or should I do something extra upon the creation of the table to make sure that password field is secure? Thanks! A: You could also use the AES_ENCRYPT() funct...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Cannot bundle in production I recently had to add two gems to my gem file. When I added them to my gemfile, I pushed directly to my production server. I SSH'd into my production server, and tried running bundle install. This is the error I go: >> bundle install ......... >> You are trying to install in deployment m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: push replaces the old value in the array Maybe its because I have been working all day and I can't see the problem. But in the following code the alert only shows the last added value and doesn't push the value in the array. :( window.sortControl = { sortControlPanel: $('div.sortControl'), si...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Difference between sizeof(struct structname) and sizeof(object) in C Are there scenarios where there can be a difference between sizeof(struct structure_name) and sizeof(object) where object is of type struct structure_name in C? A: No there is no difference between sizeof(type) and sizeof(o) where the declared typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to remove array elements equal to some element in a second array in perl Just wonder if I am given two arrays, A and B, how to remove/delete those elements in A that can also be found in B? What is the most efficient way of doing this? And also, as a special case, if B is the resulting array after grep on A, how...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: MVC: Is it possible to have one custom ModelBinder AND the default binder on one model? I would like to use my custom binder to deal with the constructor (necessary) and then have the default modelbinder fill in the rest of the properties as normal. Edit: The custom one would run first of course. A: Mo.'s answer i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to initialize activeMQ broker with failover I need to send JMS messages to the following provider location: failover:(tcp://amq.vip.ebay.com:61616,tcp://amqstby.vip.ebay.com:61616)?initialReconnectDelay=100&randomize=false&wireFormat.maxInactivityDuration=0 How to correctly initialize ConnectorFactory for it? S...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Batch For Loop Escape Asterisk I am attempting to create a batch for loop (Windows XP and newer command prompts) that iterates through a string containing one or more asterisks. How can I do this? Here is an example: @FOR %%A IN (A* B) DO @ECHO %%A The expected output (what I am trying to get) is the following: A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Check if pthread thread is blocking Here's the situation, I have a thread running that is partially controlled by code that I don't own. I started the thread so I have it's thread id but then I passed it off to some other code. I need to be able to tell if that other code has currently caused the thread to block fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Help me to understand this code in c# i can not read this line of code public Wine (decimal price, int year) : this (price) { Year = year; } what :this keyword do in a constructor public class Wine { public decimal Price; public int Year; public Wine (decimal price) { Price = price; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is APNS cert same as App Store app cert? Our product is white labeled, so while we host the backend, which will include the "provider" in APNS parlance, the App Store submission is not done by us. Does APNS have to use the same cert as the application's App Store cert? A: APNS certificate is different from App St...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: IOS Accelerometer/Gyroscope Question I want to write an app that gives the degrees of position from some coordinate (bottom of the phone). For example... If I'm holding the phone at a 45 degree angle, I want to display: 45 degrees on the screen. If the user holds the phone at 45 degrees and rotates the phone around...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting image src name javascript I would like to have album_name = Precious How do I get that? <html> <head> <title></title> </head> <body> <div id="ps_slider" class="ps_slider"> <div id="ps_albums"> <div class="ps_album"> <div class="ps_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Set fancybox width from link rel attribute How would I retrieve a width setting on my a tag (e.g. in the REL attribute) and pass it to my jQuery fancybox function, so I can specify its width? Here is my (pretty standard) Fancybox declaration: <script type="text/javascript"> $(document).ready(function (...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hidden Field in Simple Nested Form Not Being Submitted Environment: Rails 3.1.0, Ruby 1.9.2 I have Portfolio model which has_many Positions which has_one Asset. This is the schema for the Position model: create_table "positions", :force => true do |t| t.integer "portfolio_id" t.integer "asset_id" t.de...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: If referencing constant character strings with pointers, is memory permanently occupied? I'm trying to understand where things are stored in memory (stack/heap, are there others?) when running a c program. Compiling this gives warning: function return adress of local variable: char *giveString (void) { char stri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android - SeparatedListAdapter - How to get accurate item position on onClick? I'm using Sharkey's SeparatedListAdapter class in order to have a ListView that is separated by sections. The class works great, but the problem I'm having is in my onListItemClick() handler. If I have the following sectioned list: ------...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Rails multi-instances of one model I'm writing simple file upload using Rails 3.1 & Papercip gem. class Asset < ActiveRecord::Base belongs_to :assetable, :polymorphic => true has_attached_file :data end How can I load 3 (or more) files in one time. Parent assetable object is already created. A: be careful with ass...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Arrays of which size require malloc (or global assignment)? While taking my first steps with C, I quickly noticed that int array[big number] causes my programs to crash when called inside a function. Not quite as quickly, I discovered that I can prevent this from happening by defining the array with global scope (ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Download file while in ssh mode? I use to navigate my remote servers with ssh. Sometimes i would like to download a file to open in my computer. But the only way i know how to do it is to open a new command line window and use scp from local to remote. is there a way to do this directly from the ssh server? like a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Understanding Big(O) in loops I am trying to get the correct Big-O of the following code snippet: s = 0 for x in seq: for y in seq: s += x*y for z in seq: for w in seq: s += x-w According to the book I got this example from (Python Algorithms), they explain it like this: The z-loop is run for a l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Spring Roo: use JPA entity as a DAO The code below is what Spring Roo generates by default, the EntityManager is injected in your domain model POJOs with the rest of the methods to manage the entity (save, update, delete, findXXX, ...). Maybe it is a more object-oriented approach (in contrast to the anemic domain mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Updating an object that contains a list in Hibernate In my GWT application, I pass an Object to the server for persistence with Hibernate. This Object contains a list of another object. Each element in the list contains a Map which is another Hibernate table. In order to do this transaction, it is my understanding t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get friends of an user An user X joined my application but he is not my friend, so I would like to see his friends, write in their walls, etc. Is it possible using the REST API? Also, is possible to send a friend request to some user using the API? A: Apparently, you could using the REST API: target_id. "This mimi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: OpenGraph API Beta: publish_action vs publish_stream Today, Facebook announced an entirely new way to share user actions on your site on through your app. The documentation is a good attempt at explaining how things work, but if I hadn't already built a sophisticated app off the existing OpenGraph API, I would proba...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Compiling source Qt 4.7.4 on windows 7 error qmake is not an internal or external command Edit 2 - I don't have the application file qmake in the /bin folder and this is the error I am getting. Path environment variable : C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7.4\bin\ Command Pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Pulling the last 128 bytes off a binary file with C I am making an id3 tag editor in C. I am having trouble figuring out how to pull the last 128 bytes off the end of the binary file in order to manipulate/printout the area where the id3 tag sits. Heres some code: struct Tag{ char tagMark[3]; char trackNam...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I ensure data is written to disk before closing fstream? The following looks sensible, but I've heard that the data could theoretically still be in a buffer rather than on the disk, even after the close() call. #include <fstream> int main() { ofstream fsi("test.txt"); fsi << "Hello World"; fsi....
{ "language": "en", "url": "https://stackoverflow.com/questions/7522479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using tcpdump to capture a specific port when UDP message can be fragmented I am running tcpdump to capture UDP messages on a specific port. The UDP traffic being captured contains fragmented UDP packets. When a fragmented UDP packet is encountered, tcpdump is only capturing the first fragment. (Probably because onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NSTimers VS NSThreading I'm working on an iPhone Game where the player tilts the iPhone to make the character move, but unfortunately all of the timers I'm using to animate the scenario are slowing down my game. I've been told to use NSThreads, but I really don't know anything about them. My question is, What are th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Limit on the number of columns in cassandra Is there any limit on the number of columns in cassandra? I am thinking of using a unix timestamp (converted to TimeUUID) as the column key. In the worst case, I will end up having 86400 columns per row. Is this a good idea? A: Assuming you're doing that for a good reaso...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Balancing account while selecting MySQL rows in descending order - Code Update Working on a finance tracker and have run into a bit of a snag with displaying transactions in descending order (most recent to oldest) with a correct running balance. Here is the SQL I am using: SELECT amount, payee, cat, date FROM trans...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to install and use a gem inside an rails engine I use refinery-cms to create a webshop in ruby-on-rails and refinery is largely based on engines. I have therefore made a "webshop" engine with all my models, and i want to install the gem "activeadmin" inside this engine, so when i run "rails g active_admin:instal...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: foreach linq2sql string problem Hi all when I am trying to match a letter O in my database I get string format errors. I have tried a few things now and googles alot but still cant resolve this error const string st1 = ("O"); var docketcheck = from q in db.Dockets where q.DocketNum == txtDisplay.Te...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to write a DirectX audio push source I want to create a DirectX 'filter' that sources a single channel of audio. I have seen the Platform SDK sample projects, but the downside there is that those require the ATL library. Is there a way to create DirectX filters without resorting to ATL or MFC? I.e., some way usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I create an AppleScript to loop through a BBEdit document and move a "-" from the end of a number to the beginning? I have a dirty report file that contains improperly formatted negative numbers. The ultimate goal is to import these to Excel for analysis. I am using BBEdit to clean the report before importing...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: 2D Particle System - Performance I have implemented a 2D Particle System based on the ideas and concepts outlined in "Bulding an Advanced Particle System" (John van der Burg, Game Developer Magazine, March 2000). Now I am wondering what performance I should expect from this system. I am currently testing it within t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Codeigniter 2.x - Authentication + ACL library I need a Codeigniter 2.x ACL + Authentication library. I need to give have 3 different admin users and 2 different front end users and want to set everything dynamically through database. Please help. A: The two most popular authentication libraries for CI (at least as...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Internet bots - Filling forms How do Internet bots fill up forms randomly on websites? I am guessing they download the HTML source code and figure out the presence of forms. But then how exactly do they fill them up and actually submit the information? I know many Forms use Captcha, but a number of systems also use...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Am I writing procedural code with objects or OOP? So basically I'm making a leap from procedural coding to OOP. I'm trying to implement the principles of OOP but I have a nagging feeling I'm actually just writing procedural style with Objects. So say I have a list of pipes/chairs/printers/whatever, they are all all ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: converting a two dimensional javascript array to JSON i've tried a few different json methods (stringify, toJSON, and probably some totally irrelevant others out of desperation) but can't seem to figure out how to stringify this so i can pass it to a php script. i am able to create a two dimensional array that whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7522529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }