text
stringlengths
8
267k
meta
dict
Q: rails3 model redirect I have a model called User. In the model I want to check if a value is true or false. If the value is true then break all operations and redirect to a specific page. How do I do that? before_create :check_user def check_user if User.find_by_email(self.email) redirect_to root_path ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to block websites to copy php result in my server? this is my code example: $('#list').load('/file.php?id=25'); how to block another websites to access and get result from file.php ? thanks A: By deleting file.php or by protecting it with a password. There is no other reliable way. If you have a resource publi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Javascript validation -Which one is best (Name or ID ) I have two option of JavaScript validation .Among these which one better to use for validation Javascript validation based on FIELD NAME if(document.formname.uname.value=="") { alert("Please Enter Username"); document.formname.uname.focus(); return false; } Ja...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Google Charts API DataTable Cell Color I'm trying to use the Google Charts API to display a DataTable which has some of its cells coloured depending on their value. The table generates fine, but none of my style properties are applied to the cells. According to the documentation I should be able to set a cell value ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regular expressions in python : don't split when a specific substring is found I found a bug in a regex in one of python-scripts and I need help to solve it. The problem is that the script splits a string with re.split('(V[A-Z])', string) but I don't want a split if the specific substring SVD is found. example: "ACD...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: php error when XML item does not exist I am using PHP to grab an XML feed and display it in my website, the feed is coming from This NewsReach Blog. I am using some simple PHP code to get the details as show below: $feed = new SimpleXMLElement('http://blog.newsreach.co.uk/atom.xml', null, true); $i = 0; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby IO#read max length for single read How can i determine the max length IO#read can get in a single read on the current platform? irb(main):301:0> File.size('C:/large.file') / 1024 / 1024 => 2145 irb(main):302:0> s = IO.read 'C:/large.file' IOError: file too big for single read A: That message comes from io.c, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Ruby syntax accept arguments on dynamically generated methods via send How I can pass arguments on dynamically generated methods via send ? Below I generate on the fly several methods, I want they accept the "row" argument. The code below generates the methods, but I don't know how let the methods accept the "row" a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get tooltips text from C# with PInvoke I'm using PInvoke in C#, trying to read tooltips visible in a window with a known handler, but the apps who's windows I try to inspect in this manner crash with memory access violation errors, or simply don't reveal the tooltip text in the lpszText TOOLINFO member. I'm calling ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Decoding base64 adds extra spaces I am working in Delphi XE2 I am converting base64 byte array to string using this TEncoding.UTF7.GetString(byte1) Then decoding string into byte array using this function function Base64Decode(const EncodedText: string): TBytes; var DecodedStm: TBytesStream; Decoder: TIdDeco...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Haskell list comprehension to map I am new to haskell . I was wondering If I can do the following thing using just map and concat ? [ (x,y+z) | x<-[1..10], y<-[1..x], z<-[1..y] ] A: Yes: concat $ concat $ map (\x -> map (\y -> map (\z -> (x,y+z)) [1..y]) [1..x]) [1..10] Although the official tran...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get post value from a select tag PHP Hey I need to get the gender selected from a select tag and then store that value as a variable in php, here's some relevant snippets of both the register.php form and the register_process.php file register.php <form action="register_process.php" method="post"> <table> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how can i bind business object of c# in crystal or rdlc report? First let me tell you one thing, I have never worked with any sort of reporting yet. I have read all the related question and answer on this topic. But could not find any concrete solution. My problem is I have a very simple report to make where I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Wow addon failing to work with array I'm trying to create a simple addon for world of warcraft which records my kills. I've already got'n quite far except there is a problem with the writing of a lua array. The code I have so far local CharacterDefaults = { kills = {}, totalkills = 0 } local killDefaults =...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is my Binding not working? This is silverlight code - but I guess that this will be same in WPF - I have this simple classes public Class A1 { string str1; public string Str_1 { return str1; } } public Class B1 { A1 a1; public A1 A_1 { return...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Google map problem when hide and then toggle I have a google map in my page. I set a button with .slideToggle() functionality to show/hide the with the map and it do so. The problem is that I want to hide the map by default. If I use the display:none on the css, than after toggle up (show) the map, I don't see th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sort an array with respect to the Date in iphone sdk I have a tableview with values loaded from a web service. Which contains date value, here is how it looks like : "Title":"Title1", "StartDate":"9\/15\/2011 12:00:00 AM", "EndDate":"10\/15\/2011 12:00:00 AM". I have done formatting using NSDateFormatter, I got th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Parameterized LIKE clause in SQL statement using Dapper I want to perform the following query using Dapper, which currently doesn't return expected results (I think it must be treating the @pName param as literal text within the single quotes?): var q = "SELECT * FROM Users WHERE Name LIKE '@pName%'"; @pName is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: The keyword of class and interface at header file in Objective-c Possible Duplicate: @class vs. #import I am new to Objective-c, I have seen an example look likes: #import <UIKit/UIKit.h> @class MapKitSampleViewController; @interface MapKitSampleAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *win...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Change which view opens first (Xcode) Possible Duplicate: How to change the default View Controller that is loaded when app launches? So if I made an app and a certain view opens first by default, and decide I want to change which view opens first, how would I do that? A: That is controlled in the method in your...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reading Windows file attributes from Linux (FAT or NTFS file system) Is there any quick and dirty way to read the Windows file attributes from a FAT/NTFS partition, from Linux? For example, to check if a file is read only, system, hidden, etc. And without uncommon libraries (such as linking with Wine).
{ "language": "en", "url": "https://stackoverflow.com/questions/7512114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: codeigniter ActiveRecord where statement issue is have this statement and i want to make it by the Active Records way in codeigniter DELETE FROM TABLE (col1 = value AND col2 = value2 ) OR (col1 = value2 AND col2 = value ); A: CodeIgniter Active Record is impractical for mixing AND's and OR's within a query. You...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL on CSV using HSQLDB JDBC Driver I have a pregenerated CSV file on which I need to run SQL queries. I've been looking at different open source solutions (e.g. CsvJdbc, xlSQL etc) but haven't really found anything satisfactory. CsvJdbc couldn't recognize ORDER BY, GROUP BY etc xlSQL only runs on XLS files, not CS...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: (Vibrating TextView) Configure attributes for custom views I just created class VibratingTextView. I intend to create a whole library of widgets so I want to do it the right way. The xml for this View: <sherif.android.textview.VibratingTextView android:id="@+id/textView2" android:layout_width="wrap_conte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Non-editable text paste target Users need to be able to paste the contents of an Excel spreadsheet into a grid in my flex application. I have implemented this using a TextArea with a change event handler that parses the text the the user pastes - splitting it up by newlines and tabs - and adding it to the ArrayColle...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: initSql property and DriverManagerDataSource I configured the following DriverManagerDataSource for my junits <bean id="myDS" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="${ds.driver}"/> <property name="url" value="${ds.url}"/> <prop...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Trigger deleting from multiple tables I have 2 tables with relation in between. table one is holding groups with groupid. table 2 is holding the relation between the 2 groups. table 1 GroupId, Name, Description, ....... table 2 MasterGroupId, SubGroupId, sequenceNumber When preforming a deletion of a group ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does calling a delegate defined with a signature (e.g.) Func type excecute synchronously in ASP.NET? On first examination it appears that it does. A quick examination of the call stack shows that the method passed to the delegate is executed as one would expect. However.... In calling the delegate in a "click event"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to solve this PHP Ajax Arabic Characters Encoding issue? I develop a web site using PHP and I connect to Sybase database using PHP ODBC functions. There is a web page related to the Customers in order to input their data to confirm a service provided in the web site. I use Ajax to get the Customer Data from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I swap a jndi datasource lookup to an in memory database for intergration testing? I'm using Spring and Hibernate and want to do some intergration testing with DBUnit. In my application-context.xml I currently specify a datasource via jndi-lookup which reads the jndi-name from a properties file: <jee:jndi-loo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to Pass Arguments to Timertask Run Method I have a method and I want it to be scheduled for execution in later times. The scheduling time and method's arguments depend on user inputs. I already have tried Timers, but I have a question. How could It be possible to pass arguments to Java TimerTask run method ? Ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Simple way for removing all non word characters I'd like to remove all characters from string, using most simple way. For example from "a,sd3 31ds" to "asdds" I cad do it something like this: "a,sd3 31ds".gsub(/\W/, "").gsub(/\d/,"") # => "asdds" but it looks a little bit awkward. Maybe it is possible to merge the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: jsTree do ajax request for every parent expanding i'm using jsTree with json as the datasource from the server. Why the jsTree do ajax request on every click on a node and even if the node doesn't have children the node is getting filled with children from the server(it takes the root data!). How can I prevent that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SpecFlow, Webdriver and Mocks - is it possible? The question in short is that we are stumbling upon BDD definitions that more or less require different states - which leads to the necessity for a mock of sorts for ASP.NET/MVC - I know of none, which is why I ask here Details: We are developing a project in ASP.NET (...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What does the below comparison means? Could any one explain why NOVALIDATE is written their and why alpha betwnn two ":" and "[]" ALTER TABLE CUSTOMERS ADD CONSTRAINT cust_f_name CHECK(REGEXP_LIKE(cust_first_name,'[[:alpha:]]'))NOVALIDATE ; and what does REGEXP_LIKE(cust_first_name,'^[0-9]') and REGEXP_LIKE(cust...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Run Time Error (exit status 1) when submitting puzzle in Python I have python 2.7 installed on my windows computer. I'm trying to email a puzzle answer to Spotify, which is running Python 2.6.6. When I submit my *.py source code, I'm getting the following error: Run Time Error Exited, exit status: 1 I only have "i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Diazo add unwanted html header into json response I have a blank Plone 4.1 site with only collective.quickupload installed. The upload portlet worked fine until I install plone.app.theming and apply my theme. The files were still uploaded, but the web client got "Failed" status. Inspecting the ajax response from ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: how to add jde components plugin in an eclipse I need to add jde component plugin in an blackberry eclipse.I have already used the following link in my eclipse: http://www.blackberry.com/go/eclipseUpdate/3.5/java But am getting the error as: 'installing software' has encountered a problem.An error occurred while col...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problem while creating a Left function in PostgreSQL I am trying to create a Left function in PostgreSQL as under CREATE OR REPLACE FUNCTION LEFT(text, integer) RETURNS text AS 'SELECT SUBSTR($1,$2);' LANGUAGE SQL IMMUTABLE; It got compiled fine. Now when I am invoking it as under select LEFT(',a,b,c',2) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: mouseover not working in ie6 I am using below code to call a div on hover,it is working fine on ie7+,ff and chrome, but not in ie6. <div class="business-bottom-content" onMouseOver="javascript:this.className='business-bottom-content-hover';" onMouseOut="javascript:this.className='business-bottom-content'"> A: I'm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Viewing typedef replacement Can anyone tell me, how can I see the typedef replacement string. Actually we could see the preprocessor replacement using cc -E filename.c . So like that I want to see the typedef replacement. A: This (and also the -E) depends on the compiler you are using. That said, I doubt this is p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Resque with Redis To Go can't work as expectation I need to use Resque to enqueue my jobs on Heroku. As it's my first time to use it, I follow the instruction on this site:Resque with Redis To Go. When I run the command: $ rake resque:work QUEUE=* the terminal shows: rake aborted! Please install the yajl-ruby or jso...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to output warnings to the console during a build in Xcode? How do I output custom warnings to the console in Xcode? I want to do this to remind myself that I'm in a particular build mode. I tried #warning "Hello World" but I don't see it in the console. Any suggestions? Edit: I don't want to use NSLog because I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CSS Border redundancy removal I often find myself into this: .class { border-top:1px dashed #0000000; border-bottom:1px dashed #0000000; } Is there a way to one-line that? I tried this but doenst' work: .class { border:1px 0 dashed #0000000; } A: No but you could make it simpler to maintain by using: .my...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to pass template arguments to a function on an object when the object type is a template argument? To illustrate: struct MyFunc { template <size_t N> void doIt() { cout << N << endl; } }; template <typename Func> struct Pass123ToTemplateFunc { static void pass(Func f) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is c lib a static in c++ program? I have a c lib, algo.lib, which I need to call in my c++ program. I realise that the variables in algo.lib is static, which creates problem for my c++ program, when I call algo.lib multiple times, or use threads to call algo.lib concurrently. For example, in algo.lib, there is a int...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Custom list adapter for ListView or ListFragments How can we define Custom ListAdapter(like ArrayAdapter or IconicAdapter) for ListView in activity? How can we do the same for ListFragments? any example or links will be appreciated.Thanks. A: A ListFragment holds a ListView, so there is really no difference. You ju...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Restoring an extracted sub-matrix after necessary modification into the original matrix from which it is extracted using Matlab I have a huge 2D matrix. After extracting as many as possible sub-matrices of size 8*8 from this 2D matrix, i made certain necessary modifications in the sub-matrices. Now i want to re-cons...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: What was the anticipated use of the reserved parameter on CoInitialize Its been about 16 years now since it was created and I still don't know why there was a reserved parameter in the CoInitialize method. Does anyone know (or is able to make an intelligent guess about) why this parameter was added and what the anti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Android NDK - connect() blocks system I'm facing a wierd problem something can not explain ;) now i'm developing client program working on the android phone. this app connects remote server and does something. core library which's made in C++ (NDK) and Android UI works fine when using WIFI mode but system freezes wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multiples threads in FTP download: give each its own connection Vs. have them share one connection In an application that downloads several files from an FTP server, it uses threads, ie. 5, to do its deed, and each one has its own connection (Apache Commons FTPClient.connect(url)). Will it be the same if the connec...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Calculating and correcting bit errors using Hidden Markov Model in C++ I am a student and new to C++. It would be great if somebody could help me write a program. Here is what it is suppose to do; 1- generates a Pseudo Random Bit Sequence (PN9 or PN15) 9 or 15 bit length. 2- saves the bit sequence from step 1 into ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ignored retain property in Class method i've a Class method like this: +(CCScene *) sceneWithMovie:(NSString*)movieName level:(NSString*)levelName hudLevel:(NSString*)hudName { bbsScene* scene = (bbsScene*)[super sceneWithMovie:movieName level:levelName]; ScenePage* hudLayer = (ScenePage*)scene.layer; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I load data conditionally using sqlldr in oracle I have a txt file as follows. 1st machine_no,2nd emp_no, 3rd shift_type (1 for entry,3 for exit), 4th work_date, 4th is time. 001,0000000021,01,2011/06/21,06:50, 001,0000000026,01,2011/06/21,14:00, 001,0000000018,01,2011/06/21,07:00, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can i cast an Object in mobiaccess? I am playing around with mobiaccess framework, but i am stuck when i try to cast an Object to Integer. Is it possible to cast in mobiaccess? I tried to below code but it does not work: var i:Integer = (Integer) objectClass; A: You can use the square bracket "[]" like this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: App that stays in front of other apps I need to write an app for testing purposes, which shall stay in foreground regardless which other application is currently activated. That means i need to allocate a small area of the screen that shall be usable for my app. Does somebody know a way how to achieve this? A: Soun...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how do i call function of other's open source propriotery project in my project in C Suppose you have a software written in C say XYZ. The software XYZ is an open source proprietary software. So I can have the source of the software. I can use the software but I can not modify XYZ's files. Suppose I am writing my...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: java XPath api reference The java standard tutorial http://download.oracle.com/javase/tutorial/jaxp/xslt/xpath.html explains the XPath standard itself but not the java api for XPath. I need: 1) I know XPath syntax, that is how to reference /person/dateofbirth element. What is the java api to select this node and get...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: HTML source indentation for ckeditor When you add some code to a ckeditor in HTML view and then change to WYSIWYG view and come back, almost all HTML tags have been modified and have loose the indentation. Is there any way to prevent this behaviour? (parameter, plugin, hard code...) For example: <div class="former i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Silverlight Binding To A User Control Within A DataTemplate In Silverlight, I have a DataTemplate which is bound to an object which contains a property which holds a UserControl. Within the DataTemplate, I want to bind to the property which holds the UserControl so that the UserControl is displayed as part of the Da...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JOOMLA : template overrides for plugin i'm doing a gallery plugin for joomla, someone told me to use template overrides, i really don't know what the hell is this, and why i need to use it for my gallery plugin? i did googling and found this article useful Joomla template override , but still i am not able understan...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Windows Phone7 How to Play 3gp video? I am using this code, String video="http://bitcast-in.bitgravity.com/divum/espn/j2me/260811_Nojo-does-a-Maria.3gp"; mediaplayer.Source = new Uri(video); mediaplayer.Play(); In layout: <MediaElement x:Name="mediaplayer"/> video is not streaming.Please anyone help me. A: htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Packaging a jre with my application My application contains an c++ exe file which invokes a java program using JNI, thus requiring jvm.dll. However, I want my application to ship with its own embedded jre but after I copy the jre6 folder found in JAVA_HOME and added it to my installer, it fails to run the program(Er...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Parsing String to JsonObject using GSON gives IllegalStateException: This is not a JSON Object I have the following code: JsonParser parser = new JsonParser(); System.out.println("gson.toJson: " + gson.toJson(roomList)); JsonObject json2 = parser.parse("{\"b\":\"c\"}").getAsJsonObject(); System.out.println("json2:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: OpenVAS fails to respond with more than 8192 bytes I'm requesting a HTML report from an OpenVAS server the following way: <?xml version="1.0" encoding="utf-8"?> <commands><authenticate><credentials><username>***</username><password>***</password></credentials></authenticate><get_reports report_id="454a3397-b8a4-408e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Merge multiple checkbox value in one list in a GET url In our web application (django based, with solr backend) we have some checkboxes with multiple choices allowed. Problem is my url is getting longer (we're using GET method) Something like ?what=&where=&within=any&rooms=any&rooms=any&baths=any&baths=any&sqrft=&sq...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The same Makefile succeeded in Ubuntu 10.04 LTS but failed in Angstrom on Beagle Board I tried to compile chardev.c from this tutorial using the following Makefile: obj-m := chardev.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default : $(MAKE) -C $(KDIR) M=$(PWD) modules I got th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java read unsigned int, store, and write it back I need to read an unsigned int from a quicktime file, and write it back to another quicktime file. Currently I read the unsigned int into a Long but while writing it back I never managed to write the exact number back in 4 bytes as unsigned int. The long has the corr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Data is Null. This method or property cannot be called on Null values if (!string.IsNullOrEmpty(rd.GetString(2))) { StrBcc = rd.GetString(2); } Error: System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values. A: If your values can be NULL then using...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to quantize image color from RGB 24 bit to RGB 6 bit (64 colors)? I'm trying to deploy BIC algorithm (border/interior pixel classify) and using PIL (python imaging library) to process image . But i don't know how to quantize RGB color from 24bit (8bit per color) to 6 bit (2bit per color) by using PIL . Anyone ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP - Dealing with POST and header include Say I have a form where the user can sign in, and when the user fills out the form it posts back to the same page, checks for errors with the username and password, and logs the suer in if all is swell. At the moment I'm doing this by loading the form under this condition: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: One dropdownlist depending on the other I develop a php web page that contains two dropdownlists (select tags) as one of them used to display the car types like Toyota, Nissan, Chevrolet and so on. Toyota Nissan Chevrolet The other should be used to display the car models like Toyota Camry, Toyota Corrolla, Toyota ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I insert a variable containing a backslash in sed? Please see these simple commands: $ echo $tmp UY\U[_ $ echo "a" | sed "s|a|${tmp}|g" UY[_ The \U is eaten. Other backslashes won't survive either. How can I make the above command work as expected? A: If it's only backslash that is "eaten" by sed and escap...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JQuery resizable snap to other resizable objects' borders? I wonder why they didn't develope JQuery resizable with option to snap the resizing object to others (instead of snapping to grid) like draggable ? Does anyone know such a plugin to achieve this ? Thanks. A: Think this should do the trick: https://github.co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Proving language properties I am taking a course on the formal foundations of programming, one of things we have covered is proving certain properties of languages, i have done most of the work, but I am stuck on these two questions, as I have no idea how to prove them. they are as follows: A ^ (B ^ C) = (A ^ B) ^ C...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Do I need to re-retrieve data when paging using asp:GridView I have a .aspx search screen that displays the results of the search in an asp:GridView component. There can be up to approx 1000 records returned by the search. I want to implememt paging on the grid so that only 15 records are displayed at any one time a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Perl trapping Ctrl-C (sigint) in bash I'm reading How do we capture CTRL ^ C - Perl Monks, but I cannot seem to get the right info to help with my problem. The thing is - I have an infinite loop, and 'multiline' printout to terminal (I'm aware I'll be told to use ncurses instead - but for short scripts, I'm more com...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Oracle - count() in same line i'm new user here, and i think that this is amazing!!! I need a little help: i do this, but don't work like i want! (count(countOfCat) is no Good!) select count(countOfCat) as "Cat", count(countOfDog) as "dog", count(countOfHorse) as "horse", 0 as "duck", 0 as "Mouse" from animal where...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Explanation of this LINQ expression I would be grateful if someone could explain this following LINQ expression: Endpoint adapter = (from adap in this where (endpointName == DEFAULT_ENDPOINT_NAME && adap.IsDefault) || (endpointName != DEFAULT_ENDPOI...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Immediately starting new UIViewController from a viewcontroller When the UIViewController starts, I want to start another UIViewController immediately. This doesn't work: -(void) awakeFromNib { UIViewController *newcontroller = [[[UIViewController alloc] init] autorelease]; ... [self presentModalViewCont...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problem with aspnet_regsql.exe i wrote a website with asp.net 4 and sql server 2008. But my host sql version is 2005 so i get script from my database in sqlserver 2008 and convert it to 2005. Then i import .sql file that is exported from 2008 iin sqlserver 2005 and retrieve it. Then i make a back up with sqlserver...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: HOw to access the hidden value set in cshtml from controller? Can i have something like this in my cshtml @Html.hiddenfor(model => model.name , "passname") In controller : i want to access this modal.name which will be having the value i set i.e "passname" A: 2 ways: 1 - your model has to have this property that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how can i hide a title in a Ext.formPanel how can i hide in runtime the title of panel?? this is my code: { xtype: 'panel', id: 'pnlAllCenter', border: false, layout: { align: 'stretch', type: 'vbox' }, title: '<center>Main Application</center>' } now in runtime i need to hide this title! (i ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: One-to-one mapping confusion Why is it that a lot of people are referring to One-to-One when I am sure they are referring to Many-to-one? For instance, if you have two tables; Inventory (InventoryID) Item (ItemID, InventoryFK) There is no one-to-one mapping here as far as I can tell. It's "Many items to one inv...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Disable AutoSelect in AutoCompleteBox in WP7? Is there any way to disable the AutoSelect in the AutoCompleteBox in WP7? What happens now is that each time when I write something and it is listed in the search suggestions, the logic runs. This is not what I want, because the user would only like to do the actual sear...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there any program like LINQPad for Java? (Not a duplicate!) Possible Duplicate: Is there any program like LINQPad for Java? My question is similar to Is there any program like LINQPad for Java?, but not the same. Like the author of the original question, I am not interested in the database quering capabilities...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ProducerConsumer problem I am trying to translate the scenario below using threads. procA { while (TRUE) { update(x); retrieve(y); } } procB { while (TRUE) { retrieve(x); update(y); } } Have written the code for this which I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to find coordinates of an element relative to browser window I want coordinates of an element relative to the browser window. So if an element is at top-left corner of browser can I get it's coordinates as x=0, y=0. How to achieve this ? A: I think you could use this script or use jquery offset()
{ "language": "en", "url": "https://stackoverflow.com/questions/7512340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Moving/Dressing mesh in 3D engine (iPhone) I'm new in 3D games developing so I have kinda dummy question - how to move a mesh in 3D engine (under moving I mean a walking animation). And how to dress some skin on it? What I have: * *open source 3D OpenGL engine - NinevehGL http://nineveh.gl/. It's super easy to l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Javascript: Height reduces on multiple clicks ? tried animating a dropdown,worked.But,the height of the element reduces if i keep clicking on it -- finally becomes 0px !!.. not sure why this is happening. HeightChangePersist -- funciton to increase the height(via steps -- works fine) when you click on click here!!,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to write a UT for a Runnable java class which has an infinite loop in run()? I have a java class like below. Its job is monitor a file, if that file's size does not change at certain interval, it will raise alert. I'd like to write two UTs for it. 1.Simulates the file size keeps unchanges. 2.Simulate file size...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why doesn't my JFrame show up? I'm trying to make a solved sudoku puzzle show up in a window with 81 boxes. I did this: import java.awt.GridLayout; import java.awt.*; import javax.swing.JFrame; import javax.swing.JLabel; public class GraphicSolver extends JFrame { GraphicSolver(int[][] spelplan) { Panel pan...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Add View to a Fragment Dynamically in Android? Is it possible to add a View to a Fragment dynamically? If it is, how can i do that? A: Is it possible to add a View to a Fragment dynamically? Yes. If it is, how can i do that? The same way you would add a View anywhere else: call addView() on the View's parent co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can DBIx::Class be used with stored procedures instead of tables? The access to read from the db has been given to me via mssql stored procedures that return result sets rather than tables or views. But I want to be able to read the data using ORM. I tried to use DBIx::Class::ResultSource::View to do the procedure c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to stop the timer function after the object has been shot? I am making a simple target shooting game.I have a countdownTimer inside the label and an object that blinks in a random position inside the panel. Every time I click on the object,. the object's timer stops which makes that object stop too, but the coun...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: accessing operator overloading of class which is wrapped by std::shared_ptr the idea is that I want a class which is wrapped by std::shared_ptr, can still be used just like they weren't a pointer, for example the operator= which was defined in my class can still be used after my class is wrapped by std::shared_ptr. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Album name gets corrupted when characters are Japanese Please let me know the maximum number of "Album Name". Now I'm developing Photo Upload app with Graph API. When creating an album, the album name gets corrupted if the number of Japanese characters exceeds 21. Below is the example of this issue. e.g. Input: あいう...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: mysql limiting join I've done a few searches on this subject but non of the solutions seem to work so perhaps my requirement is slightly different. Basically I have a "content" table and a "file_screenshots" table. Each row in the "file_screenshots" table has a "screenshot_content_id" column. I want to select from t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regex (?:[,\\. ]*(&|and) ?) is not matching ', and " Regex (?:[,\\. ]*(&|and) ?) is not matching ", and ". But when i change the matcher to (?:[,\\.] ?(&|and) ?) the pattern ", and " is getting matched. What is causing pblm? When i remove the space from [,\\. ]* it seems working. I simply dnt understand. A: I can f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: facet dynamic fields with apache solr I have defined dynamic field in ApacheSolr: I use it to store products features like: color_feature, diameter_feature, material_feature and so on. Number of those fields are not constant becouse products are changing. Is it possible to get facet result for all those dynamic fie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7512392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }