Vote count: 0 I'm trying to instantiate an EntityManager using a JTA Datasource, but I always get NullPointerException. Here's my environment: Server : JBossAS 7.0 JPA : 2.0 DB : MySQL persistence.xml org.hibeate.ejb.HibeatePersistence stockmanagementDS prv.stockmanagement.business.Product On a dao class I'm trying this : @PersistenceContext(type=PersistenceContextType.EXTENDED, unitName="WebStock") private EntityManager em; but when I use its getter, I get NullPointerException here : public EntityManager getEntityManager() { retu em; } the debug shows it's null. Here's the datasource definition in the standalone.xml : jdbc:mysql://localhost:3306/kitchen_stock mysql root rootroot 100 Any hin...
ادامه مطلبVote count: 0 Sell Activity ** I am creating a BookStore Automation app and in sell activity as shown in the picture I am using expandable list view . The group header is name of category of book which I have populated using array list . And I want to populate child of each group with data fetched from sqlite database (i.e name of any book under that category ) . I am new to android development ,plz tell me how should I proceed ? ** asked 2 mins agorishabh maurya This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 How can CppSQlite3U be used to execute queries in a similar way to sqlite3_exec(). The purpose of my question is to use CppSQLite3U in one hand but to take advantage of the callback mechanism sqlite3.exec() has? sqlite3_exec is a function which is part of sqlite3. The sqlite3_exec() interface is a convenience wrapper around [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], that allows an application to run multiple statements of SQL without having to use a lot of C code. CppSQLite3U is a C++ unicode wrapper around the SQLite3 embedded database library and is based on this CodeProject article [^] asked 1 min agoMichael Haephrati This entry passed through the Fu...
ادامه مطلبVote count: 0 I'm getting a problem. I can't update ListView when using android emulator, but on real device it works fine. Here is a code of my ListActivity subclass. public class FileTree extends ListActivity { private File m_lst[] = null; private String m_path = "/"; private ArrayAdapter m_adapter = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_file_tree); m_adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1); setListAdapter(m_adapter); listFiles("/"); } protected void onListItemClick (ListView l, View v, int position, long id) { Log.v("click", String.valueOf(position)); position-...
ادامه مطلبVote count: 0 I am using DOMPDF to create a pdf out of my html page. I need to use a specific template for the pdf to be rendered on. is there a way with DOMPDF to use a pdf template for dynamically creating an invoice? What is the best way to handle this? Would I need to create the template with html and css? If it's worth mentioning, I am using Zend2 and installed DOMPDF with composer asked 2 mins agowuno This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I want to know if there is a way to generates routes using ng-repeat and ui router? for example: I get a data to show a list of 5 clickable items something like item 1 item 2 item 3 item 4 item 5 And if I click for example in item 2 I want to get all data from item 2 to change it in the principal view and at the same time change the route with something like url/item2. To be more specific, i'm building this website and I'm using ui-router, I want to know how can I click a singer in the left side and after do that, it has to change the data in the music player and build a url with something like url/singer-name I hope you understand me, I will create a lot of singers in the left...
ادامه مطلبVote count: 0 Suppose i have an array looklike this var users = [ { 'users': [{user:'harry',user:'potter',user:'jiy',user:'weasly'}], 'age': 36, 'active': true }, { 'users': [{user:'brad',user:'pit',user:'angelena',user:'joly'}], 'age': 40, 'active': false } ]; From this i want to select json with condition users object match multiple values eg: if the names are harry and angelena the output becomes this { 'users': [{user:'harry',user:'potter',user:'jiy',user:'weasly'}], 'age': 36, 'active': true }, { 'users': [{user:'brad',user:'pit',user:'angelena',user:'joly'}], 'age': 40, 'active': false } Eg: if the name is harry output becomes this { 'users': [{user:'harry',user:'potter',user:'jiy',use...
ادامه مطلبVote count: 0 I'm trying to compare two properties inside of a test case in Soap UI. Here's the scenario. I have two properties (A and B) in a "Properties" step that get values set by property transfer after an API call. I want to compare these two properties to make sure that they do not equal each other. How would I go about doing that? asked 2 mins agoom3rta This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I'm having an issue trying to autoplay my UIWebView. Yes, I know there are tons of questions regarding it already. Fist off, here's my simple code: override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let youtubePlayer:UIWebView = UIWebView(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height)) youtubePlayer.loadRequest(NSURLRequest(URL: NSURL(string: "https://www.youtube.com/embed/EzNinU0g-Q0")!) ) self.view.addSubview(youtubePlayer) } Now here's what I found: How to autoplay a YouTube video in a UIWebView Youtube video autoplay inside UIWebview How to get YouTube a...
ادامه مطلبVote count: 0 Subject: MyBatis: Boolean Paraeter: MyBatis is using Getter Content: Hello everyone, I have been searching for a while for a solution to my nearly-simple MyBatis problem: Given code (only the necessary parts): mybatis-config.xml: NavigationDAO.xml:...
ادامه مطلبVote count: 0 I have written the following (very simple) ring buffer class, which should allow array access via the @:arrayAccess macro: class RingBuffer { private var _elements : Array = null; public function new(p_numElements : Int, p_defaultValue : T) { _elements = new Array(); for (i in 0 ... p_numElements) { _elements.push(p_defaultValue); } } public function add(p_value : T) : Void { // Remove the first element _elements.splice(0, 1); _elements.push(p_value); } @:arrayAccess public inline function get(p_index : Int) { retu _elements[p_index]; } @:arrayAccess public inline function set(p_index : Int, p_value : T) { _elements[p_index] = p_value; retu p_value; } } But when I try to use ar...
ادامه مطلبVote count: 0 I am developing SpriteKit universal iOS application that will contain many spritekit images. I was wondering if there are better methods for working with large amount of data images in iOS apps from what's available as default from Apple (i.e. texture atlases or image assets). Some resources point out that working with a database, like SQL, to save and load images data to/from a disk, improves the overall app performance in terms of memory resources. What is the really best way to manage images content in the iOS application? asked 1 min agosaate_group This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, ple...
ادامه مطلبVote count: 0 I'm trying to access the next line using fgets in order to count the number of lines that are similar to the next one, is there anyway to get the NEXTLINE variable? similar = 0; char line[100] FILE *f = fopen(file, "r"); while (fgets(line, 100, f)) { if (strcmp(NEXTLINE, line) == '0') { similar++; } asked 3 mins agoAndrew Raleigh This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I create a datepicker and ask to launch an alert on change : $("#datepicker").kendoDatePicker({ change: function() { var value = this.value(); alert(value); //value is the selected date in the datepicker } }); No problem with this, it's working. Now I try to make a function that take the value of the datepicker, and display it on an alert : function Test(){ var toto = $("#datepicker").data("kendoDatePicker"); var value = toto.value(); alert(value); } And modify the the datepicker like this : $("#datepicker").kendoDatePicker({ change: Test() }); And it's not working anymore. The "Test" method is launched without changes on the datepicker, and the datepicker now look like this : ...
ادامه مطلبVote count: -1 I want get data from a website and capture a part content of website. Example: capture box menu of website. enter image description here example asked 3 mins agoHiếu Lương Công 1 Answer Vote count: 0 You might want to use a DOM-parser of sorts (For example) to read the entire structure of the website. Be aware this is a very heavy process! answered 22 secs agoFyntasia This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I have a table which stores the exchange rates of currencies on a given day (TBAADM.EXC). However the exchange rates are manually entered, and the erroneous rate entered previously has to be archived, so the table can end up having multiple entries of a given from-to exchange rate per day because of user error or because the exchange rate has changed during the day. To do this, I have a column in the table called UPDATE_NO which indicates that a given entry is the nth entry for the day. For example, the first exchange rate entry for the day will have an UPDATE_NO value of 001. If the exchange rate has changed or was entered incorrectly, the next entry will have a value of 002, ...
ادامه مطلبVote count: 0 I would like to have palceholder in my xml file which places the value from a properties file. The SystemProperty.xml file is just a global system configuration file, not any kind of spring configuration, which looks like that CommandTimeout 60 Setting the timeout(in seconds) Address ${server.IP} ip:port It is using by XMLConfiguration bean to loading in SystemProperty.xml However, the ${server.IP} placeholder doesn't work any. In the other hand, for spring configuration xml, I can do that. For example, I have a Scheduler.xml which is Quartz configuration xml as below. PostgreSQLQuartzDataSource org.postgresql.Driver jdbc:postgresql://${scheduler.db.host}:${scheduler.db.port}/$...
ادامه مطلبVote count: 0 I am trying to insert data into mysql 5.6 db, trying to follow soci doc's example3. Following code move's portions of record_data vector to record_data_temp and inserts them into db std::vector record_data_temp; soci::statement st = (sql_imei.prepare...
ادامه مطلبVote count: 0 I need to do an animation repeat section with a box explode and ten numbers of text comes out from the box. Can anybody please give a website link which shows a demo animation or a animation view as a need..? I need in css or svg animation. Thanks in Advance..... asked 1 min agoArunValaven This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers....
ادامه مطلبVote count: 0 I am trying to edit hosts file. But it gives error "sudo: no tty present and no askpass program specified". I have tried but its not working. Please help if anyone know. Thank You. NSMutableString* pfConf = [NSMutableString stringWithContentsOfFile: @"/private/etc/pf.conf" encoding: NSUTF8StringEncoding error: nil]; if ([pfConf rangeOfString: @"/private/etc/pf.anchors/org.eyebeam"].location == NSNotFound) { [pfConf appendString: @"n" "anchor "org.eyebeam"n" "load anchor "org.eyebeam" from "/private/etc/pf.anchors/org.eyebeam"n"]; } [pfConf writeToFile: @"/private/etc/pf.conf" atomically: true encoding: NSUTF8StringEncoding error: nil]; asked 2 mins agoNikhil Pande This entry pa...
ادامه مطلب