Posts

Showing posts from April, 2012

c - Is it okay to indicate to a function that modifies(increases or decreases) a value through a flag? -

This is just a design tip that I see. I have a function that is a process before raising or lowering a value. Do I have to get different functions or just one function in the flag and this must be passed to indicate that this value increases or decreases? i.e. zero increment_xxx_counter (some RGRs) minus sub_type (some RGR) OR zero modified_xxx_counter (some RGR, bull flag) {if (flag) {} else {}} I will start by looking at the other interfaces used in your application. If there is a similar "modified" function, then I'm ready to match this function in the way that makes sense. Otherwise, if I feel that the function is required, then I can use a one-function approach: xxx_inc (some * arg, int value); In this way, it is easy to understand what is happening after reading the code. For example: timer_ic (and, 1); Timer_ic (& amp; t, -1); -or- timer_aut_ic (& amp; t, 1); Timer_a_ic (& amp; t, -1); Instead of less obvious: timer_m...

shell - Passing parameter to sh file from java class -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मेरे पास जावा में एक विधि है उबंटू में एक शेल स्क्रिप्ट को निष्पादित करने के लिए। स्ट्रिंग [] cmd = {"/ bin / sh", "startdomain.sh"}; Proc proc = Runtime.getRuntime ()। Exec (cmd); startdomain.sh इस प्रकार है: #! / Bin / sh gksudo -P "/home/priyatam/glassfish-4.0/glassfish/bin / Asadmin start-domain domain1 " मुझे जावा वर्ग से पैरामीटर के रूप में डोमेन नाम (यहां डोमेन 1) देना होगा। यह कैसे प्राप्त करें। एक तर्क को पारित करने में सक्षम होना चाहिए जैसे कि आप आमतौर पर कमांड लाइन पर होते हैं: स्ट्रिंग डोमेन 1 = "कुछ डोमेन नाम"; स्ट्रिंग [] सीएमडी = {"/ bin / sh", "startdomain.sh" + domain1}; Proc proc = Runtime.getRuntime ()। Exec (cmd); फिर startdomain.sh को बदलें ताकि यह एक तर्क डालता हो जहां domain1 वर्तमान है: #! / Bin / sh Gksudo -P "/home/priyatam/glassfish-4.0/glassfish/bin/asadmin प्रारंभ-डोमेन $ 1"

java - Generating parent tag for a xs:sequence elements -

मेरे एक्सएसडी में, मेरे पास ऐसा कुछ है: & lt; x: जटिल टाइप नाम = "डिस्क" & gt; & Lt; xs: विशेषता नाम = "अनुक्रमणिका" प्रकार = "x: int" & gt; & lt; / xs: विशेषता & gt; & Lt; xs: विशेषता नाम = "प्रदाता आईडी" प्रकार = "xs: int" & gt; & lt; / xs: विशेषता & gt; & Lt; xs: विशेषता नाम = "आकार" प्रकार = "xs: int" & gt; & lt; / xs: विशेषता & gt; & Lt; / XS: complexType & gt; & Lt; x: जटिल टाइप नाम = "सर्वर" & gt; & LT; XS: अनुक्रम & gt; & Lt; xs: तत्व का नाम = "डिस्क" maxOccurs = "unbounded" प्रकार = "डिस्क" & gt; & lt; / xs: तत्व & gt; & Lt; / XS: अनुक्रम & gt; & Lt; / XS: complexType & gt; मैंने एक्सएसडी से ऊपर से जेएक्सएबी कक्षाएं उत्पन्न कीं और एक प्रकार का ऑब्जेक्ट सर्वर बना दिया और डिस्क नाम की सरणी सूची तैयार की। अब जब मैं मार्शल सर्वर ऑब्जेक्ट को XML पर ऑब्जे...

android - One of the ImageButton not clicking & make HorizontalScrollView clickable -

This is a very silly problem, but it is not working for me. I have 2 imagebutton & amp; One horizontal scroll view on one page (HSV) is not a click on the odd one image button (1A). Apart from this, I wanted to make HSV clickable so that I can use it: android: clickable = "true" , which does not work You can use XML & amp; As soon as I posted This is XML: gt; imageButton Android: id = "@ + id / buy_imageButton" Android: layout_width = "wrap_content" & Lt; / RelativeLayout & gt; & Lt; ListView Android: id = "@ + id / chat_page_list" Android: layout_width = "fill_parent" Android: layout_height = "match_parent" /> & Lt; RelativeLayout Android: layout_width = "fill_parent" android: layout_height = "70dp" Android: layout_alignParentBottom = "true" Android: orientation = "horizontal" & gt; & Lt; HorizontalScrollView android: id = "@ + id...

javascript - Filemask using new dojo Uploader -

I created a DOJO browse button to upload files to the server. The button works fine however I want to be able to restrict * .jpg files only to my file selection. In DOJO dojox.form.FileUploader I could use the file mask attribute to upload / select mask files to the server. Example: var file mask = ["images", "* .jpg; * .jpeg; * .gif; * .png"] var uploader = new dojox.form.FileUploader ({ Button: Dijit.byId ("myFakeButton"), upload url: uploadUrl, file mask: file mask}); However the dojox.form.FileUploader is now deprecated (to be downgraded soon) and has been replaced by dojo.form.uploader. In this I am unable to find any property that could duplicate the maximum capacity of the file. I have read but it does not mention anything about file masks. Did anyone face this issue? You can set the type by the accept attribute and configure it Mime type can dojo.require ("dojox.form.Uploader"); Var tbl = document.getElementById ...

django - Create a pipeline view in jquery or bootstrap -

I want to create a scene similar to this: Where a user pulls a job and leaves it JIRA also provides a similar view from one side to another. Can someone suggest a plugin for jquery or bootstrap which can be used in this case (preferably with the Django)? User jQuery UI dropable plugin ''

visual c++ - how to calculate the HOGDescriptor for specified locations in opencv -

