Failed to enable constraints when filling datatable

:I am loading a data table from an XSD data set in C# in MSVS 2012. The standard GetData() method runs properly. However, my custom query GetDataCustom(), which returns only a few fields from the data set, throws the popular exception: Failed to enable

Code for checking Internet connection is not working properly

:I am developing an app in which I need to check if an internet connection is available or not. The code I have written seems to handle all cases but it is not working in my emulator. My code:public boolean hasConnection() { ConnectivityManager cm

search for text in excel file c#

:I'm writing a windows application with c# and in one form I want to use a n excel file in this way.In the form when the user types the Employee ID in a text box I wanna search the excel file and based on the ID show other information for the employee in

win32 api edit control can't be selected or edited

:I created an edit control using win32 api like this: CreateWindow("edit", "", WS_CHILD | WS_VISIBLE, 0, m_position, CONTROLS_WIDTH, EDITBOX_HEIGHT, m_editorWindow, (HMENU)GetNextComponentID(), m_instance, NULL)I can change the text from it usin

Getting wrong PDF page on 64-bit iOS device only

:I have an iOS app that only has a problem on 64 devices. The function where the problem is, is here:- (NSMutableData *)getPage:(NSInteger)pageNumber{ NSLog(@"%ld",(long)pageNumber); CGPDFDocumentRef SourcePDFDocument = CGPDFDocumentCreateWithURL(

Getting the ping results using java

:I'm trying to get the last line of the ping result.I'm not a java developer. I'm learning so please bear my mistakes.This is the program I have written.private static String pingTest(String ip) { // TODO Auto-generated method stub String pingRes

Mixing text and images causes incorrect vertical positioning

:Using iTextSharp version 5.5.8 (same bug existed in 5.5.7), there's an unpleasant bug when you add images to Chapters and Sections - the images and the section headings start out OK but quickly become offset relative to each other.The PDF generated from

Method duplicates output

:Pretty new to sling and Java so I apologize in advance. But does anybody have any idea why when I'm at the root it's outputtingmy path twice? It's odd that it only happens at the absolute root. public static String generateTest(Page page, Page rootPa

SQLiteDatabase error “sqlite: (1) near ”)“: syntax error”

:sqlite: (1) near ")": syntax errorI don't understand, I thought (and still do) that I put every space (and ect.) neededmaybe someone could help me?thanks for your timepublic class DatabaseHandler extends SQLiteOpenHelper { private static final int

C# application not running on startup

:I can't for the life of me figure this one out. I have created a fairly large C# application that basically runs a bunch of separate components and reboots the machine periodically. The idea of this application is basically to automate a process that we

Using Hibernate Ejb3Configuration with Container Management

:Is there a way to use programmatic configuration provided by Ejb3Configuration with container managed entity management? I would like to dynamically add (additional) annotated classes that were discovered via ServiceLoader after the persistence.xml is p

How to find a specific value after a specific word in Java?

:I got a text from a BufferedReader and I need to get a specific value in a specific string.This is the text: aimtolerance = 1024; model = Araarrow; name = Bow and Arrows; range = 450; reloadtime = 3; soundhitclass = arrow; type = Bal

How to read integers and date in binary file

:I have a binary file of records. Each record is of the following format:Each record consists of two integers, number of vehicles and number of persons involved; a floating point number, severity code; and a string which contains the date of the accident.

checkout when you close the tab

:In my application with Java EE and JSF 2.0 I would like that when the user closes the tab of the application the session ends. If this user has opened another tab in the application then the session of this other tab should not be closed. This so to not

Encoding Special Characters in String

:I have a String with some special characters like this one."45” £800 77” " - > might also have some other special charsNote that above string its not double quotes.I want to display the String as it is, but for some reason its not processing and i am n

Java byteArray[] to docx

:doc file in byte[] type. Is it possible to convert it from byte[] into .docx file.tried just change file extension programilly but it does not work.any suggestions?I generate report using BiRT eclipsecode of saving doc:options = new RenderOptionBase();By

Mvc List Strongly type View DropDownListFor not showing current value

:I have following dropdownlistfor control@Html.DropDownListFor(m => item.RelationShipId, new SelectList(ViewBag.RelationShip,"Id", "Title"), new { @id = "ddl_" + @item.UserID, @class = "form-control", onchange = "update(this,'" + @item.UserID +

Draggable marker in map

:I'm an example map shows the current location with the click of a button shows lat,long , But I need a little change on the map Changes :1 - marker on the map after click button be draggable to get new lat long and show address , in fact marker be fixe

Error: Firebase.update failed: First argument contains NaN in property

:I am making a web app that allows the user to grow a tree. When the user fertilizes the tree, the attribute "fertilizer" should increment. However, the app keeps giving me the error because it has decided that "fertilizer" is undefined.The update sco

rename() only works for directory that program is running in?

:I am trying to rename a bunch of files in a user specified directory, but it only seems to be working when the user specifies the directory that the program is running from. For example, when running from the command line:./a.out . "NewName.txt" will w

Android MediaRecorder to AudioTrack, Recording and Playback

:I'm trying to make it to where I can record the users voice and play it back in the same activity using the MediaRecorder and AudioTrack. I just don't understand how to write the file to AudioTrack. I've read the documents on both and simply can't f

NHibernate inner join master-detail on a column other than the id

:Assume the following mapping entries:  5173    1 2 3 4 5 6 7 8 9 10 Next Last