text stringlengths 8 267k | meta dict |
|---|---|
Q: Do you need shebang in all bash scripts? Suppose you have a bash script B, that you are sourcing from another bash script A. B has a bunch of variable and function definitions. A is the main driver script. Do you need the #!/bin/bash line on top of both A and B? What happens if you do and if you don't?
A: The sheba... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615430",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: getResource with parent directory reference I have a java app where I'm trying to load a text file that will be included in the jar.
When I do getClass().getResource("/a/b/c/"), it's able to create the URL for that path and I can print it out and everything looks fine.
However, if I try getClass().getResource(/a/b/.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615432",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Create your own wurfl exception I am using php wurfl 1.3.1 with cakephp - The following user agent is being picked up as a mobile browser which is incorrect.
It is on a windows 7 machine, the 64 bit version of IE has no problem but the 32 bit version redirects to mobile.
(32 bit)[PROBLEM]
Mozilla/4.0 (compatible; M... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615437",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Using boost::asio to find all reachable ips on a subnet I would like a way to use boost to find all reachable ips(responding to a ping) on a subnet.
i.e. given subnet = 10.10.10.0 and ips 10.10.10.1-5 that are reachable, the result should be a list: 10.10.10.1 , ... , 10.10.10.5
Currently I have a script that pings ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615443",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is it possible to apply styles to the value of a form field? I have a form input tag with some text assigned to its value attribute:
<input type="text" name="firstName" value="First Name*" />
Since this is a required field, how do I style the asterisk at the end of the "First Name*" string to be the color red? Is t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615445",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Runtime Error: failed to connect to camera service in android I wanted to make use of the zxing library to detect qrcodes in my app. But for the apps viewing purpose, i had to change the custom display orientation to portrait. Hence i had to integrate the whole zxing library into my app and addded camera.setDisplayO... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615446",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Getting a row from a data frame as a vector in R I know that to get a row from a data frame in R, we can do this:
data[row,]
where row is an integer. But that spits out an ugly looking data structure where every column is labeled with the names of the column names. How can I just get it a row as a list of value?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615450",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "38"
} |
Q: get user name asp.net windows auth SO i made a simple web form, set in windows auth in iis. then i deployed it on my server and i try to log in. it prompts me a login box, i enter my infos, looks likes its working fine with active directory.
if i enter something wrong it wont work etc.
obviously i need to know who i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615458",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: EXC BAD ACCESS POINT error HI I'm trying to create a list an app for favorites list that you save in a mutable array which then gets saved as a user defaults but I keep getting bad access point errors either when i click on a cell or if I go to another view and then go back to this view please help this is my code
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615459",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Creating a new workbook and copying worksheets over The problem in question centers around one workbook which contains all of my data and breakdowns spread across a ton of worksheets. I'm trying to get macros set up to copy select sheets to a new workbook. I think my biggest problem is getting the coding right for t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615466",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: .htaccess file problems So I have a Joomla instance which is sitting in my ROOT directory. I have a Wordpress Multi-site installation sitting in the subdirectory /blog.
It seems like the server is having a hard time finding or getting sites in the /blog directory. Seems like it gets to the main /blog page fine but ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615468",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: caputre OpenGL window in X11 with fast framerate - possible? I have an OpenGL application with the size of 800x600 running on my linux machine (X11). The content of this application (the rendered image) should be exported via network to another PC.
First of all, i want to know if it is possible to take snapshots of ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615474",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Data Structure - Inserting/Updating into ordered list I'm using the facebook api to retrieve a list of a user's photos. I'm using this to work out the user's close friends by seeing who has been tagged the most in the user's photos. So what I have the list of the tagged users (there will be duplicates). What I want ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615483",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to call action when select noSelectionLabel? I have this code above which works perfectly when i select some of the items on him... The a4j:support works fine and rerender my another field correctly...
The problem is if i choose one item, and then i back to "noSelectionLabel"...
When i do this for some reason my... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615490",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Windows Phone 7 ScrollView? Is there a scrollView in phone7?
I have this code
private void button8_Click(object sender, RoutedEventArgs e)
{
for (int i=0; i<23; i++) {
Button btn = new Button() {
Content="newbutton "+i,
HorizontalAlignment =HorizontalAlignment.Left,
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615493",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: iTextSharp HTML to PDF preserving spaces I am using the FreeTextBox.dll to get user input, and storing that information in HTML format in the database. A samle of the user's input is the below:
133 Peachtree St NE ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615496",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Kohana config database - enabling I can't make to Config_Database work.
I'm enabling new Config Source that way:
Kohana::$config->attach(new Config_Database, FALSE);
I'm loading that source after loading modules - in the bottom of bootstrap.php file.
I get this error when I'm trying to enable this Config Source
Fat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615498",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Youtube views not registering through Facebook Youtube does not count views when videos are autoplayed, i.e. when they have the parameter autoplay=1 at the end of the url like this:
http://www.youtube.com/watch?v=4r7wHMg5Yjg&autoplay=1
now when the videos are embedded inside facebook the code is:
<embed width="398... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615501",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Issue with color fillling in SSRS I have a calendar table with data based on some conditions. The color gets filled only in the boxes where there is data and the empty boxes are not colored. How do I get all the boxes colored irrespective of the data's presence?
=IIf(DateDiff("d",Fields!EndofDate.Value, Fields!E... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615503",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Passing an object[] to parameter object[] is not working in Java I know this question is similar to passing a object[] to a params object[] not working however I am having a similar problem in Java.
try {
Object[] objSingleTableColumns = null;
DatabaseActions db = new DatabaseActions();
db.dbConnect(sDatabas... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615506",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a way to detect whether or not mobile device has location services enabled with JavaScript? I am currently using Modernizr to detect whether or not geolocation is supported for a particular device. However, I want to display a more specific error message if geolocation is supported, but the user has disable... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615509",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: INSERT statement will not let me use IF NOT EXISTS I have an insert statement that I can't get to work the way I want it to. It's on a vb.net page. This is on a VB.net page and I'm using SQL Server 2005 for my database.
Dim strSQL As String = "IF NOT EXISTS
(SELECT Title From Picklist)
BEGIN INSERT INTO Picklist (T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615510",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Downloading a file into memory I am writing a python script and I just need the second line of a series of very small text files. I would like to extract this without saving the file to my harddrive as I currently do.
I have found a few threads that reference the TempFile and StringIO modules but I was unable to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615511",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: AJAX Function issues I use a function to post result via Ajax. When I test to see if the function was called I add an alert. Everything works fine, but as soon as I remove alert my results are not posted... What's causing it?
function SendInvitesF(invType, invWho, projID) {
$.ajax({
url: "aja... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615520",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Playing fullscreen .mp4 video in MPMoviePlayerController? So I'm trying to play a movie in my tab-navigation bar app. Although its portrait mode, I'd like to play the movie in full screen landscape after pressing a button. Is there some way to present the movie in a modal view controller? Or is it unnecessary?
Could... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615531",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Python screen scrape whole website I want to make a little program which will use every single something-meaning word from any website
It's meant to be in python and I've heard about BeautifulSoup but I don't quite know how to use it for this purpose... little tutorial? :p
Or is it just that easy as a regex? like:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615532",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-3"
} |
Q: Headless JavaScript testing in ree + cucumber Is there a way to do headless javascript testing in ree (Ruby Enterprise Edition)?
I've seen celerity/culerity/capybara, which work with jruby + HTMLUnit, but I can't seem to get it working with ree. When I simply try to annotate my cucumber test with @culerity under ree... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615534",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How you use fopen/fwrite on a js file? I am trying to do this
$fp = fopen('all.js', 'w');
fwrite($fp, 'sddddddddddddddddddddd');
echo "<script src=\"/inc/all.js\" type=\"text/javascript\"></script>";
but the file is always empty...can you use fwrite on a js file and write to it...i checked permissions and all is g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615535",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: MS Access Selecting Related Rows I have 2 tables with a many-to-any relationship. For the example we will call the tables "Guys" and Girls" There is a junction table that contains the related primary keys...who has dated who.
If I want to find all the girls that Guy 1 has dated, I do a select on the junction table s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615536",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Communicate with WCF Windows Service in VB6? I have a VB6 application that I want to communicate with a WCF Windows Service that I have written which imports Security Certificates. The only function in the service takes two string arguments. I have been having a lot of difficulty getting the two programs to commun... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615540",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Rule of three with smart pointer? I'm a little confused by using "rule of three" with smart pointers. If I have a class whose only data member is a smart pointer, do I need to explicitly define destructor, copy constructor, and assignment operator?
My understanding is that since smart pointer will handle the resourc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615541",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Best way to add voting to list items I have a list of items and I want to add ability to vote up or down. I am not sure how to architect this.
*
*Should I make the votes a table and put more info about the votes like the people who voted?
*Regardless of #1, once a person votes, I can make an ajax and jquery call... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615543",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Best way to persist only a subset of Redis keys to disk Is it possible to persist only certain keys to disk using Redis? Is the best solution for this as of right now to run separate Redis servers where one server can have throw away caches and the other one has more important data that we need to flush to disk peri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615544",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Inserting values into multiple MySQL tables at once I've created mini content management system. Now got afew questions
I'm filtering posts with following function
function filter($data, $db)
{
$data = trim(htmlentities(strip_tags($data)));
if (get_magic_quotes_gpc())
$data = stripslashes($data);
$d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615545",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can not import spring 3.0.6 jars through Maven in IntelliJ Problem
I am trying to get a barebones spring mvc project (similar to the template provided in STS) in IntelliJ but the spring 3.0.6 jars do not get imported. Not even after I have done: Right Click on Project Name->Maven->Force Reimport
What I have tried
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615546",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Add onclick to com.google.gwt.dom.client.ImageElement I add an onclic event in a com.google.gwt.dom.client.ImageElement using
imageElement.setAttribute("onclick","var tabla=document.getElementById('tablaWidget');var length=tabla.rows.length; for(var i=0;i
This works in firefox but not in IE.
I read here: onclick ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615548",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: TimThumb use with pictures from non public folder or virtual folder I am using the TimThumb script (http://code.google.com/p/timthumb/). My images links are generated like this: http://website.com/pics/nature/animals/bear.png and this works great but I can't seem to use TimThumb like this: http://website.com/resize.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615558",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Gravity Cocos2D? In my game, I am using Cocos2D for the Game part. I am now trying to implement gravity but I am hearing that I have to use Box2D or Chipmunk. I could use those but is there any way to do this in Cocos2D, can anyone share any ideas/code just so I can add some simple gravity using Cocos2D if possible?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615565",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I close a TabControlEx tab with the middle mouse button? I'm working with the WPF TabControlEx (close tabs).
I'm looking a way to close the tab clicking the tab header with the mouse wheel click.
Any suggestions?
Thanks a lot for all your help
A: Add this to your XAML on the tab header:
<Grid.InputBindings... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615570",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Link SVN commits to issues I know I can use #number to to link the commit to an issue. But I'm looking for a way to change the issue status through the svn commit.
I'm looking for something similar to what Trac have http://trac.edgewall.org/wiki/TimeTracking . If your svn comment is "This task is almos done (refs 12... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615571",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Android memory leak? Hi I have an application that once it recieves a sms, it has to start collecting the location of the user every 1 minute. Everything starts ok i.e. if I send a text, then the sms processing wakes up and calls the location service to start collecting the location every 1 minute. But after some 30... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615576",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Outlook 2007 image alignment issue I have a table defined as
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="600">
<table width="600" border="0" cellspacing="0" cellpadding="25">
<tr>
<td width="210">Content 1 with grey background</td>
<td width="390">COntent 2 with white backg... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615578",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I merge two tables in Access while removing duplicates? I have read through about every possible solution online, and I get a different result every time.
I have two tables: Clients and Patrons. They both have the same structure: LastName, FirstName, Address, City, State, and Zip. Clients has 108,000 entries ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615587",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How can I use jQuery live() after slice()? Why won't live() work after slice()?
What am I doing wrong here?
$('.object').slice(1).live('mouseenter', function() {
alert();
});
...
<div class="object">
1
<div class="object">
2
<div class="object">
3
</div>
</div>
</... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615589",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Unable to access model in Backbone.js I'm currently learning Backbone.js and have run into a strange issue. I'm not sure if this is the proper way to implement this. I am trying to wrap a jQuery UI Slider in a backbone view and model. However, inside of the slider's slide method I can't access the model's values. An... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615590",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: subscripted value is neither array nor pointer I am writing a C program in which I am using an array of pipe for IPC.I am getting error "subscripted value is neither array nor pointer".Can any one tell me where did I do mistake?
here is the code where I get error:
int p[100][2];
//in for loop
pipe(p[i-1]);
/... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615591",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can you access the edit_XYZ_path for a model when you don't know what type of model it is? Suppose you have an application that has the following models: Book, Author, Publisher. In your routes.rb you have the standard:
resources :books
resources :authors
resources :publishers
At some point in your code you h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615593",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Order MySQL query by multiple ids I have problems sorting results from MySQL. Here is the code:
$my_query = "
SELECT *
FROM tbl1, tbl2, tbl3
WHERE tbl1.id = tbl2.id2
AND tbl1.sub_id = tbl3.sub_id
AND tbl1.id IN(22, 55, 5, 10, 40, 2001, 187)
";
This query works fine, but when I print it, it's ordered by tbl1... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615596",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I test XForms using submissions if I don't have the services available? I want to test XForms that performs submissions, but in my environment I don't have access to the services the submissions will ultimately call, either because they haven't be developed yet, or are behind a firewall. With some XForms imp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615599",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to dynamically and incrementally add controls to a container I thought this was straight forward, but i have a link button, and I do this in the click event:
myContainer.Controls.Add( new FileUpload());
I expect 1 new file control upload to be spawned in the container for each click, however, I always get 1. Wh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615605",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Load class without knowing package? Is it possible to load a class by name if you don't know the whole package path? Something like:
getClassLoader().loadClass("Foo");
The class named "Foo" might be around, might not be - I don't know the package. I'd like to get a listing of matching classes and their packages (bu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615611",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Setting the szTip field of the NOTIFYICONDATA structure The szTip field is 128 characters long, and unicode. It is of type TCHAR, which is typedef'd as WCHAR. So i have no clue why the following code snippet will not compile.
nid.szTip = _T("ToolTip");
The compile error is
error C2440: '=' : cannot convert from 'co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615615",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Getting variable in a loop from outside while 'function' I have a while loop that assigns user ID's to a variable. The variable is an array. When I assign the variable to another in a link like this: it returns proper ID's on the click but only when the link is in a while loop as well. How ( is it possible ) to pla... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615618",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Get the observability of class methods in PHP The function get_classs_methods returns all methods of a class.
But, is there a function or technique to get the observability of these methods?
I want to list only the public methods.
A: The return value from get_class_methods depends on the scope you're calling it fro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615619",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: connection to mysql server from clojure I'm trying to connect to a mysql database from clojure. I'm using the example code taken from:
http://corfield.org/blog/post.cfm/connecting-clojure-and-mysql but I'm getting this error:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615621",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Need the decimal to save and show three places I have this line of code in c# but i it always resets the textbox back to the format 0.00, how can i make it so that it keeps the format 0.000 ?.
NewYorkTax = Convert.ToDecimal(txtNewYorkTax.Text);
//converts it but with 0.00, I need 0.000 or 7.861 etc..
SIDE NOTE:
Ne... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615628",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Excel vba - convert string to number So, I used the left function to take the first 4 characters of a string and I need to run a vlookup with it, but it won't find the match because it's looking through numbers.
I want to do this in a macro, so I'm not sure about the syntax. Can someone help?
A: If, for example, x... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615629",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: How can I override a module's singleton method? Given a module with a singleton method like this:
module Foo
class << self
def bar
puts "method bar from Foo"
end
end
end
How can I override Foo.bar using another module?
A: This code
module Foo
class << self
def bar
puts "method bar fro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615632",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: BlackBerry WebWorks 2.1.1, OS 6.0 / 7.0, blackberry.pim.Appointment.find is not working I have a simple sample app that returns number of appointments in calendar app, which works fine in OS 5.0, but failing find any appointments in OS 6.0 or 7.0, (I can create an Appointment though, just can't find it)
var date = ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615635",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: class design - validating user input I use the clas below to validate user input. Originally it was just a collection of static functions grouped together.
However, I modifed it to an object style and added in a private memeber to hold the user input array. What is the next step to making this class adaptable, i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615636",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: what is a good structure to save this data C# WinForms:
The things I want to save:
name: string
previous value: double
new value: double
so each entity has those three fields, the number of them will not be too much at all, maybe 10 max. All I want to do with them is just to be able to add some members to it and th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615640",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Access variable in added movie clip I'm in class file right now and made a new movie clip using the linkage name
var mc = new ExampleLinkageName();
addChild(mc);
all good, I can see mc on the stage. In the ExampleLinkageName movieclip, I have a variable defined in it (on the physical timeline) called test.
In my cl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615643",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: GCD - executing methods on order after finishing others I have a class that I call several times with different data.
That class, calls a web-service, parse it's response to NSDictionary, and save the data on Core Data.
The call of the web service and the saving in core data are done in different threads, using cor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615644",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: SSL handshake alert: unrecognized_name error since upgrade to Java 1.7.0 I upgraded from Java 1.6 to Java 1.7 today.
Since then an error occur when I try to establish a connection to my webserver over SSL:
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
at sun.security.ssl.ClientHandshake... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615645",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "233"
} |
Q: Android layout_weight when creating components programatically I've read plenty of questions saying that the problem was the layout_width = 0dip but I've tried that and can't make this work.
I have this holder:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615648",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Grab firsts distinct entities ordered by datetime using Core Data What I have
Message Entity
user | text | date
----------------------------------------------
user1 | This is first message user 1 | 10:50 **
user2 | This is first message user 2 | 10:50 **
user3 | This is first me... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615650",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Loading a Big Plist File I have a big plist file, I have a problem, when I do:
[NSMutableDictionary dictionaryWithContentsOfFile:docDirPath];
I must waiting for some seconds before I can use the application. Is there some solution?
Thanks
A: Load the plist in another thread, GCD is perfect for this.
dispatch_queu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615654",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: sql fulltext returning null I'm using the joomla CMS to write to my db and have written a custom front end.
I'm trying to obtain the contents of the 'fulltext' row. I've tried mysql_fetch_assoc['fulltext'] and mysql_result($sql, 0, 'fulltext'). Both return fulltext. Here's the query string:
SELECT created, modified,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615659",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: mathematica remote kernel on macs I am trying to run a remote mathematica kernel between two macs.
Under Kernel Configuration Options
For kernel program I have:
/Applications/Mathematica.app/Contents/MacOS/MathKernel
The arguments of MLOpen:
-LinkMode Listen
-LinkProtocol TCPIP
-LinkOptions MLDontInteract
The launc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615660",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: ASP.NET MVC3 Combination of Views + Partial Views Conflicting I have the following structure:
Views:
Home
Articles
Partial Views:
Book
Classes
Intro
Faq
On the top of the page, in my header, is a navigation menu - containing multiple Ajax.ActionLinks that call into different methods in my HomeController class to fet... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615662",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Objective-C, counting zombies via instruments, clarification needed As i was working on my program, i noticed that, upon profiling, instruments was nice enough to point me to a Zombie object when it saw one. Does the fact that this message does not show up indicative of the fact that app contains no zombie processes... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615666",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Loading new content into and keeping input fields value from previous state? I'm trying to make my own tumblr search (tags only) since their own search function doesn't actually work.
So I'm nearly there. It works, but I need the search field to keep the value of what the user searched for.
So if I search for "fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615671",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: A dynamic resize of this HTML from AJAX is making text unreadable. How do I "refresh" it? I am filling a pull-down list with data from an ajax call. When the page first loads, the area looks like this:
After the pull-down list is filled via an Async call it looks like this mess:
If I click anywhere in the area it... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615674",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: NSDocument - memory leak & app crash I have a memory leak in my document based app. It launches fine, I can open or make a new document, but only one or two times, and then the app crashes.
I used analyzed tool in Xcode and there are no issues.
However, Instruments reveals the memory leak, but I can't find where i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615675",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Trace context switches on Linux
Possible Duplicate:
Monitoring pthread context switching
I have a program where under certain scheduling layout some strange things happen (a number of threads which do sched_yield seem to throttle each other in a strange manner).
I would like to take an exact trace of what is goin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615676",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in I have a large script that has a set_time_limit(0) directive to insure it processes fully.
However, I'm getting a few reports of this error on a small percentage of installations:
Warning: set_time_limit() [function.set-time-l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615679",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Grey Font Color Printing Is there any way to ensure that my grey font colors do not turn black?
Firefox and Chrome seem to do this in order to prevent white text on black background from turning into white on white. I do not have a background color (except white), so this browser-level conversion is not useful, it o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615681",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: How to match "escape" non-printable character in a regex? I've found a howto, http://answers.oreilly.com/topic/214-how-to-match-nonprintable-characters-with-a-regular-expression/ , but non of the codes, \e, \x1b, \x1B, work for me in Java.
EDIT
I am trying to replace the ANSI escape sequences (specifically, color s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615683",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Automatically call method after part has been composed in MEF Is there a way to specify that a method gets called automatically after a part has been composed? The method could be called on the composed part or in the class doing the composition.
A: Yes. If your class implements the IPartImportsSatisfiedNotificati... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615687",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Custom Maven Archetype or alternatives to project generation We would like to generate projects from a Maven Archetype but we are finding it a bit simplistic. We would like to do the following:
*
*Have a simple starting point. Not ask too many questions.
*Allow updating the project later (or during the original ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615690",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Callback after __doPostBack()? I am refreshing an UpdatePanel with Javscript by calling a method like so:
reloadDropDown = function (newValue)
{
__doPostBack("DropDown1", "");
selectNewValueInDropDown(newValue);
}
Inside my UpdatePanel is a <select> box that I need to select an <option> with a newValue. My pro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615691",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Implementing reCaptcha into a Rails 2.3.12 app I need to implement reCaptcha into a Rails app form for my internship. Unfortunately I am still taking my Web Programming classes and haven't gotten into any server side lessons yet, so I am still a complete noob when it comes to submitting forms and sending requests t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615700",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Create a Region or GraphicsPath from the non-transparent areas of a bitmap I want to hit-test a drawn bitmap to see if a given Point is visible in the non-transparent pixels of the image.
For example, to do this test for the whole bitmap rectangle, you would do something like this:
Bitmap bitmap = new Bitmap("filena... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615708",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: C# Testing Modified Session Variables Right now I'm trying to test Session variables. For example I set:
Session["test"] = "test";
Then:
if (blah) { Session["test"] = "foo"; }
else if (testing) { Session["test"] = "foo2"; }
I'd like to be able to run tests so that depending on the conditions I set forth I can see ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615709",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: In PHP, can you access a parent object from an object from which it is composed? I have a base class of FileCopier that is composed with two "has-a" associations to Resource Source and Resource Destination.
After construction, three properties exist in FileCopier:
- Source (instance of Resource)
- Destination (inst... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615710",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how: Partial Rage Rendering with jsp2/facelets/templating with menu driving main content refresh only? I found some posts by BalusC (big fan of urs) and others here on stack overflow and haven't found the solution, which would seem like something many would want to be able to do.
If I have a facelets/templating stru... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615711",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Entity Framework also Linq advice needed i have got on my DB 3 tables
movies, workers, workermovies ( this is the Relationship table )
public class Movie
{
public Movie()
{
Genres = new List<Genre>();
Formats = new List<Format>();
ProductionCompanies = new List<ProductionCompany>();
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615715",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: jQuery val() indexOf not working Trying to do something if the input value contains a certain word but this doesn't work:
var formMain = $('#MainForm :input[name="Search"]');
if ((formMain).value.indexOf('word') >= 0) {
alert('HAS THIS WORD IN IT!');
Example Form:
<form onsubmit="return OnSubmitSearchFo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615719",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I exit out from an infinitely runnng loop in JavaScript? Is it possible to stop an infinite loop from running at all?
Right now I am doing something like this:
var run = true;
loop ({
if(run) {
whatever
}
}, 30),
Then when I want to stop it I change run to false, and to true when I want to start it a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615727",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Get a consistent date format from NSDate? I'm using NSDates as keys for an NSDictionary, but for key value coding, I need a string. Importantly, I need it to not change representation across OSes or locales. When I show it to users, I'll use NSDateFormatter, of course, but internally it must always be the same. What... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615728",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: when modification of the assigned variable will affect the value of original variable? >>> x = 10
>>> y = x
>>> y = 100
>>> y # Changes on y will not be transferred to x
100
>>> x
10
>>> x2 = 'hello'
>>> y2 = x2
>>> y2 = 'world' # Changes on y2 will not be transferred to x2
>>> y2
'world'
>>> x2
'hello'
>>> a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615730",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Too many arguments used by python scipy.optimize.curve_fit I'm attempting to do some curve fitting within a class instance method, and the curve_fit function is giving my class instance method too many arguments.
The code is
class HeatData(hx.HX):
"""Class for handling data from heat exchanger experiments."""
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615733",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: TypeLoadException in COM Library I have a class library that has a class, MessageGroupInfo, that contains some string and bool properties. No methods. I use this class to pass info to a constructor of another class, MessageGrouper.
These are used by a COM visible class library that is an Add-in to another app. Both... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615739",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Java AES without padding What are some of the simplest ways to AES encrypt and decrypt a 16 byte array without the automatic padding? I have found solutions that use external libraries, but I want to avoid that if possible.
My current code is
SecretKeySpec skeySpec = new SecretKeySpec(getCryptoKeyByteArray(length=16... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615743",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: How to access a custom config from my class library application? I have a custom config in my Infrastructure Project, but when my app start only my web.config is recognized.
I don't want to place the configuration of this custom config file in my web.config because this configuration is responsability for Infrastruc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615746",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Showing the searchbar only when user pull down the table I have a table view with a search bar on top of it. My requirement is to do not show the search bar when someone open the page but when someone slides the table down then the search bar should be visible.
A: Related to murat's answer, here's a more portable a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615747",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Rails 2.3.x & Koala & Facebook: certificate verify failed I'm trying to get Facebook Graph API to work in Rails 2.3.5 using Koala. All works fine in my dev environment (Mac) but fails in production (Ubuntu 8.04.1).
Test code:
cookies = {"__utma"=>"158657023.1470934917.1315425280.1317394623.1317406089.55", "28aac256b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615750",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: DataMapper filter records by association count With the following model, I'm looking for an efficient and straightforward way to return all of the Tasks that have 0 parent tasks (the top-level tasks, essentially). I'll eventually want to return things like 0 child tasks as well, so a general solution would be great... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615752",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Why does my JOIN still trigger n+1 selects in active record? PortfolioEngine::Portfolio Load (0.3ms) SELECT "portfolio_engine_portfolios".* FROM "portfolio_engine_portfolios" INNER JOIN "portfolio_engine_items" ON "portfolio_engine_items"."portfolio_id" = "portfolio_engine_portfolios"."id" ORDER BY portfolio_engine... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615754",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a version of Youtube Chromeless player that works on iPad/iPhone I'm building a site which requires being able to have advanced control over a video embed. I'd like to use the Chromeless player.
The example from Google is flash based. Is there an alternative version that can be used without flash?
A: The ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615755",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.