text
stringlengths
8
267k
meta
dict
Q: PHP regex output converting I want to turn a output like 12h 34m 45s to 12:34:45 also it should be possible if one o these is returned empty is will ignore it. So 34m 45s should be 00:34:45 and off course single digits should bee possible like 1h 4m 1s and a combo off single and double digits like 12h 4m 12s and so...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get automatic SCHEMA UPDATE on an existing DB with JPA/Hibernate? I am trying to update my existing DB schema automatically with JPA-based app (I am using Hibernate as a Persistence provider). What I did is that I have positioned my hbm2dll param to "update" like this in the persistence.xml : <properties> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unable to move object upwards at exact point - Unity I am new in unity. Here is my scenario which I want to implement. I have a enemy and a tower. Enemy collides with tower and move to the top of tower to escape from it. I am unable to move enemy at exact position of towers top. here is my code: void OnTriggerEnter(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: URL Referer not working on pop up windows I have two pages namely www.abc.com/pg1.aspx and www.abc.com/pg2.aspx pg1.aspx response.redirect("www.abc.com/pg2.aspx"); pg2.aspx string url_refer = Request.UrlReferrer.ToString(); UrlReferrer is working fine. pg1.aspx <a href='#' onclick=\"window.open('www.abc.com/pg2.as...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to make this app screen scroll? I've a screen in an app I'm coding structured like this: View ScrollView View label 1 label 2 label 3 View UIImageView WebView When loaded it adds some html string into the Web View and as the whole conte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: subscriberCellularProviderDidUpdateNotifier doesn't work I wrote a Hello World app, and put the following code in ...ViewController.m: - (void)viewDidLoad { [super viewDidLoad]; CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init]; networkInfo.subscriberCellularProviderDidUpdateNot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to change an image from Cartesian to Polar coordinates in Matlab? I am trying to convert the pixels of an image from x-y coordinate to polar coordinate and I have problem with it, as I want to code the function by myself. Here is the code I did so far: function [ newImage ] = PolarCartRot % read and show the im...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: check if URL contains some text (javascript) how can i use javascript/jQuery to check if a URL contains a specific link/text. for example : A user browse to my site and his URL is : "http//www.mywebsite.com/userprofile/abc&from=home" I have set a variable and its value is "http//www.mywebsite.com/userprofile/abc" , ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Setting a href of a button in Ruby/Javascript This question is hard to explain so please bear with me. I have a table that contains rows which hold records from the Records table. i can add rows to this table using ajax and when i have entered the hours into a text field on the row and click away, the record gets su...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Development and production versions of wiki-article (MediaWiki CMS) Is it possible to realize few versions of wiki-article (using MediaWiki CMS) — development version and production version and simple way to switch versions? A: The FlaggedRevs extension does something similar.
{ "language": "en", "url": "https://stackoverflow.com/questions/7580630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to copy (or swap) objects of a type that contains members that are references or const? The problem I am trying to address arises with making containers such as an std::vector of objects that contain reference and const data members: struct Foo; struct Bar { Bar (Foo & foo, int num) : foo_reference(foo), numb...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: can i use throw function on android Possible Duplicate: Enable Exception C++ when i use throw function ,like as follow: throw "SobelGradient => cannot allocate memory"; this error come out: exception handling disabled, use -fexceptions to enable And how to solve this error. A: You should in your question mentio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: HTML layout design - need better approach I have to design a layout for my project. There are arrangements of divs, upper Div, lower Div, fixed height, scrolling etc. It is difficult to describe the problem in words, hence I have attached an image below. Please refer the screenshots. What I want to achieve is to ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Does using Webview to open mobile page count as in-app purchase? I read the agreements on Android Developer site already but I dont clearly understand it. From what I understand. If I want to allow user to purchase/subscribe my service through my Android application, I must offer Google Checkout as an option. I'm no...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to connect to a database from outside of a web app? I am developing a java web app with Wicket (with jpa). Inside the Wicket Application i can access the database Persistence Unit with Persistence.createEntityManagerFactory() configured in persistence.xml. Now i want to have a helper script to perform maintenanc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: use jmeter to load test a site: the url is different every time while running the script I try to test a site with Jmeter and I used its HTTP Proxy sever to make the script. Actually, the process of this script is 1. login 2. click a link to another page and fill in some info and click SUBMIT 3. logout. The problem...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: EF with Azure - Mixing SQL Server and Windows Azure Storage I want to use two different data sources in my Azure project: * *a SQL Server that contains basic partial info regarding an item (allows indexable data and spatial search) *a Windows Azure Storage that contains full remaining info regarding an item (ret...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Creating a thread Pool for boost threads There seems to be two approaches to create thread pool for boost threads as boost thread does not provide thread pool directly. The first one is asio::io_service io_service; asio::io_service::work work(io_service); boost::thread_group threads; for (std::siz...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problems getting the Heroku example app for Python run locally with SSL I started out with having the same problem as in this question. As one of the answers suggests one can avoid that particular problem by making the app run without SSL. But as Facebook is set to enforce https for apps in just a few days (October ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: HTML Tags in GWT internationalization I'm using the internationalization of GWT to manage the different languages of my application. I have a text where some words are in bold. Therefore I did the same thing as described here. @DefaultMessage("Welcome back, {startBold,<b>}{0}{endBold,</b>}") String testMessage(Strin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Regex for number surrounded by slashes Like the title says, I have a (faulty) Regex in JavaScript, that should check for a "2" character (in this case) surrounded by slashes. So if the URL was http://localhost/page/2/ the Regex would pass. In my case I have something like http://localhost/?page=2 and the Regex still...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Binary search tree doesn't work I'm having a pretty confusing problem in building a binary tree. Apparently this should be an easy task but somehow I may mess up with the pointers in it. Here's the simplified code (of course it's not the real code) : #include <string.h> #include <iostream> using namespace std; #...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there any build tool available for linux that takes a web project & compresses text files, remove comments? I am looking for a build tool that can take a dev version of a typical PHP project and can compress files such as HTML files, view files(PHP embedded in html or vice versa), JS & cSS files before they are d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: character array handling in c (copy pointer to character array) I have a pointer with type const char* FunctionName , How can I put that into a payload of type char payload[100] without any warning or errors? Also the payload[0] is filled with character value already, so the space starting from payload[1] update: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problems with creating a file in android i would like to do a simple operation. Create a file in android, but i don't know why. android didn't create this file. Android stop between debug 2 and debug 3.The folder is not created. I don't understand why. try { File inventoryDir = new File(Environment.getExternalStorag...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: git diff two repositories, get results from .git dir? I have two versions of a git repo on my computer, I wanted to know which is the differences between them, so I can know whether I should pull or not from the other repo. I did a "git diff amslib ../workspace/amslib" and instead of showing me the differences betwe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting id's on elements in partial views I have a view that - among other things - contains a list of elements. I want to reuse this list, so I move it out to a partial view. My view contains a form, and on post I want to include some values in the list. Therefore I use @Html.EditorFor(m => m.Something) to generate...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MySQL: Why does an Order By ID runs much slower than Order By other Columns? I am using MySQL version 5.5.14 to run the following query, QUERY 1, from a table of 5 Million rows: SELECT P.ID, P.Type, P.Name, P.cty , X(P.latlng) as 'lat', Y(P.latlng) as 'lng' , P.cur, P.ak, P.tn, P.St, P.Tm, P.flA, P.ldA, P....
{ "language": "en", "url": "https://stackoverflow.com/questions/7580685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: powershell script to remove multiple folders I would like a script to remove multiple folders from beneath each users douments and settings. Example folders: Desktop Favorites mmerge my documents nethood printhood recent sentto start menu windows application data local settings I would like it to delete everything e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iAd : latency and ad inventory issues I added iAd in my most successful application a few weeks / months ago and I noticed some weird issues. Latency I noticed a speed issue : adding a banner to a view, I sometimes gets a response after 10 seconds, sometimes it's pretty normal (like 1 second); I guess it ain't good ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Microsoft Hex dates I have the following from a Microsoft SQL Server database for date/time value: 0x00009CEF00A25634 I found this post: Help me translate long value, expressed in hex, back in to a date/time Which seemed to be on the right track but by using the code I didn't get the right dates, are my hex dates i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to use I'm trying to use: <script type="text/javascript"> function myfunc() { var param = 4; alert("OK"); } </script> I call the function like this: <a4j:jsFunction name="myfunc"> <a4j:actionparam name="param" assignTo="#{MyBean.myfield}"/> </a4j:jsFunction> But it does not w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: UITableView - Load large UIImages from NSBundle without blocking main thread In UITableViewController, the UI freezes when this method is called: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath where an image is being loaded into the UITableViewCell. cell.imag...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it considered bad practice to use InternalsVisibleTo for Unit Test Code? Sample code in framework's AssemblyInfo.cs: [assembly: System.Runtime.CompilerServices.InternalsVisibleTo ("Test.Company.Department.Core")] Is this a bad practice? A: No, it is not considered bad practice. There i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: NSString to char[] in Objective-c I have to convert a NSString to a null ended char[]. The way Im doing it is like this: NSString *regC = @"1234" char REG[[regC length] +1]; BOOL result = [regC getCString:REG maxLength:32 encoding:NSUTF8StringEncoding]; and I dont know if is it the correct way. REG has to be a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Traverse XML document using asp I'm trying to find if a certain element is present in a XML file and if it is, remove it. However I keep getting this error: Description: Type mismatch: 'NodeList' My code looks like this: <%@ Language=VbScript%> <% Dim address Set xmlDoc = CreateObject("Microsoft.XMLDOM") xmlDoc....
{ "language": "en", "url": "https://stackoverflow.com/questions/7580721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Given a fixed cel width, can I change the fontsize so that the text will fit inside the cell? I have code that will automatically adjust the height of a cell, so that text will fit inside that cell. However now I want to change the fontsize of the text inside the cell, so that the font will shrink and grow to make t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: caching kills links (jquery mobile on iPad) I am working on a webapplication that uses caching to make it available offline. Everything works fine when running it chrome (offline and online). But when I run it on iPad the links don't work anymore and I get failed to load page everywhere. Removing the caching makes t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Blackberry appworld support device I've uploaded an app in blackberry app world. Its support from 4.5 Now i have changed some changes in my app. I've added browser field. Its support from 5.0. My question is, Is there anyway to upload that, old app for 4.5 to 5 new app for 5 to 7 A: You might want to confirm th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can i check whether the current time in between tonight 9pm and 9am(tomorrow) in Ruby on Rails I need to check whether my current times is between the specified time interval (tonight 9pm and 9am tomorrow). How can this be done in Ruby on Rails. Thanks in advance A: Create a Range object having the two Time ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: creating a jQuery plugin, help selecting a parent I am creating a plugin for jQuery to create pretty select boxes (I know there are some out there, but this is learning experience for me). If all goes well I realease the plugin to the public, so I am trying to build it as flexible as possible, and for this reason I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Server - Find duplicates in table We got big table with nearly 100+ millions rows. Can someone help how to find duplicate data within the table and may be move it to ARCHIVE Table Name: CustomerData NumberofFields: 10 Latest one should stay (which is identified by END_DATE mentioned as NULL in that record) Regar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Printing in Java I just want to ask, We are creating a web-based system using JSF and Java. is there any way that I can Access the client's printer setting? or is it possible to configure programatically the printer settings of Acrobat Reader? because we created a Pdf file using IText and then print it by the client...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: js function calling another js function and returning a value problem i have this JS function: function ax_get_new_msg_cnt() { var mTimer; var last_msg_id; mTimer = setTimeout('ax_get_new_msg_cnt();',30000); $.getJSON('/apps_dev.php/profile/newMessageCheck', function(data) { $('#newMessageDiv...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can we replace the purpose of init method to the servlet constructor? Can we replace the pupose of init method to the servlet constructor? My question is why does servlet need a separate method int(ServletConfig config) for the pupose of initialization we could have achieve the same thing by having a parameterised c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android simple way to record sound and stream that to a server? Is there a simple way to record sound and stream it to a server in real time? Thanks, Leslie A: No, there is no direct API that would do that.. What people usually do is read the media file as it is being saved, and upload it progressively to server. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In Apple Numbers, how can I calculate a difference between two dates? I have a spreadsheet with data in Apple Numbers. I have a column of dates, and I would like to create a second column which displays the difference in number of days between the two dates. Example: Date..................Difference May 1, 2011.......
{ "language": "en", "url": "https://stackoverflow.com/questions/7580776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASIHTTPRequestErrorDomain Code=8. Cannot move file from temp directory to docs I download files with ASIHTTPReqeust. Everything downloads fine but it can't move file from temp directory to documents. When i implement -(void) request:(ASIHTTPRequest *)request didReceiveData:(NSData *)data request fails with an error...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Strange (for me) behavior of pointers I'm reading about pointers, but i'm confused about their nature. Here is what I mean. int x = 4; //Here I declare p as integer pointer int *p; // Here I assign memory address of x to pointer p p = &x; // The line below prints result 4 which is expected. If I miss asterisk bef...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Change the post login target on FOSuserBundle Symfony2 When I log in /login, I'm sent to the root url /, however I'd like to send users straight to another page /dashboard - is this a configurable option? I'm using FOSUserBundle and Symfony2. A: It seems that login is handled by SecurityBundle, not by FOSUserBundle...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: OpenCV. Drawing rectangle when matching i use OpenCv to find an area witch match a template on a reference image. When the code find the area witch match a template draw a rectangle around the area but what i want is when the code doesnt find the area the code doesnt draw any rectangle code: IplImage *res; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I create a mock using reflection with parameters using Moq? I am trying to build a Generic testbuilder for generating objects, that i want to use in tests. One of the things I want to create is Mock implementations of interfaces. I want these Mocks to have Strict mockbehaviour, and the only way to set that af...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JAX-WS and version conflicts As test project I've create a very simple WebService using wsdl and jax-ws. The client runs very well if it is deployed as web application in GlassFish but if I start the same (WebService-)Code in Eclipse directly, I get the following error: WARNUNG: Input Action on WSDL operation AddNum...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: gzip with webserver without content-coding I have a webserver without content-coding (boa and not enough ressources). is there a possibility to put ziped javascript-file on the webserver and unzip it at the browser after downloading like content-coding? A: In theory yes. You would need to add the Content-Encoding: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hibernate & postgreSQL with Grails There is an easy way to set hibernate to use different primary key ids for each table with postgres? I tried to use postgres dialect in DataSource: dialect = org.hibernate.dialect.PostgreSQLDialect or dialect = net.sf.hibernate.dialect.PostgreSQLDialect But it doesn't work. Thank...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Parse C# string to DateTime I have a string like this: 250920111414 I want to create a DateTime object from that string. As of now, I use substring and do it like this: string date = 250920111414; int year = Convert.ToInt32(date.Substring(4, 4)); int month = Convert.ToInt32(date.Substring(2, 2)); ... DateTime dt = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: SnapsToDevicePixels issue In my WPF app, I have created few Line elements and added inside a StackPanel. The thickness for all lines is set to 0.5. But when I render it, sometimes few lines are appearing blur. I tried setting SnapsToDevicePixels in the StackPanel but this makes the lines completely invisible. Now if...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Hooking Generic Repository With IOC container I am trying to create a generic repository pattern where i can swtich ORM technogies , But i stumbled upon this problem when trying to hook with IOC container public interface IRepository<T> { //members } For NHbernate this works fine public class FNHReposit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Native Methods - java where to find the source code of the machine specific native methods declared in java... For example private static native Class forName0(String name, boolean initialize, ClassLoader loader) A: Use Google code search (see here for the search results). You'll be looking ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problem displaying images obtained in byte format from server I am getting a few icon files (92X92) from a server. I need to parse them and store them in a dictionary and later display them on the UI. I am using the following code for obtaining the File Name and for other action: System.Windows.Media.Imaging.BitmapI...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to convert a week number to a date in Javascript I had tried to find some work done but I haven't had luck. Any ideas? Examples: Week, 1, 2001 => 2001-01-01 Week, 26, 2007 => 2007-06-01 A: Someone might be still interested in a more contained version: function firstDayOfWeek (year, week) { // Jan 1 of 'y...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Differences between Google NFC API and Open NFC API? As the title suggests I am looking for information that would allow me to differentiate and choose one of both possibilities in order to develop of NFC on Android. link NFC Google API:http://developer.android.com/resources/samples/NFCDemo/index.html link NFC Open ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Script to change ip address on windows I use my computer to communicate with a piece of hardware via ethernet. To communicate with this device I set my ip to 192 168 0 11, subnet mask to 255 255 255 0, and default gateway to 192 168 0 1 for IPv4. To use the internet, I choose "Obtain an IP address automatically" via...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I get the dimensions of the ImageRectangle in PictureBox? Background I want to be able to get the drawn dimensions of a zoomed image inside the picturebox (I'll explain below). The PictureBox.ImageRectangle property seems to be exactly what I'm looking for because it shows the height and width of the resized...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Zend File Upload and Element Decorators I have the problem, that the following Zend Form throws an error. The problem is the "file"-element and using setElementDecorators. class Products_AddForm extends Zend_Form { function init() { // other form elements... $uploadElement = new Zend_Form_Ele...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Packing Rectangles Algorithm I need to solve the following problem: I have multiple rectangles of sizes: width height, width/2 height/2, width/4 height/4 , width/8 height/8 ... etc I need to pack these rectangles in a big rectangle of size x*width y*height such that no rectangles overlap, the rectangles are distrib...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Should unit tests use different managed object context to the main app? All the managed object context code is located in my app delegate. Should I have similar code in my unit test classes? A: For unit tests, I create an in memory managed object context specifically for the test(s). That way it can be destroyed ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to draw a horizontal line at the SOUTH position of the BorderLayout of a Container? I have a Container whose Layout is BorderLayout. I want to draw a horizontal line at the SOUTH position because this Container is drawn repeatedly so I want to delimit each by the horizontal line. Here is the code: tList = new Li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Prolog programming - path way to a solution I am studying prolog at university and facing some problems. What I already found out is just solution to a problem. However, I'm more interested in the way to think, i.e. how to get such solution. Can somebody give me an advise on this field. I would really appreciate yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: .NET Socket Cannot Detect Disconnect Event under Windows 7 I'm using System.Nets.Sockets.Socket to play the client side to connect our server. Everything works fine under Windows XP. But recently, our client report that the UI cannot alarm when it disconnect from the server side (by un-plug the network cable) under ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# Screenshot of Control is white My question is related to this one: How to get a screen capture of a .Net WinForms control programmatically? I want to take a screenshot of a System.Windows.Forms.Control in C#. I'm using the DrawToBitmap method suggested in the question linked above and that works most of the time....
{ "language": "en", "url": "https://stackoverflow.com/questions/7580863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Special character in Search in PostgreSQL I am trying to retrieve the contact names based on the keyed search string. It performs good for the English alphabets and behaves strangely for special chars such as _,/,\,% My query in the function is similar to SELECT contact_name FROM contacts WHERE LOWER(contact_name) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: fb:login-button ignores scope? I changed my Facebook App to OAuth 2.0. Now the Login window ignores the user permissions. The new login button code is as follows: <fb:login-button show-faces="true" width="400" max-rows="2" scope="read_stream, publish_stream, email"></fb:login-button> when I use perms instead of scop...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which version of libstdc++.so.6 to use? I'm using a third party shared library (libsw_api.so) on Solaris, which when I try to load, produces the following error: fatal: relocation error: file libsw_api.so: symbol _ZNKSt9bad_alloc4whatEv: referenced symbol not found The program exited with error code 1 When I run ld...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Symfony 2 and facebook login error I am using fos_facebook bundle to integrate facebook login system with my web app. I am getting following error. "The Facebook user could not be retrieved from the session" Has anyone come across this problem? Could anyone successfully integrate facebook with symfony? Please prov...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ProcessBuilder to execute custom executable Okay, I have tried a dozen different ways and no success. I want to execute a custom exe and grab the output. It runs fine from the command prompt. I get the "dir" to work fine, but not custom.exe. Here is the code: List<String> command = new ArrayList<String>(); comma...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generic Performance Testing Framework For .NET I have a client/server application written in C#/.NET 3.5 that I want to do a bit of performance testing on. I've been looking for a generic framework to help me but not had much luck. I would like something that can manage a set of clients and perform random actions fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Detecting swipe gestures on UITableViewCell inside UIScrollView I am hoping someone will be able to help me with a problem that is doing my head in at the moment! Given the following view hierarchy I want to be able to detect swipe gestures on my custom UITableViewCell. I have subclassed the UIScrollView and have a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Extras based REORDER_TO_FRONT In an app I have very reused Activity, that shows a list of stuff happening on a specific day. The day is specified using Intent Extras. My problem is, that if the user starts at day=1, then chooses day=2 and then day=1, from the menu, then I would like the back button to go to day=2 an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Matlab- zero padding(2) Anyone can help? Don't know why got error? ??? Assignment has more non-singleton rhs dimensions than non-singleton subscripts Error in ==> create_padded_image at 17 padded_image(padding+1:padding+image_size(1), padding+1:padding+image_size(2)) = image; Error in ==> create_padded_image at 9 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to express queries in Tuple Relational Calculus? Problem: Consider a relation of scheme Building(Street, Number, No.Apartments, Color, Age). TRC: find the oldest building in Downing Street. The associated SQL statement would be: SELECT MAX(Age) AS ‘Oldest building’, Street FROM Building WHERE Street = ‘Downin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: android camera stretched in landscape mode The app I'm writing requires camera functionality. So to learn about how to operate the camera, I followed this script: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html I have put the activity in my manifest, s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: LIBRTMP Delphi: mapping of the DLL When I call the function RTMP_SetupURL from Delphi the URL is not updated in the record RTMP, I tanslated the DLL function like that: int RTMP_SetupURL(RTMP *r, char *url); function RTMP_SetupURL(var r:RTMP; url:PAnsichar):integer; and the record AVal is declared like that: AVal ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: XmlTextWriter and null strings I want to serialize an object where some of the member variables are of type string and have the value null. I use the following code: var writer = new XmlTextWriter(stream, Encoding.UTF8); writer.Formatting = Formatting.Indented; var s = new XmlSerializer(type...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Table does not have an inverse; this is an advanced setting (no object can be in multiple destinations for a specific relationship) I have three tables in my Core Data db. EntityManagedObject, InitiativeManagedObject, ObjectiveManagedObject. There is a 1-2-M relationship between Entity and Initiative; Entity and O...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Basic: Where to initialize/set the function I am working on a .Net project(solution) which is having 25 projects. I want to set the value in some function/method so that It can be set once for the entire application. Where to set this method so that I dnt need to set it again in the individual winforms. That functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Effective search of number pairs I have a problem, where i have big list of number pairs. something like that: (0, 1) (10, 5) (5, 6) (8, 6) (7, 5) ..... I need to make that i can make very fast lookups if the pair exist in list. My first idea was make map< std::pair<int,int> > container. and do searches using cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to intergrate IQEngine API in upload page in Node JS Here is IQengine API So I upload an image through upload page in node js and api send the image to the engine and get a result then the result is displayed in the page. Can you write the simple code? Thank you.
{ "language": "en", "url": "https://stackoverflow.com/questions/7580905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Whether generated WCF Service Client is Synchronous or Asynchronous by default? I am new to WCF Service. I read that both ASP.NET and WCF Services are synchronous by default. However we can implement both the ASP.NET and WCF Services asynchronously. I want to know whether the generated Web Service Client (Proxy Clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android sending JsonObject with json array I need to post one request to server. Format i need to send is : { “userId”: , “array”: ("A,"b","c",...) } I can send the jsonobject but i don't know how to send JsonObejct and Jsonarray together in one request. A: Is it that easy how I think? JSONObject json = new JSONOb...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Setting WP7 Softwares on mac I want to know can we install WP7 software on Mac machine. I found that virtual machine is an option but Windows Phone emulator will not run from within a VM. Another thing I found is Boot Camp software can be used to install window device drivers. I want to know will this serve my purpo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: FQL event_member query returns nothing I want to select if a specific user (ie. the user logged in) is attending at a specific event. Because I don't want to use Graph API for getting always all the events a user is attending, I tried FQL SELECT rsvp_status from event_member where eid = {0} and uid = {1}, but it ret...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Implement "Down for maintenance" page I know we could simply use an app_offline.htm file to do this. But I want to be able access the website if my IP is 1.2.3.4 (for example), so that I can do a final testing. if( IpAddress != "1.2.3.4" ) { return Redirect( offlinePageUrl ); } How can we implement this in ASP....
{ "language": "en", "url": "https://stackoverflow.com/questions/7580911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: asp.net convert utf-8 from webservice request I get some string data from a webservice in utf-8. How do I convert it in an aspx vb to a readable format? The website is german. A: UTF-8 is readable. ASP.NET should be able to read it just fine. If it's transmitted with a Content-Type whose charset parameter is set to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Handling timeout exceptions when calling WCF services from Silverlight I am calling an ASMX web service using WCF from within my application - when a call to the web service fails, for example due to a timeout or connectivity issues, then the exception gets caught in the ApplicationUnhandledException method and does...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: InfoWindow on Marker using MarkerClusterer This is my html code. I've try anything to add an infowindow on the markers but it don't wanna work. My data is loading from the "Alle_Ortswahlen.page1.xml" file. Do anyone have an idea how can I add infoWindow to each marker? <script type="text/javascript"> google.load(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Append json messages when multiple json arrays are echo'd with jQuery I have 2 classes that return a json encoded array if an error message is added to the $_error array: Validate.class.php: public function showResponse() { if(!empty($this->_error)) { return json_encode($this->_error); } else { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySqlDataReader: DataTable.Fill(reader) throws ConstraintException I have two tables orders and orderdetails table orders (PK = id, UNIQUE index on orderno) |id|orderno| | 1|1000 | | 2|1001 | table orderdetails (PK = id) |id|orderid|item|qty| | 1| 1|ABC | 3| | 2| 1|XYZ | 4| Now I want to query the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Android: Opening wrong Activity from the widget I have been struggling with this problem for a while now. I have a widget which displays summary of a cooking recipe. The widget is clickable so whenever user clicks on it the new activity is opened with a full description of that recipe. The problem is that sometimes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why do I get a missing handler for logger "sentry.errors"? I installed django-sentry in an integrated fashion. I then ran python manage.py shell and tried to log like this: >> import logging >> mylog = logging.getLogger('sentrylogger') >> mylog.handlers [<logging.StreamHandler instance at 0x9f6130c>, <sentry.client...
{ "language": "en", "url": "https://stackoverflow.com/questions/7580934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }