Saturday, 15 March 2014

php - Setup SSL for PDO-MySQL on Fedora -


I want to set up SSL for MySQL on Fedora. I am using PDO in PHP as a MySQL-connector. But it is not working.

PHP-version (php -v) is:

PHP 5.6.6 (CLI) (created: February 19, 2015 13:46: 39)

When I check for php -m , I get a long list, which openssl, PDO, pdo_mysql, mysql. In

I have added "SSL" and three certificates (CA-Root, Private Key, Certificate) in / code / my.cnf . I restart MySQL and Apache.

The PDO-connector is:

  function getDBConn () {new PDF back ('mysql: host = localhost; dbname = forum', user, pass, array ( PDO :: MYSQL_ATEM_SSL_KEY = & gt; Path_to_sme_s_in_mn.fkk, PDO :: MySQL_ATTR_SSL_CERT = & gt; Path_to_sm_a_s_in_man.cn CRT, PDO :: MYSQL_ATTR_SSL_CA = & gt; Path_to_sem_e_s_a_i_man.cng.}}  

But on the pages connecting to the database, I get the following errors:

  Warning: PDO :: __ generation (): This section uses SSL / crypto 78/78 / XP / HTML / functions.php does not support 78 Warning: PDO :: __ Construct (): Can not connect using SSL using SSL. 78 WARNING: PDO :: __ generation ( ): [2002] (Trying to connect via UNIX: ///var/lib/mysql/mysql.sock) In the line /var/www/html/functions.php 78 incorrect error: the message With regard to the exceptions 'PDOException' 'SQL: STATE [HY000] [2002]' in / var / wWw / html / functions.php: 78 stack trace .....  

Is there any solution for this too?

   

Another major reason you're getting the error is because you do not have openssl installed


c# - How do you implement the "IDictionaryEnumerator GetEnumerator()" method in IDictionary? -


I am creating a dictionary data structure that implements the IDictionary interface. When it comes to implementing this method, I get trapped. I have a calculator that gives the example of the QueenPower, but whatever I am getting, I have to implement IDZiniAnematerator.

Is there any easy way to convert a KeyWalkPure Enumerator to an IDictionaryEnumerator? I know that I can hack the following:

  IDictionaryEnumerator GetEnumerator () {new dictionary (this.keyValueEnumerator ()). GetEnumerator (); }  

But this is very disabled because it loads all the enumerator data.

Code> // You have told us that you have a public INMERATOR and lieutenant; KevalPear & lt; Vaccines, TVs & gt; & Gt; Key ValueAnemator () {Return something; }

I have created a MyDictionaryEnumerator which is the IDictionaryEnumerator interface

  // it shows you Public IDictionaryEnumerator requires GetEnumerator () (New MyDictionaryEnumerator (KeyValueEnumerator ());} Public Class MyDictionaryEnumerator: IDictionaryEnumerator {Public MyDictionaryEnumerator (IEnumerator & lt; KeyValuePair & lt; TKey, TValu & gt; & gt; Nummeter) {Nommentator = Enumerator} ;} Public Inimetator & lt; KeyWellPayer & lt; Vaccines, TLL & gt; & gt; Counters; Public Online Entry Entry {Received New dictionary entry (enumerator.orrent.k, enumerator.quirt.value);}} public object key {get {return enumerator.Current.Key;}} public object values ​​{get {return enumerator.Current.Value;} } Public Object Ongoing {get {return Entry;}} Public Bull Move Next () {Return Enumerator. Headbook ();} Public Zero Reset () {Enumerator. Reset}}}  
< P> MyDictionaryEnumerator is a very simple class that builds around KeyValueEnumerator () you Diction Ary Entry code> Objects and / or key and value (I would say it is implemented)


java - Why is this Android code so slow? -


I have a contour plot rendering routine which is ignition fast; it is basically the OnPaint event Presents some form in, and updates very quickly ... Basically the faster you can move the mouse I was very pleased with it. It is based on this paper:

However, I put it on Android / Java and targeted a very fast tablet (Nexus 9) and this is surprisingly slow , Where should I use the wrong approach that I think. Basically I:

1) Create a visual programmatically, 2) Apply the ONDA method to call your C Cantoplate class draw method, which repeats through 2DD data arrays. , The 1-D "cans" array, and the "DrawPolygonRegion" function makes a few thousand calls that I wrote below.

It takes an amazingly long time, compared to NAT at approximately 100x slow, at the point where I am thinking that I am doing something wrong specific questions:

a) What speed is speed-tweakable down? Is using a path a faster way to attract polygon? (There is a droplie function in the .NET, something new to the Android port was doing) b) Do I need to do something to "batch" my rendering commands? Canvas (spec) such. SuspendUpdates, Canvas.ResumeUpdates? C) Do I need to activate double buffering or something else? My quick research says that it is done automatically in Android, but it is not sure. (I had to activate it at NAT, but I'm sure if I do not want here)

Thank you very much for any insights / support.

  Zero DrawPolygonRegion (canvas c, int color, double ... p) {int length = p.length; If (length> = 6) {paint.setColor (color); Paint.setStyle (Style.FILL); Path path = new path (); Path.moveTo (Float) P [0], (Float) P [1]); // the first point used for path.lineTo (float) P [2], (float) p [3]); Path.lineTo (Float) P [4], (Float) P [5]); Int idx = 6; (Int n = 6; n & lt; length; n + = 2) {path.lineTo (float) p [n], (float) p [n + 1]) for; } CDRPath (path, paint); }}  

Call it a few thousand times Oh yeah, you have some problems.

1) It allocates a new path. Quickly add allocation to Android, try to avoid them, like reusing objects, especially on on-douf Functions.

2) You should not really build the entire path at all times - they are better saved and reused in append mode.

3) Downstream to float from double to free is not free. Avoid it

4) Are you doing it straight on the screen canvas? do not do. Come to a bitmap canvas in your own thread, and throw the results in the canvas of the screen.

I suspect that this code is moving on the net with PCs with better processor and RAM. I think your butt is being saved by hardware acceleration.


objective c - perform velocity in sprite kit only one time by touch begin -


I want to touch the phantom once in velocity, do not do it after touching it once

  - Create (SKSpriteNode *) BOLDWALL LOCATION: (CPP) status {_d = [SKSpriteNode spriteNodeWithImageNamed: @ "d"]; _d.position = Status; _d.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize: _d.size]; _d.physicsBody.velocity = Velocity; - (zero) touch touch: (NSSET *) touches the event: (UIEvent *) Event {}  


python - How to use tools directory in "data science at the command line" repo? -


I created a project to copy the code in "Jr. Genens" "Data Science on the Command Line". GitHub repo is cloned in a local directory. (I did not want to use Wgrent-based setup and ignored manual installation.)

The repo has a tool directory, but it is unclear to me how any tool launched. Go command line They include Drake, Rio, Scrap, Waka.

I know that I am missing something very simple, but it is to save me signal / <>

Generally, If you have a script (or command line tool) in the same directory, you can execute it by using ./my-script . If you are not in the same directory, you can use the relative or full path. For example, for Rio , you can run something like this:

  $ cd ~ / data-science-at-the-command-line / book $ Cat ch05 / data / iris.csv | ../tools/Rio-e 'mean (df $ sepal_length)' 5.843333  

If you want to use a certain command line tool more often, or execute it from anywhere It is helpful to insert the directory on your file system without specifying your file, which includes the command line tool on PATH . You can set this, for example, in ~ / .bashrc (assuming that Bash is your shell).


Excel formula to calculate YTD metrics by detecting current month -


My two excellent tables - 2015 sale and sale of 2014 are in the following format and the third category of one year The variance has been called on, it looks like a change from 2014 to 2015.

  2015 Feb Mar .... YTD (Total) Order Revenue ... ... January 2014 Feb Mar .... YTD (Total) Order Revenue ... ... Vicharan Jan Feb Mar .... YTD Order Revenue ... ...  

Computing the mass deviation is more than January or February Virien is easier than February. How do I calculate deviation of the date of the year? Since the 2014 table is already populated for the whole year - hence the last column is the sum of 12 months of data.

For 2015, I only have January and February. Therefore, there should be Vicharan Pillar for the year-by-year (January + February 2015) / (January + February 2014) How do I write a formula to examine the current month and after that only for those two months Do yoga

By using the Excel formula (no-VBA), you can calculate deviation for SUM , OFFSET , and COUNT functions. In the simple formula below, the line 1 is populated completely all 12 months. Line 2 has population for only 2 months. Using the COUNT formula in the category, OFFSET will extend the width based on the number of rows in the population.

Let me know if you have any problem in being friendly to it.

  = SUM (OFFSET ($ A $ 2,0,0,1, COUNT ($ A $ 2: $ L $ 2)) / SM (OFFSET ($ A $ 1, 0,0,1, COUNT ($ A $ 2: $ L $ 2)))  

nginx + mysql + hhvm + phpmyadmin - Stuck after login page all blank and token in the url -


nginx + mysql 5.5 + hhvm पर उबुंटू 14.10 ठीक काम करता है मैं के साथ phpmyadmin स्थापित: sudo apt-get phpmyadmin और मैं इस संस्करण है:। 4.2.6-1

के बाद phpmyadmin से प्रवेश पृष्ठ मैं इस तरह एक रिक्त पृष्ठ कुछ पाने यूआरएल में: /phpmyadmin/index.php?token=7e858f9ed3b783b34d4c2274d721f125&SID

मैं hhvm त्रुटि लॉग में इस त्रुटि संदेश मिलता है:

\ nFatal त्रुटि: \ nStack ट्रेस: ​​न आया हुआ अपवाद 'अपवाद' संदेश के साथ में 'पोर्ट संख्यात्मक नहीं है' \ n # 0 (): mysqli-> real_connect () \ n # 1 / usr / share / phpmyadmin / पुस्तकालयों / dbi / DBIMysqli.class.php (114): mysqli_real_connect () \ n # 2 /usr/share/phpmyadmin/libraries/dbi/DBIMysqli.class.php(191): PMA_DBI_Mysqli -> _ realConnect () \ n # 3 / usr /share/phpmyadmin/libraries/DatabaseInterface.class.php(2078): PMA_DBI_Mysqli-> कनेक्ट () \ n # 4 /usr/share/phpmyadmin/libraries/common.inc.php(978): PMA_DatabaseInterface-> कनेक्ट () \ N # 5 /usr/share/phpmyadmin/index.php(12): शामिल करें () \ n # 6 {मुख्य}

मैं इसे कैसे ठीक कर सकता हूं?

< / Div> < p>

आसान ठीक है, बस खुले "/usr/share/phpmyadmin/libraries/dbi/mysqli.dbi.lib.php" और पाते हैं

<पूर्व> need_once './libraries/logging.lib.php';

इसे निम्नलिखित से बदलें ...

  $ ग्लोबल ['cfg'] ['सर्वर'] ['पोर्ट'] = 3306; Need_once './libraries/logging.lib.php';  

python - GAE ndb filter by key(id) -


I want to filter by key value (if I, according to ID)

Developers Console Key Value data

I want to do this in my code:

  DataModel.query (DataModel.key> gt; NDB.KA ('DataModel', ID_View)). Order (data modal data, data modell notes). Fech (2000)  

Which error has increased ...

My id_value is integer.

How can I find and filter to get data with id greater than id_value? It is OK to filter by key inequality on key, is it wrong that no

another object, one thing can not be combine in an inequal filter by boundaries: <...

By adding several filters to cite under, using inequalities for many properties, or by combining a disparity with the sort order on a different asset. All are currently rejected.

The last of these three borders is the one you are running in.


javascript - Webgrid ajax call MVC 5 -


लक्ष्य:

AJAX के माध्यम से अगले पृष्ठ का चयन करते समय वेबग्रीड को पॉप्युलेट करने के लिए (मुझे नहीं चाहिए पृष्ठ पुनः लोड करने के लिए)।

वर्तमान में मेरे पास है:

  सार्वजनिक कार्यप्रदर्शन सूचकांक () {var users = (_context.Audit में से एक नया au.AuditId, A.FirstInserted, a.FirstInsertedBy, a.IsDeleted})। ToList (); वापसी देखें (उपयोगकर्ता); }  

और

  @ {var ग्रिड = नया वेबग्रिड (मॉडल, पंक्तियां प्रदाता: 10, ajaxUpdateContainerId: "grid"); } & Lt; div id = "grid" & gt; @ ग्रीड.गेटएचटीएमएल (टेबल स्टाइल: "टेबल टेबल-बार्डेड", मोड: वेबग्रिड पेजरमोड्स.सभी, प्रथम टेक्स्ट: "& lt; & lt; प्रथम", पिछले टेक्स्ट: "& lt; पिछला", अगला टेक्स्ट: "अगला", अंतिम टेक्स्ट: "अंतिम & Gt; & gt; ") & lt; / div & gt;  

समस्या:

वेबग्रीड से पता चलता है लेकिन ऐसा लगता है कि केवल सूचकांक कार्रवाई पर मिलते हैं मैं इसे कैसे बदल सकता हूं ताकि यह मॉडल की आपूर्ति करने वाली विधि को एजेक्स कॉल कर सके?

मैंने यहाँ देखा है और मुझे यह पूरा करने के लिए बहुत ज्यादा संकेत नहीं दिया:

मुझे मिल गया, जाहिरा तौर पर आपको पेज के शीर्ष पर jquery जोड़ना होगा और यह काम करता है।

< / div>

python - Run an exe file with parameters to browse a file -


I want to use sluggish razor software, where it asks for a source file in it. (Shown in the photo below).

In addition, another Dummy Image Link should be provided.

Enter the image details here

Execute the executable file Need to use Python code.

thanks :)

I've found a very useful sendkey .

It has taken a lot of time to set up sendkeys on dragon 2.7 and its website was closed after searching a lot for how to automate a software. So it was a good experience to set it up with the help of Mingav.

Here I have written in my Pyro code:

  import win32com.client import subprocess shell = Win32com ("{TAB}", 0)  

and so much on software according to my needs.

Thanks @ Celo and @ Stefan


How to remove a global ajax event handler in jQuery -


This may sound like a very sophisticated question (I really like newbie in JQuery), but my problem is: / P>

Each time a special button is clicked on my website, I have to attach a function that registers a global AJAX event handler (.jaxSend, being exact) and check the options for the AJAX request Does.

However, since the button can be clicked multiple times, I need to delete the handler in some way so that the next button click does not re-engage a new event handler, resulting in event handlers Will be stacking.

If you are surprised, then I can not attach a callback to a specific agay request because I include the code through the Google Tag Manager custom HTML tag (if you know what I'm saying )

ajaxSend function only .on ('ajaxSend', ...) is a cover

so you should be able to use the $ (document) .off ('ajax send'). ) to remove all existing handlers.


html - Multiple columns of links allowing for multiple lines -


I am currently trying to create a 2 column list of links, however, when a link goes to multiple rows, So this loses the difference in the next column I have solved similar problems in the past, although it always requires me to use every time. Is there a clean CSS method to get this layout without using jQuery plugins?

multiple columns

markup

  & lt; Ul class = "two-col-links" & gt; & Lt; Li & gt; & Lt; A href = "" & gt; About us & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" & gt; Press & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" & gt; NMMT & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" & gt; Career & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" & gt; Sitemap & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" & gt; Partner & amp; Amp; & Lt; Br> Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" & gt; Rules & amp; Amp; Amp; & Lt; Br> Conditions & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

CSS

ul {width: 200px; } Li {width: 100px; Swim left; Display: Inline; }

Note the example given above why the "partners and links" leave the difference on the left hand column - one of the is the way ?

Using is a bad idea column-count Example of an example:

  & lt; ul class = "two-col-links" & gt; & lt; li & Lt; li & gt; & lt; a href = "" & gt; About us & lt; / a & gt; & lt; / li & gt; & lt; li & gt; & lt; a href = "" & gt; ; Press & lt; / a & gt; & lt; / li & gt; & lt; li & gt; & lt; a href = "" & gt; NMMT  Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "" & gt; Rules & amp; Amp; Amp; & Lt; Br> Conditions & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  


Java Anonymous Object and Garbage collection part -2 -


<पूर्व> निजी विद्यार्थी छात्र = नए विद्यार्थी (); सार्वजनिक छात्र प्राप्त छात्र () {रिटर्न छात्र; } सार्वजनिक शून्य समारोह () {getStudent ()। SetName ("जॉन"); } सार्वजनिक शून्य समारोह () {छात्र student_local = getStudent (); student_local.setName ( "जॉन"); }

क्या दोनों सीएनपी के लिए जीसी अलग तरीके से व्यवहार करते हैं?

मेरा मतलब है कि किस मामले में (सीएएसई -1 / सीएएसई -2) अधिक जीसी में कुशल है समय की शर्तें?

मैं साधारण शब्द जीसी को मामले -1 के लिए बुलाया जाएगा या नहीं?

अद्यतन, आपके द्वारा जोड़े गए प्रश्न के बारे में:

मेरा मतलब है कि समय के मामले में कौन से मामला (सीएएसई -1 / सीएएसई -2) अधिक जीसी कुशल है?

< / Blockquote>

न तो क्योंकि आप दोनों कार्यों में एक ही काम करते हैं और याद रखें कि आप वास्तव में नहीं जानते हैं कि आपकी ऑब्जेक्ट कैसे एकत्र किए जाएंगे, और इससे इस तरह के उदाहरणों के लिए भी कोई फर्क नहीं पड़ता।

< P> जीसी कैसे काम करता है इस विवरण को पढ़ें:

संपादित करें: प्रश्नों को पढ़ना सीखना चाहिए, मेरे उत्तर की इस संशोधन को पढ़ना, माफ करना ए एमआईटी।


Extract string from file and assign to variable using scripting in Bash -


Currently I need to remove a number from one line in a file, add 1 to that number and write to the previous number Using a bash in the same file, my line looks like this:

  & lt; Server port = "8080" ... & gt;  

And I call it & lt; Server port = "8081" ... & gt;

I know that - I can find the command "8080" and change it with something, I do not know how to actually get 8080 And it is converted to 8081. How can I do this?

Thanks in advance. /p>

If you need additional, then awk is a better tool than Sed .

Consider the file:

  $ cat file & lt; Server port = "8080" ... & gt;  

We can increase the port number like this:

  $ awk -F \ "'/ & lt; server / {$ 2 ++} 1 This file was designed to work with sample input provided by you.  

Set how
  • -F \ "

    field separator to " With this as the field separator, the port number is its own field.

  • /

    Only the word server .

  • {$ 2 ++}

    For those selected lines, multiply another field by one.

  • 1

    This is a secret rhythm of awk for "Print All Rows."


python - Django Registration Redux Registration form setting -


Django Registration In Redux, there is option registration form that one can use. For example, you can use RegistrationFormTermsOfService or RegistrationFormUniqueEmail in a registration.forms file. I've read the code and the data that how to do this is setting a REGISTRATION_FORM variable in the settings.py file. In the registration.views we see the following:

  REGISTRATION_FORM_PATH = getattr (settings, 'registration.forms.RegistrationForm') REGISTRATION_FORM = import_string (REGISTRATION_FORM_PATH)  

However, when I set up REGISTRATION_FORM in 'settings.forms.RegistrationFormUniqueEmail' for settings.py, I still can not get the form for unique email. Any help would be appreciated.

OK, so I figured this one. In fact, Version 1.1 of the DJENGOGO Registration Redux has the option of setting this setting that the registration form was not available in the settings. The code that I was seeing with Github was version 1.2. So if it is with you, then just install it from Gitub.


android - How to change selected tab title color -


I have to change selected tab color in my tab activity

for example For, the selected item text should have the color # cea939 , and the unselected item color should be # d7ba60 . What should I do to change this? Actually, I tried to add text code value to apptheme_tab_indicator.xml - but no results by the way, I use AppCompat and if there is a solution, then this How does the variant for styles and styles-v21 ?

You can see your answer for the post, you can use custom view for tabs, And can paste the background code into the color color setting in the color setting:

  tab selected tab = yourActionBar.getSelectedTab (); View Tab View = Selected Tab.getCustomView (); TextViewText = (TextView) tabw.findvibiid (RIDEIR_text_id); Text.setColor (your_text_color);  

Hope this helps!


java - How to resolve NullPointerException? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 12 जवाब

