Posts

Showing posts from May, 2011

How to Draw Arrowline in android.graphics.Path with correct configerations -

Image
Whatever I've tried: I want to display it Trying Arrow line with the following code path mArrowPath = new paint () ;; MArrowPath.rewind (); MArrowPath.moveTo (0, mHeight / 2); MArrowPath.lineTo (mWidth / 2, 0); MArrowPath.lineTo (mWidth, mHeight / 2); MArrowPath.lineTo (mWidth * 3/4, mHeight / 2); MArrowPath.lineTo (mWidth * 3/4, mHeight); MArrowPath.lineTo (mWidth / 4, mHeight); MArrowPath.lineTo (mWidth / 4, mHeight / 2); MArrowPath.lineTo (0, MHIGH / 2); Size pathshap = new pathshap (mArrowP, maxWidth, maxHeight); Size Drawnable Size D = New Size Drainage (Pathshap); ShapeD.draw (canvas); // Display it in onraw (canvas canvas) I got the following result Problem: I can not find the expected results, the following Failed to understand / find the path configuration parameter to display the result! I failed to increase the size of length , width arrow line. Expected Result: Any help will be grateful! You can use the canvas.ronnet () method to ...

php - export data as excel file -

I can easily export data by simple code, but I have a problem when I export information from J. query to code The data export.php file code is not downloaded as below & lt; Php include '../../config.php'; Function CleanData (& amp; $ str) {if ($ str == 't') $ str = 'TRUE'; If ($ str == 'f') $ str = 'FALSE'; If preg_match ("/ ^ 0 /", $ str) || Preg_mach ("/ ^ \ +? \ D {8,} $ /", $ str) "); $ out = FOPN ("Php: // output", 'w'); $ flag = wrong; $ result = mysql_query ("select from the staff") or die ('questions fail!'); While (false! == ($ line = Mysql_fetch_assoc ($ results) {if (! $ Flag) {fputcsv ($ out, array_keys ($ line), ',', '' ''); $ flag = true; {$ Row ['photo']! = '') {$ Row ['photo'] = "http: // lo "$ Line [$ line, 'clear data]' 'photo'];} fputcsv ($ out, array_values ​​($ line), ',...

c# - Binding Data text field, Data value field to asp:Dropdownlist -

I created an assistant function to bind the drop down list in asp.net. View my function: Public Zero BindDDL (String Query, Dropdown List DDL) {List & lt; Issuetype & gt; Obj = new list & lt; Issuetype & gt; (); Issuetype iss = new Issuetype (); Iss.DeptId = 1; Iss.Issue = "SSS"; Iss.IssuetypeId = 4; Obj.Add (ISS); // Balisu BL = New Balance (); // from the list & lt; Issuetype & gt; ObjSource = null; // objSource = Bl.Bind_issuetypes (query); DDL.DataSource = obj; DDL.DataValueField = Convert ToString (obj [0]); DDL.DataTextField = Convert ToString (obj [1]); DDL.DataBind (); } In this way, if I send the query name and dropdownlist id to the function, the drop-down should be bound by the list of the insuity unit, you can see the properties of Issuetype in the code. But although I am not able to set DataValueField and DataTextField correctly. Every time this index is saying outside the category. data value field and datattextfield ...

Converting C# regular expression to JavaScript regular expression -

I have created a regular expression in C # that I am using in model recognition. I have the same requirements in javascript Please help me convert. There is a regular expression in C # [required] [display (name = "cost")] [datatype (query)] [regular expression (@ "^ (([A-zA-Z] + | | (\ d {0,15}. \ D {0,2})) $", error message = "cost can not be more than 2 decimal places ") [Range (type)," 0.01 "," 99999999999999.99 ", errormess =" {0} must be greater than one decimal / number 0 and less than 100 billion billion. ")] Public taps qualified & lt; Decimal & gt; Cost {Received; Set; } and another verification message should be "Number one field" I'm trying in JavaScript like this var regExp = new RegExp ("(([a-zA-Z] +) | (\ d {0,15}. \ D {0,2})));); var res = RegExp.test ($ ('# cost'). Val ()); But it always gives the truth thanks If you are trying to verify that the c...

php - hasAndBelongsToMany relationship in CakePHP not saving the data -

I am facing a problem in the KPHP and I want to go to Bellgoms bs_categories and bs_listing_types tables (one category can have multiple entry types). This is the table structure that I have used. bs_categories ------------ - id int (10) parent_it int (10) lft int (10) rgat int (10) title work (255) body Text meta_title formatting (255) meta_keyword text meta_desk text slog varchar (255) status int (1) date-time modified datetime bs_listing_types ----------------- id int (11) title varchar (255) position int (1) created datetime modified datetime bs_listing_types_categories ----------- ---------------- id int (11) listing_type_ident (11) Category_ID int (11) I have a model in Written code is written: / ** * andBelongSyahon Associations * * @Syar Array * / Public $ andBelongsetTime = Array ('ListTip' => Array ('Classname' = & gt; 'LitLight Type', 'Jointable' = 'Gtc:' listing_types_categories', 'ForeignKey' =...

How to extract text between quotes with regex in ruby -

I have the following string and I want to remove the text between the single quotes. The javascript function ('Mary D' Avignon ',' - ',' ',' 3 ') The problem is solved for me alone quote (There can be many incidents of escape characters), so the match should be Mary D. Avignon - 3 Support is appreciated You can try regex below, (? & Lt; = ') (?: [^'] * \ \ ') + [^'] * (? = ') ( ?: [^ '] * \\') + Regedx ensures that the quoted A quotation quote inside the string should be present.

ffmpeg - how to add duration to mjpeg or how to make mjpeg faster -

I have an IP-Cam MJPEG that I have created and it has a total of 240 frames encoded sauce ffmpeg.exe -framerate 25 -ic: \% 06d.jpg \ -s 1920x1080 -qscale 1 -vcodec mjpeg -r 25c: \ result.mjpg -y now I want to make my life the result by mjpeg player. Mjpg My problem 1. I can not find the time of play time or duration of mjpeg 2. The game is slow then there is another movie player so I want to sync it play it faster Ffprobe results input # 0, mjpeg, 'result.mjpg' below: Duration: N / A, bitrate: N / A stream # 0: 0: Video: mjpeg, yuvj444p (PC, bt470bg), 1920x1080, 25 TBR, 1200K TBN, 25 TBC results below -show_frame [frame] media_type = video key_frame = 1 pkt_pts = 720000 pkt_pts_time = 0.600000 pkt_dts = 720000 pkt_dts_time = 0.600000 Srwottm_ifort_taimstmp = 720000 Srwottm_afort_timstmp_taim = 0.600000 pkt_duration = 48000 pkt_duration_time = 0.040000 pkt_pos = 4731406 pkt_size = 313,289 width = 1920 height = 1080 pix_fmt = yuvj444p sample_aspect_ratio ...

Sql Server date format should be like " Oct 17, 2014 10:14 PM" -

मुझे दिनांक प्रदर्शित करने की आवश्यकता है "10 अक्टूबर 2014 1:06 अपराह्न" मेरा एसक्यूएल प्रश्न SELECT STUFF (CONVERT (char (19), CURRENT_TIMESTAMP, 100), 18,0, '') और यह "10 अक्टूबर 2014 1:06 अपराह्न" आपके पास पहले से सामान के लिए सिंटैक्स है आप बस एक और सामान क्यों नहीं जोड़ते हैं? का चयन करें स्टूफ़ (स्टूफ़ (कनवर्ट (चार (19), क्यूआरआरआईटीएमटीएमएपी, 100), 18,0, ''), 7,0, , ')

TortoiseSVN: How to update multiple directory in a single window -

I would like to create a command file which will update my SVN. I have two different paths. I have a code that will update two unique directories. Is there a way to do this in the same line of code? @echo off cd C: \ Program Files \ TortoiseSVN \ bin \ Start TortoiseProc.exe / command: update / path: "C: \ Files \ SVN repository \" / closeonend: 0 Start TortoiseProc.exe / Command: Update / Path: "C: \ Files \ SVN Repository \ _UAT" / closeonend: 0 I want to look it like this: Thanks advance! From to: Because some commands take a list of target paths The / path parameter can take many paths, code> * character end of the page (for example, collect many specific files) One of the examples given in this illustrates: TortoiseProc.exe / command: commit / path: "c: \ Svn_wc \ file1.txt * c: \ svn_wc \ file2" .txt "/ logmsg:" test log message "/ closeonend: 0 So you should take both paths together Separate from...

Mysql select query special conditions -

मेरे पास 3 टेबल डीबी हैं: फ़ाइल , category और file_to_category । मेरे पास श्रेणी आईडी है और केवल इस श्रेणी के लिए संबंधित फाइलों को चुनना होगा। file_to_category तालिका संरचना है : आईडी file_id category_id क्या केवल 1 क्वेरी का उपयोग करना संभव है? चुनें f। * फ़ाइल से f में file_to_category fc fc.file_id = f.id पर समूह द्वारा एफ.आईड गणना (भिन्न fc.category_id) = 1 और योग (fc.category_id = $ your_category_id) & gt; 0

c# - How to show user login name on the next page -

When you open the application, my first screen is logged as you have 10 and There are pages. I want the name of the person who is logged into all pages (Welcome, User!). I have no idea how to do this This is my code: Private zero btnLogin_Click (Object Sender, RoutedEventArgs e) {txtUsername.IsEnabled = true; TxtPassword.IsEnabled = true; TxtMessage.Text = ""; TxtMessage.IsEnabled = false; Try {SqlConnection Okonation = New SqlConnection (_ConnectionString); SqlCommand oCommand = New SqlCommand ("Choose from the register where the user's name = '" + txtUsername.Text + "' and password = '" + txtPassword.Password + "' ',' oConnection); if (oConnection.State == ConnectionState.Closed) oConnection.Open (); SqlDataAdapter Adapter = New SqlDataAdapter (); SqlDataReader Reader = oCommand.ExecuteReader (); String Username = Null; if (reader.HasRows) {username = txtUsername.Text; oConnection.Close ( ); Navigation service _N...

c++ - Why can't we allocate dynamic memory on the stack? -

It is great to allocate goods to the stack because we have an RAI and you do not have to worry about memory leaks. And though sometimes we have to allocate on the heap: If the data is really big (recommended) - because the stack is small. If the size of the data to be allocated is known only in the runtime (dynamic allocation). Two questions: We can not allocate dynamic memory on the stack (i.e. memory size which is only available in runtime Is known)? Why can not we just see the memory on the heap, through the points, while on the stack can the memory be sent through normal variables? To wit. Thing T; . Edit: I know that some compilers support variable length arrays - which dynamically allocate stack memory but this is actually an exception to the general rule. I am interested in understanding the basic reasons for this, generally, we can not allocate dynamic memory on the stack - the technical reason for this and the rational behind it Why can not we allocat...

knockout.js - Knockout JS : Setting value to Dropdown? -

I have integrated knockout JS in your project and now I'm experiencing some problems in setting the user selected values ​​from the dropdown am, "id =" options: RDOBM, optionsText: 'name', selectOptions: selRDOBM "name =" "class =" date-sales month "Tabindeks =" 3 "& gt ; JS file: RDOBY: Ko Ossebel Array ([{Name: "1986"}, {Name: "1992"}, {name: "name": "1 99 1", {name: "1 99}", {name: "1991"}, {name: "1992"}, {name: "1993"}, {name: "1994", {Name: "1995"}, {name: "{Name:" 1997 "}, {name:" 1998 "}, {name:" 1999 "}, {name:" 2000 "}, {name:" 2001 "}]); I am able to be able to drop these figures down and selected values, selRDOBY (). name But my problem is that I want to set this value to drop down. Example: With the backend system I'm receiving 2010 a...

php - Yii2 GridView widget not displaying data -

I have a scene where I am trying to output data: resonates Gridview:: Widgets (['dataProvider' = & gt; $ DATAprader, 'Columns' => [['' Labels '= & gt;' Contact ',' Attribute '=>' Client Contract ',' Value '= & gt; Client contractual contact ASHML', 'format' = & gt; 'raw'], ... etc. The problem is that no area is displayed Even if they are in the database and the mod Should be received by: public function getContactAsHTML () {return Html :: a ($ this- & gt; contact, ['contact / view /', 'id' = & gt; ; $ This-> ID])}} ... etc. Is this a problem in my thoughts or models? I think it's fixed, the problem was actually in the controller, where 'datapriver' Was being specified in the use. I have decided to do a 'hike' for a while now, where I sponsor a new data outside of the real scene, and now I can get it to display the d...

android - Cordova build is unable to resolve target even though target is installed -

I am trying to setup a Fongap project and when i cordova build android : Build failed / application / Android- sdk-mac_x86 / tools / ant / build.xml: 601: while executing this line following error: / users / David / project / Android -sdk -macosx / tools / ant / build.xml: 542: project goal 'android-L unable to resolve' the funny thing about it is that Android I-L Set target I run android list target I get: Available Android goals: ---------- ID: 1 or "Android-3 ".. Id: 11 or" Android-L "name: Android L-type (preview) Platform API level: l Amendment 4 Skins: HVGA, QVGA, WQVGA400, Dblukyuviaji 432, Dblyuesvijia, Dbluviaji 8800 (default), Dbluviajiaattia 4 , WxGA 720, WXG 8,800, WXGA800-7in Tag / Abi: Android-TV / ARME Mr. V 7 A, Android-TV / X86, default / Armebi-V 7 A default / X86, default / x86_64 Also I've explicitly set another Android from - Project-target for processing Like this: android update project -p-a android-17 I also t...

Getting Control Properties by Function VB.NET -

I am trying to create a function that will create some properties for control (in this case, a blankbox). However, the received control is not getting value properties from the function. Here is the function that makes the property. public function getComboboxProperties (ByVal dt ComboBox try dim ctrlCombobox as as DataTable) As New ComboBox ctrlCombobox.BindingContext = new BindingContext ctrlCombobox .DataSource = DT ctrlCombobox.ValueMember = " ID "ctrlCombobox.DisplayMember =" Description "getComboboxProperties = ctrlCombobox catch no exception return as former MessageBox.Show (ex.ToString," ", MessageBoxButtons.OK, MessageBoxIcon.Error) end Try end function New value has passed: cmbCompanyStatus = clsCommon.getComboboxProperties (dtStatus) h I open does not take form, Comboboks CMB Companstats Datasrs and does not show anything. Any help would be greatly appreciated. Thanks !. Given this, you remember the following: 'Eg...

c++ - Workaround for lvalue-to-rvalue conversion of the inactive member of a union within relaxed constant expressions -

The larval-to-rivalview conversion is not a continuous expression for converting a union into a union. given: template and constexpr function foo : in the template's & lt; Square t, square u & gt; Constexpr auto foo () {A & lt; T, U & gt; On{}); Return a.u_; } The following program: int main () {constexpr auto test = foo & lt; Int, double> (); Return 0; } Fails with error message: Error: constexpr variable 'test' constexpr auto test = foo & lt start by a continuous expression should be done; Integer, double & gt; (); ^ ~~~~~~~~~~~~~~~~~~ NOTE: The member's member 'u_' is not allowed to be read with active member 'T_', in a continuous expression a.u_ ; ^ Note: In the call 'fu ()' constexpr auto test = foo & lt; Int, double> (); ^ 1 error occurred. Is this behavior achievable in C ++ 14 continuous expression? . reinterpret_cast is not allowed either Inspiration:. I am trying ...

php - Session not saving for whole site -

I have a very strange problem with php session functions. First of all: Works in browsers random Select: FF on windows, but not on Mac, Chrome on both platforms, Safari IE does not work. I have a login script, where I will create a session if the login data is correct: session_start (); $ _SESSION ['username'] = $ user_info ['username']; Echo "& lt; east & gt;"; Print_r ($ _ session); Echo "& lt; / pre & gt;"; When I print_R in the login script, after setting the session variable, it works for all browsers. But after redirecting the user to the main site, the session is empty for some browsers .... I never had such a problem and I really do not know what to do ... session_start (); $ _SESSION ['username'] = $ user_info ['username']; Echo "& lt; east & gt;"; Print_r ($ _ session); Echo "& lt; / pre & gt;"; If it is that every page starts, I can understand that...

c# - How to conventionally set the LifeTimeManagement in a UnityContainer? -

मेरे ऐप में, मैं मैसेंजर अंतरफलक IMessagePublisher & lt; T & gt; एक सामान्य प्राप्ति वर्ग में SimpleMessenger & LT; टी & gt; । एक ही प्रकार T के लिए, एक होना चाहिए और केवल एक SimpleMessenger उदाहरण होना चाहिए ContainerControlledLifetimeManaged संभव अपवाद के बिना। मैं RegisterTypes का उपयोग automaticaly मेरी registerations के सबसे करने के लिए: unityContainer.RegisterTypes (AllClasses.FromAssembliesInBasePath (), WithMappings.FromAllInterfacesInSameAssembly, WithName.Default, WithLifetime.None, अशक्त, सच); और मेरे महान आश्चर्य की बात है, यह प्रतीत होता है कि कंटेनर अपने सभी साधारण संदेशवाहकों को स्वचालित रूप से पंजीकृत करने का प्रबंधन करता है! अप्रत्याशित रूप से, यह संभवतः एक अच्छी खबर है यही है, अगर मैं अपने सभी आईएमसेज पब्लिशर प्राप्तियों के लिए जीवन भर को कंटेनर कंट्रोलेड लाइफटाइम मैनेजमेंट के लिए पारंपरिक रूप से सेट करने का प्रबंधन करता हूं। कुछ शब्दों में, मैं अपने कंटेनर में एक "पंजीकरण रणनीति "जो कुछ ऐसा कहना होगा अगर (somehowO...

spring security - SpringSecurity replaying a login Grails -

In my Grails, I have configured it for Spring Security. Logging and changing the value of session token after logout Although the best practice for me, I was wondering whether the login should be done if the login is run again. For example, someone logs in, receives a valid session token (HTTP jsation). They then run the login again, should they get a new token or not? I think documents about addressing this potential issue Unless you have any technical reason to enable this feature, the best practice is to do this.

Android global variable not working between Service and Activity -

I am struggling for hours now, my global variable works in my service, but when I use that variable I try to use no result in my activity. Global var class: expand public class GlobalShare {public static GlobalShare singleton; Public listing & lt; LocationUsageDB & gt; Processed = new arreelist & lt; LocationUsageDB & gt; (); Public Static GlobalShare getInstance () {Return Singleton; } @ Override Public Wide On Crack () {Super. Connet (); Singleton = this; }} Contextual service code: public int onStartCommand (intended intent, int-flags, int startId) {if (gpschanged) {time t = New time (Time.getCurrentTimezone ()); T.setToNow (); String date = t. Format ("% Y /% m /% d"); Mydb.insertRecord (new locationUsageDB (foreground TaskAppName, date, t.hour + ":" + t.minute + ":" + t.second, "true", "false", double.trusting (worker.getLastKnownLocationNetwork (getBaseContext GetLatitude ()), DoubleToString (Worker ...

sql - Repeatedly fill missing 0 values -

मेरे पास निम्न डेटा के लिए है: shift date value ------ ---------------- ए 2014-07-01 5 ए 2014-07-02 8 ए 2014-07-03 2 बी 2014-07-03 1 सी 2014-07-03 9 दृश्य बनाने के लिए, प्रत्येक दिन में सभी पाली (ए, बी, सी) कहां होगी? बदलाव दिनांक मान --- ------------------- ए 2014-07-01 5 बी 2014-07-01 0 // 0 के लिए 0 मूल्य बी से 1.7.2014 सी 2014-07-01 0/0 से 0 के लिए मूल्य 0 से 1.7.2014 ए 2014-07-02 8 बी 2014-07-02 0 // 0 के लिए 0 मूल्य बी से 2.7.2014 सी 2014-07-02 0 // add 0 value for value सी से 2.7.2014 ए 2014-07-03 2 बी 2014-07-03 1 सी 2014-07-03 9 मुझे सभी तीन उत्पादन पाली (ए, बी , सी) प्रत्येक दिन के लिए भर गया, जहां कम से कम एक बदलाव ने कुछ काम की सूचना दी यहाँ उदाहरण है यदि आप लापता तिथियां नहीं डालनी चाहिये ... DECLARE @table table (shift CHAR (1), दिनांक दिनांक, मान INT) @table select 'A', '2014- 07-01 ', 5 बजे @table का चयन 'ए', '2014-07-02' में सम्मिलित, 'मील का चयन' ए ',' 2014-07-03 'के अंदर, 2 सम्मिलित करें @tab...

javascript - Google Maps Api: polygoneCoords = [javascriptvariable]; -

मैं कैसे follwing लाइन पढ़ सकता हूँ: var polygoneCoords = [javascriptvariable]; के बजाय वर polygoneCoords = [नई google.maps.LatLng (49.91727104462425, 10.872366428375244), नई google.maps.LatLng (49.91740920888044, 10.872366428375244) ]; बेशक मैं परिभाषित किया है "javascriptvariable", लेकिन मैं मिल ony: Uncaught InvalidValueError: एक LatLng नहीं या LatLngLiteral: सूचकांक 0 पर नहीं एक ऑब्जेक्ट " एक google.maps.Polygon ऑब्जेक्ट में एक या अधिक पथ हो सकते हैं। पथ एक सरणी (या MVCArray) निर्देशांक से बना होता है। प्रत्येक समन्वय, बदले में, google.maps.LatLng ऑब्जेक्ट या लाटलांग लिटरल है। इसका अर्थ है कि आप इसे किसी भी रूप में घोषित कर सकते हैं वर polygoneCoords = [नई google.maps.LatLng (49.91727104462425, 10.872366428375244), नई google.maps.LatLng (49.91740920888044, 10.872366428375244)]; या के रूप में वर polygoneCoords = [{अक्षां: 49.91727104462425, एलएनजी: 10.872366428375244} {अक्षां: 49.91740920888044, एलएनजी: 10.872366428375244}]; किसी...

I want to get object attributes from suds reply with Python but it contains 'return' -

मेरे पास यह सूड जवाब है (उत्तर) {return = (return) {lineGroup [] = (LLineGroup) {_uuid = "{4065AB99-B8AB-6B97-C930-AC3816346346}" नाम = "विफलता"}, (एललाइन समूह) {_uuid = "{1EF78256-030D-31F6-B70F-60DF93143646}" नाम = "Empfang"},}} जैसा कि मैं इसे समझता हूं, नाम विशेषता प्राप्त करने के लिए आप ऐसा कुछ उपयोग करेंगे: प्रिंट परिणाम। LLineGroup.name लेकिन इसमें 'रिटर्न' शब्द और पायथन का कहना है कि इसकी एक सिंटैक्स त्रुटि मैं क्या कर सकता हूं? असल में मैं इस प्रकार की आवश्यकता है: परिणाम में आइटम के लिए ['वापसी']। रेखा समूह: प्रिंट item.name धन्यवाद जॉन! इसे आज़माएं: प्रिंट परिणाम ['वापसी']। / Code> यह अन्य पुस्तकालयों और भाषाओं में एक सामान्य तकनीक है, और जब मैं एक सूड विशेषज्ञ नहीं हूं, तो कोड का त्वरित पढ़ने से ऐसा लगता है कि यह वू आरके।

How to to set the calendar start date and end date in java.util.Calendar -

Is there a way to set calendar start date and end date in java.util.Calendar? For example, by default, java.util.Calendar's start date is 01 January and calendar expiration date is 31 December. I have a specific case in which I want to start the calendar on January 5 and end on December 28. Even if it is possible to use some other time-libraries in Java, then it will be used for any idea / suggestion that this initial date and expiry date for the calendar How to Set Up According to the doctor, the Java.util.Calendar class is used to change a specific moment of time It is done, does not represent a part of time; Actually, the old date time classes of the bundle with Java like Java.Util.Det and. There is a lack of representation at the time of the calendar period. In addition to this, these sections are extremely troublesome and confusing, both in design and implementation are defective. Avoid them using the new Java package built in Add-on or Java 8 (inspired by Junk-Ti...

c# - Path of home directory in asp.net -

I am using the Urlrewrite iis module, my virtual path: local host / news / example-content HTML & lt; Script src = "js / jquery.min.js" & gt; & Lt; / Script & gt; = & gt; Localhost / News / JS / JqueryMM.JS & lt; Script src = "../ js / jquery.min.js" & gt; & Lt; / Script & gt; = & gt; localhost / news /... js / jquery.mmjs How can I fix this? You can use the Server.MapPath method: & lt; Script src = '& lt;% = server mappath ("/ ~ js / jquery.min.js")%> Type = "text / javascript" & gt; & Lt; / Script & gt;

android - managing checkbox visibility on listview onItemClick -

मेरे पास सूचीदृश्य और list_item लेआउट में एक छविदृश्य, पाठ दृश्य और चेकबॉक्स है मेरे adapater में धारा शीर्षक होता है जब मैं सूचीदृश्य आइटम पर क्लिक करता हूं तो चेकबॉक्स विज़ेल बना देता हूं और जब मैं उस आइटम पर फिर से क्लिक करता हूं तो चेकबॉक्स को अदृश्य बना देता हूं सूची दृश्य lv = (ListView) findViewById (R.id.friendsList); lv.setFastScrollEnabled (सही); FbAdapter = नया FbFriendsAdapter (यह, 0); lv.setAdapter (fbAdapter); lv.setChoiceMode (ListView.CHOICE_MODE_MULTIPLE); lv.setOnItemClickListener (नई OnItemClickListener () {@Override सार्वजनिक शून्य onItemClick (AdapterView & LT;? & gt; माता पिता, देखें देखने के लिए, पूर्णांक स्थिति, लंबे आईडी) {// TODO स्वत: निर्मित विधि ठूंठ fbAdapter.getSelectedFriend (); स्ट्रिंग एस = ( । स्ट्रिंग) ((TextView) दृश्य .findViewById (R.id.friendName)) gettext (); चेक बॉक्स सीबी = (चेकबॉक्स) view.findViewById (R.id.iv_check); cb.setVisibility (View.VISIBLE); सीबी। setChecked (सही), अगर (cb.isChecked ()) {Toast.makeText (FbFriendsListAc...

arrays - vectorize data from struct in matlab -

मैंने एक स्ट्रेट बनाया है: a (1) .x = {[ 1.1 5 8], [3 5 6]}; एक (2) .x = {[3.1 0 4], [9 8 7]}; और मान के साथ एक सरणी प्राप्त करना चाहते हैं [1.1 3.1]। मैंने कोशिश की है: ax {1} ( 1,1) कई संरचना तत्वों के लिए क्षेत्र संदर्भ जो अधिक संदर्भ ब्लॉक द्वारा पीछा किया जाता है एक त्रुटि है। कोई भी विचार कृपया? वाक्यविन्यास त्रुटि बताती है कि आप एकाधिक संरचना तत्वों के अंदर उप-संदर्भ आगे नहीं कर सकते इसलिए, स्पष्ट एक-लाइनर - लूप के लिए बहुत धीमी है- जो स्मृति को बचाता है: सरणीफन (@ (y) yx {1} (1 ), ए) प्रदर्शन के मुकाबले, लूप-आधारित संस्करण फ़ंक्शन A = my_extractor (S) A = zeros (आकार () एस)); एन = संख्या (एस); के लिए k = 1: एन ए (के) = एस (के) .x {1} (1); समाप्त; अंत

javascript - require filename while downloading file using request module nodejs -

I use the request module in nodes to download the file (image file only) using this I'm doing, request ('http://google.com/doodle.png'). Pipe (fs.createWriteStream ('doodle.png')), or request (url) .pipe (fs.createWriteStream (filename)) , But I only have url available and I need it to protect the file from its real name, so I must get the file name from the given url, Please suggest to me how the last part of the URL has been removed Thank you in advance ... A simple solution can be: var path = required ('path'); Var FS = Requirement ('FS'); // ... var filename = path.basename (url); Request (url) .pipe (fs.createWriteStream (file name));

q lang - How do I add several columns at once in kdb? -

Anyhow, I can only find examples showing how to add a column. So I wrote this code, which works, but I know that there is a better way to do this: the table exists with the column already filled with data, and add new columns to me Which are initially zero. T: Update column 1: `t; T: Update column 2: `t from; T: Update column 3: `t; T: Update column 4: `t from; I tried to create a function like this: colNames: `column1` column2`column3`column4; T: {update x: `each colNamesList; But it only adds one column and it's called X. Any suggestions to improve this code will greatly appreciate. I just have to add a lot more than 4 columns and my code is very long. Thanks! Several ways to get it .... Newcols: `col3`col4; Q) @ [Tab; Newcale;:;]] call 1 call 2 coal 3 coal 4 ------------------- a1b2c3 Also can specify different types q) @ [tab; Newcomers ;: (`; 0N)] col1 col2 col3 col4 ------------- ------ a 1b2c3 or Make a functional update q)! [`Tab; ();...

PHP namespace and autoload doesn't work -

मेरे पास query.php नामक एक फाइल है। नामस्थान परीक्षण {वर्ग प्रश्न {सार्वजनिक फ़ंक्शन __construct () {printf ("हैलो, विश्व"); Bootstrap.php में मैं इसे कॉल करने का प्रयास करता हूं: spl_autoload_register (फ़ंक्शन ($ className) {if (file_exists ('../ फ़ोल्डर / '.$ className।'। Php ')) {require_once' ../folder/'.$className.'.php ';}}); नया \ परीक्षण \ क्वेरी (); परिणाम: गंभीर त्रुटि: कक्षा परीक्षण \ क्वेरी नहीं मिली। नामस्थान के बिना यह ठीक काम करता है आपको इसे ठीक करना है \ के साथ DIRECTORY_SEPARATOR । परिभाषित करें ('BASE_PATH', वास्तविकपथ (डायनाम नाम (__ फ़ाइल__))); Spl_autoload_register (function ($ className) {if (file_exists (BASE_PATH। '../folder/' str_replace ('\\', DIRECTORY_SEPARATOR, $ वर्ग)। '.php')) {require_once '../folder/' $ ClassName '। Php';}}); यह आपकी निर्देशिका संरचना मान रहा है कि निम्न है /folder/boostrap.php / फ़ोल्डर / परीक्षण / क्वेरी Php ...

php - Unable to send POST request using AJAX -

I am unable to send a post request to my php file using AJAX. I have two files, the first is an index.php and the second is VerificationStatusAPIV2.php. The topics of index.php are: & lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; Dial 2 Verified API V2 (www.dial2verify.com) & lt; / Title & gt; By & lt; Title & gt; Phone Verification & Lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var try = 1; Var transactionTokan = ""; $ (Document) .ready (function () {$ ("# enter_number"). Submit (function (e) {e.preventDefault (); Start dial2Verify ();});}); Launch FunctionDial2 Verify () {showCodeForm (1); GetVerificationImage (); } ShowcodeForm (code) {$ (...

asp.net web api2 - Web API OData ignore properties added by client-side -

When I call my server using the WebAPI Odata v4 call I get no error. {"Code": "code": "" "message": ": message": "work: property 'test type' is not present on 'model request is invalid", "Innererror." Be sure to use {{. "Temporary" property only names that are defined by type. \ R \ n "," type .. ":" "" StackTrace ":" "}}} This error occurs because the property "test" model is not set to "Temp". It is actually added by Javascript, and used only in client-side I have so much That OData will not pay attention to the properties that are not available in the model. There is a way to deal with your scenario. It is not to ignore the properties, but to define the entity type as an open type, it is not acceptable to accept dynamic properties that are not defined in the model from the client, and if necessary, the future They...

vba - Searching multiple Excel workbooks for value in same cell and same sheet -

I am learning VBA in a new job and a project was assigned, in which about 100 workbooks include checking a price It is possible that in every one of the 100 workbooks contained in the same sheet of the same name in the same cell (I12), in any way, it is possible to use SQL in a variable in a variable from one cell to another, Can i compare Opens my workbook to compare my current code values, which works, but it's time consuming. If this is just a cell, then you would like to try ExecuteExcel4Macro ? some: sub-testing () dim dimension Flexal F. Fipth string as flange, aval fpath = "C: \ Users \ User.Name \ folderName \" ' ~~> Flexel = Dirty Changes (Fepath, VB.Normal) while Flexel & lt; & Gt; "" '~~> Sheet1 should be named Sheet, R1C1 signaling in R12C9 I12 = "'" & amp; Fapath & amp; "[" & Amp; Faxal & amp; "] Sheet1 '! R12C9" aval = ExecuteExcel4Macro (fval)' ~~ & ...

design - Java nested package visibility -

Often when I am preparing some new components of this project, then I am creating a limit that I Can not do the right way ... Imagine a package "component" and in this component package you have some public classes / interfaces that are naturally designed to share publicly And some class / interfaces (component specificist) in the internal package They should not be visible from outside the package ... Now with the current possibilities of the current possibilities I can get it (violation of momentum) without exposing the material outside the "components" package Doing ... How do you do this? Yes, you can do this by using the internal keyword in some package name. There is a package com.myPackage.compoint You may have another package com.myPackage .compoint .internal.blahblah When you use keywords internally, it is not exposed to other jars and is not available for use outside the jar, but by another package Can be used inside the jar. Her...

javascript - Array prototype available in forEach -

Image
मेरे पास Array.find () के लिए एक polyfill है P> मैं वर्तमान में परीक्षण कर रहा हूँ ब्राउज़र इसके लिए समर्थन नहीं है इसलिए polyfill चलता है और फ़ंक्शन के अनुसार हालांकि मेरे पास एक प्लगइन है जिस पर एक सरणी पर मैं foreach पास करता हूं और उसमें अंतिम तत्व फ़ंक्शन है ढूंढें । यह क्यों हो रहा है? इसके अलावा, जब मैं क्रोम के डेवलपर्स में सरणी का निरीक्षण करता हूं तो मुझे निम्नलिखित मिलता है। यदि (! Array.find) {$ ('& lt; h5 & gt; यह ब्राउज़र ऐरे का समर्थन नहीं करता है। & Lt; / h5 & gt;')। अनुलग्नक ('शरीर'); } If (! Array.prototype.find) {Array.prototype.find = function (predicate) {if (this == null) {new TypeError ('Array.prototype.find' को रिक्त या अपरिभाषित कहा जाता है); } अगर (प्रकार का वास्तविकता! == 'फ़ंक्शन') {नया प्रकार त्रुटि ('विधेय एक फ़ंक्शन होना चाहिए'); } Var list = ऑब्जेक्ट (यह); Var लंबाई = list.length & gt; & gt; & gt; 0; Var thisArg = तर्क [1]; Var मान; के लिए (var i = 0; i & lt;...

javascript - AngularJS ngOptions filter array by boolean field -

मेरे पास यह सरणी है: this.chapters = {1: {name: अध्याय 1 ', दिखाएं: झूठे}, 2: {नाम:' अध्याय 2 ', दिखाएं: सच}, 3: {नाम:' अध्याय 3 ', शो: सच}}; और मैं केवल उन अध्यायों को दिखाना चाहता हूं जिनके शो वैल्यू इस चयन में सही है & lt; ng-model = "cart.newchapter" ng- Options = "cart.chapters में (के, वी) के लिए v.name" & gt; & lt; / select & gt; अब यह सभी अध्याय दिखा रहा है, लेकिन मुझे उन्हें फ़िल्टर करना होगा। मैं फिल्टर लागू करने का प्रयास कर रहा हूं लेकिन यह काम नहीं करता। क्या आप मेरी मदद कर सकते हैं? ओह! मैं बूलीयन प्रकार का बदल नहीं सकता। आप ऑब्जेक्ट पर फिल्टर लागू नहीं कर सकते, केवल एरे के लिए इसलिए, आपके पास यहां 2 विकल्प हैं, अध्याय को एक सरणी या पूर्व-फिल्टर को अध्याय ऑब्जेक्ट का उपयोग करके इस तरह से फ़ंक्शन का उपयोग करें: $ scope.filter = फ़ंक्शन (अध्याय) {var परिणाम = {}; Angular.forEach (अध्याय, कार्य (अध्याय, कुंजी) {if (! Chapter.show) {return;} परिणाम [कुंजी] = अध्याय;}); वापसी परिणाम; }; और...

c# - ASP.NET: The server tag is not well formed -

I am trying to get GridView in progressBar At a time now I have the following without misfortune success: & lt; Asp: gridview id = "gvshow" runat = "server" automatically generated column = "incorrect" dataname = "progress" width = "100%" & gt; & Lt; Columns & gt; & Lt; ASP: Boundfield datedfield = "progress" header text = "progress" /> & Lt; Asp: TemplateField ShowHeader = "False" & gt; & Lt; ItemTemplate & gt; & Lt; ASP: Little ID = "LB Progress" runat = "server" text = " & gt; & Lt; / ASP: literal & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; & Lt; / Column & gt; & Lt; / ASP: GridView & gt; resulting in parser error (server tag is not well formed.). If I work with any value without eval it works without any issue, I think I'm missing something here, b...

android - Socket input stream and Unicode -

I try to write an app that sends text from Windows computer to Android cellphone, the text I send is either English or Hebrew (For example) through the connection socket I use on the Windows Side (Visual Studio 2012): string buffer = // some text // data string Encoded in a byte array. Byte [] msg = encoding ASCII.GetBytes (buffer + "\ n"); // Send data via socket Int bytesSent = socketSender.Send (msg); and on the Android side: // after installing the socket string text = ""; InputStream = socket.getInputStream (); InputStreamReader isr = New InputStreamReader (is); BufferedReader = In the new BufferedReader (ISR); While ((inputText = in.readLine ()) = = null {text = inputText;} All this works when texting English. When I try to send Hebrew text I would replace this line: byte [] msg = encoding.Unicode.GetBytes (buffer + "\ n"); But on behalf of Android I can not "read" I tried to use the CharsetEncoder but did not work (...

javascript - How can I make a simple table row with numbers using .appendChild? -

I am a beginner programmer and I wonder if someone can help me. I want to find a table with row and 7 numbers in table data & amp; Function Response Feedback I tried to do this but it does not work, and I'm looking for it for some time now: & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" & gt; Ceremony maaktable () {warning ("hey!"); Var tabdata = tabrow.appendChild (document.createElement ("td"). InnerText = Amount [i]; var tabrow = tablestart.appendChild (document.createElement ("tr"); var tablestart = document.createElement ("table") (I = 0; i & lt; 6; i ++) {tabdata;}} script> gt; & lt; / head> gt; & lt; body & gt; & gt; button onclick = " Maaktable () "& gt; Beginning The problem is also not cautious What can I do to make this work? Not sure that this is desired The result is, but your code looks a bit far away, etc. Yo...

php - Reading from a big table -

I want to read data from the table (or view) on SQL Server 2008R2 using PHP 5.4.24 and freetds 0.91 . In PHP, I write: $ ret = mssql_query (select 'mytable', $ Conn); Then I read a line at one time, took action on them, all right. Except, when the table is really big, I get an error: Fatal error: 1073741824 TIRED in the allowed memory size of the bytes / home / test / test (try to allocate 4625408 bytes done). An error occurs in Mssql_query (), so no matter how I query. It is not viable to change the query to return lower rows or lower columns, because I need to read a lot of data from multiple tables in a limited time. To read PHP in one row in a row or to a proper number of times at once? I agree with @ James in question comments, if you have a table reading such a large amount of your memory Before handing over the PHP to hide the results, it probably means that you need to know a better method though, here is a possible solution (untested and I have us...

javascript - Angular.js ternery statement on HTML tag -

& lt; h4 वर्ग = "changecolor" & gt; {{ड्राइवर .name}} & amp; nbsp; & lt; / h4 & gt; & Lt; h4 class = "changecolor" एनजी-शो = "! Driver.name" & gt; {{driver.officeEmail}} & amp; nbsp; & lt; / h4 & gt; यदि driver.name उपलब्ध नहीं है तो driver.officeEmail क्या कोई तरीका है? टर्नर स्टेटमेंट का उपयोग करके इसे एक पंक्ति में लागू करने के लिए? यदि आप केवल एक बंधन का उपयोग करना चाहते हैं, तो कोशिश करें : & lt; h4 class = "changecolor" & gt; {{driver.name || driver.officeEmail}} & lt; / h4 & gt; इसे कहा जाता है यदि driver.name अपरिभाषित है, तो driver.officeEmail इसके बजाय दिखाया जाएगा।

Collapse a list of DNAstringsets into a single DNAStingset in order to apply writeXStringSet() and turn it into fasta file in R -

Use of R for Bioinformatics here: I have a list of DNAstringsSets (seen below) and want to use the write string (Stringset) function which is a FASTA file as any command.Anyone knows how to make a single DNAStringset A DNAstringset takes the object as an argument to save the list of DNAstringsets in the object and can be used as an argument? $ NM_008866 say a DNAStringSet length 13 width seq name [1] 693 ATGTGCGGCAACAACATGTCCGCTCCGA ... GATAAGCTCCTACCTCCAATTGATTGA NM_008866 [2] 72 ATGGATGGGCAGAAGCCTTTGCAGGTAT ... AATACATCTGTCCACATGCCCCTGTGA NM_008866 [3] 114 ATGGGCAGAAGCCTTTGCAGGTATCAAA ... GAATATGGCTATGCCTTCTTGGTTTGA Nm_008866 [4] 213 ATGGCATTCCTTCTAACAGGATTATTTT ... Agtgktgggttgtgakstttg Nm_008866 [5] 63 ATGTCAAGCACTTCATTGATAAGCTCCT ... Ttgttgktkataggcsattga Nm_008866 ... ... ... ... 9 9 21 ATGGCCCTTCTATTGGGAGACCAGGCTT ... Kgggkggsggtktktgtkatg Nm_008866 [10] 144 ATGTTATGCTTAAAACCAAATACTGTTC ... CAGTCTCCTGTACAAATATT AAAATAA NM_008866 [11] 78 ATGTTGCAAAAATTATGGTTATTTCTGA ... CCAACC...

c - How to use Variadic macros with fprintf -

Trying to print a log in a file by writing a macro. My macro looks like shown below: #define LOG (fmt, ...) {\ FILE * F; \ F = fopen ("output.txt", "a"); \ Fprintf (F, FMT "% s% d", __VA_ARGS __, __ file____, ___LINE__);} and I'm planning to call the log in the following format I: LOG ("values:% d% d", num1, num2); But when I compile, I get an error error: before expected expression ????, ??? Token fprintf (F, FMT "% s% d", __VA_ARGS __, __ file__, __ LINE__);} Will anyone tell me where I am going wrong? Firstly, you have to wrap the macro in a du-all loop, so it's correctly expressed as expressions Will be handled by. #define LOG (fmt, ...) while {0} then you have to make sure that the phone call () Be successful and you close the file after use. file * f = fopen ("output.txt", "a"); If (! F) break; // Break works because you are in a loop fclose (f); // also stream flushe...

variables - In Lisp, how do you call a function from a macro, by name passed as an argument? -

In Lisp, how do you call the macro, the function whose name is the symbol value of the symbol? I may be wrong, but I think that I am right that the symbol is a variable. What I currently have here: (defmacro cfunc (ab) (list works (cfunc my-func data); works foo to evaluate my symbol value. I have to add. (cfunc foo data) and I call the function (foo data) instead of (my-func data) Is that I instead define cfunc # 'foo is not working, which gives (function foo) which is cfunc and call ((function foo) data) . (symbol-value foo) can not work either, so I'm thinking that I will get the I can not change what is changed on cfunc , but I make the function cfunc . If any one is a specific page of a resource that gives me defmacro I can appreciate it or I can search keywords for special characters such as # and so on, if I can also share it . First of all, as (cfunc foo data) , what do you do Is the reference to data ? I have not found any d...

.htaccess - Show url of a subfolder as a subdomain with htaccess -

Hope someone can help me find a way to show the URLs of a website folder like a subdomain . Let's say I have website www.example.com and subfolder www.example.com/sub. Is it possible to show the URL www.sub.example.com instead of www.example.com/sub using the htaccess' url rewrite, without moving the sub folder's resources to the "real" sub-domain? In other words, is it possible to change only the address of the sub folder? Thank you very much. "post-text" itemprop = "text"> You can create this subdomain in the Hosting Control Panel, which can be a cleaner method ... you can see the same thread here:

sql - Select from table only with no records on the second table -

मेरे पास निम्न तालियां हैं TABLE1 (ID_OWNER, NAME) 1, जॉन 1, एल्विस 1, माइकल 1, केल्विन तालिका 2 (ID_OWNER, नाम) मेरी शर्तों है: केवल टैब 1 से रिकॉर्ड वापस करें अगर रिकॉर्ड नहीं हैं टैब 2 में एक ही स्वामी से, लेकिन अगर टैब्यूल में रिकॉर्ड हैं तो केवल TABLE_2 के अभिलेख पुनर्प्राप्त करें I की कोशिश की का चयन करें COALESCE (TB1.NAME, TB2.NAME) TABLE_2 TB2 बायाँ शामिल हों TABLE_1 TB1 से TB1.OWNER_ID = TB2.OWNER_ID न कि (TABLE_2 TB2_SUB कहां TB2_SUB.OWNER_ID से चयन मौजूद है 1 = TB1.OWNER_ID) कहां TB2.OWNER_ID = 1 लेकिन जब TABLE_2 रिकॉर्ड क्वेरी रिकॉर्ड को पुनः प्राप्त नहीं है नहीं है। आप अपना कोड overcomplicating हैं: SELECT * F ROM तालिका 1 टी 1 जहां मौजूद नहीं है (चयन 1 से तालिका 2 जहां आईडी_OWNER = T1.ID_OWNER)

php - Need assistance with regexp and cyrillic -

मुझे निम्न समस्या मिली मेरे पास एक नियमित अभिव्यक्ति है जो मैंने स्वयं नहीं बनाया है: / P> "| (?! & Lt;। *?) \ B $ old_text \ b (?! [^ & Lt; & gt;] *? & Gt;)" एस " यह अद्भुत $ old_text $ पाठ में पाता है, लेकिन उदाहरण के लिए $ old_text है अगर 'डी ?? Ñ ?? Ñ ?? оÐ|ÐμÐ½Ñ ?? Ñ ?? " यह इसे खोज नहीं करेगा मुझे यकीन है कि इसके सभी / b के लिए reffering इसलिए मैंने इसे \ [wÐ ° -Ñ ??] + $ old_text \ [wÐ ° -Ñ ??] + या \ wÐ ° -Ñ ?? $ old_text \ wÐ ° -Ñ ?? भी sth की कोशिश की यूनिकोड रेंज का उपयोग कर की तरह:?!? | (?!।? & LT; *) \ x {0410} $ old_text \ x {042F} ([^ & lt; & gt;] * & gt ;) | ने भी इस सीरिलिक चीज़ की कोशिश की लेकिन i''m सुर I''m सही का उपयोग नहीं कर रहा है: "| (?!? & Lt;। *?) \ (?!? [^ & lt; & gt;] * & gt;) ख {सिरिलिक} $ old_text \ b {सिरिलिक} | सी " शायद यह नहीं बल्कि सही दिशा है? लेकिन हे सब न काम करते हैं, कुछ प्रतिभाशाली पीएलएस कर ...

asynchronous - Background tasks/timer jobs in SharePoint O365 with Azure provider-hosted app -

I am creating a provider-hosted app for SharePoint (O365) which is hosted in Azure. Through all of my arguments, I am using a MVC Web project more specifically. At the moment, I have some branding logic that is being executed by an application after an AJAX call in a controller action. If there are so many subsites in my hierarchy, it can take a very long time to execute because it is bad because the app will still process my request, the page I called This action would prevent me from reacting to the completion of the work. This is definitely because the request status is directly related to the callback of that request in the calling page. It also means that a person can launch the request, refresh the page, and then launch it again, because there is no way to tell me that any previous request is still being executed Yes or No. In addition, 2 different users can launch the same request, resulting in 2 simultaneous executions of the logic of that request. So, what I need is a ...

jquery - Div structure created in javascript is different in the actual DOM -

Image
I am creating a relatively complex nested div structure in a javascript loop on a bunch of JSON reaction objects from the instagram API. Setting the URL of the image within a specific bootstrap dival structure. However, anyhow, when I look at the Dom structure, it is completely different that the map I created is loop. My JS file has a loop: htmlz = " div class =' ​​col-md-6 '& gt; & lt; div class =' ​​container ' & Gt; "count = count + 1;} and if (count == 9) {htmlz div class = 'col-md-6' & gt; & lt; Div class = 'container' & gt; div class = ' line-fluid' & gt; div class = 'col-md-6' & gt; Lt; img src = '"+ item.images.low_resolution.url +"' + + rounded_style + "& gt; & lt; / div & gt;;; count = count + 1;} and if (calculation == 13 } {Htmlz + = "& lt; / div> gt class = 'col-md-6' & gt; & lt; img src = '" + Item Image...