Vote count: 0 I have this code in my app: private static List loadInfo(String query) throws SQLException { CallableStatement cs = null; ResultSet rs = null; Coection co = null; List list = new ArrayList(); try { co = getCoection(); cs = co.prepareCall(query, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); SQLServerStatement stmt = cs.unwrap(com.microsoft.sqlserver.jdbc.SQLServerStatement.class); stmt.setResponseBuffering("adaptive"); rs = cs.executeQuery(); while (rs.next()) { Info info = new Info(); info.setCode(rs.getString(CODE)); info.setId(rs.getLong(ID)); info.setLevel(rs.getShort(TYPE)); info.setName(rs.getString(NAME)); info.setShortName(fixString(rs.getString(SHORT_NAME)))...
ادامه مطلبVote count: 0 I am wanting to use Google Adsense with an Ember site I'm working on. However, if I just copy the code block I get from Google I get this error: Error: `SCRIPT` tags are not allowed in HTMLBars templates (on line 3) After doing some searching, it seems some people has the same issue, but I have not found a solution for this. Does anybody have any ideas? asked 3 mins agoCaleb Sayre Let's block ads! بخوانید...
ادامه مطلبVote count: 0 The text in my TextBlock is bound to an element in my code. However, when I first open my window, the Textblock is completely empty. As I add text, I need the ScrollViewer to allow me to scroll down the text, or automatically scroll down as more text is added. Using the MVVM, so no code behind would be ideal. Output How can I make this happen? Is there a way to update the ScrollViewer so that it sees more text is beyond what I can see in the TextBlock and allows the user to scroll down, or allows me to set an autoscroll feature that scrolls down automatically as text is added via binding? Thanks in advance! asked 1 min agoThrashdaddy Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm trying to change the layout of the error page that appears when I try to access a blocked file type in SharePoint. I thought that it was the same was the error page. I've changed that layout but still got the SharePoint layout everytime I access a blocked file. Anyone knows how can I change that layout? asked 1 min agobmccruz Let's block ads! بخوانید...
ادامه مطلبVote count: 0 HTML text testing testing testing testing testing testing testing testingtesting. CSS .nextdiv{display: none;} JQUERY $( ".onediv a" ).hover(function() { $('.nextdiv').css({'display' : 'block'}); }); $( ".onediv a" ).mouseleave(function() { $('.nextdiv').css({'display':'none'}); }); When I hover to text then .nextdiv will display. Now I want to apply transition when that .nextdiv will display. thankyou in advance. asked 2 mins agoMukun Bhatta Let's block ads! بخوانید...
ادامه مطلبVote count: -1 I have a web application, where when a user logs in, he/she is able to find a series of alert messages. So, on page load event, i want to blochk all alert pop-ups. Pls find attached the screenshot... edited 40 secs agomplungjan asked 4 mins agosushruth r Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm using the following code to modify the form answer: $('QR~QID24~1').insert({after: ' out of'}); $('QR~QID24~2').style.position = "relative"; $('QR~QID24~2').style.left = "100px"; $('QR~QID24~2').style.bottom = "34.5px"; This doesn't work anymore because when the block is looped the question is repeated five times, with the following names: QR~1_QID24~1 QR~2_QID24~1 QR~3_QID24~1 QR~4_QID24~1 QR~5_QID24~1 I tried to repeat the code with every name: $('QR~1_QID24~1').insert({after: ' out of'}); $('QR~1_QID24~2').style.position = "relative"; $('QR~1_QID24~2').style.left = "100px"; $('QR~1_QID24~2').style.bottom = "34.5px"; $('QR~2_QID24~1').insert({after: ' out of'}); $('QR~2_Q...
ادامه مطلبVote count: 0 We are currently facing an issue with hibeate unit testing. Using Hibeate + JPA + Spring + junit + Maven + below is the persistence configuration: Spring JPA LocalContainerEntityManagerFactoryBean org.hibeate.ejb.HibeatePersistence One of the developers created an unit-test and hibeate simply blocks at one insert statement. No errors, no logs, except the following in console: Hibeate: insert into role (details, name) values (?, ?) Hibeate: insert into permission (details, name, state) values (?, ?, ?) Hibeate: insert into role_permission (permission_id, role_id) values (?, ?) Blocks at the last one. On the author's machine (the one who created the unit test) all is well and wor...
ادامه مطلبVote count: -3 The query is $q1 = "SELECT * from `event` ORDER BY `upload_date` DESC"; This is the function function display_content($r, $dis){ foreach($r as $part) { $dis .= ''; $dis .= ' '.$part['name'].''; $dis .= 'From: '.$part['start_date'].' '; $dis .= 'Until: '.$part['end_date'].' '; $dis .= 'Link: Event Website'; $dis .= 'Venue: '.$part['venue'].' '; $a = array(854, 480); $b = array(300, 300); $str = $part['embed_code']; $partVideo = str_replace($a, $b, $str); $dis .= ' '.$partVideo.' '; $dis .= ''; $dis .= ' '.$part['details'].''; $dis .= 'Tweet!  '; $dis .= 'Share on Facebook!'; $dis .= ''; $dis .= ''; } echo $dis; } // close function display content Later on I call display...
ادامه مطلبVote count: 0 I need some design help with a database and how to process the data. I’m working on my first major project and extremely excited about it. All my knowledge about programming and database is self taught and I’m ruing into some roadblocks because I’m not sure what’s the best way to accomplish this. What I’m doing is I have a power meter (Neurio) for my house and I want to log the data into a MySQL database. The data refreshes every second and outputs in JSON and I’m able to write the data to the database using Python. I want to save the data every second for the first hour and after the first hour consolidate the data down to 5 seconds (to cut the size down for a reduce the data ...
ادامه مطلبVote count: 0 I am following a tutorial to use pymongo http://doc.scrapy.org/en/latest/topics/item-pipeline.html I put the code in my file and it reports expected an indented block at line 8. Caot figure out why. import pymongo class MongoPipeline(object): collection_name = "post" def __init__(self, mongo_uri, mongo_db): self.mongo_uri = mongo_uri self.mongo_db = mongo_db @classmethod def from_crawler(cls, crawler): retu cls( mongo_uri = crawler.settings.get('MONGO_URI'), mongo_db = crawler.settings.get('MONGO_DATABASE', 'items'), ) def open_spider(self, spider): self.client = pymongo.MongoClient(self.mongo_uri) self.db = self.client[self.mongo_db] def close_spider(self, spider): self.client...
ادامه مطلبVote count: 0 I am leaing htaccess. Is the following possible by using htaccess: 1) Block every visitor/IP to site. 2) Block all the bots except google bot. RewriteEngine On order deny,allow deny from all RewriteCond %{HTTP_USER_AGENT} (bingbot|Baiduspider) [NC] RewriteRule .* - [R=403,L] Is the above htaccess right? Any help would be appreciated. asked 55 secs agoChinmay Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I installed blockchain/service-my-wallet-v3 from github and start it $ blockchain-wallet-service start --port 3000 1460128138018 - info: blockchain.info wallet service v0.19.3 ruing on 127.0.0.1:3000 but its not listening 3000 port, this $ netstat -an | grep 3000 retu nothing, and coections to localhost:3000 retu "refused" $ telnet localhost 3000 Trying ::1... telnet: coect to address ::1: Coection refused Trying 127.0.0.1... telnet: coect to address 127.0.0.1: Coection refused What I do wrong? OS: CentOs 6.7 $ npm version { npm: '3.8.6', http_parser: '2.3', modules: '14',node: '0.12.0', openssl: '1.0.1l', uv: '1.0.2', v8: '3.28.73',zlib: '1.2.8' } asked 1 min agouser3449979 Le...
ادامه مطلبVote count: 0 I built a Google Cardboard app (or at least a Google Cardboard-compatible app with room for improvement) that works well on phones with 5-6" screens (iOS and Android) and a Google Cardboard viewer designed to work with those 5-6" screens. However, if viewing the app in a larger "phablet" screen, vision doubles and the app becomes useless for those devices. Since the app primarily runs in the phones' stock browsers Safari and Chrome, is there a way to scale down the app canvas/block element to stay within the 5-6" range on larger mobile devices? Here is a rough illustration of what I'm trying to accomplish: So far my search brings me to answers like this one, explaining that thi...
ادامه مطلبVote count: 0 I love the @Synchronized aotation that Groovy provides. It is a safer option than the 'synchronized' keyword for Java since it uses a local / private lock variable rather than the 'this' object. However in Groovy all rules can be broken. :) I also know there is Lombok, a Java library that provides the same feature. But is there a way to use an aotation within a method so that some of the method's code is not synchronized (for better performance) and other parts are (out of necessity)? While I was typing this question I may have come up with one solution to my own question: Extract method: create a new method, move the block of code that needs synchronization into that method. T...
ادامه مطلبVote count: 0 I have a SupportMapFragment and I am trying to draw a user drawn line, exactly like here, I am trying to use this questions accepted answer using Alteative Method #2, which seems to allow you to put the SupportMapFragment in a FrameLayout. However, I can't get it to work for me. It seems like the View of the MapFragment has requestDisallowInterceptTouchEvent() set to true, preventing me from consuming the touch events properly, but I can consume the touch events on the parts of the screen not containing the map fragment. All of the questions I've seen on here seem to do the opposite of what I want to do. Here's my xml code relevant to the map (root linearlayout contains other v...
ادامه مطلبVote count: 0 How to solve Eliminate render-blocking JavaScript and CSS in above-the-fold content issue ... Installed W3 cache plugin in wordpress. Got below error in CSS and Javascript(js) How to solve this issue? http://website.com/cache/minify/000000/M9bPKixNLarUMYYydHMz04sSS1L1cjPzdAz0fTPzEnMTq1LjA4ry9XMyk_SLk4syC0qK9QtyStMz84r1yxMrC_Iz80qQWBRo1S0uyUzOriTWBIhqqMv1IDxi9JVlpqTmO7nDNEK5AA.js http://website.com/cache/minify/000000/fYxRCsJADEQv1CX1III3KOk2dmPXzZKkQj29BSn0Y_VrhuG96eHKBZ_4puGmAuZbJvtGsCTqUSayrm9gzfFw667eJbP8oDJusrqBJy7LWoPynDwYTzSi_n1WsirF-EXdBR7kFeMC0ezop3XgEmGmQspxV9r1Aw.css asked 2 mins agosoftwaresolution Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm just leaing JavaScript and I've wondered why this has to be done this way. asked 1 min agoEyasu Felleke Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I wanted to create busy event at a specific time range. And I created it using Google Calendar API Event Reference. In the document it says there is transparency parameter for this usage. "opaque" - The event blocks time on the calendar. This is the default value. I gave this value for transparency parameter. But then I was able to create another event at this time. But I want to lock this time when an event created as busy so noone can take event at this time no longer. Am I using wrong parameter? If I am which parameter I should use? asked 2 mins agomelomg Let's block ads! بخوانید...
ادامه مطلبVote count: 0 In the following SSCCE, why does the catch block keep executing again and again, resulting in an infinite loop? When I run this program and was prompted to enter an integer, I entered a. What I thought would happen was that, an InputMismatchException would be thrown on the first line inside the try block, and from there, the control will go to the catch block, where it would print `` once, and then go the the next iteration of while(true) loop, in which it should have entered the try block again and should have prompted me to enter the integer. But it seems to have started an unending entering into the catch block as soon as it enters the while(true) loop, because if it was ent...
ادامه مطلب