मैं एक बनाने की कोशिश कर रहा हूँ जेपीएनएल जो पूछता है कि खिलाड़ी ब्लैक जैक गेम में हिट या स्टैंड करना चाहता है।

  सार्वजनिक वर्ग निर्णय लेआउट जेफ्रेम का विस्तार करता है {जेपीनल फैलाव पैनल; सार्वजनिक जेबटन बटन []; निजी अंतिम स्ट्रिंग नाम [] = {"हाँ", "नहीं"}; अंतिम स्थैतिक स्ट्रिंग ASK_FOR_DECISION = "तय करना है कि क्या हिट या नहीं।"; सार्वजनिक निर्णय लेआउट () {सुपर ("निर्णय पैनल डेमो"); जेपीनल पैनल = नया जेपीनल (); जेपीनेल टेक्स्टफिल्डपैनेल = नया जेपीनल (); अंतिम JTextField टीएफ = नया JTextField (); Tf.setText (एएसके_FOR_DECISION); Tf.setEditable (गलत); TextFieldPanel.add (tf); // फैसले जेनेल निर्णय का निर्माण करें = नया जेपीएनएल (); के लिए (पूर्णांक संख्या = 0; गणना & lt; बटन; लम्बाई; गणना ++) {बटन [गणना] = नया जेबटन (नाम [गणना]); बटन [गणना] .addActionListener (नया एक्शनलिस्टनर () {सार्वजनिक शून्य क्रिया कार्रवाई (क्रिया ईवेंट ई) {if (e.getSource () == बटन [0]) {tf.setText ("हाँ, आप अधिक कार्ड चाहिए।"); } अन्य {tf.setText ("नहीं, आप अधिक कार्ड नहीं चाहते हैं।");}}}); } जेपीएनएल निर्णयपैनेल = नया जेपीनल (); DecisionPanel.add (निर्णय का स्थान); Panel.add (टेक्स्टफील्ड पिनेल, बॉर्डर लेआउट। PAGE_START); Panel.add (निर्णय पैनल, बॉर्डर लेआउट। सीए); }  

} `

मुझे नहीं पता कि लाइन में एक संकलन त्रुटि क्यों है:

  के लिए (int count = 0 ; गिनती & lt; buttons.length; count ++)  

, जो ग्रहण मुझे बताता रहता है क्या किसी के पास कोई विचार है कि यह क्यों हो रहा है?

  सार्वजनिक जेबटन बटन [];  

आप अपने बटन को कभी भी प्रारंभ नहीं करते हैं, इसलिए जब आप buttons.length कॉल करने का प्रयास करते हैं तो आपको एक एनपीई प्राप्त होता है। आप शायद उस सरणी में कुछ बटन को जगह करना चाहते हैं


angularjs - Angular ui-router $state.go is not redirecting inside resolve -


itemprop = "text">

In my angle app, I see if the user is land on the landing page and is already authenticated, then it will be sent to the home page Redirect to.

  .state ('landingpage', {abstract: "true", url: "/ landing page", template url: "app / landing page / landing page html", solve: { AutoLanguage check: ['$ State', '$ window', function ($ state, $ window) {if ($ window.localStorage.access_token! = Null) {if ($ window.sessionStorage.access_token == null) {$ Window.sessionStorage.access_token = $ Window.localStorage.access_token;} UserInfoService.SetUserAuthenticated (true); // This return $ state.go ('app.home') is not redirecting;}}}}})  

The problem is that although all the resolution code is run successfully, the user app.home Not being redirected. Someone can tell why this happens?

Note : There is also a resolution of the state 'app' in which it receives data appearing in 'AP home' condition. / P>

Your problem can be two solutions

  • Most First you can emit an event and the listener will handle your state infection. You can implement the listener anywhere in the parent controller

  • Secondly, you can apply the $ stateChangeStart hook and check your redirection status

    < Pre> $ root 'scope' $ ('$ change state' start, function (event, toastate) {if (toState.name === 'landing page') {if (! IsAuthenticated ()) {// Check that the user is allowed to transition event.preventDefault (); // Prevent migration to default state $ state.go ('home.dashboard');}}});

dojo - Getting id from row clicked on a dgrid List -


I'm just starting to use dgrid, and going through the sample dTunes, I connected to each line Unable to locate ID. This is very curative on my part, but how can I get the ID sent from the data source? Define

  (['require', 'dgrid / list', 'dgrid / OnDemandGrid', 'doji / database / arrays', 'doji / stateful', 'doji / as' 'Dagrid / Selection', 'Digger / Keyboard', 'Dread / Extension / Column Hyder', 'Dojo / _base / Declare', 'Dojo / (Var, cstsNode, Dotor / Request Memory', 'Add-Selector / Put' , 'Dojo / Dome Readie!'), Function (Required, List, Grid, Selection, Keyboard, Header, Announced, Array, Used, = Put ​​(listNode, 'div # cstsCars'); ... Var cstsList = new tunes list ({}, cstsNode); var datacity Exacts = new request memory ({target: require.toUrl ('./datacsts.json')}) ... ... dataset. Ft (). Then (function (car) {cstsCars = arrayUtil.map (car, pickfield ( 'Details')); cstsCars.unshift ('all (' + cstsCars.length + 'CSTS cars' + (CstsCars.Length! == 1? 'S': '') + ')'); cstsList.renderArray CstsCars);}); ... cstsList.on ('dgrid-select', function (event) {var row = event.rows [0]; console.log (row.id); // line shows the number i How do I get real IDs or other areas? Console.log (row.data); // shows the line shown text ("sample text 1") console.log (row.data.id); // undefined}); Here is the snippet of sample data such as I am supplying:  
  [{"id": "221", "description": "sample "Sample text 2"}, {"id": "223", "description": "sample text 3"}]   / former> 

I want to see the ID instead, row Gives .id, 1,2 and 3, i.e. line number (or id dgrid created?).

You have not actually shown a complete example, but considering that you are in any way You are using the store, if you have to give your question to the DGRED for the store, you will have a much easier time. If you use dgrid / OnDemandList (or dgrid / list plus dgrid / extensions / pagination ), you can set your dataCSTS In the < collection store property, this will present it for you, and it will pick up your ID properly (since memory , and RequestMemory extensions, to use the id to define their default property).

The most appropriate place that you are currently doing before renderArray will probably be in the render line method if you are just using the list If not, there is no grid (the default bus in the list returns a text with the node that has been done in it; you will pass an object, so you want to lose the properties you want to display first.)

If you want a top row, showHeader: Consider implementing true setting renderHeader . (This is by default in the list by default, but the grid sets it to the correct and applies it.)

You may want to check out.


symfony cmf - Doctrine PHPCR - Query on ReferenceOne attribute -


I have a problem with the theory phpcr and query builder (it is possible to do a question on an attribute with ReferenceOne) (

For example:?

  / ** * @PHPCR \ ReferenceOne (targetDocument = ".... \ program") * * / Private $ program;  

But when I'm trying to create a question on it:

  $ qb-> Where () - & gt; Eq () - & gt; Region ('news.program') - & gt; Literal ($ program & gt; getId ()) - & gt; the ending ();  

I get the following error

  Can not use association property "program" class ... ... \ "a dynamic operand .  

Is there any way to ask any questions on this type of feature?

You need to use DocumentManager :: getReferrers ()

ContainerAware Reference (Controller Or stability):

  / ** @var \ principle \ ODM \ PHPCR \ DocumentManager $ dm * / $ Dm = $ this-> getContainer () - & gt; get ('doctrine_phpcr') -> getManager (); $ referer = $ DM- & gt; get recipient ($ your object, empty, empty, blank , 'Your bundle: Referrer class');  

Here it will be:

$ code = $ dm-> GetReferrers ($ program, Null, null, vulnerable, 'YourBundle: News');

linux - Group permissions there but cannot access file? -


I have a simple FTP file on my Linux machine for a machine on my home directory and this file It was in permissions ....

  tom @ bellmachine-6745: ~ $ ---- rwx --- 1 tom tom 6 Mar 16 12:45 redtest.txt  

said that this file belongs to the group, he said that the terminal was under Tom's proprietary file Tom

But touching redtest.txt allowed me to " Permission denied "given vi redtest.txt Why did one give me "denied" permission?

I could only edit when I was allowed to do the following through the file .... chmod 670 redtest.txt

Let me file ownership Tom and Tom were members of the group. OK, the access to the group Tom members for this file was only because why should I change those keymaps, this should allow me for the first time ???

Because UNIX permissions work like this: If you are the owner of the file, The gestures are - hence the permission has not been denied. If the file was owned by someone else, e.g. Jane and Jane Group will be in Tom, Jane will be able to access it. If the existing user is not the owner of the file (Tom) nor the group is in the tow then permission for others will apply.

Note that the root user (with UID 0) ignores the permissions and is enabled to access the file with any permissions set (---------- LS output).


java - Calculated group-by fields in MongoDB -


From the MongoDB documentation for this example, how can I write queries using MongoTemplate?

  {$ $ group: {_id: {month: {$ month: "$ date"}, day: {$ dayOfMonth: "$ date"}, year: {$ Year: $ Date:}}, total value: {$ sum: {$ multiply: ["$ price", "$ quantity"]}}, average amount: $ $ average: "$ quantity"}, calculation: {$ sum: 1}}}])  

Or in general, how do I group from a calculated field?

You can actually do something like "project", but for me it's a little Intuitive that requires $ project step <("days"). ("Year") and expression ("year (date)") ("year") and expression ("day"). And expression (" ("Total amount"). ("Month")); as I said, As per intuitive as you should be able to declare all this under the $ group phase, but the helpers do not work like this. Some of the serialization It comes out of the fun (the date operator wraps the archers with arrays), but it seems to work. But still, it is rather two pipeline steps instead of one.

What is the problem with separation of steps? By separating the steps, the steps of the "Project" part are forced to process all the documents in the pipeline so that the calculated fields can be obtained, this means that the group level Everything goes through before going on.

The difference in processing time can be seen clearly by running questions in both forms. With a different project phase, query on my hardware Comparison can take three times more time to execute, where all the fields are calculated during the "group" operation.

It seems that there is only one way to properly create the pipeline object yourself:

ApplicationContext ctx = New Entatation Config Applications Contex (SpringMongo Config. Class); MongoOperations Mongolia Operation = (MongoOperations) ctx.getBean ("MongoTemplate"); BasicDBList Pipeline = New BasicDBList (); String [] multiplier = {"$ value", "$ quantity"}; Pipeline.ed (new "Basic" ("$ month", "$ date"), new basebobjects ("$ group", new BasicBobbasex ("_ id", new basic bidbox ("month", new basicblog ("$ month", "$ date"). ("$ Day", "$ date") .append ("year", new BasicDBObject ("$ year", "$ date")) .append ("Total value", New BasicDBObject ("$ sum", New BasicDBObject ("$ Multiply", multiplier)) .append ("Avg Option", New BasicDBObject ("$ avg", "$ quantity")). Append ("count", New BasicDBObject ("$ sum", 1) )); BasicDBObject aggregation = new BasicDBObject ("total", "archive") .append ("pipeline", pipeline); println (aggregation ;); CommandResult Command Result = Mongo Operation. Execute Commands;

Or if you seem to summarize all, you can always work with JSON source and pars But, of course, it should be a valid JSON:

  string jason = "[" + "{\" $ group \ ": {" + "\" _ id \ "": {"" \ "Day \": {\ "$ month \": \ "$ date \"}, "+" \ "day \": {\ "$ dayOfMonth \": \ "$ date \ "Year \": {\ "$ year \": \ "$ date \"} "+"}, "+" \ "total value \": {\ "$ sum \" : {\ "$ Multiply \" "[\" $ Price \ ", \" $ quantity \ "]}," + "\" av "\": \ "Count \": {\ "$ sum \": 1} "+"}} "+"] "erageQuantity \": {\ "$ avg \": \ "$ quantity \"}, "+" \ "count \": ; Basic DB List Pipeline = (Basic Debianist) MangodeBtil.JSON.Parse (JSN);  

php - Typeahead Bloodhound, showing results as undefined. Wrong JSON type? -


I'm using Typad to create an autocomplete search box and dropdown result is shown in undefined form Are there. Obviously PHP creates JSN, I have tested it. The problem may be a wrong JSON type. Here is PHP:

  $ a_json = array (); $ A_json_row = array (); While ($ row = mysql_fetch_assoc ($ sql)) {// $ searchTerm = preg_replace ('/ \ s /', '+', spaces change for $ line ['products_keyword']); $ A_json_row ["search"] = $ searchTerm; $ A_json_row ["labels"] = $ line ['products_keyword']; Array_push ($ a_json, $ a_json_row); Echo json_encode ($ a_json); // back to the JSON array  

and here's the script:

  $ (document) .ready (function () {var keywordsVar = new Bloodhound ({DatumTokenizer : Bloodhound.tokenizers.obj.whitespace ('label'), queryTrOnizer: bluehound.tokenizers.whitespace, remote: 'keywords.php? Query =% QUERY'}); keywordsVar.initialize (); $ ('# idkeywords') Type ({signal: wrong, highlights: true, at least: 2}, {name: 'keyword', displayed: 'label', source: keywordword.atadapp ()})}}; Here is an example of JSON:  
  [{"search": "artichoke", "label": "artichoke"}, {"search "Artichoke + 2", "Label": "Artichoke 2"}, {"Search": "Artichoke + 3", "Label": "Artichoke 3"}]  

Can anyone solve this problem ??

You have a typo in the type-order declaration, it is displayKey Should be with the ones.

here one


python - Sentry keeps returning nonexistent incident id's -


We have a project in Django. I use sentry to gather information on HTTP 500 errors.

There is an option to add event information to request header in the box, so you can handle it in your app.

There is a mixture of Tastypie which looks like this:

  class Sentry500Mixin (object): def _handle_500 (self, request, exception): if not isinstance (exception , TastypieError) and the settings are not. DEBUG: sentry_exception_handler (Request = request) data = {'error_message': 'Sorry, this request could not be processed.', 'Event': getattr (request, 'Sentry', none)} back self .error_response Request, Data, response_class =  

When 500 error occurs, we receive responses like this:

    < Code> {"Error_message": "Sorry, this request could not be processed.", "Event": {"id": "3459b30f87ea4116a0a2855be576bbb3", "project_id": "5"}}  

The thing is that if you take ID of this incident and you If you go to the entry, then it is a good chance that there will be no incident with this ID, and there is no such incident which looks like this, I am sure that I am checking the right project and if this incident has not been created Logically, the orthodontist can not back you an ID, but it did.

Any help and ideas are greatly appreciated. Thanks.

As @Eric-e in a comment Explained, event_id is generated on the client.

There is no guarantee of the UDP protocol.

Are you using the UDP protocol? If you are, then the map does not map for a real event in the event_id sect. Router / Switch / Network Tool Your package may have lost any guarantees with the UDP that wrt delivery, order, or duplicate packets.

I am assuming the code for code as HTTP / HTTPS TCP .

Solution:

  • Check the double firewall rules,
  • Try other protocols and make sure that it is not a problem with the sentry server.

Why use UDP?

  • Some handshake = it's fast,
  • No connection = break the connection There is no problem with (such as reboot for Sentry Server).


angularjs - ngOptions group complex object -


I am trying to display a selection with the ngOptions generated from this JSON:

 {Exception}: {{card_issuer: {name: 'HSBC'}, payercests: [{installments: 1}, {installments: 2}, {installments: 3}]} ... other issuer]}  

So, I have an array of cardisers with sub-arrays of a parchacostost.

So far, I came up with this selection:

  & lt; Exceptions to the exception are "installation group by cord_issuer.name" & gt; & lt; / select & gt;  

As you can see, I am grouped by exception.card_issuer.name, and this is OK. The problem is the content of the group, which should be the exception. Payer_costs.installments (each card issuer A list of installments for. As I did not get the solution, in this example, I used the exception.payer_costs [0] Installations,

>


android - How to enable only portrait and reverse portrait in phones, "sensorPortrait" not working on phones? -


I do not know how to set the "sensor portrait" attribute in the manifest for an activity to allow activity to go This does not work in reverse ports like I set in the manifest

  & amp; Activity Activity: Name = "Main Active" Android: Label = "Test" Android: Screen Orientation = "Sensor Portrait" Android: windowSoftInputMode = "stateHidden" android: configChanges = "Orientation" & gt; & Lt; / Activity & gt;  

The above code is not working for both reverse portraits and portraits on Moto E (4.4.4) or Galaxy S3 (4.3), but I can confirm that it Works on Nexus 7 (5.0.1) Tablet, I tried many other answers but it seems one of the easiest and it is not working on 'phone' for me, am I getting some information that Is relevant to work?

I tried the following link which is similar to my question but nothing seems useful about it

Currently the flag "Sensor Portrait" With this "picture", in the phone.

If you look at, you can see that this internal value is config_allowAllRotations and to determine whether 180 degree rotation (i.e., reverse port on the phone) is allowed. With this, it means that the reverse portrait on the phone is disabled. Note that (i.e., tablet) is true, so why can you use all the rotation on the tablet devices with the reverse port.


osx - AXIsProcessTrustedWithOptions returns NO even though the app is on the whitelist -


We have a Mac App Store app that needs access to Access-API. Since 10.9 Mavericks, there is a system whitelist for such an app that wants to use the Accessibility API (System Preferences → Security and Privacy → Accessibility).

While testing updates for our app, we have seen that immediately after upgrading from the old version, the system tells us that we have accessibility API ( AXIsProcessTrustedWithOptions returns NO ), even if our app is in the whitelist, with checkboxes checked Once we uncheck the permissions and check again, So everything works fine

Obviously, this is not an acceptable renewal situation for us, especially when the access whitelist is buried deep in the system preference and can not be used code.

Is this a system bug? Is there a known solution? We will accept the accessibility permissions again after a big update - it is unnecessary for your users to navigate system preferences only, to view the checkbox in advance without the feature.

Update:


During the first post upgrade launch, the system complains in the console:

  16/03/15 06: 47: 10,343 tccd [190]: Unable to verify code: Sign code of Com.company.app: Code fails to satisfy specified code requirements (s) 16/03/15 06: 47: 10,350 universalAccessAuthWarn [401] ]: Accessibility API: pid 471, Accessible API access is not allowed. The path: / path / to / app  

The strange thing is that, when accessed whitelist checkboxes are unchecked and re-tested, the console during subsequent launch There is no error in binary alike.


I have implemented the access whitelist ( / Library / Application Support / com.apple.TCC / TCC.db) in the SQLite database below white. ). There is a csreq column in the Access table that looks like a fingerprint / hash blob:

  $ sudo sqlite3 / library / application / support /com.apple.TCC/TCC.db 'Select the client, use the quote (csreq)' com.apple.dt.Xcode | X '...' com.apple.AccessibilityInspector | X '...' com.ourcompany.app | X <...  

(The hashs cited were replaced with "...")

Now, if I had an older version of my app Install and run it, then it is calculated by a hash system and stored in the csreq column if I have a clean install of the new app version, then I get a different hash .

When I install the old version and delete it, the column still hashes for the old version, can it be the source of this problem? Because when I set the column to NULL before updating the app, everything works fine, a new hash is counted, Accessibility API check returns such as YES That should be it.


On GitHub

Named Requirement (see) is one thing. Broadly, it is a set of criteria that the system uses to determine whether two app bundles represent the same app, security-wise designated requirement codesign -dvv --req - YourApp.app can be displayed using the command. In our case, the expected expected check failed, as compared to older App version development builds were signed using a different certificate.

In other words, when trying to create a Mac App Store with a development build, a security check will fail because the certificate does not match and you will have to re-examine some app permissions. As far as I know, it will not happen when you distribute and install the same build through the Mac App Store.


reporting services - SSRS. How to change dynamic fields datatype to DateTime for specific values? -


मेरे पास निम्न डिज़ाइन के साथ रिपोर्ट है:

और यह निम्नलिखित में डेटा देता है:

जैसा कि आप ऊपर दिए गए छवि में देखते हैं, हर कॉलम की तारीख + समय (प्रारूप दिन-समय पर ) पर हैं, मुझे बदलना होगा समय टाइप करें और इसे hh: mm: ss

में स्वरूपित करें मैं यह कैसे कर सकता हूँ?

I > कोड > टेक्स्ट बॉक्स गुण > संख्या :

राइट क्लिक पर Tikrinimas1 < / कोड>> समय प्रारूप को चुना जाता है और ओके पर क्लिक किया जाता है, लेकिन कुछ भी नहीं होता है, वही दिनांक + समय लौटाता है।

क्या मैं अभिव्यक्ति का उपयोग करूँगा? अगर मैं निम्नलिखित का उपयोग करता हूं:

  = आईआईएफ (फ़ील्ड! टिक्विनिमस 1.वैल्यू = "एम / डीडी / yyyy h: mm: ss", सीडीएटी (फील्ड्स! टिक्िनिनमास 1.वैल्यू), "एचएच: एमएम : एसएस ")  

मुझे पहली पंक्ति में निम्नलिखित हैं: hh: mm: ss के बजाय 15:40:11 और में अन्य पंक्तियां #error

इसके अलावा मैंने यह भी करने की कोशिश की है:

  = IIF (फ़ील्ड! Tikrinimas1.Value = "M / dd / yyyy एच: मिमी: ss ", FormatDateTime (फ़ील्ड! Tikrinimas1.Value), DateFormat.ShortTime)  

लेकिन मुझे वही समस्या मिली - पहले पंक्ति <कोड> शॉर्टटाइम में 15:40:11 और अन्य पंक्तियों में #error

जहां तक ​​मेरी समझ है, आप अम् / पीएम से छुटकारा चाहते हैं। इसके लिए आप स्वरूप फ़ंक्शन का उपयोग कर सकते हैं उदाहरण के लिए नीचे अभिव्यक्ति देखें

  = प्रारूप (फ़ील्ड! Tikrinimas1.Value, "MM / dd / yy h: mm: ss")  < / Pre> 

आशा है कि यह मदद कर सकता है


Reading docx file by using Apache POI if the docx file contains image, paragraph, table -


How to read the doc file in the same order, if the document contains the image, paragraph and then the table. It is possible to read and add .docx files with the

Apache POI
framework. You will need XWPF libraries and ooxml-schemas to do this. Here is an example of how to read a Microsoft Word file:

  Public Zero readonDocs file () throws IOException {InputStream inputStream = this.getClass (). GetClassLoader (). GetResourceAsStream ("template.docx"); XWPF document doc = new XWPF document (inputstream); // Article List & lt; XWPFParagraph & gt; Paragraph = doc.getParagraphs (); XWPF paragraph paragraph = paragraphs (1); // run list & lt; XWPFRun & gt; Run = paragraph.Gatoran (); XWPFRun run = runs.get (1); Run.setText ("some text"); Run.setFontSize (12); Run.setBold (true); //e.t.c. // Table List & lt; XWPFTable & gt; Table = doc.getTables (); XWPFTable table = tables.get (1); // line list & lt; XWPFTableRow & gt; Rows = table .getRows (); XWPFTableRow line = rows.get (1); // cell catalog & lt; XWPFTableCell & gt; Cells = row.getTableCells (); XWPTable cell cell = cellsGate (1); Cell.setText ("some text"); Cell.setParagraph (paragraph); //e.t.c. }  

You can create your own paragraph, run, table etc. Here is a good tutorial for the first step with XWPF:

For the picture, try reading byte with .getData () array, or with the inputstream Can work like getPackagePart (). GetInputStream ()

Then, byte array for one of your images - it seems that:


vba - Which is faster: Array or working on cells in Excel -


I am working on large amounts of data (1.5 mln rows) and I'am wondering if in between Work on noticeable time period rows, and work on the array. What I am doing is going through every line and it compares the string value, sometimes it modifies, imitates etc. I'am is not doing any calculations.

And seccond question: Suppose there are no dates. Cells Value will be much faster than cells 2. Value? Or will it not be remarkable for the user?

Based on a project I have done something closely with the data you are talking about I do not think the difference will be dramatic, but it can try to do a simple test using your data and your computations and can see which approach works best in your specific project.

I suspect that you are doing more computations on the data, then it will be more beneficial; If there is a lot of data with this important search, but some changes, it can be more efficient by leaving it in the worksheet.

In my project (your mileage could be different), I found that the large array back into the cell range can actually become an obstacle, although it was on the older version of Excel, where I think That I was starting to reach a limit of memory and was addressing the capacity. If almost everything had changed in processing data, then you are writing it back in cells from either one or another, it is better to do this as a range but if the changes are few, then you can read from the spreadsheet And instead of writing it back, you can get better value for the array than the spreadsheet, get value and / into the array, and then writing the array back on the spreadsheet .

But at the end of the day, my experience may be different from yours, and the best answer is to do a test, even a simple test, on your data, and see what works better Used to be. Along the way, you may find other solutions to choose a solution or other, and which can be more important than the performance benefits you receive.


c++ - How to properly change tabs on CPropertySheet -


I have a CPropertySheet with three tabs. I have a separate CPropertyPage class for each tab when my CPO Promotions debugger If filled, the first page is always shown correctly. However, when I click on any of the other tabs, the CPropertyPage area is empty even if I first click on the tab, the area is still empty. I use Visual Studio, MFC, C ++ I am using.

I am trying to find the appropriate methods to handle different tab clicks and my tabs are shown correctly This is the code to start my property sheet and its page is:

  BOOL CSLIMOptCplusplusApp :: InitInstance () {CWinApp :: InitInstance (); SQLHENV m_1; EnvGetHandle (m_1); Login UN; // Creates a login dialog for the user to enter credentials. Lgn.DoModal (); CImageSheet * imagedlg = new CImageSheet ("Admin Options"); CImage display * page image display = new cius display; CImageDimensions * pageImageDimensions = New CImageDimensions; Listoption * pagelist option = new listoption; Esrest (IFested); Eserat (page imaged display); Ezert (page image dimensions); Esret (pagedist opsion); Imagedlg- & gt; AddPage (pagelist option); Imagedlg- & gt; AddPage (page image); Imagedlg- & gt; AddPage (Page Image Dimensions); Imagedlg- & gt; M_psh.dwFlags | = PSH_NOAPPLYNOW; // Apply default button imagedlg- & gt; Create (); Imagedlg- & gt; ShowWindow (SW_SHOW); M_pMainWnd = Iamated;  

This is the code for my CPropertySheet class:

  BOOL CImageSheet :: OnInitDialog () {CWnd * pOKButton = GetDlgItem (IDOK); Esaret (pokbutan); Pokbubtons-> Shawwondo (SW_HIDE); CWND * PCNCLatton = Gate Delgietim (idcency); ESerate (PCCLButton); PCANCELButton-> ShowWindow (SW_HIDE); // Flags set for property sheet m_bModeless = TRUE; M_nFlags | = WF_CONTINUEMODAL; BOOL bResult = CPropertySheet :: OnInitDialog (); M_bModeless = FALSE; M_nFlags & amp; = ~ WF_CONTINUEMODAL; // Get the button size and position; GetDlgItem (IDOK) - & gt; GetWindowRect (rect); GetTabControl () - & gt; GetWindowRect (fresh); ScreenTouquant (Rect); ScreenTalicant (fresh); Update Data (FALSE);  

Thanks for any help!

Edit:

This is the code for a simple page that I want to show.

// ImageDisplay.cpp: Implementation File // #include "stdafx.h" #include "SLIMOptCplusplus.h" #include "ImageDisplay.h" #include "afxdialogex.h" #include "ListOption.h" // CImage Discplayplay dialog char g_emailProfile [255]; IMPLEMENT_DYNAMIC (CImageDisplay, CPropertyPage) CImageDisplay :: CImageDisplay (): CPropertyPage (CImageDisplay :: IDD), m_EmailProfile (_T (g_emailProfile)) {} CImageDisplay :: ~ CImageDisplay () {} zero CImageDisplay :: DoDataExchange (CDataExchange * pDX) { CPropertyPage :: DoDataExchange (PDX); DDX_Text (PDX, TXTC_EMAIL_PROFILE, m_EmailProfile); } BEGIN_MESSAGE_MAP (CImageDisplay, CPropertyPage) END_MESSAGE_MAP () // CImage display message handlers

My The problem was that I was doing m_bModeless false setting,

  BOOL bResult = CPropertySheet :: OnInitDialog (); M_bModeless = FALSE; // Replace TRUE to fix the problem M_nFlags & amp; = ~ WF_CONTINUEMODAL;  

Eclipse Find/Replace not working -


I have found a solution to my problem but there is no use Eclipse Find / Replace function together by the hotkey ctrl + F not working. Note: The function does not work by hotkey and do not go from the eclipse menu and click Edit> Edit (I do not mean that FindReplace window is not visible at all, only Eclipse loses window focus). I have tried to see Hotkey to see that it will work, restarted, the PC was restarted, but nothing seems to solve the problem. It was just working fine, but then suddenly blue Decided to come out of color decided that he will not work anymore. Whatever I tried it has failed so far, as I use this function, it would be good to know that there is no other input to try to solve this bug. I'm on a PC with Windows 7, Intel i7 64 bits

I had a similar problem after using another monitor on the job I was thinking at home Where is my search / replace window ... it was displayed on the second monitor because I used it the last time ... Eclipse stores the last location of the dialog for better UX.

Then try to move the Find / Replace window using your keyboard.


You can also try resetting perspective

  windows & gt; Reset perspective ...  

jdbc - Java database connection issue -


मेरे पास मेरे कोड के साथ निम्नलिखित समस्या है:

  import java.sql। *; सार्वजनिक कक्षा ऐप {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {स्ट्रिंग यूआरएल = "jdbc: mysql: // localhost: 3306"; कोशिश {class.forName ("com.mysql.jdbc.Driver"); } पकड़ (क्लासनोटफाउंड एक्सेप्शन ई) {System.out.println ("एवरेयर कैकेरेयर ड्रायवर! \ N" + ई); वापसी; } {कनेक्शन Con = DriverManager.getConnection (url) का प्रयास करें; // गोलीम टेबेलुल पर्सियन स्ट्रिंग एसकेएल = "फारसी से हटाएं"; स्टेटमेंट stmt = con.createStatement (); stmt.executeUpdate (एसक्यूएल); Stmt.execute ("यदि डेटाबेस में परीक्षण नहीं किया गया है तो पता लगाएं"); Stmt.execute ("USE परीक्षण");  

मुझे अपवाद मिलता है ... किसी भी विचार से मैं यह काम कैसे कर सकता हूं?

<कोड > Java.lang.ClassNotFoundException आपकी परियोजना / युद्ध / कान में "वर्ग नहीं मिला" के कारण हुआ अपवाद बहुत आत्म व्याख्यात्मक है, इसे कैसे हल करें आपके मामले में:

जोड़ें com.mysql.jdbc.Driver चालक वर्ग / जार आपके निर्माण / परिनियोजन / lib पथ में आप इसे डाउनलोड कर सकते हैं

पढ़ें यहां


Trying to Echo a value from a select drop down in PHP -


I am in school for web development, so I do not know very clearly I have a price I'm trying to catch up, and I'm outputting it in the paragraph. I know it's about Brown, but everything else works, but I can not get anything on stack overflow, or how Google can get that work I get the following error:

Notice: Undefined variable: D in draft: \ wamp \ www \ lab5 \ process.php at line 42

This error is in my paragraph, which I think is I'm gaining value , But is it not output correctly? I am using a variable to show how I want to output that value in the paragraph.

This is my html:

  & lt; Li & gt; & Lt; Select id = "UDraft" & lt; Select & gt; & Lt; Option value = "draft offs" & gt; Draft Offense & lt; / Value & gt; & Lt; Option value = "draft defense" & gt; Draft Defense & lt; / Value & gt; & Lt; Option value = "Do business with them, we can not do any good" & gt; Do business with them, we can not do any good anymore & lt; / Value & gt; & Lt; / Select & gt; & Lt; / Li & gt;  

This is my process.php code:

  if (isset ($ _gET ["uDraft"])) {$ draft = $ _GET [" UDraft "]; } Echo "I want to produce ** $ draft var ** for the price they choose, so it shows a preference in a paragraph that is already written";  

All my text boxes work, I can not get the value from choosing, so that I can say in the paragraph text. I also had a choice to win, but when I could not understand how to capture the value I know that I can use the radio button, but I am trying to learn how to drop the value from the drop down Hold on Any help will be very much appreciated.

You should name your dropdown:

HTML :

  & lt; Li & gt; & Lt; Select name = "uDraft" & gt; & Lt; Option value = "draft offs" & gt; Draft Offense & lt; / Option & gt; & Lt; Option value = "draft defense" & gt; Draft Defense & lt; / Option & gt; & Lt; Option value = "Do business them, we can not afford any good" & gt; Do business with them, we can not do any good anymore & lt; / Option & gt; & Lt; / Select & gt; & Lt; / Li & gt;  

PHP:

  if (isset ($ _gET ["uDraft"])) {$ draft = $ _GET ["uDraft"]; Echo $ draft; }  

java - Hibernate sequence generator always 0 -


I am trying to configure a mapped class to a postgres db in a sequence I used to define . When I try to remain any entities, the IDs are always zero when I use the nextval ('item_seq') selection, I will get 1 (or next val). I used intellij to rebuild classes, version 3.6.0 of Hibernate in this project, if it could be part of my problem?

@Entity @Table (name = "item") public class item {Private int itemid; @Basic @Id @SequenceGenerator (name = "item_seq", sequenceName = "item_seq", allocationSize = 1) @GeneratedValue (strategy = GenerationType.SEQUENCE, generator = "item_seq") @column (name = "itemid", Unique = true, tap = false, insertable = true, updatable = true) public integer getItemid () {itemid returns; } ...}

experiment

  item items = new items (); Item.setCreated (new date ()); Item.setVendorId (vendorId); (Item) save; // is essentially foundBibernate Template () Save (Item.class.getName (), item);  

- Edit -

I am trying to give suggestions below and everything to generate 0 as an ID or exception to this class ID throwing should be handed manually before saving () 'This is where I am now, as a last ditch attempt, I tried to declare the variable instead of changing the lectures. Did not help

@ entity @Table (name = "item") public class items {@Id // @ SequenceGenerator (name = "item_seq", serial name = "item_sec", allocation size = 1) @ Generated Value (string = generation type.INTTI) //, generator = "item_sec") column @ (name = "item id", absolute = true, empty = false), insertable = true, updateable = true) Private long non-semiprecious; ... public long mitaimaid () {returns item id; It always works for me (though hibernate 4.x):

 < Code> @ ID @ Generated Values ​​(strategy = generation type. INNTITY) Private Long ID; The  

@ id column creates a primary key (unique, not a null), so you do not need @column (...) Is annotation your itemId setting somewhere? If you have one (Hibernate is not required) you can remove its setter


html - How to wrap any mobile number's into Anchor tag using javascript -


I have an html page where all the data is coming dynamically with some mobile numbers.

Example: & lt; A href = "tel: +91 9999999999" & gt; +91 99 99 99 99 99 & lt; / A & gt;

HTML:

  & lt; P & gt; Phone: +022 23334976 & lt; / P & gt; & Lt; P & gt; Phone: +91 8976817722 & lt; / P & gt; . . . . & Lt; P & gt; & Lt; P & gt; Telephone: & lt; / P & gt; +91 8976817725 & lt; / P & gt;  

Please help me write general JS to handle the above HTML pages.

Try this:

  var body = document.getElementsByTagName (' Body ') [0]; Body.innerHTML = body.innerHTML.replace (/ (?: & Lt; b & gt;) Tele: (?: & Lt; \ / b & gt;) ?? (\ + [0-9] * [ 0-9] *) / Ig, '& lt; a href = "$ 1" & gt; $ 1 & lt; / a & gt;');  

apache - .htaccess: Redirect / to index.php and block everything else -


I am trying to preserve my PHP files against direct access. What I want to give permission is direct access to a directory (CSS, images, etc.) called index.php and public . Access to root directory / should be redirected to index.php :

  / (root): permissions - & gt; Redirect to index.php - index.php: Permission + - Public | + --... Allow + - [Rest of all]: Block  

My current .htaccess file looks like this:

  Allow the order, refuse & lt; Files index.php & gt; All & lt; / Files & gt; Allow from & lt; Files Htaccess & gt; Allow orders, from all & lt; / Files & gt; DirectoryIndex index.php & lt; IfModule mod_rewrite.c & gt; RivetIngnin on River Rule ^ / $ / Indix.fpp [L] & lt; / IfModule & gt;  

It works basically but will not redirect from / to index.php , instead Apache was giving me a 403 error is. What am i doing

order ... , which you can find.

Allow, Decline

First of all, allow all instructions; Must have at least one match, or the request has been rejected. Next, all prohibition instructions are evaluated. If any matches, the request is rejected. Last, any request that does not match the permission or prohibit instruction, is rejected by default. The request for

/ does not match any rule, so the instructions for it have not been rejected or rejected, so it's default As you have rejected it, you clear it by allowing it to explicitly allow the request of / , and to allow requests, create a new .htaccess file in the public subdirectory. / Htaccess in


:

  Allow the order, reject it; Files ~ "^ (index \ .php |) $" & gt; All & lt; / Files & gt; Allow from & lt; Files Htaccess & gt; Allow orders, from all & lt; / Files & gt; DirectoryIndex index.php  

and /public/.htaccess :

  Allow commands, deny Allow all from  

Screencast of this work:


php - Symfony2 sudenly login route not found -



php - Symfony2 sudenly login route not found -

this morning wrote new functions on controller , worked after 10 minutes trying access 1 of methods symfony says me: "no route found "get /login", , if seek have access app.php says me same exception.

in project utilize routing through @route , through routing.yml file

below i'll show configurations

routing's file

app/config/routing.yml

frab: resource: "@frabapibundle/resources/config/routing.yml"

frab_routting: resource: "@frabapibundle/controller" type: annotation prefix: /

fos_user_security: resource: "@fosuserbundle/resources/config/routing/security.xml" prefix: admin fos_user_profile: resource: "@fosuserbundle/resources/config/routing/profile.xml" prefix: /profile

fos_user_register: resource: "@fosuserbundle/resources/config/routing/registration.xml" prefix: /register

fos_user_resetting: resource: "@fosuserbundle/resources/config/routing/resetting.xml" prefix: /resetting

fos_user_change_password: resource: "@fosuserbundle/resources/config/routing/change_password.xml" prefix: /profile

security's file

app/config/security.yml

security: encoders: fos\userbundle\model\userinterface: sha512

role_hierarchy: role_admin: role_user role_super_admin: [role_user, role_admin, role_allowed_to_switch] providers: fos_userbundle: id: fos_user.user_provider.username id: fos_user.user_provider.username_email firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false dashboard: pattern: ^/ security: true form_login: provider: fos_userbundle check_path: /admin/login_check login_path: /login default_target_path: /ds csrf_provider: form.csrf_provider logout: path: /ds/logout target: /ds anonymous: ~ access_control: - { path: ^/, roles: is_authenticated_anonymously, requires_channel: http } - { path: ^/ds, roles: role_super_admin, requires_channel: http } - { path: ^/ds/users, roles: role_super_admin, requires_channel: http } - { path: ^/ds/groups, roles: role_super_admin, requires_channel: http } - { path: ^/ds/photos, roles: role_super_admin, requires_channel: http } - { path: ^/ds/mail, roles: role_super_admin, requires_channel: http } - { path: ^/ds/sendmail, roles: role_super_admin, requires_channel: http } - { path: ^/login, roles: is_authenticated_anonymously, requires_channel: http } - { path: ^/login_check, roles: is_authenticated_anonymously, requires_channel: http }

what can do?

you've added admin prefix @fosuserbundle/resources/config/routing/security.xml resource login path (fos_user_security_login) @ /admin/login.

php symfony2 exception login

excel - VBA With obj - how to reference the obj inside the With without naming it? -



excel - VBA With obj - how to reference the obj inside the With without naming it? -

if within block referencing object want reference function phone call illustration , must reference object name or there "this" ,"me" ref can use?

i have done search online not finding much in vba.

dim shexport worksheet shexport ....... ....... 'works expected getdata(shexport) 'but how can achieved without naming getdata(this) getdata(me) getdata() ........ end function getdata(sh worksheet) integer ..... ..... end function

you specify property of object supports .parent property reference object. example:

with shexport getdata(.cells.parent) end

excel vba excel-vba

android - Animating screen over long image -



android - Animating screen over long image -

i have long image need screen hover on origin till end.

any suggestions how implement this?

thanks, ilan

if sure memory plenty load required bitmap can load bitmap in background thread before displaying required part of bitmap on visible imageviewer object here sample code off-screen bitmap processing

class bitmapworkertask extends asynctask<integer, void, bitmap> { private final weakreference<imageview> imageviewreference; private int info = 0; public bitmapworkertask(imageview imageview) { // utilize weakreference ensure imageview can garbage collected imageviewreference = new weakreference<imageview>(imageview); } // decode image in background. @override protected bitmap doinbackground(integer... params) { info = params[0]; homecoming decodesampledbitmapfromresource(getresources(), data, 100, 100)); } // 1 time complete, see if imageview still around , set bitmap. @override protected void onpostexecute(bitmap bitmap) { if (imageviewreference != null && bitmap != null) { final imageview imageview = imageviewreference.get(); if (imageview != null) { imageview.setimagebitmap(bitmap); } } } }

android android-animation android-imageview

python - Block execution until condition -



python - Block execution until condition -

i using eventlet , have 2 main process running. 1 of process acts producer , other consumer. problem instead of using queue eventlet bundle want utilize db. using queue can simple pass (block=true) argument , eventlet take care of bloking execution of consumer routine untill producer puts in queue. if replace queue db how efficiently implement blocking logic.

look info in db every n seconds. if nil found - sleep.

update: or utilize postgresql listen/notify mechanism shown in http://initd.org/psycopg/articles/2010/12/01/postgresql-notifications-psycopg2-eventlet/

python multithreading python-2.7 python-3.x eventlet

Splitting a string with JavaScript but ignoring the HTML characters in it -



Splitting a string with JavaScript but ignoring the HTML characters in it -

i'm been scratching head on 1 while , hoping there's solution out there somewhere..

i have html strings similar this:

'<a href="link.com">lorem ipsum</a> dolor sit down amet, consectetur adipiscing elit. ut lobortis luctus leo, non porta nisi euismod ut. <a href="anotherlink.com">nulla tristique</a> scelerisque fringilla.'

i need utilize javascript truncate/split text after number of characters, not counting html in links, still rendering links in resulting text. example, if i'm truncating @ 20 characters i'd want next displayed, 'lorem ipsum' text still linked:

lorem ipsum dolor si

if utilize str.substring(0,20) html characters in string displayed get:

<a href="link.com">l

which renders hyper-linked l:

l

does have suggestions me? tried doing search couldn't find appropriate answer.

if helps have both raw non-html text , total html text (with links) available can utilize in js. don't want utilize raw text though won't render of links. example, if split text @ 200 characters i'd want of links still rendered in html, 200 characters of actual on-screen text displayed user.

hopefully makes sense. many in advance help!

john

edit: clarify i'm trying accomplish;

i have post (text string) has links in it. want count characters of text excluding html characters in links. want truncate text still include html links, show x number of characters user.

for example;

'<a href="link.com">lorem ipsum</a> dolor sit down amet, consectetur adipiscing elit. ut lobortis luctus leo, non porta nisi euismod ut. <a href="anotherlink.com">nulla tristique</a> scelerisque fringilla.'

when truncated 40 characters displayed as:

'<a href="link.com">lorem ipsum</a> dolor sit down amet, consectetur adi'

so includes links shows 40 characters of text user. if utilize str.substring(0,40) includes links in character count , ends showing:

'<a href="link.com">lorem ipsum</a> dolo'

hopefully makes sense. apologies confusion.

you can utilize this:

var s = '<a href="link.com">lorem ipsum</a> dolor sit down amet, consectetur adipiscing elit. ut lobortis luctus leo, non porta nisi euismod ut. <a href="anotherlink.com">nulla tristique</a> scelerisque fringilla.' var div = document.createelement("div"); div.innerhtml = s; var text = div.textcontent || div.innertext; var substr = text.substring(0, 20); //=> "lorem ipsum dolor si"

javascript html regex string substring

asp.net - Textbox textChanged event withount enabling postback -



asp.net - Textbox textChanged event withount enabling postback -

i have webpage many textboxes. want phone call function (calcbalance) on textbox_textchanged event. works textbox's postback set true, makes app not user friendly because when user scrolls downwards utilize other textboxes, "postback" keeps taking user top of page. i.e. user have scroll downwards after changing text in textbox.

is there way can phone call function without enabling postback?

thanks tim schmelter. easiest way set line: maintainscrollpositiononpostback = "true" in function (calcbalance).

asp.net vb.net-2010

java - Spring security and UserDetailsService -



java - Spring security and UserDetailsService -

i new spring security , trying implement custom userdetailsservice authentication. bothers me, interface contains 1 method loaduserbyusername(string username) takes username parameter , returns userdetails.

i wondering why method not take password parameter.

how spring managed authenticate user based on username?

i new spring security , clarification on api , authentication process in spring security welcome.

it not job of userdetailsservice authenticate user. responsibility of authenticationprovider.

for illustration daoauthenticationprovider uses userdetailsservice load user username , verifies usernamepasswordauthenticationtoken against user see if passwords match.

have @ source code of daoauthenticationprovider thought of how done behind scenes.

java spring spring-security

bash - Case insensitive comparision in If condition -



bash - Case insensitive comparision in If condition -

i have csv file , need count number of rows satisfies status row entry betwen year range , artist_name matches name argument. string matching should case insensitive. how accomplish in if loop..

i beginner, please bear me

#!/bin/bash file="$1" artist="$2" from_year="$(($3-1))" to_year="$(($4+1))" count=0 while ifs="," read arr1 arr2 arr3 arr4 arr5 arr6 arr7 arr8 arr9 arr10 arr11 ; if [[ $arr11 -gt $from_year ]] && [[ $arr11 -lt $to_year ]] && [[ $arr7 =~ $artist ]]; count=$((count+1)) fi done < "$file" echo $count

the $arr7 =~ $artist part need create modification

the bash case-transformations (${var,,} , ${var^^}) introduced (some time ago) in bash version 4. however, if using mac os x, have bash v3.2 doesn't implement case-transformation natively.

in case, can lower-cased comparing less efficiently , lot more typing using tr:

if [[ $(tr "[:upper:]" "[:lower:]" <<<"$arr7") = $(tr "[:upper:]" "[:lower:]" <<<"$artist") ]]; # ... fi

by way, =~ regular look comparison, not string comparison. wanted =. also, instead of [[ $x -lt $y ]] can utilize arithmetic compound command: (( x < y )). (in arithmetic expansions, not necessary utilize $ indicate variables.)

bash shell

Implementing Ajax - Rails App -



Implementing Ajax - Rails App -

i'm trying implement ajax when favorite place, reload/update of section/ajax functionality doesn't work. if reload page, see action has occurred. appreciate tips.

my favorite_places/show.html.erb

<div class="heart"> <p class="text-center"> <% if current_user %> <%- unless current_user.favorite_places.exists?(id: @place.id) -%> <%= link_to favorite_places_path(place_id: @place), remote: true, method: :post %> <span title="favorite place"><i class="glyphicon glyphicon-heart-empty"></i></span> <% end %> <%- else -%> <%= link_to favorite_place_path(@place), remote: true, method: :delete %> <span title="un-favorite place"><i class="glyphicon glyphicon-heart"></i></span> <% end %> <% end %> <% end %> </p> </div>

my favorite_places_controller.rb

def update @favorite_place.update_attributes[params[:place]] respond_to |format| format.html { redirect_to @place } format.js end end

my update.js.erb

<% if @place.favorited %> $(' #<%= @place.id %>').html("true"); console.log ("<%= @place.name %> has been favorited."); <% else %> $(' #<%= @place.id %>').html("false"); console.log ("<%= @place.name %> not favorite."); <% end %>

my dev console output

delete http://0.0.0.0:3000/favorite_places/34 406 (not acceptable) jquery.js?body=1:8716send jquery.js?body=1:8716jquery.extend.ajax jquery.js?body=1:8146$.rails.rails.ajax jquery_ujs.js?body=1:73$.rails.rails.handleremote jquery_ujs.js?body=1:149(anonymous function) jquery_ujs.js?body=1:299jquery.event.dispatch jquery.js?body=1:5108elemdata.handle

ruby-on-rails ajax

Draw Text in canvas and make it Drag-able Android -



Draw Text in canvas and make it Drag-able Android -

i have multiple rectangles in canvas view , want display width , height of every rectangle in form of text on right , bottom position respectively. using

canvas.drawtext(text,x,y,paint);

i can draw width , height want create them drag able user can assign width or height of 1 rectangle another.

problem how can observe user click on text rectangle drag able. please help!!!

android canvas drag-and-drop

javascript - setTimeout function doesnt stop execution? -



javascript - setTimeout function doesnt stop execution? -

i have stumbled upon problem settimeout.

$current.removeclass(class2); settimeout(function(){$current.css('display', 'none')},1000); if(!$current.is('#' + id)){ $('#' + id).css('display','block'); settimeout(function(){$('#' + id).addclass(class2)}, 1000); $current = $('#' + id); }

i want if statement executed after add together css "display:none". how can accomplish this? thought settimeout stop execution of code , go on after function has run.

you set code within function within timeout (code spacing of import well...):

$current.removeclass(class2); settimeout(function() { $current.css('display', 'none') if( !$current.is('#' + id) ) { $('#' + id).css('display','block'); settimeout(function() { $('#' + id).addclass(class2) }, 1000); $current = $('#' + id); } },1000);

javascript jquery

windows - Read in values from a text file and output certain values -



windows - Read in values from a text file and output certain values -

i working out custom backup scripts , lastly bit want has me stumped.

searched through posts , didn't quite find solution trying do.

i need read in values form text file result of command creating list of every zip file in activebackup dir along size

forfiles /p f:\activebackup /s /m *zip /c "cmd /c echo @fname @fsize" > c:\scripts\output\filesize.txt

output pretty much:

server_name1-date.zip 23454623 server_name2-date.zip 7862457 server_name3-date.zip 22 server_name4-date.zip 98 etc

i need read in of entries (for loop?) , output lines size 100 or less. able utilize output variable variable (based on date above) server_name3-date.zip 22, server_name4-date.zip 98.

this way can utilize variable in job generates existing email added line like:

echo next zips small: %value_too_small%

thanks guidance , examples in advance!

give test. batch math fails on 2gb sizes might work lower sizes.

forfiles /p f:\activebackup /s /m *zip /c "cmd /c if @fsize leq 100 echo @fname @fsize" > c:\scripts\output\filesize.txt

windows shell batch-file scripting

C# syntax for new object with if statement for id and string -



C# syntax for new object with if statement for id and string -

i have model class this:

public class typeminimal : baseminimal { private string _name = ""; public typeminimal(int? id, string name = "") : base(id, "types", api.enum.types) { _name = name; } [datamember] public string name { { homecoming _name; } set { _name = value; } } }

and trying populate property based on whether type 1 or 2. eg

type = new typeminimal(item.type == 1 ? 1 : 2)

i add together type name type id property not sure of syntax. have tried not correct:

type = new typeminimal(item.type == 1 ? 1, "volunteer" : 2, "staff"),

what's right way this?

type = item.type == 1 ? new typeminimal(1, "volunteer") : new typeminimal(2, "staff");

c# syntax

MariaDB set timezone in config -



MariaDB set timezone in config -

how set server timezone in mariadb configuration?

the thing can find in documentation using command-line flags, don't want do.

'default_time_zone', works on vanilla mysql, isn't recognized mariadb.

it default-time-zone (- instead of _):

[server] default-time-zone=utc

timezone mariadb

php - Select a table and create a table with the data similar to selected table -



php - Select a table and create a table with the data similar to selected table -

i wanted create table info similar table have selected. code below works create table column there no datas inserted

php code

if(isset($_post['select_table'])) { //$select_db = $_post['select_db']; $select_table = $_post['select_table']; $db = mysql_select_db('section_masterfile',$connectdatabase); $query_select = "create table pdf_table (select * $select_table)"; $create_query = mysql_query($query_select,$connectdatabase); }

try query:

create table pdf_table $select_table; insert pdf_table select * $select_table;

source

php mysql sql

c# - error - unable to find requested .net framework data provider -



c# - error - unable to find requested .net framework data provider -

i have found plenty of info on subject on stack overflow on web none of seems help.

using system; using system.collections.generic; using system.linq; using system.web; using system.data.entity; using system.componentmodel.dataannotations; namespace geocode.models { public class address { [key] public int arena_id { get; set; } public string address1 { get; set; } public string city { get; set; } public string zip { get; set; } public decimal country { get; set; } } public class latlng { [key] public int arena_id { get; set; } public string lat { get; set; } public string lng { get; set; } } public class geocodedbcontext : dbcontext { public dbset<address> web_arena { get; set; } public dbset<latlng> web_arena_geo { get; set; } } }

and when utilize model create class read/write actions , views using entity framework error, "unable find requested .net framework info provider. may not installed."

my connection string is:

<add name="geocodedbcontext" connectionstring="server=********;database=*****;uid=*****;pwd=******" providername="system.data.sqlserver"/>

the provider providername="system.data.sqlserver" not exist. should providername="system.data.sqlclient".

see documentation on providername. might nice know system.data.sqlclient default value, don't need provide value providername.

c# asp.net-mvc entity-framework connection-string

git - Restarting a pull request, with some files that haven't changed since original -



git - Restarting a pull request, with some files that haven't changed since original -

over month ago set pull request on github repository, asking comments. got them, , have been taking them account.

that pr still there , i've changed plenty files in pr branch i'm little leery of modifying existing pr-- comments dealing stale code now, etc. ideally i'd close , open new one.

my question how best it. in local repo files part of pr, , untouched since, no longer marked modified. if close pr how force them new pr more recent changes?

you can update branch pull request based off, in pr page you'll see both original commits, comments made on them, , commits made address comments. have whole history of work, , can audit - or that.

you rebase , push -f branch old commits fixed - instead of adding new ones -, , you'll prettier history. lose old commits appearing in pr, it's harder see comments talk about, nicer history log.

in anyway, creating new pull request lose relationship between new changes , comments received, seems shame - nil improve seeing issues addressing while made changes!

git github

sql server - Backup a database in WebSitePanel -



sql server - Backup a database in WebSitePanel -

i can't create backup of database (ms sql 2005), using websitepanel. when select database , seek click on "backup" button "maintenance tools", "backup" button disabled.

this typically means hosting plan not include "backup" feature in database section.

sql-server backup cpanel database-backups remote-backup

c# - Word Interop Application COMException -



c# - Word Interop Application COMException -

i've been looking around , know question has been asked several times, i've tried can find , making no headway, here goes.

i trying debug console application i'm writing. it's running locally on computer, has word installed , working on it.

however, on line word.application app = new word.application(); get

retrieving com class mill component clsid {000209ff-0000-0000-c000-000000000046} failed due next error: 80080005 server execution failed (exception hresult: 0x80080005 (co_e_server_exec_failure)).

i've gone registry , added permissions account, , others, local service illustration on multiple word related keys i've found guid 000209ff-0000-0000-c000-000000000046. found entry called word application, has guid 00020906-0000-0000-c000-000000000046 that's little confusing.

i've tried follow instructions add together permissions in dcom config. however, i've never been able word show in there, despite trying many recommendations on other posts. did alter default permissions allow user business relationship launch, access, , activate locally.

unless right entry microsoft word 97 - 2003 document i've seen claimed. has 06 guid, though. regardless, i've tried kinds of changes one, including setting permissions having permissions.

i'm running windows 8.1 64-bit , have office 2013 32-bit. i've seen posts saying discrepancy problem, haven't been able suggestions me anywhere. ideas?

c# comexception word-interop

javascript - Function parameter not getting updated inside click event -



javascript - Function parameter not getting updated inside click event -

q: function parameter not getting updated within click event

**event.js** // main click event phone call $(document).on('click', '.start', function(){ root.ajax({ url: 'location' }, function( response ){ root.update( response ); }) }); **content.js** var flag = false; root.update = function( response ){ if(!flag){ // event assignment new created button $(document).on('click', '.innerstart', function(){ // first time prints okay after printing old value // response not getting updated console.log( response ); }); flag = true; } }

basically, response variable passed in first time. set click event handler, logs response, , never set click handler again.

that response variable never changed - 1 set in original click handler used, because that's value passed in. instead, seek set variable, like:

**event.js** var response; // main click event phone call $(document).on('click', '.start', function(){ root.ajax({ url: 'location' }, function( responsevalue ){ root.update( responsevalue ); }) }); **content.js** var flag = false; root.update = function( responsevalue ){ response = responsevalue; if(!flag){ // event assignment new created button $(document).on('click', '.innerstart', function(){ // first time prints okay after printing old value // response not getting updated console.log( response ); }); flag = true; } }

javascript jquery javascript-events

jquery - Custom scrollbar for Bootstrap Table -



jquery - Custom scrollbar for Bootstrap Table -

i have striped table done using bootstrap table next code (from first illustration on http://wenzhixin.net.cn/p/bootstrap-table/docs/examples.html). need find way scrollbar 1 generated slimscroll (http://rocha.la/jquery-slimscroll). non-negotiable client requirement.

<table data-toggle="table" data-url="data1.json" data-cache="false" data-height="299"> <thead> <tr> <th data-field="id">item id</th> <th data-field="name">item name</th> <th data-field="price">item price</th> </tr> </thead> </table>

questions:

1) doable, , if - how?

2) if not doable bootstrap table, there library create scrollbar of type tbody? (slimscroll works on div, not tbody)

3) if neither (1) nor (2) possible, options fixed-header scrollable-body table implementation scrollbar of type?

edit:

i unable create fully-functional jsfiddle, since bootstrap-table doesn't appear load via external resources. was, however, able create jsfiddle showing tbody slimscroll applied does. stand-alone div scrolls fine. tbody of table next not.

this works out of box.

inspecting generated bootstrap table elements, it's not scrolling <tbody> wrapper div of '.fixed-table-body'.

just use:

$(document).ready(function () { $('.fixed-table-body').slimscroll({}); });

here's working example.

jquery css twitter-bootstrap slimscroll scrollable-table

css - How to ignore 2 break lines in html and scc? -



css - How to ignore 2 break lines in html and scc? -

i'm debugging existing java/jsp/struts application, somehow generates 2 break lines , left big space in page :

<br></br> <br></br>

so searched around , found can utilize next in css ignore break lines :

br { display: none; }

see previous question : where did space come in html of struts app?

but cause break lines ignored in app, , not ideal solution i'm looking for, think br's generated struts , hard control, wonder if there way in css define 2 breaks nil [to ignored], maybe ?

brbr { display: none; } br.br { display: none; }

i tried it, didn't work, must in wrong format, css experts here can reply question ?

simple:

br + br {display:none;}

this selects br straight follows br using + selector.

ref: section 5.1 pattern matching , 5.7 adjacent sibling selectors

html css jsp

apache - icu4c - Updating/installing php after installing Yosemite using Homebrew -



apache - icu4c - Updating/installing php after installing Yosemite using Homebrew -

i upgraded yosemite. using apache 2.2, upgrade included 2.4. after configuration nightmares, ended reinstalling 2.4 using homebrew. have configured. however, when utilize old httpd.conf settings php, next error:

symbol not found: _unixd_config\n referenced from: /usr/local/opt/php55/libexec/apache2/libphp5.so\n expected in: /usr/local/cellar/httpd24/2.4.10/bin/httpd\n in /usr/local/opt/php55/libexec/apache2/libphp5.so

when running brew upgrade php55 next error when updating icu4c:

==> upgrading icu4c ==> downloading http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz downloaded: /library/caches/homebrew/icu4c-54.1.tgz error: sha1 mismatch expected: 8c752490bbf31cea26e20246430cee67d48abe34 actual: d625398a0d5cb34a0b5b2c4ab577e3b1957fb460 archive: /library/caches/homebrew/icu4c-54.1.tgz retry incomplete download, remove file above.

removing file not help. i've ran brew doctor, gives me concerning php:

warning: "config" scripts exist outside scheme or homebrew directories. `./configure` scripts *-config scripts determine if software packages installed, , additional flags utilize when compiling , linking. having additional scripts in path can confuse software installed via homebrew if config script overrides scheme or homebrew provided script of same name. found next "config" scripts: /usr/local/opt/php55/bin/php-config

not sure how proceed. i've tried install php56, needs same dependency. seems icu4c issue, kind of unchartered territory me. thanks

this error has nil version of xcode or gcc, llvm or clang have installed. if @ file in question can see happening.

[uxp@localhost]% brew install icu4c ==> downloading http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz ######################################################################## 100.0% error: sha1 mismatch expected: 8c752490bbf31cea26e20246430cee67d48abe34 actual: a2fd3379ea944f6b2f97fb0f79b7b85cb3e14d0b archive: /library/caches/homebrew/icu4c-54.1.tgz retry incomplete download, remove file above. [uxp@localhost]% file /library/caches/homebrew/icu4c-54.1.tgz /library/caches/homebrew/icu4c-54.1.tgz: html document text [uxp@localhost]% cat /library/caches/homebrew/icu4c-54.1.tgz <html><head> <title>testing</title> <!-- <script src="/js/jquery.com/jquery-1.11.0.min.js"></script> --> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script src="//sourceforge.net/js/mirrors.js"></script> <script src="/js/sf.js"></script> <script> var dr_loc = dr_parse_hash_url(); if (dr_loc) { dr_sf_main(dr_loc); } else { window.location.href = 'http://sourceforge.net/home.html'; } </script> </head><body> <noscript> we're sorry -- sourceforge site in disaster recovery mode, , requires utilize of javascript function. please check later. </noscript> </body></html>

so, wrong server, not machine. simplest approach contact them , allow them deal (it's on sourceforge's end), doesn't help install whatever wanted depends on icu. looking around internet, there copies on mirror sites of tar archive we're looking for, downloading manually , moving homebrew cache directory suffice.

[uxp@localhost]% curl http://dbg.download.sourcemage.org/mirror/icu4c-54_1-src.tgz -o /library/caches/homebrew/icu4c-54.1.tgz % total % received % xferd average speed time time time current dload upload total spent left speed 100 24.3m 100 24.3m 0 0 3669k 0 0:00:06 0:00:06 --:--:-- 5745k [uxp@localhost]% brew install icu4c ==> downloading http://download.icu-project.org/files/icu4c/54.1/icu4c-54_1-src.tgz downloaded: /library/caches/homebrew/icu4c-54.1.tgz ==> ./configure --prefix=/usr/local/cellar/icu4c/54.1 --disable-samples --disable-tests --enable-static --with-library-bits=64 ==> create ==> create install ==> caveats ... ==> summary /usr/local/cellar/icu4c/54.1: 242 files, 65m, built in 74 seconds

to honest, have no thought if solve problem apache , php. if still having issues builtin httpd , php, wipe out versions have installed through homebrew including configuration files in /usr/local/etc, upgrade icu4c, , systematically begin installation process of apache, php 5.x, , php5x-* modules need in add-on again.

i came across same homebrew failure trying reinstall couchdb, exclusively different original issue was.

php apache homebrew osx-yosemite