text
stringlengths
8
267k
meta
dict
Q: How to put begin-commit transaction in controller: cakephp? I'm working on a controller that will update a few tables. I am able to call my model from my controller and inside the model function I can make a begin and commit my query, it can rollback should an error happen. Here is my sample: Controller: //update ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Preventing MKMapView from continually re-zooming and re-centering to user location I seem to have the opposite problem from many of those posted here about MKMapView. Rather than not being able to get it to zoom to and display the current location, I can't seem to get it to stop doing so. Here's what happens: * ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: FTP webrequest in c# can any one explain , In FTP GetResponse() method by using MKD , how to create directory name having symbol (#) . it is not working . A: You should try an urlencode your directory string before I am just guessing have not tested this string directory = HttpServerUtility.UrlEncode("RITCH#ME");
{ "language": "en", "url": "https://stackoverflow.com/questions/7523564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: partial page update in jquery Simple Request i have simple request I'm beginner in jquery so all i want to do is to do button when i click it increment counter variable and update only label on page not all page also i will use same code to make clock in page thank you A: Without you trying some code it is h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sending anything *other* than GET using JQuery ajax I'm at the beginning of my ajax learning curve. I have a simple javascript function that uses jQuery.ajax() to send data to the server and receive a simple text response. The function is correctly invoked on the server as expected and the response (which includes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to correctly retrieve setup UILevel in installer class I am trying to follow the code at this link in order to determine in my installer class if the setup is ran as silent. But I must be doing something wrong, because the Context.Parameters["UILevel"] seems to contain no value. In my setup project, I added a cu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: (SQL SCRIPT + SQL SERVER 2005) Weird '-' symbols I was writing a SQL script like the following for SQL server 2005: select '============================' select '~~~~~~~~~~~~~~' select char(13) + 'Control 127232:' exec xp_loginconfig go I noticed that there is a '-' symbols after my string of 'select '=============...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Change the default name of relationship in django admin I have a ManyToMany relationship follow as: class Subtopic(models.Model): id = models.PositiveIntegerField(primary_key=True) name = models.CharField(max_length=128) class Meta: verbose_name = 'Subtopic' def __unicode__(self): return se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are there any alternatives for Android Market statistics? I am having some issues with Android market statistics as they have not been updated for more than a week. This issue seems to be reoccurring with no solution from Google. Are there any alternatives that I can use for my app to get statistics like how many pe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Make a customized widget observable? I had create a simple keywords highlighting editor, it just wrap a StyledText widget: public class SQLSegmentEditor extends Composite { private StyledText st; public SQLSegmentEditor(Composite parent) { super(parent, SWT.NONE); this.setLayout(new FillLay...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cascade insert with JPA/Hibernate (EclipseLink) I have two tables like this | PERSON | | EMPLOYEE | | id | fullName | | personId | code | EMPLOYEE.personId is a primary key as well as foreign key pointing to PERSON.id I have these two classes: @Entity @Table(name="PERSON") @Inheritance...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Generating HTML Form from database using PHP I'm building a basic website that will offer a quiz dynamically generated from a MySQL database. Based on my current database schema, I'm having trouble understanding how I will generate the 'choices' to different questions in a Quiz Web App. Here is the database schem...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: EGL_BAD_MATCH with Droid/Droid 2 I've been testing my OpenGL ES 2 app on various phones. I've ran into a problem with the Droid and Droid 2. Every EGL config I try results in an EGL_BAD_MATCH. I've tried many combinations of EGL configurations, including configurations that work on other phones, and every combinat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Javascript - clicking an image using code I have an image on a page. I cannot change the page. When you click on the images this page has, a function run and processes the image. The image is not a button. To make the image respond to clicks, the page developer added a listener to it. In fact, every image on that pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP Gmagick extension Is there a way to get all the colors of an image? Example this image The output should have the colors: yellow,black,blue. It can also result in a Hex Value. Can someone tell me any idea how to get that result? or maybe someone has already implemented this one, kindly show it to me. Thanks. An...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android 2.3.3 Listview Background Is Gray So I have a rather annoying issue with a listview. My app was working just fine until the Android 2.3.3 update on my Droid 2. (Still seems to work fine on a Samsung Evo) There are a few aspects of this issue. 1. The background is always gray in empty slots. 2. The last entry...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: sql query to create a new table I have a table as follows: table 1 temp_id node_name variable_1 variable_2 variable_3 1 ab a b y 2 sdd a a a 3 u a s s and another table as follows: table 2 temp_id node...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Inheritance issue C# I've got a small problem with inheritance in my application. I've got a base class Client, which has a subclass Job. Basically, I'm trying to create a constructor for Job but I'm getting an error saying "'Job_Manager_Application.Client' does not contain a constructor that takes 0 arguments" Can'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: setShadowLayer causes slow draw time in GridView? I'm currently working with a GridView containing ImageViews and would like shadows behind my images. There are potentially, say, 15 images visible in the grid at any time. Working under the assumption that I want my screen to render at 50fps to appear smooth, my math...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: is there a way to reverse a hash without rainbow tables? Possible Duplicate: md5 decoding. How they do it? this page suggests that a hash algorithm like md5() and sha1() can be reversed because of the huge processing power that we have nowadays. At this point i tought it was only possible with Rainbow Tables. Was...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Trusted_Connection vs Integrated Security affects connection pooling I was running some application performance monitoring on my ASP.NET 4.0 application (on Windows 2008 RC2, connected to a SQL Server 2005 database) and noticed that the connections did not appear to be pooling. We run the application pool under a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Posting on Tumblr using oAuth and C# I'm trying to develop a simple application to interact with Tumblr using v2 APIs. I'm able to go past every step in the oAuth flow (thanks to the documentation found on Twitter) and obtain an authorized and authenticated token and secret. But when it comes to posting, I get a 401...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: PHP changing number to words I have stored in my DB a row and in that row SubCategories it has the following 2,56,81 What I need to do is change the numbers to the correct SubCategories ie: 1 = Sports 2 = Camping 3 = Climing etc I thought I would be able to do the following $parts = explode(',', $row['SubCategories'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Setting Button Text Color with a Style I have not been able to set the text color of a Button using a predefined style. I must be missing something simple. For example, I have a button: <Button android:id="@+id/calculate_button" android:layout_width="fill_parent" android:layout_height="wrap_content" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Links to Controller methods: CodeIgniter I'm following this tutorial on CodeIgniter: http://ie.mirror.twsweb-int.com/codeigniter/user_guide/tutorial/index.html 4th page of tutorial: http://ie.mirror.twsweb-int.com/codeigniter/user_guide/tutorial/create_news_items.html In the 4th page of the tutorial, he mentions th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Do you release the object which is being returned in a function? This is for an iPhone APP written in Objective-C using Xcode 4. The quick question is if you have a function which returns an NSArray which was ALLOC'ed in that function, do you have to release it? Here is the more detailed question. I run "Analyse" on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How the jquery Datepicker set some date to highlight? I'm use jquery Datepicker [link:http://docs.jquery.com/UI/Datepicker] now,and if I want Set some date to highlight, not just highlight the date now, how can I set the option? For example: There I want 24/09/2011, 25/09/2011 and 27/09/2011 to highlight. A: You'l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why can't I log a user out of facebook in an AIR desktop application? I'm building an AIR desktop app with facebook support using Adobe Flash builder. So far it's working alright, except for one detail, once a user logs in, that session stays open, even if the logout button is pressed. My logout code look like so: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: compile error: no class template, too many initializers, no matching function I haven't been able to remove compile errors using boost::signals. Any idea would be appreciated. Since I've been porting a program that's written 2 years ago adjusting to the current environment, I'm still new to boost::signals. The codes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get the test from the currently selected item in a Gtkiconview? I'm programming in C++ with the GTK+ library (not gtkmm). I have a Gtkiconview where each cell contains an icon and text. I'm relatively new to GTK. How can I get the text field from the currently selected cell? Thanks in advance. EDIT: Found ans...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you create a n by n box of X's in python using string manipulation? (eg. replace, count, find, len, etc.) Get a number from the user (n) and create an n x n box of "X"es on the screen. Without using loops yet. e.g. If they entered 12: XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXX...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Embedding audio/video in showoff presentations Has anyone figured out a good way to embed video and audio into showoff presentations? Currently I am just putting video on youtube and linking to it like this in the slide: !SLIDE full-page # My Video <iframe title="YouTube video player" width="640" height="410" src="...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Converting an Ext.data.TreeStore to JSON I need to stringify an Ext.data.TreeStore (cause I wanna save it to Local Storage), but calling Ext.encode() doesn't work -- I get a circular structure error. Has anyone done this before? A: I can't think of anyway, maybe it's just not possible to save it like it is with nor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Server on virtual machine setup? I just started to learn about networking and decided to run my own node.js server The problem is i have almost no idea what im doing :( I installed a virtual ubuntu 64 server, installed nodejs and all the prereqs. I downloaded a sample (https://github.com/ry/node_chat) and dont know...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Possible for PHP app built on top of codeigniter to connect to a MySQL AND a mongoDB database at the same time? I have a web application built in codeigniter and hosted with cloudcontrol. I use a normal MySQL database for all of my data persistance, and now I want to use a mongodb database in addition to the MySQL d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: how to display items i want on a toast? my first time doing an app on android. i have 4 strings and a lisview.i want to display the strings whenever user press the items on the listview on a toast. can any one help me on this ? For eg: there are Event 1 ,event 2 and event 3 on my list view. and when user pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Native Android development vs web mobile development I have to develop as soon as posible an appication (for android) similar to foursquare, I need to store some details in the phone and retrieve some other data from a web service. I can develop with phonegap or like a native app. What option do you recomend? What a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails date select assigns month a value when blank I am using Rails date_select as follows: <%= date_select :user, :birthday, {:start_year => Time.now.year, :end_year => 1910,:order => [:day,:month,:year], :prompt => { :day => 'day', :month => 'month', :year => 'year' }}, { :class => "default" } %> When a user forg...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery - How to select all checkboxes EXCEPT a specific one? I have a jQuery selector that looks like this ... $("input:checkbox").click(function(event) { // DO STUFF HERE } Everything was working well until I was asked to add another checkbox that has nothing to do with the original checkboxes. How do I create a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: how to add an OnClick event on DropDownList's ListItem that is added dynamically? Say I have the following code: DropDownList changesList = new DropDownList(); ListItem item; item = new ListItem(); item.Text = "go to google.com"; changesList.Items.Add(item); How do you dyna...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: There is an error in my C# program that occur a stack overflow Exception i have 2 forms. one of them is a form that User select a school class so click OK. I use public int[] grad_class=new int[2]; for save which School class has selected. (list of classes is COMBO BOX) after that i open another new form to edit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Attach one element's event handlers into another in JS Let's say I have this part. <input id="text1" type="text" name="text1" onchange="alert('valueA');" /><br /> <input id="text2" type="text" name="text2" /><br /> What I'd want to do is to get the onchange event handler of the input="text1" and attach to another e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Referencing associations with Ruleby on Rails I've recently started messing with a gem called 'ruleby', a rule-engine for Ruby. The documentation for ruleby is a bit sparse, however, and I can't seem to figure out how to properly reference associations for the rule-writing bit. I'm stumped both the 'pattern' part of...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: DrawText in CGRect for PDF I'm trying to create a PDF and I have some text. It is longer than one line, so I'm not sure how I need to write it into my context. Do I calculate a CGRect the size of my text first? From there, how would I do word wrap or things like that in creating a PDF? So far all I've been able ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create PDF on Silverlight 4 I need to create & display a PDF document in Silverlight 4. PDF document will be generated dynamically. The PDF document will contain plain text & some images. Is there any API I can use to achieve my requirement ? A: You can use this: http://silverlightpdf.codeplex.com/ A: Yes! ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JSON Weirdness Needs More Elegant Approach Basically, I'm working on a page that includes four different JSON "thingies" (objetcs,arrays). Forgive my lack of proper terminology. When I get the JSON, it comes in as an object with a bunch of sub-objects, and each "sub-object" looks like this: "token":"government", "ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dynamic class generation in CoffeeScript What is the best way to dynamically create classes in CoffeeScript, in order to later instantiate objects of them? I have found ways to do it, but I am not sure if there is maybe an even better (or simpler) way to achieve it. Please let me know your thoughts on my code. Let's...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to get a PhoneGap based app to authenticate against an ASP.NET Forms Authentication backend? Has anyone managed to get ASP.NET Forms Authentication (with cookies) working with a PhoneGap based mobile application? I have come across the following questions about managing cookies within PhoneGap and configuring th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Related Documents in VS 2010? Back in Visual Studio 6 I was able to add a "Related Document" to a project to quickly and easily open Word files I used for version history notes, etc. How do I do this in Visual Studio 2010 if this is available? A: Just use "Add->Existing Item".
{ "language": "en", "url": "https://stackoverflow.com/questions/7523726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: data missing, but not the record...weird Tomcat/Struts2/JPA2(EclipseLink)/MySql I have several different entities that are exhibiting an intermittent problem and I am puzzled. * *Most of the time EntityX shows up everywhere it is supposed (edit form, lists of EntityX, etc.) *Every so often, an instance of Entit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Return multiple values from a method Hi guys i'm having a problem regarding returning multiple values from a method. I'm using 'out' to return other value from a method, here the snippet: public DataTable ValidateUser(string username, string password, out int result) { try { //Calls the Data Layer (B...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to parse HTML Heading I have this HTML i am parsing. <div id="articleHeader"> <h1 class="headline">Assassin's Creed Revelations: The Three Heroes</h1> <h2 class="subheadline">Exclusive videos and art spanning three eras of assassins.</h2> <h2 class="publish-date"><script>showUSloc=(checkLocale('uk')||checkLocal...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you check if a website is online in C#? I want my program in C# to check if a website is online prior to executing, how would I make my program ping the website and check for a response in C#? A: if (!NetworkInterface.GetIsNetworkAvailable()) { // Network does not available. return; } Uri uri = new ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Cannot serialize interface System.Linq.IQueryable I'm faced with an error, "Cannot serialize interface System.Linq.IQueryable." when I try to run my method in my web service. My class is as such: public class AirlineSearchStrong { public Flight_Schedule flightSchedule { get; set; } public...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why was HTML5 Web Workers support removed from the Android browser in versions 2.2 and up? I'm trying to learn something about JavaScript threading. And from a tutorial I learned about HTML5 API web worker. This API enables JavaScript multi-threading. So I start to figure out how and where can I use this feature. Fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: How to modify an image before caching it with HJCache? I've been using HJCache to do asynch image loading and caching. It works great, but I have use case where I can't seem to get HJCache to handle. I have an images loaded in a table view, and the same images appears bigger when you select the corresponding tablevi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best practice to query dates in SQL when parameterised queries are not possible My brief is to implement a interface which has a method that looks something like 'GetValuesSqlStatement' below: public string SqlPattern { get { ... } } //this varies; eg. "SELECT name FROM someTable WHERE startDate < {0}" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it a design flaw that Perl subs aren't lexically scoped? { sub a { print 1; } } a; A bug,is it? a should not be available from outside. Does it work in Perl 6*? * Sorry I don't have installed it yet. A: At the risk of another scolding by @tchrist, I am adding another answer for completeness. The as yet ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Why doesn't slidedown sometimes gracefully move the content below it? I have 2 buttons on a page with a hidden div underneath each. Each use the same jquery code to slideDown() the hidden object directly underneath. Both 'work' technically as in the outcome is the same, but the transition is very different. The prob...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to convert urls in content to be links using javascript Convert the url in CONENT to be clickable and make it shorter. For example: Convert the content Balabala The link is http://www.google.com/?aaaaabefaaaaaaaaaaaafeeafaeff3asefffffffffff to Balabala The link is <a href=http://www.google.com/?aaaaabefaaaaaa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Determining Razor Web Page Hierarchy I have a custom view page class in an ASP.NET Razor web site (not MVC). What I need to be able to do is determine the child pages that are within the parent page. Is there any way to determine this? Thanks A: I don't know if this can be used, but you might be able to. var page...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to use python timeit when passing variables to functions? I'm struggling with this using timeit and was wondering if anyone had any tips Basically I have a function(that I pass a value to) that I want to test the speed of and created this: if __name__=='__main__': from timeit import Timer t = Timer(super...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: Prevent page from scrolling when page elements are removed I have a bunch of divs that i am removing from the document using javascript. When this is done, the length of the page is often shortened significantly, and if the user had scrolled down the page, it gets abruptly recentered because the entire page now fits...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Loop_expression in 'for' statement in Objective-C Is it possible to put 'x/10' as a loop_expression in 'for' statement as following: for ( ; numberD != 0 ; x / 10) { resultNumber = numberD / x; NSLog (@"Display %i", resultNumber); numberD /= 10; } I tried to run this way, but it fails to do it. Any sugg...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: 2^power without using math.pow and multiplication Is there any way to use code 2^power without using math.pow or multiplication operator. So far, I've though of using 2 counters and additions, but my programs doesn't seem to be working. Here is my work thus far. int counter=0; // k int userNumber=0; // p int power...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Prototype Javascript Framework - Fetching PHP response So I am using Prototype JavaScript Framework, I have no choice, so other frameworks/library unfortunately will not help. In brief, using Prototype.js I am sending a request to a PHP page like this: <input type="button" value="submit by AJAX" onclick="sendRequest...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Separating two divs with CSS Say I have two divs A and B, which are currently aligned side by side. How can I get A to be separated from B by 50px, while still letting A to take up 70% of the remaining space and B the remaining 30%? EDIT: Accepted the answer a little early before I actually tried. Whoops. JSFiddles:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to Implement transaction in function for an XML file? I am passing an XML file to my function. I am making insert/update query for some xmlElements. After executing that query on database,immediatly I will update those xmlElements.Next I will move to another xmlElement . Now I want to implement transaction for t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: EF 4.0 update uniqueidentifier I am trying to update a colum with datatype uniqueidentifier using EF v4.0. I am getting an error Conversion failed when converting from a character string to uniqueidentifier. is there any workarounds for this issue. thanks Ben A: uniqueidentifier -> the value should use Guid typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I update the frame of a Windows Media Player COM? I have a windows media player COM in my Windows Form project that plays and opens videos admirably. However, I would like to be able to grab the first frame of the loaded video so my program users can preview the video (and, ideally, recognize one video from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multi Thread vs Single Thread with Asp.net 3.5 I'm currently working with a web application and it has a custom made workflow implemented using .net classes. In that workflow, we update some data base values and send emails to users base on certain business logics. System has 400 concurrent users and 10000 user base...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Trying to manipulate lines in a document with regex I have a text document that was poorly formatted for my purposes, and I had to make some changes. But now I have another problem, which is a lot of sentences "stranded" on their own, like this: \n [some text here, bla bla bla.]\n \n Does anyone know of...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Strange legend using aes(colour) in ggplot2 I have this code: x <- seq(-600, 600, length=10000) dat1 <- data.frame(x=x, SD=400, val = (1/(1+10^(-x/400)))) dat2 <- data.frame(x=x, SD=200, val = (1/(1+10^(-x/200)))) dat3 <- data.frame(x=x, SD=600, val = (1/(1+10^(-x/600)))) dat <- rbind(dat1, dat2, dat3) ggplot(data=d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to fix SlickGrid's column-resizing bug? I've recently (re-)discovered SlickGrid, and am considering using it for a project I'm working on, mainly because in many ways it appears to be the most versatile and powerful and performant (forgive the neologism) JavaScript grid yet created. There are only a f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Jquery-Tools Tabs AJAX Caching... so close yet so far JqueryTools Tabs is really wonderful [http://flowplayer.org/tools/demos/tabs/ajax.html]. The only catch is that these AJAX-enabled tabs don't do any caching. So each tab click means a fresh reload each time. We're almost there though, take a look at these threads...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't get publishProgress to work properly. Help? I have an AsyncTask that takes urls and gets the content length for all urls that are passed through. I'd like to have the progress bar update in the titlebar and have an alertbox display when it is done getting the final value. But I'm having trouble understanding...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I process multiple files concurrently? I've a scenario where web archive files (warc) are being dropped by a crawler periodically in different directories. Each warc file internally consists of thousand of HTML files. Now, I need to build a framework to process these files efficiently. I know Java doesn't sc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Event JavaScript when Esc on click? How to make the event when the Esc key is pressed; please give me an example of an alert ();. A: document.body.onkeyup = function(e){ if(e.keyCode == 27){ alert('Yay'); } } A: if your interested in using jquery, check this code <script type="text/javascript"> $...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cross Browser Compatibility and docType declaration I designed a webpage and tested it on firefox, chrome & IE-8. The webpage is displayed fine on firefox & chrome but not on IE. In the process of making it compatible, I changed the DocType declaration from HTML 4.01 Transitional to XHTML 1.1 to HTML 4.01 Strict. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to pass NSDictionary values to UITableViewCell properly Hey guys I have a problem, I have a NSDictionary of NSArrays and im trying to set up alphabetical sections so AAAAA, BBBB, CCCC.... etc however when I pass my values over its printing out all of the A values right into one uitableviewcell then the B's in th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use IF Statement or Case when in Where Clause SQL Please help, how can I insert If or Case in Where clause This is part of my code and I receive errors however I insert If or Case When. This is the error Msg 156, Level 15, State 1, Procedure p5, Line 35 Incorrect syntax near the keyword 'BETWEEN' AS WITH ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cufon not working after ajax request Initially cufon replaces the main page text. After loading another page file, cufon doesn't apply it's replacement to the newly loaded content. Why? I added cufon.refresh(); as the very last of the chained functions. I notice cufon is trying to replace the font, how ever it seems...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: AttributeError: 'function' object has no attribute 'my_args' How can I get access to my_args list data type in __main__? test1.py #!/usr/bin/env python def main(): print 'main function' one() def one(): print 'one function' my_args = ["QA-65"] def two(): print 'two function' if __name__ == "_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Evaluate[] seems to not work inside Button[] Any idea how to get this to work? y = {}; Table[Button[x, AppendTo[y, Evaluate[x]]], {x, 5}] Result: Click [1] , click [2], get {6,6} I'm trivializing the actual task, but the goal is to set what a button does inside a Map or a Table or ParallelTable. Please Help! EDIT ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I set the correct content type in a WCF binding without using app.config? I have created a service reference to the CRM 2011 Organization.svc from a test console application. Everything works perfectly using the binding generated in the app.config. (Example of the service hosted by Microsoft here.) This now n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Change Image when a button is clicked I have an image and a button within a panel. When the button is clicked I would like my image to be replaced with another image at random based on an array of stored images. I'm stuck on implementing a change image function within the button. Assistance would be appreciated. A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is collaboration tools in SharePoint 2010? Please give me know what is collaboration tools in SharePoint 2010? Thanks! A: Collaboration tools in SharePoint 2010: * *Discussion Board *Blog *Wiki *Tagging *Bookmarking *Rating. *Activity feeds
{ "language": "en", "url": "https://stackoverflow.com/questions/7523853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: How can I combine JQuery selectors and variables to shorten code for easier scaleability? I have this piece of javascript that is working. var footerColour = $.color.extract($("div#one.footer"), 'background-color'); var newrgba = $.color.parse(footerColour).add('a', -0.5).toString() $("div#one.footer").css("backgrou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Attempting to create two 50% high divs-stacked in a push/pull "hideTop/showBoth/HideBottom" configuration The layout solution I'm trying to pull off involves a 960px(W) x 100%(H) centered wrapper. Within that wrapper are two stacked divs (960px(W) x 50%(H) stacked on top of another 960px(W) x 50%(H)). The interfac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java Relative URL for URL class I have a file in my working project. It's in the current directory of source code. Main -> src [packeges] -> plugin ->MyLib.jar -> other I have a class in a packege of the src folder. Now I want to load the jar file to URL class like, new URL("jar:file:/./plu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ui slider with text box input We have a ui slider we utilise, and it works flawlessly. code: jQuery(function() { jQuery( "#slider-range-min" ).slider({ range: "min", value: 1, step: 1000, min: 0, max: 5000000, slide: function( event, ui ) { jQuery( "#amount" ).val( "$" + ui.value ); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: DataBase (datamodel) to build a folder structure Planning on building a Folder based structure in Java. I will be using a jquery plugin for the GUI, so I don't need need information on how to display the folder structure. I am looking for the backend logic on how folder information is stored, such that it can be re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Syntax errors in my assembly code I had this code and I was wondering if anyone would be willing to help me get it working. TITLE MASM Template (main.asm) ; Description: this code is supposed to print out each letter followed by a space and then the capitalized version on seperate lines ; Revisi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-8" }
Q: Replace all non numeric characters in MSSQL with an empty string My current MSSQL table has a "phone" column which is a varchar. Unfortunately, the phone numbers that are already in the database are not in standard format. For example, 888-888-8888 OR 888/888/8888 OR (888)8888888 OR 8888888888. I want to get all the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I debug a windows service without Visual Studio? (on a client's machine) I have a .net windows service I have developed and I am familiar with how to debug it using Visual Studio and attaching the debugger to the process. I also have the service writing to log files throughout its processing to assist in de...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Learning raw PHP/MySQL, are databases supposed to be confusing? I'm fairly new to programming, and I'm teaching myself PHP and MySQL from scratch. I'm beginning to understand how databases work: you have tables, and you have unique ids for all of your subjects for your website. However, this seems rather tedious, as...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use the value entered in a JSF page for Java Applet I have created a JSF page which asks the user to enter a value, and this value is being processed via Applet and create a barcode image based on the inputted value. My problem is how can i get the value from the JSF Page and use it in my Applet.. Thanks! A: Use Ja...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Flex Async Madness - Any way to wait for a rpc.Responder to get a response before going to the next statement? I feel like I must be doing this wrong. I've got a function that is supposed to construct a query based on an API's description of available fields. Here's what I've got: var query_fields = getQueryFields...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Return a boolean value from a list comprehension I'm brand new to haskell and am working through some tutorial problems for a functional programming course I am taking. There is one problem that I am completely stumped on. Define a function that returns whether a given string contains all numerical values or not (i....
{ "language": "en", "url": "https://stackoverflow.com/questions/7523881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using regular expression in ruby I am trying to strip all the <br>'s in a given string. def extract(a) a=a.delete("/ (\<br\>)+ /") puts a end extract("e<gr>y<br>t<gh>hello") is giving egytghhello as output. Why is the <r> of <gr> and <> of gh not getting printed? A: String.delete doesn't take a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7523884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }