Posts

Showing posts from July, 2010

avr external interrupt false trigger -

I was programming for external interrupts using the ATmega 128. I divided the outer interval between 0 and 1, which triggered the rising edge. Calculate the number of times the switch is pressed in between. But when the key is pressed once, the interval is called 2 or 3 times and therefore it means more. What's the problem here? My interrupt code is here ISR (INT1_vect) {cli (); ++ push_cntr1; Printf ("p1:% d", push_cntr1); Sei (); } ISR (INT0_vect) {cli (); ++ push_cntr0; Printf ("p0:% d", push_cntr0); Sei (); } Zero interrupt_init (zero) // enabled between 0 and 1 enabled. {EICRA | = (1 & lt; iSC01) | (0 & lt; ISC00). (1 & lt; ISC11) | (0 > ISC10); EIFR = 0x FF; EIMSC | = (1 & lt; INT1) | (1 & lt; & lt; INT0); DDRD = 0x00; } Int main (zero) // main program {dev_init (); While (1) {process (); } Return 0; } I need to clean and set up a little bit inside the handler is . It will be kept in mind by the compiler. For ma

Update magento cart programmatically on place order -

सहायता, विचार पहले से समाप्त हो गए हैं ... मेरे पास config.xml है: & lt; वैश्विक & gt; & LT; मॉडल & gt; & LT; ordernow & gt; & LT; वर्ग & gt; My_OrderNow_Model & lt; / वर्ग & gt; & Lt; / ordernow & gt; & Lt; / मॉडल & gt; & LT; घटनाओं & gt; & LT; cms_page_render & gt; & LT; पर्यवेक्षकों & gt; & LT; OrderNowCheckout & gt; & LT; प्रकार & gt; मॉडल & lt; / प्रकार & gt; & LT; वर्ग & gt; ordernow / पर्यवेक्षक & lt; / वर्ग & gt; & LT; विधि & gt; OrderNowCheckout & lt; / विधि & gt; & Lt; / OrderNowCheckout & gt; & Lt; / पर्यवेक्षकों & gt; & Lt; / cms_page_render & gt; & LT; sales_order_place_before & gt; & LT; पर्यवेक्षकों & gt; & LT; OrderNowChange & gt; & LT; प्रकार & gt; मॉडल & lt; / प्रकार & gt; & LT; वर्ग & gt; ordernow / पर्यवेक्षक & lt; / वर्ग & gt; & LT; विधि &

php - Include Twig Template with Vars as another twig template -

मेरे पास एक टहनी टेम्पलेट है base.html.twig & lt;; doctype html & gt; & lt; html lang = "en" & gt; & Lt; शीर्ष & gt; & lt; मेटा वर्णसेट = "यूटीएफ -8" & gt; & lt; शीर्षक & gt; पृष्ठ शीर्षक & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; {% Block content%} {% endblock%} & lt; / body & gt; & Lt; / html & gt; मेरे पास एक और टहनी टेम्पलेट है: content.html.twig & lt; div class = "row" & gt; {{सामग्री | कच्चे}} & lt; / div & gt; और दूसरा box.html.twig और और work.html.twig के रूप में जाता है {% extends 'base.html.twig'%} { % Block content%} {% endblock%} मैं कैसे box.html.twig को content.html.twig में प्राप्त कर सकता हूं और work.html.twig में अंतिम परिणाम मुझे पता है कि content.html.twig work.html.twig के भीतर मिल सकता है के रूप में {%} 'content.html.twig' के साथ {'सामग्री': 'नमूना स

ios - Hide StatusBar from Window for one view -

इस सवाल का पहले से ही एक उत्तर है: < / P> 5 जवाब मैं स्टेटस बार को हटाना चाहता हूं खिड़की से, और इसे फिर से जोड़ें। मेरा दृश्य नियंत्रक के दृश्य पदानुक्रम को देखने में नहीं है इसे सीधे विंडो में जोड़ा जाता है प्रश्न यह है कि जब यह दृश्य विंडो में प्रकट होता है, मैं खिड़की से स्टेटस बार छिपाना चाहता हूं, जब मैं यह दृश्य निकालता हूं, इसे फिर से दिखाता हूं। - (शून्य) छिपानाStatusBarFromWindow: (UIWindow *) विंडो {// .......} नोट: मैंने बहुत खोज की है, लेकिन मुझे केवल दृश्य देखने के लिए उत्तर मिला है जो दृश्य नियंत्रक के दृश्य पदानुक्रम से जोड़ा गया है। यह मेरा दृश्य किसी भी व्यू नियंत्रक से स्वतंत्र दिखाई देगा। इसका मतलब है, मैं किसी भी दृश्य नियंत्रक में कोई भी कोड नहीं लिख सकता था और श्रेणी दृश्य नियंत्रक नहीं कर सकता था। मैंने इसे करने की कोशिश की है, लेकिन आईओएस 7 (आईओएस 6 के लिए काम कर रहा है) .. [[UIApplication साझाअनुप्रयोग] setStatusBarHidden: हाँ]; निम्न कोड के साथ प्रयास करें: यदि आप कस्टम दृश्य ऐप लॉन्च के समय प्रदर्शित होते हैं तो यह कोड आ

java - Timeout for function -

How can I do this in Java? To be more preses I would like to end the time for my function. Pseudo-code: public string aLotOfWork () {hardwork (return)); If (hardwalk (still being executed after 30 seconds) return "timeout"; } I can use timer for this, but I can not return any value to the timer function run () from my upper function Timer task = new timer tasks () {public zero run () {return ""; // timer task run should be zero }}; Timer timer = new timer (); Timer Scheduler (work, 50000, 1); Check the class This is a code called "timecode" (timeout, time unit). Provides . Public string aLotOfWork () {Future Task Function = New Future Tasks & lt; String & gt; (New callable & lt) Load hardwork task to futuresksk class load ; String & gt; () {Public string call () {return hard ();}}); Try {Return task.get (30, time unit SECONDS); } Hold (timeout Exception e) {return "timeout"; } Hold (exception e) {retur

javascript - Issue in rewriting scripts to be vanilla js (not jQuery) -

I'm rewriting my Chrome extension in the vanilla code instead of jQuery, and for the most part it's been easy is. How ever have I come in a part that does not work for purpose. Basic jQuery-based code: $ (".file.flayer"). (Work () {// relevant code using "this"}}); New vanilla-only code: var flairs = document.querySelectorAll (".flare" content); For (var i = 0; i & lt; flairs.length; i ++) {flairs [i] .addEventListener ("click", function (event) {// indispensable code using flairs [i] }); } This issue with vanilla code is that each click on .content .flair element is always flairs (i.e. Flares [flairs.length - 1] instead of flairs [i] . . I can not squash this bug! Thank you for your time. The problem was with the closure. < See more with thanks for P> @ Arun-P-Johnny

sql server - SQL Select Statement Not working -

यह है जो मेरे पास है: एक व्यक्ति (अद्वितीय आईडी) < / Em> एक बिल (अद्वितीय बिल आईडी) उत्पन्न करता है यह Store_Bill_Item_Details तालिका में संग्रहीत किया जाता है यह है कि मैं क्या करना चाहते हैं। मैं Store_Bill_Item_Details सभी Bill_No व्यक्ति के स्वामित्व में। के लिए एक का चयन करें चलाने के एक बार मैं की एक सूची प्राप्त Bill_No ऊपर से, मैं इसे अपने मूल्यों के साथ सभी वस्तुओं की सूची के लिए recursively Store_Bill_Details में खोज करना चाहता हूं। तो मेरा क्वेरी परिणाम ऐसा दर्ज होना चाहिए बिल 1: बिल 1 का विवरण बिल 2: < / Strong> बिल 2 का विवरण यह वही है जो मेरे पास काम नहीं कर रहा है। उपयोग My_Database करें I.Bill_No, (का चयन करें * Store_Bill से I1 अंदरूनी पर ID.Bill_No = II.Bill_No Store_Bill_Details आईडी के रूप में शामिल) Store_Bill_Item_Details से बीडी अंदरूनी Store_Bill शामिल हों मैं के रूप में BD पर। Item_Code = I.Bill_No कृपया मेरी मदद करो, का चयन करें Store_Bill से * I1 अंदरूनी के रूप में आईडी पर ID.Bill_No S

dictionary - Create Ruby hash without `to_h` method -

I am trying to generate a key / value pair for all the letters of the English alphabet. In Ruby 2.1, I can use it: ('a' .. 'z'). Each_with_index.to_h # = & gt; {"A" = & gt; 0, "b" = & gt; 1, "c" = & gt; 2, ...} However, in Ruby 1.9.x, the to_h method does not exist. What is the best solution for this matter? Two Elements Array. Hush [('a' .. 'z'). Every_V_V_Nordac TOA]]

javascript - Add on scroll header effect / transition with position property -

I have a header in which position on loading: full to fix it on a particular scroll This is working .. .. But the problem is how do I use the header effect with the position: fixed property (i.e. Along with) code: css .iaw-header {status: absoulte} js: < / P> {If (jQuery (window) .scrollTop ()> = 700) {jQuery ('.a.w.-header'). CSS ('position', 'fixed'); }); } HTML & lt; Div id = "title" & gt; Here's the header text. & Lt; / Div & gt; CSS .header {status: absolute; } JS if (jQuery (window) .scrollTop ()> = 700) {$ ('# header'). CSS ('top', '-300px'); $ ('# Header') CSS ('position', 'fixed'); $ ('# Header') Animate ({top: 0}, 1000); } And {$ ('top', 0); $ ('# Header') ({Top: '300 px'}, 1000, function () {$ ('# header'). '). CSS ('position', 'complete');); } So when the si

sockets - Assigning IP address in IP Header in C -

I am implementing a chat room application using raw sockets for my college project in C. I have problem in specifying IP address I is received from the packet socket as I have shown I am parsing it now how to specify IP address. I want to do it as shown (using RCVIP as a four), if possible. So before suggesting to use struct in_addr , help me with this because I have tried other methods which are causing me other illusions. main () {char * rcv_ip; Four * packet; Int len; Struct iphdr ip_header; Rcv_ip = ParseIPHeader (packet, lane); Printf ("\ n% s", rcv_ip); // Printing some junk printfrog ("\ n% s", inet_addr (rcv_ip)); // give mistake print ("\ n% s", inet_ntoa (* ((struct in_addr *) ip_header-> daddr)); // Printing ip ip_header CreateIPHeader (rcv_ip + 5, rcv_ip); } Now the ParseIPHeader function. char * parse header (packet, lane) {struct iphdr * ip_header; Struct ethhdr * eth_header; Char * ret_ip; Ip_header = (Straight IPHR *) (

android - Is it possible to send a view from one Activity to another -

I mean that I have a list view and I want to send a special line of list view and it can be used by any other activity I want to show only one item of the same item_ list view. I will suggest: You can only bundle You can pass the details of intent in your list view item and send your other activity in which you create the same layout, the line items in your list view and < code> bundle and show details

c# - Couldn't assign value in FileUpload tool -

I grabbed the value from the database and I am trying to specify those values ​​in the edit form. But the only problem is with FileUpload. Do not take this price, anyone can recommend to me what I'm missing Private Zero editForDataByID (int titleId) {ReadmoreController objFormController = new ReadmoreController (); ReadMoreInfo objInfo = objFormController.GetListObjectOfAllArticle (titled); If (objInfo! = Null) {TextTitle.Text = objInfo.Title; txtSummary.Text = objInfo.Summary; TextDate.Text = objInfo.Date.ToString (); //FileUpload1.FileName=objInfo.Image; I also tried it, but this fileUpload1 = objInfo.Ige does not work; Session ["titled"] = title; ListDiv.Visible = false; form.Visible = true; BindGrid (); }} You assign not to the client security reason You can have the value as the FileUploadControl because the client may cause the reason to upload unwanted files from the machine, then use the file to upload use. Important files such as c: \ Personal

java - Why is upcasting a Class considered an unsafe operation? -

class कास्ट करते समय जावा कम्पाइलर एक "अनचाहे डाली" चेतावनी क्यों चालू करता है? ऑब्जेक्ट & gt; से क्लास & lt; ऑब्जेक्ट & gt; को बढ़ाता है? यह कैसे संभवतः असफल हो सकता है? ऐसा कोई कलाकार केवल सामान्य रूप से सुरक्षित नहीं है सामान्य में , और तथ्य यह है कि यह वर्ग वर्ग के लिए सुरक्षित है। इस तरह से एक वर्ग की कल्पना करें: // हाइफोटीटीकल! क्लास मायक्लास & lt; T & gt; वर्ग & lt; T & gt; {सार्वजनिक टी कुछ अंतर; } अब, यदि प्रश्न में डालने की अनुमति दी गई थी, तो आप MyClass & lt; Integer & gt; MyClassWithInteger = नया MyClass & lt; पूर्णांक & gt; (); MyClassWithInteger.someInstance = someInteger; // यह मान्य MyClass & lt ;? वस्तु & gt; फैली हुई है MyClassWithWildcard = myClassWithInteger; // यह मान्य नहीं है, लेकिन मान लें कि यह था: MyClass & lt; Object & gt; MyClassWithObject = myClassWithWildcard; // यह मान्य होगा, क्योंकि 'कुछ इन्स्टेंस' प्रकार 'ऑब्जेक्ट' का था, यहाँ myClassWithObj

Bulk insert a semi-structured file (SQL server) -

I am trying to import a file into a SQL Server table, although this is not a general structure file A predefined column; The number of columns is not fixed from one file to another and even from one line to another. Field Terminator '|' Therefore, for the first line you will have 3 columns (3 pipes delimiter) and the next line will be on the 10th column. (10 pipe delimiter) Is it possible to use this type of files using bulk function in SQL Server? Thank you. Insert a column in bulk of a template table. Then filter the rows based on the number of Terminator (|).

Double jQuery in a single wep page -

Since I can not create two forms in one page, I'm trying to use two separate jQuery: $ (document) .ready (function () { To open the same form with a different button, a new title and button This is my code: & lt; button id = "newuserbutton" & gt; ; Create new user & lt; / button & gt; & lt; / p & gt; & lt; p & gt; & lt; button id = "Edituser" & gt; update user & lt; / button & gt; & lt; / p & gt; script "text / javascript" & gt; $ (document) .ready (function () {$ ('# Div1 '). (""), "Cancel": function () {modal: true, autoOpen: incorrect, title:' create new user 'button: {"create user": function () {$ (this). Dialog ("") $ (this) .dialog ("close");}}} $ ('# newuserbutton'). Click (function () {$ ('# div1'). Dialog ('Open') ; $ ("# (" Color "," gray "); $ ("# d

c# - Capturing indeterminate state in WPF Threestate Checkbox -

After Then, I have a simple threestate checkbox in a WPF application: & lt; Check box checked "checkboxeshecked" unchecked = "checkbox checked" IsThreeState = "True" /> Now, I have to do this checkbox whenever its position changes, which is why I am unchecking checked and Events for the same method in the scene. Since this is just a simple example, all I think is doing in the law: Private Zero CheckBox_Checked (Object Sender, RoutedEventArgs e) {MessageBox.Show ("Test") ; } The problem is now that when this check box is checked or unchecked, then it happens when its value changes to an uncertain state. It is clear that I have the Installing events for checked and unchecked , but have lost some event for an uncertain state. What events do I need to use in order to take action when an uncertain state is set? To do this apparently you need to use the event as much: & lt; Checkbox checked = "CheckBox_C

sql - MySQL SUM by if statement -

मेरे पास MySQL तालिका में 3 कॉलम type , sum और custom_sum जहां custom_sum खाली हो सकता है, और मैं क्वेरी को संशोधित करने पर रोकता हूं SELECT 'type`, SUM (`sum`) से` लोकलहोस्ट-परीक्षण' ग्रुप द्वारा ` मुझे sum में SUM () का उपयोग करना है, अगर custom_sum खाली है , और अगर यह नहीं है तो custom_sum का उपयोग करें। क्या आईएससीएल में "if" स्टेटमेंट के आधार पर विभिन्न कॉलमों से योग करना संभव है? अगर कस्टम_सैम मान null : चुनें "u.type", SUM (COALESCE (`custom_sum`,` sum`)) से `स्थानीयहोस्ट- यदि custom_sum मान है खाली ( == '' ) : चुनें "यू.प्रकार", SUM (केस जब `कस्टम_सैम` = '' फिर 'योग' ELSE 'custom_sum' END)` लोकलहोस्ट-परीक्षण 'समूह से `प्रकार` < / कोड>

kineticjs - Drag and drop from kinetic.stage to another -

Is it possible to drag and drop from step 1 to step 2? In Figure 1, dragable shapes will be included, and phase 2 will be the goal. Yes, you can do something like this: image. On ('dragmove', function () (if !! (Stage.getPointerPosition ()) & image.getParent ()! == layer2) {Image.stopDrag (); image.moveTo (layer2); image Position (stage2.getPointerPosition ()); image.startDrag (); layer.draw (); layer2.draw ();}}) < / Html>

javascript - declaration Js file in another Js file -

I have a question and I Date. Js want to declare in control.js - & gt; To use the datetime function in some controls, date.js. Is it possible that a JS file in another? Thanks for the reply. I am adding the statement described at the top of my JS file. document.write ('& lt; scr' + 'ipt type = "text / javascript" src = "file2.js" & gt; & gt; / scr' + 'ipt & gt; '); But why are you included? You do not need include . You can just add a code to the existing javascript file . Or you can call JS files from the HTML file.

javascript - strongloop loopback slow learning curves -

I really need to code written on this site, please highlight me. I am looking at the code written on the web but I do not know where these codes should be kept, it is studying my first strong loopback. I'm searching on some tutorials, but where do I say those codes? Planning to connect to mysql on my server According to your needs , This may include some steps. To run the 'slc lb project' Scaffold A node.js app Add model and configure the data source. LoopBack automatically creates CRUD modes for you and exposes them to the REST API. You can drop the code in the model folder to customize the model, for example: var App = requires ('../app'); Var MyModel = app.models.MyModel; // MyModel.newMethod = models.json = function () {...}; MyModel.prototype.anotherMethod = function () {...}; You can find an example on this:

css - html body extends after make element a negative position -

This is my site: Resize the window until the responsive design is visible, And press the "right" button on top. The right sidebar disappears and appears, but when it disappears, the bar takes a position on the left: -300px, and you can scroll to the right Why will it happen? All right with the left sidebar scroll with the middle mouse button add overflow- X: hidden; : @ Media screen and (max-width: 650px). Content { Excluding the last rule: @ media screen and (max-width: 650px). Content {margin: 0 auto; Width: 100%; Overflow-X: Hidden; }

yii - Using Multiple Database Connection Not Working For Extension -

I'm making many database connections using the tutorial. The code is working fine in the model but the problem is that I am using an extension where I have the Yi :: app () - gt; & Gt; Db; Here I am getting the exception property "CWebApplication.dbadvert" is not defined. The extension of the extension has been enhanced by the CExtController. Please help. In the example you are setting dbadvert for custom code records class RActiveRecord , not for web application. If you would like it to be Yii :: app () -> gt; Dbadvert , you will need to set it up in your config.php section 'dbadvert' = & gt; Array ('class' = & gt; 'CDbConnection' * parameter * *), UPD A wrapper component for you You can create CDbConnection, which you want in any way to change the connection string and put it as a webapp component. & lt ;? Php class CMultiuserDatabaseConnection CaptureComment {public function __call ($ name, $ p

c++ - Generation of unique IP-port using bind(0) -

I need to generate a port number for some programmers. Google says that by binding with zero-port Unused port bines. I want to pair zero port, remember that this is the number, the port closed. Trying to do this? But NetState does not see the port of my program. Linux 2.6.27 int sfd; Struct sockaddr_in my_addr; Sfd = Socket (PF_INET, SOCK_STREAM, 0); If (sfd == -1) {printf ("socket error \ n"); Return -1; } Mementat (& amp; my_addr, 0, sizeof (struct sockaddr_in)); My_addr.sin_family = AF_INET; My_addr.sin_addr.s_addr = INADDR_ANY; My_addr.sin_port = 0; If (dam (SFD, (straight sockaddr_in *) & my_addr, sizeof (struct sockaddr_in)) == -1 printf ("bind error \ n"); If (listen (sfd, LISTEN_BACKLOG) == -1) printf ("hear error \ n"); dam () a sockaddr * a sockaddr_in * : bind (sfd, (struct sockaddr *) and my_addr, sizeof (my_addr)) < p> In addition to this, I do not see any other error. Binding for port 0 is the correct way

Oozie on HDInsight: OozieServerStatus -

Ozi server has been started without any exception. Trying to get the position using the command given below, it is giving a 404 error. $ clusterUriStatus = "https: //$clusterName.zurehdinsight.net: 443 / oozie / v2 / admin / status" Get $ Response = invoke-RestMethod- method- $$ cluster url Error message from server: Invoke-RestMethod: HTTP status 404 - / oozie / v2 / admin / status - $ creds -OutVariable $ OozieServerStatus Type Status Report Message / oozie / v2 / admin / Status Details The requested resource is not available. Apache Tomcat / 6.0.36 on line: 1 character: 13 + $ response = Get the awakening-redemption method - High $ cluster urethritis - credential $ cr ... + ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Category Interface: Invalid Operation: (System.Net. Fully Qualified IRRID: WebcamWeberpence Expression, Microsoft.PowerShell.Comands.Inv If you have a HDInsight 2.1 cluster, try v1 endpoint. : htt

php - $_POST['hidd'] != '20' doesnt work correctly -

I just want to execute some code in "if": if ($ _POST ['hidd']! = '20') $ _POST works correctly but the problem is ! = '20' is in. How can i work it Try this: if (isset ($ _ POST) ['hidd']) & amp; $ _POST ['hidd']! = '20') {// your code}

objective c - Use UIViews into UIViews -

Image
I have 2 UIViews in a UIView. I am using it because I want to show an object and if the photo Type or text type, then I am using any view or other, using this I can do it with only one Segu, and can not go from 2 to 2 different view controllers. This is a good practice Or do I have to create 2 visual controllers and make 2 segades? I am using hidden assets to hide or show scenes. self.photoView.hidden = Yes; Self.textView.hidden = NO; Thanks! This is a good practice but you should use one - make sure you are on time Only show one and hide and show updates. In your situation you have a view and 2 subwigs. It is perfectly fine but if you get a more complex visual structure then it is better to create 2 different view controllers or a view controller But with 2 custom sequences.

php - Symfony2 - Using yml for FOSOAuthServerBundle -

I am trying to create a web service using symfony2 in the FOSOAuthServer bundle. I am using yml configuration; So I create an entity for AcccessToken like this: yml: My ApiBundle \ Entity \ AccessToken: Type: Entity Table: Access_token id: id: Type: Integer Generator: Strategy: Auto: Many: One: Customer: Target Entry: Client Inverse: Includes Access_tokens: Column: Name: client_id referenced columnname: id tap value: false user: target intersection: user is reversed: access_tokens joinColumn: name: user_id referenced Columnname: id entity: Return Customers; } / ** * Set user * * @ Ultimate \ MyEpi bundle \ unit \ user $ user @Arton AccessToken * / Public Function Set User (\ My \ ApiBundle \ Entity \ User $ user = null) {$ this - & gt; User = $ user; $ This return; } / ** * Get the user * * @ Return * MyEipibundle \ unit \ user * / public function getUser () {Return $ this- & gt; the user; }} Now when I run the commands of institutions again, it throws an e

java - Android unfortunately has stopped when i wan't to push fragment -

I'm new to Android programming and I have this problem: if I have chosen something user, Do not want to change the menu elements (Android navigation drawer) crash my app. This is my piece category code @SuppressLint ( "Nyuepi") enhances public square piece Inbox activity {@ See override public Kriattiwu (Leautinfletr Inflatr, View Group Container, bundle saved instenstate) {return inflater.inflate (R.layout.inbox_fragment, container, incorrect); }} This is a very simple code What do I do with the drawer on my main square here: Private zero Selection item (int position) {Piece F; If (condition == 1) {f = new inbox activity (); Piece Manager Piece Manager = getFragmentManager (); Piece Transaction Feet = Piece MANAGER.beginTransaction (); ft.replace (R.id.content_frame, f); Ft.commit (); Intent activity = new intent (getApplicationContext (), InboxActivity.class); StartActivity (activity); }} This is very simple code and here are my errors: 04-22 11:

c# - Exiting from timer based polling loop -

I have a console app that runs something on demand reporting in the webpage. The app starts, runs some scaling, starts a (1 second) timer, and blocks on the console. Readline (); Statement (I mean goods in a service instead, but this is for another day) There is no exception to this now, so if there is a choice against SQL Server Or goes down the network hiccup, it just crashes, I am now trying to implement a raw exception handling. Inside the timer-callback I have filled the SQL-query within a trycatch. If it fails, it handles exceptions by logging, a failure increases and starts the timer again. If it fails for more than 5 times, I want to get it out of the app How can I stop / leave the console app that is blocked by a readline statement? A code in the code: I think a more elegant solution is one Block with reset event. When the timer callsback to a point, it assumes that it has not been worked to do now. Fixed readonly manual reset reset asset = new manual reset re

html - Header getting messed up when scrolling down, then back up -

On a customer's website, I have to run this strange thing. Everything is fine, but when you scroll down and then get a large white area of ​​the header where the advertisement / contact bar is this site is: Not an expert, and I have been looking for days. Please help me! :) (I do not know what information you need, but when I ask, I will update it) When you scroll back up, Header Dive trapped class: before scrolling: & Lt; div class = "header stuck" & gt; ... & lt; / Div & gt; Scrolled down to 1: & lt; Div class = "header stuck" & gt; ... & lt; / Div & gt; Scrolled down to 2: & lt; Div class = "header header header-scroll" & gt; ... & lt; / Div & gt; Scroll back up: & lt; Div class = "header" & gt; ... & lt; / Div & gt; Your problem is in waypoint-sticky.min.js : @line22 | stuckClass: 'stuck'; and here: @line51 | Turn it

oracle - Storing conditional logic for compliance in a database -

I'm creating an advertising system, which should be shown at the ATM. For now, I have to create a database structure where advertising, ATM and customer compliance will be stored. The advertising system must choose an advertisement based on ATMs and customers. The issue is that the customer is not strictly defined, it can be filtered with any of your property (card number, account, customer ID, client age, ...). For example: ATM = 1 should be shown at ADV = 2 when the customer '1111%' on the card like ATM = 1 ADV = 3, all the ATMs except How can I store this data in a relational database? I have a solution, but I do not like it, I will create a table where SEL will save. For example: Ad Table Adv_ID Terminal_ID Status (can be values: Allow / Reject) The order (for example: "1111% 'and card like" client_id! = 10230 "); screen_id (which should be shown on this ad) order (for priority) < P> Do you have any other sugges

jquery - onchange event does not work when the element is changed by another one -

I have a Changebox with a Change Event and a button that checks and unchecks this checkbox. The event is removed when I manually check and uncheck. But when I press the button to change the position of the checkbox, then it does not remove an event. You can see an example here: & lt; Input type = "checkbox" id = "1" & gt; & Lt; Input type = "button" id = "2" value = "click" & gt; Do you have ideas for turning events on when pressed on a button. is related to You of $ ("# 1") Can be used. The trigger ("Change") to trigger the event and click prop ("check",! $ ("# 1") .prop ("check") . Try it: $ (document) .on ("click", "#prop (" check "));} ($ 1)" $ "(" # 1 "). ("Change", "# 1", function () {warning ("change")});

time - measure the duration of the whole map phase per node in Hadoop -

At the moment, I know that JobTracker can show you the time that happens according to each map job, but what I want Not every map works, but in the first cluster, until the last one till the last one till one node , it takes time, for example: 1 map takes 2 seconds, but when you work 100 maps How to measure time nodes, and all in parallel Can not be executed? Is it possible to know the entire map phase (all map operations) to execute per node? You can use user defined Java counters to get time taken by all the mappers per node Are there. In the mapper implementation, you need to do the following: 1. Override the setup and record start time long startTime = System.currentTimeMillis (); 2. Cleanup method override long expiration time = System.currentTimeMillis (); String hostname = java.net.InetAddress.getLocalHost () GetHostName (). Context.getCounters (hostname, "time consuming") Increment (end time - start time);

php - Correct path in MediaWiki -

मुझे अपने मिडियाविकी (www.sfb-higher-invariants.de) के साथ एक समस्या है। लॉगिन रेगेंसबर्ग विश्वविद्यालय के सिंगल-साइन-ऑन के माध्यम से जुड़ा हुआ है। प्रवेश करने से, किसी विशिष्ट साइट पर एक रीडायरेक्ट होता है एक सही लॉगिन के बाद विकी पर एक और रीडायरेक्ट वापस आता है। लॉग इन नहीं होने पर, विकी सर्वर www-cgi पर है। इसमें प्रवेश करने के बाद सर्वर में बदलाव (एक सुरक्षित सर्वर पर)। मेरी समस्या: - अगर मैं $ wgScriptPaht को सेट कर रहा हूं www-cgi छवि अपलोड काम कर रहे हैं और सीएसएस लोड है। लेकिन सुरक्षित सर्वर पर रीडायरेक्ट ठीक से काम नहीं करता। < P> यदि मैं कोई पथ सेट नहीं करता, तो रीडायरेक्ट काम करता है, लेकिन अन्य दो चीजें विफल हो जाती हैं। सुरक्षित सर्वर https है। मुझे कहां से मिलता है, जिस पर विकी स्वचालित रूप से सेट हो जाती है? और मैं इस गंदगी के आसपास कैसे काम करूं? पीएस: विश्वविद्यालय के सुरक्षा कारणों के कारण साइन इन करने का कोई अन्य तरीका नहीं है ...: ( सर्वर नाम को $ wgServer के साथ ओवरराइड किया जा सकता है, यदि मैं आपका प्रश्न सही ढंग

vb.net - Fetching XML Data into SQL Server Select Statement -

I have a dataset and dataable in Vb.net, I have converted that datatale value into XML so that I It is possible to write in rows that is not included in the SQL server, but it is calling repeatedly stored procedures for hundreds of thousands of rows. Here I have sample XML and SQL scripts DECLARE @MyXML XML SET @MyXML = '& lt; NewDataSet & gt; & Lt; Table & gt; & Lt; ColVal & gt; 507.6100 & lt; / ColVal & gt; & Lt; / Table & gt; & Lt; Table & gt; & Lt; ColVal & gt; 750.5800 & lt; / ColVal & gt; & Lt; / Table & gt; & Lt; Table & gt; & Lt; ColVal & gt; 328.3600 & lt; / ColVal & gt; & Lt; / Table & gt; & Lt; Table & gt; & Lt; ColVal & gt; 194.7700 & lt; / ColVal & gt; & Lt; / Table & gt; & Lt; / NewDataSet & gt; False 4 @ Mike ML.nodes ('NewDataSet') A (B) as' SELECT abvalue ('Table [1] / ColVal [1]', 'varcha

NivoSlider isn't working with base64 images loaded by AngularJS -

When I use nivoSlider with static images, it works like a magic: < Pre> & lt; Div class = "slider-cover" & gt; & Lt; Div id = "slider" class = "nivoSlider" & gt; & Lt; img src = "img / someimage.jpg" alt = "" / & gt; & Lt; / Div & gt; & Lt; / Div & gt; When I try to load the gallery image with some dynamic base 64 image (via finger), then it does not work: < Code> div class = "slider-wrapper" & gt; & Lt; Div id = "slider" class = "nivoSlider" & gt; & Lt; img data-ng-repeat = "file in files" src = "{{file.content}}" alt = "" /> & Lt ;! - or - & gt; & Lt; Img data-ng-repeat = "file in files" data-ng-src = "{{file.content}}" alt = "" /> & Lt; / Div & gt; & Lt; / Div & gt; is using data-ng-repeat in a separate content & Lt ;! -

Protect Android library by obfuscation, excluding source code or other measure? -

I have created an Android library and I want to protect library code from reverse engineering. In my understanding, I can either use offfacescence (either using a projector) or create an Android library without the source code. Apart from this, I have read some posts that recommend using both methods. What is the best way to use and potential limitations? Do you recommend any other solutions? Thanks, Lup You should use both, but I think that This will not be enough. Deploying managed languages ​​is very easy to use because of the use of built-in libraries, Android code seems easy to reverse sourcing, you can not obscure system libraries, so your code with the system library is more clear goes. You have two ways to deal with the problem for me: Re-writing your library in C. Compiled languages ​​are more secure. Trust the law When someone is officially protected by the law as your intellectual property, anyone can access your library or Can not use its part.

javascript - createControl for TinyMCE 4.0 -

I have read the doctor api 4.0, but do not make anything how to use the control because the current code works with tinenex 4.0 not doing. API Version 3.0 So, how to use it for TinySe 4.0? Thanks I have found a solution, thanks tinymce.create ('tinymce.plugins.name', {init: function (editor) {editor.addButton ('button', {title: '', onclick: function () {}}}}); Tinymce.PluginManager.add ('name', tinymce.plugins.name);

split large csv file into multiple small files in perl -

I want to divide the CSV file into several small CSV files using Perl. My CSV file includes: 16047710472 4 12899376478 3 14034211 9 45 3 16132767680 4 < P> 17059884442 4 17808605446 3 15144433554 5 15145869428 4 12269245032 3 ... ... I want to break this file into a smaller file using the line-number. And the output file will be in dynamic name. For example, the output file name will output1.csv and the second one will be output2.csv and output files on doing so. Please give me some advice. Strictly use; Use warnings; Text: Use CSV; My $ file = 'csv_with_newline.csv'; My $ size = 3; My $ file_counter = 0; My $ line_counter = 0; My $ out; My $ csv = Text :: CSV_XS- & gt; New ({binary = & gt; 1, auto_diag = & gt; 1, sep_char => ';'}); "$: Encoding (UTF8)", open the $ file or "$ file: $!" Insert; While (my $ line = $ csv-> match ($ IN)) {$ line_counter ++; If ($ $ or $ line_counter & gt; $ shape

emacs - org-mode: org-time-stamp-custom-formats shows midnight time -

I would like a timestamp for my TODOs in the following format: .emacs I have the following: pre> (custom-set-variable '(organ-display) -CustomTimesT) '(org-time-stamp-custom-format (quote ("<% d /% m /% Y% a [% H:% M]>". "& Lt; Checking the value through that variable p> mx description-variable rt org-time-stamp-custom-formats Visible Confirms: org-time-stamp-custom-formats is a variable defined 'org.el'. Its value is ("& lt;% d /% m /% Y% a [% H:% M]> gt;" <% d% m% Y% a [% H:% M] & gt; ") Documentation: Custom format for time stamps. See 'format-time-string' for syntax if the variable` org-display-custom-times' is set, then it has been mixed more than the default ISO format. Time like% H:% M should be at the end of the second format. Custom formats are also awarded by export orders, if the custom time display at the time of export You can customize this variable

jquery - Alignment of button within a div - Currently dropped down -

I was thinking that someone could help me. I am trying to align the close button vertically within the alert DEL: Whatever I try, the button always sits very low, although in principle it should be able to fit just fine in the div This is my CSS: . Btn {letter-spacing: 1px; Padding: 10px; Border-radius: 3px; Display: Inline-block; Margin-top: 5px; Margin-down: 5px; } .btn_pri {background-color: # 47 9 ccf; Color: #fff; } .btn_pri: hover {background-color: # 3A8BC0} .btn_sec {background-color: #fcfcfc; Color: # 47 9 ccf; Border: 1 px solid # E3E3A3; } .btn_sec: hover {background-color: #EDEDED} .btn_close {background color: transparent; Cursor: indicator; Font-size: 16px; font-weight: bold; float right; Border: 0; } Do I need to clean float, or something like that? Simply remove the margin and padding from the button: .btn { / * padding: 10px; Margin-top: 5px; Margin-down: 5px; If the button requires padding, then use the negative margin to move it. Just add

php - Send form data with ajax to a REST CodeIgniter web service from a Phonegap mobile app -

I am programming a phonegap mobile app and I want to send data from my HTML form to my codinator web service but It's not working. Here is my form code: & lt; Form method = "POST" action = "" id = "myform1" & gt; & Lt; Input type = "text" id = "descr" name = "description" placeholder = "le .. gende .." & gt; & Lt; Id = "select_file" name = "select_file" & gt; Select & lt; Option value = "video" & gt; Vidà © o & lt; / Options & gt; & Lt; Option value = "son" & gt; Son & lt; / Options & gt; & Lt; Option value = "picture" & gt; Image & lt; / Options & gt; & Lt; Option value = "Autre" & gt; Atre & lt; / Options & gt; & Lt; / Select & gt; & Lt; Input type = "file" id = "myfile" name = "my_file" /> & Lt; Button type =

iis - How to create an IIS7 Virtual Directory Under Another Website (Not the Default Website) Using WiX -

I am struggling to create virtual directories in an existing website using YX in IIS 7. For example, what I have is: 1) The default website of the IIS, and 2) Another website that is a container for many business applications, and we use the "container Websites ". What I want to do is using the following YSX: a) Create a virtual directory for any of the commercial applications (we call it "BusinessApp1" ) The final structure in IIS looks like "ContainerVibiti \ Business App 1" under "ContainerVisite" The above virtual directory should be successful, I create the same virtual directory for the remaining business applications IRA Received very much. B) Create a dedicated IIS application pool for each business app installed on "Container Website". I would be very grateful for any help to get the position. Thank you. See where to create a custom action to list existing websites and drop one from In choosing also he

javascript - GetelementbyId from selected Value -

I have a script that obtains a parameter and updates the table in a MySQL database. I want to execute that script with javscript and a button. But that button does not work. $ abfrage = "pending selection"; $ Erbbinis = iscl_query ($ abbenz); Echo & lt; Script & gt; Function showid (str) {if (str == "") {document.getElementById ("txtHint") InnerHTML = ""; Return; } If (window.XMLHttpRequest) {// code for IE7 +, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest (); } Else {// code for IE6, IE5 xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); } Xmlhttp.onreadystatechange = function () {if (xmlhttp.readyState == 4 & xmlhttp.status == 200} {document.getElementById ("txtHint"). InnerHTML = xmlhttp.responseText;}} Xmlhttp.open (" GET "," getusr.php? Q = "+ str, true); xmlhttp.send ();} function status (str) {xmlhttp.open (" get "," getusr.php? Status = "+ str, tr

bash - check for string to be list of integers separated by + signs in python -

I want to see that the mivar be divided by more than one integer + . Should it be re.search () enough? myvar = "1 + 2 + 3" if (re-search (r "^ [0- 9] + (\ + [0-9] +) * $", miver) : "Print" should be an integer integer (% s) "% myvar sys.exit (1) Then I realized that it would still work for the wrong cases such as: myvar = "1 + 2 + 3-4" Use a regex free alternative partition: myvars = ["+1", "1 + 2 + 2", "1 + 5", "1 + 2 + 3 "] for myvars in hevor: nums = myvar.split ('+') for num: num: try: int (num): print" error ", myover < em> returns: error +1 error 1++ 2

How can I set a Java-like "static variable" in Perl that can be accessed by other classes ? -

A and B, I need to set a static variable (such as a variable variable in Java) in class A. I "post-text" itemprop = "text"> , and access to variable from class B (Java Using the classname. Variable name). Can I do something like this in Perl? Thank you in advance I do not know if I do not really know Java What I mean by "static variable" is what is to do with scoping? In Perl 'my' and 'our' you can control the scope, but I believe that I am right that the cap package / module creates the variable "personal" which is .pm The file is declared << Strong> How to "access" my copy of the programming Pearl (second edition) to include them in the chapter? 2 Scoded Declaration But before page 117 there is a small (slightly edited) portion of the footnote: Use the packages to store personal data in libraries , Modules, and classes, so it does not conflict with it if you see data in your main program that

java - updating notification text every second with handler -

I have a strange problem. I want to update the notification text per second, so I wrote this code new handler () Post Delayed (New Runnabal) {@Override Public Zero Run () TODO Auto-Specified Method Stub Battery Temperature = getBatteryTemperature (); New handler () Post Delaned (this, 1000);}}, 1000); If (battery temperature! = 0) {builder.setContentText ("battery level" + battery temperature); } Else {builder.setContentText ("The importance of battery temperature is 0"); } I saw with a log that the battery temperature in handler is different from 0 but outside the handler it is returned to 0. Why? How can I determine the right value in the notification? last handler handler = new handler (); Handler.Post Delayed (New Runnabal) {@ Override Public Wide Run (BatteryPatent = Thanck Battierepanner); Handler. Post Delayed (this, 1000);}}, 1000); Do not create a handler every time it is called Runnerble. You need to execute this snippet, runnable is exe

manifest - Security popups because of setting caller-allowable-codebase " * " with the latest jre update since 15th April 2014 patch -

The caller-acceptable-codebase is set to "*" because the security popup is being displayed so many times that important patch div> 1.7.0_55 and 1.8.0_5 "Allow / Permission Do not give "the checkbox to remember the decision, which will be suppressed in the future, though this popup in the future, to push this decision on a user's machine, a straight-forward r Sta not think. You can also downgrade your users 1.7.0_51, which is the only version of Java that supports "*". What we are doing is modifying "*" in a separate list from a space of host names: caller-acceptable-codebase: foo bar. com * .bar.com local host source:

sql server - SQL Help - Sales by State (SAP Business One) -

If someone can help me in my query then I try to use to remove sales information from my database I am here. I am trying to create a report to show all the sales by the state. I have come across this code along with the need to include wareshouses (from the sale of each state and until it is close to that I What is needed is not to go completely. T1 [WhsCode]) was sold from that stock I need to include in each column (I know that you can press Ctrl And without any column You can click to get the sum of them, but want to automatically show them on the final report). ? Anyone can help The query is up to now: 'State to send bill' as T0.State1, (sum (T1.DocTotal Selection) Select from OINV to T1 (NOLOCK) INNER OCRD T2 on T2. ​​CardCode = T 1. CardDod where month (T.DOCKET) = 1 and T2. State 1 = T. TT1 and year (T.DOCKET) = year (GATEDATE)) with AS ONVI T1 (NOLKAC) INNER join ONIRD T2 ON T2. CardCode = T1. CardDod where month (T1DCDD) = 2 and T2. State 1 = T.State1 and YE

java - why does TreeSet sorts only unique values? -

दोस्तों, मुझे TreeSet का उपयोग कर संपूर्ण डेटा प्राप्त करने में समस्या हो रही है। मैंने कुछ ही मानों पर TreeSet सॉर्ट किया है। यहां मेरा कोड है: MyCars वर्ग: वर्ग MyCars लागू करता है Comparable & lt; MyCars & gt; {निजी स्ट्रिंग नंबर; निजी इंट साल मॉडेल; निजी डबल घोड़ा पावर; सार्वजनिक स्ट्रिंग getNumber () {रिटर्न नंबर; } सार्वजनिक शून्य सेटनंबर (स्ट्रिंग नंबर) {this.number = number; } सार्वजनिक प्राप्ति प्राप्त करेंयदरमॉडेल () {वापसी वर्षमॉडेल; } सार्वजनिक शून्य सेट वर्ष मॉडेल (इंट वर्ड मॉडेल) {this.yearModel = yearModel; } सार्वजनिक डबल प्राप्तहोर्सपीवर () {वापसी घोड़े पावर; } सार्वजनिक शून्य सेटहोर्स पावर (डबल घोड़े पावर) {this.horsePower = horsePower; } @ ओवरराइड पब्लिक इंट कंट्रास्ट टू (मायकार्स सी) {रिटर्न डबल-कॉपरेयर (यह हॉर्स पावर, सी। गोर हॉर्स पावर ()); }} SortTest वर्ग: सार्वजनिक वर्ग SortTest {void GoForSort () {सेट करें डेटास्ट्रक्चर = नया वृक्षसेट (); मायकार्स सी 1 = नया मायकार्स (); c1.setNumber ( "SRT-Viper123"); c1.setYearModel

java - How to select new IFrame using Selenium WebDriver? -

I want to select an iframe and enter value in the body. I'm trying with code below. HTML code: & lt; IFrame id = "4564654_content_ifr" & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Body id = "small" & gt; & Lt; Div aria-lable = "new composition body" & gt; & Lt; Br> & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Head & gt; & Lt; / Html & gt; & Lt; / IFrame & gt; selenium code: driver. SwitchTo (). Frame (driver.findElement (By.xpath ("// iframe"))) [(@ id, 'content_ifr')]; Driver.findElement (By.xpath ("// * [@ id = 'tiny'] / div [1]")))). SendKeys ("Happy New IFrame"); But I could not be able to enter the values ​​ Can anyone help me with it? Instead of sending keys to , you set innerHTML directly. driver. SwitchTo (). Frame (driver.findElement (By.xpath ("// iframe [in (id id, 'c

Why can I not access my fonts in rails app for Hoefler Frere Jones -

I am trying to use a fonts folder in my site in production. I call the Huffler Frere Jones font and this to basically add fonts to the site. When I try to access the folder / fonts / 165137, but I can not find this file if I write in /fonts/165137/1D3CD1EB968865CCC.css. I wonder what's the way to do this for the rail? All I need to do is basically add fonts to my site and make those sub-folders accessible to them so that they can take site fonts for production, but I < / Div> When I try to use the / fonts / 165137 folder / fonts / 165137 - is a directory and possibly directory listing is disabled by your webserver so you are getting the error And check the path to fonts-files from CSS-files.

xcode - Objective-C, Displaying an NSTimer activated by a UIButton -

I am working on a project for school that includes a set of buttons used as a countdown timer Given NStimers will ideally be displayed in the title of the timer's UIButton as the title. So far, I am only able to do this work, while setting the display of time, instead of passing a UIButton logic, instead of passing a specific example of UIButton, I declare "time" NSString Which has the current display value calculated by NSTimer. It is not how the final implementation should be, and I have set it only to work partially. Code for one of the buttons: b1 = [[UIButton alloc] initWithFrame: CGRectMake (neutral.frame.size.width * 0.56, neutral.frame. Size.heat * 0.18, neutral.frame.height * 0.64, neutral .frame.height.height * 0.64]]; [B1.titleLabel setFont: [UIFont fontWithName: @ "helvetica-bold" Size: 35.0]]; [B1 setbackground image: forState: UIControlStateNormal]; The process of pressing the button by method: - Clicked the button (id): (ID) sende

java - MySQL server connection error? -

मेरा प्रोग्राम प्राप्त करने के लिए localhost MySQL सर्वर से कनेक्ट करने में सक्षम है इससे डेटा लेकिन जब मैंने एक सर्वर पर डेटाबेस अपलोड किया तो मैं किसी और से कनेक्ट नहीं कर पा रहा हूं। अंतिम स्थिर स्ट्रिंग db_url = "jdbc: mysql: //***.******************************"; स्ट्रिंग कार्ड = cardnumber.getText (); स्ट्रिंग पिन = पिनकोड.गेट टेक्स्ट (); स्ट्रिंग पिंडब = नल; स्ट्रिंग pinsql = "का चयन करें * से कार्ड 'जहां` कार्ड_एनम्बर` = "+ कार्ड +"; "; कोशिश {class.forName (jdbc_driver); Con = DriverManager.getConnection (db_url, "bilig", "199108"); Ps = con.prepareStatement (pinsql); Rs = ps.executeQuery (); अगर (rsnext ()); {Pindb = rs.getString ("कोड") + ""; Cardnumber.setText (""); Pincode.setText (""); }} पकड़ (अपवाद जी) {System.out.println ("नहीं मिला!"); g.printStackTrace (); } मैं कमांड लाइन के साथ डेटाबेस तक पहुंच सकता हूं, लेकिन इससे मुझे "होस्ट" त्रुटि मिलत

html - GWT - InternetExplorer UI issue with HorizontalPanel -

I have a button panel in my GWT application, which is the HorizontalPanel with the button Is implemented in the form widgets & lt; G: cell & gt; are wrapped in elements. <: & lt; G: horizontal panel style name = "{style. horizontalPanel}" & gt; & Lt; Six cells & gt; & Lt; G: button ui: field = "selectButton" title = "{constants.buttonLabel}" text = "{constants.actionLabelSelect}" /> & Lt; / G: Cell & gt; ... & lt; / G: horizontal panel & gt; The button contains the following CSS: .gwt-button {font-size: 13px; Color: # 337bb1; Margin: 0 px 10 pixels; Padding: 5px 7px; Border: 1 px solid # E3E3E3; } Button label often contains two words compared to all non-IE browsers, buttons are not fit in panel layout. Each button looks very wide, a fixed button is only shown partially. Also, even if I change the size of the scene ( Ctrl + "-" ), then it is still the case, since the

java - ORA-00933: SQL command not properly ended in scriptlet -

I have this code which is in a script to connect to the Oracle 11g database. It sits in an ASP and returns data from the database (Please note about this fact, the scripts are used and the MVC pattern has been ignored, I can not do anything about it) when I I try to connect to the database and run a query This error java.sql.SQLSyntaxErrorException: ORA-00933: SQL command did not end correctly. Can someone please review the code and see what I am doing wrong? Many thanks driver myDriver = new oracle.jdbc.driver.OracleDriver (); DriverManager.registerDriver (myDriver); Connection Conn = Null; Statement statement = null; Result result result = null; String DBURL = "jdbc: oracle: thin: @localhost: 1521: aaa"; String dbc = "user"; String DBPASSWORD = "password"; Stringbuffer sql = new stringbuffer (); Sql.append ("Select 'A', (* *) from the queue where preference There are rows that require spaces, for example: sql.append ("un

R: Make new vector correlating to a specified level in a factor -

I'm really stuck with a simple task and hope someone can help me .. Based on the 1 level of a factor, I want to create a new vector from an existing vector. Example: v = c (1,2,3,4, 5,6,7,8,9,10) f = factor (representative (C ("drug", "placebo"), 5)) I create a new vector from V I want, in which only "drug" or "placebo" is included. As a result of this: vDrug = 1,3,5,7,9 vPlacebo = 2,4,6,8,10 Thanks in advance! You can easily v by f Can reduce: v [f == "drug"] [1] 1 3 5 7 9 However, in this approach more The error can be with complex environments or larger data sets accordingly v and f in data.frame and data.frame < It would be better to do better than performing on / code>. All types of questions and changes: mdf & lt; - data.frame (v = c (1,2,3,4,5,6,7,8,9,10), F = factor (representative (c ("drug", "placebo"), 5)) ) MDF vf 1 1 drug 2 2 placebo 3 3 drug 4 4

java - Heap size issue in android app -

I have an app that starts an initial service, the manager uses classes (which in these single singles The class loads all the required data from SQLite). And DDS, the size of the pile is 7.00 MB for my app, while my app consumption is a heap of 5.80 MB. Just left around 1.20 MB. And this happens when my app does not have much data, how to fight againts such a problem? Please help! If you do not know how the stack you have used in the application to find it in DDS memory Use the analyzer. This plugin, which can be integrated to accept, will show you which process is more piled up and you can track it down and make improvements. If unused bitmaps are not clean, then the garbage collector will not clear those memory and it's too stack in runtime. Really burn when you do not move the unused object of moderator, recorder, bitmap, and vedio processor. I do not know what the exact functionality of your app is if you have used it in your app, please check one of these