text
stringlengths
8
267k
meta
dict
Q: Get the value of a property from a Class in Form2, and that value have been set in Form1 in C# Here is the scenario. I want to set the value of Server in Class1, i am setting the value in Form1. Then get the value of Server in Class1 in Form2. Here is what i have. class Class1 { private string server; publi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: listener for sd-card removal im trying to do something similar to this: android: how to listen to "sd card removed unexpectedly" but onReceive of the listener never gets called, when i dont have sdcard mounted or i remove the sdcard. Here is the code. public class MyClass1 extends Activity{ BroadcastReceiver m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: "An error occurred while parsing EntityName" while Loading an XmlDocument I have written some code to parse RSS feeds for a ASP.NET C# application and it works fine for all RSS feeds that I have tried, until I tried Facebook. My code fails at the last line below... WebRequest request = WebRequest.Create(url); WebRes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Integrating facebook chat API into iOS application I have an iOS application that already using some methods of Facebook Graph API, but i need to implement sending private message to friend by Facebook from my application. As i know, there is no way to sending private messages by Graph API, but it maybe possible by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: reading flashvars problem for swfobject I have a flash swf of 1.2mb. am embeding it with swfobject using dynamic embeding . <script type="text/javascript"> var flashvars = {}; flashvars.campaignid = "12345678890"; var params = {}; params.allowscriptaccess = "always"; var attributes = {}; swfobject.embedSWF("soccer....
{ "language": "en", "url": "https://stackoverflow.com/questions/7552420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Craeting QueueTable in OracleAQ 11.2.0 I have installed Oracle11.2.0(windows,32 bit) and tried to create a queuetable.. (I have granted all permissions for the jmsuser,AQ_ADMINISTRATOR_ROLE,AQ_USER_ROLE,DB_Access). when try to create a queuetable, Oracle gives following issue; oracle.jms.AQjmsException: ORA-01017: i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Authentication from multi source in Plone 4? How can I authenticate user from multiple source altogether ? For example local (ZODB or ldap), facebook and openid. Do I need to write a new PAS plugin ? Or We can achieve this the existed products ? A: There's no need to do anything. The authentication is already done ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Saving and displaying data with NSUserDefaults I've saved some input from a UITextField using the following code: NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:myTextField.text forKey:@"myTextFieldKey"]; [defaults synchronize]; I'd like to display this saved text on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery event handling for HTML5 media events I want to listen to some of the events fired by HTML5 <audio> element. Some of event attributes for <audio> element are : onplaying, onprogress, onseeked, onseeking etc., I tried to listen to these events in jquery using conventional live() function like below, but it did...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to set up for multi-product Eclipse plug-in development? I have a set of plug-ins which need to support different Eclipse products. There is a core plug-in, which is product-independent, and an adaptation plug-in each for Product X, Product Y, etc. Deployment-wise, I'm thinking one feature for the core plug-in a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get textbox helper to display valid HTML markup for HTML 4.01 strict? I have the following code in my page/view: @Html.TextBoxFor(x => x.Name, new { maxlength = "50", size = "50" }) The output generated is: <input id="Name" maxlength="50" name="Name" size="50" type="text" value="" /> I am using the followin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Inheritance in datacontracts I have a class say supplierAddress which comes from a webservice (it is a datacontact). I then have a second class myAddress which inherits from that class and has a few more constructors and metods. What I want to do is pass a myAddress back to the webservice. When I pass a cast down my...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: QRegexp for (??) I'm fighting for some time to create a QRegExp for matching the string (??) (ie: an opening parantheses, two question marks and a closing parantheses and this should be a separate word, so before and after this can be spaces, tab, newline), The closest I came up with is QRegExp("\\b\\(\\?\\?\\)\\b")...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the equivalent for Hibenate.saveOrUpdate() in entity framework In entity framework you have to write a lot of code for saving or updating a single entity: using (DataContext context = new DataContext()) { context.Task.Attach(task); if (task.ID == 0) { context.ObjectS...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Android - Translating language codes I get a response from a webservice that will return several language codes (ISO 639-2) as options. I now want to translate those into a human understandable word. For example: eng-> English ger -> German fre -> French How would you translate those words. Should I be using the st...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Adding images side by side in pdf using itextsharp I am writing some data to the pdf using itextsharp. I am adding 2 images. I used this code: iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance(System.Windows.Forms.Application.StartupPath + "\\t.jpg"); iTextSharp.text.Image img2 = iTextSharp.text.Image....
{ "language": "en", "url": "https://stackoverflow.com/questions/7552438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ICustomTypeDescriptor and XAML Serialization I have a business object that can be edited via PropertyGrid. It contains list of labels (let's say strings for simplification). public class MyObject { // bunch of properties here, cut for readiness public LabelsList List {get;set;} // ... } List of labels i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Fixed positioning a list element on mouse over - jQuery I want to show overflow area in a list element when the mouse over. Normally element's height set to 200px and has an overflow area (not showing.). $('#extra_product ul li').live('mouseenter',function(){ var t = $(this); var sHeight = t.height(); t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the numerically best way to calculate the average what's the best way to calculate the average? With this question I want to know which algorithm for calculating the average is the best in a numerical sense. It should have the least rounding errors, should not be sensitive to over- or underflows and so on. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How to clear already sent notification message I've a working notifications part in my project. And I want to give user to disable notifications in app itself. Once user checks this option, I bring tile image and title to original state. Even this part works fine. Count can be removed by sending 0, But i didn't unde...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can multiple processes append to a file using fopen without any concurrency problems? I have a process opening a file in append mode. In this case it is a log file. Sample code: int main(int argc, char **argv) { FILE *f; f = fopen("log.txt", "a"); fprintf(f, "log entry line"); fclose(f); } Two que...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Path.GetTempPath() unexpected symbol at the end of path I am trying to read Windows 2008 SP2 temp path using the code Path.GetTempPath(); and get unexpected result. Instead of C:\Users\Administrator\AppData\Local\Temp\ I get C:\Users\Administrator\AppData\Local\Temp\2\ Why I get "2" at the end of path? There is no ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: groovy sql framework Hi I want to design a class using Groovy Sql which I will be able to use in any of my future db related projects. At present I came up with the below class, which has separate functions for individual queries, I want to learn how can I make it generic! So that I just need to pass 1 query and som...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Relational Database query MySQL I have modified the names of my Tables. The sportevents table is the main table and it should get its data from the tables: event_date, events, results, and members. Is there a way to do this. Please not i need to keep this structure. sportevents (link table) • id • event_id • date_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Tomcat 6.0.24 Exception: javax.servlet.ServletException: Servlet execution threw an exception I am using java RestEasy Framwork for my application. I have some exception when I am trying to make a requet in tomcat server. Full stackTrace is: Sep 26, 2011 1:50:06 PM org.apache.catalina.core.StandardWrapperValve invo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to keep a task alive after phone sleeps? my application needs to send a message to my server every 30 seconds or so. I understand I need to use AlarmManager using RTC_WAKEUP or ELAPSED_REALTIME_WAKEUP. now I don't understand two things: 1) If the AlarmManager wakes up the device, why do I need to aquire a WakeLo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: make function which returns the title of data structure There are several data types. data Book =BName| Author deriving (Eq,Show) data Video = VName deriving (Eq,Show) data CD =Cname | Auth | NOC deriving (Eq,Show) data Product = Product Book Video CD deriving (Eq,Show) make function getTitle which return the name(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Does CompositionContainer.SatisfyImportsOnce reuse components? In a WCF service project, I have created a simple wrapper for MEF CompositionContainer to simplify its instantiation : internal class CompositionProxy { private static Lazy<CompositionContainer> m_lazyCC; static CompositionProxy() { m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to Parse Apache config file, PHP config, FTP Server config I've just bough VPS account for testing and development. Is there a function of PHP to parse Apache config file, PHP config, FTP Server config, zone files, etc? Also a way to insert data into config file. I want to create a simple Control Panel to add ft...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Visual Studio 2008 Web application strange behaviour - Work only when debugging, Did not work when deployed I created a .NET 3.5 Web application using Visual Studio 2008. (It is basically a text field, a button and a label field. When the button is pressed, the label field will display the text field content) When I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MVC3 and User Model I'm using the generic membership class and have had my user sign up for workshops. I need to have something like this User 1 --Workshop 1 --Workshop 2 --Workshop 5 User 2 --Workshop 1 --Workshop 2 --Workshop 5 How do i get the user model? A: If I understand right you wnat ot extend...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Check if WCF(namedpipes) host is available? Hi, We have a winform application that is only to be executed as a singelton, If a second instance try to start this new instance will connect to the current and transmit parameters over namedpipes. The problem is that when starting the first instance there will be a try t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Compile Android project in Continuous Integration System Hudson? I'm setting up a Continuous Integrations System with Hudson and it's just amazing. I got a SVN repository and integrated a post-commit hook that notifies Hudson when someone commits to the repository. This part is working splendid. The general idea is,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to select unique row according to last accessed time I want to get only distinct rows with their respective AnsId, like Qid: 01 have last AnsId: 01 I have following data structure, Qid Time AnsId 01 2011-09-26 12:55:10 01 02 2011-09-26 12:58:32 03 03 2011-09-26 12:59:05 02 01 2011...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: JOOMLA : how to use multiple modules in the same webpage? my question sounds simple, but for me it isn't, i'm developing a joomla module and i want to use it multiple times and at different different position on each page load, can you just guide me? or gimme an example to accomplish this task? your help will be muc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: What are the specifications of Flex usable FLV videos? I have a server which streams FLV files to a Flex client. In this flex client, the video timeline advances incoherently, and no video can be seen on screen (only the sound can be heard). My FLV file has been generated using ffmpeg, which says (about this generat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Issues Resizing Image to fit on a printed page I am trying to print an image (from file) to a the printer using a PrintDocument. I am re-sizing my image so that it is scaled to be full page on the printout when I print this the image is cropped slightly. EDIT 2 I am using the margins to calculate the area to use: Wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: c++ undefined reference class constructor I'm trying to use a library where one of the classes has a constructor like so: public: AreaNodeIndex(size_t cacheSize); I'm trying to instantiate an object of this class in my program like so: size_t const cacheSize = 50000; AreaNodeIndex areaNodeIndex(cacheSize); The lin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Routing in Kohana without changing URL How can I re-rout execution to another controller/action in Kohana PHP framework, w/o redirecting. A: if you using default routing you can do this: Request::factory('welcome/index2')->execute(); General case: $this->request ->controller('welcome') ->action('index2') ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jquery ui autocomplete not showing result so i'm using jquery ui autocomplete instead of combobox to make it easier for my users to select hundreds of products from database. $(function() { $(".autocomplete").autocomplete({ source: function(request, response) { $.ajax({ 'url...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to check date validation in iphone? I want to add date into my database .. and I want to add it in some specific format ..like dd/mm/yyyy how to check the validation for it? Like e-mail validation .. I want to check is it in specified format or not? how to do this ? A: 1) What is the input method for your date?...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: A Simple Mac OS X Sound App I'm new to XCode and I have this project that I want to get on with. I want to create a small app for OS X that can get an audio input from whatever output and input device I set on System Preferences\Sound and output it to a specific then play that sound to a different device on System P...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Advanced Linq sorting C# I have an IQueryable that has a list of pages. I want to do: Pages.OrderByDescending(o => CalculateSort(o.page)); the method calculate sort is similar to that here is a plain english version: public int calculatesort(page p) { int rating = (from r in db.rating select r). sum(); int c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: renaming a temporary table into a physical one Can I do something like this? create table #tbl_tmp (col1 int) insert into #tbl_tmp select 3 exec sp_rename '#tbl_tmp','tbl_new' A: No. If you are running this from a database other than tempdb you get No item by the name of '#tbl_tmp' could be found in the curren...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: no overload for matches delegate 'system.eventhandler' As I'm pretty new to C#, I struggle with the following piece of code. When I click to button 'knop', the method 'klik' has to be executed. The method has to draw the Bitmap 'b', generated by 'DrawMandel' on the form. But I constantly get the error 'no overload f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Excel interop - Problem with recalculating the specific range Here's the current code I have got private void recalculateRRange(Excel.Range UsedRange) { Excel.Range currentRRange = null, firstRRange = null; currentRRange = (Excel.Range)UsedRange.Find("#HERE#", Type.Missing, Excel.XlFindLookIn.xlValues, Excel...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: change background of textview for listview item get focused i have this listview each listview item has a textview that have background , i want to change the background of the textview of listview item get focused . A: You should use Selector. Edit: Use selector drawable as a background for ListView elements, o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CPPFlags in config.mk In Arch Linux PKGBUILD for surf browser, there is: sed -i 's/CPPFLAGS =/CPPFLAGS +=/g' config.mk sed -i 's/CFLAGS =/CFLAGS +=/g' config.mk sed -i 's/LDFLAGS =/LDFLAGS +=/g' config.mk Why must the flags be changed from CPPFLAGS = -DVERSION=\"${VERSION}\" to CPPFLAGS += -DVERSION=\"${VERSION}\...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Remove QLayoutItem from a Layout, but still use it later on? Here is the environment first: I have a self defined "Property Editor" which is a QGroupBox (derives from QWidget) Currently I have a class let's call it "Holder", which has a reference to two of the Property Editors. Now I have multiple "Holder" classes a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problem importing wx with PyDev - undefined variable import I am getting errors like Undefined variable from import: BOLD while I do: import wx print(wx.BOLD) I looked at wx module initialization and it does something like from wx._core import * del wx import wx._core I am not sure why it does this trick, but it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are those java threads starting with "pool"? I have a problem with a Tomcat server that is unable to shutdown gracefully. I have taken a thread dump after I issued the shutdown command, and it looks like this: http://pastebin.com/7SW4wZN9 The thread which I believe is the "suspect" that does not allow the VM to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Select options in sencha touch is not working for android I have an application where i am using sencha touch JS API for UI rendering. The UI works fine in chrome browser but not working in Android or iPhone device. i have used the following code. Ext.regModel('Contact', { fields: ['firstName', 'lastName']...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting Error when using response.write() I need to save a file as .csv in client machine. I am using the code below. protected void btnGen_Click(object sender, EventArgs e) { try { string fileName = "test"; string attachment = "attachment; filename=" + fileName + ".csv"; List<string>...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to test assert throws exception in Android is there a more elegant way to do an assert throws exception in Android then this? public void testGetNonExistingKey() { try { alarm.getValue("NotExistingValue"); fail( ); } catch (ElementNotFoundException e) { } } So...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: problem with shell variables in awk I have a command which is executed successfully on command line: ls -l | awk '/Sep 26/{split($8,a,":");if(a[1]a[2]>=1045 && a[1]a[2]<=1145)print $9}' I am including the same thing in a shell script below: #!/bin/ksh date1=$1 date2=$2 time1=$3 time2=$4 ls -l| awk -v d1=${date1} -...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: validity plugin jquery problem? I'm using the validity plugin to validate a form. It's working fine but is it possible to execute a callback function if the validity function succeeded like the following $("form").validity(function(){ $("#place").require().range(3, 50); $("#location").require().greaterThan(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Timer in java using Eclipse I'm trying to do a little program in Java using Eclipse, and I'm a little bit lost. Could anybody explain me (in a "for dummies way") what do I have to do for repaint a form using a timer? I'm trying to do something as simple as a clock. I need a timer to repaint it every second. Somethi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Text Change event fired when button clicked I am working on .net 2.0 I am populating a Grid View with multiple textboxes. The textbox has text change event. There is also a button with click event. The problem I am facing is that when the I enter the text in textbox and then click on button, the text change event g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Binding nested lists using Lambda (C#) I have this piece of code that I'm trying to convert to lambda - foreach (var facet in response.Result.Facets) { var newFacet = new Facet {Parent = facet.Title}; foreach (var element in facet.Subelements) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I protect the source of my HTML Metro app? I'm really interested in building applications in a Windows 8 Metro style. I would like to use HTML5 but I am very concerned about protecting my front end UI from deconstruction and ultimately being ripped off by others. Unfortunately, my service is all open source ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to get dynamic field in LINQ Here's my LINQ query: var settingViewModels = from l in settingsByEnvironment["Localhost"] join d in settingsByEnvironment["Dev"] on l.Key equals d.Key join p in settingsByEnvironment["Prod"] on d.Key equals p.Key ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should I merge images in memory (.py) or in view (HTML)? My facebook app lets the user upload an image, select what the image is (eyes, nose, mouth or other body part) and then can combine by selecting three random images by category and that's works fine and the code looks ok and readable though not very advanced: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Random memcache calls take extra-ordinarily long Please see this appstats log, randomly some memcache calls take extraordinarily longer than others. These are all get calls for memcached counters so there is absolutely nothing different about the calls that are taking longer than others. Any explanation? A: Memc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: address=data via macro define #define PORTC *(unsigned char volatile *)(0x1003) #define DDRC *(unsigned char volatile *)(0x1007) So I've been trying to read some stuff about embedded C. Initially I thought this macro was a pointer-to-pointer type but then I soon assumed the last star is actually a dereference rather...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java UDP packet read failing I am trying to send packets from one host to another peer host using java UDP protocol. The one host sends data, while the other reads it. The corresponding read however keeps blocking, thus receiving no data. I can see the sender packets going to the right destination using wireshark, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to define a dynamic scope in Ruby Sunspot? I want to search the tracks either by "all of" the filters, or by "any of" the filters. So here is what I got: tracks_controller.rb def search if params[:scope] == "any_of" Track.search do any_of do with(:name, "Thriller") with(:artist, "Mich...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hibernate insert with single column table problem I'm using Hibernate with a SQLite database. I have the following class : @Entity @Inheritance(strategy=InheritanceType.JOINED) public abstract class Authority { @Id @GeneratedValue(strategy=GenerationType.AUTO) private int idAuthority; (...) I then have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regular expression for a formatted time I have a time format that I want to check if it is correct. The format should be [H]H.MM[a|p]. Hours should be from 1 to 12, minutes as usual and the ending character either an a or p. There should also be a dot between the hours and minutes. I tried with this reg ex, but it d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Paramiko bug: SSHClient.connect() method hangs when the peer is unreachable even if I set the 'timeout' Here is a python code snippet that uses paramiko: import paramiko sshClient = paramiko.SSHClient() sshClient.set_missing_host_key_policy(paramiko.AutoAddPolicy) sshClient.connect(_peerIp, username=_username, pass...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: problem in taking screenshots in android by programmatically in my app i am taking screenshot of the current screen and save it in sdcard. but in the case screenshot is not saved in sdcard. how to take screen shot and send the captured screen shot in email as attachment. please help me. my coding: View v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Macro to delete an email I have created a macro that forwards an email on to a recipient once a button is clicked. However, I want the macro to also delete the email (sending it to the recycle bin). Here is the current code. This currently works and forwards the email. Sub forwardEmail() Dim oExplorer As Outlook.Ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Changing the selected Menu items class across pages For my website project I am using ASP.NET MVC "Razor". Learning as I go. I have 5 or 6 pages on my site, and one page that is on another site. I want users to feel like they are using the same site for all. There is a typical HTML menu for the pages which follows...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Finishing off my 'make folders from database' class The below is a class for making local folders from database entries where each folder has a name, id and parent-id. I have put it together as best I can but do not know enough to finish it off. I need to "just grab the folder with id 0 and start building your Files...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can onload event fire right after setting image src attribute? What console log can be after this code will be executed? var img = new Image; img.onload = function() { console.log('B'); }; img.src = 'image.jpg'; for (var i=0;i<100000;i++) { console.log('A'); } I know, that most likely it will be A...AB. But can i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What does "^:static" do in Clojure? I've seen the ^:static metadata on quite a few function in the Clojure core.clj source code, e.g. in the definition of seq?: (def ^{:arglists '([x]) :doc "Return true if x implements ISeq" :added "1.0" :static true} seq? (fn ^:static seq? [x] (instance? clojure.lang.ISe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: how to open a socket in php I am completely new to sockets and not that familiar with the concept. I am planning on making a phone application for chatting. now I was told that if you open a socket you can push results (chat entries) to the phone application. now is this something I can do with fsockopen php functi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# PropertyGrid - How to make array elements read only? I have a PropertyGrid to which I add a array of bool-values. The array itself is marked as ReadOnly, which is recognized properly by the property grid. BUT: If I expand the array in the Grid, all the items are editable by the user. Of course that's not what I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Long Delay in Calling the InCallScreen Process outlined: Why does the call to the new interface (InCallScreen) take such a long time? (From TwelveKeyDialer to InCallScreen). This makes for a poor user experience. First: TwelveKeyDialer.java: dialButtonPressed(){ ... startActivity(intent); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Overview of ISharedImages? The Java UI plugin provides the Interface ISharedImages to access standard images which can be used in own plugins. e.g. Image image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT); This works very well but I did not find an overview of the available ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Is OO Base compatible with MSO Access? Is Open Office Base compatible with MS Office Access? That is, can I successfully edit an Access-made database from Base? Thanks A: By opening oo base (version 3.3), the dialog box proposes to select a database and connect to an existing one. Among the available options, it is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Resize CMD Window How can I resize the Command Prompt window programmatically in C or C++? For example 80x25 or 80x40 characters. Thank you in advance. A: SetConsoleWindowInfo A: The MODE command allows you to set the size of the Command Prompt window. The syntax is: MODE [COLUMNS],[LINES] For example for a 80x25 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to pass multiple parameters to a target in Ant? I have this dummy target: <mkdir dir="${project.stage}/release <war destfile="${project.stage}/release/sigma.war"> ... ... </war> What I want to do is provide two parameters say "abc" & "xyz" which will replace the word release with the values of abc an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Improving Image compositing Algorithm c# .NET I was wondering if anyone could shed some light on improvements I can do in making this compositing algorithm faster. What is does is takes 3 images splits them up to get the 1st Images Red Channel, 2nd Images Green channel and the 3rd Images Blue channel and composites ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multidimensional Binding in WPF ListView I have the following Data-Structure: class XItem { public string Name {get;set;} public int Position { get;set;} ... } class MyItemList { public List<XItem> Items{get;set;} ... } Now i want to bind a List of MyItemLists to a WPF-ListView. I want to have a ListViewItem for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: XDocument null reference on object that isnt null I have an xml (called xdoc) file like the following: <Root> <ItemContainer> <Item> <Item> <Item> <Item> </ItemContainer> </Root> if i do the following XElement xel = xdoc.Element("ItemContainer"); As far as i understand, i should get back a reference to to my ItemC...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Convert float to String and String to float in Java How could I convert from float to string or string to float? In my case I need to make the assertion between 2 values string (value that I have got from table) and float value that I have calculated. String valueFromTable = "25"; Float valueCalculated =25.0; I tri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "230" }
Q: Draggable Div with a textarea in it. Drag problem I have a div with a textarea in it. The main div is draggable and works fine, but I'm unable to drag the div while clicking on the textarea in it. Is there a way to drag the div even if I drag it from the textarea inside the div? Here is how I make my div draggable $...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get Application information from an APK using PHP script How can I get the versionCode, versionName, application icon and application label from an APK with PHP A: I'm not that familiar with php so I can't provide any code, but the idea is: * *unzip the APK file (since it's "nomal" zip format) *open the Android...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Are empty interfaces code smell? I have a function that returns same kind of objects (query results) but with no properties or methods in common. In order to have a common type I resorted using an empty interface as a return type and "implemented" that on both. That doesn't sound right of course. I can only console...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: using long polling with facebook graph API (for "real-time" notifications) I'm looking into implementing a web page to show the user's news feed with real-time updates, without using simple polling to the facebook servers. after browsing through similar questions: * *How to implement facebook line notification?...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How pure and lazy can Scala be? This is just one of those "I was wondering..." questions. Scala has immutable data structures and (optional) lazy vals etc. How close can a Scala program be to one that is fully pure (in a functional programming sense) and fully lazy (or as Ingo points out, can it be sufficiently non-...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: javascript - changing embedded objects src problem for Firefox (no problem for IE9 or Opera) this will be my first question. Sorry for mistakes. Following code works in IE9 and Opera but does not work in Firefox. In Firefox, I am clicking another link and going back to the page that contains the video then video is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to check if client has .net 3.5 Client Profile (or any version of .Net) from web site? Is there anyway to check from a website if a client has a specific version of .Net installed and which one it is so you can offer them different downloads based on it? A: Some browsers include this information in the User Age...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: continuous scolling ticker - avoiding jumping? I'm trying to get an infinite scrolling ticker type of thing working smoothly. To make it continuous I am removing the first element and replacing it at the back once it is out of view, but this makes the container element jump a little in the amount of time it takes to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL Partitioning and Unix Timestamp I've just started reading on MySQL partitions, they kind of look too good to be true, please bear with me. I have a table which I would like to partition (which I hope would bring better performance). This is the case / question: We have a column which stores Unix timestamp valu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: facebook status I am trying to use the following code to post a message on facebook wall (Facebook C# SDK - https://github.com/facebook/csharp-sdk) Facebook.FacebookAPI api = new Facebook.FacebookAPI("my token"); JSONObject me = api.Get("/me"); var userId = me.Dictionary["id"].String; Dictionary<string, string> p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: More comfortable way renaming a Class in Eclipse using CDT for C++? I'm wondering if there's an easier way using CDT for this refactoring task. Not only a simple renaming, also a rename of header and source files, correcting all #include statements, rename member-attributes in other classes and so on. Don't know if...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ssl client authentication without ssl re-negotiation On client side I have Apache HTTP client on jdk5u22. On server side I have tomcat on jdk6u27. With this setup if I try SSL Client authentication (2 way SSL) then it cause "javax.net.ssl.SSLHandshakeException: Insecure renegotiation is not allowed" on the server an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: iphone: how to detect last caller number programmatically? Is there any way to detect last caller number & call duration on iPhone, I am able to get all notification (Core Telephony) but don't know how to get caller number. A: You can't, the API will not allow you to do this. I think apple will never allow this due...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Display an image in silverlight datagrid How would i display an image in my silverlight datagrid from the database using WCF please help. thanks in advance. A: like this: <data:DataGridTemplateColumn Width="25"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Image Width="20" Stre...
{ "language": "en", "url": "https://stackoverflow.com/questions/7552717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }