text stringlengths 8 267k | meta dict |
|---|---|
Q: Emacs mmm-mode not highlighting a ruby submode (ERB) without a newline? Elisp advice? I'm trying to get ERB templates 'working' in Emacs 22 and 23 (two different servers).
I've found several examples online that use almost exactly this snippet. Note that I don't want any background colors, as I'm working in a termi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522887",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: LinqDataSource class example Just starting to look into using LinqDataSource for a GridView and Iβm looking for a few more examples on how to set up my data source.
I am hoping later on to use it against a SharePoint List but for now Iβm simply after some detailed examples for a class that I can retrieve data from a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522890",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Trouble with properties in Objective-c I'm having trouble assigning an instance of a class to the following UITableViewController subclass:
@interface MyTableViewController : UITableViewController </*usual protocols*/>
@property (nonatomic, retain) MyClass *myClass;
@end
I'm currently assigning a non-null instance ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522897",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: abbreviations in mysql select, what do they mean? i have a problem to understand what happens in this query:
$db->select("select r.id, m.mailing_id, r.email,
m.done from lp_relations r, lp_mailings_relations m
where m.relation_id=r.id and m.mailing_id=? order by r.name",
$rs[$i]["id"]
its about the letters r. and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522899",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Reasoning behind having to specify L for long, F,D for float, double A few related questions here.
As per the title, why is it a requirement if we are specifying the variable type as long or float, double? Doesn't the compiler evaluate the variable's type at compile time?
Java considers all integral literals as int ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522901",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Removing 'http://' from link via REGEX What I would like to do is remove the "http://" part of these autogenerated links, below is an example of it.
http://google.com/search?gc...
Here are the regexes I am using in PHP to generate these links from a URL.
$patterns_sp[5] = '~([\S]+)~';
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522904",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: DirectX multiple DLL versions? I see that DirectX 9 has multiple DLL versions, like
*
*d3d9.dll
*d3d9_25.dll
*d3d9_42.dll
*d3d9_43.dll
I'm wondering what the differences are, and how I can detect it? I have always been using GetModuleHandle("d3d9.dll");, but if an application has d3d9_43.dll, then my code wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522911",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Inserting a date/time value in Access using an OleDbParameter I'm trying to do an insert in oledb(ms access database)
the field called objectdate is date/time
the code i use to add the parameter is this, but i'm getting error.
OleDbParameter objectdate = new OleDbParameter("@objectdate", OleDbType.DBDate);
objec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522924",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: ASP.NET MVC: How do I display multiline text? View Model:
public class Note
{
[DataType(DataType.MultilineText)]
public string Text { get; set; }
}
Default editor template renders a <textarea> element with the newlines preserved.
The default display template renders the text as a single string with the newl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522925",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How to clean & optimise code generated by WCF OData service? I have an OData web service that is mostly OOTB in terms of how it accesses and returns data from the database.
The problem we're seeing is that the code being generated is incredibly - and unnecessarily - complex and is causing huge delays when executing ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522927",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Setting a radio button based on jquery autocomplete value I have a form that directors fill out when they add an event to my database. Since the particular type of event is likely to happen more than once, I am trying to make it as easy as possible for them. Using autocomplete, I get the text values to work just f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522930",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I capture this warning message when the query is blocking? When I do a query with isql I get the following message and the query blocks.
The transaction log in database foo is almost full. Your transaction is being suspended until space is made available in the log.
When I do the same from Python:
cursor.e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522932",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Why is a non UI thread able to modify UI control in WinForm & TPL? I was testing a piece of TPL code I wrote below. The two ManagedThreadId's display different numbers. The new task therefore, I am assuming, is running on a non UI thread.
My question is how is the task able to display a message and change a UI contr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522933",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Why does this simple LINQ query syntax statement not translate to method syntax? Here's the query syntax version:
DataGridViewRowCollection mydgvrs = new DataGridView().Rows;
IEnumerable<DataGridViewRow> a =
from DataGridViewRow row in mydgvrs
where row.Height > 0
select row;
which is fine, and the method synta... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522935",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: getline() error. no instance of overloaded function matches argument list. Hi i am trying to use getline() function by giving two arguments to it. but it is giving error as no instance of overloaded function matches argument list.
Here is my code snippet:
string equation;
cout<<"Enter the string";
getline(c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522938",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-5"
} |
Q: Pseudo-elements and images Can an image have pseudo-elements?
In my testing I have not been able to use :before or :after with image elements, but I would love some more information.
EDIT: W3C isn't clear either unfortunately:
Note. This specification does not fully define the interaction of :before and :after with ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522942",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to add the French language package and use it in Tinymce package? We are using Moxiecode.tinyMCE.dll in one of our project. This project is a ASP.net website using C#. We added one text area. All the controls are working as expected in English. Please let me know the steps to add another text area in the same pa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522944",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: FB.getLoginStatus does not fires callback function I have a difficult problem. Difficult means I searched through the net and StackOverflow as well the whole FBJS SDK documentation and haven't find answer.
I am building a Page Tab application where I'd like to let fans to rsvp events. So I have to check if the user ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522947",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Macro that accept new object In my code, I have:
#define EV( event ) SendEvent( new event );
EV( evFormat );
But I want to pass a created object in the EV macro, like:
CEvent *ev = new CEvent();
EV( ev );
Is this possible? Because there is no way I will modify the EV macro.
A: #define EV( event ) SendEvent( new e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522949",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Flash 5.5 video player error: undefined property PLAYHEAD_UPDATE I'm getting this error:
Access of possibly undefined property PLAYHEAD_UPDATE through a
reference with static type Class
in an AIR app of mine, ever since upgrading to 5.5 (from 5).
There's an adobe forum thread that addresses this but no solution ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522951",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: jQuery form validation questions? I am new to jQuery and javascript and I am used mainly to php. I am upgrading my site so it contains a little ajax to improve usability and to keep me busy!
I am using this simple little script I threw together for the login page. All works well at the minute but I have a couple of ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522952",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: opencv face detection (real-time) on iPhone Camera Is there any suggestion where I can find some source codes or a place to start at ?
Thanks
A: You can try to follow this post
Also I recommend this blog to start with OpenCV on iPhone
| {
"language": "en",
"url": "https://stackoverflow.com/questions/7522953",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: How can we apply a non-vararg function over a va_list? Backstory
I'm porting the QuickCheck unit test framework to C (see the working code at GitHub). The syntax will be:
for_all(property, gen1, gen2, gen3 ...);
Where property is a function to test, for example bool is_odd(int). gen1, gen2, etc. are functions that ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522954",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Why are modules explicitly named in files? From the D language reference:
Modules have a one-to-one correspondence with source files. The module name is the file name with the path and extension stripped off.
Module names are still specified in files explicitly, though.
module foo;
What's the point of this? If m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522955",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Strange character in fresh WAMP installation? I'm getting strange characters in my fresh local WAMP installation. I've just downloaded all .php files from ftp online and restored a backup on my local mysql server. The problem only happens when text contains symbols or special characters:
PHP: <meta http-equiv="Cont... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522956",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Multiple Jquery-UI Accordions on One Page I want to have multiple Jquery-UI accordions on the same page I assumed it would be as easy as changing the ID in the documentation to a class but only the first one shows up.
//Default accordion
$( ".accordion" ).accordion({
fillSpace: true,
collapsible: true
});
//Sortab... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522962",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is there another style for writing LIKE queries? I write some queries like this:
SELECT *
FROM Sample.dbo.Temp
WHERE
Name LIKE '%ab%'
OR Name LIKE '%fg%'
OR NAME LIKE '%asd%'
OR ...
OR ...
OR Name LIKE '%kj%'
Is there anyway I can rewrite this query like this:
SELECT *
FROM Sample.dbo.Temp
WHERE
Name LIKE (
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522964",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to know when you finish receiving a TCP stream? I'm not sure how to tell in TCP when the sender finished sending me the information.
For example if A needs to send 200 bytes to B, how will B know that A finished sending, and that the information is ready to be transferred to the application layer?
There's the FI... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522965",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Getting HttpStatus from WCF Rest Client As i've mentioned in topic. I have WCF Rest Service, and ASP.NET MVC3 client. In ASP's controller i'm using
IMyService serviceClient = new WebChannelFactory<IMyService>().CreateChannel();
to create client (channel) for my service. Is there any way to attach to this channel a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522970",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP MVC 3.0 Complex View I am developing a application for Sales Order Management using ASP.NET MVC 3.0. I need to develop a page where Customer Details can be added.
Customer Details Include
public class Customer
{
public int ID { get; set; }
public string Code { get; set; }
public strin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522974",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: MAX not working as expected in Oracle I have an SQL query
SELECT spt.paymenttype,
MAX(nest.paytypetotal) total
FROM sportpaymenttype spt
INNER JOIN (SELECT spt.paymenttype,
SUM(sod.detailunitprice * sod.detailquantity) paytypetotal
FROM sportorderdetail sod
INNER JOIN sportor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522975",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-3"
} |
Q: Multiple user types - inheritence or composition? I have two "types" of Accounts in my site, with VERY different functionality, and a few different fields between them. These two types, however, share the same table of "basic account" fields.
Is it better, in this case to utilize an inheritance design, where User an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522992",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Mechanize and twitter How can I use mechanize and twitter? I used to send a twitter from su.pr but I would like to use mechanize to send it automatically for me! I know how to login but when I try to submit a post nothing happens I got this object:
http://pastie.org/2576760
do you know if it is because the javascrip... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522995",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Using jQuery to play/stop YouTube multiple iframe players I am trying to play/stop multiple YouTube iframe players on a single page. I can start the players automatically (i.e. through a custom method called loadYouTubeVideo(playerID)) upon clicking, but I am not sure how I can get access to the player objects agai... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522997",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: ASP.NET UpdatePanel Timeout and 500 errors with custom errors I have a .net application that uses customerrors web.config module to display meaningful messages for errors. It works without any issues for 500 errors/exceptions caused by non-ajax and ajax components (updatepanel). However, in a scenario where updatepa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522998",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: jqgrid error Status: 'error'. Error code: 500 on add Ok, I know there are already questions on here about this but none are giving me an answer.
I'm using jqgrid in MVC. In my View I have set up a jqgrid:
jQuery(document).ready(function () {
var invoiceId = @Model.Invoice.InvoiceId;
jQuery("#... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7522999",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do you read a specific line of a text file in Python? I'm having trouble reading an entire specific line of a text file using Python. I currently have this:
load_profile = open('users/file.txt', "r")
read_it = load_profile.readline(1)
print read_it
Of course this will just read one byte of the first line, which... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523001",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: PHP: base64 image string to image reference How do I take an base64 string image and covert it to a image reference. The base64 string is sent via ajax. I'm not sure if image reference is the correct terminology so I'll provide an example.
#original method
$newImg = imagecreatefromjpeg($oImg);
#new method
$newI... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523008",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: C++/CLI - URL Download to File I'm not entirely familiar with how CLI works, but I have a general idea. I have a function that takes 2 System::String variables, and uses those to download a file from a webpage. As far as the download goes, it works fine, and the file shows up in my directory with the necessary conte... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523013",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: PHP multilanguage for front end I need to support about 20 languages (some are right to left). The database is all fine and we have that done properly but probem is the front end for the languages that are right to left. My dev team gave me a combo of these options:
1) Create seperate php view files for right to lef... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523016",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: PHP How To Merge An Array Of Objects WIth An Array Of Arrays First, sorry for the lengthly explanation. I have two arrays in PHP. The first array is an array of objects. The second array is an array of arrays. Basically, I want to loop through, and merge the object with its matching array, and return a merged object... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523017",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: c string copy with strncpy I am really frustrated about strncpy function. I did something like this:
char *md5S; //which has been assign with values, its length is 44
char final[32];
strncpy(final,md5S,32);
but somehow the length of char final[] became more than 32 after.
What should I do here?
A: strncpy does not... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523022",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: NET1.1 Conditional Compilation I hope this is a very easy one to solve.
I have a crypto library that will be used for NET1.1 apps and higher. The X509Certificate class is in NET1.1 and X509Certificate2 is in NET2.0 and above.
I want to do something like:
#if NET1.1
public void LoadKeys(X509Certificate cert)
{
....
}... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523023",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: JRadioButton that looks like JButton I'm trying to create a feature similar to that of Geogebra's toolbar: it has buttons that select tools, so only one can be selected at a time, but they don't look like radio buttons (a dot, with an inner dot if it's selected); they look like JButtons with an ImageIcon.
I've gone... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523028",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Model architecture without ORM or Framework for API Let me first say that I realize this question is vague and does not have a single answer. Nonetheless, I would greatly appreciate the insight of the StackOverflow community. To the purpose of this site, an answer will be chosen based on adherence to the specificati... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523032",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Rails calling User record from Friends model I've built a simple Friend model, which allows Users to have multiple friends. Here's what that looks like:
class Friend < ActiveRecord::Base
belongs_to :user
class User < ActiveRecord::Base
has_many :friends
Each friend record just has an id, user_id and friend_id.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523037",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: mySQL query to search all tables within a database for a string? Is there a mySQL query to search all tables within a database?
If not can you search all tables within a database from the mySQL workbench GUI?
From phpmyadmin there's a search panel you can use to select all tables to search through. I find this supe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523039",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: i don't want to use std::copy...his this the right for-loop alternative? i'm trying to not use STL. i have this line in my code:
std::copy(buffer_, buffer_ + size_ + 1, new_buffer)
if i want to NOT use copy, is this the right equivalent?
for (int i = 0; i < (size_ + 1); i++){
new_buffer[i] = buffer[i];
}
or is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523041",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Android - How do I make buttons clickable when new layouts loads I'm trying to make buttons clickable when the new layouts loads...
As what happens... I'm on the layout 1 and i have a few buttons shown...
When I press a button it will straight away show me a new layout with buttons from another .xml.
But it won't le... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523043",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Access @attributes data in SimpleXMLElement in PHP Just wanted to start by saying I have read a LOT of the questions on this site about this exact problem, but I'm still struggling to apply it to my scenario. If someone could help me out, that'd be great! :)
I am trying to extract data from the following XML:
$myXML... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523044",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "26"
} |
Q: CSS how to style a parent item when a textarea is in focus? I have the following
<div class="comment-wrap">
<textarea></textarea>
</div>
Whenever the textarea is in focus, I want to style the comment-wrap div. I've tried:
#hallPost-inner + textarea:focus {
background: red;
}
This does not work. Any ideas on ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523047",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can't get ApacheDS to load the example data file In ApacheDS, I'm trying to load the sample LDAP data provided in ldif format and with instructions here.
I followed the same pattern I used to load the context record by specifying an ldif file in server.xml for the partition (directions, albiet lousy ones, located he... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523049",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Remove Oldest File in Repository I've got a git repo, and I have revisions of a file, dated with a unix timestamp. I want to get the oldest file (I.E. the one with the smallest timestamp) and remove it.
Is this possible with Bash alone and if so, how?
A: If you want to find the oldest file in a directory tree, you ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523059",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How should I setup assets in Rails 3.1 to be able to show images that're created on fly? I've Rails 3.1 application which generates some images in 'public/scene/ticket_123/*.png' on fly. It works normally in development mode, but in production all assets should be precompiled. So I can't use files that I've generate... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523064",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can it be determined if one integer is divisble by another? So for this problem the question asks
a number x is divisible by y if the remainder after the division is zero. Write a program that tests whether one number is divisible by another number. read both numbers from the keyboard.
This is what I have so... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523066",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: What is the big-O of the function (log n)^k What is the big-O complexity of the function (log n)k for any k?
A: It will still be (log(n))^2. A logarithm raised to a power is already in the lowest/simplest form.
A: (log n)^k is:
*
*O((log n)^k)
*O(n^k)
*O(n)
*O(n log n)
*O(n^1/2)
*O(n^0.00000002)
etc. Whi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523070",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: XML Android Permissions List Full I wish I could find this list before I made it. If for some strange reason you also need this, it is here for you. Only because I care. Now, like never before, give your apps full power.
<uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" />
<uses-permission... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523075",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "100"
} |
Q: Passing value of variable inside a string using C Suppose i have a string const char *temp = "i am new to C".
Now i have a float variable a=1.0000;
How can i send the value of "a" inside const char *temp along with the existing string.
Thanks in advance.
A: const char temp[] = "I am new to C";
float a = 1.0;
char b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523079",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: PHP/MySQL Pagination or jQuery? Just a quick question. If I use a Pagination for my website and am expecting a lot of results, is it better to use jQuery or just a basic PHP/MySQL one that just loads a new page?
If I use jQuery and I have over 300 results from the database, will it have to load it all at once on th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523080",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Can I inject into an ASP.NET MVC controller, some strings (eg. configuration values) using StructureMap? I'm using structureMap as my IoC/DI for an ASP.NET MVC web site. Works great.
Normally, I have my controllers that pass in Interfaces and structureMap + greedy constructors == works great.
eg.
public void FooCont... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523096",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: INSERT trigger to update a field that is NOT NULL in the same table I have a situation where I need to merge two product tables into one and need to keep both id fields. The Id field is the pk and an identity column. On insert I want to update the prodId to match the Id of the newly inserted row. This is what I h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523098",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I make tabs in a tabview transparent How do I make a tabview so that the tabs are a bit transparent so that you
can see the content of a Listview being hosted by the tabview?
So far I tried making the tabs/buttons transparent by setting the alpha, but I think
that the way the Tabhost is made there isn't any... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523101",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: dialog.getWindow() returns null after dialog is created @Override
protected Dialog onCreateDialog(int id) {
Dialog dialog = null;
switch(id) {
case DIALOG_ID:
LayoutInflater inflater = getLayoutInflater();
View InfoLayout = inflater.inflate(R.layout.info_dialog, null);
AlertDialog... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523112",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to upload files in JSF 1.1? I want to upload files in a JSF 1.1 project. JSF 1.1 doesn't support RichFaces file upload. I looked at Tomahawk, but I don't know how to use Tomahawk. Can anybody explain for me?
*
*Which JARs do I have to use?
*And taglibs?
*And web.xml configuration?
*And faces-config.xml co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523113",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Inconsistent Silverlight 4 ComboBox Dropdown Display I have a Silverlight 4 application with a ComboBox near the bottom of the form. There can be anywhere from about 30 to 100 items in the Dropdown.
When I first open the ComboBox, there is no SelectedItem, the Dropdown opens upwards and it makes about 23 entries ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523114",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Help with a slight issue in reading in a text file using the '<' redirection operator in command line? C I've searched high and low, but can not find the answer to what I would've thought to be a rather simple question. I'm rather new to C, and due to the restrictions placed on me during this project I'm having a bi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523115",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to use cryptography in Java? I need to protect a sequence of bytes with cryptography and I will need to recover the data later.
I want to use a key/password to encrypt and decrypt the data.
I am using Java. How do I encrypt and decrypt a string with a key or password in Java?
Thanks.
Edit: The method cannot be s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523123",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Maze Algorithm KINDA works. Some mazes, not ALL help I am using a maze algorithm that works some of the time, but not all of the time. It uses recursion but I cannot figure out why it doesnt all the time.
public boolean findPath(int x, int y) {
myArray[x][y] = "T"; // marks coordinate T for traveled
print... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523124",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Move cursor to the beginning of a designmode iframe Is it possible to move the caret to the very beginning (right before first element) of a designmode IFRAME?
A: Here's a function to do that. Pass in a reference to the <iframe> element.
Live demo: http://jsfiddle.net/aLP26/
Code:
function moveCursorToStart(iframeE... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523139",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Nhibernate; control over when Session Per Request is saved I'm trying to develop a web forms application using NHibernate and the Session Per Request model. All the examples I've seen have an HTTPModule that create a session and transaction at the beging of each request and then commits the transaction and closes th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523142",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Powershell 2 and .NET: Optimize for extremely large hash tables? I am dabbling in Powershell and completely new to .NET.
I am running a PS script that starts with an empty hash table. The hash table will grow to at least 15,000 to 20,000 entries. Keys of the hash table will be email addresses in string form, and val... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523143",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to enter a range of Work days in Excel? I wish to set a task in which I say
"My task starts on XX, May 2011 and ends after 14 work days"
How do I automatically put this date range in an Excel sheet?
So, can I put something like:
A1Cell: 2 May 2011
A2Cell: =$A1+1 (should be a WorkDay)
A3Cell: =$A2+1 (should be a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523146",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Controlling multiple amazon EC2 instances Which class/method to use to start/stop a List of amazon EC2 instances with java API? I only know the List<Instance>
A: startInstances takes a StartInstancesRequest, which has a method .setInstanceIds that allows you to attach a list of instance IDs.
http://docs.amazonwebse... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523149",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Optimize Multiple SoundCloud Objects I'm looking to embed multiple SoundCloud objects on my website -- it's the primary content, but it takes way too long to load. SoundCloud's own website doesn't take nearly as much time to load and they have more than 5 objects on a single page. What are some ways I can speed up t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523150",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Hoogle data on Windows I can install hoogle using cabal install hoogle on Windows, however, when I run hoogle data from MinGW shell, I encounter the following error:
$ hoogle data
Extracting tarball...
gzip: ..\hackage-cabal.tar.gz: No such file or directory
hoogle.exe: System command failed: gzip --decompress --for... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523151",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Is it dangerous to include your googlecode password in .git/config? Because the trick with my .netrc file doesn't work (even though it has correct filepermissions), I modified my local .git/config to like like so:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://<username>:<passwor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523152",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Are there other usages of a protocol other than a delegate? I was just wondering are there other usages of a protocol other than a delegate? I've only seen protocol's been used as delegates but I haven't noticed if it has any other purpose. So are there actual purposes of protocol's other than a delegate?
A: You ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523153",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I print arbitrary values in C?
Possible Duplicate:
How can we apply a non-vararg function over a va_list?
I'm writing a unit test framework in C (see SO for more information, or view the code at GitHub). I want to generate random test cases and throw them at a function, e.g. bool is_odd(int i), bool a_plu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523154",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: required file not seen on heroku in jekyll blog This is my dir structure
.
βββ _layouts
βΒ Β βββ default.html
βββ _posts
βββ _site
βΒ Β βββ config.ru
βΒ Β βββ devart.rb
βΒ Β βββ index.html
βββ config.ru
βββ devart.rb
βββ index.html
My config.ru
require 'devart.rb'
run Sinatra::Application
When I push this to heroku in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523157",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Automatically Create Insert Statements to Fill Junction Table in a Pre-Created DB For a simple android app I'm creating as a teaching tool for myself (for using relational dbs/SQL among other things - pardon the simplicity of the question if you will). I'm pre-creating a sqlite db to ship with the application. I'm d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523166",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to create AJAX notification using PHP to notify friend request I'm looking to create a AJAX growl or cool AJAX Web 2.0
notification, I know PHP, and I'm looking to notify users
when $username accepts friend request then a notification growl in AJAX
that notifies that the users has accepted their friend request.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523168",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: clustered index on "join" column or on "where" column I have two tables in SQL Server.
Table A has two columns: ID and Name. They are both unique.
Table B is joined to table A on the Name column.
Assuming most of the queries to these tables will be:
Select A.Name, B.xyz From A Inner Join B on A.Name = B.Name Wher... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523174",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Date Time Picker - Setting Opening Date and Time I'm using this nifty little date and time picker [ http://trentrichardson.com/examples/timepicker/ ]. How can I set the date and time for when the picker opens?
A: If you're using this on a form, set it from a hidden input.
$(document).ready(function () {
$(... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523175",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do i restrict the list in a referenced model in ATK4 I have a model called Task defined like this (fields not relevent to question removed)
<?php
class Model_Task extends Model_Table {
public $entity_code='vscrum_task';
public $table_alias='tk';
function init(){
parent::init();
// debug cau... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523178",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a way to check if jQuery has already been attached to an html page? I have some jQuery which will be put on multiple different HTML pages which I have no clue whether they will have the jQuery Library attached or not. I would like to make it so that it does not load the library if it does already exist on t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523179",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Specify the table type/storage engine in Doctrine 2 So how can one specify the storage engine to use for a given entity in Doctrine 2?
I'm creating a table that needs a full text index and only the MyISAM storage engine supports full text indexing in MySQL.
As a side: it looks like Doctrine 2 doesn't support full t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523182",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: ContextMenu ItemsSource binding problem There is a problem with ContextMenu with wpf usercontrol. I wrote a usercontrol, and this usercontrol have a windowsformhost, and i want to handle the right button contextmenu of the windows control with wpf context menu.
So i send a message to wpf user control to call context... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523183",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Changing a elements className makes it unfindable using $(className).each() I have some JQuery code that converts all HTML elements of a specific class to & from textarea elements.
My Problem: I use JQuery(.addClass()) to change an elements class from "updatable" to "updatable P". But when I go to search for all the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523188",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Concurrent Updates in Oracle: Locking or not? I'm confused. I'm reading about MVCC in Oracle. I thought MVCC meant no locks. But, I read somewhere else that all UPDATEs do automatic locking, regardless of the isolation level. Can someone explain what happens during an Oracle update? And what happens when multip... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523189",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: how to setup sysroot in setup.py for cython I am compiling a simple cython example under mac OSX 10.7.
The compiler keeps using -isysroot /Developer/SDKs/MacOSX10.6.sdk ....
I suppose 10.7.sdk will be used instead. Why setup.py can not figure out which sdk to use?
Any comments? Thanks
A: The cpython installation as... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523193",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to store camera captured image in SQLite Database in my application? In my application i want to capture the image from secondary camera and store that photos into my SQLite data base not in SD card.Please any one help me how to do that with some sample source code
A: How do you think a database system called S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523199",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: python shelve ... bsddb deprecated ... how to get shelve to use another database? I have an app developed in python 2.7.2 on OS X.
I use the module shelve and seems to default to bsddb on the mac.
The program won't run on a Windows 7 machine with ActiveState python 2.7 because the module bsddb is not present and is ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523205",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Redirection from a static method Symfony2? static public function check( $securityContext)
{
$user = $securityContext->getToken()->getUser();
if(is_object($user) && [...])
return **$this**->redirect(**$this**->generateUrl('route_recruteur_monespace'));
return $user->getRecruteur();
}
I tried wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523212",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Serializing Tree into nested list using python I have a binary tree class like this:
class BinaryTree:
def __init__(self, data, left=None, right=None):
self.data = data
self.left = left
self.right = right
Now I'm facing a task to serialize this structure in to a nested list. BTW, I have a left-to-right ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523215",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Updating image with new frame - internet explorer displaying partial image At this URL, you can see an image that is being loaded with jQuery: http://projects.kleelof.com/dtcapture/
As soon as the image is loaded, the script loads it again. Right now it is a static image. But when the full app is running, it display... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523216",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Detect encoding of a string in C/C++ Given a string in form of a pointer to a array of bytes (chars), how can I detect the encoding of the string in C/C++ (I used visual studio 2008)?? I did a search but most of samples are done in C#.
Thanks
A: It's not an easy problem to solve, and generally relies on heuristics... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523217",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Data structure to store 2D points clustered near the origin? I need to use a spatial 2d map for my application. The map usually contains small amount of values in (-200, -200) - (200, 200) rectangle, most of them around (0, 0).
I thought of using hash map but then I need a hash function. I thought of x * 200 + y but... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523220",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to choose objects for your android application? I am new to Android but not to programming. I have taken C++ in school and we have been taught how to create objects, but not how to build robust programs using multiple objects. So you can see that using java to build Android apps leaves me with questions.....
*... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523224",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the best way to get list of photos with me and a friend tagged in them? I'm doing this fql:
SELECT object_id, pid, src_big, src_big_height, src_big_width, src, src_height, src_width
FROM photo
WHERE pid IN (SELECT pid FROM photo_tag WHERE subject= [me_uid]) AND pid IN (SELECT pid FROM photo_tag WHERE subje... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523225",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Fortran increase dynamic array size in function I need a variable size array in Fortran. In C++ I would use vector. So I have a function like
integer function append(n, array, value)
integer, pointer, dimension(:) :: array
integer, pointer, dimension(:) :: tmp_arr
integer n
if (size(array) .eq. n) then
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7523228",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.