text stringlengths 8 267k | meta dict |
|---|---|
Q: ECB context menu in Aquamacs ECB (Emacs Code Browser) has context menu to add file, delete file etc. The context menu is opened when clicking right mouse button.
The problem is Aquamacs intercepts that mouse button event. When we click right mouse button in Aquamacs, it opens its own context menu. (In the Emacs down... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541693",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to replace "[X]" in a string with a particular value for each X? string Sample=@"
Select * from Table1 where Id =[MY Id]
and Column2=[MY Column2 Value]
";
This is SqlCommand CommandText I will replace all string that start with [ and end with ]
before use command
How Can I find parameter name beetwen [ and ] ?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541694",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how to retrieve the ID of the Link in Jquery? i am having a situation here ... please consider the following scenario
1) value coming from the database eg: personName ( whos id in the database is 3 )
2) i am making a link of the " personName " through @Html.ActionLink
3) the link id is "lnkName"
i want to retrieve t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541696",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the fastest algorithm to find the minimum difference between pairs of numbers in an array?
Possible Duplicate:
Is it possible to find two numbers whose difference is minimum in O(n) time
For example, in [4, 2, 7, 11, 8], the algorithm should return abs(7-8) = 1.
The brute force way will be O(n2) and sorti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541704",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: flex input box doesnot work in fullscreen mode i have a problem in flex fullscreen mode...
that is my input box doesnot work in fullscreen mode.
I could'nt able to type anything. and no keydown events are working.
A: Unfortunately keyboard control in full screen is very limited.
From Adobe documentation:
Currentl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541705",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Some questions on .vimrc and vim configuration Generally on a unix system, there is a global vimrc file in the directory /etc or /etc/vim. You can also have a .vimrc file in your home directory that can customize your vi session.
Is it possible to have a .vimrc elsewhere in your directory tree so you can use differ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541714",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to layout scrollview and image on Android I would like to have a screen where most of it is a ScrollView occupying 80% of the screen, and the lower 20% is an image. Within the ScrollView, I'd like to be able to stack a long text over buttons at the end of it. (Think of it as a survey application.)
I am unable to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541716",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Reading file in python without linebreak I want to be able to read a file and add a string onto it line by line without having a line break in the middle.
text_file = open("read_it.txt", "r")
print text_file.readline() + "0123456789"
Outputs to
>>
text
0123456789
>>
I would like have it output to this format
>>
te... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541721",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Performance of a Asp.Net Webforms application using WCF Service for getting data from a CMS Which disadvantages / problems might occur, if all content from a ASP.Net WebForms application was received through a WCF service, rather than through a direct database call?
(Entity Framework 4.0 as provider, SQL Server 2008... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541723",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Stylesheet control for QComboBox tick? I have a nice stylesheet for a QComboBox but I can't find how to style the tick.
The tick is a graphic that appears next to the currently selected item. There are two problems: 1. When the mouse is on the currently selected item, the selection-background-color is applied to the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541724",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: mysql query for between operator with range i have sample records ranking table
SNO NAME TYPE RANK1-RANK2 DATE
2 sd sdf ds Weekly 4 - 8 20-Sep-2011 19:23:02
3 asd asd Weekly 1 - 6 21-Sep-2011 19:23:02
4 sdsdsfsd Weekly 1 - 1000 22-Se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541732",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Large PHP session slowing down web application I have a web application where complex permissions determine whether or not a user has access to each of thousands of different files. A user can see all files, but there is an indicator to open files that they have access to. A user has access to a file if someone else... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541740",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Facebook API : Make profile picture for page - help needed It is possible to select a picture from an album and put it as profile picture for my fan pages with the facebook graph api ?
A: No it's not possible. Here is the official Page object document to check what can be done.
A: No. You can't even upload to the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541745",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Locking with ConcurrencyMode.Multiple and InstanceContextMode.PerCall Do I need to implement my own locking in a WCF service that uses ConcurrencyMode.Multiple and InstanceContextMode.PerCall or InstanceContextMode.PerSession? Since a new ServiceContext object is created at every call or new session I should think t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541748",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: c++ win32 dynamic menu - which menu item was selected i have a win32 application (c++) that has a context menu bind to the right click on the notify icon. The menu/submenu items are dynamicly created and changed during runtime.
InsertMenu(hSettings, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR) hDevices, L"S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541750",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to Change Jquery Menu Background Color? I have a Jquery menu and I would like to change background of it how can I do it ?
This is the website;
http://tinyurl.com/3g58vhb
Instead of Grey I would like to make it #4466DD
A: Go to common.css, line 849. Where it says "background-color:rgba(0,0,0,0.8)", replace it w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541755",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Grails validate() overwrites rejects I'm aware that it's a bug, but calling validate() on a domain class overwrites any rejects that are put in before:
def save = {
def assignment = new Assignment(params)
assignment.errors.reject("assignment.error")
// Save
if (assignment.validate()) {
//re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541760",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Table name as parameter using PDO/MySQL prepared statement Is this possible? e.g.
SELECT * FROM :database WHERE id = :id
If not, should I just do this:
SELECT * FROM ' . $database . ' WHERE id = :id
Or is there some other trick I need to learn?
A: Table and Column names cannot be replaced by parameters in PDO.
se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541761",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Emacs project management for Scala I would like to ask if any of you have any experience {and,or} could point me to a project management extension for Emacs that works well with {Scala,Ensime,SBT}. It would also be amazing if it didn't require too much hacking. I did some scheme in the past but I have little experie... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541762",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: C# string.Replace problem I have a string like this:
string query = "INSERT INTO CUSTOMER (id, name, address, address2) VALUES(@id, @name, @address, @address2)"
then I replace @address with 'Elm Street' using
query = query.Replace("@address", "'" + "Elm Street" + "'");
and the result become:
INSERT INTO CUSTOMER (... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541763",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: CSS table default padding or margin Today it's my first time I'm playing around with tables
and I have noticing that the table and tr and td tags have a little space between them,
like 1 px or so.
So here is my problem :
There is my code :
<table id="upload_box_container">
<tr>
<td class="border_bottom_1... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541765",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Dynamically added table rows not appearing I have seen many posts regarding dynamically adding table rows, but I am not sure what I'm missing.
When I execute the following, nothing is displayed (aside from application title bar).
My Layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541766",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How can I show a Balloon Tip over a textbox? I have a C# WPF application using XAML and MVVM. My question is: How can I show a balloon tooltip above a text box for some invalid data entered by the user?
I want to use Microsoft's native balloon control for this. How would I implement this into my application?
A: Thi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541767",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Using a JavaScript method from Facebook I found this code from Facebook. I would like to use a structure in this way. How can I use this method?
for (;;);{"__ar":1,"payload":null,"css":["wOyD6","Dk+z9","uUZcv"],"js":["TNp9j","12BHN"],"onload":["(function(){var k=Arbiter.subscribe(\"xhpc\\\/construct\\\/\"+this.id... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541770",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: didSelectViewController for subclass of UITabBarController not working So I've created MainViewController which is a subclass of UITabBarController:
@interface MainViewController: UITabBarController {
}
I initialized this from the app delegate and then set delegate to self:
MainViewController * main = [[MainViewC... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why HTML5 Geolocation? Why does HTML5 geolocation let you share your location? What is main purpose of using geolocation, as you can get the location with IP address as well. Is there any difference between these two methods?
I'm asking because geolocation requires the user's permission and also doesn't work on all ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541779",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How to create div with 100% height with jquery mobile? How to create div with id=test with 100% height?
<div data-role="page" id="device1">
<div data-role="header">
<h1>Title</h1>
</div><!-- /header -->
<div data-role="content">
<div data-role="fieldcontain">
<input type="range" na... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541780",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Using Ribbon control with PRISM I want to create a composite wpf application with ribbon control using Prism,
and I have some thoughts about commanding:
The ribbon tab is in different view, so i guess it will have specific view model. but the command should be in another view model, because when I click on button in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: JGraphT cannot be cast to org.jgrapht.graph.DefaultWeightedEdge I'm new Java and am using jGraphT to create a SimpleDirectedWeightedGraph. I'm getting this error when trying to set weights on my edges after creating and adding them to the graph:
Exception in thread "main" java.lang.ClassCastException: ObservationsDA... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541785",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Modify DOM with JQuery after any AJAX Call over which I don't have control I'm working with SharePoint 2010, one of the aspx pages contains a Note Board web part which provides simple functionality to leave a comment on a given page.
When the page is loaded the comments are retrieved by that web part using AJAX, I D... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541788",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: list access in webform markup my datasource is a list of customers in a webforms project
protected void Page_Load(object sender, EventArgs e)
{
List<Customer> customers = new List<Customer>();
customers.Add(new Customer() { FirstName = "John", PhoneNumber = "999.999.9999" });
customers.Add(new Customer()... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541793",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: how to get the String from StringBuilder fast? I have a feeling that using the: StringBuilder.toString() is slow and very resource-consuming..
So I'm thinking about something like this:
public static void doSomething(String data){ ... }
public static void main(String[] args)
{
StringBuilder s = new StringBuild... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541795",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Using custom annotations to generate biolerplate code Folks,
I am about to write a ton of J2EE/JAX-RS code where practically all public methods will do the following:
*
*Look for the presence of a security token in the request header.
*Call a utility to make sure the token is valid.
*If not valid, return an err... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541796",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Can MVC route resolution mechanism be re-configured? I have implemented custom VirtualPathProvider to serve customizable Views from a DB and when i put a breakpoint on the FileExists method I noticed that the framework does ton of unnecessary (for my project) requests. For example when I make a request for non-exist... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541801",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Allow only alphanumeric characters for a UITextField How would I go about allowing inputting only alphanumeric characters in an iOS UITextField?
A: The RegEx way in Swift:
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.isE... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541803",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: How to show a component by the controller? I need to register an user and after that I would like to call a <rich:popupPanel> for example to show the error or successful message with an icon.
<rich:popupPanel id="popup" modal="false" autosized="true" resizeable="false">
<f:facet name="header">
<h:outputT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541808",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I make any C++ library I make thread safe? First of all, I'm fairly experienced with C++ and understand the basics of threading and thread synchronization. I also want to write a custom memory allocator as a pet project of mine and have read that they should be thread-safe.
I understand what the term "thread-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541810",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Variable radius Gaussian blur, approximating the kernel I'm writing a Gaussian blur with variable radius (standard deviation), i.e. each pixel of the image is convolved using a different kernel. The standard techniques to compute Gaussian blur don't work here: FFT, axis-separation, repeated box-blur—they all assume ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541811",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do I use the GTGE library? Java 2D games I downloaded from the official site a zip containing a jar and a "docs" folder, inside there is a "com" folder and a "resources" folder. I want to be able to use this libray in my java IDE (eclipse) but when i type : import com.golden.*; it does not recognise the command... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541820",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to apply javascript formatting to .json files? The Ctrl + Shift + F hotkey in Eclipse can format a file. It doesn't work for .json files. How to make it work?
A: There are two options I figured out using Eclipse Luna (4.4.0).
Use a JSON Editor Plugin and define shortcuts
*
*Download and install the JSON Edit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541823",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Hard-coding URLs vs Nested Set vs Combo in Content System I've been putting together a database to handle content produced for a site, however, thinking about the long-term, I'm unsure if I have the best system.
At present I'm using the routing method of passing everything via index.php which .htaccess routes as fol... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541832",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Serve Django project on local WiFi Network I used
python manage runserver 0.0.0.0:8000
to start the server so that I can access the project from other computers on my wifi network, but when i browse to internet-ipaddress:8000 on an another computer, the project doesn't load. Am I missing a setting?
A: What do you ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541834",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Java Spring Web Service Client Fault Handling I have written a web service client (using Java Spring and JAXB Marshaller) that works with the UPS web service. When I send a valid request everything works well. When I send an invalid request (weight > 150 lbs) then the UPS web service responds with a SOAP Fault. The ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541836",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to dynamically display output in android? I am developing a small application that executes shell commands and displays the output say for example ping command. The application has an edittext which takes the hostname or IP as input from user and a button to execute the command. For the time being I have used an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541839",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: JQuery Mobile Redirect Help This site is not redirecting to the .mobi site. Is that because the redirect script is not at the top of the "head" and is conflicting with the other scripts that are being called first? Any suggestions? Other people seem to say it just needs to be in the head area. That is not working th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to search for comments ("") using Jsoup? I would like to remove those tags with their content from source HTML.
A: When searching you basically use Elements.select(selector) where selector is defined by this API. However comments are not elements technically, so you may be confused here, still they are nodes id... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541843",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: PHP - Why does including a function from another file fail? I am trying to include a function from one PHP file into another and use the function with a parameter and get a return value. All is good until I run the function, where PHP dies. How can I fix this?
timestamp_reader.php:
<?php
function get_time($timestamp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541845",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Wildcards in Generics: "? super T" works while "? extends T" does not? My question is about generics in Java 7. Suppose we have such class hierarchy:
interface Animal {}
class Lion implements Animal {}
class Butterfly implements Animal {}
Just like in Java Generics Tutorial
Also we have a class
class Cage<... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541849",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Exception in "AWT-EventQueue-0" I appologise in advance for this question possibly being hard to interpret, but I'm trying to include the minimum information necessary (I doubt you want to be reading through 10 different classes looking for the error)
I have been making a simple(ish) application in java, using swing... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541851",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Image Button only responds when clicking on the image and not the area around inside the button I'm using the following button style which takes away the borders and makes a transparent background to make my image buttons:
<Style x:Key="EmptyButtonStyle" TargetType="{x:Type Button}">
<Setter Property="Backgrou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541858",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: A list of predefined groovy variables I'm new to groovy and I'm wondering where can I find a full list of predefined
groovy variables like it and delegate?
The particular thing that I'm interested in is if there are predefined keyword for
the reference to the object from where the current method was invoked, for e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541859",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Python equivalent of find2perl Perl has a lovely little utility called find2perl that will translate (quite faithfully) a command line for the Unix find utility into a Perl script to do the same.
If you have a find command like this:
find /usr -xdev -type d -name '*share'
^^^^^^^^^^^^ =>... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541863",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Sorted output of a joined MySQL result in PHP Doing an allnighter on a project and my mind is blank atm... Simple question really:
I have two MySQL tables, product and category. Each product belongs to exactly one category. Every category has several products.
SELECT
p.uid as product_uid, p.name_NL as product_nam... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541864",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: HTML cache version You know how if you use
<script type="text/javascript" src="urlhere.js?version=1.0.0"></script>
the browser caches the javascript file and updates it when you give it a new version?
Is there a way to do that with the HTML code?
Because I want the browser to cache the HTML, but then update when t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541866",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to create variadic function? (Can take any number of arguments) I was wondering if there is a similar way to do this (C# definition) in Objective-C:
public void MyWorkingMethod (string Argument1, params int numbers)
It can be called like MyWorkingMethod("a") or MyWorkingMethod("b", 1, 2, 3).
I'm trying to imple... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541867",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: C++ Swap string I am trying to create a non-recursive method to swap a c-style string. It throws an exception in the Swap method. Could not figure out the problem.
void Swap(char *a, char* b)
{
char temp;
temp = *a;
*a = *b;
*b = temp;
}
void Reverse_String(char * str, int length)
{
for(int i=0 ;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541874",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MySQL performance and optimization with multiple queries on a profile page, can they be reduced? I am working on social networking site, which has a profile page for each user.
The profile page contains:
*
*info about the user, avatar, hobbies & etc
*their videos and photos
*their friends
*their bookmarks
*v... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541879",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Exception-Raising Win32 API Wrapper? I've seen many wrappers for the Windows API (MFC, ATL, WTL, etc.) but none of them seem to use exception-handling -- you still have to check the error codes for most functions, which is easy to forget (or to omit due to laziness).
Is there any wrapper out there that actually thro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541882",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Positioning of DDL items? i have a dropDownList which gets its data from a database. Now after the data has bound, i programmatically add another listItem to the ddl, like so:
protected void ddlEffects_DataBound(object sender, EventArgs e)
{
DropDownList ddl = dwNewItem.FindControl("ddlEffects") as DropDownList;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541884",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How make fancybox auto close when youtube video id done? How i can make fancybox auto close when youtube video ended?
A: This isn't as simple as it sounds:
*
*First determine if you are going to use the embed or iframe player.
*Follow the embed player API or iframe player API examples to initialize the API.
*U... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541890",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: C++ Builder Flow Diagram Component? We want to draw large control flow diagrams in a C++ builder XE application being developed.
These diagrams will be generated programaticaly and displayed to the user in an interactive fashion (the user can scroll around the large flow diagram, select nodes and so on). The nodes m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541895",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Access Key from Entity that's instantiated but not stored [objectify] [@prepersist] I have written a @PrePersist method that's called before my User object is persisted. The purpose of the method is to make a kind of reservation for the User, so no one else can take his email address. So, when the User is about to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541896",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to Deserialize xml to an array of objects? I am tryind to deserialize a xml file into an object[] - the object is a rectangle with the following fields
public class Rectangle : IXmlSerializable
{
public string Id { get; set; }
public Point TopLeft { get; set; }
public Point BottomRight { get; set; }
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541899",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Smarty Error: media_player.php is not readable I copied a website from rareculture.net to my local machine so that I can work with it. The site uses CS Cart, which uses Smarty, and I am getting the following error:
( ! ) Warning: Smarty error: http://localhost/cscart/skins/projection/customer/media_player.php i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541901",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Find account GUID, and Select it back using Object GUID
I am trying to select a unique identifiers for accounts from Active Directory. I found that "objectguid" attribute do identify a user uniquely, but my problem is that I don't know how to convert the retrieved value into a readable format. And then be able to s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541907",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Why aren't the arguments to File.new symbols instead of strings? I was wondering why the people who wrote the File library decided to make the arguments that determine what mode the file is opened in strings instead of symbols.
For example, this is how it is now:
f = File.new('file', 'rw')
But wouldn't it be a bett... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541911",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Invoke Java from C++ I am trying to invoke the Java Virtual machine from C++ following the example found here:
Basically I have a small Java program:
public class TestJNIInvoke
{
public static void main(String[] args)
{
System.out.println(args[0]);
}
}
Then I have a C++ program that I want to creat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Can the ARM version of Windows 8 only run Metro (WinRt) style apps? See also: Is there any way to write a WinRt (Metro) app that will also work on Windows 7 and Vista?
I am trying to understand how to target both Windows 8 on Arm and Windows 7, given that Windows 7 cannot run WinRT apps. And as I understand it, ap... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Android: Adjusting EditText font size to fit text to one line I am making an app that has two EditText views, txtOne which is used for input, and txtTwo which is used for output. txtOne is editable, and txtTwo is not.
I am looking for a simple way to scale the font size of the text in these two views so that it alwa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541922",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Self hosted WCF Service not working when i type url in browser? I'm new to WCF. I have made a simple self hosted service and added app.config but when I type address in the browser it is not showing me the service page that we get when we create our service http://localhost:8067/WCFService it is not displaying the s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541925",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How is rate_limit enforced in Celery? I'm running a Django website where I use Celery to implement preventive caching - that is, I calculate and cache results even before they are requested by the user.
However, one of my Celery tasks could, in some situation, be called a lot (I'd say sightly quicker than it complet... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541931",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: how to get the first and last days of a given month I wish to rewrite a mysql query which use month() and year() functions to display all the posts from a certain month which goes to my function as a 'Y-m-d' parameter format, but I don't know how can I get the last day of the given month date.
$query_date = '2010-02... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541938",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "80"
} |
Q: Increase numbers in python until max I want to have python spit out a bunch of numbers for me.
example:
>>>date = 1940
>>>date += 1
>>>print str(date)
1941
>>>
but i want to loop that and output all numbers from 1940-2004
A: Use the range function.
for i in range(1940,2005):
print i
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7541939",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: Eliminate redundant letters in string? (e.g. gooooooooood -> good) I'm trying to set up some sample data for a Naive Bayesian Classifier for Twitter.
One of the post-processing of the tweets I'd like to do is to remove unnecessary repeat characters.
For example, one of the tweets reads: Twizzlers. mmmmm gooooooooooo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541942",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to check if a directory exists in Objective-C I guess this is a beginner's problem, but I was trying to check if a directory exists in my Documents folder on the iPhone. I read the documentation and came up with this code which unfortunately crashed with EXC_BAD_ACCESS in the BOOL fileExists line:
-(void)checkI... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541943",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Calling a class's constant in another class's variable I was wondering if there is any possibility in PHP to do following;
<?php
class boo {
static public $myVariable;
public function __construct ($variable) {
self::$myVariable = $variable;
}
}
class foo {
public $firstVar;
public $secondVar;
public $... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541944",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: recording dll APIs and then mimicking it Is there some tool that can record APIs in some c++ dll , and then playback them .
At our costumer site we have a machine with some vendor software that exposes it's functionality .
We wanted to record that dll and then mimic it back at the office .
Any idea how We can do tha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541955",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Value of type cannot be converted to I am sure i am doing something terribly wrong, but i should better ask the experts.
At the third line i get the error Value of type <anonymous type> cannot be converted to <anonymous type>
Dim Query = (From c In Db.web Select New With {.AA = c.AA}).ToList
Dim v = New With {.Amo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541964",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Mod_rewrite directory requests I am trying to do this:
example.com/directory/song.mp3 -> Unchanged
example.com/directory/ -> example.com/?dir=directory%2F
example.com/ -> Unchanged
example.com/index.php -> Unchanged
Basically, if a user requests any directory other than root, I need it rewritten, not redirected, to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541966",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to find/remove input in form by value? How to find/remove input element in form by value ?
A: You can use filter to cover all the bases:
var matches = $('input').filter(function() { return this.value == 'what you want' });
matches.remove(); // If you want to remove them of course.
An attribute selector only se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541970",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I test database transaction logic? I often find error handling is one of the hardest things to test. Thankfully with dependency injection and mocking frameworks it's getting much easier.
However, I'm still having trouble testing data access objects, especially the error handling and rollback aspects. Sup... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541973",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Managing Form's code in VB.net Whats the best way to organize code responsible for Form's content.
In my case, there is a DataGridView and list, next to it, with a few options available (projects, managers, employees, etc...). Choosing any list's element fills DataGrid with proper data from database.
Now, GridFill f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541975",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: fnmatch how exactly do you implement the match any chars in seq pattern so i have a os.walk code
search = self.search.get_text()
top = '/home/bludiescript/tv-shows'
for dirpath, dirnames, filenames in os.walk(top):
for filename in filenames:
if fnmatch.fnmatch(filename, search)
print os.path.join([dirpa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to check if a UID exists in an ACL in Linux? I need to write a program, part of which involves checking if the userid of the person executing the program exists in the ACL file of a file which the program uses. That is, this program writes into the file and only users whose ID and privileges are entered in the A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541979",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Facebook + UserBundle authentication with symfony2 I'm trying to authenticate my users via facebook or userbundle on symfony2
Here's what I did so far (and it works, although not as I want):
firewalls:
main:
pattern: .*
fos_facebook:
app_url: "http://apps.facebook.com/appName/"
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541980",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: Help with solving D&D maze using Java I been reading some of the other questions that have been posted on stackoverflow and I am a little overwhelmed by the number of search algorithms there are. I'm not looking for code and more of a page that goes over background of the algorithm and maybe some sudo code. I know t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541981",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: .Net - ado.net importing rows vs adding rows? The DataTable has a method called ImportRow(), There is also a method unders the rows called Add(). So what's the difference between these methods?
dataTable.Rows.Add(newRow);
vs
dataTable.ImportRow(newRow);
A: *
*ImportRow preserves any setting of the row: DataRowSt... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541986",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to ignore files in Git that are like _ReSharper I want to ingore any file/folder that has:
_ReSharper
in the file or folder in my .gitignore file, is this possible?
I tried:
ReSharper
but that doesn't work.
A: Just add the exact name you want to the .gitignore, in this case add
_ReSharper
_ is not a special c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541988",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Where to put sql queries? Code style. Java. JDBC I am working with JDBC driver and my problem is storing SQL queries in a good place. The point is that it will be making a large number of queries.
Statement s = conn.createStatement ();
s.executeUpdate ("DROP TABLE IF EXISTS animal");
s.executeUpdate (
"CR... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541990",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: PHP parser ASP page
Possible Duplicate:
PHP : Parser asp page
I have this tag into asp page
<a class='Lp' href="javascript:prodotto('Prodotto.asp?C=3')">AMARETTI VICENZI GR. 200</a>
how can i parser this asp page for to have the text AMARETTI VICENZI GR. 200 ?
This is the code that I use but don't work :
<?php
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541991",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to rewrite /archive/* to /post/* in ASP.NET I'm trying to migrate from SubText to BlogEngine.NET and I want to keep the links to the old posts working.
The URLs are very similar, previously they were:
http://server/archive/year/month/day/name-of-the-post.aspx
and now they are
http://server/post/year/month/day/n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541995",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Run many .exe files in 1500 folders Hello i have about 1500 folders each containing a .exe file and some associated input files.
The process is simple, when i double click the .exe file it operates on the input files and gives a new output within the folder.
I just want to know how to do this for all 1500 folders w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7541996",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Store files temporarily on server until a task is completed I cant use sessions.
So heres the scenario: I want the user to upload an image, but that image needs to be a particular size. So I allow them to upload any size image, store that temporarily on the server (resize it so it fits on the webpage), display it ba... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7542000",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Javascript perform arithmetic on captured regexp I want to replace my title from its default to "*number* new messages | default"
Here is the code I have, it changes from default to 1 new messages fine, but it never goes above 1.
title = $('title').text();
regexp = /^(\d+)/
if (title.match(regexp))
$('title').tex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7542001",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to generate bitcode from dragonegg Back when dragonegg was in llvm-gcc one could issue -emit-llvm and it did generate llvm bitcode. Now when I use dragonegg as a plugin (gcc -fplugin=dragonegg.so) I cannot find any such option anymore. The only thing I found was generating LLVM IR - which is not what I want.
How... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7542012",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to organize / structure methods into namespaces in a WCF service? What is considered as best-pratice when it comes to organizing / structuring methods in a WCF Service?
Let's assume I have a .net dll that I want to expose through a WCF Service.
The .net dll has a namespace structure like this:
Root
-- > SubNameS... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7542013",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Disadvantages of Sql Cursor I was studying cursor and I read somewhere that. Each time you fetch a row from the cursor, it results in a network round trip whereas normal select query makes only one round trip however large the resultset is.
Can anyone explain what does that means? And what does network round trip a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7542014",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Change to a option on click? jQuery I have a select inside a <tr>. When you click on a link I would like the select change to the option that has value "00:00".
I tried myself and came this far:
jQuery(this).parents('tr').find('select')
A: How about this?
$(this).parents('tr').find('select').val('00:00');
A: $('... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7542017",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: JBox2D collisions not bouncing I have an Android application using JBox2D for physics simulation. The only dynamic object is a 0.07m radius circle, as well as several static circles and rectangles in a total game area of about 20m by 20m. I'm also using a few custom forces through the ApplyForce method.
Whenever any... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7542018",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to get max value of a column using Entity Framework? To get maximum value of a column that contains integer, I can use the following T-SQL comand
SELECT MAX(expression )
FROM tables
WHERE predicates;
Is it possible to obtain the same result with Entity Framework.
Let's say I have the following model
public clas... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7542021",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "116"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.