I am trying to find a hog descriptor for human activity recognition, how to do the HOG descriptor for the specified location using opencv Actually, there is no inbuilt functionality for this. You should remove the area yourself and give it as a "matte" type for the hog.compute () method. Hint: Study OpenCV "hog.detectMultiScale" method that does the same thing.

java - SAX parser get attribute from endelement -

I use the X XML parser and when I use it: Public zero start element (string yuri), string local name, string qName, attribute features) throws SAXException I can get properties but I public zero end element & lt; Item name = "test" value = Somedata "/> Code: Public class SAXXMLHandler extends the default handler { Private Arrestist & lt; itemsList & gt; Item; Private String Tempel; Private Item List tempEmp; Private Package Manager Manager; Personal String Packname; Public SAXXMLHandler (Package Manager Manager, String Packname) {items = New Arrestist & Lt; itemlist & gt; (); it; manager = manager; this.packName = packName;} public Nero character (four [] f, integer start, integer length) throws SAXException {tempVal = new string (ch, start, length);} // event handlers public zero start element (string yuri, string locallime, string qName, attribute characteristics If the (qName.equalsIgnoreCase ("item")) {log in (...

java - How to rotate a bitmap with AffineTransform -

I am trying to create a simple program that displays bitmap zombie images and then using AffineTransform and Thread Revolves around I followed the example to fulfill it, but whenever I run a program, Zombie Bitmap revolves and stops once. Apart from this, for some reasons when I painted the zombie bitmap, the image comes in part with the Wi-axis from the screen. So my questions are: why bitmap is not rotating and why the bitmap is off screen. The code is as follows: Import java.awt. *; // import the graphics class java.awt.geom. *; Import java.net *; // import navigation javax.swing. *; // JFrame import java.util *; // Toolkit implements the public class BitMapZombies2 JFrame tool Runnable {Personal Image zombieOneRight; Thread zombiran; Public stationary zero main (string [] args) {new bitmap jombs 2 (); } Public BitMapZombies2 () {Super ("Bit map zombies .. stops for your life !!!"); SetSize (800600); SetVisible (true); SetDefaultCloseOperation (JFrame.EXIT_ON_CL...

Concordion: How to compare two files? -

