Posts

Showing posts from July, 2014

java - Howto maintain an app for publishing to google and amazon store -

I already have an app published on the Google play store. I want to publish it also in the Amazon Store. I read about the rehearsal for special format (4 numbers with dot). How do I maintain an app (in an eclipse project) to support both stores? For example: Do I have to change the version name or do some tricks? What else to do? Can not you name the version in the Amazon format What do you currently have for Google Play )? As far as I know, play version is very generous with naming. To maintain different plans, supports multiple flavors, where you can customize everything, up to the actual code by the name of the version so that you can see the play link in the Amazon app for example Avoid showing and in other ways, as well as potentially different ad networks, etc. I do not know what will be the migration path for this, although Gradal supports the generation of eclipse projects so that you can continue to use it.

Android GridView in a scroll view -

I have a layout for which I need to insert a grid view inside the scroll view, I have read this but my suggestion It is not necessary for the layout. When a GridView is inserted in a ScrollView the grid is not scrolled! I have got this with regard to the following. The problem I have is that I will not scroll the grid view smoothly, if I hold my finger and drag it scroll, but if I type a gesture, it's expected to be a smooth As soon as I scroll off my finger stops on the grid view. gridView.setOnTouchListener (New View.OnTouchListener () {@Override Public Boolean onTouch (see v, MotionEvent event) {if (event.getAction () == MotionEvent.ACTION_DOWN || event. GetAction () == MotionEvent.ACTION_MOVE) {gridView.requestDisallowInterceptTouchEvent (true);} return false;}}); I tried, but no luck adding this gridView.setOnScrollListener (New OnScrollListener () {@Override Public Zero onScrollStateChanged (AbsListView View, Int scrollState) {// TODO Automatic Created Me...

Python indentation error when documenting the code -

I have the following part of the code in Python. "" "=== ================================== =============== this file provides the casing around the web test API to start a test and every file ============ ============================= =================== "" "import json, urllib, OS, ConfigParser webPageTestConfigUtils webPageTestConfigUtils import pprint import class WebPageTestProcessor from pprint:" "" ====== ===================== ========================= method of test for Dbluteepiti to offer. takes a URL input for which you test To run Want. =============================== =============== ======= "" "def submitTest (self, url): response = No URL If no: wptUrl = WebPageTestConfigUtils.getConfigValue ( 'runTestURL"? f = json & amp; url = "') + url + "& amp; run = 3 and video = 1 & amp; web10 = 0 & amp; fvonly = 1 & amp; mv = 1 & amp; private = 1 and Area = us_east_wptd...

python - Confused about try/except with custom Exception -

मेरा कोड: class AError (अपवाद): print 'error occur' i रेंज (3) में: प्रयास करें: प्रिंट '--- ऊ' एईआरआर को छोड़कर एईआरआर बढ़ाएं: प्रिंट 'एएर्रर' और प्राप्त करें: प्रिंट अंत में: 'आखिरकार' प्रिंट करें 'अंत में' जब मैं उपरोक्त कोड को चलाता हूं, आउटपुट यह है: त्रुटि उत्पन्न होती है --- ओओ अंत में एईआरआर प्राप्त करें --- ओओ अंत में एईर प्राप्त करें --- ओओरो अंत में एईआरआर प्राप्त करें मुझे लगता है कि स्ट्रिंग "त्रुटि उत्पन्न होती है" तीन बार होनी चाहिए, जैसे "--- oo" , लेकिन यह केवल एक बार होती है; क्यों? स्पष्ट करने के लिए, यहां एक सरल उदाहरण है: class टेस्ट (ऑब्जेक्ट): प्रिंट "कक्षा परिभाषित किया जा रहा है" def __init __ (स्वयं): प्रिंट (उदाहरण के लिए) के लिए "इंस्टॉन्स बनाया जा रहा है": (3): t = test () यह हो जाएगा: परिभाषित किया जा रहा वर्ग उदाहरण बना रहा है उदाहरण बनाया जा रहा है उदाहरण बनाया जा रहा है कोड वर्ग परिभाषा के भीतर लेकिन एक विधि def इंतिशिप के बाहर केवल ए...

java - Hibernate Mapping when foreign key placed in reference class -

मेरे पास दो वर्ग विद्यार्थी और पता है। छात्र {stuid, stuName,} पता {स्ट्रीट, शहर, stuid; // forngn key »Studnet} के साथ रेफ़री क्या कोई भी मुझे मदद कर सकता है हाइबरनेट का उपयोग करके इन दो कक्षाओं को मैप करें ?? आपको सीखना चाहिए कि सबसे पहले हाइबरनेट में वन-टू मैपिंग क्या है दूसरा, अगर मैं डिजाइन करना चाहता हूं तो मुझे स्टूडेंट टेबल में विदेशी कुंजी के रूप में एड्रेस_आईड होगा और छात्र आईडी नहीं होगा। // टेबल नाम को छात्र के तौर पर लिया जाएगा क्योंकि आप @ टेबल एनोटेशन का उपयोग करके इसे निर्दिष्ट नहीं कर रहे हैं छात्र वर्ग @ एंटीटी सार्वजनिक कक्षा छात्र {@Id @Column ("stuid") @ जनरेटेड वैल्यू (रणनीति = जनरेशन टाइप.ऑटो) निजी पूर्णांक आईडी; @ कॉलम ("स्टुनाम") निजी स्ट्रिंग नाम; // setters और getters} पता वर्ग @ एंटीटी सार्वजनिक वर्ग पता {@Id @Column ("add_id" ) @ जनरेटेड वैल्यू (रणनीति = जनरेशन टाइप। एओटीओ) निजी पूर्णांक आईडी; @ स्तंभ ("सड़क") निजी स्ट्रिंग सड़क; @ कॉलम ("शहर") निजी स्ट्रिंग शहर; @OneToOne...

bash - Process output with `awk` when the command prompts for input with no newlines -

I have a process (Apache Maven) that produces a lot of production, from which I want to paint some parts In particular, if line starts with [INFO] , then I think the initial sub-corner should be in blue, all the other text remains unchanged. Here is a simplified version of my script: ColorMain : #! / Bin / zsh Export BLUE = `Tupet Set 4` Export Reset =` Tupput sgr0` function MVN-color () {(Mvn $ @ | awk "BEGIN {RS = \" \ "}; {sub (/ \ [INFO \ '$ {BLUE} [INFO] $ {RESET} \ "); printf \" \% s \ ", \ $ 0}")} mvn-color originally generated Example outputs (all initial [INFO] are colored in the shell), where & lt; Enter & gt; Issue where the program asks for my input: $ / Color-maven [INFO] Scanning for projects ... [..cut ...] 1192: Remote - & gt; Uk.ac.rdg.resc: edal-ncwms-based-webapp (-) & lt; Enter & gt; Select number or apply filter: 497: org.apache.maven.archetypes Choose: maven-archetype-quickstart versio...

java - In which version of hibernate @JoinColumnsOrFormulas is introduced? -

We are using Hibernate v3.3. I'm not sure why encryption is not able to use @JoinColumnsOrFormulas because the eclipse error is not found. Could you please tell me that this hibernate was introduced? @JoinColumnOrFormula Hibernation-3.5 , you can see different versions of Hibernate You can verify using the API. >

selectmanycheckbox - Primefaces Select Many -

Is there any way to select multiple components with input text inside to be able to select any of the options? And specify many examples of this. Any ideas please? This is what you are looking for! / P>

python - Install pip for IronPython on commandline -

Is it possible to install and use PEP with IROAPPhan through command line? (I am not doing it through PTVs.) I have already tried: looked at this SO question: but did not answer it Has been updated or not for more than a year. Viewed on this reply, but the link to distribute_setup.py is broken. I got a copy from:, it ends with: IOError: System.IO.IOException: authentication failed because the remote party has closed the transport section I Take a look at this, but this is clearly for CPython, not IronPathon. According to the step-by-step comments, it worked in August last year, but I got the same error as above: IOError: System.IO.IOException: Authentication failed because the remote party has closed the transport stream. See full output of these errors, it starts taking eggs, but urllib2.urlopen (url) : to http: // pypi download fails during this process during the call. Python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg Tracebacks ...

oracle - Different matches when using prepared statements on CHAR(3) column -

I wanted to enlarge a CHAR (1 CHAR) column and I forgot to change the column VARCHAR2 to type: duplikode char (3 years) I got an error when my PHP app is no longer Exact match matching example: SELECT * NUMEROS WHERE DUPLICADO =: foo ... with : foo Getting # 4 3-Four Padded Not Found # 4 However, I initially hit a red herring while debugging the query in SQL Developers because the raw values ​​in the query will match the injection! SELECT * FROM NUMEROS WHERE DUPLICADO = '# 4' Why do I get mail from another query? Why does it make a difference in prepared statements? To make a little detail on my observations, I found a little documentation which is empty and non-platen Explains the difference between the comparison of: If there are both values ​​in your comparison (both sides of the equals sign), if the data are CHAR or NCHAR or literal string Oracle chooses empty eyelid comparison. This means that if the length is different, then it pad...

php - woo-commerce password protected products display with out any restriction for some users -

I created some 'password protected' products from back-end. Now I have created those 'password protected' products to a particular user , I want to display with any password restriction. For the remaining users, they should ask for the password to see the product. Is it possible. Please tell me if there is a solution. In short, need to change the WordPress visibility option from the workspace thanks, true After doing some research on WordPress built-in functionality, I have got a solution and it has to work. In the 'functions.php' file I did the following code. function password_view () {$ post = get_post (); If (! Is_admin () & amp; Empty ($ post- & gt; Post_password)): require_once abspath WPIN '/class-phpass.php'; $ Hashar = new passwordHash (8, true); $ Expire = apply_filters ('post_password_expires', time () + 10 * DAY_IN_SECONDS); $ Secure = ('https' === parse_url (home_url (), PHP_URL_SCHEME); Setkey ('w...

r - Convert numeric values to dates -

मेरे पास एक संख्यात्मक वेक्टर है जो निम्नानुसार है aa & lt; - c (1022011, 2022011 , 13022011, 23022011) (यह सदिश सिर्फ एक नमूना है, यह बहुत लंबा है) मान ऐसे तरीके से लिखे गए हैं कि पहला मान दिन और महीने और फिर वर्ष है। मैं अभी क्या कर रहा हूं as.Date (as.character (aa),% d% m% y ") लेकिन, यह एक अंक के नंबरों के मामले में समस्याएं (एनए वापस कर रहा है) (यानी 1022011, 2022011)। ऐसा मूल रूप से जैसा.डेट ("1022011", "% d% m% Y") काम नहीं करता है लेकिन as.Date ("01022011 "", "% D% m% Y") (संख्या के आगे '0' चिपकाने) काम करता है। मैं ऐसे मामलों में '0' चिपकाने से बचना चाहता हूं। क्या कोई अन्य (प्रत्यक्ष) एक ही बार में संख्यात्मक मानों की तारीखों में बदलने के लिए विकल्प? अपने प्लेटफ़ॉर्म पर निर्भर करते हुए, आप उपयोग कर सकते हैं स्प्रिंटफ़ क्रम में टी ओ शुरुआत में शून्य जोड़ें ऐसा लगता है कि मैक इस के साथ ठीक है, लेकिन विंडोज़ 7 ने ओपी के साथ चर्चा नहीं की। दिनांक (स्प्रिंटफ़ ("% 08...

java - add directory to classpath in runtime -

In my current spring project, when I run an application, a directory is created on the user's home directory where I Files in the configuration (* .properties file) In my code, I see this file like this: private string getFilename () {System.getProperty return ("user.home" ) + File.Sseparator + ". Webapp" + File .separator + "webapp.preferences"; } which allows me to run the application in any operating system without changing the code. I need to add this directory to the application's pathpad, to allow me to use the properties stored in the file to use annotation PropertySource , either from the Entrepreneur class, the method getproperty or Value annotation. I am using spring-boot, so the starting point for the application is that: @Controller @ConceptJapaRepositories @ContentAutoConfiguration @ComponentScan (value = "com .spring ") public class application {public static zero main (string [] args throws exceptions {Spr...

c# - AutoMapper project nested objects where inner object is nullable failing -

I am using AutoMapper to project the following structure public class External source {... mass math? Inner Ed {Receive; Set} Public Inner Inner (Received; Set; }} Public Sector Intersource {Public Guide ID {get; Set; } Public Date Time Date {Received; Set; }} Public Class Outdoor {.... Public InnerDist Inner {get; Set; }} Public Class InDest {Public Guide ID (Receive; Set;} Public Date Time Date {Received; Set;}} Results Result = AutoMapper.Project & lt; External Asors, Outdated & gt; (Query); As you can see, the inner object is faucet The projection works fine, if the value of the internal object is, but if the internal object is zero, then EF exception It throws as it does not seem to be that in inner waste Cast must be empty in value type 'guides' because the physical value is zero or the generic parameter or query type of the result should be used in the tap type. Using var result = AutomapMap.lt; IEnumerable & lt; External source & gt ;, ...

DELPHI XE7 [dcc32 Error] E2250 There is no overloaded version of 'Pos' that can be called with these arguments -

itemprop = "text"> Delphi XE7 on Win7 32 bit code: Process TForm1.IdMappedPortTCP1Execute (AContext: TIdContext ); (Position ('Connect', AContext) & lt; & gt; 0) or (Position ('Received', AContext) & lt; & gt; 0) or (Position ('POST', AContext) 0) Then (....) Sleep (100); End; Error: [dcc32 error] Unit1.pas (49): E2250 is there that can be said with either of 'status' How to fix the code Thanks in advance After the argument for the text "Itemprop =" text "> pos are two strings. The function searches for the first occurrence (first parameter) of a substring inside a string (the second parameter). The function is documented here: You have AContext type TIdContext which is passing and that is not a string. To fix the code, you need to pass the string that contains the text in which you want to search.

error handling - Using panics in web application -

I am writing with Go your web application I want to change the panics to replace most errors in Atncon API And then, by holding those nervousness in high-level functions, log them in and return the error page to the user. something like: event handler (body function (http.ResponseWriter, * http.Request)) function (http.ResponseWriter, * http.Request) {return function (responseWriter http.ResponseWriter, request * http.Request) {postponed recoverIfPanic (responseWriter, request) body (responseWriter, request)}} recoverIfPanic function (responseWriter http.ResponseWriter, request * http.Request) {cause = recovery () that is, do these cause == null {back} // log and http error back} function PanicIf (fault error, httpStatus integer, string description) {if error = zero {panic (MyPanicStruct {err: Hey, ht tpStatus: httpStatus, Description: Description})!}} In your actual code results Hey: = SomeApi (...) PanicIf (Hey, http.StatusInternalServerError, "SomeApi") I...

php - How to read array data using where condition -

मैंने एक क्वेरी परिणाम को एक php array में संग्रहित किया है Array ([0] = & Gt; STDClass ऑब्जेक्ट ([AccountNumber] = & gt; 1000000 [प्रथम नाम] = & gt; जेम्स [अंतिमनाम] = & gt; जेम्स प्रशासक) [1] = & gt; स्टडी क्लास ऑब्जेक्ट ([AccountNumber] = & gt; 1000001 [प्रथम नाम] = & gt; [2] = & gt; स्टड क्लास ऑब्जेक्ट ([अकाउंटनंबर] => 1000002 [प्रथमनाम] = & gt; क्लारा [लास्टलाइम] = & gt; प्रदीप) [3] = & gt; स्टडी क्लास ऑब्जेक्ट ([ AccountNumber] = & gt; 1000003 [प्रथम नाम] = & gt; डोना [अंतिमनाम] = & gt; कोडी) ) मुझे एक विशेष के लिए प्रथम नाम और अंतिम नाम मुद्रित करने की आवश्यकता है खाता संख्या आउटपुट को छोड़ दिया गया है: प्रथम नाम: क्लारा अंतिम नाम: प्रदीप जहां खाता संख्या 1000002 है अग्रिम धन्यवाद आप चाहते हैं कि खाता संख्या के लिए सरणी के माध्यम से खोजें, और फिर आउटपुट: $ object_array = {अपनी सरणी}; // यदि आपके पास विदेशी मुद्रा ($ object_array $ $ के रूप में) पोस्ट किया गया है, तो आपको जो भी वेरिएबल का प्रि...

API REST Yammer: cant retrieve admins from a group -

I did the javascript SDK using the REST API: yam.platform Request ({url: "users / in_group / 2490226", method: "GET",}); I have recovered users but I can not see who is an administrator Can I withdraw an Administrator of a group using the REST API ? If you use group / {group id} /members.json then returned users Call the list "is_group_admin" field. Here's an example: 4767132 /members.json Your group ID 4767132 will include a list of users in the JSN answer, where a user Looks like this: {"type": "user", "id": 1526232831, "name": "yam5dummy", "state": "active", "fullname": "Yam5dummy", "job_title": blank, "network_id": XXXXXX, "mugshot_url": "https://mug0.assets-yammer.com/mugshot/images/ 48x48 / no_photo.png", "mugshot_url_template": "https : //mug0.assets-yammer.com/mugshot/images/ ...

version control - git branch -r not showing all remote branches -

मैं कमांड के साथ मेरी सारी शाखाओं को नहीं देखता git branch -r मूल / सिर - & gt; e7ae5a2136ac27528cb201040f432faf29034d67 प्रमुख a085ebd1c7f0477cee4bbad92810e057f5899b6b refs / सिर / बंडलों c9b34c60a18278e02489a2f232604f8e1bd295ca refs / सिर / bundles_new 8eca519636f2dfe8a6b5d7f8e8021c5fc2a72fd7 refs / सिर / संपीड़न तो मैं इन सभी शाखाओं को लाने के लिए कोशिश कर रहा हूँ मूल रिमोट लाने के लिए git: वस्तुओं की गिनती: 22417, किया। रिमोट: ऑब्जेक्ट्स को संपीड़ित करना: 100% (8478/8478), किया। त्रुटि: RPC विफल; परिणाम = 56, HTTP कोड = 200 MiB | 754.00 किबा / एस घातक: दूरदराज के अंत में अप्रत्याशित रूप से घातक लटका दिया गया: शुरुआती ईओएफ घातक: सूचकांक पैक विफल और यह काम नहीं कर रहा है git क्लोन मूल रूप से मुझे एक ही परिणाम दिया जाता है मैं कैसे उस समस्या को ठीक कर सकता हूँ?

mac address - PostgreSQL 9.3: Migrate text column to macaddr type -

मेरे पास एक एक मैक एड्रेस का प्रतिनिधित्व स्तंभ है , लेकिन मैं बजाय मैकड्र प्रकार टाइप करें इसलिए, मैंने कोशिश की: तालिका mytable alter स्तंभ mac_column प्रकार macaddr; और यह त्रुटि मिली त्रुटि: कॉलम "मैककॉलूम" स्वचालित रूप से मैकड्र टाइप करने के लिए नहीं डाला जा सकता है HINT: कनवर्ज़न करने के लिए उपयोग की जाने वाली अभिव्यक्ति निर्दिष्ट करें लेकिन मुझे पता नहीं है कि उपयोग की जाने वाली अभिव्यक्ति के रूप में क्या उपयोग करना है: तालिका mytable में परिवर्तन स्तंभ mac_column प्रकार macaddr का उपयोग करते हुए (?????? ??) उपयोग की अभिव्यक्ति के रूप में मुझे क्या करना चाहिए? बहुत पहले से बहुत धन्यवाद आप बस डेटा प्रकार को बदल नहीं सकते क्योंकि डेटा पहले से कॉलम में मौजूद है। चूंकि डेटा प्रकार स्ट्रिंग PostgreSQL है, क्योंकि यह मैकड्रंट के रूप में अपेक्षा नहीं कर सकता, हालांकि आपने macaddr के वैध स्ट्रिंग का प्रतिनिधित्व किया है। तो अब, जैसा कि पोस्टग्रेएसक्यूएल ने सुझाव दिया है कि आप अपने डेटा को macaddr में डालने के लिए 'यूजिंग' अभिव्य...

javascript - Loading bootstrap modal content only after clicking -

I am using Bootstrap 3 and I have a busy page. The modal content is loading with the page, whether the user to click the button to open the modal or not. I want to save resources because this model material is really big and busy, and my goal is to load specific bootstrap model content only after clicking on the button to open this model. How can I do this? Thanks in advance. Take a look at the doctor There is a "Remote" option for which you can use it (Please note that "This option is Degraded since v3.3.0 and will be removed in v4.) As suggested, you can use jQuery.load. Move your content (modal content) into a separate file and load the content on that model, Click on the button. workflow will do something button. Click function {open model load content to keep content in modal body}

c# - Is the order of an except and intersect operation always ignorable? -

This is a type of action for me like var list = new list & Lt; Int & gt; (); // list Add some element ... list. (Other listings). Is it always the same: list I get 100% Not sure Thank you for your help. Order from fully set-theoretical perspective does not matter here, The elements are removed from the code> list , an element is removed from the list, if it is in anotherList or not in yet The other list is in . Whether you make Opend of the Ondands »or« does not matter in the last sentence. For example, let's create three lists (set here, because these are set operations): list = {A, B, C, D} AnotherList = {A, B, E, F} is yet another list = {A, C, E, G} There is an element on each set that will be all three sets ( A ), an element that is in the second set, and an element that is in the set but not in the other, therefore we have all possible cases for the intersection and set the difference here. list.Except (anotherList) yields {...

compilation - VLFeat compile for Octave: broken makefile -

I am trying to face VLFeat for use with Wikipedia but * .d files are all in the VLFeat root directory Ends. Which then causes the following error to appear for most files. mv: can not stat './toolbox/geometry/vl_irodr.d': Any such file or directory MKOCTFILE toolbox / Octave / mexa64 / vl_rodr.d I have defined the MKOCTFILE in the octave.mak file / Bin / usr / mkoctfile and the variable MEX MKOCTFILE = mkoctfile / Code> is not defined. I am using Version 0.9.19 VLFeat, can someone tell me that my view is wrong or how can I fix it? Thank you for your help. For anyone who is trying to compile VLF, Octave. Instead of executing MKOCTFILE = Mkoctfile , it has compiled it successfully for me, but the VLF does not seem to support the OctaV exactly, most of it Functions were complaining about the tasks on which they depend. I decided to switch on matlab which worked immediately.

informix : dynamic condition in where clause -

I want to write a query in which I would like condtions in the WHERE section which is dependent on the values, for example, if I have There is a student table with student student ID, name, age, postcode, num_subjects_enrolled column, so I want to get all the names that live in the students. Post_code = 'POSTCODE' and (if they take more than one topic, I want to filter by age & lt; 20 other ages> 20) I want to do all in a single query. I am using informix and any help is appreciated. I think you can make it with something and and Select OR argument: Student from where the postal code is post_code = '12345' and ((num_subjects_enrolled & gt; 1 and age & lt; 20) or ( Num_subjects_enrolled & lt; = 1 and age> = 20))

defining a function acting on a matrix in python -

I want to define a simple task to swap two entries in the matrix, I currently have The following code is: I am struggling to find a way to make it so that when I have any variable, current (Where current = matrix [3] [2] ) if section works with a = 3, b = 2 on target metrics I'm not sure what it is you want but at least it works with Python code Importing: Import as np def swap (M, A, B, Direction): If Direction == 1: Entry = M [A, B] M [A, B ] = M [A-B] M [A-1, B] = Entry # One Test Matrix NP Randem. Print n = swap (n, 2,1,1) print n This output: [[1925] [74 38] [99 3 9]] [[25] [74 3 9] [99 38]] Then swaps 38 and 39

ms access - How can I combine two tables and merge fields? -

Sorry this is an incredibly obvious question but I'm new to reaching it and learned it once in the past weeks. Challenging project Actually I am in the process of preparing a database to track everything to the company: people know this, things happen, meetings happen, etc. I think I have structured it very well, but what I like is the "activity" table because the activities are diverse, all of which are multiple tables (events, meetings, inquiries, etc.) But all of them have a general description field. Is there a way to create a table or form that will drag it into all the data and keep it like this: Date-type-details. The type will come from where it came from, so if the hosting of the meetings was the source of information, then it will be typed as a meeting I find an easy way to do this It turns out that it is to create an activity table with categories like it seems easy to add to break it, but the number of those areas which would mean that to stay on a t...

javascript - How to create checkbox column in the table? -

I am dynamically creating tables using javascript code: function CreatTable (Data) {bara tablerea; Var table; Wind var tr; Var th; Tablerea = document. GetElementById ('ShowDataID'); Table = document. CreateElement ('table'); Thead = document.createElement ('thead'); Tr = document.createElement ('tr'); (Var i = 0; i & lt; data; length; i ++) for {var headerTxt = document.createTextNode (data [i]); Th = document.createElement ('th'); Th.appendChild (headerTxt); Tr.appendChild (th); Thead.appendChild (tr); } Table.appendChild (thead); For (var i = 1; i When I create a table, I also need to make the checkbox column in the table above. Any ideas how can I use this javascript? Or related links? I'm not sure this is what you are asking: var checkbox = document. CreateElement ("INPUT"); Checkboxes. Type = "checkbox"; And then you add the checkbox in each row to create a new column. View this Bela: I...

scroll - Titanium SDK: JavaScript -> Scrolling feature does not work -

Trying to scroll my window so that users can scroll down and view all the contents of the window. var eventsWin = Titanium.UI.createWindow ({title: 'more events', layout: 'vertical', scrolling enabled: true, background color: '#fff'}); Checked the Appcelerator docs and could not find anything useful. Anyone know how to scroll a window ?? What do you need to do is use a ScrollView (use Ti.UI.createScrollView) in your window Add and add that element to ScrollView. There is no 'scrollable' property in a window, but there is a ScrollView The document for the ScrollView object is here:

asp.net - Values of ASP labels in JavaScript -

I have ASP.NET label control which I use to pass text / string value from my C # backend I am function changeTab () click on the {var tab. = Document.getElementById ('& lt;% = searchType.Text%>'). Text content; If (tab == "official") {$ ('# tab-container') Easytabs ('Select', '# Tab 1-Officer'); Alert ("it was removed: 4"); } And {$ ('# tab-container'). Easytabs ('Select', '# Tab1-Company'); Alert ("it was removed: 5"); } As far as I know, var tab is missing the value from my label What am I doing wrong? I think what you want is this: Var tab = document.getElementById ('& lt;% = searchType.ClientID% & gt;'). Internal HTML; Use ClientID to get a label ID, which is then used as a parameter for getElementById is. Once you have a label, you will find the text of the label on the internal HTML property.

verilog - what is the solution of Error in TCl script? -

I recently downloaded Modelsim 10.1 from altera.com and I was getting this message of "error in TCL script" is. I'm not able to start a new verilog project "error message" Trace back: "Project (Save Complimentation)" can not be read: "{$ Project (SaveCompileReport)} {Project :: saveCompileReport} "(Process" Project :: Unload "line 20)" Project :: Unclaim "from the" Project :: Unload "(Process" Project :: CheckClose Project "line 24)" Process :: Checkcloscr Project "(Process" Project :: Making Dialects "Line 18)" Project :: And within Bnaaadilaog "(menu invoice) lt; 2: :: tkerror {"Save Compile Report)" can not be read: there is no such element in the array} Please give me a solution Some time ago Error. This can be resolved by delete your work folder / which removes the project's project file Just uninstalling and reinstalling will not work. ...

javascript - AngularJS: Ng-repeat breaks "Waves" animation -

Waves from here To add wave effect, you just have to add JS and CSS files , Then add class = "waves-effect waves-button" to the component of your choice and call Waves.displayEffect (); Unfortunately, it seems that the angular JS NG-it is broken by repeating. There are no errors in the console. This works: & lt; A href = "#" class = "wave-effect wave-button" & gt; Click here & lt; / A & gt; & Lt; Div class = "cola-MD-4 call-sm-6 garment" ng-repeat = "clothes in wheat." Garments. & Lt; / Div & gt; It is not: & lt; Div class = "col-md-4 col-sm-6 cloth" ng-repeat = "garment in Buypage.garments" & gt; & Lt; A href = "#" class = "wave-effect wave-button" & gt; Click here & lt; / A & gt; & Lt; / Div & gt; edit Waves.displayEffect () is running; The controller inside did not fix it. resolve HTML: & lt; D...

c# - Date value obtained from Masked Textbox and Date from Excel -

I'm trying to compare got on a Maskkedtekstboks who is accepting a little on, Axel With a date from the sheet. I have those lines will select the Excel file that equals date Masked textbox and display them in Detagrid scene. The problem is that I do not get a result and not an error of the compiled code is my code: private void button 13_Click (object sender, EventArgs e) {OleDbConnection conn = new OleDbConnection (); Conn.ConnectionString = @ "Provider = Microsoft.ACE.OLEDB.12.0; Data Source = C: \ Users \ alekan \ Desktop \ alm2.xlsx" + @ "; Extended Properties =" "Excel 12.0 XML; HDR = Yes; Ayatmicst Type = text; TypeGuessRows = 0 "" "; OleDbCommand command = new OleDbCommand ( "SELECT txt" + "" + FROM [sheet2 $] WHERE Acacmm = '+ Masked textbox 1. Text + "'", con); dataset dstxt = new DataSet (); OleDbDataAdapter adapter = new OleDbDataAdapter (command); adapter.Fill (dstxt); DataGridView1.Dat...

java - Is there any way to find out what these custom attributes do in the google iosched app? -

I'm looking at the iOSAD 2014 app to design properly for content design and especially pre-support El Device with v7 Library and Epippept v21 To use content design topic you must have succession to "Theme.AppCompat", but I do not understand that the style below has the attributes in the links below "they are not under Android" : "Namespace and I think I am not able to use them myself. & lt; Item name = "actionBarIconColor" & gt; #fff & lt; / Item & gt; & Lt; Item name = "ActionbearInstant" & gt; @ Dimen / keyline_2 & lt; / Item & gt; & Lt; Item Name = "HomeAspect Indicator" & gt; @drawable / ic_up & lt; / Item & gt; & Lt; Item name = "spinnerBarInsetStart" gt; @ Dimen / keyline_2_minus_16dp & lt; / Item & gt; & Lt; Item name = "popupItemBackground" & gt; Android: Selectable ITEMBACK Grounds & lt; / Item & gt; & Lt; Ite...

Calculate total time excluding overlapped time & breaks in MySQL -

There is a list of start time and end time from a selected query, overlapping time and the total time address except for any break Will have to be installed. Start time expiration date 2014-10-01 10: 30: 00.000 2014-10-01 12: 00: 00,000 - 90 minutes 2014-10-01 10: 40: 00.000 2014-10 -01 12: 00: 00.000 --0 because it overlaps with previous 2014-10-01 10: 42: 00.000 2014-10-01 12: 20: 00.000 - 20 minutes except overlap time 2014-10-01 10: 40: 00.000 2014-10-01 13: 00: 00.000 - 40 minutes 2014-10-01 10: 44: 00.000 2014-10-01 12:21: 00.000 - 0 Previous times this time frame 2014-10-13 15: 50: 00.000 2014-10-13 16: 00: 00.000 - 10 min There are so many covers in this case it should be 160 minutes. I have some ideas with lots of loops and if there is only one available in search of some simple solutions. This problem is the interval and the type of islands is a way to deal with it here SELECT SUM (minutes) from the total (SELECT TIMESTAMPDIFF (MINUTE, MIN (start time), MA...

amazon web services - AWS Bucket or CloudFront? -

I am writing a PHP API that serves the mobile app, which is hosted in AWS, this app is image based , Like Instagram all images have been uploaded to AWS bucket and have requested using http://my-bucket.s3.amazonaws.com/image-name.extension for example. My question is, what is the best way to serve those pictures? With AWS Bucket or CloudFront? Thank you! Cloudfront, no doubt cloudfinders choose your S3 bucket and repeat it across servers worldwide Are there. This makes your distribution faster if you only use S3.

matlab - How can I take a string and change the colour for each new line in TEXT? -

अधिक विशिष्ट होने के लिए मेरे पास x , z और वाई (1: आकार (y1,2)) तार की एक सूची है (मुझे लगता है): टेक्स्ट (x, z, y (1: आकार) (Y1,2))); । मैं वाई (1: आकार (y1,2)) की विभिन्न लाइनों में रंग करना चाहता हूं , जो भिन्न रंगों में आकार में भिन्न होता है I जैसा कि यह आकार में भिन्न होता है, मैं निम्नलिखित विधि का उपयोग नहीं कर सकता (जहाँ तक मुझे पता है): text (x, z, {\ color {magenta} वाई (1), .., \ रंग {लाल} वाई (आकार (y1,2))})% या समान बहुत धन्यवाद!

javascript - How to change title of page based on drop down menu items in AngularJS -

I have an html file that displays a drop down menu that lets me use a php script from a remote database I'm getting taxed in an Ajax call I want to be able to change the title of this html page in the name of that item in the drop-down menu. For example, if I click on heating and cooling in the drop down menu, then I want to change it to the title of the page 'Heating and Cooling'. I have been googling around for the answer, but so far I have only left with more confusion BTW I am doing it in angular JS. Here is my html file: & lt; H2 & gt; Horrible things & lt; / H2 & gt; & Lt; Div ng-controller = "MainCtrl" & gt; & Lt; Span class = "dropdown" on-toggle = "toggle (open)" & gt; & Lt; A href class = "dropdown-toggle" & gt; Click me to see some amazing things! & Lt; / A & gt; & Lt; Ul class = "dropdown menu" & gt; & Lt; Li ng-repeat = "Tracks by Category $...

Read huge csv file in R from Hadoop -

I am trying to read large (250 MB, 0.6 million lines, 60 columns) CSV files in R in Hadoop . Field separator I am using "@" and I am using R code PC2009 & lt; - as.matrix (from.dfs ("hdfs: //..../ apps / g00008 / moloy / fuzzy / TUSOpsSODetails_2009.csv", make.input.format (format = "csv", sep = "@", Fill = TRUE)) $ val) But the data in the 5th column is getting worse. Should I "Data" in HDFS by "Cats" Has anyone educated me how to read large files in RP? Please note that I am new to MapReduce.

powershell - Copy content form all text files from a directory and write to single text file -

The code below will copy a file of contents from the text file to the directory, but it will overwrite the existing file content: Go-ChildItem $ FilePath -Recurse-Include * .docx, * folder \ abc \ source.txt | For every object {copy-item $ _. Full name} - Destination C: \ destination.txt} I want to add all content to the same file. get content and add-content Instead of using copy-item : go-babyitem $ filepath -rice-sune * .txt | ? {$ _. Full name-like '* folder \ abc \ source.txt'} | Go-content | Ad-content 'C: \ destination.txt' Edit: As @Biconbits has correctly told comments for your question, you only Word documents can not be added and text files, because there are previously binary files (a bunch of XML files in which zip archives, in fact). However, if you want only the (text) content of the document to be added, then you can do something like this: $ wd = New Object - COM 'Word.Application' Get-ChildItem $ FilePath -Recurse...

ios - JSONModel incorrectly converting 'T' to '0' on 32-bit devices -

I am facing an interesting issue related to any string BOOL . I am passing a string value t in JSON and need to convert it to a BOOL. Using JSONModel, the conversion works on the 64-bit device, correctly converts from 1 to one (obviously some magic is running here). However, on 32-bit devices, T has incorrectly changed to 0. I am having trouble finding out why this is happening and how to fix it. I know that JSONValueTransformer BOOLFromNSString is called 32-bit device, and does not return any returns, but it does not return 64-bit devices Is not called for. Will anyone have 32-bit / 64-bit architecture and why? How can this be fixed so that the correct BOOL value is returned to 32-bit and 64-bit devices? The following is the BOOLFromNSString method in the project you linked: - (NSNumber *) BOOLFromNSString: (NSString *) string {if (string! = Zero & amp; ([string caseInsensitiveCompare: @ "right"] == NSOrderedSame || [ String caseInsensitiveCompar...

numpy - Solve ode in python with complex matrix as initial value -

I have a von Neumann equation that looks: dr / dt = - i [h, r] , where square of r and h complex numbers are matrix and i need to find r (t) to use Python scripts. Is there a standart tool for integrating such equations? When I was solving another solution as a starting value with a vector, such as the equation of Shradingger: dy / dt = - Ihy , I get the following error by trying to use the same function for the SPP.integrate.ode function ('zvode'), but for Von Newman equation: ** Native / Integrated / _ode.py: 869: UserWarning: zvode: Invalid input detected LENZW (= I1) (see printed message.) ZVODE-- ZWORK length is required, LZW (= I2) self.messages .g Et (istate, 'unexpected istate =% s'% istate)) is more in the above message, I1 = 72 I2 = 24 ** Here is the code: def integrated (r, t0, t1, dt): e = linspace (t0, t1, (t1 - t0) / dt + 10) g = linspace (t0, t1, (t1 - t0) / dt + 10) U = linspace (t0, t1, (t1 - t0) / dt + 10) while r. Successful () ...

c# - Where is my error occuring Unity -

When I can play my game perfectly, but when it stops, I get this error ! (Et, 1.0f, .005f) Unity editor.dock area: ONGI () From what I can find, I think I am able to fix it However, I do not know where the error is occurring I would have included the code, but I'm not sure any ideas would be appreciated what would be appreciated. This error is unrelated to your game code. This is just a small bug in the internal GUI coding of Unity Editor, although I thought that they had compromised this specially with the latest hotfix release. Make sure you are running the latest version of unity.

java - Change language at runtime (using internationalization "tool") -

I see some topics with the same question like me, but I have old and none of the answers are good for me is not. / P> Then I have this application in Java that uses swing. I have implemented internationalization to design UI and now I need something that can be the language of application (locale) Can change and refresh the components of the UI. As such, the button changes the "change language" to the hit and app language. Is it possible only by not restarting and using only resource bundles? Cheers [edit] I tried to do this: Locale aLocale = new locale Builder (). Set language ("PT"). SetRegion ("PT"). Build (); Locale.setDefault (aLocale); This.dispose (); New window ("fish"). Set isabel (true); Is there anything wrong with this "solution"?

javascript - Remove commas from php array -

I am currently working on displaying some arrays using PHP and MySQL. The simplified code looks like this: $ sql = "select from the program"; $ Result = mysqli_query ($ dbc3, $ sql); $ Tryout_reports = array (); While ($ line = mysqli_fetch_assoc ($ result)) {$ tryout_reports [] = $ line ['file_name'] " "; } $ Detail_report ['tryout_reports'] = $ tryout_reports; I have extracted a lot from SQL, so if there is something wrong with it, please do not pay attention. SQL statement works fine. The problem is that each value is being output from comma separated, and it looks really bad. When the run is running, the HTML looks like this: File 1.pdf & lt; Br> "," File 2.pdf & lt; Br> "," e.t.c. Now, I have seen a bit and I have tried the following: ltrim () rtrim () explosion (str_replace) Code> I know that rtrim works, but it does not remove the comma, I tried to do something like this: $ tryo...

Can the SharePoint object model setup data retention on an item? -

OOTB settings allow notification policy on document library or content type, but for every term A form solution is required. Any help is appreciated. To further expand, requests data retention for items in a document library (1 month, 3 Month, 6 months) was to allow. Different document libraries could be used, but when it comes to reports, it would be more unnecessary coding to compensate for different libraries. If a document is set for 1 month, it should be moved to the recycle bin, but other items should be based on their retention. Therefore, at the library level, the same information policy will not work. Rather than attempting to retain the data, the information policies were established on the content types, on the item itself, for a content type of 1 month, for a 3 months and 6 months. By using the object model, the item ContentTypeId can be assigned to the respected content type.

Javascript object not recognized as DOM object for addEventListener -

I am trying to wrap my head about why I am not working on this code. I read on the dom and add the event listeners, and I understand that an event listener can only be added to an object of the DOM. Technically, the returned value of _get_elem should be a DOM object and still still does not work. If anyone knows why it does not work or indicates me in the direction of a resource, how to do it, it will be highly appreciated. window.onload = funtion () {// works.logElementByID ('element_id') AddEventListener ('Click', _fn (), Incorrect); Var exfnvar = new exfn (); // exfnvar.exel.addEventListener ('click', _fn (), wrong) does not work; // also exfnvar._get_elem () does not work. AddEventListener ('click', _fn (), false); }; Var exfn = function () {this.exel = document.getElementByID ('element_id'); This._get_elem = function () {return Document.getElementByID ('element_id'); }}; Function_fay () {// do something}; You are calling...

How do I illustrate both sides of a transaction in BPMN? -

Image
We have several procedures that rely on mutual relations between two people / groups. I am trying to explain the best way to describe it in BPMN. Thoughts: Using the example of pizza order, I call a pizzeria to order, an order-holder answers the call and then we discuss my order. I am trying to capture exactly the "part of the order" of this process. Here I have been told how I am playing the diagram. I call, they answer, then there are branches for exchange together, which are converged at the end of the call and my order ends. Is it correctly illustrated? Or is there a better way to show that to complete a task, two different organizations have to communicate with each other at the same time? The moment you want to show a conversation in more detail than a high level bird scene, you usually run into problems when "a pool with several lanes "" In this situation, you have to attract a so-called "cooperation diagram", which means that you...

javascript - regular expression to validate one semicolon in front of an email -

I just have to get an example of a semicolon in front of a single email address. As below: ; Myemail@somedomain.com regex should not match: ; Myemail @ somedomain.com; Mysecondemail@somedomain.com How do I cope with this method in regular expressions? Any help would be appreciated. ^; Use regex like \ w + @ \ w + See how regex works on

java - items from listview to wich field and how? -

So I have 2 list views full of things in it, I want to take those items, and display them like this For example: item 1 + item 2 + item 3 all have been separated from "+". However, I do not know what should I put (text view, list view?), After that I need to retrieve those elements (item 1 + item 2 + item 3) after the second (text or list view)? Thank you P>

Not able to see triggers after publish database in SQL Server -

Image
I created some triggers in SQL Server 2012. Now I can create a generated script but I can not see the trigger after publishing Triggers are not by default - you have included specifically generate and publish scripts On the dialog, you will need to click on the Advanced button and in the dialog that pops up, you have to select the script trigger and enter it on TRUE (By default it is FALSE ):

ruby - Substring starting with a combination of digits till the next white space -

I have a very long string of 2,000 characters string regions with the first two characters of each segment as a segment indicator Is to join. Eg- '11xxxxx 12yyyy 14ddddd gghgfbddc 087668658 9 Sandra Collins 201 STMONK Ca' Now I want sector indicator to extract 14. I have achieved it: str.split ('') .each do | Substr | If substr.starts_with? ( '14') key = substr.slice (2,5) break .to_i end end I feel there must be a better way to do it. I can not find more direct and one line solution for string matching in Ruby. Please suggest a better approach. not entirely clear who are looking for because shows your example string characters, but Your title points out. Either way, it's a good job for a regular expression foo = '12yyyy 014dddd 14ddddd gghgfbddc' time = '12yyyy 014dddd 1,499,999 gghgfbddc' baz = '12yyyy 014dddd 14a9B9z gghgfbddc' foo [/ \ B14 [a-zA-Z] + /] # = & gt; "14ddddd" bar [/ b14 \ d + /] ...

How to detect that Python code is being executed through the debugger? -

Is there an easy way to find within the Python Code, that this code is being executed via Python Debugger ? I have a small Python application that uses Java code (thanks to JPIP) when I debug the Python part, I also have to give debug option to an embedded JVM. Python debuggers (as well as professor and coverage tools) when interesting incidents occur, callback Use the sys.settrace function for (in the sys module). If you are using Python 2.6, you can call sys.gettrace () to get the current trace callback function. If it is not none , then you can assume that you should go into debug parameters in JVM. It is not clear how you can do this prior 2.6.

objective c - Reloading an iOS View Controller -

Image
I have a single visual application that uses pars to create PFLogInViewController. Before reaching the BeaconViewController, the user must authenticate with Facebook - it's working fine. My issue is with the logout part - after the user's session is lost, I need to PFLogInViewController to appear again; I try to complete it by popping it on RootViewController But it is not solving the problem. I have also referred the thread as one, but then there is no luck. / P> - (zero) viewDidAppear: (BOOL) animated {[Super ViewedAppear: Animated]; FRBCCI * request = [FBCF request form]; [Start with the request Finishing Handler: ^ (FBCACC Connection * Connection, Id Result, NSERR * Error) {If (! Error!) {[Self-Stretched View Controller Permission: Yes Completed: Zero]; [Self-photo request]; } And if (error) {NSLog (@ "Facebook session was invalid"); [Self logout button action: zero]; PFLogInViewController * Login = [[PFLogInViewController alloc] init]; Login.field...

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

We have a working ASP.NET Web API REST service, which is one of the methods of our controller, HTTPTTEX. .) Socket handler code looks something like this ... Public async task socket handler (AspNetWebSocketContext context) {_webSocket = context.WebSocket; ... while (! Cts.IsCancellationRequested) {WebSocketReceiveResult Results = _webSocket.ReceiveAsync (Input Segment, cts.Token) .Result; WebSocketsStateCollusocketState = _webSocket.State; If (result.MessageType == WebSocketMessageType.Close || currentSocketState == WebSocketState.CloseReceived) {// What should I use. CloseAysnc () or. CloseOutputAsync ()? _webSocket.CloseOutputAsync (WebSocketCloseStatus.NormalClosure, "Client Requested", cts.Token). Wait (); } If (currentSocketState == WebSocketState.Open) {...}}} .What is the difference between .CooseAsync () and CloseOutputAysnc ()? I tried both of them and they both seemed to work fine but some difference should be the same they both describe very similar to...

If statement in function Python -

The quick question I was wondering is where I'm going wrong, I am currently studying Python and where I But this simple grade calculator function is going wrong using a mark as a parameter. This is my code. I was wondering if you can tell me in the right direction (mark) = 16: return ("A") Alief Mark & ​​gt; = 12 more symbols & lt; 16: Return ("B"): Elife Mark & ​​gt; 8 and Mark & ​​lt; 11: Return ("C") Alif Mark & ​​lt; 8: Return ("F") First of all I do If the "mark" is an integer, I can get rid of the redundant check for those values ​​which have already been checked, then I can get rid of external brackets (thanks, mathias). Count of DFGrade (Mark): Mark = In Mark (Mark) if Mark> = 16: Return "A" Alf Mark> = 12: Return "B" Elif Hitting A & gt; 8: return "C" of return "F"

php - Symfony 2 routing doesnt work in prod -

itemprop = "text"> IM has developed a very simple blog in Symphony, there are two bundles: Blogs and administrators that are both fine in the Dev environment. However, the main administrator route starts working in prod because it throws 404. Every other route (such as / admin / categories and so on) works but / admin only if I /app_dev.php/admin writes then works already has approved the cache. I do not think I'm the admin I have written some code to block, I do not know where I can do such things .. Besides, it is not even known how code snippets need debugging, but if someone A question I'll update. > Administration route: admin_image_upload: Path: / Imageupload default: {_controller: SzoBeszAdminBundle: admin: imageUpload} admin_posts: Path: / admin defaults: {_controller: SzoBeszAdminBundle: Administrator: Index} admin_posts_paginated: path: / admin / posts / {PAGENUMBER} default: {_controller: SzoBeszAdminBundle: admin: index} admin_categories: path:...

How do I make Chef wait for the app deployment before moving files? -

मेरे पास निम्न बावर्ची नुस्खा है Aws_s3_file "/usr/share/tomcat/webapps/system.war" do बाल्टी "माइबकेट" रिमोट_पाथ "बिल्ड्स / सिस्टम_लाटस्ट। वार्व" एवेएस_एकेस_की_आईडीआईडी ​​[एपीएस_एकेडीआईकीआईडी] एएसएएस_एसएटीटीएक्सूटिकी नोड [: एएसएससीएसीटीआरएसीटी_एकेडीआईकी] एंड सर्विस "टोमैकैट" एक्शन [: रीस्टार्ट ] अंत aws_s3_file "/usr/share/tomcat/webapps/system/WEB-INF/application.properties" बाल्टी "माइबकेट" रिमोट_पाथ "कॉन्फ़िग / एप्लिकेशन.प्रॉपर्टीज़" aws_access_key_id नोड [: aws_access_key_id] aws_secret_access_key नोड [: aws_secret_access_key] अंत यह हर बार चलाने पर ठीक काम करता है, सिवाय इसके कि मशीन एक ताजा है। जब यह एक ताजी मशीन है, तो मुझे मिलता है: एर्रा :: एनोन्ट ------------- ऐसी कोई फ़ाइल या निर्देशिका नहीं है - /usr/share/tomcat/webapps/system/WEB-INF/application.properties मुझे लगता है कि ऐसा होता है क्योंकि टोमट है आवेदन को नियोजित नहीं किया गया है, इसलिए जब यह कथन चलाया जाता है तो फ़ोल्डर मौजूद नहीं...

sql - Table not found in subquery using Microsoft Access 2010 -

I am trying to use subqueries in Microsoft Access 2010. Here is the table "Table1": ID data -------- 1 ABC2DF There are two possible uses of the subkey: Select ID (selection ID from Table 1) AS TMP WHERE tmp.ID & gt; 1 This works, and returns the correct result ID = 2. However, as a select ID (selection ID from Table 1) from , TMP where EXIST ( returns the following error: Microsoft Access Database Engine input table or query 'TMP can not be found', make sure it exists and its name is spelled correctly. Is not a good example, but give me another subquery reference in more complex cases SAPT for SRTing by SELECT Temp.Rating (Select, AVG as SAG) SAP Temporary Time Temporary Time (SELECT MIN (Temp) .avgage) What is the reason for such errors and how to solve it? There are a lot easier ways for you to suggest. For example, your second query may be re-applied in such a way: Select Top 1 SRT, as Aviga from sailors s group by avera...

c# - Passing a data class as a variable to a function -

I am trying to create a reusable module for API calls in C #. I want to use it for many different APIs. But there is a problem passing my data class as my function, which handles the API call. So we say, for example, that I say two completely separate APIs, we call them "AP # 1" and "API # 2". And I have the following classes: // The format of the response from API # 1 is the public class, its 01Get {Public Entity ID {get; Set; } Public Date Time Order Date {Received; Set; }} // This is AP # 2 Public Sector API 02 Gate {Public Bull Hagreen {Received; Set; } The name of the public string {get; Set; }} Here's a call to my function. It works fine if I use one of my data squares directly in this way: var results = callap But this does not allow me flexibility. Here is the definition of my function (I do not affect those who are leaving other parameters things): private async Task & lt; TResult & gt; CallAPI & lt; TResult & gt; ...

All commands failing in powershell (4.0.) Even "c:" and "cd" and "dir" -

I'm not sure when it will start ... whenever I open PowerShell, I also execute the most basic commands can not do . I always get the following error message: psc: \> gt; Dir dir: Drive can not get a drive with the name '.' Does not exist. In line: 1 character: 1 + dial + ~~~ + Category information: Object knotfound: (.: String) [], DriveNotFoundException + Fully Qualified Error ID: DriveNotFound --- It was working fine but now suddenly I can not do anything. I tried to remove and reinstall the PowerShell 4 ... there is no change sorry for the formatting here ... Looks, but the preview text is very awesome Eats I never miss to install Java, but seeing my regular% path% That's% Java_Home% is there, but the price is never used or defined anywhere. Once I got out of my way, the top mistake went away. Strange thing that it will also be an issue for the powers. You thought that it would only leave a non-existent directory on my way, and after solving a co...

c# - How to display my database created with EF Code First in DataGridView? -

I am trying to display my DB table in a DataGridView. I have created a database using EF code first approach here. Here are my DB classes: Public class blood donation {public int blood donation id {receipt; Set; } Public string firstname {get; Set; } Public String LastName {get; Set; } Date of birth date of public date received; Set; } Public DateTimeDelection {Receive; Set; } Public Bloodprit Bloodtip {get; Set; } Public Virtual List & lt; Blood donation & gt; Donation [receive; Set; }} Public class blood donation {public at blood donation} {received; Set; } Public Date Time Date {Receive; Set; } Public Virtual Blood Donor Blood Donor {Received; Set; }} Public Square BloodBankContext: DbContext {Public BloodBankContext (): Support ("BloodBankDatabase1") {Database.SetInitializer & LT; BloodBankContext & gt; (New DropCreateDatabaseAlways & lt; BloodBankContext & gt; ()); } Public DbSet & lt; BloodDonor & gt; Blood donor {receive; Set; } P...