I am new to Concordion. I have created a sample project and have tried to compare two files with the help of hesitation. . Kinldy tell me do we have any tag together that can compare two files? My solution. In your HTML file: & lt; Span concordion: set = "# urlFileA" & gt; /path/fileA.json< / Span & gt; & Lt; Span concordion: set = "# urlFileB" & gt; /path/fileB.json< / Span & gt; & Lt; Span concordion: assertTrue = "compare (# urlFileA, # urlFileB)" & gt; True & lt; / Span & gt; In your stability: compare public boolean (string url file a, string url file b) {// file Get both files together and read fileInputStream files to // compare ..... // then return true or false}

sql - return a column name depending upon another column field value in oracle -

I have written a code like this: SELECT C. *, CASE when .COST_CENTRE_NAME is no longer 'yes', when CGL_Code is not zero then 'yes' when c. If MATTI is not OADOE then 'yes' no 'no' is not an option till the end oyster 3 I need another column to be associated with this designated DEPENDS_ON with CAA_RULIM C, where the column value of this column will depend on the value of 'Yes' or 'No' of DEPENDS_OTHER. If DEPEND_OTHER column value is yes, then it should return the column name for which it comes yes under the DEPENDS_OTHER column. I am giving an example below: id COST_CENTRE_NAME GL_CODE MATERIAL_CODE depend_other depend_on 1 A yes COST_CENTRE_NAME 2 no 3 123 Yes GL_CODE 4 a2 Yes MATERIAL_CODE 5 No Just repeat what you started: Select c *, When case c is cost_centre_name, then zero 'yes' when' c'gl_code is not zero, 'yes' when c.material_code is not zero, then' yes' and 'no' end de...

Android use support library to support SearchView -

यह मेरा कोड है: अगर (Build.VERSION.SDK_INT & gt; = बिल्ड .VERSION_CODES.HONEYCOMB) {MenuItem searchItem = menu.findItem (R.id.searchMenuItem); SearchManager searchManager = (SearchManager) getSystemService (प्रसंग। SEARCH_SERVICE); SearchView searchView = (सर्चव्यूव) मेनूइटम कॉमपेट.टेटएक्शनव्यू (खोजइटम); // searchView.set खोज View.setSearchableInfo (searchManager.getSearchableInfo (getComponentName ())); searchView.setIconifiedByDefault (गलत); एंड्रॉयड:} मेरे न्यूनतम API 8. मैं इस संकलन त्रुटि है है कॉल एपीआई स्तर 11 (वर्तमान मिनट 8) की आवश्यकता है। widget.SearchView # setSearchableInfo ध्यान दें, कि मैं कम से कम एसडीके बदल नहीं सकते। आप उपयोग कर सकते हैं android.support.v7.widget.SearchView के बजाय android.widget.SearchView आपके कोड ऐसा दिखाई दे सकता: अगर (Build.VERSION.SDK_INT & gt; = Build.VERSION_CODES.HONEYCOMB) {MenuItem searchItem = menu.findItem (R.id.searchMenuItem ); SearchManager searchManager = (SearchManager) getSystemService (प्रसं...

python - Finding next occuring tag and its enclosed text with Beautiful Soup -

I tag & lt; Blockquote & gt; I'm trying to parse the text between . When I type soup.blockquote.get_text () I should get results for the first blockquote in the HTML file. I will see the next and sequential and lt; Block & gt; How do I get the tag? Maybe I'm just tired and can not get it in the documentation. Example HTML File: & lt; Html & gt; & Lt; Head & gt; Header & lt; / Head & gt; & Lt; Blockquote & gt; I can get this lesson & lt; / Blockquote & gt; & Lt; P & gt; Eiaoiefj & lt; / P & gt; & Lt; Block & gt; This next & lt; / Blockquote & gt; & Lt; P & gt; & Lt; / P & gt; & Lt; Strong & gt; It & lt; / Strong> & Lt; Blockquote & gt; Also capture it after the "next capture" and & lt; / Blockquote & gt; & Lt; / Html & gt; Simple Python code: import bs4 BeautifulSoup html_doc = open ( "example.html") ...

How to search for existence of record in one table from another using php and mysql -

I use php and mysql I have two tables, Table A (ID: auto-increment, idano) Table B (ID: auto-increments, Sido) . There are about 3000 records in Table A and approximately 27,000 records in Table B. I would like to know that every record in Table A is present in Table B, if not, which are not present in Record B, then do not print. I tried to retrieve the record in Table A and table A, but I could not succeed. And it took a very long time to end the query. And I have searched the whole but nothing like this could be found. Please someone can help me Thank you! The following questions can return all idno, which are not in these table B From the SELECT * table where `idno` is not (select 'Select from the table')

python - global response timeout in django -

In the Django application I am going to get data from some external applications like Facebook, Twitter etc. I want to set global feedback timeout for every request in my app if there is no response from external applications such as Facebook, Twitter etc in specific applications, then Django should throw an exception for this. Is there a way to set global feedback timeout in the Django app? You should never synchronize URL retrieval. It does not matter if your timeframe is set, there are always browsers that can timeout based on user settings. Within an asynchronous task, you can set up using timeouts.

How to update and use .mdb database access with Smart Device Application c# -

I am using VisualStudio2008, I have created a smart device project; And I want to make an application to make some updates for an Access database. For example, something like a Windows application: string connection = provider = Microsoft.JET.OLEDB.4.0; Data source = {0}; Jet ALLDB: Database Password = {1}; String password = "123456"; String path = "c: \ mydb.mdb"; OleDbConnection conn = new OleDbConnection (string.Format (connection, path, password)); Is there a possibility to use Access database (.mdb) with Windows Mobile 6? Thanks As far as I know that the Access database in Windows Mobile There is no support for either you have to use or connect to external databases on the internet.

Wordpress custom MU plugin fetch user details -

I hope you can help with a custom login with a WordPress Multisity, which allows users to access the original WP-admin By default, those who do not have the right permission, this error has been given to them. You have tried to access the "WordPress" dashboard, but you do not have privileges on this site. If you feel that you should be able to access the "WordPress" dashboard, please contact your network administrator. I think they will be redirected to the primary blog like this example. However, my custom plug-in in my Mu Plug-in does not include any of $ current_user and functions to get current user work I have no problem in other tasks Is created, so I know there is nothing wrong in including the file. I understood it at the end I hope that it helps someone function check_if_user_needs_redirecting () {$ active_blog = get_active_blog_for_user (get_current_user_id ()); $ Blogid = get_current_blog_id (); If ($ blogid! = $ Active_blog- & g...

mysql - Logging fewer entries into Yii console.log -

I have an application with many concurrent console jobs in a database Yii due to high concurrency Sometimes I get MySQL deadlock errors Sometimes it can be too much console.log The file gets very big, and it translates more expenses. I want to launch specific examples of CDbException , or at least YII__DEBUG has already been commented . Can anyone please help me understand how to do this? Thanks a lot! Regards. I have decided to modify the log statement in yii / framwework / db / cdbcommand.php which That was failing SQL logging. I changed it to a trace statement: Yii :: Trace (Yii :: t ('yii', 'cdb comand :: {method} () failed: {error}. SQL statement executed Was done: {Sql}. ', Array (' {method} '=> $ method,' {error} '= & gt; $ message,' {sql} '=> $ this-> ; GetText (). $ Par)), Cloger :: Levellier, 'System DB CDDB Commands'); I'm catching the exception and logging a more compact version o...

cq5 - How to access jcr:root with XPath JCR Query -

Image
I would like to apply some Java function to CQ5 dialog . In the first step, I search for Dialog XML files in the myComponent folder : NodeEaterator tabrequirefield = getQueryResult ("/ jcr: root / apps / myProject / pages / MyComponent / dialog / jcr: root ") But this query does not supply any results. The CRX Expedial tool does not display any results, it also sees anecdotal picture: My / jcr: root / apps / myProject / pages / myComponent / dialog.xml looks like this: & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Jcr: root xmlns: cq = "http://www.day.com/jcr/cq/1.0" xmlns: jcr = "http://www.jcp.org/jcr/1.0" xmlns: nt = "http: //www.jcp.org/jcr/nt/1.0 "JCR: Primary Type =" CC: Dialog "Stateful =" Fotal "title =" Test "..... & gt; & Lt; Item JCR: Primary Type = "cq: Widget" xtype = "Panel" & gt; ... ...... & lt; / Item...

objective c - MPMediapickercontroller tab bar overlap with custom tab bar in iPhone -

Image
I can hide or show the tab bar in the navigation controller but when I the current model view controller Code> MPMediapickercontroller , and whenever the Custom Tab Bar hides, it overlaps the tab bar of MPMediapickercontercroller . Please refer to this image This is a default 'MPMediapickercontroller' presented. I'm surfing to fix this but no success was found. In MPMediapickercontroller it always exists presently, so for this one Solution You must use an image which is similar to the tabbar of MPMediapickercontroller . Here is the image that is the only white image used without any limit. Now, below is my code. In the visible incomplete method, you have to show that image in the tabbar. - (void) ViewVillage: Animated (BOOL) ([UTibber presence] Setbackgaged image: [UIImage imageNamed: @ "tabDefault"]]; [Super Viewer app: Yes];} Then use presentModelViewController of MPMediapickercontroller dealloc whatever you want For...

D: What is the difference between targeted and general imports? -

When there is something import in any of the D modules, you can either import std.string; or import std.string: format; In addition to the apparent meaning difference, is there any other effect? For example, binary size, time of compilation, something else? I would like to add a whimsical answer that name (or name wathever) avoids conflict in name What to do now about what coding should be done to avoid the bug and get more freedom during the naming of things. If you only see import std.string; , you will not be able to name your variables / functions such as succ , center , etc.

jquery - update div in for loop -

I have a loop that wants to update a div with the counter. The code looks like this: for (var i = 0; i although this is not updated. What am I doing? The problem is that while looping, you can only $ this.files.length Define different gaps which will do every other work forever. Try this instead: var len = $ this.files.length; Var i = 0; Var update = setInterval (function () {$ ("Counter"). Html ('& lt; p & gt; Processing file' + len + 'of' + (i + 1) + '. & Lt; / p & Gt; '); if (++ i == lane) clear interval (update);), 1000);

In php why is a Float > String or Float > int -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर नकदी रूपांतरणों के साथ परीक्षण में I इस में भाग गया यदि मैं 510 को अंतराल () सेट करता हूं तो यह अभी भी कहता है कि फ्लोट * 100 स्ट्रिंग या इंट से कम है Php ऐसा क्यों करता है? $ var = 4.73 + .37; $ एएमटी = 510; अगर ($ var * 100> 510) {echo 'wtf'; } यह फ़्लोटिंग बिंदु अंकगणित के बारे में है। सबसे सरल उदाहरण: 0.1 + 0.2 = 0.30000000000000004 आप गूंज का उपयोग करते हैं या आप इसे नहीं देखेंगे यहां तक ​​कि var_dump क्योंकि यह एक मानवीय रूप में दिखाने के लिए छोटा किया जाएगा, लेकिन आप इसे स्पष्ट रूप से यहां देख सकते हैं: $ a = 0.3; // सही 0.3 $ b = 0.1 + 0.2; // लगभग 0.3 var_dump ($ a); // 0.3 var_dump ($ b); // 0.3 var_dump ($ a == $ b); // झूठी var_dump ($ a == 0.3); // सच var_dump ($ b == 0.3); // झूठी var_dump ($ a == 0.30000000000000004); // झूठी var_dump ($ b == 0.30000000000000004); // सच्चा धन राशि को संग्रहित करने के लिए फ्लोटों का उपयोग न करें और विशेषकर उन पर कोई गणना करने के लिए - सेंट का उपयो...

html - Bullet Point is on my Nav menu -

I have created a site and just navigated it's only good graphing on Google but the bullet points on Firefox still exist How can I fix this, how do I ride underlined? Try it out: Let's say: Your ninth container is: # Nav, then: #nav is a {list-style-type: none; Text-decoration: none; }

oracle - how to compare two different tables in pl/sql block -

इस सवाल का पहले से ही एक उत्तर है: 6 जवाब दो अलग-अलग तालिकाओं की तुलना कैसे करें पीएल / एसकेएल ब्लॉक में टैबिल ए-टी_टीएबलईएलए बीआईजेडई दिनांक एसीआईडी ​​संख्या (12,0) प्रकार VARCHAR2 (10 साल) एडीजेडीट DATE सॉसेचर VARCHAR2 (20 साल) DATEUPDATED तिथि: तालिका 2: BIZDAY DATE एसिड नंबर प्रकार VARCHAR2 (20 BYTE) ADJDATE DATE स्रोत VARCHAR2 (20 BYTE) DATEUPDATED DATE अंतर की गिनती पाने के लिए से चुनें गिन (*) चुनें ((* तालिका 2 से * चयन से * तालिका 2 से चुनें * संघ चुनें) * (टेबल 2 से * चुनें तालिका से * चुनें)); आपको बताएगा कि तालिका 1 में तालिका 2 में कितनी पंक्तियाँ तालिका 2 में नहीं हैं तालिका 2 में नहीं वास्तविक डेटा तुलना प्राप्त करने के लिए चुनें (से चुनें * तालिका 1 से चुनें * तालिका 2 से * चुनें) संघ सभी (तालिका 2 का चयन करें * तालिका 1 से * चयन करें)); >

Mysql trigger is not working -

I created the following triggers but it is not executed after inserting the data DELIMITER / For each line / ano_sale_join at INSERT, add TRIGGER sale_after_insert to ano_sale_join.database_inventory (sale_id) values ​​(NEW.sale_id); INOSTO ano_sale_join.database_inventory (sales_prod_id) value (new cyan_prod_id); END // DELIMITER; The is the wrong reference to your database and table In the statement swap found this code block is incorrect: ano_sale_join.database_inventory (sale_id) values ​​in INSERT (NEW .sale_id); INOSTO ano_sale_join.database_inventory (sales_prod_id) value (new cyan_prod_id); Change them to: database_inventory.no_sale_join (sell_id) included in prices (New Cycle_id); Database_Inventory.Now_Sale_Jian (Sales_products_id) new entries in values ​​(New Sial_Prop_ID); Refer to :

XPages - get value of a textarea inside a dialog - Part 2 -

Follow with my previous question: I've been unable to get a handle on text input in textarea that is inside a XE: Dialog XE: After the dialog the "pop up" button is pressed Here's my code: & Lt; / XE: Dialog & gt; Unfortunately the line document is 1.getValue ("InputTextBox5"); SetJobReferenceStatus does not work on the function rather than the value contained in the field and passes "tap". Any idea why this code is not working? remove instant = "true" your eventHandler From Every event supports two options to bypass validation (see more information). Note that in the counter, the eventHandler includes the attribute assignment disableValidators = "true" . This map for "Process data without valid data" option, while instant = "true" maps on the "Validate or Not Update Data" option. When this second option is used, the event runs without moving any update for the d...

javascript - exporting TypeScript modules for browserify -

I have recently changed a canvas library, in which I wrote in the type scripts. I have broken the code into classes and they are all connected to a cnvs module, but I'm having trouble compiling these files in one file Ideal I would like to run my files through the browser, but at the moment I want to do it. A file module CNVS {export class shape {// here stuff}} and then another /// Basically I use the import shape = need ('./shape') I was trying to export the CNVS module in my CNVT file (with some variants, like adding extensions and not leading). '/')] / P> In my CNVT file, So when it is compiled, I have a file in the code base, connecting to the window or connecting More files that can be compiled with the browser in a file. The full code is thanks check out Type : Please note that you should go to Node.js.

json - Can I get objects by name with libjson? -

Can I get an object with name with libjson? I have set up Liboxon. I am surprised that there is no way to get value from object name. I have to write my work or am I missing something? If you are using a C ++ library, JSONNode class overloads the [] operator . Document copy: JSONNode & amp; Operator [] (const json_string & amp; name); Const jessanod & amp; Operator [] (const json_string & amp; name) const; This will refer you to a child's node in either a specific place or in his name. Asking for node, which is not there, will be undefined behavior.

Passing variable from javascript to php without using window.location -

I am creating a text box by clicking the Add Dynamically button. In this, I want to increase a count variable when click the add button. How can I get this count value in my PHP file? I have tried the window, but it is not working. My code is: & lt; Script & gt; Var counter = 1; Generate function () {var count = counter; Answer: in the php file $ count_val = $ _GET ['js_var'];

sql server - How to check numeric value in sql? -

This is my code. I want only numeric characters if it is other than numeric, then do not print. Here is the substring of one of the MMSG strings, which is dynamically created. So I can not change the type of 'MMS int', '3' or '4', ' Etc. MGGM includes commas, so I want to check for numeric. Consider a comma as numerical () numeric. I give 1 as the result. How can it be managed? Declare @ MSG varchar (5) Set @ mgg = ', 5' if (numerical (mmsg) = 1) print 'numeric' - logic and The messengers are definitely specifications they are discussing well in the community See for some discussions here. What you really need to do is not quite clear between the questions and the comments, but you can get it as simple as checking in order to ensure that there are no commas Is: DECLARE @msg VARCHAR (5) SET @msg = ', 5' IF nanameric (mmsg) = 1 and four indices (',', @ msg, 1) = 0 print 'Numeric' - argument END How...

To count number of 1's,0's,2's in a string in java -

I'm new to Java string operation. A string has 0, 1, showing something like 2 string content = "0011221100"; You can ask me a question why you do not keep it in the whole, because in my case I should only use the string. The output can be: 0's: 4's: 4's of 2: 2 How can I get it? If you only need to search for 1, 0's, 2's then you can do something like this: string content = "0011221100"; Int zeros = content.length () - content.replaceAll ("0", ""). Length (); Int ones = content.length () - content.replaceAll ("1", ""). Length (); Int twos = content.length () - content.replaceAll ("2", ""). Length (); System.out.println ("0's:" + zero); System.out.println ("1:" +); System.out.println ("3:" + Doa ");

java overflow during vector norm calculation with long -

I have 2 lengths to calculate the ideal of a 2dim vector: (example) tall x = 4294967296 L; Long y = 0 l; Long results; Result = (long) math. Square (x * x + y * y); My problem is that I have numbers so that they fit into X, Y and the result. But there is an overflow in computation of x * x and y * y. Is there any easy way to avoid this or do I have to use BigInteger? BigInteger should be your choice.

How to remove sidekiq specific redis cache via capistrano prior to a restart -

On rail code deployment, the Sidekick has started again and we want to remove the sidekick specific redis cache from its earlier example Starts again This is what we want to achieve 1. Sidekick: Stop 2. Connect to Remote Radis, which is indicated by the side 3. Select the database (select 1). 3. Remove the cache (say flush) How do I automate it through a catalytic? You can flush the sidekick queue in your step # 3 by calling them directly, or in your own rack task Can Sidekiq :: ScheduledSet.new.clear # Clear the scheduled queue .. Sidekiq:: RetrySet.new.clear #Remove any occasional stir

text - Read with order files in subfolders in matlab -

I have a folder that has subfolders with text files; I want to read those files in the same order because they are subfolders I have a problem with that I use the following matlab code: outNames = {}; K = 1; Feature = zero (619,85); FileN = cell (619,1); For I = 1: length (nameFolds) dirList = dir (strcat (path, num2str (cell2mat (nameFolds (i, 1)))); Name = {dirList.name}; OutNames = {}; For J = 1: numel (names) name = names {j}; If ~ isequal (name, '.') & Amp; Amp; ~ Unequal (name, '..') [~, name] = fileparts (name {j}); Outname {end + 1} = name; FileName = strcat (path, num2str (cell2mat (nameFolds (i, 1)), '\', name, '.descr'); Feature (k, :) = script (filename); FileN {k} = [filename is num2str (k)]; K = k + 1; At the end of an interval I found the above text file names in a subfolder: AnimalPrint_tiger_test_01.descr AnimalPrint_tiger_test_02.descr AnimalPrint_tiger_test_03.descr AnimalPrint_tiger_test_04.descr AnimalPrint_tiger_tes...

asp.net - Paypal confirmation when the transaction has been successfully done -

I've redirected my website to the button, but where should I place my code Can anybody please help when the transaction has been successfully done? I need to change my position in my binding to pay. string = request as a dark string .QueryString ("user"). ToString Dim temp1 as integer = Convert. ToInt32 (Temp) Dim LastName string string retarding email as string retaining value in the form of string name of country string string name as string name string string Name the first string as the string, using the string as 'SqlConnection' (_start) as 'your SQL string' make the dim sql1 string = "select item .name, BID.WinningPrice, member.listname, ss Items from the items coming from the item, Member.Email, Member Item, on the seller Item ID: Sell IDID vendor. Join the auction on SellerIdIDINID, IITEMID = Auction. IitemID INNER Bidding on the auction. Members at the Auction Inner Vendor Join Member. Member ID = Member, Member Id where (Member stat...

ios - App game is finished, but when publishing to the ipad, game App will not install -

Thanks for reading my question post I make it simple & amp; Easy to read posts - & gt; Game app has been reached with Windows PC with Adobe Flash Pro CC. 2) & gt; a) "created" applet certificate {"device" - Windows openSSL, to create Apple proof Note li> B) "created" App ID ( Done ) // ( . ) 3) Publishing settings - " Target " * 4.0 ! 5) Tap the app to install on the iPad and it should work What's happening now! The app will never install "Do not get trapped in Fujin State" and "icon starts graying" My Tech Spaces ## Windows 7 Windows 7 Flash Pro CC iOS 4.0 for Air AS (3) iPad Air iOS 7 "I do not have Mac PC" Randomized Troubleshooting Ideas Is it IPA De Dive IOS 7 Hurt Me? Or do I have to add some ActionCapt 3 code to Flash in my works. Or is this my windows PC exported on my iPad? At this point my brain has bee...

debugging - Reference - What does this error mean in PHP? -

What's this? There are many answers about warnings, errors and notices, while programming PHP and no clue how to fix it is also a community wiki, so everyone should add this list and keep it Has been invited to take. Why is this? The questions are often the same as the stack overflow or the root cause of those questions is always the same, so the answers to those questions usually repeat them and then show the OP which lines are special The case is to change. These answers do not add any value to the site because they only apply to the special codes of OP. Other users with the same error can not easily remove this solution because they are very local. It is sad, because once you understand the root cause, fixing the error is trivial, therefore, a general way to implement this list Attempts to explain the solution. What should I do here? If your question has been marked as a duplicate of this, please apply your error message below and to correct your code. Answers are ...

html - Full width responsive drop down menu -

My responsive menu is to build and work well but I want it to fill 100% width of the screen Unless it is converted to mobile. You can see it here: Currently you will see that the menu link goes down one line to fit on the screen. Whether it is possible to measure its padding to fit the full width width, or until it has turned into a mobile style, it must be allowed to flow outside the viewable area. / P> I hope this makes sense. thanks li The menu is still in the cover The rapper gives the site a defined width if you want a menu on the full size of the screen, then you have to take it out of the cover.

android - can't access SDCARD at the starting time of device in livewallpaper -

The wallpaper in which I am displaying data from the database, which is actually in the SD card - firstly If I want to use data I have put some bet on sdcard if (Environment.getExternalStorageState (.) Equals (Environment.MEDIA_MOUNTED)) { this is okay, now when I restart my device at the startup time of my device, then my wallpaper wants to access the database, so that It will first check the condition, but it will return FALSE It may be that the SD card has been mounted shortly after the start of the Android OS. .. So can someone suggest me how to solve this issue, because the large size database is to put on the SDCARD SDCARD It may be that Android has been installed after some time OS Yes to register properly, so action. MEDMount The HeN SD-card has been mounted to receive broadcast recipient transmissions. The first register in AndroidManifest.xml is BroadcastReceiver: & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; Do you...

java - Twitter4J, Direct Messages -

I have a problem with the Twitter API. I have created an app for Android using the Twitter 4J library, I have been able to log in users correctly, check my timeline, details, profile data, but I can access your direct messages. there are problems. Every time I jumps the following error: Error N Reality: DirectMessage Activation 403: The request is understood, but it has been rejected. An error message will simultaneously explain why this code is used when requests are rejected due to update boundaries ([link] [1]). Message - This application is not allowed to access or delete your direct message. Code - 93 Contextual discussions on the Internet or TwitterException` {exceptionCode = [00919618-14e73985], stats = 403, message = This app is not allowed to access or delete your direct messages. Code = 93, retryAfter = - 1, Rate LimitStatus = RateLimitStatusJSONImpl {Balance = 12, limit = 15, resetteminsecond = 1392219303, second anniliterate = 122}, version = 3.0.5} ` ...

Is there a way to control camera exposure (darker/lighter) in ActionScript/Flash control? -

Is it possible to control camera exposure compensation from the action script? this is it! So you need to use one (Adobe Native Extension). I've got one for iOS and probably this (iOS and Android's superpets) also works for your purpose. Cheers

jquery - jenkins Error sending to the following INVALID addresses:xxx@yyy.com -

After completing Jenkins test execution gives the following: send the following INVALID addresses Error in: Valid Emailid Jenkins Build Log: Create the form of the 'executed shell' failure type For the marked email was triggered: Sending email for failure trigger: sending failure email: Valid email id following INVALID Error sending to address: valid email id expired: failure I also get this error , And Jenkins displayed an "invalid address" error in the build log, but listed a valid email address. I fixed it "Manage Jenkins" - & gt; Under "Configure System" and "Jenkins Place" set the "e-mail address e-mail address" to a valid email address (default address is not set & lt; nobody@nowhere.org> ). I am using it.

java - Table is not created after running the query -

I have a problem to create the table, what is happening is the following, I have an XML file Questions need to be implemented when changing the version. The problem is that it reaches the height of the process of performing the query, but the database is not changed, the odd thing is that my XML file has two separate questions, the first run, but the second and the second It does not point to any bank error, my script is correct and it is returning all the questions, but it happens and I do not know why merge down Responsible for executing the query XML My task: private boolean execSqlByQuery (catalog & lt; String [] & gt; listaQuery, SQLiteDatabase db) {boolean result = false; If (! ListaQuery.isEmpty ()) {try (for ii = 0; i & lt; listaQuery.size (); i ++) {for (int j = 0; j & lt; listaQuery.get (i) Length; J ++) {db.beginTransaction (); Log D. ("SQL", listEnclaimate.IT (I) [J] .oststring ()); Db.execSQL (listaQuery.get (i) [j] .toString ()); Db.setTra...

visual studio - Installing assemblies to special folders like VS PrivateAssemblies in NuGet package -

We are going to be published as one of our business segments, a .NET Grid Control, a NuGet package. The product is divided into 2 DLLs - one is the main methodology, and the other is the design-time support assembly. The main assembly can be redistributed as "normal" DLL and it can be placed at any location. But the whole product should be installed in any folder to work properly in VS IDE, in a particular folder, such as design-time of the particular studio Private Skeblion folder or a specific registry key that indicates it. Do NuGet packages allow us to do this? This is how you need to use Chocolatey package for the run-time dependencies. NuGet packages [only] designed for [the build-time dependencies] See - is the use of chocolate Nuget hood, but there is a different focus is probably "anywhere" DLL, and VS Designers will use NuGet for a separate chocolate package for support.

rails pass instance variable to layout or local variable -

I have a navigation bar (actually two) and I have some controllers to implement it in a dynamic data (second Times can not exist in some), I have seen so many complaints that many footage scenes are not seen, and they have been suggested to render them to local people. I am thinking of using an example variable to generate these things in the main layout, whether or not it is a good idea, and if it is not, how should I do this, render to overwrite the default view And I use the data in the main layout only I'm not sure that I have a good question Understand the way But for some of my menus I use something like this in my layout: And I use content_for: menu_top to generate content in this area. For example: For & lt;% = content_: menu_opt% & gt; & Lt; Li & gt; My special content or var & lt; / Li & gt; & Lt;% end% & gt; Here is the guide to the content:

node.js - Using Passport.SocketIO cookie parser error -

मैं निम्नलिखित का उपयोग कर रहा हूं: "निर्भरता": {"express": " ^ 4.0.0 "," सॉकेट.ओ ":" 0.9.16 "," मोंगोज़ ":" ^ 3.8.8 "," पासपोर्ट ":" ^ 0.2.0 "," पासपोर्ट-स्थानीय ":" ^ 1.0। 0 "," एक्सप्रेस-सत्र ":" ^ 1.0.3 "," कुकी-पार्सर ":" ^ 1.0.1 "," बॉडी-पार्सर ":" ^ 1.0.2 "," सत्र-मंगोज़ ":" git : //github.com/danpe/session-mongoose.git#master "," passport.socketio ":" ^ 3.0.1 "} मेरी socket.io प्राधिकरण सेट करना: io.set ("authorization", passportSocketIo.authorize ({पासपोर्ट: पासपोर्ट, कुकी पार्सर: कुकीपरर्स), कुंजी: settings.sessionKey, // कुकी जहां एक्सप्रेस (या कनेक्ट) उसे संग्रहीत करती है सत्र आईडी गुप्त: settings.sessionSecret, // कुकी स्टोर को पार्स करने के लिए सत्र गुप्त: sessionStore, // सत्र का उपयोग करता है जो एक्सप्रेस एक्सप्रेस विफल: फ़ंक्शन (डेटा, स्वीक...

twitter bootstrap - Boostrap 3.1.1 - CSS not kicking for IE9 -

I have read posts related to Bootstrap 3 and IE 9, although none of the responses wanted to apply or work . We are working on a Dev site with Bootstrap and for some reasons CES does not apply to IE9 view. I have found the right method, etc. So I wonder why this is happening Can anyone take a look and offer advice? Here's the URL: [REDACTED - no longer required] I think Is Internet Explorer CSS disabled? Have you checked for it? Bootstrap works fine for me in Internet Explorer

r - recoding a string vector using multiple words -

मेरे पास निम्न दो वैक्टर हैं: vector1 & lt; - c ("कनाडा" , "ईईयूयू", "ईई यू यू", "उरुग्वे", "मैड्रिड", "पेरू", "चिली") वेक्टर 2 & lt; - c ("ईयूयूयूयू", "ईई यू यू", "मैड्रिड") / पूर्व> मुझे पता लगाना है कि वेक्टर 1 से कम से कम वेक्टर 2 के एक शब्द से मिलान होता है। इसका परिणाम होना चाहिए: # गलत सही सच गलत गलत झूठी हैं मुझे पता है कि यह एक करके कैसे करें, vector3 & lt; - "ईईयूयू" str_detect (vector1, vector3) # असत्य सच झूठा झूठी झूठी झूठी लेकिन एक ही समय में यह सब करने का एक तरीका होना चाहिए । मुझे पता है कि यह एक सरल सवाल है, लेकिन मुझे इसका कोई जवाब नहीं मिला है जो इसे सीधे बताता है बहुत धन्यवाद, इसे आज़माएं वेक्टर 2 में वेक्टर 1% भी ? मैच पढ़ता है और यदि आप ऑपरेशन सेट करना चाहते हैं, तो union और ? Intersect

Coldfusion 9 cfscript cfcookie and cookie (script style) -

I am trying to set my cookie CFD and CFTOcen only in the CalledDeX 9 as HTTP ... Here's what I have tried (not an error but did not work): cookie.CFID = "# session.cfid #, httpOnly = 'true'" ; Cookie CFTOKEN = "# session.cftoken #, httpOnly = 'true'"; I have also tried (none ... and no error): cookie.CFID = "# session.cfid #; HttpOnly = 'true' "; Cookie CFTOKEN = "# session.cftoken #; httpOnly = 'true'"; And this (which I think only works in CF10): cookie.CFID = {value = "# session.cfid # ", HttpOnly =" true "}; Cookie CFTOKEN = {value = "# session.cftoken #", httpOnly = "true"}; then (this is not an error but did not work): cookie (name = "CFID" value = "# session.cfid #" HttpOnly = "true"); Cookie (name = "CFToken" value = "# session cftoken #" httpOnly = "true"); When I run these,...

html - 2 div's position not working on firefox -

I have a problem with my website, I have content container where I have the left photo and the name of the product on the right is. This is working on Chrome, but on the Mozilla FF number I do not know what can be wrong. Can anyone help me? & lt; Div class = "product-photo" & gt; & Lt; Img src = "picture / product.png" class = "product" alt = "product" & gt; & Lt; Img src = "image / product-min" alt = "product-minus" /> & Lt; Img src = "picture / product-minute" alt = "product-minute" style = "margin-left: 26 pixels;" /> & Lt; Img src = "picture / product-minute" alt = "product-minute" style = "float: correct;" /> & Lt; / Div & gt; & Lt; Div class = "about-prod" & gt; & Lt; Div class = "product-info" & gt; & Lt; Span class = "title" & gt; Info: & lt; / Span ...

android unable to start Component Info -

I have this logic error that this activity can not start .. 04- 25 17: 51: 54.889: e / AndroidRuntime (1238): process: com.mobilebasedtexttosignlanguageconverter, PID 1238 04-25 17: 51: 54.889: e / AndroidRuntime (1238): java.lang.RuntimeException: activity unable to start ComponentInfo {com.mobilebasedtexttosignlanguageconverter.mainActivity}: java.lang.NullPointerException 04-25 17: 51: 54.889: E / AndroidRuntime (1238): android.app.ActivityThread.performLaunchActivity (ActivityThread.java June 195) 04 -25 17: 51: 54.889: E / AndroidRuntime (1238): android.app.ActivityThread.handleLaunchActivity (ActivityThread.java 2245) on 04-25 17: 51: 54.889: E / AndroidRun time (1238): On android.app.ActivityThread .access $ 800 (ActivityThread.java:135) 04-25 17: 51: 54.889: E / AndroidRuntime (1238): On android.app.ActivityThread $ H.handleMessage (ActivityThread .java: 1196) 04-25 17:51: 54.889: E / AndroidRuntime (1238): d.os.Handler.dispatchMessage on Android (Handler.java:102) 04-25...

ios - how to convert a dictionary's keys into an array sorted by the values to which those keys correspond in the dictionary -

I have a dictionary; its keys are string and its value is NSDTs, for example: {A: & lt; John 1 & gt ;, B: & lt; March 1>, C: & lt; Fab 1 & gt; } I want to create an array with keys in the dictionary sorted by date (A, B and C). So I should end up with the following array: [a, c, b] How can I do this? Bonus Points : With that sort array, I can accomplish my ultimate goal, but the sorted arrays will be mediators only; The most elegant solution will not be required. What I really want to do is an array of objects, each of which has a property value related to one of the keys in the dictionary, for example: [ Obj1, obj2, obj3] where obj1.prop = a obj2.prop = b obj3.prop = c I want to sort that array based on date values ​​of A, B, and amp; C refers to the dictionary, therefore, my final goal in this scenario would be the following array: obj1, obj3, obj2] Thanks! Building on David's answer, this will solve all this together:...

php - Checkboxes and MySQL -

Not knowing the "Insert" checkbox in the database is not a normal case, I have a form with many checkboxes. About 25 checkboxes are with 1-25 each with the same names and values, now the thing is that I need the same name to run those scripts that prevents the selection of more than 4 checkboxes ... HTML code & lt; Input type = "checkbox" name = "ckb" id = "engineering workshop" value = 1 onclick = 'chkcontrol (0)'; & Gt; & Lt; Label = "engineering warehouse" & gt; Engineering workshops & lt; / Labels & gt; PHP code $ engineeringworkshops = mysqli_real_escape_string ($ dbcon, $ _POST ['cob']); $ Sql ​​= "Include in Courses (Student, Engineering Work) Value ('$ studentid', '$ engineeringwokshops')"; The engworkshops column type is tinyint (4) set default value 0 Use such HTML: & lt; Form & gt; & Lt; Input type = 'checkbox' name...

xml - vbscript xmlhttp request authentication. access is denied -

I'm trying to capture a xmldocument with the VLC web interface. My script is intended for the past, but recent versions of VLC have started authentication to reach the web interface and there is no way to disable it (or change user names). On Reset Error Next Set xmlDoc = CreateObject ("Msxml2.XMLHTTP.6.0") xmlDoc.Open "GET", "http: // localhost: 8080 / request / status.xml "Wrong", "password", xmlDoc.send () I know that the user / pass I am providing is correct because I access the document through my browser I can do Any ideas? Thank you The problem was that I must set the request in base 64 format Header with password xmlDoc.Open "GET", "http: // localhost: 8080 / request / status .xml", wrong, "", "password" xmldoc should be dim base64pw base64pw = "OnBhc3N3b3Jk" xmlDoc.Open "GET", "http: // localhost: 8080 / request / status.xml" , Wrong,...

regex - Find pattern in line and replace where portion of pattern is evaluated in substitution -

I have a text line (new file format with bootstrap values) which has several numbers between 0.000 and 1.000 I want to multiply between 100 and 0 and 100 return values ​​as a rounded integer. These numbers are all before "" and after that ":" There are other numbers in the line of text that I want to leave untouched, which are not surrounded by them. I'm trying to do it with Pearl One-liner: perl -ape / s) (\ d \. \ D +): / \) int ($ 1 * 100 + .5): / e.g. Test.newick However, due to a syntax error it is failing, I believe because it is ")" and ":" Try to stay Any suggestions how can I do this? Thanks! Some issues: A bracket is a regex special character. Your RHS needs to use string combinations, as it is being removed using Consider 'S { \] (\ D. \ D +):} {"}" .inte ($ 1 * 100 + .5) ":"} For example 'test.newick' Alternatively, you can use letterhead And if you do not want ...

Reading a GUID Property from COM object with C++Builder -

I have a third party COM object with which I am working. . Most okay, but I'm stuck on reading a GUID property from the object The auto-generated component looks like the rapper / header's relevance: / / * ******************************************************************************************** ************************************************************************************************* ** ************** // DispIntf: IFoo // Flags: (4416) Dual OleAutomation Dispatchable // GUID: {5DE5DAAF-5419-4B2B-9771 -58EAEE780799 } // ***************************************************************************************** ****************************************************************************************** template Square T & gt; Class IFooDispT: Public TAutoDriver & lt; IFoo & gt; {... BSTR __fastcall get_FileName (zero); HRESULT __fastcall get_ProjectGUID (/ * AUTO_PARAM_ERROR (System :: TGUID * value) * / VARIANT * value); HRESULT __fastcall get_ProjectN...

swing - Looping Music in Java -

I am trying to get this program to loop in the infinite song, but I have only done it once Has been successful. Any advice? public static zero music () {string filename = "dark green wave"; Continuous periodontalstream loop = faucet; InputStream Inn = Null; {In = new FileInputStream (filename); } Hold (FileNotFoundException ex) {System.out.println ("File not found"); } {Try the new audio stream (in) of the audio stream; AudioData MD; AudioPlayer.player.start (s); } Hold (IOException pre) {System.out.println (ex.getMessage ()); }} You are not using the loop variable Are there. Try it out like this: audiostream s = new audio stream (in); Audiodeeta audidadata = s.getData (); Loop = new continuous audio data stream (audiadata); AudioPlayer.player.start (loop);